diff --git a/.env.example b/.env.example deleted file mode 100644 index 7dd1d684..00000000 --- a/.env.example +++ /dev/null @@ -1,29 +0,0 @@ - -APP_ENV=prod - -APP_DEBUG=true -REFERER_CHECK_ENABLED=true - -# 数据库配置 -DB_TYPE=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_NAME=oa -DB_USERNAME=root -DB_PASSWORD=123456 -DB_CHARSET=utf8 -DB_PREFIX=oa_ - -SESSION_STORAGE=redis -REDIS_HOST=127.0.0.1 -REDIS_PORT=6379 -REDIS_DB=0 -REDIS_PASSWORD= -APP_ENV=dev - -CACHE_DRIVER=redis - -MEMCACHED_HOST=127.0.0.1 -MEMCACHED_PORT=11211 - - diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe07704..00000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 786d0d91..00000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/storage/cache/ -/storage/logs/ -/storage/view/ -/storage/tests/ -/.env \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..8d0cc10d --- /dev/null +++ b/.htaccess @@ -0,0 +1,6 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php [QSA,L] + \ No newline at end of file diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache deleted file mode 100644 index 4f47968f..00000000 --- a/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.3.25","version":"3.88.2:v3.88.2#a8d15584bafb0f0d9d938827840060fd4a3ebc99","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"new_with_parentheses":{"anonymous_class":true},"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_fn_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"after_heredoc":false,"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"framework\\Annotations\\Delete.php":"da177f7ae7c50dc329e53494ade5ae33","framework\\Annotations\\Get.php":"1f72b880604b661ab980b9dbf39d175c","framework\\Annotations\\Middleware.php":"25af1e481ada9f3e2ada1d1eb8a1b8a7","framework\\Annotations\\Post.php":"449c39c209e89738bcea90f5f2d5f65a","framework\\Annotations\\Put.php":"ac9677d395458e31b9859fac3b8e7692","framework\\Annotations\\Route.php":"382a5d47fd5696881d5dd424582545b1","framework\\Cache\\CacheInterface.php":"7ef82d99a47ff8387efb0441088a4cc6","framework\\Cache\\CacheService.php":"196ffc20ad0235fa46d1807941a4cc6d","framework\\Cache\\TaggedCacheInterface.php":"52fed7156f80ba1bd37ad27bd93189ff","framework\\Cache\\TaggedCacheProxy.php":"422918e5ce32d7a6b8f81ef47ef1e830","framework\\Config\\ConfigLoader.php":"9a43a25a3a7175d9d6bea0163c34763b","framework\\Config\\ConfigService.php":"872d8ee3a4feb9684665da84e3d74b61","framework\\Container\\Container.php":"ca01eb30eb1bfb7c34b65872bda39a25","framework\\Core\\AnnotationRouteLoader.php":"c25b4e71ab8291c14ac3f936842ceb60","framework\\Core\\App.php":"01296618dc54018d3c93a18b65a6c072","framework\\Core\\Exception\\Handler.php":"32e27b60e5d2904445facf6f0850c0ba","framework\\Core\\Framework.php":"7b6ceada070de9e6cea2f92d9051866e","framework\\Core\\Kernel.php":"7f3dcd3c60bc7519ac6b9f182a1233fc","framework\\Core\\MiddlewareInterface.php":"af765585f371db4af05ebabf7af40e49","framework\\Core\\MiddlewarePipeline.php":"cc5bed3272f9f98329ab7084a241f912","framework\\Core\\Router.php":"f1050932d0ddfa14c558719a6494eb3b","framework\\helpers.php":"4b5c9bf633a06f05e6fc817c5102b81b","framework\\Log\\Logger.php":"45e93a9a18be4f11db30c83a9f12bfcb","framework\\Log\\LoggerService.php":"d9b67254a0adecfd90bb961013458509","framework\\Middleware\\MethodOverrideMiddleware.php":"bd3f3ec7922c08882a282770f7460364","framework\\Middleware\\MiddlewareDispatcher.php":"3864e079d0caec0fd5357ed68f4d608c","framework\\Middleware\\MiddlewareInterface.php":"ca74f8e68e37290a84e2209acd45d81a"}} \ No newline at end of file diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index d48f2304..00000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -{"version":2,"defects":[],"times":{"Tests\\Unit\\Annotations\\DeleteTest::test_example":0.001,"Tests\\Unit\\Annotations\\GetTest::test_example":0.001,"Tests\\Unit\\Annotations\\MiddlewareTest::test_example":0.001,"Tests\\Unit\\Annotations\\PostTest::test_example":0.001,"Tests\\Unit\\Annotations\\PutTest::test_example":0.001,"Tests\\Unit\\Annotations\\RouteTest::test_example":0.001,"Tests\\Unit\\Cache\\CacheInterfaceTest::test_example":0.001,"Tests\\Unit\\Cache\\CacheServiceTest::test_example":0.001,"Tests\\Unit\\Cache\\TaggedCacheInterfaceTest::test_example":0.001,"Tests\\Unit\\Cache\\TaggedCacheProxyTest::test_example":0.001,"Tests\\Unit\\Config\\ConfigLoaderTest::test_example":0.001,"Tests\\Unit\\Config\\ConfigServiceTest::test_example":0.001,"Tests\\Unit\\Container\\ContainerTest::test_example":0.001,"Tests\\Unit\\Core\\AnnotationRouteLoaderTest::test_example":0.001,"Tests\\Unit\\Core\\AppTest::test_example":0.001,"Tests\\Unit\\Core\\Exception\\HandlerTest::test_example":0.001,"Tests\\Unit\\Core\\FrameworkTest::test_example":0.001,"Tests\\Unit\\Core\\KernelTest::test_example":0.001,"Tests\\Unit\\Core\\MiddlewareInterfaceTest::test_example":0.001,"Tests\\Unit\\Core\\MiddlewarePipelineTest::test_example":0.001,"Tests\\Unit\\Core\\RouterTest::test_example":0.001,"Tests\\Unit\\Log\\LoggerServiceTest::test_example":0.001,"Tests\\Unit\\Log\\LoggerTest::test_example":0.001,"Tests\\Unit\\Middleware\\MethodOverrideMiddlewareTest::test_example":0.001,"Tests\\Unit\\Middleware\\MiddlewareDispatcherTest::test_example":0.001,"Tests\\Unit\\Middleware\\MiddlewareInterfaceTest::test_example":0.001,"Tests\\Unit\\helpersTest::test_example":0.001}} \ No newline at end of file diff --git a/App/Controller/HomeController.php b/App/Controller/HomeController.php new file mode 100644 index 00000000..83b53985 --- /dev/null +++ b/App/Controller/HomeController.php @@ -0,0 +1,25 @@ +Welcome to My PHP Framework!"); + } + + + public function show() + { + return new Response ('show here'); + } + + public function submit() + { + return new Response("Form submitted via POST!", 200); + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8252811e..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 xuey490 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/app/Controllers/Admin/RoleController.php b/app/Controllers/Admin/RoleController.php deleted file mode 100644 index 4bc50ab7..00000000 --- a/app/Controllers/Admin/RoleController.php +++ /dev/null @@ -1,49 +0,0 @@ -request->get('rolename'); - return new Response("Save Admin role: {$rolename}"); - } -} \ No newline at end of file diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php deleted file mode 100644 index 9031dd5d..00000000 --- a/app/Controllers/Admin/UserController.php +++ /dev/null @@ -1,19 +0,0 @@ -Admin - User List- index'); - } - - public function edit(Request $request) - { - $id = $request->get('id'); - return new Response("

$id,Admin Edit User ID: $id

"); - } -} \ No newline at end of file diff --git a/app/Controllers/Api/V1/UserController.php b/app/Controllers/Api/V1/UserController.php deleted file mode 100644 index d9360a92..00000000 --- a/app/Controllers/Api/V1/UserController.php +++ /dev/null @@ -1,56 +0,0 @@ - 'User fetched successfully', - 'id' => $id - ]; - } - - // ✅ 混合参数:标量 + Request 对象 - public function show(string $id, Request $request): array - { - $action = $request->query->get('action', 'view'); - return [ - 'id' => $id, - 'action' => $action, - 'query' => $request->query->all() - ]; - } - - // ✅ 纯查询参数(搜索) - public function search(string $keyword, string $category = 'all'): array - { - return compact('keyword', 'category'); - } - - // ✅ 路径参数 + 默认值 - public function edit(string $id, string $redirect = 'profile'): array - { - return compact('id', 'redirect'); - } - -} \ No newline at end of file diff --git a/app/Controllers/BlogController.php b/app/Controllers/BlogController.php deleted file mode 100644 index 86a4a332..00000000 --- a/app/Controllers/BlogController.php +++ /dev/null @@ -1,54 +0,0 @@ -twig = $twig; - $this->blogService = $blogService; - } - - public function index(): Response - { - // 🔍 检查当前 Twig 实例是否加载了 AppTwigExtension - $extensions = app('view')->getExtensions(); - $hasExtension = false; - foreach ($extensions as $ext) { - if ($ext instanceof \App\Twig\AppTwigExtension) { - $hasExtension = true; - //print_r($ext); - break; - } - } - if (!$hasExtension) { - //print_r("❌ AppTwigExtension NOT registered in Twig instance!"); - } else { - //print_r("✅ AppTwigExtension IS registered!"); - } - - - // 动态获取文章数据 - $posts = $this->blogService->getList(); - // 热门文章数据 - $popularPosts = $this->blogService->getpopularPosts(); - - $html = $this->twig->render('blog/list.html.twig', [ - 'posts' => $posts, - 'current_user' => app('session')->get('user'), - 'page_title' => '最新文章', - 'popularPosts' => $popularPosts, - ]); - - return new Response($html); - } -} \ No newline at end of file diff --git a/app/Controllers/HomeController.php b/app/Controllers/HomeController.php deleted file mode 100644 index 5031a779..00000000 --- a/app/Controllers/HomeController.php +++ /dev/null @@ -1,216 +0,0 @@ -info('App started'); - - #$userService = getService('App\Service\UserService'); // ✅ 只要容器已 set,就可以 - #print_r( $userService->getUsers(111) ); - // ✅ 此时 app() 已可用! - - //dump(app()->getServiceIds()); // 查看所有服务 ID - - //日志测试 - //$logger = app('log'); - //$logger->info('Homepage visited--------------------'); - - - - /* thinkcache测试 - $cache = app('cache'); - $cache->set('test1', ['name' => 'mike'], 3600); - $test1 =$cache->get('test1'); - //$test1 = $cache->clear(); - print_r($test1); - */ - - //Symfony缓存 - //cache_set('user_1', ['name' => 'Alice'], 3600); - //$user = cache_get('user_1'); - #print_r( $user ); - - //$post = ['name' => 'Alice']; - //cache_set('post_1', $post, 3600, ['posts', 'user_123']); - //cache_set('post_2', $post, 3600, ['posts', 'category_news']); - // 删除所有 posts 相关缓存 - //cache_invalidate_tags(['posts']); - //cache_invalidate_tags(['user_123']); - //print_r( cache_get('post_1') ); - - //session测试 - //$session = app('session'); - // 设置一个 session 属性 - //$session->set('user_id', 1283); - // 获取一个 session 属性 - //$userId = $session->get('user_id'); - //echo $userId; - - //配置获取测试 - //print_r(config('database')); - - echo trans('hello'); // 自动输出对应语言 - echo '
当前语言包:' . current_locale(); - return new Response('

Welcome to My Framework!

'); - } - - //http://localhost:8000/home/xss?name=mike - public function xss(Request $request): Response - { - // 如果是 JSON 请求,使用过滤后的数据 - $data = MiddlewareXssFilter::getFilteredJsonBody($request); - - //if ($data === null) { - // 可能是表单提交,用 $request->request->all() - // $data = $request->request->all(); - //} - - $name = $request->get('name'); - - // $data 中的字符串已自动 XSS 过滤 - //$name = $data['name'] ?? ''; - // 直接输出是安全的(无需再 htmlspecialchars) - - return new Response("Hello, {$name}"); - } - - public function showForm(Request $request): Response - { - $token = $this->csrf->getToken('default'); - // 传递给模板 - return new Response("
- - - -
"); - } - - //CSRF token测试。 - public function getForm(Request $request) - { - // 1.【可选】兜底验证(如果中间件可能失效) - $token = $request->request->get('_token'); - if (! $this->csrf->isTokenValid('default', $token)) { - //return new Response('Invalid CSRF token.', 503); - } - - $title = $request->request->get('title'); - return new Response("Hello, {$title}"); - // 2. 重定向到成功页面(✅ 正确) - //return new RedirectResponse('/home/successPage'); - } - - public function successPage(Request $request) - { - - return new Response('

提交成功!

'); - } - - public function getsession(Request $request): Response - { - $session = $request->getSession(); // Symfony 自动绑定 session 到 Request - $session->set('test', 'hello'); - return new Response($session->get('test')); - } - - public function uploadform(): Response - { //echo BASE_PATH; - //$token = $this->csrf->getToken('default'); - $html = view('upload/index'); - return new Response($html); - } - - public function upload(Request $request) - { - return ; - //下面是文件上传的测试 - // 获取普通字段 - $title = $request->request->get('title'); // request->get() 也可以,但明确用 ->request 更清晰 - - // 获取上传的文件(UploadedFile 对象) - $uploadedFile = $request->files->get('image'); - - if ($uploadedFile && $uploadedFile->isValid()) { - // 文件基本信息 - $originalName = $uploadedFile->getClientOriginalName(); - $extension = $uploadedFile->getClientOriginalExtension(); - $mimeType = $uploadedFile->getMimeType(); - $size = $uploadedFile->getSize(); // 字节 - - // 保存文件(例如保存到 public/uploads/) - $newFilename = uniqid() . '.' . $extension; - $uploadedFile->move( - BASE_PATH . '/public/uploads', - $newFilename - ); - - // 你可以返回 JSON、重定向或渲染模板 - return json_encode([ - 'title' => $title, - 'file' => [ - 'original_name' => $originalName, - 'saved_as' => $newFilename, - 'mime_type' => $mimeType, - 'size' => $size, - ] - ]); - } - - // 文件无效或未上传 - return json_encode(['error' => '文件上传失败'], 400); - } - - - - - - - //列举自己需要的参数 - public function show($id) - { - // 获取所有用户 => 返回数组数据或 json 响应 - $users = Admin::select()->toArray(); - print_r($users); // 因为你框架会处理 array => json - - //$id = $request->get('id'); - //return new Response("

User ID: $id

"); - } - - // 只获取需要的参数 - public function search1(Request $request, $roleid, $name, $status) - { - - } - - // 或者只获取Request对象 - public function search2(Request $request) - { - $roleid = $request->get('roleid'); - $name = $request->get('name'); - $status = $request->get('status'); - // ... - } - - // 混合使用 - public function search3(Request $request, $id) - { - // 从路由获取id,从请求中获取其他参数 - $name = $request->get('name'); - // ... - } - -} diff --git a/app/Controllers/ListController.php b/app/Controllers/ListController.php deleted file mode 100644 index 7813ba65..00000000 --- a/app/Controllers/ListController.php +++ /dev/null @@ -1,51 +0,0 @@ -}", name="test.user" , options={"_middleware": {"App\Middleware\AuthMiddleware", "App\Middleware\LogMiddleware"} }) - */ - public function getUser($id) - { - return "正在查询 ID 为 " . (int)$id . " 的用户信息..."; - } -} \ No newline at end of file diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php deleted file mode 100644 index 95ca9cfe..00000000 --- a/app/Controllers/UserController.php +++ /dev/null @@ -1,461 +0,0 @@ -userService = $userService; - //var_dump($this->userService->getUserById(1)); - //var_dump("UserController 构造函数被调用,PDO 依赖已注入!"); - } - - - - - // 路由:/user/get/1 - public function get(int $id): Response - { - // 使用注入的 UserService 获取数据 - $user = $this->userService->getUserById($id); - - if (empty($user)) { - return new Response('

User Not Found

', 404); - } - - return new Response("ID: {$user['id']}, Name: {$user['name']}"); - } - - - /** - * 1. 获取用户列表(GET /user) - * 支持分页:/user?page=1&size=10 - */ - public function index(Request $request): Response - { - // 获取容器 - $container = Container::getInstance(); - // 获取DI服务 - //$test = $container->get('test.service'); - //print_r($test); - - //// 获取控制器(自动创建) - //$homeController = $container->get('App\Controllers\HomeController'); - //$homeController->index(); - - // 1. 获取请求参数(分页) - $page = (int)$request->get('page', 1); // 默认第1页 - $size = (int)$request->get('size', 10); // 默认每页10条 - $page = $page < 1 ? 1 : $page; // 防止页数小于1 - $size = $size < 1 || $size > 50 ? 10 : $size; // 限制每页最大50条 - - // 2. 模拟数据库查询(实际项目替换为ORM查询,如Eloquent) - $total = 100; // 总用户数(模拟) - $users = $this->mockUserList($page, $size); // 模拟用户列表数据 - - // 3. 计算分页信息 - $totalPages = (int)ceil($total / $size); - $pagination = [ - 'page' => $page, - 'size' => $size, - 'total' => $total, - 'totalPages' => $totalPages - ]; - - // 4. 返回响应(支持HTML/JSON两种格式,通过format参数控制) - $format = $request->get('format', 'html'); - if ($format === 'json') { - // API场景:返回JSON格式 - return new JsonResponse([ - 'code' => 200, - 'message' => 'success', - 'data' => [ - 'users' => $users, - 'pagination' => $pagination - ] - ]); - } - - // 前端页面场景:返回HTML(实际项目可替换为模板渲染) - $html = '

User List (Page ' . $page . '/' . $totalPages . ')

'; - $html .= ''; - $html .= ''; - foreach ($users as $user) { - $html .= ''; - $html .= ''; - $html .= ''; - $html .= ''; - $html .= ''; - } - $html .= '
IDNameEmailActions
' . $user['id'] . '' . $user['name'] . '' . $user['email'] . ''; - $html .= 'View | '; - $html .= 'Edit | '; - $html .= 'Delete'; - $html .= '
'; - $html .= '
Add New User'; - - // 删除用户的JS逻辑(模拟PUT/DELETE请求,实际项目用表单或Axios) - $html .= ''; - - return new Response($html); - } - - /** - * 2. 获取单个用户详情(GET /user/{id}) - */ - public function show(int $id, Request $request): Response - { - // 1. 模拟数据库查询(实际项目替换为ORM查询) - $user = $this->mockUser($id); - if (!$user) { - // 用户不存在:返回404 - return new JsonResponse([ - 'code' => 404, - 'message' => 'User not found (ID: ' . $id . ')' - ], 404); - } - - // 2. 返回响应(支持HTML/JSON) - $format = $request->get('format', 'html'); - if ($format === 'json') { - return new JsonResponse([ - 'code' => 200, - 'message' => 'success', - 'data' => $user - ]); - } - - // 前端页面:显示用户详情 - $html = '

User Detail (ID: ' . $user['id'] . ')

'; - $html .= ''; - $html .= '
'; - $html .= 'Edit | '; - $html .= 'Back to List'; - - return new Response($html); - } - - /** - * 3. 显示创建用户表单(GET /user/create) - */ - public function create(): Response - { - // 创建用户的表单页面 - $html = '

Create New User

'; - $html .= '
'; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '

'; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '

'; - $html .= '
'; - $html .= ''; - $html .= ''; - - $html .= '

'; - $html .= ''; - $html .= 'Cancel'; - $html .= '
'; - - return new Response($html); - } - - /** - * 4. 提交创建用户数据(POST /user) - */ - public function store(Request $request): Response - { - // 1. 获取并验证请求参数 - $name = trim($request->request->get('name', '')); - $email = trim($request->request->get('email', '')); - $password = $request->request->get('password', ''); - - // 参数验证(实际项目可使用验证组件,如symfony/validator) - $errors = []; - if (empty($name)) $errors[] = 'Name is required'; - if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) $errors[] = 'Valid email is required'; - if (strlen($password) < 6) $errors[] = 'Password must be at least 6 characters'; - - // 验证失败:返回错误信息 - if (!empty($errors)) { - if ($request->isXmlHttpRequest()) { // AJAX请求返回JSON - return new JsonResponse([ - 'code' => 400, - 'message' => 'Validation failed', - 'errors' => $errors - ], 400); - } - // 普通表单请求:返回带错误的表单页面 - $html = '

Create New User (Error)

'; - $html .= '
' . implode('
', $errors) . '

'; - $html .= '
'; - $html .= '

'; - $html .= '

'; - $html .= '

'; - $html .= ' | '; - $html .= 'Cancel'; - $html .= '
'; - return new Response($html); - } - - // 2. 模拟数据库插入(实际项目替换为ORM保存) - $newUserId = rand(100, 999); // 模拟生成新用户ID - $this->mockSaveUser($newUserId, $name, $email, $password); - - // 3. 响应结果(重定向或JSON) - if ($request->isXmlHttpRequest()) { - return new JsonResponse([ - 'code' => 201, - 'message' => 'User created successfully', - 'data' => ['id' => $newUserId, 'name' => $name, 'email' => $email] - ], 201); - } - - // 普通表单:重定向到用户详情页(避免表单重复提交) - return new Response('', 302, [ - 'Location' => '/user/' . $newUserId . '' - ]); - } - - /** - * 5. 显示编辑用户表单(GET /user/{id}/edit) - */ - public function edit(Request $request, int $id): Response - { - // 1. 模拟查询用户数据 - $id =$request->get('id'); - $user = $this->mockUser($id); - if (!$user) { - return new JsonResponse([ - 'code' => 404, - 'message' => 'User not found (ID: ' . $id . ')' - ], 404); - } - - // 2. 编辑表单页面(PUT请求通过隐藏字段模拟,浏览器默认不支持PUT) - $html = '

Edit User (ID: ' . $id . ')

'; - $html .= '
'; - // 隐藏字段:标记为PUT请求(后续需在框架中处理PUT/DELETE请求) - $html .= ''; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '

'; - $html .= '
'; - $html .= ''; - $html .= ''; - $html .= '

'; - $html .= '
'; - $html .= ''; - $html .= ''; - - $html .= '

'; - $html .= ''; - $html .= 'Cancel'; - $html .= '
'; - - return new Response($html); - } - - /** - * 6. 提交更新用户数据(PUT /user/{id}) - */ - public function update(int $id, Request $request): Response - { - // 1. 检查用户是否存在 - $user = $this->mockUser($id); - if (!$user) { - return new JsonResponse([ - 'code' => 404, - 'message' => 'User not found (ID: ' . $id . ')' - ], 404); - } - - // 2. 获取并验证参数 - $name = trim($request->request->get('name', '')); - $email = trim($request->request->get('email', '')); - $password = $request->request->get('password', ''); // 可选:为空则不更新密码 - - $errors = []; - if (empty($name)) $errors[] = 'Name is required'; - if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) $errors[] = 'Valid email is required'; - - if (!empty($errors)) { - return new JsonResponse([ - 'code' => 400, - 'message' => 'Validation failed', - 'errors' => $errors - ], 400); - } - - // 3. 模拟数据库更新 - $this->mockUpdateUser($id, $name, $email, $password); - - // 4. 响应结果 - if ($request->isXmlHttpRequest()) { - return new JsonResponse([ - 'code' => 200, - 'message' => 'User updated successfully', - 'data' => ['id' => $id, 'name' => $name, 'email' => $email] - ]); - } - - // 重定向到用户详情页 - return new Response('', 302, [ - 'Location' => '/user/edit?id=' . $id . '' - ]); - } - - /** - * 7. 删除用户(DELETE /user/{id}) - */ - public function destroy(int $id): Response - { - // 1. 检查用户是否存在 - $user = $this->mockUser($id); - if (!$user) { - return new JsonResponse([ - 'code' => 404, - 'message' => 'User not found (ID: ' . $id . ')' - ], 404); - } - - // 2. 模拟数据库删除 - $this->mockDeleteUser($id); - - // 3. 响应结果(JSON,删除后通常不返回HTML) - return new JsonResponse([ - 'code' => 200, - 'message' => 'User deleted successfully', - 'data' => ['id' => $id] - ]); - } - - // ------------------------------ - // 以下为模拟数据方法(实际项目替换为ORM) - // ------------------------------ - /** - * 模拟用户列表数据 - */ - // ... (前面的 index, show, create, store, edit, update, destroy 方法) - - // ------------------------------ - // 以下为模拟数据方法(实际项目替换为ORM) - // ------------------------------ - - /** - * 模拟获取单个用户数据 - */ - private function mockUser(int $id): ?array - { - // 仅模拟少量数据用于测试 - $mockUsers = [ - 1 => [ - 'id' => 1, - 'name' => 'Admin User', - 'email' => 'admin@example.com', - 'password' => password_hash('admin123', PASSWORD_DEFAULT), - 'created_at' => '2023-01-01 10:00:00', - ], - 2 => [ - 'id' => 2, - 'name' => 'Normal User', - 'email' => 'user@example.com', - 'password' => password_hash('user123', PASSWORD_DEFAULT), - 'created_at' => '2023-02-15 15:30:00', - ], - 3 => [ - 'id' => 3, - 'name' => 'Test User', - 'email' => 'test@example.com', - 'password' => password_hash('test123', PASSWORD_DEFAULT), - 'created_at' => '2023-03-20 09:45:00', - ], - ]; - - return $mockUsers[$id] ?? null; - } - - /** - * 模拟用户列表数据 - */ - private function mockUserList(int $page, int $size): array - { - $users = []; - $start = ($page - 1) * $size + 1; - $end = $start + $size - 1; - - // 生成连续的用户数据用于列表展示 - for ($i = $start; $i <= $end; $i++) { - $users[] = [ - 'id' => $i, - 'name' => 'User_' . $i, - 'email' => 'user_' . $i . '@example.com', - 'created_at' => date('Y-m-d H:i:s', strtotime("-$i days")), - ]; - } - return $users; - } - - /** - * 模拟保存新用户 - */ - private function mockSaveUser(int $id, string $name, string $email, string $password): void - { - // 实际项目中,这里会是 $user->save() 之类的ORM操作 - // 模拟数据库写入成功 - // echo "User {$name} (ID: {$id}) saved to database.\n"; - } - - /** - * 模拟更新用户 - */ - private function mockUpdateUser(int $id, string $name, string $email, string $password = ''): void - { - // 实际项目中,这里会是 $user->update(...) 之类的ORM操作 - // 模拟数据库更新成功 - // echo "User {$id} updated.\n"; - } - - /** - * 模拟删除用户 - */ - private function mockDeleteUser(int $id): void - { - // 实际项目中,这里会是 $user->delete() 之类的ORM操作 - // 模拟数据库删除成功 - // echo "User {$id} deleted.\n"; - } -} // class UserController 结束 \ No newline at end of file diff --git a/app/Controllers/ViewController.php b/app/Controllers/ViewController.php deleted file mode 100644 index 1bd9060a..00000000 --- a/app/Controllers/ViewController.php +++ /dev/null @@ -1,53 +0,0 @@ -twig = $twig; - } - - public function welcome(): Response - { - - $html = $this->twig->render('home/welcome.html.twig', [ - 'name' => '访客', - 'site_name' => 'NovaPHP', - - 'app_debug' => $_ENV['APP_DEBUG'] ?? true, - ]); - - return new Response($html, 200, [ - 'Content-Type' => 'text/html' - ]); - } - - public function index() - { - // 在控制器中 使用助手函数 - return view('home/index', ['name' => 'Alice']); - } - - //错误测试 - public function errortest() - { - try { - return new Response($this->twig->render('homes/index.html.twig', $data)); - } catch (LoaderError | RuntimeError | SyntaxError $e) { - if ($_ENV['APP_DEBUG']) { - throw $e; // 开发环境抛出 - } - return new Response('模板渲染错误', 500); - } - } -} \ No newline at end of file diff --git a/app/Middleware/AuthMiddleware.php b/app/Middleware/AuthMiddleware.php deleted file mode 100644 index ed5c4a4e..00000000 --- a/app/Middleware/AuthMiddleware.php +++ /dev/null @@ -1,27 +0,0 @@ -getSession(); - // 模拟鉴权:如果没有登录,返回401 - // if (!$id->get('user_id')) { - // return new Response('

401 Unauthorized: Please login first

', 401); - //} - - // 鉴权通过,执行下一个中间件/控制器 - $response =$next($request); - - dump('--- 退出 AuthMiddleware (中间件) ---'); - return $response; - } -} \ No newline at end of file diff --git a/app/Middleware/LogMiddleware.php b/app/Middleware/LogMiddleware.php deleted file mode 100644 index af79fb1f..00000000 --- a/app/Middleware/LogMiddleware.php +++ /dev/null @@ -1,25 +0,0 @@ -getSession(); - // 模拟鉴权:如果没有登录,返回401 - // if (!$id->get('user_id')) { - // return new Response('

401 Unauthorized: Please login first

', 401); - //} - - // 鉴权通过,执行下一个中间件/控制器 - $response =$next($request); - - - dump('--- 退出 LogMiddleware (中间件) ---'); - return $response; - } -} \ No newline at end of file diff --git a/app/Models/Admin.php b/app/Models/Admin.php deleted file mode 100644 index 54ba9621..00000000 --- a/app/Models/Admin.php +++ /dev/null @@ -1,18 +0,0 @@ -[ - 'id'=> 1, - 'title'=>'测试标题...', - 'excerpt'=>'测试...', - 'createdAt'=>'2025-08-01', - ], - '2'=>[ - 'id'=> 2, - 'title'=>'测试标题测试标题测试标题...', - 'excerpt'=>'测试...', - 'createdAt'=>'2025-09-01', - ], - - - ]; - } - - - public function getpopularPosts(): array - { - return [ - '1'=>[ - 'id'=> 1, - 'title'=>'热门标题。。。标题1...', - 'excerpt'=>'测试...', - 'createdAt'=>'2025-08-01', - ], - - '2'=>[ - 'id'=> 2, - 'title'=>'热门标题。。。标题2...', - 'excerpt'=>'测试...', - 'createdAt'=>'2025-08-01', - ], - - - ]; - } - - - - - - - -} \ No newline at end of file diff --git a/app/Services/UserService.php b/app/Services/UserService.php deleted file mode 100644 index eb4267b7..00000000 --- a/app/Services/UserService.php +++ /dev/null @@ -1,25 +0,0 @@ -pdo->prepare('SELECT * FROM users WHERE id = :id'); - //$stmt->execute(['id' => $id]); - //return $stmt->fetch(\PDO::FETCH_ASSOC) ?: []; - return ['1' , 'test']; - } -} \ No newline at end of file diff --git a/app/Twig/AppTwigExtension.php b/app/Twig/AppTwigExtension.php deleted file mode 100644 index 9cd9df7e..00000000 --- a/app/Twig/AppTwigExtension.php +++ /dev/null @@ -1,114 +0,0 @@ -tokenManager = $tokenManager; - $this->tokenName = $tokenName; - $this->session = app('session'); - $this->siteConfig = require __DIR__ . '/../../config/site.php'; - - // ⚠️ 移除下面这行,除非你真的想每次覆盖用户! - //$this->session->set('user', 'zhangSan'); - - //echo $this->tokenManager->getToken('default'); - } - - public function getGlobals(): array - { - return [ - 'current_user' => $this->session->get('user'), - 'site' => '我的测试站点', - 'is_mobile' => $this->isMobile(), - ]; - } - - public function isMobile(): bool - { - $ua = $_SERVER['HTTP_USER_AGENT'] ?? ''; - $pattern = '/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Windows Phone/i'; - return (bool) preg_match($pattern, $ua); // ✅ 强制转为 true/false - } - - public function getFunctions(): array - { - return [ - new TwigFunction('url', [$this, 'generateUrl']), - new TwigFunction('asset', [$this, 'asset']), - new TwigFunction('route', [$this, 'generateRoute']), - - new TwigFunction('csrf_field', [$this, 'renderCsrfField'], ['is_safe' => ['html']]), - new TwigFunction('csrf_token', [$this, 'getToken']), - - new TwigFunction('form_start', [$this, 'formStart'], ['is_safe' => ['html'], 'needs_context' => true]), - - ]; - } - - public function formStart(array $context, array $options = []): string - { - $method = $options['method'] ?? 'post'; - $action = $options['action'] ?? ''; - $methodAttr = strtoupper($method); - $isPostLike = in_array($methodAttr, ['POST', 'PUT', 'PATCH', 'DELETE']); - - $html = sprintf('
', htmlspecialchars($method), htmlspecialchars($action)); - - if ($isPostLike) { - $html .= $this->renderCsrfField(); - } - - return $html; - } - - public function renderCsrfField(): string - { - $token = $this->tokenManager->getToken('default'); - - $html = sprintf( - '', - htmlspecialchars($this->tokenName, ENT_QUOTES, 'UTF-8'), - htmlspecialchars($token, ENT_QUOTES, 'UTF-8') - ); - return $html; - } - - public function getToken(): string - { - return $this->tokenManager->getToken('default'); - } - - public function generateUrl(string $path): string - { - $baseUrl = $_ENV['APP_BASE_URL'] ?? 'http://localhost'; - return $baseUrl . '/' . ltrim($path, '/'); - } - - public function asset(string $path): string - { - $version = $_ENV['ASSET_VERSION'] ?? '1.0'; - $prefix = $_ENV['ASSET_CDN'] ?? ''; - return $prefix . '/assets/' . ltrim($path, '/') . '?v=' . $version; - } - - public function generateRoute(string $name, array $params = []): string - { - // TODO: 与你的路由系统集成 - // 示例:return Router::generate($name, $params); - return '/demo'; // 临时 - } -} diff --git a/composer.json b/composer.json index f3a42121..3d138141 100644 --- a/composer.json +++ b/composer.json @@ -1,63 +1,19 @@ { - "name": "blue2004/novaphp", - "description": "A lightweight Powerful Fast, Simple, Safty PHP framework with Symfony components", + "name": "my/framework", "type": "project", - "license": "MIT", - "authors": [ - { - "name": "blue2004", - "email": "your.email@example.com" - } - ], "require": { - "php": "^8.1", - "doctrine/annotations": "^2.0", - "ezyang/htmlpurifier": "^4.18", - "fig/http-message-util": "^1.1", - "monolog/monolog": "3.7.0", - "psr/http-message": "*", - "psr/http-server-middleware": "^1.0", - "ramsey/uuid": "^4.9", - "symfony/cache": "^7.2", - "symfony/config": "^7.3", - "symfony/dependency-injection": "^7.3", - "symfony/dotenv": "^7.2", - "symfony/finder": "^7.3", - "symfony/http-foundation": "^7.3", - "symfony/http-kernel": "^7.2", - "symfony/mime": "^7.3", - - "symfony/rate-limiter": "^7.2", - "symfony/routing": "^6.0", - "symfony/translation": "^7.3", - "symfony/yaml": "^7.3", - "topthink/think-cache": "^3.0", - "topthink/think-orm": "^3.0", - "twig/twig": "^3.14" - }, - "require-dev": { - "phpunit/phpunit": "*", - "symfony/var-dumper": "^6.0 || ^7.0" + "php": "^8.0", + "nikic/fast-route": "^1.3", + "topthink/think-orm": "^2.0" }, "autoload": { "psr-4": { - "Framework\\": "framework/", - "App\\": "app/" - }, - "files": [ - "framework/helpers.php" - ] - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" + "App\\": "App/", + "Framework\\": "framework/" } }, "config": { - "platform-check": false, - "preferred-install": "dist", - "sort-packages": true - }, - "minimum-stability": "stable", - "prefer-stable": true -} + "sort-packages": true, + "optimize-autoloader": true + } +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 4eaa2561..49c4dc83 100644 --- a/composer.lock +++ b/composer.lock @@ -4,404 +4,84 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "419571ddf03efdd007d3e3dba153ccae", + "content-hash": "9b08b741b9b29d9b8d308493e978457f", "packages": [ { - "name": "brick/math", - "version": "0.14.0", + "name": "nikic/fast-route", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/brick/math.git", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2" + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", "shasum": "" }, "require": { - "php": "^8.2" + "php": ">=5.4.0" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "2.1.22", - "phpunit/phpunit": "^11.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Arbitrary-precision arithmetic library", - "keywords": [ - "Arbitrary-precision", - "BigInteger", - "BigRational", - "arithmetic", - "bigdecimal", - "bignum", - "bignumber", - "brick", - "decimal", - "integer", - "math", - "mathematics", - "rational" - ], - "support": { - "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.0" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2025-08-29T12:40:03+00:00" - }, - { - "name": "doctrine/annotations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.2" - }, - "abandoned": true, - "time": "2024-09-05T10:17:24+00:00" - }, - { - "name": "doctrine/lexer", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2024-02-05T11:56:58+00:00" - }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.18.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b", - "shasum": "" - }, - "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" - }, - "require-dev": { - "cerdic/css-tidy": "^1.7 || ^2.0", - "simpletest/simpletest": "dev-master" - }, - "suggest": { - "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", - "ext-bcmath": "Used for unit conversion and imagecrash protection", - "ext-iconv": "Converts text to and from non-UTF-8 encodings", - "ext-tidy": "Used for pretty-printing HTML" + "phpunit/phpunit": "^4.8.35|~5.7" }, "type": "library", "autoload": { "files": [ - "library/HTMLPurifier.composer.php" + "src/functions.php" ], - "psr-0": { - "HTMLPurifier": "library/" - }, - "exclude-from-classmap": [ - "/library/HTMLPurifier/Language/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "support": { - "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" - }, - "time": "2024-11-01T03:51:45+00:00" - }, - { - "name": "fig/http-message-util", - "version": "1.1.5", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { "psr-4": { - "Fig\\Http\\Message\\": "src/" + "FastRoute\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Nikita Popov", + "email": "nikic@php.net" } ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "description": "Fast request router for PHP", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "router", + "routing" ], "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + "issues": "https://github.com/nikic/FastRoute/issues", + "source": "https://github.com/nikic/FastRoute/tree/master" }, - "time": "2020-11-24T22:02:12+00:00" + "time": "2018-02-13T20:26:39+00:00" }, { - "name": "monolog/monolog", - "version": "3.7.0", + "name": "psr/log", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" + "url": "https://github.com/php-fig/log.git", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Monolog\\": "src/Monolog" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -410,46 +90,34 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", - "logging", + "psr", "psr-3" ], "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.7.0" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2024-06-28T09:40:51+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { - "name": "psr/cache", - "version": "3.0.0", + "name": "psr/simple-cache", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { @@ -458,12 +126,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -476,4810 +144,129 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common interfaces for simple caching", "keywords": [ "cache", + "caching", "psr", - "psr-6" + "psr-16", + "simple-cache" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2021-10-29T13:22:09+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "topthink/think-helper", + "version": "v3.1.11", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/top-think/think-helper.git", + "reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/1d6ada9b9f3130046bf6922fe1bd159c8d88a33c", + "reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c", "shasum": "" }, "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" + "php": ">=7.1.0" }, - "require": { - "php": ">=7.2.0" + "require-dev": { + "phpunit/phpunit": "^9.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { + "files": [ + "src/helper.php" + ], "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "think\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "yunwuxin", + "email": "448901948@qq.com" } ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], + "description": "The ThinkPHP6 Helper Package", "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/top-think/think-helper/issues", + "source": "https://github.com/top-think/think-helper/tree/v3.1.11" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2025-04-07T06:55:59+00:00" }, { - "name": "psr/http-message", - "version": "2.0", + "name": "topthink/think-orm", + "version": "v2.0.62", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "url": "https://github.com/top-think/think-orm.git", + "reference": "e53bfea572a133039ad687077120de5521af617f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/e53bfea572a133039ad687077120de5521af617f", + "reference": "e53bfea572a133039ad687077120de5521af617f", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "ext-json": "*", + "ext-pdo": "*", + "php": ">=7.1.0", + "psr/log": "^1.0|^2.0", + "psr/simple-cache": "^1.0|^2.0", + "topthink/think-helper": "^3.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^7|^8|^9.5" }, + "type": "library", "autoload": { + "files": [ + "stubs/load_stubs.php" + ], "psr-4": { - "Psr\\Http\\Message\\": "src/" + "think\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "liu21st", + "email": "liu21st@gmail.com" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "think orm", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "database", + "orm" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "issues": "https://github.com/top-think/think-orm/issues", + "source": "https://github.com/top-think/think-orm/tree/v2.0.62" }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" - }, - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" - }, - "time": "2023-04-11T06:14:47+00:00" - }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" - }, - { - "name": "psr/simple-cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" - }, - "time": "2021-10-29T13:26:27+00:00" - }, - { - "name": "ramsey/collection", - "version": "2.1.1", - "source": { - "type": "git", - "url": "https://github.com/ramsey/collection.git", - "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", - "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.45", - "fakerphp/faker": "^1.24", - "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^2.1", - "mockery/mockery": "^1.6", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.4", - "phpspec/prophecy-phpunit": "^2.3", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.5", - "ramsey/coding-standard": "^2.3", - "ramsey/conventional-commits": "^1.6", - "roave/security-advisories": "dev-latest" - }, - "type": "library", - "extra": { - "captainhook": { - "force-install": true - }, - "ramsey/conventional-commits": { - "configFile": "conventional-commits.json" - } - }, - "autoload": { - "psr-4": { - "Ramsey\\Collection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "A PHP library for representing and manipulating collections.", - "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" - ], - "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.1" - }, - "time": "2025-03-22T05:38:12+00:00" - }, - { - "name": "ramsey/uuid", - "version": "4.9.1", - "source": { - "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440", - "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440", - "shasum": "" - }, - "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "captainhook/captainhook": "^5.25", - "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "ergebnis/composer-normalize": "^2.47", - "mockery/mockery": "^1.6", - "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.6", - "php-mock/php-mock-mockery": "^1.5", - "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpbench/phpbench": "^1.2.14", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^9.6", - "slevomat/coding-standard": "^8.18", - "squizlabs/php_codesniffer": "^3.13" - }, - "suggest": { - "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", - "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "type": "library", - "extra": { - "captainhook": { - "force-install": true - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Ramsey\\Uuid\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "support": { - "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.1" - }, - "time": "2025-09-04T20:59:21+00:00" - }, - { - "name": "symfony/cache", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f", - "reference": "bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/cache": "^2.0|^3.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^3.6", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.4|^7.0" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/dependency-injection": "<6.4", - "symfony/http-kernel": "<6.4", - "symfony/var-dumper": "<6.4" - }, - "provide": { - "psr/cache-implementation": "2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0", - "symfony/cache-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/filesystem": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "classmap": [ - "Traits/ValueWrapper.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", - "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/cache": "^3.0" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-03-13T15:25:07+00:00" - }, - { - "name": "symfony/config", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/8a09223170046d2cfda3d2e11af01df2c641e961", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-22T12:46:16+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "82119812ab0bf3425c1234d413efd1b19bb92ae4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/82119812ab0bf3425c1234d413efd1b19bb92ae4", - "reference": "82119812ab0bf3425c1234d413efd1b19bb92ae4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4.20|^7.2.5" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.4", - "symfony/finder": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "symfony/service-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "symfony/config": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:21:43+00:00" - }, - { - "name": "symfony/dotenv", - "version": "v7.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "2192790a11f9e22cbcf9dc705a3ff22a5503923a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/2192790a11f9e22cbcf9dc705a3ff22a5503923a", - "reference": "2192790a11f9e22cbcf9dc705a3ff22a5503923a", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "conflict": { - "symfony/console": "<6.4", - "symfony/process": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "source": "https://github.com/symfony/dotenv/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-07-10T08:29:33+00:00" - }, - { - "name": "symfony/error-handler", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "99f81bc944ab8e5dae4f21b4ca9972698bbad0e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/99f81bc944ab8e5dae4f21b4ca9972698bbad0e4", - "reference": "99f81bc944ab8e5dae4f21b4ca9972698bbad0e4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^6.4|^7.0" - }, - "conflict": { - "symfony/deprecation-contracts": "<2.5", - "symfony/http-kernel": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/webpack-encore-bundle": "^1.0|^2.0" - }, - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v7.3.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-08-13T11:49:31+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:21:43+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v7.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "require-dev": { - "symfony/process": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-07-07T08:17:47+00:00" - }, - { - "name": "symfony/finder", - "version": "v7.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-07-15T13:41:35+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "c061c7c18918b1b64268771aad04b40be41dd2e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c061c7c18918b1b64268771aad04b40be41dd2e6", - "reference": "c061c7c18918b1b64268771aad04b40be41dd2e6", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php83": "^1.27" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4.12|>=7.0,<7.1.5" - }, - "require-dev": { - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4.12|^7.1.5", - "symfony/clock": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-16T08:38:17+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "b796dffea7821f035047235e076b60ca2446e3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b796dffea7821f035047235e076b60ca2446e3cf", - "reference": "b796dffea7821f035047235e076b60ca2446e3cf", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^7.3", - "symfony/http-foundation": "^7.3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/browser-kit": "<6.4", - "symfony/cache": "<6.4", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<6.4", - "symfony/form": "<6.4", - "symfony/http-client": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/translation": "<6.4", - "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<6.4", - "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.4", - "twig/twig": "<3.12" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^6.4|^7.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/css-selector": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^7.1", - "symfony/routing": "^6.4|^7.0", - "symfony/serializer": "^7.1", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/translation": "^6.4|^7.0", - "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^6.4|^7.0", - "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0", - "symfony/var-exporter": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-27T12:32:17+00:00" - }, - { - "name": "symfony/mime", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/b1b828f69cbaf887fa835a091869e55df91d0e35", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<6.4", - "symfony/serializer": "<6.4.3|>7.0,<7.0.3" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1|^4", - "league/html-to-markdown": "^5.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/serializer": "^6.4.3|^7.0.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows manipulating MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "support": { - "source": "https://github.com/symfony/mime/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-16T08:38:17+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v7.3.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-08-05T10:16:07+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "symfony/polyfill-intl-normalizer": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-10T14:38:51+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-23T08:48:59+00:00" - }, - { - "name": "symfony/polyfill-php83", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php83\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-07-08T02:45:35+00:00" - }, - { - "name": "symfony/rate-limiter", - "version": "v7.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/rate-limiter.git", - "reference": "7e855541d302ba752f86fb0e97932e7969fe9c04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/7e855541d302ba752f86fb0e97932e7969fe9c04", - "reference": "7e855541d302ba752f86fb0e97932e7969fe9c04", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/options-resolver": "^7.3" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/lock": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\RateLimiter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Wouter de Jong", - "email": "wouter@wouterj.nl" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a Token Bucket implementation to rate limit input and output in your application", - "homepage": "https://symfony.com", - "keywords": [ - "limiter", - "rate-limiter" - ], - "support": { - "source": "https://github.com/symfony/rate-limiter/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-07-07T08:17:57+00:00" - }, - { - "name": "symfony/routing", - "version": "v6.4.26", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "6fc4c445f22857d4b8b40a02b73f423ddab295de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/6fc4c445f22857d4b8b40a02b73f423ddab295de", - "reference": "6fc4c445f22857d4b8b40a02b73f423ddab295de", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12|^2", - "psr/log": "^1|^2|^3", - "symfony/config": "^6.2|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Maps an HTTP request to a set of configuration variables", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.26" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T09:57:09+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-04-25T09:37:31+00:00" - }, - { - "name": "symfony/translation", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "ec25870502d0c7072d086e8ffba1420c85965174" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ec25870502d0c7072d086e8ffba1420c85965174", - "reference": "ec25870502d0c7072d086e8ffba1420c85965174", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.5|^3.0" - }, - "conflict": { - "nikic/php-parser": "<5.0", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", - "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "symfony/translation-implementation": "2.3|3.0" - }, - "require-dev": { - "nikic/php-parser": "^5.0", - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-07T11:39:36+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-27T08:32:26+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v7.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", - "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "require-dev": { - "symfony/property-access": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "lazy-loading", - "proxy", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-09-11T10:12:26+00:00" - }, - { - "name": "symfony/yaml", - "version": "v7.3.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d4f4a66866fe2451f61296924767280ab5732d9d", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-08-27T11:34:33+00:00" - }, - { - "name": "topthink/think-cache", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-cache.git", - "reference": "4f8becaf802e2ebcd0e37df46495fe3999e917ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-cache/zipball/4f8becaf802e2ebcd0e37df46495fe3999e917ca", - "reference": "4f8becaf802e2ebcd0e37df46495fe3999e917ca", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "topthink/think-container": "^3.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/helper.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "Cache Manager", - "support": { - "issues": "https://github.com/top-think/think-cache/issues", - "source": "https://github.com/top-think/think-cache/tree/v3.0.1" - }, - "time": "2025-01-15T05:30:04+00:00" - }, - { - "name": "topthink/think-container", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-container.git", - "reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-container/zipball/b2df244be1e7399ad4c8be1ccc40ed57868f730a", - "reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a", - "shasum": "" - }, - "require": { - "php": ">=8.0", - "psr/container": "^2.0", - "topthink/think-helper": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "files": [], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "PHP Container & Facade Manager", - "support": { - "issues": "https://github.com/top-think/think-container/issues", - "source": "https://github.com/top-think/think-container/tree/v3.0.2" - }, - "time": "2025-04-07T03:21:51+00:00" - }, - { - "name": "topthink/think-helper", - "version": "v3.1.11", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-helper.git", - "reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/1d6ada9b9f3130046bf6922fe1bd159c8d88a33c", - "reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c", - "shasum": "" - }, - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/helper.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP6 Helper Package", - "support": { - "issues": "https://github.com/top-think/think-helper/issues", - "source": "https://github.com/top-think/think-helper/tree/v3.1.11" - }, - "time": "2025-04-07T06:55:59+00:00" - }, - { - "name": "topthink/think-orm", - "version": "v3.0.34", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-orm.git", - "reference": "715e55da149fe32a12d68ef10e5b00e70bd3dbec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/715e55da149fe32a12d68ef10e5b00e70bd3dbec", - "reference": "715e55da149fe32a12d68ef10e5b00e70bd3dbec", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pdo": "*", - "php": ">=8.0.0", - "psr/log": ">=1.0", - "psr/simple-cache": ">=1.0", - "topthink/think-helper": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.6|^10" - }, - "suggest": { - "ext-mongodb": "provide mongodb support" - }, - "type": "library", - "autoload": { - "files": [ - "stubs/load_stubs.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "the PHP Database&ORM Framework", - "keywords": [ - "database", - "orm" - ], - "support": { - "issues": "https://github.com/top-think/think-orm/issues", - "source": "https://github.com/top-think/think-orm/tree/v3.0.34" - }, - "time": "2025-01-14T06:03:33+00:00" - }, - { - "name": "twig/twig", - "version": "v3.21.1", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "shasum": "" - }, - "require": { - "php": ">=8.1.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "phpstan/phpstan": "^2.0", - "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/Resources/core.php", - "src/Resources/debug.php", - "src/Resources/escaper.php", - "src/Resources/string_loader.php" - ], - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.21.1" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2025-05-03T07:21:55+00:00" - } - ], - "packages-dev": [ - { - "name": "myclabs/deep-copy", - "version": "1.13.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2025-08-01T08:46:24+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" - }, - "time": "2025-08-13T20:13:15+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "12.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^5.6.1", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0", - "phpunit/php-text-template": "^5.0", - "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.0.3", - "sebastian/lines-of-code": "^4.0", - "sebastian/version": "^6.0", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.3.7" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "12.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.4.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", - "type": "tidelift" - } - ], - "time": "2025-09-24T13:44:41+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/961bc913d42fe24a257bfff826a5068079ac7782", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:37+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:58+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:59:16+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "8.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:59:38+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "12.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc5413a2e6d240d2f6d9317bdf7f0a24e73de194" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc5413a2e6d240d2f6d9317bdf7f0a24e73de194", - "reference": "fc5413a2e6d240d2f6d9317bdf7f0a24e73de194", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=8.3", - "phpunit/php-code-coverage": "^12.4.0", - "phpunit/php-file-iterator": "^6.0.0", - "phpunit/php-invoker": "^6.0.0", - "phpunit/php-text-template": "^5.0.0", - "phpunit/php-timer": "^8.0.0", - "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.3", - "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.3", - "sebastian/exporter": "^7.0.2", - "sebastian/global-state": "^8.0.2", - "sebastian/object-enumerator": "^7.0.0", - "sebastian/type": "^6.0.3", - "sebastian/version": "^6.0.0", - "staabm/side-effects-detector": "^1.0.5" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "12.4-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.4.1" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2025-10-09T14:08:29+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", - "type": "tidelift" - } - ], - "time": "2025-09-14T09:36:45+00:00" - }, - { - "name": "sebastian/comparator", - "version": "7.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dc904b4bb3ab070865fa4068cd84f3da8b945148", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.2" - }, - "suggest": { - "ext-bcmath": "For comparing BcMath\\Number objects" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", - "type": "tidelift" - } - ], - "time": "2025-08-20T11:27:00+00:00" - }, - { - "name": "sebastian/complexity", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:55:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "7.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:55:46+00:00" - }, - { - "name": "sebastian/environment", - "version": "8.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", - "type": "tidelift" - } - ], - "time": "2025-08-12T14:11:56+00:00" - }, - { - "name": "sebastian/exporter", - "version": "7.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", - "type": "tidelift" - } - ], - "time": "2025-09-24T06:16:11+00:00" - }, - { - "name": "sebastian/global-state", - "version": "8.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", - "type": "tidelift" - } - ], - "time": "2025-08-29T11:29:25+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:57:28+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "7.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:57:48+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:17+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "7.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", - "type": "tidelift" - } - ], - "time": "2025-08-13T04:44:59+00:00" - }, - { - "name": "sebastian/type", - "version": "6.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/type", - "type": "tidelift" - } - ], - "time": "2025-08-09T06:57:12+00:00" - }, - { - "name": "sebastian/version", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T05:00:38+00:00" - }, - { - "name": "staabm/side-effects-detector", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/staabm/side-effects-detector.git", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.6", - "phpunit/phpunit": "^9.6.21", - "symfony/var-dumper": "^5.4.43", - "tomasvotruba/type-coverage": "1.0.0", - "tomasvotruba/unused-public": "1.0.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A static analysis tool to detect side effects in PHP code", - "keywords": [ - "static analysis" - ], - "support": { - "issues": "https://github.com/staabm/side-effects-detector/issues", - "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" - }, - "funding": [ - { - "url": "https://github.com/staabm", - "type": "github" - } - ], - "time": "2024-10-20T05:08:20+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2024-09-22T06:17:47+00:00" } ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": {}, - "prefer-stable": true, + "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^8.1" + "php": "^8.0" }, "platform-dev": {}, "plugin-api-version": "2.6.0" diff --git a/config/app.php b/config/app.php deleted file mode 100644 index d4075f44..00000000 --- a/config/app.php +++ /dev/null @@ -1,6 +0,0 @@ - 'MyApp', - 'debug' => true, - 'time_zone' =>"Asia/Shanghai", -]; \ No newline at end of file diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 48e74db0..00000000 --- a/config/cache.php +++ /dev/null @@ -1,57 +0,0 @@ - env('CACHE_DRIVER', 'file'), - - 'stores' => [ - 'file' => [ - 'driver' => 'file', - 'type' => 'File', //兼容thinkcache - 'path' => dirname(__DIR__) . '/storage/cache', - 'prefix' => 'cache_', // ← 新增:key 前缀 - 'enable_tags' => true, // ← 新增:是否启用标签 - ], - - 'redis' => [ - 'driver' => 'redis', - 'type' => 'Redis', - 'connection' => [ - 'scheme' => 'tcp', - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'port' => env('REDIS_PORT', 6379), - 'password' => env('REDIS_PASSWORD', null), - ], - 'database' => 0, - 'prefix' => 'redis_', // Redis 缓存前缀 - 'enable_tags' => true, - ], - - - - 'memcached' => [ - 'driver' => 'memcached', - 'type' => 'memcached', - 'servers' => [ - ['host' => env('MEMCACHED_HOST', '127.0.0.1'), 'port' => env('MEMCACHED_PORT', 11211)], - ], - 'prefix' => 'mem_', - 'enable_tags' => true, - ], - - - 'apcu' => [ - 'driver' => 'apcu', - 'prefix' => 'apcu_', - 'enable_tags' => false, // APCu 不适合大量标签(可选) - ], - - 'array' => [ - 'driver' => 'array', - 'prefix' => 'array_', - 'enable_tags' => true, - ], - ], -]; - - diff --git a/config/database.php b/config/database.php index 1b9ac73f..43515379 100644 --- a/config/database.php +++ b/config/database.php @@ -1,54 +1,16 @@ 'mysql', - // 自定义时间查询规则 - 'time_query_rule' => [], - // 自动写入时间戳字段 - // true为自动识别类型 false关闭 - // 字符串则明确指定时间字段类型 支持 int timestamp datetime date - 'auto_timestamp' => true, - // 时间字段取出后的默认时间格式 - 'datetime_format' => 'Y-m-d H:i:s', - // 数据库连接配置信息 - 'connections' => [ + 'default' => 'mysql', + 'connections' => [ 'mysql' => [ - // 数据库类型 - 'type' => 'mysql', - // 服务器地址 - 'hostname' => '127.0.0.1', - // 数据库名 - 'database' => 'oa', - // 用户名 - 'username' => 'root', - // 密码 - 'password' => '123456', - // 端口 - 'hostport' => '3306', - // 数据库表前缀 - 'prefix' => 'oa_', - // 数据库连接参数 - 'params' => [], - // 数据库编码默认采用utf8mb4 - 'charset' => 'utf8mb4', - // 数据库调试模式 - 'debug' => false, - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) - 'deploy' => 0, - // 数据库读写是否分离 主从式有效 - 'rw_separate' => false, - // 读写分离后 主服务器数量 - 'master_num' => 1, - // 指定从服务器序号 - 'slave_no' => '', - // 是否严格检查字段是否存在 - 'fields_strict' => true, - // 是否需要断线重连 - 'break_reconnect' => false, - // 监听SQL - 'trigger_sql' => true, - // 开启字段缓存 - 'fields_cache' => false, - ], - ], + 'type' => 'mysql', + 'hostname' => '127.0.0.1', + 'database' => 'testdb', + 'username' => 'root', + 'password' => '', + 'hostport' => '3306', + 'charset' => 'utf8mb4', + ] + ] ]; \ No newline at end of file diff --git a/config/iplist.php b/config/iplist.php deleted file mode 100644 index be05d8f8..00000000 --- a/config/iplist.php +++ /dev/null @@ -1,25 +0,0 @@ - true, - - // 白名单:只有这些 IP 或网段可以访问(留空则不限制) - 'whitelist' => [ - '127.0.0.1', - '::1', - '192.168.0.0/24', - '10.0.0.0/8', - '16.0.0.0/16', - '2001:db8::/32', - ], - - // 黑名单:这些 IP 或网段禁止访问(优先级高于白名单) - 'blacklist' => [ - '127.0.0.3', - '::12', - '1.2.3.4', - '203.0.113.0/24', - '2001:db8:bad::/48', - ], -]; \ No newline at end of file diff --git a/config/log.php b/config/log.php index bdb90834..884aff9c 100644 --- a/config/log.php +++ b/config/log.php @@ -1,9 +1,11 @@ 'app', - 'log_path' => __DIR__ . '/../storage/logs', - 'max_files' => 5, - 'max_size' => 2000000, //2MB + 'default' => 'single', + 'channels' => [ + 'single' => [ + 'driver' => 'single', + 'path' => BASE_PATH . '/storage/logs/app.log' + ] + ] ]; \ No newline at end of file diff --git a/config/middleware.php b/config/middleware.php deleted file mode 100644 index 7fe9735c..00000000 --- a/config/middleware.php +++ /dev/null @@ -1,44 +0,0 @@ - [ - 'enabled' => true, - 'token_name' => '_token', - 'except' => [ - '/api/*', - '/webhook/*', - '/payment/notify' - ], - 'error_message' => '请求无效,请刷新页面后重试。', - 'remove_after_validation' => true, // 用完即焚 - ], - - 'referer_check' => [ - 'enabled' => true, - 'allowed_hosts' => [ - 'localhost', - '127.0.0.1', - 'yourdomain.com', - 'sub.yourdomain.com' - ], - 'allowed_schemes' => ['http', 'https'], - 'except' => [ - '/api/*', - '/payment/*' - ], - 'strict' => false, // false = 允许空 Referer(如隐私模式) - 'error_message' => '请求来源不被允许。', - ], - - // 可扩展其他中间件 - // 'rate_limit' => [...] -]; \ No newline at end of file diff --git a/config/redis.php b/config/redis.php deleted file mode 100644 index 86cbeb3d..00000000 --- a/config/redis.php +++ /dev/null @@ -1,9 +0,0 @@ - $_ENV['REDIS_HOST'] ?? '127.0.0.1', - 'port' => (int) ($_ENV['REDIS_PORT'] ?? 6379), - 'database' => (int) ($_ENV['REDIS_DB'] ?? 0), - 'password' => $_ENV['REDIS_PASSWORD'] ?? null, - 'timeout' => 2.5, -]; \ No newline at end of file diff --git a/config/route.php b/config/route.php new file mode 100644 index 00000000..6ae333c7 --- /dev/null +++ b/config/route.php @@ -0,0 +1,11 @@ + [ + '/' => 'HomeController@index', + '/home/show/{id:\d+}' => 'HomeController@show' + ], + 'POST' => [ + '/submit' => 'HomeController@submit' + ] +]; \ No newline at end of file diff --git a/config/routes.php b/config/routes.php deleted file mode 100644 index b1dadc25..00000000 --- a/config/routes.php +++ /dev/null @@ -1,62 +0,0 @@ -add('admin_home', new Route( - '/index', // 路由路径(注意:若已开启.html后缀处理,这里无需加.html) - [ - '_controller' => 'App\Controllers\HomeController::index' // 标准格式:类名::方法名 - ], - [], // 路由参数约束(可选) - [], // 路由选项(可选) - '', // 主机名(可选) - [], // schemes(http/https,可选) - ['GET'] // 允许的请求方法(可选,建议明确指定) -)); - -// 示例:带参数的手动路由(如 /api/user/123) -$routes->add('api_user', new Route( - '/apis/user/{id}', // 带参数的路径 - [ - '_controller' => 'App\Controllers\Api\UserController::show', - 'id' => 1 // 参数默认值(可选) - ], - [ - 'id' => '\d+' // 参数约束:id必须是数字(可选,增强路由安全性) - ], - [], - '', - [], - ['GET'] -)); - - - -$routes->add('admin.dashboard', new Route( - '/admin/dashboard', - ['_controller' => 'App\Controllers\Admin\DashboardController::index'], - [], - ['_middleware' => ['App\Middleware\AdminAuthMiddleware']] -)); - - - -//测试熔断器 -$routes->add('test_circuit', new Route('/test/circuit', [ - '_controller' => 'App\Controllers\TestController::circuitAction' -])); - -$routes->add('test_healthy', new Route('/test/healthy', [ - '_controller' => 'App\Controllers\TestController::healthyAction' -])); - - - - -return $routes; \ No newline at end of file diff --git a/config/services.php b/config/services.php deleted file mode 100644 index 42518ba9..00000000 --- a/config/services.php +++ /dev/null @@ -1,366 +0,0 @@ -services(); - - // 默认配置 - $services - ->defaults() - ->autowire() // 所有服务默认自动装配 - ->autoconfigure() // 所有服务默认自动配置 - ; - - // 示例服务 - $services->set('db.connection', \PDO::class) - ->args([ - 'mysql:host=localhost;dbname=test;charset=utf8mb4', - 'root', - 'root', - [\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION] - ])->public(); - - - // ✅ 1. 手动注册 PDO 服务 - /* - $services->set('pdo', \PDO::class) - ->factory([static function () { - $dsn = 'mysql:host=127.0.0.1;dbname=novaphp;charset=utf8mb4'; - $user = 'root'; - $password = ''; - $options = [ - \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, - \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC, - ]; - return new \PDO($dsn, $user, $password, $options); - }, '__invoke']); - */ - // 示例:注册一个服务 如果你有 test.service 且要手动 get() 必须加public这一行 - $services->set('test', \stdClass::class)->public(); - - - //注册session - /* - $sessionOptions = require __DIR__ . '/session.php'; - $services->set('session.storage', NativeSessionStorage::class) - ->args([$sessionOptions]) - ->public(); - - $services->set('session', Session::class) - ->args([new Reference('session.storage')]) - ->public(); - */ - // 加载session redis配置 - $redisConfig = require __DIR__ . '/redis.php'; - $sessionConfig = require __DIR__ . '/session.php'; - - $storageType = $sessionConfig['storage_type']; - $sessionOptions = $sessionConfig['options']; - - // === 1. 注册 Redis 客户端(仅当需要时)=== - $services->set('redis.client', \Redis::class) - ->factory([RedisFactory::class, 'createRedisClient']) - ->args([$redisConfig]) - ->public(); - - // === 2. 注册 Session Storage(动态选择 file/redis)=== - if ($storageType === 'redis') { - // 使用 Redis 作为 handler - $services->set('session.handler', RedisSessionHandler::class) - ->args([new Reference('redis.client')]); - - $services->set('session.storage', NativeSessionStorage::class) - ->args([$sessionOptions, new Reference('session.handler')]) - ->public(); - } else { - // 默认:使用原生文件存储(PHP 默认) - $services->set('session.storage', NativeSessionStorage::class) - ->args([$sessionOptions]) - ->public(); - } - - // === 3. 注册 Session 服务 === - $services->set('session', Session::class) - ->args([new Reference('session.storage')]) - ->public(); - - - - - // 注册 ConfigLoader 为服务 - $services->set('config' , \Framework\Config\ConfigLoader::class) //$globalConfig = $this->container->get('config')->loadAll(); - ->args(['%kernel.project_dir%/config']) - ->public(); // 如果你需要 $container->get(ConfigLoader::class) //print_r($this->container->get(ConfigLoader::class)->loadAll()); - - // 🔹 1. 注册 ConfigLoader 业务类 - $services->set(\Framework\Config\ConfigLoader::class) - ->args(['%kernel.project_dir%/config']) - ->public(); - - - // 🔹 2. 注册 ConfigService 服务类 - $services->set(\Framework\Config\ConfigService::class) - ->public(); // 自动注入 ConfigLoader(autowire 默认开启) - - // 🔹 3. 注册 LoggerService 服务类 - $services->set(\Framework\Log\LoggerService::class) - ->autowire() // 自动注入 ConfigService - ->public(); // 允许直接 $container->get() - - - // 🔹 4. 注册 Logger 业务类 - $services->set(\Framework\Log\Logger::class) - ->args([ - 'app', // channel 名称 - '%kernel.project_dir%/storage/logs/app.log' // 日志文件路径(可被 ConfigService 替代) - ]) - ->public(); // 允许直接 $container->get() - - // 🔹 5. 别名注册 - $services->set('log', \Framework\Log\LoggerService::class) - ->autowire() //不带args参数 - ->public(); - - // 注册异常处理类 - $services->set('exception', \Framework\Core\Exception\Handler::class) - ->autowire() - ->public(); - - - // 定义缓存管理器服务(单例) - $cacheConfig = require __DIR__ . '/cache.php'; - - //thinkCache 注册服务 - $services->set('cache', \Framework\Cache\CacheService::class) - ->args([$cacheConfig]) - ->public(); - - // symfony/cache 注册服务 - $services->set(\Framework\Cache\CacheFactory::class) - ->args([$cacheConfig])->public(); - - // 只注册 TagAwareAdapter - $services->set(\Symfony\Component\Cache\Adapter\TagAwareAdapter::class) - ->factory([service(\Framework\Cache\CacheFactory::class), 'create'])->public(); - - - - // 注册 RequestStack(用于在工厂中获取当前请求) - $services->set(RequestStack::class); - - - // i18n 多国语言翻译 - // 注册 Translator 服务(不设 locale,延迟设置) - $services->set('translator1', \Framework\Translation\TranslationService::class) - ->args([ - service(RequestStack::class), // 或 RequestStack::class - '%kernel.project_dir%/resource/translations' - ]) - ->public(); - - // 注册翻译助手,传入依赖 - $services->set('translator', \Framework\Translation\TransHelper::class) - ->args([ - service(RequestStack::class), - '%kernel.project_dir%/resource/translations', - ])->public(); - - - /* - $services->set('config', \Framework\Config\ConfigService::class) - ->autowire() - ->public(); - */ - - /*使用 - Container::init(); // 加载服务配置 - $this->container = Container::getInstance(); - //$config = $this->container->get(\Framework\Config\ConfigService::class); - //$dbHost = $config->get('database.host'); - //print_r($config->all()); - */ - - - - - //Override - $services->set(\Framework\Middleware\MiddlewareMethodOverride::class) - ->autowire() - ->autoconfigure() - ->public(); - - //Cors - $services->set(\Framework\Middleware\MiddlewareCors::class) - ->autowire() - ->autoconfigure()->public(); - - //限流器 - $services->set(\Framework\Middleware\MiddlewareRateLimit::class) - ->args(['%kernel.project_dir%/storage/cache/']) - ->autoconfigure() - ->public(); - - //熔断器 - $services->set(\Framework\Middleware\MiddlewareCircuitBreaker::class) - ->args(['%kernel.project_dir%/storage/cache/']) - ->autoconfigure() - ->public(); - - - //IP Block - $services->set(\Framework\Middleware\MiddlewareIpBlock::class) - ->args(['%kernel.project_dir%/config/iplist.php']) - ->public(); - - //XSS过滤 - $services->set(\Framework\Middleware\MiddlewareXssFilter::class) - ->args([ - '$enabled' => true, - '$allowedHtml' => [], //['b', 'i', 'u', 'a', 'p', 'br', 'strong', 'em'], 按需调整 - ]) - ->autowire() - ->public(); - - - - // 👇 加载中间件配置 - $middlewareConfig = require __DIR__ . '/../config/middleware.php'; - - // ----------------------------- - // 动态注册:CSRF 保护中间件 use Framework\Security\CsrfTokenManager; - // ----------------------------- - if ($middlewareConfig['csrf_protection']['enabled']) { - // Session 必须已注册(确保你的框架已启动 session) - $services->set(\Framework\Security\CsrfTokenManager::class) - ->args([ - new Reference('session'), // 假设你已注册 'session' 服务 - 'csrf_token' - ])->public(); - $services->set(\Framework\Middleware\MiddlewareCsrfProtection::class) - ->args([ - new Reference(\Framework\Security\CsrfTokenManager::class), - $middlewareConfig['csrf_protection']['token_name'], - $middlewareConfig['csrf_protection']['except'], - $middlewareConfig['csrf_protection']['error_message'], - $middlewareConfig['csrf_protection']['remove_after_validation'], - ]) - ->public(); // 如果要在 Kernel 中使用,需 public - } - - // ----------------------------- - // 动态注册:Referer 检查中间件 - // ----------------------------- - if ($middlewareConfig['referer_check']['enabled']) { - $services->set(\Framework\Middleware\MiddlewareRefererCheck::class) - ->args([ - $middlewareConfig['referer_check']['allowed_hosts'], - $middlewareConfig['referer_check']['allowed_schemes'], - $middlewareConfig['referer_check']['except'], - $middlewareConfig['referer_check']['strict'], - $middlewareConfig['referer_check']['error_message'], - ]) - ->public(); - } - - - // ------------------------------ - // 配置加载A - // ------------------------------ - $viewConfig = require dirname(__DIR__) . '/config/view.php'; - $services->set(\App\Twig\AppTwigExtension::class) - ->args([ - service(\Framework\Security\CsrfTokenManager::class), - '_token' // 👈 显式传入字段名 - ]) - ->public(); - - $services->set(\Twig\Loader\FilesystemLoader::class)->args([$viewConfig['paths']])->public(); - - $services->set(\Twig\Environment::class) - ->args([ - service(\Twig\Loader\FilesystemLoader::class), - [ - 'cache' => $viewConfig['cache_path'], // ✅ 字符串 或 false - 'debug' => $viewConfig['debug'], - 'auto_reload' => $viewConfig['debug'], - 'strict_variables' => $viewConfig['strict_variables'], - ], - ]) - ->call('addExtension', [service(\App\Twig\AppTwigExtension::class) ]) - ->public(); - - // 别名 - $services->alias('view', \Twig\Environment::class)->public(); - - - //视图错误类服务 - /* - $services->set(\Framework\Core\Exception\ErrorHandler::class) - ->args([ - service(\Twig\Environment::class), - '%kernel.debug%' - ])->public(); - */ - - - $services->load('App\\Middleware\\', '../app/Middleware/**/*Middleware.php') - ->autowire() // 支持中间件的依赖自动注入(如注入UserService) - ->autoconfigure() // 支持中间件添加标签(如后续需要事件监听) - ->public(); // 关键:标记为公开,因为中间件需要通过容器动态获取(如从注解解析后) - - - #$services->load('App\\', '../app/*/*')->exclude('../app/{Entity,Tests}/*') ->autowire()->autoconfigure(); - - - // ✅ 自动注册所有 Services(包括 UserService) - $services->load('App\\Services\\', '../app/Services/*Service.php') - ->autowire() - ->autoconfigure()->public(); // 如果你后续要直接 get() 它,才需要 public;否则可省略 - - - // ✅ 自动加载控制器(关键:使用相对路径) - // 3. 控制器(必须 public!) - $services->load('App\\Controllers\\', '../app/Controllers/**/*Controller.php') - ->autowire() - ->autoconfigure()->public(); -}; - - -//redis=================== -/** - * 工厂方法:创建 Redis 客户端 - */ -class RedisFactory { - public static function createRedisClient(array $config): \Redis { - $redis = new \Redis(); - $connected = $redis->connect($config['host'], $config['port'], $config['timeout']); - if (!$connected) { - throw new RuntimeException('Failed to connect to Redis'); - } - if (!empty($config['password'])) { - $redis->auth($config['password']); - } - if (isset($config['database'])) { - $redis->select($config['database']); - } - return $redis; - } -} \ No newline at end of file diff --git a/config/session.php b/config/session.php deleted file mode 100644 index b8e047f7..00000000 --- a/config/session.php +++ /dev/null @@ -1,16 +0,0 @@ - $_ENV['SESSION_STORAGE'] ?? 'redis', // 'file' 或 'redis' - - 'options' => [ - 'cookie_secure' => true, - 'cookie_httponly' => true, - 'cookie_samesite' => 'lax', - 'use_cookies' => true, - 'gc_maxlifetime' => 1440, // 24分钟 - 'gc_probability' => 1, - 'gc_divisor' => 100, - ], -]; \ No newline at end of file diff --git a/config/site.php b/config/site.php deleted file mode 100644 index b9938715..00000000 --- a/config/site.php +++ /dev/null @@ -1,3 +0,0 @@ - 'twig', - 'paths' => [ - dirname(__DIR__) . '/resource/view', - dirname(__DIR__) . '/resource/acme/blog', // 第三方模块模板 - // 可添加更多 - ], - 'cache_path' => dirname(__DIR__) . '/storage/view', //false 不缓存 - 'debug' => $_ENV['APP_DEBUG'] ?? true, - 'auto_reload' => true, - 'strict_variables' => false, //$_ENV['APP_DEBUG'] ?? true, //严格变量检查,慎用 - // 不在这里设 cache,我们用下面的方式传 - -]; diff --git a/dir.txt b/dir.txt new file mode 100644 index 00000000..07bdc411 --- /dev/null +++ b/dir.txt @@ -0,0 +1,52 @@ +project-root/ +│ +├── App/ # 应用代码 +│ ├── Controller/ # 控制器 +│ │ └── HomeController.php +│ ├── Model/ # ThinkORM 模型 +│ │ └── User.php +│ └── View/ # 视图模板(可选) +│ └── home/index.html +│ +├── config/ # 配置文件 +│ ├── app.php +│ ├── database.php +│ ├── cache.php +│ ├── log.php +│ └── route.php +│ +├── framework/ # 框架核心 +│ ├── Core/ # 核心类 +│ │ ├── Application.php +│ │ ├── Container.php # 服务容器(IoC) +│ │ └── Factory.php # 工厂模式基类 +│ │ +│ ├── Http/ # HTTP 抽象 +│ │ ├── Request.php +│ │ └── Response.php +│ │ +│ ├── Database/ # 数据库相关 +│ │ └── DB.php # ThinkORM 封装 +│ │ +│ ├── Routing/ # 路由处理 +│ │ ├── Router.php # 路由封装类 +│ │ └── RouteDispatcher.php +│ │ +│ ├── Log/ # 日志系统 +│ │ └── Logger.php # 日志工厂 +│ │ +│ └── Exception/ # 异常处理 +│ └── Handler.php +│ +├── public/ # Web 入口 & 静态资源 +│ └── index.php # 唯一入口 +│ +├── storage/ # 运行时数据 +│ ├── logs/ # 日志 +│ ├── cache/ # 缓存 +│ └── uploads/ # 上传文件 +│ +├── vendor/ # Composer 依赖(自动生成) +│ +├── composer.json +└── .htaccess # Apache 重写规则(可选) \ No newline at end of file diff --git a/framework/Annotations/Delete.php b/framework/Annotations/Delete.php deleted file mode 100644 index 6890e8e7..00000000 --- a/framework/Annotations/Delete.php +++ /dev/null @@ -1,34 +0,0 @@ -methods = ['DELETE']; - - // 处理注解参数 - foreach ($values as $key => $value) { - if (property_exists($this, $key)) { - $this->$key = $value; - } - } - } -} diff --git a/framework/Annotations/Get.php b/framework/Annotations/Get.php deleted file mode 100644 index e4e5cd3c..00000000 --- a/framework/Annotations/Get.php +++ /dev/null @@ -1,37 +0,0 @@ -methods = ['GET']; - - // 处理注解参数 - foreach ($values as $key => $value) { - if (property_exists($this, $key)) { - $this->$key = $value; - } - } - } -} diff --git a/framework/Annotations/Middleware.php b/framework/Annotations/Middleware.php deleted file mode 100644 index f8c3f5fe..00000000 --- a/framework/Annotations/Middleware.php +++ /dev/null @@ -1,30 +0,0 @@ -class = $values['value']; - } elseif (isset($values['class'])) { - $this->class = $values['class']; - } - } -} diff --git a/framework/Annotations/Post.php b/framework/Annotations/Post.php deleted file mode 100644 index e13ec9da..00000000 --- a/framework/Annotations/Post.php +++ /dev/null @@ -1,34 +0,0 @@ -methods = ['POST']; - - // 处理注解参数 - foreach ($values as $key => $value) { - if (property_exists($this, $key)) { - $this->$key = $value; - } - } - } -} diff --git a/framework/Annotations/Put.php b/framework/Annotations/Put.php deleted file mode 100644 index 8ab19c63..00000000 --- a/framework/Annotations/Put.php +++ /dev/null @@ -1,34 +0,0 @@ -methods = ['PUT']; - - // 处理注解参数 - foreach ($values as $key => $value) { - if (property_exists($this, $key)) { - $this->$key = $value; - } - } - } -} diff --git a/framework/Annotations/Route.php b/framework/Annotations/Route.php deleted file mode 100644 index 955e1eb1..00000000 --- a/framework/Annotations/Route.php +++ /dev/null @@ -1,59 +0,0 @@ -path = $values['path'] ?? ''; - $this->name = $values['name'] ?? ''; - $this->methods = $values['methods'] ?? []; - $this->defaults = $values['defaults'] ?? []; - $this->requirements = $values['requirements'] ?? []; - $this->options = $values['options'] ?? []; // 初始化options - } - -} diff --git a/framework/Cache/CacheFactory.php b/framework/Cache/CacheFactory.php deleted file mode 100644 index 7bf69217..00000000 --- a/framework/Cache/CacheFactory.php +++ /dev/null @@ -1,89 +0,0 @@ -config = $config; - } - - public function create(): TagAwareAdapter - { - $store = $this->config['default']; - return $this->createStore($store); - } - - private function createStore(string $name): TagAwareAdapter - { - $config = $this->config['stores'][$name] ?? throw new \InvalidArgumentException("Cache store [$name] not found."); - - $driver = $config['driver']; - $prefix = $config['prefix'] ?? ''; - // 注意:即使 enable_tags=false,我们也返回 TagAwareAdapter(它仍可工作) - // 但你可以选择只在需要时包装,这里为简化统一包装 - - $innerAdapter = match ($driver) { - 'file' => new FilesystemAdapter($prefix, 0, $config['path']), - 'redis' => $this->createRedisAdapter($prefix, $config), - 'apcu' => new ApcuAdapter($prefix, 0), - 'array' => new ArrayAdapter(), - 'memcached' => $this->createMemcachedAdapter($prefix, $config), - default => throw new \InvalidArgumentException("Unsupported driver: $driver"), - }; - - return new TagAwareAdapter($innerAdapter); - } - - private function createRedisAdapter(string $prefix, array $config): AdapterInterface - { - $conn = $config['connection']; - $host = $conn['host']; - $port = $conn['port']; - $password = $conn['password'] ?? null; - $database = $config['database'] ?? 0; - - // 构造标准 Redis DSN: redis://[password@]host:port - if ($password) { - $dsn = sprintf('redis://:%s@%s:%d/%d', urlencode($password), $host, $port, $database); - } else { - $dsn = sprintf('redis://%s:%d/%d', $host, $port, $database); - } - - // 直接交给 Symfony 创建连接 - $redisConnection = RedisAdapter::createConnection($dsn); - - return new RedisAdapter($redisConnection, $prefix); - } - - // === Memcached === - private function createMemcachedAdapter(string $prefix, array $config): AdapterInterface - { - if (!extension_loaded('memcached')) { - throw new \RuntimeException('Memcached extension is required for "memcached" driver.'); - } - - $client = new \Memcached(); - $servers = array_map(fn($s) => [$s['host'], $s['port']], $config['servers']); - $client->addServers($servers); - - return new MemcachedAdapter($client, $prefix); - } - - -} \ No newline at end of file diff --git a/framework/Cache/CacheInterface.php b/framework/Cache/CacheInterface.php deleted file mode 100644 index 53e76d34..00000000 --- a/framework/Cache/CacheInterface.php +++ /dev/null @@ -1,17 +0,0 @@ -set('key', 'hello world!', 3600); -echo $cache->get('key'); - -*/ - -class CacheService -{ - protected array $config; - protected array $instances = []; - protected string $default; - - public function __construct(array $config) - { - $this->config = $config; - $this->default = $config['default'] ?? 'file'; - } - - /** - * 获取指定名称的缓存实例 - */ - public function store(string $name = null): CacheInterface - { - $name = $name ?? $this->default; - - if (!isset($this->instances[$name])) { - $this->instances[$name] = $this->resolve($name); - } - - return $this->instances[$name]; - } - - /** - * 解析并创建缓存驱动 - */ - protected function resolve(string $name): CacheInterface - { - if (!isset($this->config['stores'][$name])) { - throw new \InvalidArgumentException("Cache store [{$name}] is not defined."); - } - - $config = $this->config['stores'][$name]; - - // ✅ 使用 think\Cache::connect() 替代 Store::connect() - $driver = Cache::connect($config); - - // 包装为接口实现 - return new class ($driver) implements CacheInterface { - public function __construct(protected Driver $driver) - { - } - - public function get($key, $default = null) - { - return $this->driver->get($key, $default); - } - - public function set($key, $value, $ttl = null) - { - return $this->driver->set($key, $value, $ttl); - } - - public function delete($key) - { - return $this->driver->delete($key); - } - - public function has($key) - { - return $this->driver->has($key); - } - - public function clear() - { - return $this->driver->clear(); - } - - public function tag(string|array $name): TaggedCacheInterface - { - $tagSet = $this->driver->tag($name); // 返回 think\cache\TagSet - return new \Framework\Cache\TaggedCacheProxy($tagSet); - } - }; - } - - /** - * 快捷方法:直接调用默认缓存 - */ - public function __call($method, $args) - { - return $this->store()->$method(...$args); - } -} diff --git a/framework/Cache/TaggedCacheInterface.php b/framework/Cache/TaggedCacheInterface.php deleted file mode 100644 index 56ae4814..00000000 --- a/framework/Cache/TaggedCacheInterface.php +++ /dev/null @@ -1,14 +0,0 @@ -tagSet->get($key, $default); - } - - public function set($key, $value, $ttl = null) - { - return $this->tagSet->set($key, $value, $ttl); - } - - public function delete($key) - { - // ThinkPHP 的 TagSet 使用 rm() 删除 - return $this->tagSet->rm($key); - } - - public function clear() - { - // 清除该标签下所有缓存 - return $this->tagSet->clear(); - } -} diff --git a/framework/Config/ConfigLoader.php b/framework/Config/ConfigLoader.php deleted file mode 100644 index 62c50f9a..00000000 --- a/framework/Config/ConfigLoader.php +++ /dev/null @@ -1,65 +0,0 @@ -configDir = rtrim($this->configDir, '/\\') . DIRECTORY_SEPARATOR; - } - - /** - * 加载所有配置文件(带缓存) - */ - public function loadAll(): array - { - if ($this->cachedConfig !== null) { - return $this->cachedConfig; - } - - $config = []; - $files = glob($this->configDir . '*.php'); - - foreach ($files as $file) { - $key = basename($file, '.php'); - $config[$key] = require $file; - } - - return $this->cachedConfig = $config; - } - - /** - * 获取某个配置项(支持点语法:database.host) - */ - public function get(string $key, mixed $default = null): mixed - { - $config = $this->loadAll(); - $keys = explode('.', $key); - $value = $config; - - foreach ($keys as $k) { - if (is_array($value) && array_key_exists($k, $value)) { - $value = $value[$k]; - } else { - return $default; - } - } - - return $value; - } - - /** - * 手动清除缓存(用于开发环境热重载) - */ - public function clearCache(): void - { - $this->cachedConfig = null; - } -} diff --git a/framework/Config/ConfigService.php b/framework/Config/ConfigService.php deleted file mode 100644 index b3ce662f..00000000 --- a/framework/Config/ConfigService.php +++ /dev/null @@ -1,43 +0,0 @@ -loader->loadAll(); - $keys = explode('.', $key); - $value = $config; - - foreach ($keys as $k) { - if (is_array($value) && array_key_exists($k, $value)) { - $value = $value[$k]; - } else { - return $default; - } - } - - return $value; - } - - /** - * 获取全部配置(谨慎使用) - */ - public function all(): array - { - return $this->loader->loadAll(); - } -} diff --git a/framework/Container/Container.php b/framework/Container/Container.php deleted file mode 100644 index 1fe4ac5e..00000000 --- a/framework/Container/Container.php +++ /dev/null @@ -1,137 +0,0 @@ -load(__DIR__.'/../../.env'); // 路径根据你的项目结构调整 - - $projectRoot = dirname(__DIR__, 2); - $configDir = $projectRoot . '/config'; - - if (!is_dir($configDir)) { - throw new \RuntimeException("配置目录不存在: {$configDir}"); - } - - $servicesFile = $configDir . '/services.php'; - if (!file_exists($servicesFile)) { - throw new \RuntimeException("服务配置文件不存在: {$servicesFile}"); - } - - $container = new ContainerBuilder(); - $container->setParameter('kernel.project_dir', $projectRoot); - $container->setParameter('kernel.debug', APP_DEBUG); - - // 注入全局配置作为参数 - if (!empty($parameters)) { - $container->setParameter('config', $parameters); - } - - $loader = new PhpFileLoader($container, new FileLocator($configDir)); - $loader->load('services.php'); - - // ⚠️ 如果你希望支持运行时 set(),就不要 compile() - // 或者提供一个“开发模式”开关 - $container->compile(true); // 编译后 set() 将失效! - - //var_dump(($container->getServiceIds())); - - self::$container = $container; - } - - public static function getInstance(): self - { - self::init(); - return new self(); - } - - // ========== 代理所有 Symfony ContainerInterface 方法 ========== - - public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object - { - return self::$container->get($id, $invalidBehavior); - } - - public function has(string $id): bool - { - return self::$container->has($id); - } - - public function set(string $id, mixed $service): void - { - // ⚠️ 注意:编译后的容器会抛出异常! - self::$container->set($id, $service); - } - - public function initialized(string $id): bool - { - return self::$container->initialized($id); - } - - public function getServiceIds(): array - { - return self::$container->getServiceIds(); - } - - public function setParameter(string $name, UnitEnum|array|string|int|float|bool|null $value): void - { - self::$container->setParameter($name, $value); - } - - public function hasParameter(string $name): bool - { - return self::$container->hasParameter($name); - } - - public function getParameter(string $name): UnitEnum|array|string|int|float|bool|null - { - return self::$container->getParameter($name); - } - - public function getParameterBag() - { - return self::$container->getParameterBag(); - } - - public function compile(bool $resolveEnvPlaceholders = false): void - { - self::$container->compile($resolveEnvPlaceholders); - } - - public function isCompiled(): bool - { - return self::$container->isCompiled(); - } - - public function getCompilerPassConfig() - { - return self::$container->getCompilerPassConfig(); - } - - public function addCompilerPass($pass, string $type = 'beforeOptimization', int $priority = 0): static - { - self::$container->addCompilerPass($pass, $type, $priority); - return $this; - } -} diff --git a/framework/Core/AnnotationRouteLoader.php b/framework/Core/AnnotationRouteLoader.php deleted file mode 100644 index 21aa9aa0..00000000 --- a/framework/Core/AnnotationRouteLoader.php +++ /dev/null @@ -1,288 +0,0 @@ -controllerDir = $controllerDir; - $this->controllerNamespace = $controllerNamespace; - - // 初始化注解阅读器 - $this->initAnnotationReader(); - } - - /** - * 初始化注解阅读器 - */ - private function initAnnotationReader() - { - // 注册注解自动加载(Doctrine Annotations 2.0+ 需手动注册) - //AnnotationRegistry::registerLoader('class_exists'); - - // 创建注解阅读器实例 - $this->annotationReader = new AnnotationReader(); - } - - /** - * 路由加载方法(对外兼容接口,实际调用 loadRoutes()) - * @return RouteCollection - */ - public function load(): RouteCollection - { - // 直接调用已实现的 loadRoutes() 方法 - return $this->loadRoutes(); - } - - /** - * 加载所有注解路由 - * @return RouteCollection - */ - public function loadRoutes(): RouteCollection - { - $routes = new RouteCollection(); - - // 1. 查找所有控制器文件 - $finder = new Finder(); - $finder->files() - ->in($this->controllerDir) - ->name('*Controller.php') - ->depth('<= 5'); // 限制目录深度,避免性能问题 - - // 2. 遍历控制器文件,解析注解 - foreach ($finder as $file) { - // 计算类名(基于文件路径) - $className = $this->getClassNameFromFile($file); - - if (!class_exists($className)) { - continue; - } - - // 解析控制器级别的路由注解(用于前缀) - $classAnnotation = $this->annotationReader->getClassAnnotation( - new \ReflectionClass($className), - Route::class - ); - - // 解析方法级别的路由注解 - $this->parseMethodAnnotations($className, $classAnnotation, $routes); - } - - return $routes; - } - - /** - * 从文件路径计算完整类名 - */ - private function getClassNameFromFile(\SplFileInfo $file): string - { - // 计算相对路径(相对于控制器根目录) - $relativePath = $file->getRelativePathname(); - - // 将路径转换为命名空间格式(例:Admin/UserController.php → Admin\UserController) - $className = str_replace( - [DIRECTORY_SEPARATOR, '.php'], - ['\\', ''], - $relativePath - ); - - // 拼接完整命名空间 - return $this->controllerNamespace . '\\' . $className; - } - - /** - * 解析方法级别的路由注解 - */ - private function parseMethodAnnotations( - string $className, - ?Route $classAnnotation, - RouteCollection $routes - ) { - $reflectionClass = new \ReflectionClass($className); - - // 遍历所有公共方法 - foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { - // 跳过魔术方法 - if (in_array($method->getName(), ['__construct', '__destruct', '__call'])) { - continue; - } - - // 获取方法上的所有路由注解(Route/Get/Post/Put/Delete) - $methodAnnotations = $this->getMethodRouteAnnotations($method); - - if (empty($methodAnnotations)) { - continue; - } - - // 处理每个路由注解 - foreach ($methodAnnotations as $annotation) { - $this->processRouteAnnotation( - $className, - $method->getName(), - $classAnnotation, - $annotation, - $routes - ); - } - } - } - - /** - * 获取方法上的所有路由相关注解 - */ - private function getMethodRouteAnnotations(\ReflectionMethod $method): array - { - $annotations = []; - $annotationClasses = [ - Route::class, - Framework\Annotations\Get::class, - Framework\Annotations\Post::class, - Framework\Annotations\Put::class, - Framework\Annotations\Delete::class, - ]; - - foreach ($annotationClasses as $annoClass) { - $anno = $this->annotationReader->getMethodAnnotation($method, $annoClass); - if ($anno) { - $annotations[] = $anno; - } - } - - return $annotations; - } - - /** - * 处理单个路由注解,生成Symfony Route对象 - */ - private function processRouteAnnotation( - string $className, - string $methodName, - ?Route $classAnnotation, - Route $methodAnnotation, - RouteCollection $routes - ) { - // 1. 处理路由路径(拼接控制器前缀) - //$classPath = $classAnnotation ? trim($classAnnotation->path, '/') : ''; - //$methodPath = trim($methodAnnotation->path, '/'); - - // 使用 ?? '' 确保即使 ->path 是 null,也会被转换为空字符串 - $classPath = $classAnnotation ? trim($classAnnotation->path ?? '', '/') : ''; - $methodPath = trim($methodAnnotation->path ?? '', '/'); - - // 拼接完整路径(例:控制器前缀/admin + 方法路径/user → /admin/user) - $fullPath = '/' . implode('/', array_filter([$classPath, $methodPath])); - - // 关键步骤:为非根路径的路由自动添加.html后缀(可根据需求控制) - // 规则:仅前台路由加.html,管理后台路由(/admin/开头)不加 - if (!empty($fullPath) && !str_starts_with($fullPath, '/admin')) { - //$fullPath .= '.html'; // 生成如"/user/show.html"的路径 - } - - // 2. 处理请求方法 - $methods = (array)$methodAnnotation->methods; - $methods = array_map('strtoupper', $methods); - - // 3. 处理默认参数(合并控制器和方法的默认值) - $classDefaults = $classAnnotation ? $classAnnotation->defaults : []; - $methodDefaults = $methodAnnotation->defaults; - $defaults = array_merge($classDefaults, $methodDefaults); - - // 4. 处理参数约束(合并控制器和方法的约束) - $classRequirements = $classAnnotation ? $classAnnotation->requirements : []; - $methodRequirements = $methodAnnotation->requirements; - $requirements = array_merge($classRequirements, $methodRequirements); - - // 5. 生成路由名称(默认格式:控制器名.方法名) - $routeName = $methodAnnotation->name ?: - strtolower(str_replace('\\', '.', $className) . '.' . $methodName); - - // 6. 关键:合并控制器和方法的 options(新增这部分) - $classOptions = $classAnnotation ? $classAnnotation->options : []; - $methodOptions = $methodAnnotation->options; - $options = array_merge($classOptions, $methodOptions); // 类级别options会被方法级别覆盖 - - // ✅ 正确方式:从 annotations 提取中间件并合并,放入 defaults - #$classMiddleware = (array)($classAnnotation->options['_middleware'] ?? []); - #$methodMiddleware = (array)($methodAnnotation->options['_middleware'] ?? []); - #$finalMiddleware = array_values(array_unique(array_merge($classMiddleware, $methodMiddleware))); - - - // 7. 创建Symfony Route对象(控制器格式:类名::方法名) - $controller = $className . '::' . $methodName; - $symfonyRoute = new SymfonyRoute( - $fullPath, // 1. 路由路径 - array_merge($defaults, ['_controller' => $controller]), // 2. 默认参数(含控制器) - $requirements, // 3. 参数约束 - $options, // 4. 路由选项(中间件在这里!) - '', // 5. 主机 - [], // 6. schemes(http/https) - $methods // 7. 请求方法(GET/POST等) - ); - - // 7. 将路由添加到集合(路由名称作为键) - //$routes->add($annotation->name ?: $methodName, $symfonyRoute); - $routes->add($routeName, $symfonyRoute); - } - - - - - /** - * 合并多个数组中的 _middleware 值,过滤空数组,去重 - * - * @param array $data 多个数组组成的数组 - * @return array 合并后的 ['_middleware' => [...]] - */ - private function mergeMiddleware(array $data): array - { - $middlewares = []; - - foreach ($data as $item) { - // 跳过空数组或非数组元素 - if (!is_array($item) || empty($item)) { - continue; - } - - if (isset($item['_middleware'])) { - $mw = $item['_middleware']; - if (is_array($mw)) { - $middlewares = array_merge($middlewares, $mw); - } else { - $middlewares[] = $mw; - } - } - } - - // 去重并重置索引 - $middlewares = array_values(array_unique($middlewares)); - - return ['_middleware' => $middlewares]; - } - -} diff --git a/framework/Core/App.php b/framework/Core/App.php deleted file mode 100644 index 573b87f4..00000000 --- a/framework/Core/App.php +++ /dev/null @@ -1,38 +0,0 @@ -get($id); - } - - public static function has(string $id): bool - { - return self::$container !== null && self::$container->has($id); - } -} diff --git a/framework/Core/Application.php b/framework/Core/Application.php new file mode 100644 index 00000000..61adb6f3 --- /dev/null +++ b/framework/Core/Application.php @@ -0,0 +1,73 @@ +basePath = $basePath; + $this->container = new Container(); + + // 在 Application::__construct() 中添加: + //\think\facade\Db::setConfig(require $this->basePath . '/config/database.php'); + // 注册错误处理器 + (new Handler())->register(); + } + + public function run() + { + try { + $request = Request::capture(); + + $router = new Router($this->basePath); + $response = $router->dispatch($request); + + $response->send(); + } catch (\Exception $e) { + (new Handler())->handle($e); + } + } + + public function basePath($path = '') + { + return $this->basePath . ($path ? '/' . $path : ''); + } + + public function config($key, $default = null) + { + static $config = []; + if (!$config) { + foreach (glob($this->basePath('/config/*.php')) as $file) { + $name = pathinfo($file, PATHINFO_FILENAME); + $config[$name] = require $file; + } + } + + return array_get($config, $key, $default); + } +} + +// 辅助函数:array_get(简化数组取值) +if (!function_exists('array_get')) { + function array_get($array, $key, $default = null) + { + if (is_null($key)) return $array; + if (isset($array[$key])) return $array[$key]; + + foreach (explode('.', $key) as $segment) { + if (!is_array($array) || !array_key_exists($segment, $array)) { + return $default; + } + $array = $array[$segment]; + } + return $array; + } +} \ No newline at end of file diff --git a/framework/Core/Container.php b/framework/Core/Container.php new file mode 100644 index 00000000..a7418193 --- /dev/null +++ b/framework/Core/Container.php @@ -0,0 +1,40 @@ +bindings[$abstract] = $concrete ?? $abstract; + } + + public function make($abstract) + { + $concrete = $this->bindings[$abstract] ?? $abstract; + + if ($concrete === $abstract && !is_object($concrete)) { + $reflector = new \ReflectionClass($concrete); + $constructor = $reflector->getConstructor(); + + if (!$constructor) { + return new $concrete; + } + + $parameters = $constructor->getParameters(); + $dependencies = array_map(function ($param) { + $type = $param->getType(); + if (!$type || $type->isBuiltin()) { + throw new \Exception("Cannot resolve parameter: {$param->getName()}"); + } + return $this->make($type->getName()); + }, $parameters); + + return $reflector->newInstanceArgs($dependencies); + } + + return is_callable($concrete) ? $concrete($this) : new $concrete; + } +} \ No newline at end of file diff --git a/framework/Core/EasterEgg.php b/framework/Core/EasterEgg.php deleted file mode 100644 index 49187b4a..00000000 --- a/framework/Core/EasterEgg.php +++ /dev/null @@ -1,189 +0,0 @@ - [ - 'title' => '🌌 框架版本', - 'version' => '版本号', - 'easter_egg' => '你发现了隐藏彩蛋!🐉', - 'secret' => '嘘……这是核心的秘密。', - 'method_tip' => '试试用 team 请求?', - 'team_title' => '🌌 开发团队 | Development Team', - 'member' => '成员', - 'email' => '邮箱', - 'project' => '个人项目' - ], - 'en' => [ - 'title' => '🌌 Framework Version', - 'version' => 'Version', - 'easter_egg' => 'You found the easter egg! 🐉', - 'secret' => 'Shh... this is a secret from the core.', - 'method_tip' => 'Try with a team request?', - 'team_title' => '🌌 Development Team', - 'member' => 'Member', - 'email' => 'Email', - 'project' => 'Project' - ] - ]; - - /** - * 开发团队名单(可动态配置) - */ - private static $team = [ - [ - 'name' => 'Blue2004 (CYL)', - 'email' => 'zhe@framework.dev', - 'github' => 'https://github.com/xxx-xxx' - ], - ]; - - private static $path = '/version'; - - private static $TeamPath = '/team'; - - /** - * 检查是否触发 版本彩蛋 - */ - public static function isTriggeredVersion(Request $request): bool - { - return $request->getPathInfo() === self::$path && $request->getMethod() === 'GET'; - } - - /** - * 检查是否触发 团队名单彩蛋 - */ - public static function isTriggeredTeam(Request $request): bool - { - return $request->getPathInfo() === self::$TeamPath && $request->getMethod() === 'GET'; - } - - /** - * 获取版本号页面(GET) - */ - public static function getResponse(): Response - { - $lang = self::detectLanguage(); - $msg = self::$messages[$lang]; - $version = defined('FRAMEWORK_VERSION') ? FRAMEWORK_VERSION : 'dev'; - - $html = << - - - - {$msg['title']} - - - -

{$msg['title']}

-

{$msg['version']}: {$version}

-

{$msg['easter_egg']}

-

{$msg['secret']}

-

{$msg['method_tip']}

- - -HTML; - - return new Response($html, 200, ['Content-Type' => 'text/html']); - } - - /** - * 获取开发团队页面(POST) - */ - public static function getTeamResponse(): Response - { - $lang = self::detectLanguage(); - $msg = self::$messages[$lang]; - $team = self::$team; - - $rows = ''; - foreach ($team as $member) { - $name = htmlspecialchars($member['name']); - $email = htmlspecialchars($member['email']); - $github = htmlspecialchars($member['github']); - $link = '' . $github . ''; - - $rows .= "

👨‍💻 {$name}
"; - $rows .= "📧 {$email}
"; - $rows .= "💼 {$link}

"; - } - - $html = << - - - - {$msg['team_title']} - - - -

{$msg['team_title']}

- {$rows} -

- ❤️ Made with passion and PHP. -

- - -HTML; - - return new Response($html, 200, ['Content-Type' => 'text/html']); - } - - /** - * 语言检测 - */ - private static function detectLanguage(): string - { - $header = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? 'en'; - preg_match('/^([a-z]{2})/', strtolower($header), $matches); - $lang = $matches[1] ?? 'en'; - return array_key_exists($lang, self::$messages) ? $lang : 'en'; - } - - /** - * 返回 GET 彩蛋的路由标记 - */ - public static function getRouteMarker(): array - { - return [ - 'controller' => '__FrameworkVersionController__', - 'method' => '__showVersion__', - 'params' => [], - 'middleware' => [] - ]; - } - - /** - * 返回 POST 彩蛋的路由标记 - */ - public static function getTeamRouteMarker(): array - { - return [ - 'controller' => '__FrameworkTeamController__', - 'method' => '__showTeam__', - 'params' => [], - 'middleware' => [] - ]; - } -} \ No newline at end of file diff --git a/framework/Core/Exception/ErrorHandler.php b/framework/Core/Exception/ErrorHandler.php deleted file mode 100644 index 73c48135..00000000 --- a/framework/Core/Exception/ErrorHandler.php +++ /dev/null @@ -1,40 +0,0 @@ -twig = $twig; - $this->debug = $debug; - } - - public function handle(Throwable $e): Response - { - $status = $e->getCode(); - $status = is_numeric($status) && $status >= 400 && $status < 600 ? $status : 500; - - $template = "errors/{$status}.html.twig"; - $data = $this->debug ? ['message' => $e->getMessage()] : []; - - try { - $html = $this->twig->render($template, $data); - } catch (\Twig\Error\LoaderError $loaderError) { - // 如果错误模板也找不到,使用纯 HTML - $html = "

Error {$status}

An error occurred.

"; - if ($this->debug) { - $html .= "
{$e->getMessage()}
"; - } - } - - return new Response($html, $status); - } -} \ No newline at end of file diff --git a/framework/Core/Exception/Handler.php b/framework/Core/Exception/Handler.php deleted file mode 100644 index b742122a..00000000 --- a/framework/Core/Exception/Handler.php +++ /dev/null @@ -1,262 +0,0 @@ -debug = $config->get('app.debug', false); - - // 如果是 Web 请求,尝试从 $_SERVER 获取 - $incoming = $_SERVER['HTTP_X_REQUEST_ID'] ?? null; - $this->requestId = $incoming ?: generateRequestId(); - - } - - /** - * 报告异常:记录日志 - */ - public function report(Throwable $e): void - { - /** @var \Psr\Log\LoggerInterface $logger */ - $logger = app('log'); - // 你可以根据异常类型选择 error、critical 等级别 - $logger->error('Uncaught Exception', [ - 'class' => get_class($e), - 'message' => $e->getMessage(), - 'file' => $e->getFile(), - 'line' => $e->getLine(), - 'trace' => $e->getTraceAsString(), - 'request_id' => $this->requestId, - ]); - } - - - - /** - * 获取错误行附近的代码片段(带行号和高亮) - */ - private function getCodeSnippet(string $filePath, int $errorLine, int $context = 5): string - { - if (!file_exists($filePath)) { - return "// File not found: " . htmlspecialchars($filePath) . ""; - } - - $lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - $total = count($lines); - - // 确保行号有效(PHP 行号从 1 开始) - $errorLine = max(1, min($errorLine, $total)); - $start = max(0, $errorLine - 1 - $context); // 数组索引从 0 开始 - $end = min($total, $errorLine + $context); - - $output = ''; - for ($i = $start; $i < $end; $i++) { - $lineNum = $i + 1; - $content = htmlspecialchars($lines[$i]); - - $isErrorLine = ($lineNum === $errorLine); - $class = $isErrorLine ? 'code-line highlight' : 'code-line'; - - $output .= ""; - $output .= "{$lineNum}"; - $output .= "{$content}"; - $output .= "\n"; - } - - return $output; - } - - - /** - * 渲染异常:友好错误,输出给用户 - */ - public function render(Throwable $e): void - { - if ($this->debug) { - // 裁剪文件路径 - $file = $e->getFile(); - $originalFile = $file; - if (defined('BASE_PATH') && str_starts_with($file, BASE_PATH)) { - //$file = substr($file, strlen(BASE_PATH)); - $file = ltrim($file, '/\\'); - } - - $line = $e->getLine(); - $codeSnippet = $this->getCodeSnippet($originalFile, $line); - - // 转义安全内容 - $class = htmlspecialchars(get_class($e)); - //$message = htmlspecialchars($e->getMessage()); - $displayFile = htmlspecialchars($file); - $reqId = htmlspecialchars($this->requestId); - - $message = htmlspecialchars(str_replace(BASE_PATH, '/\\', $e->getMessage())); - //$fullTrace = htmlspecialchars(str_replace(BASE_PATH , '' ,$e->getTraceAsString()) ); - - $fullTrace = htmlspecialchars($e->getTraceAsString()); - - // 默认显示前 N 行(例如 10 行) - $traceLines = explode("\n", $fullTrace); - $previewLines = array_slice($traceLines, 0, 10); - $hasMore = count($traceLines) > 10; - $previewTrace = implode("\n", $previewLines); - - echo << - .exception-container { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace; - max-width: 1000px; - margin: 20px auto; - color: #333; - } - .exception-header { - background: #ffebee; - color: #c62828; - padding: 16px; - text-align: center; - font-weight: bold; - font-size: 18px; - border-radius: 4px 4px 0 0; - } - .exception-table { - width: 100%; - border-collapse: collapse; - background: #fff; - box-shadow: 0 2px 8px rgba(0,0,0,0.1); - } - .exception-table th, - .exception-table td { - padding: 14px 16px; - text-align: left; - vertical-align: top; - border-bottom: 1px solid #eee; - } - .exception-table th { - width: 120px; - color: #d32f2f; - font-weight: 600; - } - .exception-table pre { - margin: 0; - white-space: pre-wrap; - word-break: break-all; - font-size: 13px; - line-height: 1.4; - } - .code-snippet { - background: #f6f8fa; - border: 1px solid #e1e4e8; - border-radius: 4px; - overflow: auto; - font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace; - font-size: 12px; - } - .code-line { - display: block; - padding: 0 12px; - line-height: 1.5; - } - .code-line.highlight { - background-color: #fffbdd; - border-left: 3px solid #d9b300; - color: #000; - font-weight: bold; - } - .code-line-number { - display: inline-block; - width: 40px; - color: #999; - text-align: right; - margin-right: 12px; - } - .trace-toggle { - margin-top: 8px; - font-size: 13px; - color: #1976d2; - background: none; - border: none; - cursor: pointer; - text-decoration: underline; - } - .trace-toggle:hover { - color: #0d47a1; - } - - -
-
FrameWork Run: {$class}
- - - - - - - - - - - - - - - - - - - - -
Message{$message}
File{$displayFile} (Line: {$line})
Request ID{$reqId}
Code -
{$codeSnippet}
-
Trace -
{$previewTrace}
- HTML; - - if ($hasMore) { - echo <<Show full trace - HTML; - } - - echo << -
-
- HTML; - } else { - http_response_code(500); - echo "

Server Error

"; - echo "

We're sorry, something went wrong on our end.

"; - echo "

Request-ID: " . htmlspecialchars($this->requestId) . "

"; - } - } - - - - - - - - - - - - - -} diff --git a/framework/Core/Framework.php b/framework/Core/Framework.php deleted file mode 100644 index 5b4df89b..00000000 --- a/framework/Core/Framework.php +++ /dev/null @@ -1,345 +0,0 @@ -loadAll(); - - // 1. 初始化DI容器(核心:后续所有依赖从这里获取) - Container::init(); // 加载服务配置 - $this->container = Container::getInstance(); - // 示例 - //$loggers = $this->container->get(\Framework\Log\LoggerService::class); - //$loggers->info('Container loaded successfully!'); - - - // ✅ 1. 自动创建并启动 Kernel(注册服务) - $env = $_ENV['APP_ENV'] ?? 'prod'; - $debug = filter_var($_ENV['DEBUG'] ?? false, FILTER_VALIDATE_BOOLEAN); - $this->kernel = new Kernel($env, $debug); - $this->kernel->boot(); // <-- 容器在此时初始化,App::setContainer() 被调用 - - // 2. 初始化数据库ORM - $this->initORM(); - - // 3. 初始化日志服务 - $this->logger = app('log'); - - // 4. 加载所有路由(手动+注解) - $allRoutes = $this->loadAllRoutes(); - - - // 6. 加载中间件调度器 - $this->middlewareDispatcher = new MiddlewareDispatcher($this->container); - - // 5. 初始化路由和中间件调度器 - $this->router = new Router( - $allRoutes, - $this->container, //或者new Container() - self::CONTROLLER_NAMESPACE - ); - - } - - /** - * 初始化 ThinkORM 数据库配置 - */ - private function initORM() - { - // 检查数据库配置文件是否存在 - if (!file_exists(self::DATABASE_CONFIG_FILE)) { - throw new \Exception('Database configuration file not found: ' . self::DATABASE_CONFIG_FILE); - } - // 加载数据库配置 - $config = require self::DATABASE_CONFIG_FILE; - // 验证配置格式 - if (!isset($config['connections']) || !is_array($config['connections'])) { - throw new \Exception('Invalid database configuration format'); - } - - // 初始化 ThinkORM - Db::setConfig($config); - // 可选:在开发环境下开启 SQL 监听(用于调试) - if (defined('APP_DEBUG') && APP_DEBUG) { - Db::listen(function ($sql, $time, $explain) { - // 可以记录到日志或输出到控制台 - $this->logger->info("SQL: {$sql} [Time: {$time}s]"); - }); - } - } - - /** - * 框架入口:完整调度流程 - */ - public function run() - { - $start = microtime(true); - $this->request = Request::createFromGlobals(); - $request = $this->request; - - try { - // 1. 路由匹配 - $route = $this->router->match($request); - if (!$route) { - $response = $this->handleNotFound(); - $this->logger->logRequest($request, $response, microtime(true) - $start); - $response->send(); - return; - } - - // 彩蛋处理 - if ($route['controller'] === '__FrameworkVersionController__' && $route['method'] === '__showVersion__') { - $response = \Framework\Core\EasterEgg::getResponse(); - $response->send(); - exit; - } - if ($route['controller'] === '__FrameworkTeamController__' && $route['method'] === '__showTeam__') { - $response = \Framework\Core\EasterEgg::getTeamResponse(); - $response->send(); - exit; - } - - // 绑定路由 - $request->attributes->set('_route', $route); - - // 执行中间件 + 控制器 - $response = $this->middlewareDispatcher->dispatch($request, function ($req) use ($route) { - return $this->callController($route); - }); - - } catch (\Throwable $e) { - // 🔥 记录异常(使用 Symfony Request) - $this->logger->logException($e, $request); - - // 返回友好错误响应 - //$response = $this->handleException($e); - } - - // 统一日志记录(包括异常情况) - $this->logger->logRequest($request, $response, microtime(true) - $start); - - $response->send(); - } - - - - private function callController(array $route): Response - { - $controllerClass = $route['controller']; - $method = $route['method']; - $routeParams = $route['params'] ?? []; - - // 1. 从容器获取控制器实例 - $controller = $this->container->get($controllerClass); - - // 2. 使用反射分析方法参数 - $reflection = new \ReflectionMethod($controllerClass, $method); - $parameters = $reflection->getParameters(); - - // 3. 只处理“标量/无类型”参数(跳过 Request、自定义服务等对象) - foreach ($parameters as $param) { - $type = $param->getType(); - - // 如果是对象类型(非内置类型),交给 ArgumentResolver 自动注入,跳过 - if ($type && !$type->isBuiltin()) { - continue; - } - - $paramName = $param->getName(); - - // 优先:路径参数 - if (isset($routeParams[$paramName])) { - $this->request->attributes->set($paramName, $routeParams[$paramName]); - continue; - } - - // 其次:查询参数($_GET) - if ($this->request->query->has($paramName)) { - $this->request->attributes->set($paramName, $this->request->query->get($paramName)); - continue; - } - - // 没有提供值?如果有默认值,ArgumentResolver 会处理;否则 PHP 会报错(符合预期) - } - - // 4. 使用 Symfony 的 ArgumentResolver 解析所有参数(包括 Request 等) - $argumentResolver = new ArgumentResolver(); - $arguments = $argumentResolver->getArguments($this->request, [$controller, $method]); - - // 5. 调用控制器方法 - $response = $controller->$method(...$arguments); - - // 6. 确保返回 Response 对象 - if (!$response instanceof Response) { - if (is_array($response) || is_object($response)) { - $response = new Response( - json_encode($response, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), - 200, - ['Content-Type' => 'application/json'] - ); - } else { - $response = new Response((string)$response); - } - } - - return $response; - } - - - /** - * 加载所有路由(手动路由 + 注解路由),支持缓存 - */ - private function loadAllRoutes(): RouteCollection - { - // 检查路由缓存 - if (file_exists(self::ROUTE_CACHE_FILE)) { - $serializedRoutes = file_get_contents(self::ROUTE_CACHE_FILE); - $routes = unserialize($serializedRoutes); - if ($routes instanceof RouteCollection) { - return $routes; - } - // 缓存损坏,删除旧缓存 - unlink(self::ROUTE_CACHE_FILE); - } - - // 1. 加载手动路由(从 config/routes.php 读取) - $manualRoutes = require BASE_PATH . '/config/routes.php'; - $allRoutes = new RouteCollection(); - if ($manualRoutes instanceof RouteCollection) { - $allRoutes->addCollection($manualRoutes); - } - - // 2. 加载注解路由(通过 AnnotationRouterLoader) - $annotationLoader = new AnnotationRouteLoader( - self::CONTROLLER_DIR, - self::CONTROLLER_NAMESPACE - ); - $annotatedRoutes = $annotationLoader->loadRoutes(); // 调用正确的方法名 - //print_r($annotatedRoutes); - $allRoutes->addCollection($annotatedRoutes); - - // 缓存合并后的路由 - //$this->cacheRoutes($allRoutes, self::ROUTE_CACHE_FILE); - - return $allRoutes; - } - - /* - 404 not found - */ - private function handleNotFound() - { - $responseContent = view('errors/404.html.twig', [ - 'status_code' => Response::HTTP_NOT_FOUND , // 404 - 'status_text' => 'Not Found', - 'message' => '404 Page Not Found. Please refresh the page and try again.', - ]); - - $response = new Response($responseContent, Response::HTTP_NOT_FOUND); - return $response; - } - - /* - 500 错误的友好页面 - */ - private function handleException(\Exception $e) - { - // 设置HTTP响应头为500 - http_response_code(500); - - // 渲染Twig模板,并将异常对象传递过去 - // 注意:我们传递的是整个$e对象,而不是print_r的结果 - $html = view('errors/500.html.twig', [ - 'exception' => $e, - ]); - // 返回一个包含渲染后HTML的Response对象 - return new Response($html, 500); - //return new Response('500 Server Error', 500); - } - - /* - 单例模式,实例化 - */ - public static function getInstance(): Framework - { - if (self::$instance === null) { - self::$instance = new self(); - } - return self::$instance; - } - - // ✅ 对外提供容器 - public function getContainer(): ContainerInterface - { - return $this->container; - } - - - // 可选:提供访问容器或内核的接口 - public function getKernel(): Kernel - { - return $this->kernel; - } - - // 可选: 实现Kernel的getContainer,使用别名 - public function get_Container() - { - return $this->kernel->getContainer(); - } - - /** - * 缓存路由集合 - */ - private function cacheRoutes(RouteCollection $routes, string $file) - { - $dir = dirname($file); - if (!is_dir($dir)) { - mkdir($dir, 0777, true); - } - file_put_contents($file, serialize($routes)); - } -} diff --git a/framework/Core/Kernel.php b/framework/Core/Kernel.php deleted file mode 100644 index 2008ef1b..00000000 --- a/framework/Core/Kernel.php +++ /dev/null @@ -1,191 +0,0 @@ -environment = $environment; - $this->debug = $debug; - - if ($debug) { - ini_set('display_errors', '1'); - error_reporting(-1); - } else { - ini_set('display_errors', '0'); - } - } - - public function getEnvironment(): string - { - return $this->environment; - } - - public function isDebug(): bool - { - return $this->debug; - } - - /** - * 启动内核:构建并编译容器,载入异常类,并设置全局 App 容器 - */ - public function boot(): void - { - - $this->buildContainer(); - - date_default_timezone_set(config('app.time_zone')); - - - /*在容器编译前 注册,要在调用前进行编译 $containerBuilder->compile()*/ - // 在容器构建阶段(使用 Symfony ContainerBuilder) - /* - // 或者用定义方式(推荐) - $this->container->register(\Framework\Config\ConfigService::class) - ->setPublic(true); - - $this->container->register('exception', \Framework\Core\Exception\Handler::class) - ->setArguments([$this->debug]) - ->setPublic(true) - ->setShared(true); // 默认就是 singleton - */ - - $this->container->compile(); - // ✅ 设置全局 App 容器(你的助手函数依赖它) - App::setContainer($this->container); - - //$debug = app('config')->get('app.debug', false); - //dump(app()->getServiceIds()); // 查看所有服务 ID - - // 设置全局异常处理器 - - set_exception_handler(function (\Throwable $e) { - $handler = app('exception'); - $handler->report($e); - $handler->render($e); - }); - - - // 捕获 PHP 错误(如 notice, warning) - set_error_handler(function ($severity, $message, $file, $line) { - throw new \ErrorException($message, 0, $severity, $file, $line); - }); - - // 捕获致命错误(PHP 7+) - register_shutdown_function(function () { - $error = error_get_last(); - if ($error && in_array($error['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR])) { - $e = new \ErrorException( - $error['message'] ?? 'Fatal error', - 0, - $error['type'] ?? E_ERROR, - $error['file'] ?? 'unknown', - $error['line'] ?? 0 - ); - $handler = app('exception'); - $handler->report($e); - $handler->render($e); - } - }); - } - - /** - * 获取服务容器 - */ - public function getContainer(): ContainerBuilder - { - if (null === $this->container) { - $this->boot(); - } - - return $this->container; - } - - /** - * 构建服务容器 - */ - protected function buildContainer(): void - { - $request = Request::createFromGlobals(); - $requestStack = new RequestStack(); - $requestStack->push($request); // 👈 关键! - - //初始化容器构造类 - $container = new ContainerBuilder(); - - // 注册 RequestStack 到容器(关键!) - $container->set(RequestStack::class, $requestStack); - // 或者用字符串别名(如果你在 services.php 中用 'request_stack') - $container->set('request_stack', $requestStack); - - // 设置内核参数(必须,因为你的 services.php 用到了 %kernel.project_dir%) - $container->setParameter('kernel.environment', $this->environment); - $container->setParameter('kernel.debug', $this->debug); - $container->setParameter('kernel.project_dir', $this->getProjectDir()); - - // ✅ 使用 PhpFileLoader 加载你的 services.php(支持 Configurator DSL) - $loader = new PhpFileLoader($container, new FileLocator($this->getConfigDir())); - $loader->load('services.php'); // <-- 自动识别并执行你的闭包 - - $this->container = $container; - - // 添加资源用于缓存 - $container->addResource(new \Symfony\Component\Config\Resource\FileResource( - $this->getConfigDir() . '/services.php' - )); - } - - /** - * 获取项目根目录 - */ - public function getProjectDir(): string - { - return dirname(__DIR__, 2); // 从 framework/Core 到项目根 - } - - /** - * 获取配置目录 - */ - public function getConfigDir(): string - { - return $this->getProjectDir() . '/config'; - } - - /** - * 获取缓存目录(可扩展) - */ - public function getCacheDir(): string - { - return $this->getProjectDir() . '/storage/cache/' . $this->environment; - } - - /** - * 获取日志目录(可扩展) - */ - public function getLogDir(): string - { - return $this->getProjectDir() . '/storage/logs'; - } -} diff --git a/framework/Core/MiddlewarePipeline.php b/framework/Core/MiddlewarePipeline.php deleted file mode 100644 index 7b38f553..00000000 --- a/framework/Core/MiddlewarePipeline.php +++ /dev/null @@ -1,49 +0,0 @@ -container = $container; - } - - public function add($middleware) - { - $this->middlewares[] = $middleware; - return $this; - } - - public function send(Request $request, callable $next): Response - { - $stack = array_reverse($this->middlewares); - - $carry = $next; - - foreach ($stack as $middleware) { - $instance = $this->resolveMiddleware($middleware); - $carry = function () use ($instance, $carry, $request) { - return $instance->handle($request, $carry); - }; - } - - return $carry(); - } - - private function resolveMiddleware($middleware) - { - if (is_string($middleware)) { - return $this->container->make($middleware); - } - return $middleware; - } -} diff --git a/framework/Core/Router.php b/framework/Core/Router.php deleted file mode 100644 index bae12482..00000000 --- a/framework/Core/Router.php +++ /dev/null @@ -1,394 +0,0 @@ -allRoutes = $allRoutes; - $this->container = $container; // <--- 存储容器 - $this->controllerNamespace = $controllerNamespace; - - } - - /** - * 核心路由匹配方法 - * 优先级:手动路由 > 注解路由 > 自动解析路由 - * @return array|null 路由元数据:[controller, method, params, middleware] - */ - public function match(Request $request): ?array - { - // 1. 预处理:处理PUT/DELETE请求、去除URL的.html后缀 - $this->preprocessRequest($request); - - $path = $request->getPathInfo(); - $context = new RequestContext(); - $context->fromRequest($request); - - - // 🔥 检查 版本彩蛋 - if (\Framework\Core\EasterEgg::isTriggeredVersion($request)) { - return \Framework\Core\EasterEgg::getRouteMarker(); - } - - // 🔥 检查 团队彩蛋(团队名单) - if (\Framework\Core\EasterEgg::isTriggeredTeam($request)) { - return \Framework\Core\EasterEgg::getTeamRouteMarker(); - } - - // 2. 策略1:匹配手动路由 + 注解路由(共用Symfony UrlMatcher) - $manualOrAnnotationRoute = $this->matchManualAndAnnotationRoutes($path, $context); - if ($manualOrAnnotationRoute) { - return $manualOrAnnotationRoute; - } - - // 3. 策略2:匹配自动解析路由(最低优先级) - $autoRoute = $this->matchAutoRoute($path, $request); - if ($autoRoute) { - return $autoRoute; - } - - // 4. 未匹配到任何路由 - return null; - } - - /** - * 匹配手动路由和注解路由(两者已合并到 $allRoutes) - */ - private function matchManualAndAnnotationRoutes1(string $path, RequestContext $context): ?array - { - try { - $matcher = new UrlMatcher($this->allRoutes, $context); - $parameters = $matcher->match($path); - - // 4. 提取并执行中间件(核心新增逻辑) - //$middlewareList = $parameters['_route_object']->getOptions()['_middleware'] ?? []; - - - // 提取控制器和方法(支持 "Class::method" 格式) - if (!isset($parameters['_controller'])) { - return null; - } - list($controllerClass, $actionMethod) = explode('::', $parameters['_controller'], 2); - - // 提取路由元数据:控制器、方法、参数、中间件 - $middleware = $parameters['_middleware'] ?? []; // 路由绑定的中间件 - // 移除框架保留参数(不传递给控制器方法) - unset($parameters['_controller'], $parameters['_middleware'], $parameters['_route']); - - - return [ - 'controller' => $controllerClass, - 'method' => $actionMethod, - 'params' => $parameters, - 'middleware' => $middleware - ]; - } catch (ResourceNotFoundException $e) { - // 手动/注解路由未匹配,返回null进入自动路由逻辑 - return null; - } - } - - /** - * 匹配手动路由和注解路由(两者已合并到 $allRoutes) - */ - private function matchManualAndAnnotationRoutes(string $path, RequestContext $context): ?array - { - try { - $matcher = new UrlMatcher($this->allRoutes, $context); - $parameters = $matcher->match($path); - - // 1. 从匹配结果中获取路由名称 - $routeName = $parameters['_route']; - - // 2. 使用路由名称从原始路由集合中找到对应的路由对象 - $routeObject = $this->allRoutes->get($routeName); - - // 3. 从路由对象中提取中间件 - $middlewareList = $routeObject ? $routeObject->getOptions()['_middleware'] ?? [] : []; - - // 提取控制器和方法(支持 "Class::method" 格式) - if (!isset($parameters['_controller'])) { - return null; - } - list($controllerClass, $actionMethod) = explode('::', $parameters['_controller'], 2); - - // 移除框架保留参数(不传递给控制器方法) - unset($parameters['_controller'], $parameters['_route']); - - // 打印中间件列表进行验证 - //print_r($middlewareList); - - return [ - 'controller' => $controllerClass, - 'method' => $actionMethod, - 'params' => $parameters, - 'middleware' => $middlewareList // 返回正确提取的中间件列表 - ]; - } catch (ResourceNotFoundException $e) { - // 手动/注解路由未匹配,返回null进入自动路由逻辑 - return null; - } - } - - - - - /** - * 匹配自动解析路由(支持多级命名空间、自动参数映射) - */ - private function matchAutoRoute(string $path, Request $request): ?array - { - $path = rtrim($path, '/'); - // 拆分路径为段(过滤空值,确保数组键从0开始) - $pathSegments = array_values(array_filter(explode('/', $path))); - $requestMethod = $request->getMethod(); - - // 根路径特殊处理:映射到 HomeController@index - if (empty($pathSegments)) { - $homeController = "{$this->controllerNamespace}\\HomeController"; - if (class_exists($homeController) && method_exists($homeController, 'index')) { - return [ - 'controller' => $homeController, - 'method' => 'index', - 'params' => [], - 'middleware' => [] - ]; - } - return null; - } - - // 核心逻辑:从长到短尝试匹配控制器(支持多级命名空间) - // 例:/api/v2/user/show/1 → 先试 [api,v2,user] → 再试 [api,v2] → 最后试 [api] - for ($controllerSegmentLength = count($pathSegments); $controllerSegmentLength >= 1; $controllerSegmentLength--) { - // 1. 提取控制器路径段,构建控制器类名 - $controllerSegments = array_slice($pathSegments, 0, $controllerSegmentLength); - $controllerClass = $this->buildControllerClassName($controllerSegments); - - // 控制器不存在,跳过当前长度,尝试更短的路径段 - if (!class_exists($controllerClass)) { - continue; - } - - // 2. 提取动作+参数段,尝试匹配控制器方法 - $actionAndParamSegments = array_slice($pathSegments, $controllerSegmentLength); - $routeInfo = $this->matchActionAndParams($controllerClass, $actionAndParamSegments, $requestMethod); - - if ($routeInfo) { - return array_merge([ - 'controller' => $controllerClass, - 'middleware' => [] // 自动路由默认无中间件,可按需扩展 - ], $routeInfo); - } - } - - // 未匹配到自动路由 - return null; - } - - /** - * 构建控制器完整类名(支持多级命名空间) - * 例:[api, v2, user] → App\Controllers\Api\V2\UserController - */ - private function buildControllerClassName(array $segments): string - { - if (empty($segments)) { - return "{$this->controllerNamespace}\\HomeController"; - } - - // 最后一段添加 "Controller" 后缀,前面的段作为命名空间层级 - $lastSegment = array_pop($segments); - $lastSegment .= 'Controller'; - $segments[] = $lastSegment; - - // 命名空间段首字母大写(规范命名) - $namespaceSegments = array_map('ucfirst', $segments); - return $this->controllerNamespace . '\\' . implode('\\', $namespaceSegments); - } - - /** - * 匹配动作名和参数(自动路由核心) - * @return array|null [method, params] - */ - private function matchActionAndParams(string $controllerClass, array $segments, string $requestMethod): ?array - { - $availableMethods = get_class_methods($controllerClass); - $paramSegments = []; - - // 1. 无动作段:使用RESTful默认动作(如GET → index/show,POST → store) - if (empty($segments)) { - $defaultAction = $this->getRestDefaultAction($requestMethod); - if (in_array($defaultAction, $availableMethods)) { - return [ - 'method' => $defaultAction, - 'params' => [] - ]; - } - return null; - } - - // 2. 有动作段:从短到长尝试匹配动作名(支持多段动作名,如 /user/profile/edit → profileEdit) - for ($actionSegmentLength = 1; $actionSegmentLength <= count($segments); $actionSegmentLength++) { - $actionSegments = array_slice($segments, 0, $actionSegmentLength); - $paramSegments = array_slice($segments, $actionSegmentLength); - - // 构建动作名(多段转为驼峰式,如 [show, profile] → showProfile) - $actionMethod = $this->buildActionName($actionSegments); - - // 动作不存在,跳过当前长度 - if (!in_array($actionMethod, $availableMethods)) { - continue; - } - - // 3. 提取参数(单参数默认映射id,多参数映射param1/param2...) - $params = $this->extractParamsFromSegments($paramSegments); - - return [ - 'method' => $actionMethod, - 'params' => $params - ]; - } - - // 4. 无匹配动作:尝试REST默认动作(如 /user/1 → GET → show(id=1)) - $defaultAction = $this->getRestDefaultAction($requestMethod); - if (in_array($defaultAction, $availableMethods)) { - $params = $this->extractParamsFromSegments($segments); - return [ - 'method' => $defaultAction, - 'params' => $params - ]; - } - - return null; - } - - /** - * 构建动作名(多段转为驼峰式) - */ - private function buildActionName(array $segments): string - { - if (empty($segments)) { - return 'index'; - } - // 首字母小写,后续段首字母大写(如 [user, list] → userList) - return lcfirst(implode('', array_map('ucfirst', $segments))); - } - - /** - * 从路径段提取参数 - */ - private function extractParamsFromSegments(array $segments): array - { - $params = []; - $segmentCount = count($segments); - - // 单参数:默认映射为id(如 /user/1 → id=1) - if ($segmentCount === 1) { - $params['id'] = $segments[0]; - } - // 多参数:按顺序映射为param1/param2...(如 /user/search/1/admin → param1=1, param2=admin) - elseif ($segmentCount > 1) { - foreach ($segments as $key => $value) { - $params['param' . ($key + 1)] = $value; - } - } - - return $params; - } - - /** - * 根据HTTP方法获取RESTful默认动作 - */ - private function getRestDefaultAction(string $method): string - { - return match (strtoupper($method)) { - 'GET' => 'index', - 'POST' => 'store', - 'PUT' => 'update', - 'DELETE' => 'destroy', - default => 'index' - }; - } - - /** - * 请求预处理:中间件+URL后缀处理 - */ - private function preprocessRequest(Request $request): void - { - // 处理PUT/DELETE请求(通过表单隐藏字段_method) - //$this->applyMethodOverrideMiddleware($request); - // 去除URL的.html后缀(如 /user/1.html → /user/1) - $this->removeHtmlSuffix($request); - } - - /** - * 应用MethodOverride中间件 - */ - private function applyMethodOverrideMiddleware(Request $request): void - { - //$methodOverride = new MiddlewareMethodOverride(); - $methodOverride = new MiddlewareDispatcher($this->container); - $methodOverride->dispatch($request, function ($req) { - return new \Symfony\Component\HttpFoundation\Response(); - }); - } - - /** - * 去除URL的.html后缀 - */ - private function removeHtmlSuffix(Request $request): void - { - $originalPath = $request->getPathInfo(); - $cleanPath = preg_replace('/\.html$/', '', $originalPath); - - // 后缀存在时,更新请求的URI - if ($cleanPath !== $originalPath) { - $newUri = str_replace($originalPath, $cleanPath, $request->getUri()); - $request->server->set('REQUEST_URI', $newUri); - // 重新初始化请求(确保路径生效) - $request->initialize( - $request->query->all(), - $request->request->all(), - $request->attributes->all(), - $request->cookies->all(), - $request->files->all(), - $request->server->all(), - $request->getContent() - ); - } - } -} diff --git a/framework/Exception/Handler.php b/framework/Exception/Handler.php new file mode 100644 index 00000000..0fd4ee42 --- /dev/null +++ b/framework/Exception/Handler.php @@ -0,0 +1,35 @@ +getMessage(); + $file = $exception->getFile(); + $line = $exception->getLine(); + + error_log("PHP ERROR: {$msg} in {$file}:{$line}"); + + if (php_sapi_name() === 'cli') { + echo "Error: {$msg} in {$file}:{$line}\n"; + } else { + http_response_code(500); + echo "

Internal Server Error

"; + } + } + + public function handleError($level, $message, $file, $line) + { + if (error_reporting() & $level) { + throw new \ErrorException($message, 0, $level, $file, $line); + } + } +} \ No newline at end of file diff --git a/framework/Http/Request.php b/framework/Http/Request.php new file mode 100644 index 00000000..23e7ee4f --- /dev/null +++ b/framework/Http/Request.php @@ -0,0 +1,35 @@ +get = $get; + $this->post = $post; + $this->method = strtoupper($method); + $this->path = $path; + } + + public function method() { return $this->method; } + public function path() { return $this->path; } + public function all() { return array_merge($this->get, $this->post); } + public function get($key, $default = null) { return $this->get[$key] ?? $default; } + public function post($key, $default = null) { return $this->post[$key] ?? $default; } +} \ No newline at end of file diff --git a/framework/Http/Response.php b/framework/Http/Response.php new file mode 100644 index 00000000..209ff9b6 --- /dev/null +++ b/framework/Http/Response.php @@ -0,0 +1,32 @@ +content = $content; + $this->status = $status; + $this->headers = $headers; + } + + public function withHeader($name, $value) + { + $this->headers[$name] = $value; + return $this; + } + + public function send() + { + http_response_code($this->status); + foreach ($this->headers as $name => $value) { + header("$name: $value"); + } + echo $this->content; + } +} \ No newline at end of file diff --git a/framework/Log/Logger.php b/framework/Log/Logger.php index 6a585b70..bf1648e1 100644 --- a/framework/Log/Logger.php +++ b/framework/Log/Logger.php @@ -1,67 +1,30 @@ logger = new MonoLogger($channel); - $this->logger->pushHandler(new StreamHandler(storage_path('logs/app.log'), MonoLogger::DEBUG)); - } - - public function info(string $message, array $context = []): void - { - $this->logger->info($message, $context); - } + protected $channel; - public function error(string $message, array $context = []): void + public function __construct($channel = 'single') { - $this->logger->error($message, $context); + $this->channel = $channel; } - public function debug(string $message, array $context = []): void + public function info($message) { - $this->logger->debug($message, $context); + $this->write("INFO: {$message}"); } - /** - * 记录 HTTP 请求日志(使用 Symfony Request/Response) - */ - public function logRequest(Request $request, ?Response $response = null, float $duration = 0): void + public function error($message) { - $this->info('Request', [ - 'method' => $request->getMethod(), - 'uri' => $request->getRequestUri(), - 'ip' => $request->getClientIp() ?: 'unknown', - 'user_agent' => $request->headers->get('User-Agent') ?? 'unknown', - 'response_status' => $response?->getStatusCode(), - 'duration_ms' => round($duration * 1000, 2), - ]); + $this->write("ERROR: {$message}"); } - /** - * 记录异常日志(使用 Symfony Request) - */ - public function logException(\Throwable $exception, Request $request): void + protected function write($message) { - $this->error('Exception', [ - 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'trace' => $exception->getTraceAsString(), - 'method' => $request->getMethod(), - 'uri' => $request->getRequestUri(), - 'ip' => $request->getClientIp() ?: 'unknown', - ]); + $config = include BASE_PATH . '/config/log.php'; + $path = $config['channels'][$this->channel]['path']; + file_put_contents($path, date('Y-m-d H:i:s') . " - {$message}\n", FILE_APPEND); } } \ No newline at end of file diff --git a/framework/Log/LoggerService.php b/framework/Log/LoggerService.php deleted file mode 100644 index 52d62768..00000000 --- a/framework/Log/LoggerService.php +++ /dev/null @@ -1,104 +0,0 @@ -config->get('log.log_channel', 'app'); - $logDir = $this->config->get('log.log_path', BASE_PATH . '/storage/logs'); - - if (!is_dir($logDir)) { - mkdir($logDir, 0755, true); - } - - $this->logger = new MonoLogger($channel); - - // 1. Debug 日志:仅 DEBUG - $debugHandler = new FilterHandler( - new StreamHandler($logDir . '/debug.log', MonoLogger::DEBUG), - MonoLogger::DEBUG, - MonoLogger::DEBUG - ); - $this->logger->pushHandler($debugHandler); - - // 2. Error 日志:ERROR ~ EMERGENCY - $errorHandler = new FilterHandler( - new StreamHandler($logDir . '/error.log', MonoLogger::ERROR), - MonoLogger::ERROR, - MonoLogger::EMERGENCY - ); - $this->logger->pushHandler($errorHandler); - - // 3. App 日志:INFO, NOTICE, WARNING - $appHandler = new FilterHandler( - new StreamHandler($logDir . '/app.log', MonoLogger::INFO), - MonoLogger::INFO, - MonoLogger::WARNING - ); - $this->logger->pushHandler($appHandler); - } - - public function info(string $message, array $context = []): void - { - $this->logger->info($message, $context); - } - - public function error(string $message, array $context = []): void - { - $this->logger->error($message, $context); - } - - public function debug(string $message, array $context = []): void - { - $this->logger->debug($message, $context); - } - - public function getMonoLogger(): MonoLogger - { - return $this->logger; - } - - /** - * 记录 HTTP 请求日志(使用 Symfony Request/Response) - */ - public function logRequest(Request $request, ?Response $response = null, float $duration = 0): void - { - $this->info('Request', [ - 'method' => $request->getMethod(), - 'uri' => $request->getRequestUri(), - 'ip' => $request->getClientIp() ?: 'unknown', - 'user_agent' => $request->headers->get('User-Agent') ?? 'unknown', - 'response_status' => $response?->getStatusCode(), - 'duration_ms' => round($duration * 1000, 2), - ]); - } - - /** - * 记录异常日志(使用 Symfony Request) - */ - public function logException(\Throwable $exception, Request $request): void - { - $this->error('Exception', [ - 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'trace' => $exception->getTraceAsString(), - 'method' => $request->getMethod(), - 'uri' => $request->getRequestUri(), - 'ip' => $request->getClientIp() ?: 'unknown', - ]); - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareCircuitBreaker.php b/framework/Middleware/MiddlewareCircuitBreaker.php deleted file mode 100644 index 8849c9d9..00000000 --- a/framework/Middleware/MiddlewareCircuitBreaker.php +++ /dev/null @@ -1,143 +0,0 @@ -cacheDir = rtrim(str_replace('\\', '/', $cacheDir), '/') . '/'; - if (!is_dir($this->cacheDir)) { - mkdir($this->cacheDir, 0755, true); - } - } - - /** - * 处理请求,实现熔断逻辑 - * - * @param Request $request - * @param callable $next 下一个中间件或控制器 - * @return Response - */ - public function handle(Request $request, callable $next): Response - { - //echo 'MiddlewareCircuitBreaker==>in'; - $service = 'default'; // 可扩展为按路由/服务名区分 - $key = $this->cacheDir . 'breaker_' . md5($service); - $now = time(); - - // 读取当前熔断器状态 - $state = ['status' => 'closed', 'failures' => 0]; - if (file_exists($key)) { - $content = @file_get_contents($key); - if ($content !== false) { - $state = json_decode($content, true) ?: $state; - } - } - - // 检查是否处于 "open" 状态且未超时 - if ($state['status'] === 'open') { - if (isset($state['opened_at']) && $state['opened_at'] + $this->timeout > $now) { - // 熔断中,直接返回 503,超过次数,直接不可用 - return new Response('服务熔断,暂不可用!', 503); - //return $this->buildServiceUnavailableResponse($request); - } else { - // 超时,进入 half-open 状态,允许一次试探 - $state = ['status' => 'half-open', 'attempts' => 1]; - file_put_contents($key, json_encode($state)); - } - } - - try { - $response = $next($request); - //echo $response->getStatusCode(); - - // 判断是否为服务端错误(可自定义) - if (in_array($response->getStatusCode(), [500, 502, 503, 504], true)) { - throw new \RuntimeException('Upstream service error'); - } - - // 成功:重置为 closed - file_put_contents($key, json_encode([ - 'status' => 'closed', - 'failures' => 0 - ])); - - return $response; - - } catch (\Throwable $e) { - // 记录失败 - $failures = ($state['status'] === 'closed' ? ($state['failures'] ?? 0) : 0) + 1; - - if ($failures >= $this->failureThreshold) { - // 触发熔断 - file_put_contents($key, json_encode([ - 'status' => 'open', - 'opened_at' => $now - ])); - } else { - // 继续累积失败 - file_put_contents($key, json_encode([ - 'status' => 'closed', - 'failures' => $failures - ])); - } - //echo 'MiddlewareCircuitBreaker==>out'; - // 返回 503 响应(不抛出异常,避免中断中间件链) - return $this->buildServiceUnavailableResponse($request); - } - } - - /** - * 构建友好的 503 响应 - */ - private function buildServiceUnavailableResponse(Request $request): Response - { - $message = '服务暂时不可用,请稍后再试。'; - - // 判断是否为 API 请求 - if ($request->isXmlHttpRequest() || - strpos($request->headers->get('Accept', ''), 'application/json') !== false) { - - return new JsonResponse([ - 'success' => false, - 'error' => 'service_unavailable', - 'message' => $message, - 'details' => '系统正在保护性熔断中,稍后自动恢复。' - ], 503); - } - - $html = << - - - - 服务不可用 - - - -
-

🔧 服务暂时不可用

-

{$message}

-

系统已自动启用熔断机制,预计几秒后恢复。

-
- - -HTML; - - return new Response($html, 503, ['Content-Type' => 'text/html; charset=utf-8']); - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareCors.php b/framework/Middleware/MiddlewareCors.php deleted file mode 100644 index b2bb19cf..00000000 --- a/framework/Middleware/MiddlewareCors.php +++ /dev/null @@ -1,34 +0,0 @@ -isMethod('OPTIONS')) { - $response = new Response(); - } else { - // 2. 对其他请求,先执行后续逻辑,获取响应 - $response = $next($request); - } - - // 3. 在响应中添加 CORS 头 - $response->headers->set('Access-Control-Allow-Origin', '*'); - $response->headers->set('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, Origin, Authorization'); - $response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS'); - - - - //dump('--- 退出 MiddlewareCors (中间件) ---'); - - // 4. 返回最终的响应 - return $response; - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareCsrfProtection.php b/framework/Middleware/MiddlewareCsrfProtection.php deleted file mode 100644 index b4645366..00000000 --- a/framework/Middleware/MiddlewareCsrfProtection.php +++ /dev/null @@ -1,76 +0,0 @@ -getMethod(), ['HEAD', 'OPTIONS', 'TRACE'])) { - return $next($request); - } - - if ($request->getMethod() === 'GET') { - $request->attributes->set('csrf_token', $this->tokenManager->getToken('default')); - return $next($request); - } - - foreach ($this->except as $pattern) { - if ($this->matchPath($request->getPathInfo(), $pattern)) { - return $next($request); - } - } - - $token = $request->request->get($this->tokenName) - ?? $request->headers->get('X-CSRF-TOKEN') - ?? ''; - - if (!is_string($token) || !$this->tokenManager->isTokenValid('default', $token)) { - if ($this->removeAfterValidation) { - $this->tokenManager->removeToken('default'); - } - //throw new AccessDeniedHttpException($this->errorMessage); - - $responseContent = view('errors/csrf_error.html.twig', [ - 'status_code' => Response::HTTP_FORBIDDEN, // 403 - 'status_text' => 'Forbidden', - 'message' => $this->errorMessage ?: 'CSRF token validation failed. Please refresh the page and try again.', - ]); - - // 5. 创建一个新的Response对象 - $response = new Response($responseContent, Response::HTTP_FORBIDDEN); - - // 6. 将这个新的Response对象设置为事件的响应 - // 这会阻止Symfony显示默认的错误页面 - // $event->setResponse($response); - - return $response; - } - - if ($this->removeAfterValidation) { - $this->tokenManager->removeToken('default'); // 用完即焚 - } - - return $next($request); - } - - private function matchPath(string $path, string $pattern): bool - { - $regex = str_replace('\*', '.*', preg_quote($pattern, '#')); - return (bool) preg_match('#^' . $regex . '$#', $path); - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareDispatcher.php b/framework/Middleware/MiddlewareDispatcher.php deleted file mode 100644 index 4de8aed3..00000000 --- a/framework/Middleware/MiddlewareDispatcher.php +++ /dev/null @@ -1,111 +0,0 @@ -container = $container; - } - - /** - * 调度中间件:先执行全局中间件,再执行路由中间件 - * @param Request $request - * @param callable $next 下一个中间件/控制器 - * @return Response - */ - public function dispatch(Request $request, callable $next): Response - { - // 1. 获取路由中间件(从请求的_route属性中获取) - $route = $request->attributes->get('_route', []); - // 假设路由定义中的 middleware 可能是多维或混合的,我们先获取它 - $rawRouteMiddleware = $route['middleware'] ?? []; - - // 2. 【核心步骤】规范化路由中间件数组 - // 将可能嵌套的多维数组合并成一维数组 - $flattenedRouteMiddleware = $this->flattenArray($rawRouteMiddleware); - - // 从路由中间件中移除掉那些已经在全局中间件中定义过的项,避免重复执行 - $uniqueRouteMiddleware = array_values(array_diff( - $flattenedRouteMiddleware, - $this->globalMiddleware - )); - - // 3. 合并中间件(全局 + 干净的路由中间件) - // 这将得到你期望的顺序:[全局1, 全局2, 路由1, 路由2] - $allMiddleware = array_merge($this->globalMiddleware, $uniqueRouteMiddleware); - - // 4. 构建中间件链条(从后往前包装,确保执行顺序正确) - $middlewareChain = $next; - // 关键:翻转合并后的数组 - $reversedMiddleware = array_reverse($allMiddleware); - - //dump($this->container->getServiceIds()); //已经成功 - - //var_dump(class_exists(\Framework\Middleware\MiddlewareRateLimit::class)); // 应该是 true - - foreach ($reversedMiddleware as $middlewareClass) { - // 跳过可能存在的空值 - if (empty($middlewareClass)) { - continue; - } - - /** 用于测试调试 - $middleware = $this->container->get($middlewareClass); - dump("Loaded middleware: " . get_class($middleware)); - // 如果是 RateLimit,打印其 cacheDir - if ($middleware instanceof \Framework\Middleware\MiddlewareRateLimit) { - $ref = new \ReflectionClass($middleware); - $prop = $ref->getProperty('cacheDir'); - $prop->setAccessible(true); - dump("Cache dir: " . $prop->getValue($middleware)); - }*/ - - // 从容器获取中间件实例 - $middleware = $this->container->get($middlewareClass); - - // 包装中间件链条 - $middlewareChain = function ($req) use ($middleware, $middlewareChain) { - return $middleware->handle($req, $middlewareChain); - }; - } - - // 5. 执行中间件链条(最终触发控制器) - return $middlewareChain($request); - } - - /** - * 将多维数组递归“拍平”成一维数组 - * @param array $array - * @return array - */ - private function flattenArray(array $array): array - { - $result = []; - array_walk_recursive($array, function($value) use (&$result) { - $result[] = $value; - }); - return $result; - } -} diff --git a/framework/Middleware/MiddlewareInterface.php b/framework/Middleware/MiddlewareInterface.php deleted file mode 100644 index 047c7168..00000000 --- a/framework/Middleware/MiddlewareInterface.php +++ /dev/null @@ -1,20 +0,0 @@ -whitelist = $config['whitelist'] ?? []; - $this->blacklist = $config['blacklist'] ?? []; - $this->enabled = $config['enabled'] ?? true; - } - //print_r($config); - } - - public function handle(Request $request, callable $next): Response - { - if (!$this->enabled) { - return $next($request); - } - - $ip = $request->getClientIp(); - - - if ($ip === null) { - return $this->buildForbiddenResponse($request, '无法识别客户端 IP'); - } - - // 1. 检查黑名单(支持 CIDR) - if (!empty($this->blacklist) && $this->isIpInList($ip, $this->blacklist)) { - return $this->buildForbiddenResponse($request, '您的 IP 已被禁止访问'); - } - - // 2. 检查白名单(如果设置了) - if (!empty($this->whitelist) && !$this->isIpInList($ip, $this->whitelist)) { - return $this->buildForbiddenResponse($request, '仅限授权 IP 或网段访问'); - } - - return $next($request); - } - - /** - * 判断 IP 是否匹配列表中的任意 CIDR 或精确 IP - */ - private function isIpInList(string $ip, array $list): bool - { - foreach ($list as $entry) { - $entry = trim($entry); - if ($entry === '') continue; - - // 检查是否为 CIDR 格式(包含 /) - if (strpos($entry, '/') !== false) { - if ($this->cidrMatch($ip, $entry)) { - return true; - } - } else { - // 精确 IP 匹配(支持 IPv4 和 IPv6) - if (strtolower($ip) === strtolower($entry)) { - return true; - } - } - } - - return false; - } - - /** - * 判断 IP 是否在 CIDR 网段内 - */ - private function cidrMatch(string $ip, string $cidr): bool - { - if (!filter_var($ip, FILTER_VALIDATE_IP)) { - return false; - } - - [$subnet, $mask] = explode('/', $cidr, 2); - - if (!filter_var($subnet, FILTER_VALIDATE_IP)) { - return false; - } - - $mask = (int)$mask; - if ($mask < 0) return false; - - // IPv4 - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - if (!filter_var($subnet, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - return false; - } - if ($mask > 32) return false; - - $ipLong = ip2long($ip); - $subnetLong = ip2long($subnet); - if ($ipLong === false || $subnetLong === false) { - return false; - } - - $maskBits = -1 << (32 - $mask); - return ($ipLong & $maskBits) === ($subnetLong & $maskBits); - } - - // IPv6 - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { - if (!filter_var($subnet, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { - return false; - } - if ($mask > 128) return false; - - $ipBin = $this->ip2bin($ip); - $subnetBin = $this->ip2bin($subnet); - - // 比较前 $mask 位 - $bytes = intval($mask / 8); - $bits = $mask % 8; - - // 先比较完整字节 - if ($bytes > 0) { - if (substr($ipBin, 0, $bytes) !== substr($subnetBin, 0, $bytes)) { - return false; - } - } - - // 再比较剩余比特 - if ($bits > 0) { - $maskByte = 0xFF << (8 - $bits); - $ipByte = ord($ipBin[$bytes] ?? "\x00"); - $subnetByte = ord($subnetBin[$bytes] ?? "\x00"); - if (($ipByte & $maskByte) !== ($subnetByte & $maskByte)) { - return false; - } - } - - return true; - } - - return false; - } - - /** - * 将 IPv6 地址转换为 128 位二进制字符串 - */ - private function ip2bin(string $ip): string - { - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - // IPv4 映射到 IPv6 ::ffff:a.b.c.d - $ip = '::ffff:' . $ip; - } - - $expanded = inet_pton($ip); - if ($expanded === false) { - return str_repeat("\x00", 16); - } - - // 确保返回 16 字节(IPv6) - return str_pad($expanded, 16, "\x00", STR_PAD_LEFT); - } - - private function buildForbiddenResponse(Request $request, string $reason): Response - { - $message = '访问被拒绝:' . $reason; - $clientIp = $request->getClientIp() ?: '未知'; - - if ($request->isXmlHttpRequest() || - strpos($request->headers->get('Accept', ''), 'application/json') !== false) { - - return new JsonResponse([ - 'success' => false, - 'error' => 'forbidden', - 'message' => $message, - 'client_ip' => $clientIp, - ], 403); - } - - $html = << - - - - 访问被拒绝 - - - -
-

🔒 访问被拒绝

-

{$message}

-
您的 IP:{$clientIp}
-
- - -HTML; - - return new Response($html, 403, ['Content-Type' => 'text/html; charset=utf-8']); - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareMethodOverride.php b/framework/Middleware/MiddlewareMethodOverride.php deleted file mode 100644 index eeec26db..00000000 --- a/framework/Middleware/MiddlewareMethodOverride.php +++ /dev/null @@ -1,35 +0,0 @@ -isMethod('POST') && $request->request->has('_method')) { - $method = strtoupper($request->request->get('_method')); - // 允许的 HTTP 方法 - $allowedMethods = ['PUT', 'DELETE', 'PATCH']; - - if (in_array($method, $allowedMethods)) { - // 重写请求方法 - $request->setMethod($method); - // 从请求参数中移除 _method - $request->request->remove('_method'); - } - } - - $response = $next($request); - - //dump('--- 退出 MiddlewareMethodOverride (中间件) ---'); - - // 继续执行下一个中间件或控制器 - return $response; - } -} diff --git a/framework/Middleware/MiddlewareRateLimit.php b/framework/Middleware/MiddlewareRateLimit.php deleted file mode 100644 index be9e3c84..00000000 --- a/framework/Middleware/MiddlewareRateLimit.php +++ /dev/null @@ -1,86 +0,0 @@ -cacheDir = rtrim($cacheDir, '/') . '/'; - if (!is_dir($this->cacheDir)) { - mkdir($this->cacheDir, 0755, true); - } - } - - /** - * 处理请求并应用限流 - * - * @param Request $request - * @param callable $next 接收 Request 并返回 Response 的下一个处理器 - * @return Response - */ - public function handle(Request $request, callable $next): Response - { - $ip = $request->getClientIp() ?: 'unknown'; - $key = $this->cacheDir . 'rate_limit_' . md5($ip); - $now = time(); - - $data = ['count' => 1, 'time' => $now]; - - if (file_exists($key)) { - $content = @file_get_contents($key); - if ($content !== false) { - $decoded = json_decode($content, true); - if ($decoded && $decoded['time'] > $now - $this->period) { - if ($decoded['count'] >= $this->maxRequests) { - // === 限流触发 === - $retryAfter = $this->period - ($now - $decoded['time']); - return $this->buildRateLimitResponse($request, $retryAfter); - } - $data['count'] = $decoded['count'] + 1; - } - } - } - - file_put_contents($key, json_encode($data)); - return $next($request); - } - - private function buildRateLimitResponse(Request $request, int $retryAfter): Response - { - $message = "请求过于频繁,请 {$retryAfter} 秒后再试。"; - - // 判断是否为 API 请求 - if ($request->isXmlHttpRequest() || - strpos($request->headers->get('Accept', ''), 'application/json') !== false) { - - $response = new JsonResponse([ - 'success' => false, - 'error' => 'rate_limit_exceeded', - 'message' => $message, - 'retry_after' => $retryAfter, - 'limit' => $this->maxRequests, - 'period' => $this->period - ], 429); - } else { - // Web 页面 - $html = "

⚠️ {$message}

系统限制:每 {$this->period} 秒最多 {$this->maxRequests} 次请求。

"; - $response = new Response($html, 429, ['Content-Type' => 'text/html; charset=utf-8']); - } - - // 添加标准限流头 - $response->headers->set('Retry-After', $retryAfter); - $response->headers->set('X-RateLimit-Limit', $this->maxRequests); - $response->headers->set('X-RateLimit-Remaining', 0); - $response->headers->set('X-RateLimit-Reset', time() + $retryAfter); - - return $response; - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareRefererCheck.php b/framework/Middleware/MiddlewareRefererCheck.php deleted file mode 100644 index 7496d80d..00000000 --- a/framework/Middleware/MiddlewareRefererCheck.php +++ /dev/null @@ -1,82 +0,0 @@ -getMethod(), ['HEAD', 'OPTIONS', 'TRACE'])) { - return $next($request); - } - - foreach ($this->except as $pattern) { - if ($this->matchPath($request->getPathInfo(), $pattern)) { - return $next($request); - } - } - - $referer = $request->headers->get('Referer'); - - if (!$referer) { - if ($this->strict) { - throw new AccessDeniedHttpException($this->errorMessage); - } - return $next($request); // 非严格模式允许空 Referer - } - - $parsed = parse_url($referer); - if (!$parsed || !isset($parsed['host'])) { - throw new AccessDeniedHttpException($this->errorMessage); - } - - $scheme = strtolower($parsed['scheme'] ?? ''); - $host = strtolower($parsed['host']); - - if (!in_array($scheme, $this->allowedSchemes)) { - throw new AccessDeniedHttpException($this->errorMessage); - } - - if (!$this->isHostAllowed($host)) { - throw new AccessDeniedHttpException($this->errorMessage); - } - - return $next($request); - } - - private function isHostAllowed(string $host): bool - { - foreach ($this->allowedHosts as $allowed) { - if (str_starts_with($allowed, '*.')) { - $domain = substr($allowed, 2); // '*.example.com' -> 'example.com' - if (str_ends_with($host, '.' . $domain) || $host === $domain) { - return true; - } - } else { - if ($host === $allowed) { - return true; - } - } - } - return false; - } - - private function matchPath(string $path, string $pattern): bool - { - $regex = str_replace('\*', '.*', preg_quote($pattern, '#')); - return (bool) preg_match('#^' . $regex . '$#', $path); - } -} \ No newline at end of file diff --git a/framework/Middleware/MiddlewareXssFilter.php b/framework/Middleware/MiddlewareXssFilter.php deleted file mode 100644 index edb3e916..00000000 --- a/framework/Middleware/MiddlewareXssFilter.php +++ /dev/null @@ -1,99 +0,0 @@ -enabled = $enabled; - $this->allowedHtml = $allowedHtml; - - if ($enabled && !empty($allowedHtml)) { - $config = \HTMLPurifier_Config::createDefault(); - $config->set('Cache.SerializerPath', sys_get_temp_dir()); // 避免写入 vendor - $config->set('HTML.Allowed', implode(',', array_map( - fn($tag) => $tag . '[*]', // 允许所有属性,如 a[href], img[src] - $allowedHtml - ))); - // 可选:允许安全的 URL 协议 - $config->set('URI.AllowedSchemes', ['http' => true, 'https' => true, 'mailto' => true]); - $this->purifier = new \HTMLPurifier($config); - } - } - - public function handle(Request $request, callable $next): Response - { - if (!$this->enabled) { - return $next($request); - } - - // 1. 过滤 GET - if ($request->query->count() > 0) { - $filtered = $this->filterArray($request->query->all()); - $request->query = new InputBag($filtered); - } - - // 2. 过滤 POST - if ($request->request->count() > 0) { - $filtered = $this->filterArray($request->request->all()); - $request->request = new InputBag($filtered); - } - - // 3. 过滤 JSON - if ($request->headers->get('Content-Type') && - strpos($request->headers->get('Content-Type'), 'application/json') !== false) { - - $content = $request->getContent(); - if ($content !== '') { - $data = json_decode($content, true); - if (json_last_error() === JSON_ERROR_NONE && is_array($data)) { - $filtered = $this->filterArray($data); - $request->attributes->set('_filtered_json_body', $filtered); - } - } - } - - return $next($request); - } - - private function filterArray(array $data): array - { - foreach ($data as $key => $value) { - if (is_array($value)) { - $data[$key] = $this->filterArray($value); - } elseif (is_string($value)) { - $data[$key] = $this->sanitize($value); - } - } - return $data; - } - - private function sanitize(string $input): string - { - if ($this->purifier) { - // 使用 HTML Purifier 保留白名单标签 - return $this->purifier->purify($input); - } else { - // 无白名单:完全移除 HTML(最安全) - return htmlspecialchars(strip_tags($input), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); - } - } - - public static function getFilteredJsonBody(Request $request): ?array - { - return $request->attributes->get('_filtered_json_body'); - } -} \ No newline at end of file diff --git a/framework/Routing/Router.php b/framework/Routing/Router.php new file mode 100644 index 00000000..3faa116b --- /dev/null +++ b/framework/Routing/Router.php @@ -0,0 +1,64 @@ +basePath = $basePath; + $this->dispatcher = FastRoute\simpleDispatcher(function(FastRoute\RouteCollector $r) { + $routeConfig = include $this->basePath . '/config/route.php'; + foreach ($routeConfig as $method => $routes) { + foreach ($routes as $path => $handler) { + $r->addRoute($method, $path, $handler); + } + } + }); + } + + public function dispatch(Request $request) + { + $httpMethod = $request->method(); + $uri = rawurldecode($request->path()); + + $routeInfo = $this->dispatcher->dispatch($httpMethod, $uri); + + switch ($routeInfo[0]) { + case FastRoute\Dispatcher::NOT_FOUND: + return new Response('Not Found', 404); + case FastRoute\Dispatcher::METHOD_NOT_ALLOWED: + return new Response('Method Not Allowed', 405); + case FastRoute\Dispatcher::FOUND: + $handler = $routeInfo[1]; + $vars = $routeInfo[2]; + return $this->callAction($handler, $vars, $request); + default: + return new Response('Server Error', 500); + } + } + + protected function callAction($handler, $params, Request $request) + { + [$controllerName, $method] = is_array($handler) ? $handler : explode('@', $handler); + + $controllerClass = "App\\Controller\\{$controllerName}"; + if (!class_exists($controllerClass)) { + return new Response("Controller not found: {$controllerClass}", 500); + } + + $controller = new $controllerClass(); + if (!method_exists($controller, $method)) { + return new Response("Method not found: {$method}", 500); + } + + return call_user_func_array([$controller, $method], array_values($params)); + } +} \ No newline at end of file diff --git a/framework/Security/CsrfTokenManager.php b/framework/Security/CsrfTokenManager.php deleted file mode 100644 index 67b34608..00000000 --- a/framework/Security/CsrfTokenManager.php +++ /dev/null @@ -1,46 +0,0 @@ -session = $session; - $this->namespace = $namespace; - } - - public function getToken(string $tokenId = 'default'): string - { - $token = $this->session->get($this->getSessionKey($tokenId)); - if (!$token) { - $token = bin2hex(random_bytes(32)); - $this->session->set($this->getSessionKey($tokenId), $token); - } - return $token; - } - - public function isTokenValid(string $tokenId, string $token): bool - { - $expected = $this->session->get($this->getSessionKey($tokenId)); - if (!$expected) { - return false; - } - return hash_equals($expected, $token); - } - - public function removeToken(string $tokenId = 'default'): void - { - $this->session->remove($this->getSessionKey($tokenId)); - } - - private function getSessionKey(string $tokenId): string - { //echo $this->namespace . '.' . $tokenId.'----'; - return $this->namespace . '.' . $tokenId; - } -} \ No newline at end of file diff --git a/framework/Translation/TransHelper.php b/framework/Translation/TransHelper.php deleted file mode 100644 index 1808219a..00000000 --- a/framework/Translation/TransHelper.php +++ /dev/null @@ -1,67 +0,0 @@ -requestStack = $requestStack; - $this->translationDir = $translationDir; - } - - private function getTranslator(): Translator - { - if ($this->translator === null) { - $request = $this->requestStack->getCurrentRequest(); - if (!$request) { - // 安全 fallback:没有请求时用默认语言 - $locale = 'zh_CN'; - } else { - $supported = ['en', 'zh_CN', 'zh_TW', 'ja']; - $lang = $request->query->get('lang'); - if ($lang && in_array($lang, $supported)) { - $locale = $lang; - setcookie('user_locale', $locale, time() + 3600 * 24 * 30, '/', '', false, true); - } elseif (isset($_COOKIE['user_locale']) && in_array($_COOKIE['user_locale'], $supported)) { - $locale = $_COOKIE['user_locale']; - } else { - $locale = $request->getPreferredLanguage($supported) ?: 'en'; - } - } - - $this->translator = new Translator($locale); - $loader = new YamlFileLoader(); - $this->translator->addLoader('yaml', $loader); - - foreach (['en', 'zh_CN', 'zh_TW', 'ja'] as $loc) { - $file = $this->translationDir . '/messages.' . $loc . '.yaml'; - if (file_exists($file)) { - $this->translator->addResource('yaml', $file, $loc); - } - } - } - - return $this->translator; - } - - public function trans(string $id, array $parameters = []): string - { - return $this->getTranslator()->trans($id, $parameters); - } - - public function getLocale(): string - { - return $this->getTranslator()->getLocale(); - } -} \ No newline at end of file diff --git a/framework/Translation/TranslationService.php b/framework/Translation/TranslationService.php deleted file mode 100644 index 21433f9b..00000000 --- a/framework/Translation/TranslationService.php +++ /dev/null @@ -1,66 +0,0 @@ -translator = $this->buildTranslator(); - } - - private function buildTranslator(): Translator - { - $request = $this->requestStack->getCurrentRequest(); - $supported = ['en', 'zh_CN', 'zh_TW', 'ja']; - - if ($request) { - $lang = $request->get('lang'); - if ($lang && in_array($lang, $supported)) { - $locale = $lang; - setcookie('user_locale', $locale, time() + 3600 * 24 * 30, '/', '', false, true); - } elseif (isset($_COOKIE['user_locale']) && in_array($_COOKIE['user_locale'], $supported)) { - $locale = $_COOKIE['user_locale']; - } else { - $locale = $request->getPreferredLanguage($supported) ?: 'en'; - } - } else { - $locale = 'en'; - } - // 可选:将 locale 存入 request attributes,便于后续使用 - $request->attributes->set('_locale', $locale); - - $translator = new Translator($locale); - $loader = new YamlFileLoader(); - $translator->addLoader('yaml', $loader); - - foreach ($supported as $loc) { - $file = $this->translationDir . "/messages.$loc.yaml"; - if (file_exists($file)) { - $translator->addResource('yaml', $file, $loc); - } - } - - return $translator; - } - - // 实例方法 - public function trans(string $id, array $parameters = [], string $domain = 'messages', ?string $locale = null): string - { - return $this->translator->trans($id, $parameters, $domain, $locale); - } - - public function getLocale(): string - { - return $this->translator->getLocale(); - } -} \ No newline at end of file diff --git a/framework/Utils/SafeInput.php b/framework/Utils/SafeInput.php deleted file mode 100644 index e2a24a5f..00000000 --- a/framework/Utils/SafeInput.php +++ /dev/null @@ -1,57 +0,0 @@ -attributes->get('_safe_query', []); - if ($key === null) { - return $safe; - } - return $safe[$key] ?? $default; - } - - /** - * 获取过滤后的 POST 参数 - */ - public static function request(Request $request, ?string $key = null, mixed $default = null): mixed - { - $safe = $request->attributes->get('_safe_request', []); - if ($key === null) { - return $safe; - } - return $safe[$key] ?? $default; - } - - /** - * 获取过滤后的 JSON 请求体 - */ - public static function json(Request $request, ?string $key = null, mixed $default = null): mixed - { - $safe = $request->attributes->get('_safe_json', []); - if ($key === null) { - return $safe; - } - return $safe[$key] ?? $default; - } - - /** - * 获取所有安全输入(合并 query + request + json) - * 注意:仅用于简单场景,可能有键名冲突 - */ - public static function all(Request $request): array - { - return array_replace( - $request->attributes->get('_safe_json', []), - $request->attributes->get('_safe_request', []), - $request->attributes->get('_safe_query', []) - ); - } -} \ No newline at end of file diff --git a/framework/helpers.php b/framework/helpers.php deleted file mode 100644 index 0372100b..00000000 --- a/framework/helpers.php +++ /dev/null @@ -1,249 +0,0 @@ - 123]) - * @param int $status HTTP 状态码(默认 302) - * @return RedirectResponse - */ - function redirectToRoute(string $routeName, array $parameters = [], int $status = 302): RedirectResponse - { - $router = app('router'); // 路由服务名为 'router' - - // 生成路由 URL - try { - $url = $router->generate($routeName, $parameters); - } catch (\Exception $e) { - throw new \InvalidArgumentException("Route '$routeName' not found or parameters invalid."); - } - - return new RedirectResponse($url, $status); - } -} - -if (!function_exists('app')) { - /** - * 获取服务容器或解析服务,类似于下面的getService - * - * @param string|null $id 服务 ID - * @return \Symfony\Component\DependencyInjection\ContainerInterface|object - */ - function app(?string $id = null): mixed - { - if ($id === null) { - return App::getContainer(); - } - - return App::make($id); - } -} - -/* -use Framework\Core\Framework; -$container = Framework::getInstance()->getContainer(); -$logger = $container->get(\Framework\Log\LoggerService::class); -$logger->info('Using container directly'); -*/ -if (!function_exists('getService')) { - /** - * 从容器中获取服务实例 - * @param string $id 服务ID(类名或别名) - * @return object - */ - function getService(string $id): object - { - $framework = Framework::getInstance(); // 假设你有单例 - return $framework->getContainer()->get($id); - } -} - -function base_path($path = '') -{ - return dirname(__DIR__) . ($path ? '/' . $path : ''); -} - -function storage_path($path = '') -{ - return base_path('storage') . ($path ? '/' . $path : ''); -} - -function config_path($path = '') -{ - return base_path('config') . ($path ? '/' . $path : ''); -} - -function database_path($path = '') -{ - return base_path('database') . ($path ? '/' . $path : ''); -} - -function env($key, $default = null) -{ - $value = $_ENV[$key] ?? $_SERVER[$key] ?? getenv($key); - - if ($value === false) { - return value($default); - } - - switch (strtolower($value)) { - case 'true': - case '(true)': - return true; - case 'false': - case '(false)': - return false; - case 'empty': - case '(empty)': - return ''; - case 'null': - case '(null)': - return null; - } - - if (preg_match('/\A([\'"])(.*)\1\z/', $value, $matches)) { - return $matches[2]; - } - - return $value; -} - - -if (!function_exists('config')) { - function config(string $key = null, $default = null) - { - static $config = null; - if ($config === null) { - // 从容器获取(需确保容器已初始化) - $container = \Framework\Container\Container::getInstance(); - $config = $container->get('config')->loadAll() ?? []; - } - - - if ($key === null) { - return $config; - } - - // 支持点语法:database.connections.mysql - $keys = explode('.', $key); - - $value = $config; - foreach ($keys as $segment) { - if (!is_array($value) || !array_key_exists($segment, $value)) { - return $default; - } - $value = $value[$segment]; - } - - return $value; - } -} - -function generateRequestId(): string -{ - //使用 ramsey/uuid - return 'req-' . substr(Uuid::uuid4()->toString(), 0, 8); - //return 'req-' . substr(bin2hex(random_bytes(8)), 0, 8); -} - -//翻译服务 -function trans(string $key, array $parameters = []): string -{ - return app('translator')->trans($key, $parameters); -} - -// 可选:获取当前语言 -function current_locale(): string -{ - return app('translator')->getLocale(); -} - - -if (!function_exists('view')) { - function view(string $template, array $data = []): string - { - $twig = app('view'); - $template = str_ends_with($template, '.html.twig') ? $template : $template . '.html.twig'; - return $twig->render($template, $data); - } -} - -function truncate(string $id): string -{ - return false; -} - - -// 缓存助手函数 -if (!function_exists('cache_get')) { - function cache_get(string $key, $default = null) - { - $cache = get_cache_instance(); - $item = $cache->getItem($key); - return $item->isHit() ? $item->get() : $default; - } -} - -if (!function_exists('cache_set')) { - function cache_set(string $key, $value, ?int $ttl = null, array $tags = []): bool - { - $cache = get_cache_instance(); - $item = $cache->getItem($key); - - $item->set($value); - - if ($ttl) { - $item->expiresAfter($ttl); - } - - if (!empty($tags)) { - $item->tag($tags); - } - - return $cache->save($item); - } -} - -if (!function_exists('cache_invalidate_tags')) { - function cache_invalidate_tags(array $tags): bool - { - $cache = get_cache_instance(); - try { - $cache->invalidateTags($tags); - return true; - } catch (\Exception $e) { - error_log('Cache tag invalidation failed: ' . $e->getMessage()); - return false; - } - } -} - -if (!function_exists('cache_clear')) { - function cache_clear(): bool - { - $cache = get_cache_instance(); - return $cache->clear(); - } -} - -function get_cache_instance(): TagAwareAdapter -{ - static $cache = null; - if ($cache === null) { - $container = \Framework\Container\Container::getInstance(); - $cache = $container->get(\Symfony\Component\Cache\Adapter\TagAwareAdapter::class); - } - return $cache; -} \ No newline at end of file diff --git a/phpunit.php b/phpunit.php deleted file mode 100644 index 5a242ebc..00000000 --- a/phpunit.php +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env php -getExtension() !== 'php') continue; - - $relativePath = str_replace($frameworkDir . DIRECTORY_SEPARATOR, '', $file->getPathname()); - $className = str_replace(DIRECTORY_SEPARATOR, '\\', substr($relativePath, 0, -4)); // 移除 .php - - // 假设你的框架命名空间是 Framework(请根据实际情况修改!) - $fullClassName = 'Framework\\' . $className; - - // 生成测试类名 - $testClassName = $className . 'Test'; - $testFilePath = $testsDir . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $testClassName) . '.php'; - - // 创建目录 - $testFileDir = dirname($testFilePath); - if (!is_dir($testFileDir)) { - mkdir($testFileDir, 0755, true); - } - - // 如果测试文件已存在,跳过 - if (file_exists($testFilePath)) { - echo "Skip: $testFilePath (exists)\n"; - continue; - } - - // 生成测试类内容 - $namespace = 'Tests\\Unit\\' . str_replace('\\', '\\', dirname($className)); - if ($className === basename($className)) { - $namespace = 'Tests\\Unit'; - } - - $useStatement = "use {$fullClassName};"; - - $content = "assertTrue(true);\n"; - $content .= " }\n"; - $content .= "}\n"; - - file_put_contents($testFilePath, $content); - echo "Created: $testFilePath\n"; -} - -echo "✅ Test files generation completed.\n"; \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 161c8395..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ./tests/Unit - - - - - - - ./framework - - - \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index 4b3e336d..00000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - ./tests/Unit - - - - - - ./framework - - - \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index b62b5252..00000000 --- a/public/.htaccess +++ /dev/null @@ -1,9 +0,0 @@ - - Options +FollowSymlinks -Multiviews - DirectoryIndex index.php - RewriteEngine On - - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] - \ No newline at end of file diff --git a/public/.user.ini b/public/.user.ini deleted file mode 100644 index 1031c52a..00000000 --- a/public/.user.ini +++ /dev/null @@ -1 +0,0 @@ -open_basedir=/www/wwwroot/NovaPHP0.0.3/:/tmp/ \ No newline at end of file diff --git a/public/db.php b/public/db.php deleted file mode 100644 index 5068074c..00000000 --- a/public/db.php +++ /dev/null @@ -1,28 +0,0 @@ -getMessage() . "\n"; -} diff --git a/public/index.php b/public/index.php index 0cf72ea9..3c1a1d60 100644 --- a/public/index.php +++ b/public/index.php @@ -1,53 +1,10 @@ load(); // 获取路由集合 - -// --- 添加调试代码 --- -echo "
";
-echo "Loaded Route Collection:\n";
-
-foreach ($routes as $name => $route) {
-    echo "Name: $name\n";
-    echo "Path: " . $route->getPath() . "\n";
-    echo "Controller: " . $route->getDefault('_controller') . "\n";
-    echo "Methods: " . implode(', ', $route->getMethods()) . "\n";
-    echo "---\n";
-}
-echo "
"; - -foreach ($routes as $routeName => $symfonyRoute) { - // 只打印目标路由(user.show)的信息 - if ($routeName === 'user.show') { - echo "
";
-        echo "路由 {$routeName} 的配置:\n";
-        // 打印路由的 options(中间件配置在这里)
-        print_r($symfonyRoute->getOptions());
-        echo "
"; - die; // 打印后终止,方便查看 - } -} -*/ -//die("Routing debug output complete."); - -// 启动框架 -$framework = new \Framework\Core\Framework(); -$framework->run(); - +// 启动应用 +$application = new Framework\Core\Application(BASE_PATH); +$application->run(); \ No newline at end of file diff --git a/public/test.php b/public/test.php deleted file mode 100644 index 5bcf2940..00000000 --- a/public/test.php +++ /dev/null @@ -1,111 +0,0 @@ -load(); -} catch (\Dotenv\Exception\InvalidPathException $e) { - // 无.env文件时忽略(生产环境可能不使用.env) - if (APP_ENV === 'development') { - trigger_error('Warning: .env file not found in project root.', E_USER_WARNING); - } -} -*/ - -// 7. 启动框架核心 -try { - require_once __DIR__ . '/../framework/helpers.php'; - - // 实例化框架核心类 - $framework = new \Framework\Core\Framework(); - - // 启动框架(内部会处理路由分发、控制器执行等) - $framework->run(); -} catch (\Exception $e) { - // 捕获框架运行时异常 - header('HTTP/1.1 500 Internal Server Error'); - - if (APP_ENV === 'development') { - // 开发环境:显示详细异常信息 - echo '
';
-        echo 'Exception: ' . $e->getMessage() . PHP_EOL;
-        echo 'File: ' . $e->getFile() . ' (Line: ' . $e->getLine() . ')' . PHP_EOL;
-        echo 'Trace:' . PHP_EOL . $e->getTraceAsString();
-        echo '
'; - } else { - // 生产环境:显示友好提示,记录详细日志 - echo 'Sorry, something went wrong. Our team has been notified.'; - - // 记录异常到日志 - $logContent = sprintf( - "[%s] Exception: %s\nFile: %s (Line: %d)\nTrace: %s\n\n", - date('Y-m-d H:i:s'), - $e->getMessage(), - $e->getFile(), - $e->getLine(), - $e->getTraceAsString() - ); - file_put_contents(STORAGE_PATH . '/logs/framework_error_' . date('Ymd') . '.log', $logContent, FILE_APPEND); - } - exit(1); -} \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..442f79e2 --- /dev/null +++ b/readme.md @@ -0,0 +1,50 @@ +V 0.0.1 初始化版本 + +需求:搭建一个 现代、模块化、符合 PSR 标准(PSR-4 自动加载)、运行于 PHP 8+ 的轻量级 PHP 框架 + +框架设计目标 +遵循 PSR-4 自动加载规范 +使用 Composer 管理依赖和自动加载 +入口文件 public/index.php +应用目录结构清晰:App/Controller, App/Model, App/View +核心框架位于 framework/ +配置集中管理在 config/ +支持第三方组件: +路由:nikic/FastRoute +ORM:topthink/think-orm +使用工厂模式、接口抽象解耦核心组件 +支持日志、缓存、上传、数据库等配置 +MVC 架构清晰 + + +总结:特性一览 +特性 实现 +PSR-4 自动加载 Composer + 命名空间 +MVC 结构 App/Controller, Model, View +路由 FastRoute 封装 +ORM ThinkORM 集成 +依赖注入 简易 IoC 容器 +配置中心 config/*.php +日志系统 自定义 Logger +错误处理 统一异常捕获 +扩展性 工厂、接口预留 + + +V 0.0.2 需求: +路由配置繁琐 → 我们可以通过「约定优于配置」(Convention over Configuration)来实现自动路由。 +安全防护缺失 → 需要在 Request 和 Response 中加入 XSS、CSRF 等基础安全机制 + + +版本改进 + +总结:改进后特性 +功能 实现 +自动路由 基于 URL 路径自动映射控制器/方法,无需配置 +命名约定 UserController → /user, store() → POST /user +XSS 防护 Request 构造时自动 htmlspecialchars 过滤输入 +安全输出 Response 提供 json() 和默认编码头 +CSRF 防护 提供 Token 生成与验证工具类 +开发者友好 提供 raw() 获取原始数据,tokenField() 快速嵌入 + + +V0.0.3 需求:混合路由模式 + 友好 URL(.html)+ 路由缓存 + CSRF 中间件化。我们将在现有框架基础上,充分利用 FastRoute 的高级功能,实现一个现代、高性能、安全的 PHP 框架路由系统。 \ No newline at end of file diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 719d283c..00000000 --- a/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -http://localhost:8000/admin/user/edit?id=111 无法访问 404 not found - -http://localhost:8000/user/add 正常访问,映射UserController@show(5) -http://localhost:8000/user/show/5 正常访问,映射UserController@show(5) -http://localhost:8000/user/show?id=5 正常访问,映射UserController@show(5) -http://localhost:8000/ 正常访问,映射HomeController@home -http://localhost:8000/home/ 正常访问,映射HomeController@home -http://localhost:8000/home/index 正常访问,映射HomeController@home -http://localhost:8000/show/5 无法访问404 not found -http://localhost:8000/show?id=5 正常访问,映射HomeController@show(5) -http://localhost:8000/home/show?id=5 正常访问,映射HomeController@show(5) -http://localhost:8000/home/show/5 正常访问,映射HomeController@show(5) - -http://localhost:8000/user/show/1 提示错误 - - -0.0.1 基础框架搭建,完成核心路由转发 - -0.0.2 实现日志,DI注册依赖注入,完善路由 - -0.0.3 实现中间件,注册服务 - -0.0.4 实现注解路由,应用层支持多个中间件 - -0.0.5 完成ORM,整合了ThinkORM,模型完全兼容Thinkphp特性 - -0.0.6 完成: - 1.容器管理, 重写Container(容器)改用symfony的容器,兼容PSR-11 - 容器可以直接注册服务,也可以注册具体的业务操作类,增加了助手函数 - 2.完成配置管理,增加了配置服务注册(可选) - 3.完成日志注册服务; -0.0.7 完成: - 重写日志服务,对日志分类,大小,归档等; - 异常服务,处理,友好错误显示,增加request-ID便于追踪堆栈 - 修改核心文件Framework.php 增加Symfony Request 与PSR-7的兼容 - 增加了Kernel核心文件,增加app()助手函数, 获取服务容器或解析服务 -0.0.8 完成 - 引入thinkcache缓存类库,实现缓存服务 - 引入phpunit,生成测试类php phpunit.php, vendor\bin\phpunit - 增加了版本彩蛋(纯粹无聊)http://localhost:8000/version 可以访问彩蛋 - 增加了i18n多国语言环境,自动检测载入语言包,http://localhost:8000/?lang=en/zh_CN/zh_TW/ja 切换 -0.0.9 完成 - 重写中间件,添加多个全局变量Cors,RateLimiter(限流器)、CircuitBreaker(熔断器)、XSS过滤,IP Block(IP拦截)等 - 注册session服务,支持redis/file切换 -0.0.10 - 引入Twig模板引擎,完成模板引擎注册服务,扩展,演示以及模板 http://localhost:8000/blog/ http://localhost:8000/view - 重写了熔断器和csrf中间件,增加了referer来路检测中间件 - 引入symfony/cache重写缓存组件,放弃兼容psr-16,下一版本可能放弃thinkcache ,目前仍可用app('cache')->set/get - 优化路由,如不存在路由,自动跳转到404页面 - 优化错误显示的页面 - 修改核心文件Framework.php 去除PSR-7的兼容 - 修改日志类,去除PSR-7的兼容 \ No newline at end of file diff --git a/resource/translations/messages.en.yaml b/resource/translations/messages.en.yaml deleted file mode 100644 index 3ca28b6e..00000000 --- a/resource/translations/messages.en.yaml +++ /dev/null @@ -1,2 +0,0 @@ -hello: Hello -welcome: Welcome to our service \ No newline at end of file diff --git a/resource/translations/messages.ja.yaml b/resource/translations/messages.ja.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/resource/translations/messages.zh_CN.yaml b/resource/translations/messages.zh_CN.yaml deleted file mode 100644 index c5ef4abe..00000000 --- a/resource/translations/messages.zh_CN.yaml +++ /dev/null @@ -1,2 +0,0 @@ -hello: 你好,简体中文 -welcome: 欢迎使用我们的服务 \ No newline at end of file diff --git a/resource/translations/messages.zh_TW.yaml b/resource/translations/messages.zh_TW.yaml deleted file mode 100644 index 638debac..00000000 --- a/resource/translations/messages.zh_TW.yaml +++ /dev/null @@ -1,2 +0,0 @@ -hello: 伱好,繁体中文 -welcome: 繁体字 \ No newline at end of file diff --git a/resource/view/base.html.twig b/resource/view/base.html.twig deleted file mode 100644 index 7731025c..00000000 --- a/resource/view/base.html.twig +++ /dev/null @@ -1,51 +0,0 @@ -{# resources/views/base.html.twig #} - - - - - {% block title %}NovaPHP{% endblock %} - - - {# ✅ 现在 is_mobile 存在了 #} - {% if is_mobile %} - - {% else %} - - {% endif %} - - - -
- -
- - - - - - - -
- {% block content %}{% endblock %} - -
-
- - - {% block sidebar %}{% endblock %} - - - - - - - \ No newline at end of file diff --git a/resource/view/blog/_sidebar.html.twig b/resource/view/blog/_sidebar.html.twig deleted file mode 100644 index b47b022e..00000000 --- a/resource/view/blog/_sidebar.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{# 可复用的侧边栏 #} - \ No newline at end of file diff --git a/resource/view/blog/list.html.twig b/resource/view/blog/list.html.twig deleted file mode 100644 index a29b03cd..00000000 --- a/resource/view/blog/list.html.twig +++ /dev/null @@ -1,48 +0,0 @@ -{% extends 'base.html.twig' %} - - - - -{% block content %} - - -{# blog/list.html.twig #} -{% embed 'components/card.html.twig' with { - 'title': '公告', - 'createdAt': 'now' -} %} - {% block header %} -

紧急通知

- {% endblock %} - {% block body %} -

系统将于今晚 2:00 维护。

- {% endblock %} -{% endembed %} - -

{{ page_title }}

- - {% if current_user %} -

欢迎回来,{{ current_user.name }}!

- {% else %} -

登录 发表评论

- {% endif %} - - - - - {# 动态加载侧边栏,传递数据 #} - {{ include('blog/_sidebar.html.twig', { - 'popularPosts': popularPosts|default([]) - }) }} - -{% endblock %} \ No newline at end of file diff --git a/resource/view/components/card.html.twig b/resource/view/components/card.html.twig deleted file mode 100644 index 411ad6df..00000000 --- a/resource/view/components/card.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{# components/card.html.twig #} -
-
- {% block header %} -

{{ title }}

- {% endblock %} -
-
- {% block body %}{% endblock %} -
-
- {% block footer %} - 发布时间: {{ createdAt|date('m-d') }} - {% endblock %} -
-
\ No newline at end of file diff --git a/resource/view/errors/404.html.twig b/resource/view/errors/404.html.twig deleted file mode 100644 index 97b207ad..00000000 --- a/resource/view/errors/404.html.twig +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - 404 - 页面未找到 - - - - - -
- -
- 4 - 0 - 4 -
- - -
-

Not Found

-

页面不存在或没找到

-
- - - - - - - 返回首页 - -
- - - - - \ No newline at end of file diff --git a/resource/view/errors/500.html.twig b/resource/view/errors/500.html.twig deleted file mode 100644 index 929d0bcb..00000000 --- a/resource/view/errors/500.html.twig +++ /dev/null @@ -1,417 +0,0 @@ -{# templates/error_500.html.twig #} - - - - - - 500 - Internal Server Error - - - - -
- -
- -
-
-

- - 500 - Internal Server Error -

- - {{ exception.code }} - -
-

- Sorry, something went wrong on the server. -

-
- - -
- -
-

Error Message

-

- {{ exception.message }} -

-
- - -
-
-

- File -

-

- {{ exception.file }} -

-
-
-

- Line -

-

- {{ exception.line }} -

-
-
- - -
- -
-
    - {% for trace in exception.trace %} -
  1. -
    - {% if trace.class %} -
    - Class: {{ trace.class }} -
    -
    - Function: {{ trace.function }} -
    - {% else %} -
    - Function: {{ trace.function }} -
    - {% endif %} -
    - File: {{ trace.file }}:{{ trace.line }} -
    -
    -
  2. - {% endfor %} -
-
-
-
- - - -
- - - -
- - - - - \ No newline at end of file diff --git "a/resource/view/errors/500.html\357\274\210\345\211\257\346\234\254\357\274\211.twig" "b/resource/view/errors/500.html\357\274\210\345\211\257\346\234\254\357\274\211.twig" deleted file mode 100644 index 10ba3f57..00000000 --- "a/resource/view/errors/500.html\357\274\210\345\211\257\346\234\254\357\274\211.twig" +++ /dev/null @@ -1,139 +0,0 @@ -{# templates/error_500.html.twig #} - - - - - - 500 - Internal Server Error - - - - - - -
- -
- -
-
-

- - 500 - Internal Server Error -

- - {{ exception.code }} - -
-

- Sorry, something went wrong on the server. -

-
- - -
- -
-

Error Message

-

- {{ exception.message }} -

-
- - - -
-
-

- File -

-

- {{ exception.file }} -

-
-
-

- Line -

-

- {{ exception.line }} -

-
-
- - -
- - -
-
- - - -
- - -

- {{ 'now'|date('Y') }} Your Application Name. All rights reserved. -

-
- - - - - \ No newline at end of file diff --git a/resource/view/errors/csrf_error.html.twig b/resource/view/errors/csrf_error.html.twig deleted file mode 100644 index 737ce42a..00000000 --- a/resource/view/errors/csrf_error.html.twig +++ /dev/null @@ -1,70 +0,0 @@ -{# templates/errors/csrf_error.html.twig #} - - - - - - - Session Expired - Please Refresh - - - -
-

Session Expired

-
CSRF Token Validation Failed
-

- {{ message }} This usually happens if the page has been open for too long. -

-

- Please refresh the page to get a new token and try your action again. -

- - Refresh Page - -
- - \ No newline at end of file diff --git a/resource/view/home/index.html.twig b/resource/view/home/index.html.twig deleted file mode 100644 index e50fd4d0..00000000 --- a/resource/view/home/index.html.twig +++ /dev/null @@ -1,17 +0,0 @@ -{# ✅ 正确:所有内容都在 block 内 #} -{% extends 'base.html.twig' %} - -{% block title %}首页 - {{ parent() }}{% endblock %} - - - -{% block content %} -

Welcome, {{name}}!

-

这是主页内容,现在完全在 block 内部。

- Logo -{% endblock %} - -{# 可选:覆盖其他 block #} -{% block sidebar %} - -{% endblock %} \ No newline at end of file diff --git a/resource/view/home/welcome.html.twig b/resource/view/home/welcome.html.twig deleted file mode 100644 index b2118204..00000000 --- a/resource/view/home/welcome.html.twig +++ /dev/null @@ -1,16 +0,0 @@ -{# resources/views/welcome.html.twig #} - - - - - Welcome - {{ site_name }} - - -

Hello, {{ name }}!

-

当前环境:{{ app_debug ? '开发模式' : '生产模式' }}

-

这是来自 {{ site_name }}模板引擎Twig视图测试 的欢迎页。

- - - \ No newline at end of file diff --git a/resource/view/upload/index.html.twig b/resource/view/upload/index.html.twig deleted file mode 100644 index 9fa0729b..00000000 --- a/resource/view/upload/index.html.twig +++ /dev/null @@ -1,10 +0,0 @@ - - -{{ csrf_field() }} - -{# #} - -
-
- -
\ No newline at end of file diff --git a/tests/Unit/Annotations/DeleteTest.php b/tests/Unit/Annotations/DeleteTest.php deleted file mode 100644 index a6ce15ac..00000000 --- a/tests/Unit/Annotations/DeleteTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Annotations/GetTest.php b/tests/Unit/Annotations/GetTest.php deleted file mode 100644 index 92f80068..00000000 --- a/tests/Unit/Annotations/GetTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Annotations/MiddlewareTest.php b/tests/Unit/Annotations/MiddlewareTest.php deleted file mode 100644 index 61c2cd48..00000000 --- a/tests/Unit/Annotations/MiddlewareTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Annotations/PostTest.php b/tests/Unit/Annotations/PostTest.php deleted file mode 100644 index 200d4210..00000000 --- a/tests/Unit/Annotations/PostTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Annotations/PutTest.php b/tests/Unit/Annotations/PutTest.php deleted file mode 100644 index 331f0e16..00000000 --- a/tests/Unit/Annotations/PutTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Annotations/RouteTest.php b/tests/Unit/Annotations/RouteTest.php deleted file mode 100644 index f703a077..00000000 --- a/tests/Unit/Annotations/RouteTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Cache/CacheInterfaceTest.php b/tests/Unit/Cache/CacheInterfaceTest.php deleted file mode 100644 index f5c703b6..00000000 --- a/tests/Unit/Cache/CacheInterfaceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Cache/CacheServiceTest.php b/tests/Unit/Cache/CacheServiceTest.php deleted file mode 100644 index 6babfd7a..00000000 --- a/tests/Unit/Cache/CacheServiceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Cache/TaggedCacheInterfaceTest.php b/tests/Unit/Cache/TaggedCacheInterfaceTest.php deleted file mode 100644 index ab431633..00000000 --- a/tests/Unit/Cache/TaggedCacheInterfaceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Cache/TaggedCacheProxyTest.php b/tests/Unit/Cache/TaggedCacheProxyTest.php deleted file mode 100644 index 81810200..00000000 --- a/tests/Unit/Cache/TaggedCacheProxyTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Config/ConfigLoaderTest.php b/tests/Unit/Config/ConfigLoaderTest.php deleted file mode 100644 index 18e3242a..00000000 --- a/tests/Unit/Config/ConfigLoaderTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Config/ConfigServiceTest.php b/tests/Unit/Config/ConfigServiceTest.php deleted file mode 100644 index 2f55c819..00000000 --- a/tests/Unit/Config/ConfigServiceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Container/ContainerTest.php b/tests/Unit/Container/ContainerTest.php deleted file mode 100644 index f8b3052a..00000000 --- a/tests/Unit/Container/ContainerTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/AnnotationRouteLoaderTest.php b/tests/Unit/Core/AnnotationRouteLoaderTest.php deleted file mode 100644 index ee7f8672..00000000 --- a/tests/Unit/Core/AnnotationRouteLoaderTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/AppTest.php b/tests/Unit/Core/AppTest.php deleted file mode 100644 index 99f8a2da..00000000 --- a/tests/Unit/Core/AppTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/Exception/HandlerTest.php b/tests/Unit/Core/Exception/HandlerTest.php deleted file mode 100644 index 98a08308..00000000 --- a/tests/Unit/Core/Exception/HandlerTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/FrameworkTest.php b/tests/Unit/Core/FrameworkTest.php deleted file mode 100644 index f4eb5161..00000000 --- a/tests/Unit/Core/FrameworkTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/KernelTest.php b/tests/Unit/Core/KernelTest.php deleted file mode 100644 index daa384e3..00000000 --- a/tests/Unit/Core/KernelTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/MiddlewareInterfaceTest.php b/tests/Unit/Core/MiddlewareInterfaceTest.php deleted file mode 100644 index ad5f954c..00000000 --- a/tests/Unit/Core/MiddlewareInterfaceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/MiddlewarePipelineTest.php b/tests/Unit/Core/MiddlewarePipelineTest.php deleted file mode 100644 index 7d022eb1..00000000 --- a/tests/Unit/Core/MiddlewarePipelineTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Core/RouterTest.php b/tests/Unit/Core/RouterTest.php deleted file mode 100644 index 406a6ee3..00000000 --- a/tests/Unit/Core/RouterTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Log/LoggerServiceTest.php b/tests/Unit/Log/LoggerServiceTest.php deleted file mode 100644 index 6fa6099d..00000000 --- a/tests/Unit/Log/LoggerServiceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Log/LoggerTest.php b/tests/Unit/Log/LoggerTest.php deleted file mode 100644 index d5a76726..00000000 --- a/tests/Unit/Log/LoggerTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Middleware/MethodOverrideMiddlewareTest.php b/tests/Unit/Middleware/MethodOverrideMiddlewareTest.php deleted file mode 100644 index 280e1a1d..00000000 --- a/tests/Unit/Middleware/MethodOverrideMiddlewareTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Middleware/MiddlewareDispatcherTest.php b/tests/Unit/Middleware/MiddlewareDispatcherTest.php deleted file mode 100644 index c909c6ba..00000000 --- a/tests/Unit/Middleware/MiddlewareDispatcherTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/Middleware/MiddlewareInterfaceTest.php b/tests/Unit/Middleware/MiddlewareInterfaceTest.php deleted file mode 100644 index e37fbad2..00000000 --- a/tests/Unit/Middleware/MiddlewareInterfaceTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/tests/Unit/helpersTest.php b/tests/Unit/helpersTest.php deleted file mode 100644 index a77da1e4..00000000 --- a/tests/Unit/helpersTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } -} diff --git a/url.txt b/url.txt deleted file mode 100644 index 7276b7a6..00000000 --- a/url.txt +++ /dev/null @@ -1 +0,0 @@ -http://www.test.org/NovaPHP0.0.3/public/test.html \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index 44d60730..93124602 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -19,4 +19,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitab0f065e34a4b36481d66daec2e48422::getLoader(); +return ComposerAutoloaderInit9b08b741b9b29d9b8d308493e978457f::getLoader(); diff --git a/vendor/bin/patch-type-declarations b/vendor/bin/patch-type-declarations deleted file mode 100644 index 4e63fefc..00000000 --- a/vendor/bin/patch-type-declarations +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'); - } -} - -return include __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations'; diff --git a/vendor/bin/patch-type-declarations.bat b/vendor/bin/patch-type-declarations.bat deleted file mode 100644 index 2b070796..00000000 --- a/vendor/bin/patch-type-declarations.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/patch-type-declarations -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse deleted file mode 100644 index 61566e60..00000000 --- a/vendor/bin/php-parse +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'); - } -} - -return include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'; diff --git a/vendor/bin/php-parse.bat b/vendor/bin/php-parse.bat deleted file mode 100644 index 2c5096dc..00000000 --- a/vendor/bin/php-parse.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/php-parse -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit deleted file mode 100644 index b5b530a8..00000000 --- a/vendor/bin/phpunit +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = 'phpvfscomposer://'.$this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); - $data = str_replace('__FILE__', var_export($this->realpath, true), $data); - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit'); - } -} - -return include __DIR__ . '/..'.'/phpunit/phpunit/phpunit'; diff --git a/vendor/bin/phpunit.bat b/vendor/bin/phpunit.bat deleted file mode 100644 index 2a070cd4..00000000 --- a/vendor/bin/phpunit.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/phpunit -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/vendor/bin/var-dump-server b/vendor/bin/var-dump-server deleted file mode 100644 index 18db1c1e..00000000 --- a/vendor/bin/var-dump-server +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); - } -} - -return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; diff --git a/vendor/bin/var-dump-server.bat b/vendor/bin/var-dump-server.bat deleted file mode 100644 index 94333da5..00000000 --- a/vendor/bin/var-dump-server.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/var-dump-server -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/vendor/bin/yaml-lint b/vendor/bin/yaml-lint deleted file mode 100644 index 388092f5..00000000 --- a/vendor/bin/yaml-lint +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env php -realpath = realpath($opened_path) ?: $opened_path; - $opened_path = $this->realpath; - $this->handle = fopen($this->realpath, $mode); - $this->position = 0; - - return (bool) $this->handle; - } - - public function stream_read($count) - { - $data = fread($this->handle, $count); - - if ($this->position === 0) { - $data = preg_replace('{^#!.*\r?\n}', '', $data); - } - - $this->position += strlen($data); - - return $data; - } - - public function stream_cast($castAs) - { - return $this->handle; - } - - public function stream_close() - { - fclose($this->handle); - } - - public function stream_lock($operation) - { - return $operation ? flock($this->handle, $operation) : true; - } - - public function stream_seek($offset, $whence) - { - if (0 === fseek($this->handle, $offset, $whence)) { - $this->position = ftell($this->handle); - return true; - } - - return false; - } - - public function stream_tell() - { - return $this->position; - } - - public function stream_eof() - { - return feof($this->handle); - } - - public function stream_stat() - { - return array(); - } - - public function stream_set_option($option, $arg1, $arg2) - { - return true; - } - - public function url_stat($path, $flags) - { - $path = substr($path, 17); - if (file_exists($path)) { - return stat($path); - } - - return false; - } - } - } - - if ( - (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) - || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) - ) { - return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'); - } -} - -return include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'; diff --git a/vendor/bin/yaml-lint.bat b/vendor/bin/yaml-lint.bat deleted file mode 100644 index fa766374..00000000 --- a/vendor/bin/yaml-lint.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal DISABLEDELAYEDEXPANSION -SET BIN_TARGET=%~dp0/yaml-lint -SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 -php "%BIN_TARGET%" %* diff --git a/vendor/brick/math/CHANGELOG.md b/vendor/brick/math/CHANGELOG.md deleted file mode 100644 index 377cdae2..00000000 --- a/vendor/brick/math/CHANGELOG.md +++ /dev/null @@ -1,513 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -## [0.14.0](https://github.com/brick/math/releases/tag/0.14.0) - 2025-08-29 - -✨ **New features** - -- New methods: `BigInteger::clamp()` and `BigDecimal::clamp()` (#96 by @JesterIruka) - -✨ **Improvements** - -- All pure methods in `BigNumber` classes are now marked as `@pure` for better static analysis - -💥 **Breaking changes** - -- Minimum PHP version is now 8.2 -- `BigNumber` classes are now `readonly` -- `BigNumber` is now marked as sealed: it must not be extended outside of this package -- Exception classes are now `final` - -## [0.13.1](https://github.com/brick/math/releases/tag/0.13.1) - 2025-03-29 - -✨ **Improvements** - -- `__toString()` methods of `BigInteger` and `BigDecimal` are now type-hinted as returning `numeric-string` instead of `string` (#90 by @vudaltsov) - -## [0.13.0](https://github.com/brick/math/releases/tag/0.13.0) - 2025-03-03 - -💥 **Breaking changes** - -- `BigDecimal::ofUnscaledValue()` no longer throws an exception if the scale is negative -- `MathException` now extends `RuntimeException` instead of `Exception`; this reverts the change introduced in version `0.11.0` (#82) - -✨ **New features** - -- `BigDecimal::ofUnscaledValue()` allows a negative scale (and converts the values to create a zero scale number) - -## [0.12.3](https://github.com/brick/math/releases/tag/0.12.3) - 2025-02-28 - -✨ **New features** - -- `BigDecimal::getPrecision()` Returns the number of significant digits in a decimal number - -## [0.12.2](https://github.com/brick/math/releases/tag/0.12.2) - 2025-02-26 - -⚡️ **Performance improvements** - -- Division in `NativeCalculator` is now faster for small divisors, thanks to [@Izumi-kun](https://github.com/Izumi-kun) in [#87](https://github.com/brick/math/pull/87). - -👌 **Improvements** - -- Add missing `RoundingNecessaryException` to the `@throws` annotation of `BigNumber::of()` - -## [0.12.1](https://github.com/brick/math/releases/tag/0.12.1) - 2023-11-29 - -⚡️ **Performance improvements** - -- `BigNumber::of()` is now faster, thanks to [@SebastienDug](https://github.com/SebastienDug) in [#77](https://github.com/brick/math/pull/77). - -## [0.12.0](https://github.com/brick/math/releases/tag/0.12.0) - 2023-11-26 - -💥 **Breaking changes** - -- Minimum PHP version is now 8.1 -- `RoundingMode` is now an `enum`; if you're type-hinting rounding modes, you need to type-hint against `RoundingMode` instead of `int` now -- `BigNumber` classes do not implement the `Serializable` interface anymore (they use the [new custom object serialization mechanism](https://wiki.php.net/rfc/custom_object_serialization)) -- The following breaking changes only affect you if you're creating your own `BigNumber` subclasses: - - the return type of `BigNumber::of()` is now `static` - - `BigNumber` has a new abstract method `from()` - - all `public` and `protected` functions of `BigNumber` are now `final` - -## [0.11.0](https://github.com/brick/math/releases/tag/0.11.0) - 2023-01-16 - -💥 **Breaking changes** - -- Minimum PHP version is now 8.0 -- Methods accepting a union of types are now strongly typed* -- `MathException` now extends `Exception` instead of `RuntimeException` - -* You may now run into type errors if you were passing `Stringable` objects to `of()` or any of the methods -internally calling `of()`, with `strict_types` enabled. You can fix this by casting `Stringable` objects to `string` -first. - -## [0.10.2](https://github.com/brick/math/releases/tag/0.10.2) - 2022-08-11 - -👌 **Improvements** - -- `BigRational::toFloat()` now simplifies the fraction before performing division (#73) thanks to @olsavmic - -## [0.10.1](https://github.com/brick/math/releases/tag/0.10.1) - 2022-08-02 - -✨ **New features** - -- `BigInteger::gcdMultiple()` returns the GCD of multiple `BigInteger` numbers - -## [0.10.0](https://github.com/brick/math/releases/tag/0.10.0) - 2022-06-18 - -💥 **Breaking changes** - -- Minimum PHP version is now 7.4 - -## [0.9.3](https://github.com/brick/math/releases/tag/0.9.3) - 2021-08-15 - -🚀 **Compatibility with PHP 8.1** - -- Support for custom object serialization; this removes a warning on PHP 8.1 due to the `Serializable` interface being deprecated (#60) thanks @TRowbotham - -## [0.9.2](https://github.com/brick/math/releases/tag/0.9.2) - 2021-01-20 - -🐛 **Bug fix** - -- Incorrect results could be returned when using the BCMath calculator, with a default scale set with `bcscale()`, on PHP >= 7.2 (#55). - -## [0.9.1](https://github.com/brick/math/releases/tag/0.9.1) - 2020-08-19 - -✨ **New features** - -- `BigInteger::not()` returns the bitwise `NOT` value - -🐛 **Bug fixes** - -- `BigInteger::toBytes()` could return an incorrect binary representation for some numbers -- The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available - -## [0.9.0](https://github.com/brick/math/releases/tag/0.9.0) - 2020-08-18 - -👌 **Improvements** - -- `BigNumber::of()` now accepts `.123` and `123.` formats, both of which return a `BigDecimal` - -💥 **Breaking changes** - -- Deprecated method `BigInteger::powerMod()` has been removed - use `modPow()` instead -- Deprecated method `BigInteger::parse()` has been removed - use `fromBase()` instead - -## [0.8.17](https://github.com/brick/math/releases/tag/0.8.17) - 2020-08-19 - -🐛 **Bug fix** - -- `BigInteger::toBytes()` could return an incorrect binary representation for some numbers -- The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available - -## [0.8.16](https://github.com/brick/math/releases/tag/0.8.16) - 2020-08-18 - -🚑 **Critical fix** - -- This version reintroduces the deprecated `BigInteger::parse()` method, that has been removed by mistake in version `0.8.9` and should have lasted for the whole `0.8` release cycle. - -✨ **New features** - -- `BigInteger::modInverse()` calculates a modular multiplicative inverse -- `BigInteger::fromBytes()` creates a `BigInteger` from a byte string -- `BigInteger::toBytes()` converts a `BigInteger` to a byte string -- `BigInteger::randomBits()` creates a pseudo-random `BigInteger` of a given bit length -- `BigInteger::randomRange()` creates a pseudo-random `BigInteger` between two bounds - -💩 **Deprecations** - -- `BigInteger::powerMod()` is now deprecated in favour of `modPow()` - -## [0.8.15](https://github.com/brick/math/releases/tag/0.8.15) - 2020-04-15 - -🐛 **Fixes** - -- added missing `ext-json` requirement, due to `BigNumber` implementing `JsonSerializable` - -⚡️ **Optimizations** - -- additional optimization in `BigInteger::remainder()` - -## [0.8.14](https://github.com/brick/math/releases/tag/0.8.14) - 2020-02-18 - -✨ **New features** - -- `BigInteger::getLowestSetBit()` returns the index of the rightmost one bit - -## [0.8.13](https://github.com/brick/math/releases/tag/0.8.13) - 2020-02-16 - -✨ **New features** - -- `BigInteger::isEven()` tests whether the number is even -- `BigInteger::isOdd()` tests whether the number is odd -- `BigInteger::testBit()` tests if a bit is set -- `BigInteger::getBitLength()` returns the number of bits in the minimal representation of the number - -## [0.8.12](https://github.com/brick/math/releases/tag/0.8.12) - 2020-02-03 - -🛠️ **Maintenance release** - -Classes are now annotated for better static analysis with [psalm](https://psalm.dev/). - -This is a maintenance release: no bug fixes, no new features, no breaking changes. - -## [0.8.11](https://github.com/brick/math/releases/tag/0.8.11) - 2020-01-23 - -✨ **New feature** - -`BigInteger::powerMod()` performs a power-with-modulo operation. Useful for crypto. - -## [0.8.10](https://github.com/brick/math/releases/tag/0.8.10) - 2020-01-21 - -✨ **New feature** - -`BigInteger::mod()` returns the **modulo** of two numbers. The *modulo* differs from the *remainder* when the signs of the operands are different. - -## [0.8.9](https://github.com/brick/math/releases/tag/0.8.9) - 2020-01-08 - -⚡️ **Performance improvements** - -A few additional optimizations in `BigInteger` and `BigDecimal` when one of the operands can be returned as is. Thanks to @tomtomsen in #24. - -## [0.8.8](https://github.com/brick/math/releases/tag/0.8.8) - 2019-04-25 - -🐛 **Bug fixes** - -- `BigInteger::toBase()` could return an empty string for zero values (BCMath & Native calculators only, GMP calculator unaffected) - -✨ **New features** - -- `BigInteger::toArbitraryBase()` converts a number to an arbitrary base, using a custom alphabet -- `BigInteger::fromArbitraryBase()` converts a string in an arbitrary base, using a custom alphabet, back to a number - -These methods can be used as the foundation to convert strings between different bases/alphabets, using BigInteger as an intermediate representation. - -💩 **Deprecations** - -- `BigInteger::parse()` is now deprecated in favour of `fromBase()` - -`BigInteger::fromBase()` works the same way as `parse()`, with 2 minor differences: - -- the `$base` parameter is required, it does not default to `10` -- it throws a `NumberFormatException` instead of an `InvalidArgumentException` when the number is malformed - -## [0.8.7](https://github.com/brick/math/releases/tag/0.8.7) - 2019-04-20 - -**Improvements** - -- Safer conversion from `float` when using custom locales -- **Much faster** `NativeCalculator` implementation 🚀 - -You can expect **at least a 3x performance improvement** for common arithmetic operations when using the library on systems without GMP or BCMath; it gets exponentially faster on multiplications with a high number of digits. This is due to calculations now being performed on whole blocks of digits (the block size depending on the platform, 32-bit or 64-bit) instead of digit-by-digit as before. - -## [0.8.6](https://github.com/brick/math/releases/tag/0.8.6) - 2019-04-11 - -**New method** - -`BigNumber::sum()` returns the sum of one or more numbers. - -## [0.8.5](https://github.com/brick/math/releases/tag/0.8.5) - 2019-02-12 - -**Bug fix**: `of()` factory methods could fail when passing a `float` in environments using a `LC_NUMERIC` locale with a decimal separator other than `'.'` (#20). - -Thanks @manowark 👍 - -## [0.8.4](https://github.com/brick/math/releases/tag/0.8.4) - 2018-12-07 - -**New method** - -`BigDecimal::sqrt()` calculates the square root of a decimal number, to a given scale. - -## [0.8.3](https://github.com/brick/math/releases/tag/0.8.3) - 2018-12-06 - -**New method** - -`BigInteger::sqrt()` calculates the square root of a number (thanks @peter279k). - -**New exception** - -`NegativeNumberException` is thrown when calling `sqrt()` on a negative number. - -## [0.8.2](https://github.com/brick/math/releases/tag/0.8.2) - 2018-11-08 - -**Performance update** - -- Further improvement of `toInt()` performance -- `NativeCalculator` can now perform some multiplications more efficiently - -## [0.8.1](https://github.com/brick/math/releases/tag/0.8.1) - 2018-11-07 - -Performance optimization of `toInt()` methods. - -## [0.8.0](https://github.com/brick/math/releases/tag/0.8.0) - 2018-10-13 - -**Breaking changes** - -The following deprecated methods have been removed. Use the new method name instead: - -| Method removed | Replacement method | -| --- | --- | -| `BigDecimal::getIntegral()` | `BigDecimal::getIntegralPart()` | -| `BigDecimal::getFraction()` | `BigDecimal::getFractionalPart()` | - ---- - -**New features** - -`BigInteger` has been augmented with 5 new methods for bitwise operations: - -| New method | Description | -| --- | --- | -| `and()` | performs a bitwise `AND` operation on two numbers | -| `or()` | performs a bitwise `OR` operation on two numbers | -| `xor()` | performs a bitwise `XOR` operation on two numbers | -| `shiftedLeft()` | returns the number shifted left by a number of bits | -| `shiftedRight()` | returns the number shifted right by a number of bits | - -Thanks to @DASPRiD 👍 - -## [0.7.3](https://github.com/brick/math/releases/tag/0.7.3) - 2018-08-20 - -**New method:** `BigDecimal::hasNonZeroFractionalPart()` - -**Renamed/deprecated methods:** - -- `BigDecimal::getIntegral()` has been renamed to `getIntegralPart()` and is now deprecated -- `BigDecimal::getFraction()` has been renamed to `getFractionalPart()` and is now deprecated - -## [0.7.2](https://github.com/brick/math/releases/tag/0.7.2) - 2018-07-21 - -**Performance update** - -`BigInteger::parse()` and `toBase()` now use GMP's built-in base conversion features when available. - -## [0.7.1](https://github.com/brick/math/releases/tag/0.7.1) - 2018-03-01 - -This is a maintenance release, no code has been changed. - -- When installed with `--no-dev`, the autoloader does not autoload tests anymore -- Tests and other files unnecessary for production are excluded from the dist package - -This will help make installations more compact. - -## [0.7.0](https://github.com/brick/math/releases/tag/0.7.0) - 2017-10-02 - -Methods renamed: - -- `BigNumber:sign()` has been renamed to `getSign()` -- `BigDecimal::unscaledValue()` has been renamed to `getUnscaledValue()` -- `BigDecimal::scale()` has been renamed to `getScale()` -- `BigDecimal::integral()` has been renamed to `getIntegral()` -- `BigDecimal::fraction()` has been renamed to `getFraction()` -- `BigRational::numerator()` has been renamed to `getNumerator()` -- `BigRational::denominator()` has been renamed to `getDenominator()` - -Classes renamed: - -- `ArithmeticException` has been renamed to `MathException` - -## [0.6.2](https://github.com/brick/math/releases/tag/0.6.2) - 2017-10-02 - -The base class for all exceptions is now `MathException`. -`ArithmeticException` has been deprecated, and will be removed in 0.7.0. - -## [0.6.1](https://github.com/brick/math/releases/tag/0.6.1) - 2017-10-02 - -A number of methods have been renamed: - -- `BigNumber:sign()` is deprecated; use `getSign()` instead -- `BigDecimal::unscaledValue()` is deprecated; use `getUnscaledValue()` instead -- `BigDecimal::scale()` is deprecated; use `getScale()` instead -- `BigDecimal::integral()` is deprecated; use `getIntegral()` instead -- `BigDecimal::fraction()` is deprecated; use `getFraction()` instead -- `BigRational::numerator()` is deprecated; use `getNumerator()` instead -- `BigRational::denominator()` is deprecated; use `getDenominator()` instead - -The old methods will be removed in version 0.7.0. - -## [0.6.0](https://github.com/brick/math/releases/tag/0.6.0) - 2017-08-25 - -- Minimum PHP version is now [7.1](https://gophp71.org/); for PHP 5.6 and PHP 7.0 support, use version `0.5` -- Deprecated method `BigDecimal::withScale()` has been removed; use `toScale()` instead -- Method `BigNumber::toInteger()` has been renamed to `toInt()` - -## [0.5.4](https://github.com/brick/math/releases/tag/0.5.4) - 2016-10-17 - -`BigNumber` classes now implement [JsonSerializable](http://php.net/manual/en/class.jsonserializable.php). -The JSON output is always a string. - -## [0.5.3](https://github.com/brick/math/releases/tag/0.5.3) - 2016-03-31 - -This is a bugfix release. Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. - -## [0.5.2](https://github.com/brick/math/releases/tag/0.5.2) - 2015-08-06 - -The `$scale` parameter of `BigDecimal::dividedBy()` is now optional again. - -## [0.5.1](https://github.com/brick/math/releases/tag/0.5.1) - 2015-07-05 - -**New method: `BigNumber::toScale()`** - -This allows to convert any `BigNumber` to a `BigDecimal` with a given scale, using rounding if necessary. - -## [0.5.0](https://github.com/brick/math/releases/tag/0.5.0) - 2015-07-04 - -**New features** -- Common `BigNumber` interface for all classes, with the following methods: - - `sign()` and derived methods (`isZero()`, `isPositive()`, ...) - - `compareTo()` and derived methods (`isEqualTo()`, `isGreaterThan()`, ...) that work across different `BigNumber` types - - `toBigInteger()`, `toBigDecimal()`, `toBigRational`() conversion methods - - `toInteger()` and `toFloat()` conversion methods to native types -- Unified `of()` behaviour: every class now accepts any type of number, provided that it can be safely converted to the current type -- New method: `BigDecimal::exactlyDividedBy()`; this method automatically computes the scale of the result, provided that the division yields a finite number of digits -- New methods: `BigRational::quotient()` and `remainder()` -- Fine-grained exceptions: `DivisionByZeroException`, `RoundingNecessaryException`, `NumberFormatException` -- Factory methods `zero()`, `one()` and `ten()` available in all classes -- Rounding mode reintroduced in `BigInteger::dividedBy()` - -This release also comes with many performance improvements. - ---- - -**Breaking changes** -- `BigInteger`: - - `getSign()` is renamed to `sign()` - - `toString()` is renamed to `toBase()` - - `BigInteger::dividedBy()` now throws an exception by default if the remainder is not zero; use `quotient()` to get the previous behaviour -- `BigDecimal`: - - `getSign()` is renamed to `sign()` - - `getUnscaledValue()` is renamed to `unscaledValue()` - - `getScale()` is renamed to `scale()` - - `getIntegral()` is renamed to `integral()` - - `getFraction()` is renamed to `fraction()` - - `divideAndRemainder()` is renamed to `quotientAndRemainder()` - - `dividedBy()` now takes a **mandatory** `$scale` parameter **before** the rounding mode - - `toBigInteger()` does not accept a `$roundingMode` parameter anymore - - `toBigRational()` does not simplify the fraction anymore; explicitly add `->simplified()` to get the previous behaviour -- `BigRational`: - - `getSign()` is renamed to `sign()` - - `getNumerator()` is renamed to `numerator()` - - `getDenominator()` is renamed to `denominator()` - - `of()` is renamed to `nd()`, while `parse()` is renamed to `of()` -- Miscellaneous: - - `ArithmeticException` is moved to an `Exception\` sub-namespace - - `of()` factory methods now throw `NumberFormatException` instead of `InvalidArgumentException` - -## [0.4.3](https://github.com/brick/math/releases/tag/0.4.3) - 2016-03-31 - -Backport of two bug fixes from the 0.5 branch: -- `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected -- Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. - -## [0.4.2](https://github.com/brick/math/releases/tag/0.4.2) - 2015-06-16 - -New method: `BigDecimal::stripTrailingZeros()` - -## [0.4.1](https://github.com/brick/math/releases/tag/0.4.1) - 2015-06-12 - -Introducing a `BigRational` class, to perform calculations on fractions of any size. - -## [0.4.0](https://github.com/brick/math/releases/tag/0.4.0) - 2015-06-12 - -Rounding modes have been removed from `BigInteger`, and are now a concept specific to `BigDecimal`. - -`BigInteger::dividedBy()` now always returns the quotient of the division. - -## [0.3.5](https://github.com/brick/math/releases/tag/0.3.5) - 2016-03-31 - -Backport of two bug fixes from the 0.5 branch: - -- `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected -- Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. - -## [0.3.4](https://github.com/brick/math/releases/tag/0.3.4) - 2015-06-11 - -New methods: -- `BigInteger::remainder()` returns the remainder of a division only -- `BigInteger::gcd()` returns the greatest common divisor of two numbers - -## [0.3.3](https://github.com/brick/math/releases/tag/0.3.3) - 2015-06-07 - -Fix `toString()` not handling negative numbers. - -## [0.3.2](https://github.com/brick/math/releases/tag/0.3.2) - 2015-06-07 - -`BigInteger` and `BigDecimal` now have a `getSign()` method that returns: -- `-1` if the number is negative -- `0` if the number is zero -- `1` if the number is positive - -## [0.3.1](https://github.com/brick/math/releases/tag/0.3.1) - 2015-06-05 - -Minor performance improvements - -## [0.3.0](https://github.com/brick/math/releases/tag/0.3.0) - 2015-06-04 - -The `$roundingMode` and `$scale` parameters have been swapped in `BigDecimal::dividedBy()`. - -## [0.2.2](https://github.com/brick/math/releases/tag/0.2.2) - 2015-06-04 - -Stronger immutability guarantee for `BigInteger` and `BigDecimal`. - -So far, it would have been possible to break immutability of these classes by calling the `unserialize()` internal function. This release fixes that. - -## [0.2.1](https://github.com/brick/math/releases/tag/0.2.1) - 2015-06-02 - -Added `BigDecimal::divideAndRemainder()` - -## [0.2.0](https://github.com/brick/math/releases/tag/0.2.0) - 2015-05-22 - -- `min()` and `max()` do not accept an `array` anymore, but a variable number of parameters -- **minimum PHP version is now 5.6** -- continuous integration with PHP 7 - -## [0.1.1](https://github.com/brick/math/releases/tag/0.1.1) - 2014-09-01 - -- Added `BigInteger::power()` -- Added HHVM support - -## [0.1.0](https://github.com/brick/math/releases/tag/0.1.0) - 2014-08-31 - -First beta release. - diff --git a/vendor/brick/math/LICENSE b/vendor/brick/math/LICENSE deleted file mode 100644 index f9b724f0..00000000 --- a/vendor/brick/math/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-present Benjamin Morel - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/brick/math/composer.json b/vendor/brick/math/composer.json deleted file mode 100644 index ad1dfe07..00000000 --- a/vendor/brick/math/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "brick/math", - "description": "Arbitrary-precision arithmetic library", - "type": "library", - "keywords": [ - "Brick", - "Math", - "Mathematics", - "Arbitrary-precision", - "Arithmetic", - "BigInteger", - "BigDecimal", - "BigRational", - "BigNumber", - "Bignum", - "Decimal", - "Rational", - "Integer" - ], - "license": "MIT", - "require": { - "php": "^8.2" - }, - "require-dev": { - "phpunit/phpunit": "^11.5", - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "2.1.22" - }, - "autoload": { - "psr-4": { - "Brick\\Math\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Brick\\Math\\Tests\\": "tests/" - } - } -} diff --git a/vendor/brick/math/phpstan.neon b/vendor/brick/math/phpstan.neon deleted file mode 100644 index 216ba1e8..00000000 --- a/vendor/brick/math/phpstan.neon +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - level: 10 - checkUninitializedProperties: true - paths: - - src - ignoreErrors: - - '~Impure call to function array_shift\(\) in pure method~' - - '~Possibly impure call to function assert\(\) in pure method~' - - '~Possibly impure call to function hex2bin\(\) in pure method~' - - '~Possibly impure call to function preg_match\(\) in pure method~' - - '~Impure static variable in pure method Brick\\Math\\Big(Integer|Decimal|Rational)::(zero|one|ten)\(\)~' - - - message: '~Parameter #\d \$\S+ of function bc\S+ expects numeric-string, string given~' - path: src/Internal/Calculator/BcMathCalculator.php diff --git a/vendor/brick/math/src/BigDecimal.php b/vendor/brick/math/src/BigDecimal.php deleted file mode 100644 index 1a540c7d..00000000 --- a/vendor/brick/math/src/BigDecimal.php +++ /dev/null @@ -1,862 +0,0 @@ -value = $value; - $this->scale = $scale; - } - - #[Override] - protected static function from(BigNumber $number): static - { - return $number->toBigDecimal(); - } - - /** - * Creates a BigDecimal from an unscaled value and a scale. - * - * Example: `(12345, 3)` will result in the BigDecimal `12.345`. - * - * @param BigNumber|int|float|string $value The unscaled value. Must be convertible to a BigInteger. - * @param int $scale The scale of the number. If negative, the scale will be set to zero - * and the unscaled value will be adjusted accordingly. - * - * @pure - */ - public static function ofUnscaledValue(BigNumber|int|float|string $value, int $scale = 0) : BigDecimal - { - $value = (string) BigInteger::of($value); - - if ($scale < 0) { - if ($value !== '0') { - $value .= \str_repeat('0', -$scale); - } - $scale = 0; - } - - return new BigDecimal($value, $scale); - } - - /** - * Returns a BigDecimal representing zero, with a scale of zero. - * - * @pure - */ - public static function zero() : BigDecimal - { - /** @var BigDecimal|null $zero */ - static $zero; - - if ($zero === null) { - $zero = new BigDecimal('0'); - } - - return $zero; - } - - /** - * Returns a BigDecimal representing one, with a scale of zero. - * - * @pure - */ - public static function one() : BigDecimal - { - /** @var BigDecimal|null $one */ - static $one; - - if ($one === null) { - $one = new BigDecimal('1'); - } - - return $one; - } - - /** - * Returns a BigDecimal representing ten, with a scale of zero. - * - * @pure - */ - public static function ten() : BigDecimal - { - /** @var BigDecimal|null $ten */ - static $ten; - - if ($ten === null) { - $ten = new BigDecimal('10'); - } - - return $ten; - } - - /** - * Returns the sum of this number and the given one. - * - * The result has a scale of `max($this->scale, $that->scale)`. - * - * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigDecimal. - * - * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. - * - * @pure - */ - public function plus(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->value === '0' && $that->scale <= $this->scale) { - return $this; - } - - if ($this->value === '0' && $this->scale <= $that->scale) { - return $that; - } - - [$a, $b] = $this->scaleValues($this, $that); - - $value = CalculatorRegistry::get()->add($a, $b); - $scale = $this->scale > $that->scale ? $this->scale : $that->scale; - - return new BigDecimal($value, $scale); - } - - /** - * Returns the difference of this number and the given one. - * - * The result has a scale of `max($this->scale, $that->scale)`. - * - * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigDecimal. - * - * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. - * - * @pure - */ - public function minus(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->value === '0' && $that->scale <= $this->scale) { - return $this; - } - - [$a, $b] = $this->scaleValues($this, $that); - - $value = CalculatorRegistry::get()->sub($a, $b); - $scale = $this->scale > $that->scale ? $this->scale : $that->scale; - - return new BigDecimal($value, $scale); - } - - /** - * Returns the product of this number and the given one. - * - * The result has a scale of `$this->scale + $that->scale`. - * - * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigDecimal. - * - * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigDecimal. - * - * @pure - */ - public function multipliedBy(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->value === '1' && $that->scale === 0) { - return $this; - } - - if ($this->value === '1' && $this->scale === 0) { - return $that; - } - - $value = CalculatorRegistry::get()->mul($this->value, $that->value); - $scale = $this->scale + $that->scale; - - return new BigDecimal($value, $scale); - } - - /** - * Returns the result of the division of this number by the given one, at the given scale. - * - * @param BigNumber|int|float|string $that The divisor. - * @param int|null $scale The desired scale, or null to use the scale of this number. - * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY. - * - * @throws \InvalidArgumentException If the scale or rounding mode is invalid. - * @throws MathException If the number is invalid, is zero, or rounding was necessary. - * - * @pure - */ - public function dividedBy(BigNumber|int|float|string $that, ?int $scale = null, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->isZero()) { - throw DivisionByZeroException::divisionByZero(); - } - - if ($scale === null) { - $scale = $this->scale; - } elseif ($scale < 0) { - throw new \InvalidArgumentException('Scale cannot be negative.'); - } - - if ($that->value === '1' && $that->scale === 0 && $scale === $this->scale) { - return $this; - } - - $p = $this->valueWithMinScale($that->scale + $scale); - $q = $that->valueWithMinScale($this->scale - $scale); - - $result = CalculatorRegistry::get()->divRound($p, $q, $roundingMode); - - return new BigDecimal($result, $scale); - } - - /** - * Returns the exact result of the division of this number by the given one. - * - * The scale of the result is automatically calculated to fit all the fraction digits. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. - * - * @throws MathException If the divisor is not a valid number, is not convertible to a BigDecimal, is zero, - * or the result yields an infinite number of digits. - * - * @pure - */ - public function exactlyDividedBy(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->value === '0') { - throw DivisionByZeroException::divisionByZero(); - } - - [, $b] = $this->scaleValues($this, $that); - - $d = \rtrim($b, '0'); - $scale = \strlen($b) - \strlen($d); - - $calculator = CalculatorRegistry::get(); - - foreach ([5, 2] as $prime) { - for (;;) { - $lastDigit = (int) $d[-1]; - - if ($lastDigit % $prime !== 0) { - break; - } - - $d = $calculator->divQ($d, (string) $prime); - $scale++; - } - } - - return $this->dividedBy($that, $scale)->stripTrailingZeros(); - } - - /** - * Limits (clamps) this number between the given minimum and maximum values. - * - * If the number is lower than $min, returns a copy of $min. - * If the number is greater than $max, returns a copy of $max. - * Otherwise, returns this number unchanged. - * - * @param BigNumber|int|float|string $min The minimum. Must be convertible to a BigDecimal. - * @param BigNumber|int|float|string $max The maximum. Must be convertible to a BigDecimal. - * - * @throws MathException If min/max are not convertible to a BigDecimal. - */ - public function clamp(BigNumber|int|float|string $min, BigNumber|int|float|string $max) : BigDecimal - { - if ($this->isLessThan($min)) { - return BigDecimal::of($min); - } elseif ($this->isGreaterThan($max)) { - return BigDecimal::of($max); - } - return $this; - } - - /** - * Returns this number exponentiated to the given value. - * - * The result has a scale of `$this->scale * $exponent`. - * - * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. - * - * @pure - */ - public function power(int $exponent) : BigDecimal - { - if ($exponent === 0) { - return BigDecimal::one(); - } - - if ($exponent === 1) { - return $this; - } - - if ($exponent < 0 || $exponent > Calculator::MAX_POWER) { - throw new \InvalidArgumentException(\sprintf( - 'The exponent %d is not in the range 0 to %d.', - $exponent, - Calculator::MAX_POWER - )); - } - - return new BigDecimal(CalculatorRegistry::get()->pow($this->value, $exponent), $this->scale * $exponent); - } - - /** - * Returns the quotient of the division of this number by the given one. - * - * The quotient has a scale of `0`. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. - * - * @throws MathException If the divisor is not a valid decimal number, or is zero. - * - * @pure - */ - public function quotient(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->isZero()) { - throw DivisionByZeroException::divisionByZero(); - } - - $p = $this->valueWithMinScale($that->scale); - $q = $that->valueWithMinScale($this->scale); - - $quotient = CalculatorRegistry::get()->divQ($p, $q); - - return new BigDecimal($quotient, 0); - } - - /** - * Returns the remainder of the division of this number by the given one. - * - * The remainder has a scale of `max($this->scale, $that->scale)`. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. - * - * @throws MathException If the divisor is not a valid decimal number, or is zero. - * - * @pure - */ - public function remainder(BigNumber|int|float|string $that) : BigDecimal - { - $that = BigDecimal::of($that); - - if ($that->isZero()) { - throw DivisionByZeroException::divisionByZero(); - } - - $p = $this->valueWithMinScale($that->scale); - $q = $that->valueWithMinScale($this->scale); - - $remainder = CalculatorRegistry::get()->divR($p, $q); - - $scale = $this->scale > $that->scale ? $this->scale : $that->scale; - - return new BigDecimal($remainder, $scale); - } - - /** - * Returns the quotient and remainder of the division of this number by the given one. - * - * The quotient has a scale of `0`, and the remainder has a scale of `max($this->scale, $that->scale)`. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. - * - * @return array{BigDecimal, BigDecimal} An array containing the quotient and the remainder. - * - * @throws MathException If the divisor is not a valid decimal number, or is zero. - * - * @pure - */ - public function quotientAndRemainder(BigNumber|int|float|string $that) : array - { - $that = BigDecimal::of($that); - - if ($that->isZero()) { - throw DivisionByZeroException::divisionByZero(); - } - - $p = $this->valueWithMinScale($that->scale); - $q = $that->valueWithMinScale($this->scale); - - [$quotient, $remainder] = CalculatorRegistry::get()->divQR($p, $q); - - $scale = $this->scale > $that->scale ? $this->scale : $that->scale; - - $quotient = new BigDecimal($quotient, 0); - $remainder = new BigDecimal($remainder, $scale); - - return [$quotient, $remainder]; - } - - /** - * Returns the square root of this number, rounded down to the given number of decimals. - * - * @throws \InvalidArgumentException If the scale is negative. - * @throws NegativeNumberException If this number is negative. - * - * @pure - */ - public function sqrt(int $scale) : BigDecimal - { - if ($scale < 0) { - throw new \InvalidArgumentException('Scale cannot be negative.'); - } - - if ($this->value === '0') { - return new BigDecimal('0', $scale); - } - - if ($this->value[0] === '-') { - throw new NegativeNumberException('Cannot calculate the square root of a negative number.'); - } - - $value = $this->value; - $addDigits = 2 * $scale - $this->scale; - - if ($addDigits > 0) { - // add zeros - $value .= \str_repeat('0', $addDigits); - } elseif ($addDigits < 0) { - // trim digits - if (-$addDigits >= \strlen($this->value)) { - // requesting a scale too low, will always yield a zero result - return new BigDecimal('0', $scale); - } - - $value = \substr($value, 0, $addDigits); - } - - $value = CalculatorRegistry::get()->sqrt($value); - - return new BigDecimal($value, $scale); - } - - /** - * Returns a copy of this BigDecimal with the decimal point moved $n places to the left. - * - * @pure - */ - public function withPointMovedLeft(int $n) : BigDecimal - { - if ($n === 0) { - return $this; - } - - if ($n < 0) { - return $this->withPointMovedRight(-$n); - } - - return new BigDecimal($this->value, $this->scale + $n); - } - - /** - * Returns a copy of this BigDecimal with the decimal point moved $n places to the right. - * - * @pure - */ - public function withPointMovedRight(int $n) : BigDecimal - { - if ($n === 0) { - return $this; - } - - if ($n < 0) { - return $this->withPointMovedLeft(-$n); - } - - $value = $this->value; - $scale = $this->scale - $n; - - if ($scale < 0) { - if ($value !== '0') { - $value .= \str_repeat('0', -$scale); - } - $scale = 0; - } - - return new BigDecimal($value, $scale); - } - - /** - * Returns a copy of this BigDecimal with any trailing zeros removed from the fractional part. - * - * @pure - */ - public function stripTrailingZeros() : BigDecimal - { - if ($this->scale === 0) { - return $this; - } - - $trimmedValue = \rtrim($this->value, '0'); - - if ($trimmedValue === '') { - return BigDecimal::zero(); - } - - $trimmableZeros = \strlen($this->value) - \strlen($trimmedValue); - - if ($trimmableZeros === 0) { - return $this; - } - - if ($trimmableZeros > $this->scale) { - $trimmableZeros = $this->scale; - } - - $value = \substr($this->value, 0, -$trimmableZeros); - $scale = $this->scale - $trimmableZeros; - - return new BigDecimal($value, $scale); - } - - /** - * Returns the absolute value of this number. - * - * @pure - */ - public function abs() : BigDecimal - { - return $this->isNegative() ? $this->negated() : $this; - } - - /** - * Returns the negated value of this number. - * - * @pure - */ - public function negated() : BigDecimal - { - return new BigDecimal(CalculatorRegistry::get()->neg($this->value), $this->scale); - } - - #[Override] - public function compareTo(BigNumber|int|float|string $that) : int - { - $that = BigNumber::of($that); - - if ($that instanceof BigInteger) { - $that = $that->toBigDecimal(); - } - - if ($that instanceof BigDecimal) { - [$a, $b] = $this->scaleValues($this, $that); - - return CalculatorRegistry::get()->cmp($a, $b); - } - - return - $that->compareTo($this); - } - - #[Override] - public function getSign() : int - { - return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1); - } - - /** - * @pure - */ - public function getUnscaledValue() : BigInteger - { - return self::newBigInteger($this->value); - } - - /** - * @pure - */ - public function getScale() : int - { - return $this->scale; - } - - /** - * Returns the number of significant digits in the number. - * - * This is the number of digits to both sides of the decimal point, stripped of leading zeros. - * The sign has no impact on the result. - * - * Examples: - * 0 => 0 - * 0.0 => 0 - * 123 => 3 - * 123.456 => 6 - * 0.00123 => 3 - * 0.0012300 => 5 - * - * @pure - */ - public function getPrecision(): int - { - $value = $this->value; - - if ($value === '0') { - return 0; - } - - $length = \strlen($value); - - return ($value[0] === '-') ? $length - 1 : $length; - } - - /** - * Returns a string representing the integral part of this decimal number. - * - * Example: `-123.456` => `-123`. - * - * @pure - */ - public function getIntegralPart() : string - { - if ($this->scale === 0) { - return $this->value; - } - - $value = $this->getUnscaledValueWithLeadingZeros(); - - return \substr($value, 0, -$this->scale); - } - - /** - * Returns a string representing the fractional part of this decimal number. - * - * If the scale is zero, an empty string is returned. - * - * Examples: `-123.456` => '456', `123` => ''. - * - * @pure - */ - public function getFractionalPart() : string - { - if ($this->scale === 0) { - return ''; - } - - $value = $this->getUnscaledValueWithLeadingZeros(); - - return \substr($value, -$this->scale); - } - - /** - * Returns whether this decimal number has a non-zero fractional part. - * - * @pure - */ - public function hasNonZeroFractionalPart() : bool - { - return $this->getFractionalPart() !== \str_repeat('0', $this->scale); - } - - #[Override] - public function toBigInteger() : BigInteger - { - $zeroScaleDecimal = $this->scale === 0 ? $this : $this->dividedBy(1, 0); - - return self::newBigInteger($zeroScaleDecimal->value); - } - - #[Override] - public function toBigDecimal() : BigDecimal - { - return $this; - } - - #[Override] - public function toBigRational() : BigRational - { - $numerator = self::newBigInteger($this->value); - $denominator = self::newBigInteger('1' . \str_repeat('0', $this->scale)); - - return self::newBigRational($numerator, $denominator, false); - } - - #[Override] - public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal - { - if ($scale === $this->scale) { - return $this; - } - - return $this->dividedBy(BigDecimal::one(), $scale, $roundingMode); - } - - #[Override] - public function toInt() : int - { - return $this->toBigInteger()->toInt(); - } - - #[Override] - public function toFloat() : float - { - return (float) (string) $this; - } - - /** - * @return numeric-string - */ - #[Override] - public function __toString() : string - { - if ($this->scale === 0) { - /** @var numeric-string */ - return $this->value; - } - - $value = $this->getUnscaledValueWithLeadingZeros(); - - /** @phpstan-ignore return.type */ - return \substr($value, 0, -$this->scale) . '.' . \substr($value, -$this->scale); - } - - /** - * This method is required for serializing the object and SHOULD NOT be accessed directly. - * - * @internal - * - * @return array{value: string, scale: int} - */ - public function __serialize(): array - { - return ['value' => $this->value, 'scale' => $this->scale]; - } - - /** - * This method is only here to allow unserializing the object and cannot be accessed directly. - * - * @internal - * - * @param array{value: string, scale: int} $data - * - * @throws \LogicException - */ - public function __unserialize(array $data): void - { - /** @phpstan-ignore isset.initializedProperty */ - if (isset($this->value)) { - throw new \LogicException('__unserialize() is an internal function, it must not be called directly.'); - } - - /** @phpstan-ignore deadCode.unreachable */ - $this->value = $data['value']; - $this->scale = $data['scale']; - } - - /** - * Puts the internal values of the given decimal numbers on the same scale. - * - * @return array{string, string} The scaled integer values of $x and $y. - * - * @pure - */ - private function scaleValues(BigDecimal $x, BigDecimal $y) : array - { - $a = $x->value; - $b = $y->value; - - if ($b !== '0' && $x->scale > $y->scale) { - $b .= \str_repeat('0', $x->scale - $y->scale); - } elseif ($a !== '0' && $x->scale < $y->scale) { - $a .= \str_repeat('0', $y->scale - $x->scale); - } - - return [$a, $b]; - } - - /** - * @pure - */ - private function valueWithMinScale(int $scale) : string - { - $value = $this->value; - - if ($this->value !== '0' && $scale > $this->scale) { - $value .= \str_repeat('0', $scale - $this->scale); - } - - return $value; - } - - /** - * Adds leading zeros if necessary to the unscaled value to represent the full decimal number. - * - * @pure - */ - private function getUnscaledValueWithLeadingZeros() : string - { - $value = $this->value; - $targetLength = $this->scale + 1; - $negative = ($value[0] === '-'); - $length = \strlen($value); - - if ($negative) { - $length--; - } - - if ($length >= $targetLength) { - return $this->value; - } - - if ($negative) { - $value = \substr($value, 1); - } - - $value = \str_pad($value, $targetLength, '0', STR_PAD_LEFT); - - if ($negative) { - $value = '-' . $value; - } - - return $value; - } -} diff --git a/vendor/brick/math/src/BigInteger.php b/vendor/brick/math/src/BigInteger.php deleted file mode 100644 index 48a7bb3c..00000000 --- a/vendor/brick/math/src/BigInteger.php +++ /dev/null @@ -1,1139 +0,0 @@ -value = $value; - } - - #[Override] - protected static function from(BigNumber $number): static - { - return $number->toBigInteger(); - } - - /** - * Creates a number from a string in a given base. - * - * The string can optionally be prefixed with the `+` or `-` sign. - * - * Bases greater than 36 are not supported by this method, as there is no clear consensus on which of the lowercase - * or uppercase characters should come first. Instead, this method accepts any base up to 36, and does not - * differentiate lowercase and uppercase characters, which are considered equal. - * - * For bases greater than 36, and/or custom alphabets, use the fromArbitraryBase() method. - * - * @param string $number The number to convert, in the given base. - * @param int $base The base of the number, between 2 and 36. - * - * @throws NumberFormatException If the number is empty, or contains invalid chars for the given base. - * @throws \InvalidArgumentException If the base is out of range. - * - * @pure - */ - public static function fromBase(string $number, int $base) : BigInteger - { - if ($number === '') { - throw new NumberFormatException('The number cannot be empty.'); - } - - if ($base < 2 || $base > 36) { - throw new \InvalidArgumentException(\sprintf('Base %d is not in range 2 to 36.', $base)); - } - - if ($number[0] === '-') { - $sign = '-'; - $number = \substr($number, 1); - } elseif ($number[0] === '+') { - $sign = ''; - $number = \substr($number, 1); - } else { - $sign = ''; - } - - if ($number === '') { - throw new NumberFormatException('The number cannot be empty.'); - } - - $number = \ltrim($number, '0'); - - if ($number === '') { - // The result will be the same in any base, avoid further calculation. - return BigInteger::zero(); - } - - if ($number === '1') { - // The result will be the same in any base, avoid further calculation. - return new BigInteger($sign . '1'); - } - - $pattern = '/[^' . \substr(Calculator::ALPHABET, 0, $base) . ']/'; - - if (\preg_match($pattern, \strtolower($number), $matches) === 1) { - throw new NumberFormatException(\sprintf('"%s" is not a valid character in base %d.', $matches[0], $base)); - } - - if ($base === 10) { - // The number is usable as is, avoid further calculation. - return new BigInteger($sign . $number); - } - - $result = CalculatorRegistry::get()->fromBase($number, $base); - - return new BigInteger($sign . $result); - } - - /** - * Parses a string containing an integer in an arbitrary base, using a custom alphabet. - * - * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers. - * - * @param string $number The number to parse. - * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. - * - * @throws NumberFormatException If the given number is empty or contains invalid chars for the given alphabet. - * @throws \InvalidArgumentException If the alphabet does not contain at least 2 chars. - * - * @pure - */ - public static function fromArbitraryBase(string $number, string $alphabet) : BigInteger - { - if ($number === '') { - throw new NumberFormatException('The number cannot be empty.'); - } - - $base = \strlen($alphabet); - - if ($base < 2) { - throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.'); - } - - $pattern = '/[^' . \preg_quote($alphabet, '/') . ']/'; - - if (\preg_match($pattern, $number, $matches) === 1) { - throw NumberFormatException::charNotInAlphabet($matches[0]); - } - - $number = CalculatorRegistry::get()->fromArbitraryBase($number, $alphabet, $base); - - return new BigInteger($number); - } - - /** - * Translates a string of bytes containing the binary representation of a BigInteger into a BigInteger. - * - * The input string is assumed to be in big-endian byte-order: the most significant byte is in the zeroth element. - * - * If `$signed` is true, the input is assumed to be in two's-complement representation, and the leading bit is - * interpreted as a sign bit. If `$signed` is false, the input is interpreted as an unsigned number, and the - * resulting BigInteger will always be positive or zero. - * - * This method can be used to retrieve a number exported by `toBytes()`, as long as the `$signed` flags match. - * - * @param string $value The byte string. - * @param bool $signed Whether to interpret as a signed number in two's-complement representation with a leading - * sign bit. - * - * @throws NumberFormatException If the string is empty. - * - * @pure - */ - public static function fromBytes(string $value, bool $signed = true) : BigInteger - { - if ($value === '') { - throw new NumberFormatException('The byte string must not be empty.'); - } - - $twosComplement = false; - - if ($signed) { - $x = \ord($value[0]); - - if (($twosComplement = ($x >= 0x80))) { - $value = ~$value; - } - } - - $number = self::fromBase(\bin2hex($value), 16); - - if ($twosComplement) { - return $number->plus(1)->negated(); - } - - return $number; - } - - /** - * Generates a pseudo-random number in the range 0 to 2^numBits - 1. - * - * Using the default random bytes generator, this method is suitable for cryptographic use. - * - * @param int $numBits The number of bits. - * @param (callable(int): string)|null $randomBytesGenerator A function that accepts a number of bytes, and returns - * a string of random bytes of the given length. Defaults - * to the `random_bytes()` function. - * - * @throws \InvalidArgumentException If $numBits is negative. - */ - public static function randomBits(int $numBits, ?callable $randomBytesGenerator = null) : BigInteger - { - if ($numBits < 0) { - throw new \InvalidArgumentException('The number of bits cannot be negative.'); - } - - if ($numBits === 0) { - return BigInteger::zero(); - } - - if ($randomBytesGenerator === null) { - $randomBytesGenerator = random_bytes(...); - } - - /** @var int<1, max> $byteLength */ - $byteLength = \intdiv($numBits - 1, 8) + 1; - - $extraBits = ($byteLength * 8 - $numBits); - $bitmask = \chr(0xFF >> $extraBits); - - $randomBytes = $randomBytesGenerator($byteLength); - $randomBytes[0] = $randomBytes[0] & $bitmask; - - return self::fromBytes($randomBytes, false); - } - - /** - * Generates a pseudo-random number between `$min` and `$max`. - * - * Using the default random bytes generator, this method is suitable for cryptographic use. - * - * @param BigNumber|int|float|string $min The lower bound. Must be convertible to a BigInteger. - * @param BigNumber|int|float|string $max The upper bound. Must be convertible to a BigInteger. - * @param (callable(int): string)|null $randomBytesGenerator A function that accepts a number of bytes, and returns - * a string of random bytes of the given length. Defaults - * to the `random_bytes()` function. - * - * @throws MathException If one of the parameters cannot be converted to a BigInteger, - * or `$min` is greater than `$max`. - */ - public static function randomRange( - BigNumber|int|float|string $min, - BigNumber|int|float|string $max, - ?callable $randomBytesGenerator = null - ) : BigInteger { - $min = BigInteger::of($min); - $max = BigInteger::of($max); - - if ($min->isGreaterThan($max)) { - throw new MathException('$min cannot be greater than $max.'); - } - - if ($min->isEqualTo($max)) { - return $min; - } - - $diff = $max->minus($min); - $bitLength = $diff->getBitLength(); - - // try until the number is in range (50% to 100% chance of success) - do { - $randomNumber = self::randomBits($bitLength, $randomBytesGenerator); - } while ($randomNumber->isGreaterThan($diff)); - - return $randomNumber->plus($min); - } - - /** - * Returns a BigInteger representing zero. - * - * @pure - */ - public static function zero() : BigInteger - { - /** @var BigInteger|null $zero */ - static $zero; - - if ($zero === null) { - $zero = new BigInteger('0'); - } - - return $zero; - } - - /** - * Returns a BigInteger representing one. - * - * @pure - */ - public static function one() : BigInteger - { - /** @var BigInteger|null $one */ - static $one; - - if ($one === null) { - $one = new BigInteger('1'); - } - - return $one; - } - - /** - * Returns a BigInteger representing ten. - * - * @pure - */ - public static function ten() : BigInteger - { - /** @var BigInteger|null $ten */ - static $ten; - - if ($ten === null) { - $ten = new BigInteger('10'); - } - - return $ten; - } - - /** - * @pure - */ - public static function gcdMultiple(BigInteger $a, BigInteger ...$n): BigInteger - { - $result = $a; - - foreach ($n as $next) { - $result = $result->gcd($next); - - if ($result->isEqualTo(1)) { - return $result; - } - } - - return $result; - } - - /** - * Returns the sum of this number and the given one. - * - * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigInteger. - * - * @throws MathException If the number is not valid, or is not convertible to a BigInteger. - * - * @pure - */ - public function plus(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '0') { - return $this; - } - - if ($this->value === '0') { - return $that; - } - - $value = CalculatorRegistry::get()->add($this->value, $that->value); - - return new BigInteger($value); - } - - /** - * Returns the difference of this number and the given one. - * - * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigInteger. - * - * @throws MathException If the number is not valid, or is not convertible to a BigInteger. - * - * @pure - */ - public function minus(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '0') { - return $this; - } - - $value = CalculatorRegistry::get()->sub($this->value, $that->value); - - return new BigInteger($value); - } - - /** - * Returns the product of this number and the given one. - * - * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigInteger. - * - * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigInteger. - * - * @pure - */ - public function multipliedBy(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '1') { - return $this; - } - - if ($this->value === '1') { - return $that; - } - - $value = CalculatorRegistry::get()->mul($this->value, $that->value); - - return new BigInteger($value); - } - - /** - * Returns the result of the division of this number by the given one. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. - * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY. - * - * @throws MathException If the divisor is not a valid number, is not convertible to a BigInteger, is zero, - * or RoundingMode::UNNECESSARY is used and the remainder is not zero. - * - * @pure - */ - public function dividedBy(BigNumber|int|float|string $that, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '1') { - return $this; - } - - if ($that->value === '0') { - throw DivisionByZeroException::divisionByZero(); - } - - $result = CalculatorRegistry::get()->divRound($this->value, $that->value, $roundingMode); - - return new BigInteger($result); - } - - /** - * Limits (clamps) this number between the given minimum and maximum values. - * - * If the number is lower than $min, returns a copy of $min. - * If the number is greater than $max, returns a copy of $max. - * Otherwise, returns this number unchanged. - * - * @param BigNumber|int|float|string $min The minimum. Must be convertible to a BigInteger. - * @param BigNumber|int|float|string $max The maximum. Must be convertible to a BigInteger. - * - * @throws MathException If min/max are not convertible to a BigInteger. - */ - public function clamp(BigNumber|int|float|string $min, BigNumber|int|float|string $max) : BigInteger - { - if ($this->isLessThan($min)) { - return BigInteger::of($min); - } elseif ($this->isGreaterThan($max)) { - return BigInteger::of($max); - } - return $this; - } - - - /** - * Returns this number exponentiated to the given value. - * - * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. - * - * @pure - */ - public function power(int $exponent) : BigInteger - { - if ($exponent === 0) { - return BigInteger::one(); - } - - if ($exponent === 1) { - return $this; - } - - if ($exponent < 0 || $exponent > Calculator::MAX_POWER) { - throw new \InvalidArgumentException(\sprintf( - 'The exponent %d is not in the range 0 to %d.', - $exponent, - Calculator::MAX_POWER - )); - } - - return new BigInteger(CalculatorRegistry::get()->pow($this->value, $exponent)); - } - - /** - * Returns the quotient of the division of this number by the given one. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. - * - * @throws DivisionByZeroException If the divisor is zero. - * - * @pure - */ - public function quotient(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '1') { - return $this; - } - - if ($that->value === '0') { - throw DivisionByZeroException::divisionByZero(); - } - - $quotient = CalculatorRegistry::get()->divQ($this->value, $that->value); - - return new BigInteger($quotient); - } - - /** - * Returns the remainder of the division of this number by the given one. - * - * The remainder, when non-zero, has the same sign as the dividend. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. - * - * @throws DivisionByZeroException If the divisor is zero. - * - * @pure - */ - public function remainder(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '1') { - return BigInteger::zero(); - } - - if ($that->value === '0') { - throw DivisionByZeroException::divisionByZero(); - } - - $remainder = CalculatorRegistry::get()->divR($this->value, $that->value); - - return new BigInteger($remainder); - } - - /** - * Returns the quotient and remainder of the division of this number by the given one. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. - * - * @return array{BigInteger, BigInteger} An array containing the quotient and the remainder. - * - * @throws DivisionByZeroException If the divisor is zero. - * - * @pure - */ - public function quotientAndRemainder(BigNumber|int|float|string $that) : array - { - $that = BigInteger::of($that); - - if ($that->value === '0') { - throw DivisionByZeroException::divisionByZero(); - } - - [$quotient, $remainder] = CalculatorRegistry::get()->divQR($this->value, $that->value); - - return [ - new BigInteger($quotient), - new BigInteger($remainder) - ]; - } - - /** - * Returns the modulo of this number and the given one. - * - * The modulo operation yields the same result as the remainder operation when both operands are of the same sign, - * and may differ when signs are different. - * - * The result of the modulo operation, when non-zero, has the same sign as the divisor. - * - * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. - * - * @throws DivisionByZeroException If the divisor is zero. - * - * @pure - */ - public function mod(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '0') { - throw DivisionByZeroException::modulusMustNotBeZero(); - } - - $value = CalculatorRegistry::get()->mod($this->value, $that->value); - - return new BigInteger($value); - } - - /** - * Returns the modular multiplicative inverse of this BigInteger modulo $m. - * - * @throws DivisionByZeroException If $m is zero. - * @throws NegativeNumberException If $m is negative. - * @throws MathException If this BigInteger has no multiplicative inverse mod m (that is, this BigInteger - * is not relatively prime to m). - * - * @pure - */ - public function modInverse(BigInteger $m) : BigInteger - { - if ($m->value === '0') { - throw DivisionByZeroException::modulusMustNotBeZero(); - } - - if ($m->isNegative()) { - throw new NegativeNumberException('Modulus must not be negative.'); - } - - if ($m->value === '1') { - return BigInteger::zero(); - } - - $value = CalculatorRegistry::get()->modInverse($this->value, $m->value); - - if ($value === null) { - throw new MathException('Unable to compute the modInverse for the given modulus.'); - } - - return new BigInteger($value); - } - - /** - * Returns this number raised into power with modulo. - * - * This operation only works on positive numbers. - * - * @param BigNumber|int|float|string $exp The exponent. Must be positive or zero. - * @param BigNumber|int|float|string $mod The modulus. Must be strictly positive. - * - * @throws NegativeNumberException If any of the operands is negative. - * @throws DivisionByZeroException If the modulus is zero. - * - * @pure - */ - public function modPow(BigNumber|int|float|string $exp, BigNumber|int|float|string $mod) : BigInteger - { - $exp = BigInteger::of($exp); - $mod = BigInteger::of($mod); - - if ($this->isNegative() || $exp->isNegative() || $mod->isNegative()) { - throw new NegativeNumberException('The operands cannot be negative.'); - } - - if ($mod->isZero()) { - throw DivisionByZeroException::modulusMustNotBeZero(); - } - - $result = CalculatorRegistry::get()->modPow($this->value, $exp->value, $mod->value); - - return new BigInteger($result); - } - - /** - * Returns the greatest common divisor of this number and the given one. - * - * The GCD is always positive, unless both operands are zero, in which case it is zero. - * - * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @pure - */ - public function gcd(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - if ($that->value === '0' && $this->value[0] !== '-') { - return $this; - } - - if ($this->value === '0' && $that->value[0] !== '-') { - return $that; - } - - $value = CalculatorRegistry::get()->gcd($this->value, $that->value); - - return new BigInteger($value); - } - - /** - * Returns the integer square root number of this number, rounded down. - * - * The result is the largest x such that x² ≤ n. - * - * @throws NegativeNumberException If this number is negative. - * - * @pure - */ - public function sqrt() : BigInteger - { - if ($this->value[0] === '-') { - throw new NegativeNumberException('Cannot calculate the square root of a negative number.'); - } - - $value = CalculatorRegistry::get()->sqrt($this->value); - - return new BigInteger($value); - } - - /** - * Returns the absolute value of this number. - * - * @pure - */ - public function abs() : BigInteger - { - return $this->isNegative() ? $this->negated() : $this; - } - - /** - * Returns the inverse of this number. - * - * @pure - */ - public function negated() : BigInteger - { - return new BigInteger(CalculatorRegistry::get()->neg($this->value)); - } - - /** - * Returns the integer bitwise-and combined with another integer. - * - * This method returns a negative BigInteger if and only if both operands are negative. - * - * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @pure - */ - public function and(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - return new BigInteger(CalculatorRegistry::get()->and($this->value, $that->value)); - } - - /** - * Returns the integer bitwise-or combined with another integer. - * - * This method returns a negative BigInteger if and only if either of the operands is negative. - * - * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @pure - */ - public function or(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - return new BigInteger(CalculatorRegistry::get()->or($this->value, $that->value)); - } - - /** - * Returns the integer bitwise-xor combined with another integer. - * - * This method returns a negative BigInteger if and only if exactly one of the operands is negative. - * - * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @pure - */ - public function xor(BigNumber|int|float|string $that) : BigInteger - { - $that = BigInteger::of($that); - - return new BigInteger(CalculatorRegistry::get()->xor($this->value, $that->value)); - } - - /** - * Returns the bitwise-not of this BigInteger. - * - * @pure - */ - public function not() : BigInteger - { - return $this->negated()->minus(1); - } - - /** - * Returns the integer left shifted by a given number of bits. - * - * @pure - */ - public function shiftedLeft(int $distance) : BigInteger - { - if ($distance === 0) { - return $this; - } - - if ($distance < 0) { - return $this->shiftedRight(- $distance); - } - - return $this->multipliedBy(BigInteger::of(2)->power($distance)); - } - - /** - * Returns the integer right shifted by a given number of bits. - * - * @pure - */ - public function shiftedRight(int $distance) : BigInteger - { - if ($distance === 0) { - return $this; - } - - if ($distance < 0) { - return $this->shiftedLeft(- $distance); - } - - $operand = BigInteger::of(2)->power($distance); - - if ($this->isPositiveOrZero()) { - return $this->quotient($operand); - } - - return $this->dividedBy($operand, RoundingMode::UP); - } - - /** - * Returns the number of bits in the minimal two's-complement representation of this BigInteger, excluding a sign bit. - * - * For positive BigIntegers, this is equivalent to the number of bits in the ordinary binary representation. - * Computes (ceil(log2(this < 0 ? -this : this+1))). - * - * @pure - */ - public function getBitLength() : int - { - if ($this->value === '0') { - return 0; - } - - if ($this->isNegative()) { - return $this->abs()->minus(1)->getBitLength(); - } - - return \strlen($this->toBase(2)); - } - - /** - * Returns the index of the rightmost (lowest-order) one bit in this BigInteger. - * - * Returns -1 if this BigInteger contains no one bits. - * - * @pure - */ - public function getLowestSetBit() : int - { - $n = $this; - $bitLength = $this->getBitLength(); - - for ($i = 0; $i <= $bitLength; $i++) { - if ($n->isOdd()) { - return $i; - } - - $n = $n->shiftedRight(1); - } - - return -1; - } - - /** - * Returns whether this number is even. - * - * @pure - */ - public function isEven() : bool - { - return \in_array($this->value[-1], ['0', '2', '4', '6', '8'], true); - } - - /** - * Returns whether this number is odd. - * - * @pure - */ - public function isOdd() : bool - { - return \in_array($this->value[-1], ['1', '3', '5', '7', '9'], true); - } - - /** - * Returns true if and only if the designated bit is set. - * - * Computes ((this & (1<shiftedRight($n)->isOdd(); - } - - #[Override] - public function compareTo(BigNumber|int|float|string $that) : int - { - $that = BigNumber::of($that); - - if ($that instanceof BigInteger) { - return CalculatorRegistry::get()->cmp($this->value, $that->value); - } - - return - $that->compareTo($this); - } - - #[Override] - public function getSign() : int - { - return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1); - } - - #[Override] - public function toBigInteger() : BigInteger - { - return $this; - } - - #[Override] - public function toBigDecimal() : BigDecimal - { - return self::newBigDecimal($this->value); - } - - #[Override] - public function toBigRational() : BigRational - { - return self::newBigRational($this, BigInteger::one(), false); - } - - #[Override] - public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal - { - return $this->toBigDecimal()->toScale($scale, $roundingMode); - } - - #[Override] - public function toInt() : int - { - $intValue = (int) $this->value; - - if ($this->value !== (string) $intValue) { - throw IntegerOverflowException::toIntOverflow($this); - } - - return $intValue; - } - - #[Override] - public function toFloat() : float - { - return (float) $this->value; - } - - /** - * Returns a string representation of this number in the given base. - * - * The output will always be lowercase for bases greater than 10. - * - * @throws \InvalidArgumentException If the base is out of range. - * - * @pure - */ - public function toBase(int $base) : string - { - if ($base === 10) { - return $this->value; - } - - if ($base < 2 || $base > 36) { - throw new \InvalidArgumentException(\sprintf('Base %d is out of range [2, 36]', $base)); - } - - return CalculatorRegistry::get()->toBase($this->value, $base); - } - - /** - * Returns a string representation of this number in an arbitrary base with a custom alphabet. - * - * Because this method accepts an alphabet with any character, including dash, it does not handle negative numbers; - * a NegativeNumberException will be thrown when attempting to call this method on a negative number. - * - * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. - * - * @throws NegativeNumberException If this number is negative. - * @throws \InvalidArgumentException If the given alphabet does not contain at least 2 chars. - * - * @pure - */ - public function toArbitraryBase(string $alphabet) : string - { - $base = \strlen($alphabet); - - if ($base < 2) { - throw new \InvalidArgumentException('The alphabet must contain at least 2 chars.'); - } - - if ($this->value[0] === '-') { - throw new NegativeNumberException(__FUNCTION__ . '() does not support negative numbers.'); - } - - return CalculatorRegistry::get()->toArbitraryBase($this->value, $alphabet, $base); - } - - /** - * Returns a string of bytes containing the binary representation of this BigInteger. - * - * The string is in big-endian byte-order: the most significant byte is in the zeroth element. - * - * If `$signed` is true, the output will be in two's-complement representation, and a sign bit will be prepended to - * the output. If `$signed` is false, no sign bit will be prepended, and this method will throw an exception if the - * number is negative. - * - * The string will contain the minimum number of bytes required to represent this BigInteger, including a sign bit - * if `$signed` is true. - * - * This representation is compatible with the `fromBytes()` factory method, as long as the `$signed` flags match. - * - * @param bool $signed Whether to output a signed number in two's-complement representation with a leading sign bit. - * - * @throws NegativeNumberException If $signed is false, and the number is negative. - * - * @pure - */ - public function toBytes(bool $signed = true) : string - { - if (! $signed && $this->isNegative()) { - throw new NegativeNumberException('Cannot convert a negative number to a byte string when $signed is false.'); - } - - $hex = $this->abs()->toBase(16); - - if (\strlen($hex) % 2 !== 0) { - $hex = '0' . $hex; - } - - $baseHexLength = \strlen($hex); - - if ($signed) { - if ($this->isNegative()) { - $bin = \hex2bin($hex); - assert($bin !== false); - - $hex = \bin2hex(~$bin); - $hex = self::fromBase($hex, 16)->plus(1)->toBase(16); - - $hexLength = \strlen($hex); - - if ($hexLength < $baseHexLength) { - $hex = \str_repeat('0', $baseHexLength - $hexLength) . $hex; - } - - if ($hex[0] < '8') { - $hex = 'FF' . $hex; - } - } else { - if ($hex[0] >= '8') { - $hex = '00' . $hex; - } - } - } - - $result = \hex2bin($hex); - assert($result !== false); - - return $result; - } - - /** - * @return numeric-string - */ - #[Override] - public function __toString() : string - { - /** @var numeric-string */ - return $this->value; - } - - /** - * This method is required for serializing the object and SHOULD NOT be accessed directly. - * - * @internal - * - * @return array{value: string} - */ - public function __serialize(): array - { - return ['value' => $this->value]; - } - - /** - * This method is only here to allow unserializing the object and cannot be accessed directly. - * - * @internal - * - * @param array{value: string} $data - * - * @throws \LogicException - */ - public function __unserialize(array $data): void - { - /** @phpstan-ignore isset.initializedProperty */ - if (isset($this->value)) { - throw new \LogicException('__unserialize() is an internal function, it must not be called directly.'); - } - - /** @phpstan-ignore deadCode.unreachable */ - $this->value = $data['value']; - } -} diff --git a/vendor/brick/math/src/BigNumber.php b/vendor/brick/math/src/BigNumber.php deleted file mode 100644 index 2fbdf696..00000000 --- a/vendor/brick/math/src/BigNumber.php +++ /dev/null @@ -1,556 +0,0 @@ -[\-\+])?' . - '(?[0-9]+)?' . - '(?\.)?' . - '(?[0-9]+)?' . - '(?:[eE](?[\-\+]?[0-9]+))?' . - '$/'; - - /** - * The regular expression used to parse rational numbers. - */ - private const PARSE_REGEXP_RATIONAL = - '/^' . - '(?[\-\+])?' . - '(?[0-9]+)' . - '\/?' . - '(?[0-9]+)' . - '$/'; - - /** - * Creates a BigNumber of the given value. - * - * When of() is called on BigNumber, the concrete return type is dependent on the given value, with the following - * rules: - * - * - BigNumber instances are returned as is - * - integer numbers are returned as BigInteger - * - floating point numbers are converted to a string then parsed as such - * - strings containing a `/` character are returned as BigRational - * - strings containing a `.` character or using an exponential notation are returned as BigDecimal - * - strings containing only digits with an optional leading `+` or `-` sign are returned as BigInteger - * - * When of() is called on BigInteger, BigDecimal, or BigRational, the resulting number is converted to an instance - * of the subclass when possible; otherwise a RoundingNecessaryException exception is thrown. - * - * @throws NumberFormatException If the format of the number is not valid. - * @throws DivisionByZeroException If the value represents a rational number with a denominator of zero. - * @throws RoundingNecessaryException If the value cannot be converted to an instance of the subclass without rounding. - * - * @pure - */ - final public static function of(BigNumber|int|float|string $value) : static - { - $value = self::_of($value); - - if (static::class === BigNumber::class) { - assert($value instanceof static); - - return $value; - } - - return static::from($value); - } - - /** - * @throws NumberFormatException If the format of the number is not valid. - * @throws DivisionByZeroException If the value represents a rational number with a denominator of zero. - * - * @pure - */ - private static function _of(BigNumber|int|float|string $value) : BigNumber - { - if ($value instanceof BigNumber) { - return $value; - } - - if (\is_int($value)) { - return new BigInteger((string) $value); - } - - if (is_float($value)) { - $value = (string) $value; - } - - if (str_contains($value, '/')) { - // Rational number - if (\preg_match(self::PARSE_REGEXP_RATIONAL, $value, $matches, PREG_UNMATCHED_AS_NULL) !== 1) { - throw NumberFormatException::invalidFormat($value); - } - - $sign = $matches['sign']; - $numerator = $matches['numerator']; - $denominator = $matches['denominator']; - - $numerator = self::cleanUp($sign, $numerator); - $denominator = self::cleanUp(null, $denominator); - - if ($denominator === '0') { - throw DivisionByZeroException::denominatorMustNotBeZero(); - } - - return new BigRational( - new BigInteger($numerator), - new BigInteger($denominator), - false - ); - } else { - // Integer or decimal number - if (\preg_match(self::PARSE_REGEXP_NUMERICAL, $value, $matches, PREG_UNMATCHED_AS_NULL) !== 1) { - throw NumberFormatException::invalidFormat($value); - } - - $sign = $matches['sign']; - $point = $matches['point']; - $integral = $matches['integral']; - $fractional = $matches['fractional']; - $exponent = $matches['exponent']; - - if ($integral === null && $fractional === null) { - throw NumberFormatException::invalidFormat($value); - } - - if ($integral === null) { - $integral = '0'; - } - - if ($point !== null || $exponent !== null) { - $fractional ??= ''; - $exponent = ($exponent !== null) ? (int)$exponent : 0; - - if ($exponent === PHP_INT_MIN || $exponent === PHP_INT_MAX) { - throw new NumberFormatException('Exponent too large.'); - } - - $unscaledValue = self::cleanUp($sign, $integral . $fractional); - - $scale = \strlen($fractional) - $exponent; - - if ($scale < 0) { - if ($unscaledValue !== '0') { - $unscaledValue .= \str_repeat('0', -$scale); - } - $scale = 0; - } - - return new BigDecimal($unscaledValue, $scale); - } - - $integral = self::cleanUp($sign, $integral); - - return new BigInteger($integral); - } - } - - /** - * Overridden by subclasses to convert a BigNumber to an instance of the subclass. - * - * @throws RoundingNecessaryException If the value cannot be converted. - * - * @pure - */ - abstract protected static function from(BigNumber $number): static; - - /** - * Proxy method to access BigInteger's protected constructor from sibling classes. - * - * @pure - * @internal - */ - final protected function newBigInteger(string $value) : BigInteger - { - return new BigInteger($value); - } - - /** - * Proxy method to access BigDecimal's protected constructor from sibling classes. - * - * @pure - * @internal - */ - final protected function newBigDecimal(string $value, int $scale = 0) : BigDecimal - { - return new BigDecimal($value, $scale); - } - - /** - * Proxy method to access BigRational's protected constructor from sibling classes. - * - * @pure - * @internal - */ - final protected function newBigRational(BigInteger $numerator, BigInteger $denominator, bool $checkDenominator) : BigRational - { - return new BigRational($numerator, $denominator, $checkDenominator); - } - - /** - * Returns the minimum of the given values. - * - * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible - * to an instance of the class this method is called on. - * - * @throws \InvalidArgumentException If no values are given. - * @throws MathException If an argument is not valid. - * - * @pure - */ - final public static function min(BigNumber|int|float|string ...$values) : static - { - $min = null; - - foreach ($values as $value) { - $value = static::of($value); - - if ($min === null || $value->isLessThan($min)) { - $min = $value; - } - } - - if ($min === null) { - throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); - } - - return $min; - } - - /** - * Returns the maximum of the given values. - * - * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible - * to an instance of the class this method is called on. - * - * @throws \InvalidArgumentException If no values are given. - * @throws MathException If an argument is not valid. - * - * @pure - */ - final public static function max(BigNumber|int|float|string ...$values) : static - { - $max = null; - - foreach ($values as $value) { - $value = static::of($value); - - if ($max === null || $value->isGreaterThan($max)) { - $max = $value; - } - } - - if ($max === null) { - throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); - } - - return $max; - } - - /** - * Returns the sum of the given values. - * - * When called on BigNumber, sum() accepts any supported type and returns a result whose type is the widest among - * the given values (BigInteger < BigDecimal < BigRational). - * - * When called on BigInteger, BigDecimal, or BigRational, sum() requires that all values can be converted to that - * specific subclass, and returns a result of the same type. - * - * @param BigNumber|int|float|string ...$values The values to add. All values must be convertible to the class on - * which this method is called. - * - * @throws \InvalidArgumentException If no values are given. - * @throws MathException If an argument is not valid. - * - * @pure - */ - final public static function sum(BigNumber|int|float|string ...$values) : static - { - $first = array_shift($values); - - if ($first === null) { - throw new \InvalidArgumentException(__METHOD__ . '() expects at least one value.'); - } - - $sum = static::of($first); - - foreach ($values as $value) { - $sum = self::add($sum, static::of($value)); - } - - assert($sum instanceof static); - - return $sum; - } - - /** - * Adds two BigNumber instances in the correct order to avoid a RoundingNecessaryException. - * - * @pure - */ - private static function add(BigNumber $a, BigNumber $b) : BigNumber - { - if ($a instanceof BigRational) { - return $a->plus($b); - } - - if ($b instanceof BigRational) { - return $b->plus($a); - } - - if ($a instanceof BigDecimal) { - return $a->plus($b); - } - - if ($b instanceof BigDecimal) { - return $b->plus($a); - } - - return $a->plus($b); - } - - /** - * Removes optional leading zeros and applies sign. - * - * @param string|null $sign The sign, '+' or '-', optional. Null is allowed for convenience and treated as '+'. - * @param string $number The number, validated as a string of digits. - * - * @pure - */ - private static function cleanUp(string|null $sign, string $number) : string - { - $number = \ltrim($number, '0'); - - if ($number === '') { - return '0'; - } - - return $sign === '-' ? '-' . $number : $number; - } - - /** - * Checks if this number is equal to the given one. - * - * @pure - */ - final public function isEqualTo(BigNumber|int|float|string $that) : bool - { - return $this->compareTo($that) === 0; - } - - /** - * Checks if this number is strictly lower than the given one. - * - * @pure - */ - final public function isLessThan(BigNumber|int|float|string $that) : bool - { - return $this->compareTo($that) < 0; - } - - /** - * Checks if this number is lower than or equal to the given one. - * - * @pure - */ - final public function isLessThanOrEqualTo(BigNumber|int|float|string $that) : bool - { - return $this->compareTo($that) <= 0; - } - - /** - * Checks if this number is strictly greater than the given one. - * - * @pure - */ - final public function isGreaterThan(BigNumber|int|float|string $that) : bool - { - return $this->compareTo($that) > 0; - } - - /** - * Checks if this number is greater than or equal to the given one. - * - * @pure - */ - final public function isGreaterThanOrEqualTo(BigNumber|int|float|string $that) : bool - { - return $this->compareTo($that) >= 0; - } - - /** - * Checks if this number equals zero. - * - * @pure - */ - final public function isZero() : bool - { - return $this->getSign() === 0; - } - - /** - * Checks if this number is strictly negative. - * - * @pure - */ - final public function isNegative() : bool - { - return $this->getSign() < 0; - } - - /** - * Checks if this number is negative or zero. - * - * @pure - */ - final public function isNegativeOrZero() : bool - { - return $this->getSign() <= 0; - } - - /** - * Checks if this number is strictly positive. - * - * @pure - */ - final public function isPositive() : bool - { - return $this->getSign() > 0; - } - - /** - * Checks if this number is positive or zero. - * - * @pure - */ - final public function isPositiveOrZero() : bool - { - return $this->getSign() >= 0; - } - - /** - * Returns the sign of this number. - * - * Returns -1 if the number is negative, 0 if zero, 1 if positive. - * - * @return -1|0|1 - * - * @pure - */ - abstract public function getSign() : int; - - /** - * Compares this number to the given one. - * - * Returns -1 if `$this` is lower than, 0 if equal to, 1 if greater than `$that`. - * - * @return -1|0|1 - * - * @throws MathException If the number is not valid. - * - * @pure - */ - abstract public function compareTo(BigNumber|int|float|string $that) : int; - - /** - * Converts this number to a BigInteger. - * - * @throws RoundingNecessaryException If this number cannot be converted to a BigInteger without rounding. - * - * @pure - */ - abstract public function toBigInteger() : BigInteger; - - /** - * Converts this number to a BigDecimal. - * - * @throws RoundingNecessaryException If this number cannot be converted to a BigDecimal without rounding. - * - * @pure - */ - abstract public function toBigDecimal() : BigDecimal; - - /** - * Converts this number to a BigRational. - * - * @pure - */ - abstract public function toBigRational() : BigRational; - - /** - * Converts this number to a BigDecimal with the given scale, using rounding if necessary. - * - * @param int $scale The scale of the resulting `BigDecimal`. - * @param RoundingMode $roundingMode An optional rounding mode, defaults to UNNECESSARY. - * - * @throws RoundingNecessaryException If this number cannot be converted to the given scale without rounding. - * This only applies when RoundingMode::UNNECESSARY is used. - * - * @pure - */ - abstract public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal; - - /** - * Returns the exact value of this number as a native integer. - * - * If this number cannot be converted to a native integer without losing precision, an exception is thrown. - * Note that the acceptable range for an integer depends on the platform and differs for 32-bit and 64-bit. - * - * @throws MathException If this number cannot be exactly converted to a native integer. - * - * @pure - */ - abstract public function toInt() : int; - - /** - * Returns an approximation of this number as a floating-point value. - * - * Note that this method can discard information as the precision of a floating-point value - * is inherently limited. - * - * If the number is greater than the largest representable floating point number, positive infinity is returned. - * If the number is less than the smallest representable floating point number, negative infinity is returned. - * - * @pure - */ - abstract public function toFloat() : float; - - /** - * Returns a string representation of this number. - * - * The output of this method can be parsed by the `of()` factory method; - * this will yield an object equal to this one, without any information loss. - * - * @pure - */ - abstract public function __toString() : string; - - #[Override] - final public function jsonSerialize() : string - { - return $this->__toString(); - } -} diff --git a/vendor/brick/math/src/BigRational.php b/vendor/brick/math/src/BigRational.php deleted file mode 100644 index 56045e53..00000000 --- a/vendor/brick/math/src/BigRational.php +++ /dev/null @@ -1,441 +0,0 @@ -isZero()) { - throw DivisionByZeroException::denominatorMustNotBeZero(); - } - - if ($denominator->isNegative()) { - $numerator = $numerator->negated(); - $denominator = $denominator->negated(); - } - } - - $this->numerator = $numerator; - $this->denominator = $denominator; - } - - #[Override] - protected static function from(BigNumber $number): static - { - return $number->toBigRational(); - } - - /** - * Creates a BigRational out of a numerator and a denominator. - * - * If the denominator is negative, the signs of both the numerator and the denominator - * will be inverted to ensure that the denominator is always positive. - * - * @param BigNumber|int|float|string $numerator The numerator. Must be convertible to a BigInteger. - * @param BigNumber|int|float|string $denominator The denominator. Must be convertible to a BigInteger. - * - * @throws NumberFormatException If an argument does not represent a valid number. - * @throws RoundingNecessaryException If an argument represents a non-integer number. - * @throws DivisionByZeroException If the denominator is zero. - * - * @pure - */ - public static function nd( - BigNumber|int|float|string $numerator, - BigNumber|int|float|string $denominator, - ) : BigRational { - $numerator = BigInteger::of($numerator); - $denominator = BigInteger::of($denominator); - - return new BigRational($numerator, $denominator, true); - } - - /** - * Returns a BigRational representing zero. - * - * @pure - */ - public static function zero() : BigRational - { - /** @var BigRational|null $zero */ - static $zero; - - if ($zero === null) { - $zero = new BigRational(BigInteger::zero(), BigInteger::one(), false); - } - - return $zero; - } - - /** - * Returns a BigRational representing one. - * - * @pure - */ - public static function one() : BigRational - { - /** @var BigRational|null $one */ - static $one; - - if ($one === null) { - $one = new BigRational(BigInteger::one(), BigInteger::one(), false); - } - - return $one; - } - - /** - * Returns a BigRational representing ten. - * - * @pure - */ - public static function ten() : BigRational - { - /** @var BigRational|null $ten */ - static $ten; - - if ($ten === null) { - $ten = new BigRational(BigInteger::ten(), BigInteger::one(), false); - } - - return $ten; - } - - /** - * @pure - */ - public function getNumerator() : BigInteger - { - return $this->numerator; - } - - /** - * @pure - */ - public function getDenominator() : BigInteger - { - return $this->denominator; - } - - /** - * Returns the quotient of the division of the numerator by the denominator. - * - * @pure - */ - public function quotient() : BigInteger - { - return $this->numerator->quotient($this->denominator); - } - - /** - * Returns the remainder of the division of the numerator by the denominator. - * - * @pure - */ - public function remainder() : BigInteger - { - return $this->numerator->remainder($this->denominator); - } - - /** - * Returns the quotient and remainder of the division of the numerator by the denominator. - * - * @return array{BigInteger, BigInteger} - * - * @pure - */ - public function quotientAndRemainder() : array - { - return $this->numerator->quotientAndRemainder($this->denominator); - } - - /** - * Returns the sum of this number and the given one. - * - * @param BigNumber|int|float|string $that The number to add. - * - * @throws MathException If the number is not valid. - * - * @pure - */ - public function plus(BigNumber|int|float|string $that) : BigRational - { - $that = BigRational::of($that); - - $numerator = $this->numerator->multipliedBy($that->denominator); - $numerator = $numerator->plus($that->numerator->multipliedBy($this->denominator)); - $denominator = $this->denominator->multipliedBy($that->denominator); - - return new BigRational($numerator, $denominator, false); - } - - /** - * Returns the difference of this number and the given one. - * - * @param BigNumber|int|float|string $that The number to subtract. - * - * @throws MathException If the number is not valid. - * - * @pure - */ - public function minus(BigNumber|int|float|string $that) : BigRational - { - $that = BigRational::of($that); - - $numerator = $this->numerator->multipliedBy($that->denominator); - $numerator = $numerator->minus($that->numerator->multipliedBy($this->denominator)); - $denominator = $this->denominator->multipliedBy($that->denominator); - - return new BigRational($numerator, $denominator, false); - } - - /** - * Returns the product of this number and the given one. - * - * @param BigNumber|int|float|string $that The multiplier. - * - * @throws MathException If the multiplier is not a valid number. - * - * @pure - */ - public function multipliedBy(BigNumber|int|float|string $that) : BigRational - { - $that = BigRational::of($that); - - $numerator = $this->numerator->multipliedBy($that->numerator); - $denominator = $this->denominator->multipliedBy($that->denominator); - - return new BigRational($numerator, $denominator, false); - } - - /** - * Returns the result of the division of this number by the given one. - * - * @param BigNumber|int|float|string $that The divisor. - * - * @throws MathException If the divisor is not a valid number, or is zero. - * - * @pure - */ - public function dividedBy(BigNumber|int|float|string $that) : BigRational - { - $that = BigRational::of($that); - - $numerator = $this->numerator->multipliedBy($that->denominator); - $denominator = $this->denominator->multipliedBy($that->numerator); - - return new BigRational($numerator, $denominator, true); - } - - /** - * Returns this number exponentiated to the given value. - * - * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. - * - * @pure - */ - public function power(int $exponent) : BigRational - { - if ($exponent === 0) { - $one = BigInteger::one(); - - return new BigRational($one, $one, false); - } - - if ($exponent === 1) { - return $this; - } - - return new BigRational( - $this->numerator->power($exponent), - $this->denominator->power($exponent), - false - ); - } - - /** - * Returns the reciprocal of this BigRational. - * - * The reciprocal has the numerator and denominator swapped. - * - * @throws DivisionByZeroException If the numerator is zero. - * - * @pure - */ - public function reciprocal() : BigRational - { - return new BigRational($this->denominator, $this->numerator, true); - } - - /** - * Returns the absolute value of this BigRational. - * - * @pure - */ - public function abs() : BigRational - { - return new BigRational($this->numerator->abs(), $this->denominator, false); - } - - /** - * Returns the negated value of this BigRational. - * - * @pure - */ - public function negated() : BigRational - { - return new BigRational($this->numerator->negated(), $this->denominator, false); - } - - /** - * Returns the simplified value of this BigRational. - * - * @pure - */ - public function simplified() : BigRational - { - $gcd = $this->numerator->gcd($this->denominator); - - $numerator = $this->numerator->quotient($gcd); - $denominator = $this->denominator->quotient($gcd); - - return new BigRational($numerator, $denominator, false); - } - - #[Override] - public function compareTo(BigNumber|int|float|string $that) : int - { - return $this->minus($that)->getSign(); - } - - #[Override] - public function getSign() : int - { - return $this->numerator->getSign(); - } - - #[Override] - public function toBigInteger() : BigInteger - { - $simplified = $this->simplified(); - - if (! $simplified->denominator->isEqualTo(1)) { - throw new RoundingNecessaryException('This rational number cannot be represented as an integer value without rounding.'); - } - - return $simplified->numerator; - } - - #[Override] - public function toBigDecimal() : BigDecimal - { - return $this->numerator->toBigDecimal()->exactlyDividedBy($this->denominator); - } - - #[Override] - public function toBigRational() : BigRational - { - return $this; - } - - #[Override] - public function toScale(int $scale, RoundingMode $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal - { - return $this->numerator->toBigDecimal()->dividedBy($this->denominator, $scale, $roundingMode); - } - - #[Override] - public function toInt() : int - { - return $this->toBigInteger()->toInt(); - } - - #[Override] - public function toFloat() : float - { - $simplified = $this->simplified(); - return $simplified->numerator->toFloat() / $simplified->denominator->toFloat(); - } - - #[Override] - public function __toString() : string - { - $numerator = (string) $this->numerator; - $denominator = (string) $this->denominator; - - if ($denominator === '1') { - return $numerator; - } - - return $numerator . '/' . $denominator; - } - - /** - * This method is required for serializing the object and SHOULD NOT be accessed directly. - * - * @internal - * - * @return array{numerator: BigInteger, denominator: BigInteger} - */ - public function __serialize(): array - { - return ['numerator' => $this->numerator, 'denominator' => $this->denominator]; - } - - /** - * This method is only here to allow unserializing the object and cannot be accessed directly. - * - * @internal - * - * @param array{numerator: BigInteger, denominator: BigInteger} $data - * - * @throws \LogicException - */ - public function __unserialize(array $data): void - { - /** @phpstan-ignore isset.initializedProperty */ - if (isset($this->numerator)) { - throw new \LogicException('__unserialize() is an internal function, it must not be called directly.'); - } - - /** @phpstan-ignore deadCode.unreachable */ - $this->numerator = $data['numerator']; - $this->denominator = $data['denominator']; - } -} diff --git a/vendor/brick/math/src/Exception/DivisionByZeroException.php b/vendor/brick/math/src/Exception/DivisionByZeroException.php deleted file mode 100644 index 2daaf5ed..00000000 --- a/vendor/brick/math/src/Exception/DivisionByZeroException.php +++ /dev/null @@ -1,35 +0,0 @@ - 126) { - $char = \strtoupper(\dechex($ord)); - - if ($ord < 10) { - $char = '0' . $char; - } - } else { - $char = '"' . $char . '"'; - } - - return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char)); - } -} diff --git a/vendor/brick/math/src/Exception/RoundingNecessaryException.php b/vendor/brick/math/src/Exception/RoundingNecessaryException.php deleted file mode 100644 index 034a0406..00000000 --- a/vendor/brick/math/src/Exception/RoundingNecessaryException.php +++ /dev/null @@ -1,19 +0,0 @@ -init($a, $b); - - if ($aNeg && ! $bNeg) { - return -1; - } - - if ($bNeg && ! $aNeg) { - return 1; - } - - $aLen = \strlen($aDig); - $bLen = \strlen($bDig); - - if ($aLen < $bLen) { - $result = -1; - } elseif ($aLen > $bLen) { - $result = 1; - } else { - $result = $aDig <=> $bDig; - } - - return $aNeg ? -$result : $result; - } - - /** - * Adds two numbers. - * - * @pure - */ - abstract public function add(string $a, string $b) : string; - - /** - * Subtracts two numbers. - * - * @pure - */ - abstract public function sub(string $a, string $b) : string; - - /** - * Multiplies two numbers. - * - * @pure - */ - abstract public function mul(string $a, string $b) : string; - - /** - * Returns the quotient of the division of two numbers. - * - * @param string $a The dividend. - * @param string $b The divisor, must not be zero. - * - * @return string The quotient. - * - * @pure - */ - abstract public function divQ(string $a, string $b) : string; - - /** - * Returns the remainder of the division of two numbers. - * - * @param string $a The dividend. - * @param string $b The divisor, must not be zero. - * - * @return string The remainder. - * - * @pure - */ - abstract public function divR(string $a, string $b) : string; - - /** - * Returns the quotient and remainder of the division of two numbers. - * - * @param string $a The dividend. - * @param string $b The divisor, must not be zero. - * - * @return array{string, string} An array containing the quotient and remainder. - * - * @pure - */ - abstract public function divQR(string $a, string $b) : array; - - /** - * Exponentiates a number. - * - * @param string $a The base number. - * @param int $e The exponent, validated as an integer between 0 and MAX_POWER. - * - * @return string The power. - * - * @pure - */ - abstract public function pow(string $a, int $e) : string; - - /** - * @param string $b The modulus; must not be zero. - * - * @pure - */ - public function mod(string $a, string $b) : string - { - return $this->divR($this->add($this->divR($a, $b), $b), $b); - } - - /** - * Returns the modular multiplicative inverse of $x modulo $m. - * - * If $x has no multiplicative inverse mod m, this method must return null. - * - * This method can be overridden by the concrete implementation if the underlying library has built-in support. - * - * @param string $m The modulus; must not be negative or zero. - * - * @pure - */ - public function modInverse(string $x, string $m) : ?string - { - if ($m === '1') { - return '0'; - } - - $modVal = $x; - - if ($x[0] === '-' || ($this->cmp($this->abs($x), $m) >= 0)) { - $modVal = $this->mod($x, $m); - } - - [$g, $x] = $this->gcdExtended($modVal, $m); - - if ($g !== '1') { - return null; - } - - return $this->mod($this->add($this->mod($x, $m), $m), $m); - } - - /** - * Raises a number into power with modulo. - * - * @param string $base The base number; must be positive or zero. - * @param string $exp The exponent; must be positive or zero. - * @param string $mod The modulus; must be strictly positive. - * - * @pure - */ - abstract public function modPow(string $base, string $exp, string $mod) : string; - - /** - * Returns the greatest common divisor of the two numbers. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for GCD calculations. - * - * @return string The GCD, always positive, or zero if both arguments are zero. - * - * @pure - */ - public function gcd(string $a, string $b) : string - { - if ($a === '0') { - return $this->abs($b); - } - - if ($b === '0') { - return $this->abs($a); - } - - return $this->gcd($b, $this->divR($a, $b)); - } - - /** - * @return array{string, string, string} GCD, X, Y - * - * @pure - */ - private function gcdExtended(string $a, string $b) : array - { - if ($a === '0') { - return [$b, '0', '1']; - } - - [$gcd, $x1, $y1] = $this->gcdExtended($this->mod($b, $a), $a); - - $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1)); - $y = $x1; - - return [$gcd, $x, $y]; - } - - /** - * Returns the square root of the given number, rounded down. - * - * The result is the largest x such that x² ≤ n. - * The input MUST NOT be negative. - * - * @pure - */ - abstract public function sqrt(string $n) : string; - - /** - * Converts a number from an arbitrary base. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for base conversion. - * - * @param string $number The number, positive or zero, non-empty, case-insensitively validated for the given base. - * @param int $base The base of the number, validated from 2 to 36. - * - * @return string The converted number, following the Calculator conventions. - * - * @pure - */ - public function fromBase(string $number, int $base) : string - { - return $this->fromArbitraryBase(\strtolower($number), self::ALPHABET, $base); - } - - /** - * Converts a number to an arbitrary base. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for base conversion. - * - * @param string $number The number to convert, following the Calculator conventions. - * @param int $base The base to convert to, validated from 2 to 36. - * - * @return string The converted number, lowercase. - * - * @pure - */ - public function toBase(string $number, int $base) : string - { - $negative = ($number[0] === '-'); - - if ($negative) { - $number = \substr($number, 1); - } - - $number = $this->toArbitraryBase($number, self::ALPHABET, $base); - - if ($negative) { - return '-' . $number; - } - - return $number; - } - - /** - * Converts a non-negative number in an arbitrary base using a custom alphabet, to base 10. - * - * @param string $number The number to convert, validated as a non-empty string, - * containing only chars in the given alphabet/base. - * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum. - * @param int $base The base of the number, validated from 2 to alphabet length. - * - * @return string The number in base 10, following the Calculator conventions. - * - * @pure - */ - final public function fromArbitraryBase(string $number, string $alphabet, int $base) : string - { - // remove leading "zeros" - $number = \ltrim($number, $alphabet[0]); - - if ($number === '') { - return '0'; - } - - // optimize for "one" - if ($number === $alphabet[1]) { - return '1'; - } - - $result = '0'; - $power = '1'; - - $base = (string) $base; - - for ($i = \strlen($number) - 1; $i >= 0; $i--) { - $index = \strpos($alphabet, $number[$i]); - - if ($index !== 0) { - $result = $this->add($result, ($index === 1) - ? $power - : $this->mul($power, (string) $index) - ); - } - - if ($i !== 0) { - $power = $this->mul($power, $base); - } - } - - return $result; - } - - /** - * Converts a non-negative number to an arbitrary base using a custom alphabet. - * - * @param string $number The number to convert, positive or zero, following the Calculator conventions. - * @param string $alphabet The alphabet that contains every digit, validated as 2 chars minimum. - * @param int $base The base to convert to, validated from 2 to alphabet length. - * - * @return string The converted number in the given alphabet. - * - * @pure - */ - final public function toArbitraryBase(string $number, string $alphabet, int $base) : string - { - if ($number === '0') { - return $alphabet[0]; - } - - $base = (string) $base; - $result = ''; - - while ($number !== '0') { - [$number, $remainder] = $this->divQR($number, $base); - $remainder = (int) $remainder; - - $result .= $alphabet[$remainder]; - } - - return \strrev($result); - } - - /** - * Performs a rounded division. - * - * Rounding is performed when the remainder of the division is not zero. - * - * @param string $a The dividend. - * @param string $b The divisor, must not be zero. - * @param RoundingMode $roundingMode The rounding mode. - * - * @throws RoundingNecessaryException If RoundingMode::UNNECESSARY is provided but rounding is necessary. - * - * @pure - */ - final public function divRound(string $a, string $b, RoundingMode $roundingMode) : string - { - [$quotient, $remainder] = $this->divQR($a, $b); - - $hasDiscardedFraction = ($remainder !== '0'); - $isPositiveOrZero = ($a[0] === '-') === ($b[0] === '-'); - - $discardedFractionSign = function() use ($remainder, $b) : int { - $r = $this->abs($this->mul($remainder, '2')); - $b = $this->abs($b); - - return $this->cmp($r, $b); - }; - - $increment = false; - - switch ($roundingMode) { - case RoundingMode::UNNECESSARY: - if ($hasDiscardedFraction) { - throw RoundingNecessaryException::roundingNecessary(); - } - break; - - case RoundingMode::UP: - $increment = $hasDiscardedFraction; - break; - - case RoundingMode::DOWN: - break; - - case RoundingMode::CEILING: - $increment = $hasDiscardedFraction && $isPositiveOrZero; - break; - - case RoundingMode::FLOOR: - $increment = $hasDiscardedFraction && ! $isPositiveOrZero; - break; - - case RoundingMode::HALF_UP: - $increment = $discardedFractionSign() >= 0; - break; - - case RoundingMode::HALF_DOWN: - $increment = $discardedFractionSign() > 0; - break; - - case RoundingMode::HALF_CEILING: - $increment = $isPositiveOrZero ? $discardedFractionSign() >= 0 : $discardedFractionSign() > 0; - break; - - case RoundingMode::HALF_FLOOR: - $increment = $isPositiveOrZero ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; - break; - - case RoundingMode::HALF_EVEN: - $lastDigit = (int) $quotient[-1]; - $lastDigitIsEven = ($lastDigit % 2 === 0); - $increment = $lastDigitIsEven ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; - break; - } - - if ($increment) { - return $this->add($quotient, $isPositiveOrZero ? '1' : '-1'); - } - - return $quotient; - } - - /** - * Calculates bitwise AND of two numbers. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for bitwise operations. - * - * @pure - */ - public function and(string $a, string $b) : string - { - return $this->bitwise('and', $a, $b); - } - - /** - * Calculates bitwise OR of two numbers. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for bitwise operations. - * - * @pure - */ - public function or(string $a, string $b) : string - { - return $this->bitwise('or', $a, $b); - } - - /** - * Calculates bitwise XOR of two numbers. - * - * This method can be overridden by the concrete implementation if the underlying library - * has built-in support for bitwise operations. - * - * @pure - */ - public function xor(string $a, string $b) : string - { - return $this->bitwise('xor', $a, $b); - } - - /** - * Performs a bitwise operation on a decimal number. - * - * @param 'and'|'or'|'xor' $operator The operator to use. - * @param string $a The left operand. - * @param string $b The right operand. - * - * @pure - */ - private function bitwise(string $operator, string $a, string $b) : string - { - [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); - - $aBin = $this->toBinary($aDig); - $bBin = $this->toBinary($bDig); - - $aLen = \strlen($aBin); - $bLen = \strlen($bBin); - - if ($aLen > $bLen) { - $bBin = \str_repeat("\x00", $aLen - $bLen) . $bBin; - } elseif ($bLen > $aLen) { - $aBin = \str_repeat("\x00", $bLen - $aLen) . $aBin; - } - - if ($aNeg) { - $aBin = $this->twosComplement($aBin); - } - if ($bNeg) { - $bBin = $this->twosComplement($bBin); - } - - $value = match ($operator) { - 'and' => $aBin & $bBin, - 'or' => $aBin | $bBin, - 'xor' => $aBin ^ $bBin, - }; - - $negative = match ($operator) { - 'and' => $aNeg and $bNeg, - 'or' => $aNeg or $bNeg, - 'xor' => $aNeg xor $bNeg, - }; - - if ($negative) { - $value = $this->twosComplement($value); - } - - $result = $this->toDecimal($value); - - return $negative ? $this->neg($result) : $result; - } - - /** - * @param string $number A positive, binary number. - * - * @pure - */ - private function twosComplement(string $number) : string - { - $xor = \str_repeat("\xff", \strlen($number)); - - $number ^= $xor; - - for ($i = \strlen($number) - 1; $i >= 0; $i--) { - $byte = \ord($number[$i]); - - if (++$byte !== 256) { - $number[$i] = \chr($byte); - break; - } - - $number[$i] = "\x00"; - - if ($i === 0) { - $number = "\x01" . $number; - } - } - - return $number; - } - - /** - * Converts a decimal number to a binary string. - * - * @param string $number The number to convert, positive or zero, only digits. - * - * @pure - */ - private function toBinary(string $number) : string - { - $result = ''; - - while ($number !== '0') { - [$number, $remainder] = $this->divQR($number, '256'); - $result .= \chr((int) $remainder); - } - - return \strrev($result); - } - - /** - * Returns the positive decimal representation of a binary number. - * - * @param string $bytes The bytes representing the number. - * - * @pure - */ - private function toDecimal(string $bytes) : string - { - $result = '0'; - $power = '1'; - - for ($i = \strlen($bytes) - 1; $i >= 0; $i--) { - $index = \ord($bytes[$i]); - - if ($index !== 0) { - $result = $this->add($result, ($index === 1) - ? $power - : $this->mul($power, (string) $index) - ); - } - - if ($i !== 0) { - $power = $this->mul($power, '256'); - } - } - - return $result; - } -} diff --git a/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php b/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php deleted file mode 100644 index 5ba961ed..00000000 --- a/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php +++ /dev/null @@ -1,73 +0,0 @@ -maxDigits = match (PHP_INT_SIZE) { - 4 => 9, - 8 => 18, - }; - } - - #[Override] - public function add(string $a, string $b) : string - { - /** - * @var numeric-string $a - * @var numeric-string $b - */ - $result = $a + $b; - - if (is_int($result)) { - return (string) $result; - } - - if ($a === '0') { - return $b; - } - - if ($b === '0') { - return $a; - } - - [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); - - $result = $aNeg === $bNeg ? $this->doAdd($aDig, $bDig) : $this->doSub($aDig, $bDig); - - if ($aNeg) { - $result = $this->neg($result); - } - - return $result; - } - - #[Override] - public function sub(string $a, string $b) : string - { - return $this->add($a, $this->neg($b)); - } - - #[Override] - public function mul(string $a, string $b) : string - { - /** - * @var numeric-string $a - * @var numeric-string $b - */ - $result = $a * $b; - - if (is_int($result)) { - return (string) $result; - } - - if ($a === '0' || $b === '0') { - return '0'; - } - - if ($a === '1') { - return $b; - } - - if ($b === '1') { - return $a; - } - - if ($a === '-1') { - return $this->neg($b); - } - - if ($b === '-1') { - return $this->neg($a); - } - - [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); - - $result = $this->doMul($aDig, $bDig); - - if ($aNeg !== $bNeg) { - $result = $this->neg($result); - } - - return $result; - } - - #[Override] - public function divQ(string $a, string $b) : string - { - return $this->divQR($a, $b)[0]; - } - - #[Override] - public function divR(string $a, string $b): string - { - return $this->divQR($a, $b)[1]; - } - - #[Override] - public function divQR(string $a, string $b) : array - { - if ($a === '0') { - return ['0', '0']; - } - - if ($a === $b) { - return ['1', '0']; - } - - if ($b === '1') { - return [$a, '0']; - } - - if ($b === '-1') { - return [$this->neg($a), '0']; - } - - /** @var numeric-string $a */ - $na = $a * 1; // cast to number - - if (is_int($na)) { - /** @var numeric-string $b */ - $nb = $b * 1; - - if (is_int($nb)) { - // the only division that may overflow is PHP_INT_MIN / -1, - // which cannot happen here as we've already handled a divisor of -1 above. - $q = intdiv($na, $nb); - $r = $na % $nb; - - return [ - (string) $q, - (string) $r - ]; - } - } - - [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); - - [$q, $r] = $this->doDiv($aDig, $bDig); - - if ($aNeg !== $bNeg) { - $q = $this->neg($q); - } - - if ($aNeg) { - $r = $this->neg($r); - } - - return [$q, $r]; - } - - #[Override] - public function pow(string $a, int $e) : string - { - if ($e === 0) { - return '1'; - } - - if ($e === 1) { - return $a; - } - - $odd = $e % 2; - $e -= $odd; - - $aa = $this->mul($a, $a); - - $result = $this->pow($aa, $e / 2); - - if ($odd === 1) { - $result = $this->mul($result, $a); - } - - return $result; - } - - /** - * Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/ - */ - #[Override] - public function modPow(string $base, string $exp, string $mod) : string - { - // special case: the algorithm below fails with 0 power 0 mod 1 (returns 1 instead of 0) - if ($base === '0' && $exp === '0' && $mod === '1') { - return '0'; - } - - // special case: the algorithm below fails with power 0 mod 1 (returns 1 instead of 0) - if ($exp === '0' && $mod === '1') { - return '0'; - } - - $x = $base; - - $res = '1'; - - // numbers are positive, so we can use remainder instead of modulo - $x = $this->divR($x, $mod); - - while ($exp !== '0') { - if (in_array($exp[-1], ['1', '3', '5', '7', '9'])) { // odd - $res = $this->divR($this->mul($res, $x), $mod); - } - - $exp = $this->divQ($exp, '2'); - $x = $this->divR($this->mul($x, $x), $mod); - } - - return $res; - } - - /** - * Adapted from https://cp-algorithms.com/num_methods/roots_newton.html - */ - #[Override] - public function sqrt(string $n) : string - { - if ($n === '0') { - return '0'; - } - - // initial approximation - $x = \str_repeat('9', \intdiv(\strlen($n), 2) ?: 1); - - $decreased = false; - - for (;;) { - $nx = $this->divQ($this->add($x, $this->divQ($n, $x)), '2'); - - if ($x === $nx || $this->cmp($nx, $x) > 0 && $decreased) { - break; - } - - $decreased = $this->cmp($nx, $x) < 0; - $x = $nx; - } - - return $x; - } - - /** - * Performs the addition of two non-signed large integers. - * - * @pure - */ - private function doAdd(string $a, string $b) : string - { - [$a, $b, $length] = $this->pad($a, $b); - - $carry = 0; - $result = ''; - - for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) { - $blockLength = $this->maxDigits; - - if ($i < 0) { - $blockLength += $i; - $i = 0; - } - - /** @var numeric-string $blockA */ - $blockA = \substr($a, $i, $blockLength); - - /** @var numeric-string $blockB */ - $blockB = \substr($b, $i, $blockLength); - - $sum = (string) ($blockA + $blockB + $carry); - $sumLength = \strlen($sum); - - if ($sumLength > $blockLength) { - $sum = \substr($sum, 1); - $carry = 1; - } else { - if ($sumLength < $blockLength) { - $sum = \str_repeat('0', $blockLength - $sumLength) . $sum; - } - $carry = 0; - } - - $result = $sum . $result; - - if ($i === 0) { - break; - } - } - - if ($carry === 1) { - $result = '1' . $result; - } - - return $result; - } - - /** - * Performs the subtraction of two non-signed large integers. - * - * @pure - */ - private function doSub(string $a, string $b) : string - { - if ($a === $b) { - return '0'; - } - - // Ensure that we always subtract to a positive result: biggest minus smallest. - $cmp = $this->doCmp($a, $b); - - $invert = ($cmp === -1); - - if ($invert) { - $c = $a; - $a = $b; - $b = $c; - } - - [$a, $b, $length] = $this->pad($a, $b); - - $carry = 0; - $result = ''; - - $complement = 10 ** $this->maxDigits; - - for ($i = $length - $this->maxDigits;; $i -= $this->maxDigits) { - $blockLength = $this->maxDigits; - - if ($i < 0) { - $blockLength += $i; - $i = 0; - } - - /** @var numeric-string $blockA */ - $blockA = \substr($a, $i, $blockLength); - - /** @var numeric-string $blockB */ - $blockB = \substr($b, $i, $blockLength); - - $sum = $blockA - $blockB - $carry; - - if ($sum < 0) { - $sum += $complement; - $carry = 1; - } else { - $carry = 0; - } - - $sum = (string) $sum; - $sumLength = \strlen($sum); - - if ($sumLength < $blockLength) { - $sum = \str_repeat('0', $blockLength - $sumLength) . $sum; - } - - $result = $sum . $result; - - if ($i === 0) { - break; - } - } - - // Carry cannot be 1 when the loop ends, as a > b - assert($carry === 0); - - $result = \ltrim($result, '0'); - - if ($invert) { - $result = $this->neg($result); - } - - return $result; - } - - /** - * Performs the multiplication of two non-signed large integers. - * - * @pure - */ - private function doMul(string $a, string $b) : string - { - $x = \strlen($a); - $y = \strlen($b); - - $maxDigits = \intdiv($this->maxDigits, 2); - $complement = 10 ** $maxDigits; - - $result = '0'; - - for ($i = $x - $maxDigits;; $i -= $maxDigits) { - $blockALength = $maxDigits; - - if ($i < 0) { - $blockALength += $i; - $i = 0; - } - - $blockA = (int) \substr($a, $i, $blockALength); - - $line = ''; - $carry = 0; - - for ($j = $y - $maxDigits;; $j -= $maxDigits) { - $blockBLength = $maxDigits; - - if ($j < 0) { - $blockBLength += $j; - $j = 0; - } - - $blockB = (int) \substr($b, $j, $blockBLength); - - $mul = $blockA * $blockB + $carry; - $value = $mul % $complement; - $carry = ($mul - $value) / $complement; - - $value = (string) $value; - $value = \str_pad($value, $maxDigits, '0', STR_PAD_LEFT); - - $line = $value . $line; - - if ($j === 0) { - break; - } - } - - if ($carry !== 0) { - $line = $carry . $line; - } - - $line = \ltrim($line, '0'); - - if ($line !== '') { - $line .= \str_repeat('0', $x - $blockALength - $i); - $result = $this->add($result, $line); - } - - if ($i === 0) { - break; - } - } - - return $result; - } - - /** - * Performs the division of two non-signed large integers. - * - * @return string[] The quotient and remainder. - * - * @pure - */ - private function doDiv(string $a, string $b) : array - { - $cmp = $this->doCmp($a, $b); - - if ($cmp === -1) { - return ['0', $a]; - } - - $x = \strlen($a); - $y = \strlen($b); - - // we now know that a >= b && x >= y - - $q = '0'; // quotient - $r = $a; // remainder - $z = $y; // focus length, always $y or $y+1 - - /** @var numeric-string $b */ - $nb = $b * 1; // cast to number - // performance optimization in cases where the remainder will never cause int overflow - if (is_int(($nb - 1) * 10 + 9)) { - $r = (int) \substr($a, 0, $z - 1); - - for ($i = $z - 1; $i < $x; $i++) { - $n = $r * 10 + (int) $a[$i]; - /** @var int $nb */ - $q .= \intdiv($n, $nb); - $r = $n % $nb; - } - - return [\ltrim($q, '0') ?: '0', (string) $r]; - } - - for (;;) { - $focus = \substr($a, 0, $z); - - $cmp = $this->doCmp($focus, $b); - - if ($cmp === -1) { - if ($z === $x) { // remainder < dividend - break; - } - - $z++; - } - - $zeros = \str_repeat('0', $x - $z); - - $q = $this->add($q, '1' . $zeros); - $a = $this->sub($a, $b . $zeros); - - $r = $a; - - if ($r === '0') { // remainder == 0 - break; - } - - $x = \strlen($a); - - if ($x < $y) { // remainder < dividend - break; - } - - $z = $y; - } - - return [$q, $r]; - } - - /** - * Compares two non-signed large numbers. - * - * @return -1|0|1 - * - * @pure - */ - private function doCmp(string $a, string $b) : int - { - $x = \strlen($a); - $y = \strlen($b); - - $cmp = $x <=> $y; - - if ($cmp !== 0) { - return $cmp; - } - - return \strcmp($a, $b) <=> 0; // enforce -1|0|1 - } - - /** - * Pads the left of one of the given numbers with zeros if necessary to make both numbers the same length. - * - * The numbers must only consist of digits, without leading minus sign. - * - * @return array{string, string, int} - * - * @pure - */ - private function pad(string $a, string $b) : array - { - $x = \strlen($a); - $y = \strlen($b); - - if ($x > $y) { - $b = \str_repeat('0', $x - $y) . $b; - - return [$a, $b, $x]; - } - - if ($x < $y) { - $a = \str_repeat('0', $y - $x) . $a; - - return [$a, $b, $y]; - } - - return [$a, $b, $x]; - } -} diff --git a/vendor/brick/math/src/Internal/CalculatorRegistry.php b/vendor/brick/math/src/Internal/CalculatorRegistry.php deleted file mode 100644 index 394fae69..00000000 --- a/vendor/brick/math/src/Internal/CalculatorRegistry.php +++ /dev/null @@ -1,73 +0,0 @@ -= 0.5; otherwise, behaves as for DOWN. - * Note that this is the rounding mode commonly taught at school. - */ - case HALF_UP; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. - * - * Behaves as for UP if the discarded fraction is > 0.5; otherwise, behaves as for DOWN. - */ - case HALF_DOWN; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards positive infinity. - * - * If the result is positive, behaves as for HALF_UP; if negative, behaves as for HALF_DOWN. - */ - case HALF_CEILING; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards negative infinity. - * - * If the result is positive, behaves as for HALF_DOWN; if negative, behaves as for HALF_UP. - */ - case HALF_FLOOR; - - /** - * Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case rounds towards the even neighbor. - * - * Behaves as for HALF_UP if the digit to the left of the discarded fraction is odd; - * behaves as for HALF_DOWN if it's even. - * - * Note that this is the rounding mode that statistically minimizes - * cumulative error when applied repeatedly over a sequence of calculations. - * It is sometimes known as "Banker's rounding", and is chiefly used in the USA. - */ - case HALF_EVEN; -} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a5b75561..d6cecb30 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,1308 +6,114 @@ $baseDir = dirname($vendorDir); return array( + 'App\\Controller\\HomeController' => $baseDir . '/App/Controller/HomeController.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php', - 'DateException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateException.php', - 'DateInvalidOperationException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php', - 'DateInvalidTimeZoneException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php', - 'DateMalformedIntervalStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php', - 'DateMalformedPeriodStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php', - 'DateMalformedStringException' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php', - 'DateObjectError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php', - 'DateRangeError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php', - 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'Override' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/Override.php', - 'PHPUnit\\Event\\Application\\Finished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/Finished.php', - 'PHPUnit\\Event\\Application\\FinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php', - 'PHPUnit\\Event\\Application\\Started' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/Started.php', - 'PHPUnit\\Event\\Application\\StartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/StartedSubscriber.php', - 'PHPUnit\\Event\\Code\\ClassMethod' => $vendorDir . '/phpunit/phpunit/src/Event/Value/ClassMethod.php', - 'PHPUnit\\Event\\Code\\ComparisonFailure' => $vendorDir . '/phpunit/phpunit/src/Event/Value/ComparisonFailure.php', - 'PHPUnit\\Event\\Code\\ComparisonFailureBuilder' => $vendorDir . '/phpunit/phpunit/src/Event/Value/ComparisonFailureBuilder.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\DirectTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/DirectTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\IndirectTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/IndirectTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\IssueTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/IssueTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\SelfTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/SelfTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\TestTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/TestTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\UnknownTrigger' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Issue/UnknownTrigger.php', - 'PHPUnit\\Event\\Code\\NoTestCaseObjectOnCallStackException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoTestCaseObjectOnCallStackException.php', - 'PHPUnit\\Event\\Code\\Phpt' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Phpt.php', - 'PHPUnit\\Event\\Code\\Test' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/Test.php', - 'PHPUnit\\Event\\Code\\TestCollection' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestCollection.php', - 'PHPUnit\\Event\\Code\\TestCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestCollectionIterator.php', - 'PHPUnit\\Event\\Code\\TestDox' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestDox.php', - 'PHPUnit\\Event\\Code\\TestDoxBuilder' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php', - 'PHPUnit\\Event\\Code\\TestMethod' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestMethod.php', - 'PHPUnit\\Event\\Code\\TestMethodBuilder' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php', - 'PHPUnit\\Event\\Code\\Throwable' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Throwable.php', - 'PHPUnit\\Event\\Code\\ThrowableBuilder' => $vendorDir . '/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php', - 'PHPUnit\\Event\\CollectingDispatcher' => $vendorDir . '/phpunit/phpunit/src/Event/Dispatcher/CollectingDispatcher.php', - 'PHPUnit\\Event\\DeferringDispatcher' => $vendorDir . '/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php', - 'PHPUnit\\Event\\DirectDispatcher' => $vendorDir . '/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php', - 'PHPUnit\\Event\\Dispatcher' => $vendorDir . '/phpunit/phpunit/src/Event/Dispatcher/Dispatcher.php', - 'PHPUnit\\Event\\DispatchingEmitter' => $vendorDir . '/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php', - 'PHPUnit\\Event\\Emitter' => $vendorDir . '/phpunit/phpunit/src/Event/Emitter/Emitter.php', - 'PHPUnit\\Event\\Event' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Event.php', - 'PHPUnit\\Event\\EventAlreadyAssignedException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/EventAlreadyAssignedException.php', - 'PHPUnit\\Event\\EventCollection' => $vendorDir . '/phpunit/phpunit/src/Event/Events/EventCollection.php', - 'PHPUnit\\Event\\EventCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Event/Events/EventCollectionIterator.php', - 'PHPUnit\\Event\\EventFacadeIsSealedException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/EventFacadeIsSealedException.php', - 'PHPUnit\\Event\\Exception' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/Exception.php', - 'PHPUnit\\Event\\Facade' => $vendorDir . '/phpunit/phpunit/src/Event/Facade.php', - 'PHPUnit\\Event\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/InvalidArgumentException.php', - 'PHPUnit\\Event\\InvalidEventException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/InvalidEventException.php', - 'PHPUnit\\Event\\InvalidSubscriberException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/InvalidSubscriberException.php', - 'PHPUnit\\Event\\MapError' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/MapError.php', - 'PHPUnit\\Event\\NoPreviousThrowableException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoPreviousThrowableException.php', - 'PHPUnit\\Event\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/RuntimeException.php', - 'PHPUnit\\Event\\Runtime\\OperatingSystem' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Runtime/OperatingSystem.php', - 'PHPUnit\\Event\\Runtime\\PHP' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Runtime/PHP.php', - 'PHPUnit\\Event\\Runtime\\PHPUnit' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Runtime/PHPUnit.php', - 'PHPUnit\\Event\\Runtime\\Runtime' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Runtime/Runtime.php', - 'PHPUnit\\Event\\SubscribableDispatcher' => $vendorDir . '/phpunit/phpunit/src/Event/Dispatcher/SubscribableDispatcher.php', - 'PHPUnit\\Event\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Subscriber.php', - 'PHPUnit\\Event\\SubscriberTypeAlreadyRegisteredException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/SubscriberTypeAlreadyRegisteredException.php', - 'PHPUnit\\Event\\Telemetry\\Duration' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php', - 'PHPUnit\\Event\\Telemetry\\GarbageCollectorStatus' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php', - 'PHPUnit\\Event\\Telemetry\\GarbageCollectorStatusProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatusProvider.php', - 'PHPUnit\\Event\\Telemetry\\HRTime' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php', - 'PHPUnit\\Event\\Telemetry\\Info' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Info.php', - 'PHPUnit\\Event\\Telemetry\\MemoryMeter' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php', - 'PHPUnit\\Event\\Telemetry\\MemoryUsage' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php', - 'PHPUnit\\Event\\Telemetry\\Snapshot' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php', - 'PHPUnit\\Event\\Telemetry\\StopWatch' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php', - 'PHPUnit\\Event\\Telemetry\\System' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/System.php', - 'PHPUnit\\Event\\Telemetry\\SystemGarbageCollectorStatusProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php', - 'PHPUnit\\Event\\Telemetry\\SystemMemoryMeter' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php', - 'PHPUnit\\Event\\Telemetry\\SystemStopWatch' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php', - 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', - 'PHPUnit\\Event\\TestData\\DataFromDataProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php', - 'PHPUnit\\Event\\TestData\\DataFromTestDependency' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php', - 'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php', - 'PHPUnit\\Event\\TestData\\TestData' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php', - 'PHPUnit\\Event\\TestData\\TestDataCollection' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php', - 'PHPUnit\\Event\\TestData\\TestDataCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollectionIterator.php', - 'PHPUnit\\Event\\TestRunner\\BootstrapFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinished.php', - 'PHPUnit\\Event\\TestRunner\\BootstrapFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErrored.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErroredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinished.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessStarted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStarted.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Configured' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/Configured.php', - 'PHPUnit\\Event\\TestRunner\\ConfiguredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ConfiguredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\DeprecationTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggered.php', - 'PHPUnit\\Event\\TestRunner\\DeprecationTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\EventFacadeSealed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealed.php', - 'PHPUnit\\Event\\TestRunner\\EventFacadeSealedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionAborted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAborted.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionAbortedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAbortedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinished.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionStarted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStarted.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionBootstrapped' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrapped.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionBootstrappedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrappedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionLoadedFromPhar' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPhar.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionLoadedFromPharSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPharSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Finished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/Finished.php', - 'PHPUnit\\Event\\TestRunner\\FinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/FinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionDisabled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabled.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionDisabledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabledSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionEnabled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabled.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionEnabledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabledSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggered.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\NoticeTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggered.php', - 'PHPUnit\\Event\\TestRunner\\NoticeTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Started' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/Started.php', - 'PHPUnit\\Event\\TestRunner\\StartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/StartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinished.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageStarted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStarted.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\WarningTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggered.php', - 'PHPUnit\\Event\\TestRunner\\WarningTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Filtered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Filtered.php', - 'PHPUnit\\Event\\TestSuite\\FilteredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/FilteredSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Finished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Finished.php', - 'PHPUnit\\Event\\TestSuite\\FinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/FinishedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Loaded' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Loaded.php', - 'PHPUnit\\Event\\TestSuite\\LoadedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/LoadedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Skipped' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Skipped.php', - 'PHPUnit\\Event\\TestSuite\\SkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/SkippedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Sorted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Sorted.php', - 'PHPUnit\\Event\\TestSuite\\SortedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/SortedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Started' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/Started.php', - 'PHPUnit\\Event\\TestSuite\\StartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/TestSuite/StartedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuite.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteBuilder' => $vendorDir . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteForTestClass' => $vendorDir . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestClass.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteForTestMethodWithDataProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestMethodWithDataProvider.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteWithName' => $vendorDir . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteWithName.php', - 'PHPUnit\\Event\\Test\\AdditionalInformationProvided' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvided.php', - 'PHPUnit\\Event\\Test\\AdditionalInformationProvidedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvidedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\ComparatorRegistered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/ComparatorRegistered.php', - 'PHPUnit\\Event\\Test\\ComparatorRegisteredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/ComparatorRegisteredSubscriber.php', - 'PHPUnit\\Event\\Test\\ConsideredRisky' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRisky.php', - 'PHPUnit\\Event\\Test\\ConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRiskySubscriber.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalled.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinished.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\DeprecationTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\DeprecationTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\ErrorTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggered.php', - 'PHPUnit\\Event\\Test\\ErrorTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\Errored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php', - 'PHPUnit\\Event\\Test\\ErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/ErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\Failed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Failed.php', - 'PHPUnit\\Event\\Test\\FailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/FailedSubscriber.php', - 'PHPUnit\\Event\\Test\\Finished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Finished.php', - 'PHPUnit\\Event\\Test\\FinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/FinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\MarkedIncomplete' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncomplete.php', - 'PHPUnit\\Event\\Test\\MarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php', - 'PHPUnit\\Event\\Test\\MockObjectCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php', - 'PHPUnit\\Event\\Test\\MockObjectCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php', - 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\NoComparisonFailureException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php', - 'PHPUnit\\Event\\Test\\NoticeTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php', - 'PHPUnit\\Event\\Test\\NoticeTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PartialMockObjectCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreated.php', - 'PHPUnit\\Event\\Test\\PartialMockObjectCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\Passed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Passed.php', - 'PHPUnit\\Event\\Test\\PassedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/PassedSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpDeprecationTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\PhpDeprecationTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpNoticeTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggered.php', - 'PHPUnit\\Event\\Test\\PhpNoticeTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpWarningTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggered.php', - 'PHPUnit\\Event\\Test\\PhpWarningTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitDeprecationTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitDeprecationTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitErrorTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitErrorTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitNoticeTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitNoticeTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitWarningTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitWarningTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalled.php', - 'PHPUnit\\Event\\Test\\PostConditionCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErrored.php', - 'PHPUnit\\Event\\Test\\PostConditionErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailed.php', - 'PHPUnit\\Event\\Test\\PostConditionFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinished.php', - 'PHPUnit\\Event\\Test\\PostConditionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalled.php', - 'PHPUnit\\Event\\Test\\PreConditionCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErrored.php', - 'PHPUnit\\Event\\Test\\PreConditionErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailed.php', - 'PHPUnit\\Event\\Test\\PreConditionFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinished.php', - 'PHPUnit\\Event\\Test\\PreConditionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErrored.php', - 'PHPUnit\\Event\\Test\\PreparationErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailed.php', - 'PHPUnit\\Event\\Test\\PreparationFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationStarted' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStarted.php', - 'PHPUnit\\Event\\Test\\PreparationStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStartedSubscriber.php', - 'PHPUnit\\Event\\Test\\Prepared' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Prepared.php', - 'PHPUnit\\Event\\Test\\PreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparedSubscriber.php', - 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutput' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php', - 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutputSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php', - 'PHPUnit\\Event\\Test\\Skipped' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php', - 'PHPUnit\\Event\\Test\\SkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php', - 'PHPUnit\\Event\\Test\\TestStubCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php', - 'PHPUnit\\Event\\Test\\TestStubCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php', - 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\WarningTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggered.php', - 'PHPUnit\\Event\\Test\\WarningTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Tracer\\Tracer' => $vendorDir . '/phpunit/phpunit/src/Event/Tracer.php', - 'PHPUnit\\Event\\TypeMap' => $vendorDir . '/phpunit/phpunit/src/Event/TypeMap.php', - 'PHPUnit\\Event\\UnknownEventException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/UnknownEventException.php', - 'PHPUnit\\Event\\UnknownEventTypeException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/UnknownEventTypeException.php', - 'PHPUnit\\Event\\UnknownSubscriberException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/UnknownSubscriberException.php', - 'PHPUnit\\Event\\UnknownSubscriberTypeException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/UnknownSubscriberTypeException.php', - 'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ActualValueIsNotAnObjectException.php', - 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php', - 'PHPUnit\\Framework\\Attributes\\After' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/After.php', - 'PHPUnit\\Framework\\Attributes\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/AfterClass.php', - 'PHPUnit\\Framework\\Attributes\\BackupGlobals' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BackupGlobals.php', - 'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php', - 'PHPUnit\\Framework\\Attributes\\Before' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Before.php', - 'PHPUnit\\Framework\\Attributes\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php', - 'PHPUnit\\Framework\\Attributes\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', - 'PHPUnit\\Framework\\Attributes\\CoversMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php', - 'PHPUnit\\Framework\\Attributes\\CoversNamespace' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php', - 'PHPUnit\\Framework\\Attributes\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', - 'PHPUnit\\Framework\\Attributes\\CoversTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php', - 'PHPUnit\\Framework\\Attributes\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DataProvider.php', - 'PHPUnit\\Framework\\Attributes\\DataProviderExternal' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DataProviderExternal.php', - 'PHPUnit\\Framework\\Attributes\\Depends' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Depends.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternal' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsExternal.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternalUsingDeepClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternalUsingShallowClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClass.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClassUsingDeepClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClassUsingShallowClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsUsingDeepClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsUsingShallowClone' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DependsUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DisableReturnValueGenerationForTestDoubles' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DisableReturnValueGenerationForTestDoubles.php', - 'PHPUnit\\Framework\\Attributes\\DoesNotPerformAssertions' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DoesNotPerformAssertions.php', - 'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php', - 'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php', - 'PHPUnit\\Framework\\Attributes\\Group' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Group.php', - 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php', - 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php', - 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitWarnings' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitWarnings.php', - 'PHPUnit\\Framework\\Attributes\\Large' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Large.php', - 'PHPUnit\\Framework\\Attributes\\Medium' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Medium.php', - 'PHPUnit\\Framework\\Attributes\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', - 'PHPUnit\\Framework\\Attributes\\PreCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PreCondition.php', - 'PHPUnit\\Framework\\Attributes\\PreserveGlobalState' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php', - 'PHPUnit\\Framework\\Attributes\\RequiresEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php', - 'PHPUnit\\Framework\\Attributes\\RequiresFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php', - 'PHPUnit\\Framework\\Attributes\\RequiresMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php', - 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystem' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php', - 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystemFamily' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystemFamily.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhp' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhp.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpExtension' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpExtension.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpunit' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunit.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpunitExtension' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunitExtension.php', - 'PHPUnit\\Framework\\Attributes\\RequiresSetting' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresSetting.php', - 'PHPUnit\\Framework\\Attributes\\RunClassInSeparateProcess' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RunClassInSeparateProcess.php', - 'PHPUnit\\Framework\\Attributes\\RunInSeparateProcess' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RunInSeparateProcess.php', - 'PHPUnit\\Framework\\Attributes\\RunTestsInSeparateProcesses' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RunTestsInSeparateProcesses.php', - 'PHPUnit\\Framework\\Attributes\\Small' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Small.php', - 'PHPUnit\\Framework\\Attributes\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Test.php', - 'PHPUnit\\Framework\\Attributes\\TestDox' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestDox.php', - 'PHPUnit\\Framework\\Attributes\\TestDoxFormatter' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatter.php', - 'PHPUnit\\Framework\\Attributes\\TestDoxFormatterExternal' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatterExternal.php', - 'PHPUnit\\Framework\\Attributes\\TestWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestWith.php', - 'PHPUnit\\Framework\\Attributes\\TestWithJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php', - 'PHPUnit\\Framework\\Attributes\\Ticket' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Ticket.php', - 'PHPUnit\\Framework\\Attributes\\UsesClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php', - 'PHPUnit\\Framework\\Attributes\\UsesFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php', - 'PHPUnit\\Framework\\Attributes\\UsesMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php', - 'PHPUnit\\Framework\\Attributes\\UsesNamespace' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php', - 'PHPUnit\\Framework\\Attributes\\UsesTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php', - 'PHPUnit\\Framework\\Attributes\\WithEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/WithEnvironmentVariable.php', - 'PHPUnit\\Framework\\Attributes\\WithoutErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php', - 'PHPUnit\\Framework\\ChildProcessResultProcessor' => $vendorDir . '/phpunit/phpunit/src/Framework/TestRunner/ChildProcessResultProcessor.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotAcceptParameterTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareParameterTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotExistException.php', - 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php', - 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php', - 'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php', - 'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php', - 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php', - 'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionMessageIsOrContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageIsOrContains.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionMessageMatchesRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageMatchesRegularExpression.php', - 'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php', - 'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php', - 'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php', - 'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php', - 'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php', - 'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php', - 'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php', - 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php', - 'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php', - 'PHPUnit\\Framework\\Constraint\\IsList' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/IsList.php', - 'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php', - 'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php', - 'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php', - 'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php', - 'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php', - 'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php', - 'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php', - 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php', - 'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php', - 'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php', - 'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', - 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', - 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', - 'PHPUnit\\Framework\\Constraint\\Operator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', - 'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', - 'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', - 'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php', - 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php', - 'PHPUnit\\Framework\\Constraint\\StringEqualsStringIgnoringLineEndings' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringEqualsStringIgnoringLineEndings.php', - 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php', - 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php', - 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php', - 'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php', - 'PHPUnit\\Framework\\EmptyStringException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/EmptyStringException.php', - 'PHPUnit\\Framework\\ErrorLogNotWritableException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ErrorLogNotWritableException.php', - 'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Exception.php', - 'PHPUnit\\Framework\\ExecutionOrderDependency' => $vendorDir . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php', - 'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php', - 'PHPUnit\\Framework\\GeneratorNotSupportedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/GeneratorNotSupportedException.php', - 'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTest.php', - 'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTestError.php', - 'PHPUnit\\Framework\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php', - 'PHPUnit\\Framework\\InvalidDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php', - 'PHPUnit\\Framework\\InvalidDependencyException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDependencyException.php', - 'PHPUnit\\Framework\\IsolatedTestRunner' => $vendorDir . '/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunner.php', - 'PHPUnit\\Framework\\IsolatedTestRunnerRegistry' => $vendorDir . '/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunnerRegistry.php', - 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', - 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', - 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', - 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DuplicateMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\HookedProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\HookedPropertyGenerator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\InvalidMethodNameException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\MethodNamedMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\NameAlreadyInUseException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\TemplateLoader' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownInterfaceException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownInterfaceException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php', - 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', - 'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php', - 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php', - 'PHPUnit\\Framework\\MockObject\\InvocationStubber' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/InvocationStubber.php', - 'PHPUnit\\Framework\\MockObject\\InvocationStubberImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationStubberImplementation.php', - 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php', - 'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php', - 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php', - 'PHPUnit\\Framework\\MockObject\\Method' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php', - 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/MethodNameConstraint.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php', - 'PHPUnit\\Framework\\MockObject\\MockObjectApi' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php', - 'PHPUnit\\Framework\\MockObject\\MockObjectInternal' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php', - 'PHPUnit\\Framework\\MockObject\\NeverReturningMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php', - 'PHPUnit\\Framework\\MockObject\\NoMoreReturnValuesConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\ProxiedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php', - 'PHPUnit\\Framework\\MockObject\\ReturnValueGenerator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php', - 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyInvokedCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyParameters.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvocationOrder.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastOnce.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtMostCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/MethodName.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/Parameters.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/ParametersRule.php', - 'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertyGetHook' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyGetHook.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertyHook' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyHook.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertySetHook' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertySetHook.php', - 'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php', - 'PHPUnit\\Framework\\MockObject\\StubApi' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/StubApi.php', - 'PHPUnit\\Framework\\MockObject\\StubInternal' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ConsecutiveCalls.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnArgument.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnReference.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnSelf.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnStub.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnValueMap.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Stub.php', - 'PHPUnit\\Framework\\MockObject\\TestDoubleState' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php', - 'PHPUnit\\Framework\\NativeType' => $vendorDir . '/phpunit/phpunit/src/Framework/NativeType.php', - 'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php', - 'PHPUnit\\Framework\\PhptAssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/PhptAssertionFailedError.php', - 'PHPUnit\\Framework\\ProcessIsolationException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ProcessIsolationException.php', - 'PHPUnit\\Framework\\Reorderable' => $vendorDir . '/phpunit/phpunit/src/Framework/Reorderable.php', - 'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit\\Framework\\SeparateProcessTestRunner' => $vendorDir . '/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php', - 'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTest.php', - 'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTestSuiteError.php', - 'PHPUnit\\Framework\\SkippedWithMessageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedWithMessageException.php', - 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit\\Framework\\TestBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/TestBuilder.php', - 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit\\Framework\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php', - 'PHPUnit\\Framework\\TestSize\\Known' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/Known.php', - 'PHPUnit\\Framework\\TestSize\\Large' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/Large.php', - 'PHPUnit\\Framework\\TestSize\\Medium' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/Medium.php', - 'PHPUnit\\Framework\\TestSize\\Small' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/Small.php', - 'PHPUnit\\Framework\\TestSize\\TestSize' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/TestSize.php', - 'PHPUnit\\Framework\\TestSize\\Unknown' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSize/Unknown.php', - 'PHPUnit\\Framework\\TestStatus\\Deprecation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php', - 'PHPUnit\\Framework\\TestStatus\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Error.php', - 'PHPUnit\\Framework\\TestStatus\\Failure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Failure.php', - 'PHPUnit\\Framework\\TestStatus\\Incomplete' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php', - 'PHPUnit\\Framework\\TestStatus\\Known' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Known.php', - 'PHPUnit\\Framework\\TestStatus\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Notice.php', - 'PHPUnit\\Framework\\TestStatus\\Risky' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Risky.php', - 'PHPUnit\\Framework\\TestStatus\\Skipped' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Skipped.php', - 'PHPUnit\\Framework\\TestStatus\\Success' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Success.php', - 'PHPUnit\\Framework\\TestStatus\\TestStatus' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php', - 'PHPUnit\\Framework\\TestStatus\\Unknown' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Unknown.php', - 'PHPUnit\\Framework\\TestStatus\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/TestStatus/Warning.php', - 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', - 'PHPUnit\\Framework\\UnknownClassOrInterfaceException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php', - 'PHPUnit\\Framework\\UnknownNativeTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php', - 'PHPUnit\\Logging\\EventLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/EventLogger.php', - 'PHPUnit\\Logging\\JUnit\\JunitXmlLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php', - 'PHPUnit\\Logging\\JUnit\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationErroredSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPrintedUnexpectedOutputSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPrintedUnexpectedOutputSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestRunnerExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSuiteFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSuiteStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\AfterLastTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\AfterLastTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\BeforeFirstTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\BeforeFirstTestMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\CannotOpenUriForWritingException' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/CannotOpenUriForWritingException.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Exception' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/Exception.php', - 'PHPUnit\\Logging\\OpenTestReporting\\InfrastructureInformationProvider' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/InfrastructureInformationProvider.php', - 'PHPUnit\\Logging\\OpenTestReporting\\OtrXmlLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/OtrXmlLogger.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Status' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Status.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestAbortedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestAbortedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparationErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparationFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestRunnerFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestRunnerStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerStartedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TeamCityLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php', - 'PHPUnit\\Logging\\TeamCity\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestRunnerExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestRunnerExecutionFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteBeforeFirstTestMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteBeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\HtmlRenderer' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php', - 'PHPUnit\\Logging\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php', - 'PHPUnit\\Logging\\TestDox\\PlainTextRenderer' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php', - 'PHPUnit\\Logging\\TestDox\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', - 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php', - 'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php', - 'PHPUnit\\Metadata\\Api\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php', - 'PHPUnit\\Metadata\\Api\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/DataProvider.php', - 'PHPUnit\\Metadata\\Api\\Dependencies' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/Dependencies.php', - 'PHPUnit\\Metadata\\Api\\Groups' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/Groups.php', - 'PHPUnit\\Metadata\\Api\\HookMethods' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/HookMethods.php', - 'PHPUnit\\Metadata\\Api\\ProvidedData' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/ProvidedData.php', - 'PHPUnit\\Metadata\\Api\\Requirements' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/Requirements.php', - 'PHPUnit\\Metadata\\BackupGlobals' => $vendorDir . '/phpunit/phpunit/src/Metadata/BackupGlobals.php', - 'PHPUnit\\Metadata\\BackupStaticProperties' => $vendorDir . '/phpunit/phpunit/src/Metadata/BackupStaticProperties.php', - 'PHPUnit\\Metadata\\Before' => $vendorDir . '/phpunit/phpunit/src/Metadata/Before.php', - 'PHPUnit\\Metadata\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/BeforeClass.php', - 'PHPUnit\\Metadata\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php', - 'PHPUnit\\Metadata\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversFunction.php', - 'PHPUnit\\Metadata\\CoversMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversMethod.php', - 'PHPUnit\\Metadata\\CoversNamespace' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversNamespace.php', - 'PHPUnit\\Metadata\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversNothing.php', - 'PHPUnit\\Metadata\\CoversTrait' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversTrait.php', - 'PHPUnit\\Metadata\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Metadata/DataProvider.php', - 'PHPUnit\\Metadata\\DependsOnClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/DependsOnClass.php', - 'PHPUnit\\Metadata\\DependsOnMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/DependsOnMethod.php', - 'PHPUnit\\Metadata\\DisableReturnValueGenerationForTestDoubles' => $vendorDir . '/phpunit/phpunit/src/Metadata/DisableReturnValueGenerationForTestDoubles.php', - 'PHPUnit\\Metadata\\DoesNotPerformAssertions' => $vendorDir . '/phpunit/phpunit/src/Metadata/DoesNotPerformAssertions.php', - 'PHPUnit\\Metadata\\Exception' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/Exception.php', - 'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php', - 'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php', - 'PHPUnit\\Metadata\\Group' => $vendorDir . '/phpunit/phpunit/src/Metadata/Group.php', - 'PHPUnit\\Metadata\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php', - 'PHPUnit\\Metadata\\IgnorePhpunitDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php', - 'PHPUnit\\Metadata\\IgnorePhpunitWarnings' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnorePhpunitWarnings.php', - 'PHPUnit\\Metadata\\InvalidAttributeException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/InvalidAttributeException.php', - 'PHPUnit\\Metadata\\InvalidVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php', - 'PHPUnit\\Metadata\\Metadata' => $vendorDir . '/phpunit/phpunit/src/Metadata/Metadata.php', - 'PHPUnit\\Metadata\\MetadataCollection' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', - 'PHPUnit\\Metadata\\MetadataCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php', - 'PHPUnit\\Metadata\\NoVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php', - 'PHPUnit\\Metadata\\Parser\\AttributeParser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php', - 'PHPUnit\\Metadata\\Parser\\CachingParser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/CachingParser.php', - 'PHPUnit\\Metadata\\Parser\\Parser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Parser.php', - 'PHPUnit\\Metadata\\Parser\\Registry' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Registry.php', - 'PHPUnit\\Metadata\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Metadata/PostCondition.php', - 'PHPUnit\\Metadata\\PreCondition' => $vendorDir . '/phpunit/phpunit/src/Metadata/PreCondition.php', - 'PHPUnit\\Metadata\\PreserveGlobalState' => $vendorDir . '/phpunit/phpunit/src/Metadata/PreserveGlobalState.php', - 'PHPUnit\\Metadata\\RequiresEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php', - 'PHPUnit\\Metadata\\RequiresFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresFunction.php', - 'PHPUnit\\Metadata\\RequiresMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresMethod.php', - 'PHPUnit\\Metadata\\RequiresOperatingSystem' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php', - 'PHPUnit\\Metadata\\RequiresOperatingSystemFamily' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php', - 'PHPUnit\\Metadata\\RequiresPhp' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresPhp.php', - 'PHPUnit\\Metadata\\RequiresPhpExtension' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php', - 'PHPUnit\\Metadata\\RequiresPhpunit' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresPhpunit.php', - 'PHPUnit\\Metadata\\RequiresPhpunitExtension' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresPhpunitExtension.php', - 'PHPUnit\\Metadata\\RequiresSetting' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresSetting.php', - 'PHPUnit\\Metadata\\RunClassInSeparateProcess' => $vendorDir . '/phpunit/phpunit/src/Metadata/RunClassInSeparateProcess.php', - 'PHPUnit\\Metadata\\RunInSeparateProcess' => $vendorDir . '/phpunit/phpunit/src/Metadata/RunInSeparateProcess.php', - 'PHPUnit\\Metadata\\RunTestsInSeparateProcesses' => $vendorDir . '/phpunit/phpunit/src/Metadata/RunTestsInSeparateProcesses.php', - 'PHPUnit\\Metadata\\Test' => $vendorDir . '/phpunit/phpunit/src/Metadata/Test.php', - 'PHPUnit\\Metadata\\TestDox' => $vendorDir . '/phpunit/phpunit/src/Metadata/TestDox.php', - 'PHPUnit\\Metadata\\TestDoxFormatter' => $vendorDir . '/phpunit/phpunit/src/Metadata/TestDoxFormatter.php', - 'PHPUnit\\Metadata\\TestWith' => $vendorDir . '/phpunit/phpunit/src/Metadata/TestWith.php', - 'PHPUnit\\Metadata\\UsesClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php', - 'PHPUnit\\Metadata\\UsesFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesFunction.php', - 'PHPUnit\\Metadata\\UsesMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesMethod.php', - 'PHPUnit\\Metadata\\UsesNamespace' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesNamespace.php', - 'PHPUnit\\Metadata\\UsesTrait' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesTrait.php', - 'PHPUnit\\Metadata\\Version\\ComparisonRequirement' => $vendorDir . '/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php', - 'PHPUnit\\Metadata\\Version\\ConstraintRequirement' => $vendorDir . '/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php', - 'PHPUnit\\Metadata\\Version\\Requirement' => $vendorDir . '/phpunit/phpunit/src/Metadata/Version/Requirement.php', - 'PHPUnit\\Metadata\\WithEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Metadata/WithEnvironmentVariable.php', - 'PHPUnit\\Metadata\\WithoutErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Metadata/WithoutErrorHandler.php', - 'PHPUnit\\Runner\\BackedUpEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Runner/BackedUpEnvironmentVariable.php', - 'PHPUnit\\Runner\\Baseline\\Baseline' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Baseline.php', - 'PHPUnit\\Runner\\Baseline\\CannotLoadBaselineException' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Exception/CannotLoadBaselineException.php', - 'PHPUnit\\Runner\\Baseline\\CannotWriteBaselineException' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Exception/CannotWriteBaselineException.php', - 'PHPUnit\\Runner\\Baseline\\FileDoesNotHaveLineException' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Exception/FileDoesNotHaveLineException.php', - 'PHPUnit\\Runner\\Baseline\\Generator' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Generator.php', - 'PHPUnit\\Runner\\Baseline\\Issue' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Issue.php', - 'PHPUnit\\Runner\\Baseline\\Reader' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Reader.php', - 'PHPUnit\\Runner\\Baseline\\RelativePathCalculator' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/RelativePathCalculator.php', - 'PHPUnit\\Runner\\Baseline\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\Writer' => $vendorDir . '/phpunit/phpunit/src/Runner/Baseline/Writer.php', - 'PHPUnit\\Runner\\ClassCannotBeFoundException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassCannotBeFoundException.php', - 'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php', - 'PHPUnit\\Runner\\ClassIsAbstractException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php', - 'PHPUnit\\Runner\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Runner/CodeCoverage.php', - 'PHPUnit\\Runner\\CodeCoverageInitializationStatus' => $vendorDir . '/phpunit/phpunit/src/Runner/CodeCoverageInitializationStatus.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Collector' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Facade' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php', - 'PHPUnit\\Runner\\DeprecationCollector\\InIsolationCollector' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/InIsolationCollector.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\DeprecationCollector\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Runner\\DeprecationCollector\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Runner\\DirectoryDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/DirectoryDoesNotExistException.php', - 'PHPUnit\\Runner\\ErrorException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php', - 'PHPUnit\\Runner\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ErrorHandler.php', - 'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/Exception.php', - 'PHPUnit\\Runner\\Extension\\Extension' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/Extension.php', - 'PHPUnit\\Runner\\Extension\\ExtensionBootstrapper' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php', - 'PHPUnit\\Runner\\Extension\\Facade' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/Facade.php', - 'PHPUnit\\Runner\\Extension\\ParameterCollection' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/ParameterCollection.php', - 'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', - 'PHPUnit\\Runner\\FileDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php', - 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\ExcludeNameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\IncludeNameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php', - 'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\ExecutionStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionStartedSubscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\GarbageCollectionHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/GarbageCollectionHandler.php', - 'PHPUnit\\Runner\\GarbageCollection\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Runner\\HookMethod' => $vendorDir . '/phpunit/phpunit/src/Runner/HookMethod/HookMethod.php', - 'PHPUnit\\Runner\\HookMethodCollection' => $vendorDir . '/phpunit/phpunit/src/Runner/HookMethod/HookMethodCollection.php', - 'PHPUnit\\Runner\\InvalidOrderException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/InvalidOrderException.php', - 'PHPUnit\\Runner\\ParameterDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ParameterDoesNotExistException.php', - 'PHPUnit\\Runner\\Phpt\\InvalidPhptFileException' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/Exception/InvalidPhptFileException.php', - 'PHPUnit\\Runner\\Phpt\\Parser' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/Parser.php', - 'PHPUnit\\Runner\\Phpt\\PhptExternalFileCannotBeLoadedException' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/Exception/PhptExternalFileCannotBeLoadedException.php', - 'PHPUnit\\Runner\\Phpt\\Renderer' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/Renderer.php', - 'PHPUnit\\Runner\\Phpt\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/TestCase.php', - 'PHPUnit\\Runner\\Phpt\\UnsupportedPhptSectionException' => $vendorDir . '/phpunit/phpunit/src/Runner/Phpt/Exception/UnsupportedPhptSectionException.php', - 'PHPUnit\\Runner\\ResultCache\\DefaultResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\NullResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/NullResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/ResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCacheHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCacheId' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/ResultCacheId.php', - 'PHPUnit\\Runner\\ResultCache\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSuiteFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSuiteStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Runner\\ShutdownHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ShutdownHandler.php', - 'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', - 'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit\\TestRunner\\IssueFilter' => $vendorDir . '/phpunit/phpunit/src/Runner/IssueFilter.php', - 'PHPUnit\\TestRunner\\TestResult\\AfterTestClassMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\AfterTestClassMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\BeforeTestClassMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\BeforeTestClassMethodFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\ChildProcessErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/ChildProcessErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\Collector' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Collector.php', - 'PHPUnit\\TestRunner\\TestResult\\ExecutionStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/ExecutionStartedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\Facade' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Facade.php', - 'PHPUnit\\TestRunner\\TestResult\\Issues\\Issue' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Issue.php', - 'PHPUnit\\TestRunner\\TestResult\\PassedTests' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/PassedTests.php', - 'PHPUnit\\TestRunner\\TestResult\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/Subscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/TestResult.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredErrorSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\TextUI\\Application' => $vendorDir . '/phpunit/phpunit/src/TextUI/Application.php', - 'PHPUnit\\TextUI\\CannotOpenSocketException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/CannotOpenSocketException.php', - 'PHPUnit\\TextUI\\CliArguments\\Builder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php', - 'PHPUnit\\TextUI\\CliArguments\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php', - 'PHPUnit\\TextUI\\CliArguments\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php', - 'PHPUnit\\TextUI\\CliArguments\\XmlConfigurationFileFinder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Cli/XmlConfigurationFileFinder.php', - 'PHPUnit\\TextUI\\Command\\AtLeastVersionCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php', - 'PHPUnit\\TextUI\\Command\\CheckPhpConfigurationCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/CheckPhpConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Command.php', - 'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestFilesCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php', - 'PHPUnit\\TextUI\\Command\\MigrateConfigurationCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\Result' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Result.php', - 'PHPUnit\\TextUI\\Command\\ShowHelpCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ShowHelpCommand.php', - 'PHPUnit\\TextUI\\Command\\ShowVersionCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ShowVersionCommand.php', - 'PHPUnit\\TextUI\\Command\\VersionCheckCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/VersionCheckCommand.php', - 'PHPUnit\\TextUI\\Command\\WarmCodeCoverageCacheCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapLoader' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/BootstrapLoader.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapScriptDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptDoesNotExistException.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapScriptException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptException.php', - 'PHPUnit\\TextUI\\Configuration\\Builder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Builder.php', - 'PHPUnit\\TextUI\\Configuration\\CodeCoverageFilterRegistry' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/CodeCoverageFilterRegistry.php', - 'PHPUnit\\TextUI\\Configuration\\CodeCoverageReportNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/CodeCoverageReportNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Configuration.php', - 'PHPUnit\\TextUI\\Configuration\\ConfigurationCannotBeBuiltException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/ConfigurationCannotBeBuiltException.php', - 'PHPUnit\\TextUI\\Configuration\\Constant' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Constant.php', - 'PHPUnit\\TextUI\\Configuration\\ConstantCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollection.php', - 'PHPUnit\\TextUI\\Configuration\\ConstantCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Directory.php', - 'PHPUnit\\TextUI\\Configuration\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/Exception.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrap' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrap.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrapCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollection.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrapCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\File' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/File.php', - 'PHPUnit\\TextUI\\Configuration\\FileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollection.php', - 'PHPUnit\\TextUI\\Configuration\\FileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectory' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectory.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\FilterNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/FilterNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Group' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Group.php', - 'PHPUnit\\TextUI\\Configuration\\GroupCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollection.php', - 'PHPUnit\\TextUI\\Configuration\\GroupCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\IniSetting' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSetting.php', - 'PHPUnit\\TextUI\\Configuration\\IniSettingCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollection.php', - 'PHPUnit\\TextUI\\Configuration\\IniSettingCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\LoggingNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/LoggingNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Merger' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Merger.php', - 'PHPUnit\\TextUI\\Configuration\\NoBaselineException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBaselineException.php', - 'PHPUnit\\TextUI\\Configuration\\NoBootstrapException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBootstrapException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCacheDirectoryException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCacheDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\NoConfigurationFileException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoConfigurationFileException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCoverageCacheDirectoryException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCoverageCacheDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCustomCssFileException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCustomCssFileException.php', - 'PHPUnit\\TextUI\\Configuration\\NoDefaultTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoDefaultTestSuiteException.php', - 'PHPUnit\\TextUI\\Configuration\\NoPharExtensionDirectoryException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoPharExtensionDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php', - 'PHPUnit\\TextUI\\Configuration\\PhpHandler' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/PhpHandler.php', - 'PHPUnit\\TextUI\\Configuration\\Registry' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Registry.php', - 'PHPUnit\\TextUI\\Configuration\\Source' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php', - 'PHPUnit\\TextUI\\Configuration\\SourceFilter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/SourceFilter.php', - 'PHPUnit\\TextUI\\Configuration\\SourceMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/SourceMapper.php', - 'PHPUnit\\TextUI\\Configuration\\SpecificDeprecationToStopOnNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/SpecificDeprecationToStopOnNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectory' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectory.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\TestFile' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFile.php', - 'PHPUnit\\TextUI\\Configuration\\TestFileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestFileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuite.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteBuilder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/TestSuiteBuilder.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Variable' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/Variable.php', - 'PHPUnit\\TextUI\\Configuration\\VariableCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollection.php', - 'PHPUnit\\TextUI\\Configuration\\VariableCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollectionIterator.php', - 'PHPUnit\\TextUI\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/Exception.php', - 'PHPUnit\\TextUI\\Help' => $vendorDir . '/phpunit/phpunit/src/TextUI/Help.php', - 'PHPUnit\\TextUI\\InvalidSocketException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/InvalidSocketException.php', - 'PHPUnit\\TextUI\\Output\\DefaultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Printer/DefaultPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\BeforeTestClassMethodErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/BeforeTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\ChildProcessErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/ChildProcessErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\ProgressPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/Subscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestRunnerExecutionStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestRunnerExecutionStartedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredErrorSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpunitDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpunitWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\UnexpectedOutputPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php', - 'PHPUnit\\TextUI\\Output\\Facade' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Facade.php', - 'PHPUnit\\TextUI\\Output\\NullPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Printer/NullPrinter.php', - 'PHPUnit\\TextUI\\Output\\Printer' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/Printer/Printer.php', - 'PHPUnit\\TextUI\\Output\\SummaryPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/SummaryPrinter.php', - 'PHPUnit\\TextUI\\Output\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php', - 'PHPUnit\\TextUI\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php', - 'PHPUnit\\TextUI\\ShellExitCodeCalculator' => $vendorDir . '/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php', - 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php', - 'PHPUnit\\TextUI\\TestFileNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php', - 'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit\\TextUI\\TestSuiteFilterProcessor' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestSuiteFilterProcessor.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CannotFindSchemaException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Exception/CannotFindSchemaException.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Clover.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Cobertura.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Crap4j.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Html.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\OpenClover' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/OpenClover.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Text.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Xml.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Configuration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ConvertLogTypes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCloverToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCrap4jToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageHtmlToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoveragePhpToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageTextToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageXmlToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\DefaultConfiguration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\FailedSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/FailedSchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Groups.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCacheDirectoryAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCacheDirectoryAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCoverageElement.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\LoadedFromFileConfiguration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/LoadedFromFileConfiguration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/LogToReportMigration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Junit.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Logging.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Otr' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Otr.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TeamCity.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Html.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Text.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/Migration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationException.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromRootToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveCoverageDirectoriesToSource' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/PHPUnit.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveBeStrictAboutTodoAnnotatedTestsAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutTodoAnnotatedTestsAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheResultFileAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheResultFileAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheTokensAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveConversionToExceptionsAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveConversionToExceptionsAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCoverageElementCacheDirectoryAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementCacheDirectoryAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCoverageElementProcessUncoveredFilesAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementProcessUncoveredFilesAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveEmptyFilter.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveListeners' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveListeners.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLogTypes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameBackupStaticAttributesAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBackupStaticAttributesAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameBeStrictAboutCoversAnnotationAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBeStrictAboutCoversAnnotationAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameForceCoversAnnotationAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameForceCoversAnnotationAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ReplaceRestrictDeprecationsWithIgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ReplaceRestrictDeprecationsWithIgnoreDeprecations.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaDetector' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaFinder' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SnapshotNodeList' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SuccessfulSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/TestSuiteMapper.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocation' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Validator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php', - 'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php', - 'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/Exception.php', - 'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php', - 'PHPUnit\\Util\\Exporter' => $vendorDir . '/phpunit/phpunit/src/Util/Exporter.php', - 'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit\\Util\\Http\\Downloader' => $vendorDir . '/phpunit/phpunit/src/Util/Http/Downloader.php', - 'PHPUnit\\Util\\Http\\PhpDownloader' => $vendorDir . '/phpunit/phpunit/src/Util/Http/PhpDownloader.php', - 'PHPUnit\\Util\\InvalidDirectoryException' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/InvalidDirectoryException.php', - 'PHPUnit\\Util\\InvalidJsonException' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/InvalidJsonException.php', - 'PHPUnit\\Util\\InvalidVersionOperatorException' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/InvalidVersionOperatorException.php', - 'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php', - 'PHPUnit\\Util\\PHP\\DefaultJobRunner' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultJobRunner.php', - 'PHPUnit\\Util\\PHP\\Job' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Job.php', - 'PHPUnit\\Util\\PHP\\JobRunner' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/JobRunner.php', - 'PHPUnit\\Util\\PHP\\JobRunnerRegistry' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/JobRunnerRegistry.php', - 'PHPUnit\\Util\\PHP\\PhpProcessException' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/PhpProcessException.php', - 'PHPUnit\\Util\\PHP\\Result' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Result.php', - 'PHPUnit\\Util\\Reflection' => $vendorDir . '/phpunit/phpunit/src/Util/Reflection.php', - 'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit\\Util\\ThrowableToStringMapper' => $vendorDir . '/phpunit/phpunit/src/Util/ThrowableToStringMapper.php', - 'PHPUnit\\Util\\VersionComparisonOperator' => $vendorDir . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php', - 'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Xml.php', - 'PHPUnit\\Util\\Xml\\Loader' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Loader.php', - 'PHPUnit\\Util\\Xml\\XmlException' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/XmlException.php', - 'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php', - 'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php', - 'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php', - 'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php', - 'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php', - 'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php', - 'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php', - 'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php', - 'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php', - 'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php', - 'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php', - 'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php', - 'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php', - 'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php', - 'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php', - 'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php', - 'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php', - 'PharIo\\Manifest\\ElementCollectionException' => $vendorDir . '/phar-io/manifest/src/exceptions/ElementCollectionException.php', - 'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php', - 'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php', - 'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php', - 'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php', - 'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php', - 'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php', - 'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php', - 'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php', - 'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php', - 'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php', - 'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php', - 'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php', - 'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php', - 'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php', - 'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php', - 'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php', - 'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php', - 'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php', - 'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php', - 'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php', - 'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php', - 'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', - 'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php', - 'PharIo\\Manifest\\NoEmailAddressException' => $vendorDir . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', - 'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php', - 'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', - 'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php', - 'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php', - 'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php', - 'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php', - 'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php', - 'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php', - 'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php', - 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', - 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', - 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php', - 'PharIo\\Version\\BuildMetaData' => $vendorDir . '/phar-io/version/src/BuildMetaData.php', - 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php', - 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php', - 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', - 'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', - 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php', - 'PharIo\\Version\\NoBuildMetaDataException' => $vendorDir . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php', - 'PharIo\\Version\\NoPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php', - 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', - 'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php', - 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', - 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', - 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', - 'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php', - 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php', - 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php', - 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php', - 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php', - 'SQLite3Exception' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php', - 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', - 'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php', - 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', - 'SebastianBergmann\\CliParser\\Parser' => $vendorDir . '/sebastian/cli-parser/src/Parser.php', - 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php', - 'SebastianBergmann\\CliParser\\UnknownOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php', - 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php', - 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'SebastianBergmann\\CodeCoverage\\Data\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php', - 'SebastianBergmann\\CodeCoverage\\Data\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Selector.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/XdebugDriver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugVersionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php', - 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php', - 'SebastianBergmann\\CodeCoverage\\FileCouldNotBeWrittenException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php', - 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php', - 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', - 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php', - 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/Node/CrapIndex.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php', - 'SebastianBergmann\\CodeCoverage\\ParserException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ParserException.php', - 'SebastianBergmann\\CodeCoverage\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', - 'SebastianBergmann\\CodeCoverage\\ReflectionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php', - 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Cobertura.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Colors' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Colors.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\CustomCssFile' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', - 'SebastianBergmann\\CodeCoverage\\Report\\OpenClover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/OpenClover.php', - 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Thresholds' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Thresholds.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\AnalysisResult' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/AnalysisResult.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\AttributeParentConnectingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/AttributeParentConnectingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingSourceAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingSourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Class_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/CodeUnitFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/ExecutableLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Function_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/IgnoredLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Interface_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\LinesOfCode' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingSourceAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingSourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\SourceAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/SourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Trait_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Visibility' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php', - 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Class_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Class_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatExtendClass' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatImplementInterface' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Function_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Function_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\InvalidCodeCoverageTargetException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\MapBuilder' => $vendorDir . '/phpunit/php-code-coverage/src/Target/MapBuilder.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Mapper' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Mapper.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Method.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Namespace_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Namespace_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Target' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Target.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollection' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollection.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionIterator' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionValidator' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Trait_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationFailure' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationFailure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationResult' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationResult.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationSuccess' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationSuccess.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Known' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Known.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Large' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Large.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Medium' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Medium.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Small' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Small.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\TestSize' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/TestSize.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Unknown' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Unknown.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Failure' => $vendorDir . '/phpunit/php-code-coverage/src/TestStatus/Failure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Known' => $vendorDir . '/phpunit/php-code-coverage/src/TestStatus/Known.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Success' => $vendorDir . '/phpunit/php-code-coverage/src/TestStatus/Success.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\TestStatus' => $vendorDir . '/phpunit/php-code-coverage/src/TestStatus/TestStatus.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Unknown' => $vendorDir . '/phpunit/php-code-coverage/src/TestStatus/Unknown.php', - 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', - 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Filesystem.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Xml' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Xml.php', - 'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php', - 'SebastianBergmann\\CodeCoverage\\WriteOperationFailedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php', - 'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\ClosureComparator' => $vendorDir . '/sebastian/comparator/src/ClosureComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\EnumerationComparator' => $vendorDir . '/sebastian/comparator/src/EnumerationComparator.php', - 'SebastianBergmann\\Comparator\\Exception' => $vendorDir . '/sebastian/comparator/src/exceptions/Exception.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumberComparator' => $vendorDir . '/sebastian/comparator/src/NumberComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\RuntimeException' => $vendorDir . '/sebastian/comparator/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Complexity\\Calculator' => $vendorDir . '/sebastian/complexity/src/Calculator.php', - 'SebastianBergmann\\Complexity\\Complexity' => $vendorDir . '/sebastian/complexity/src/Complexity/Complexity.php', - 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php', - 'SebastianBergmann\\Complexity\\ComplexityCollection' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollection.php', - 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php', - 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php', - 'SebastianBergmann\\Complexity\\Exception' => $vendorDir . '/sebastian/complexity/src/Exception/Exception.php', - 'SebastianBergmann\\Complexity\\RuntimeException' => $vendorDir . '/sebastian/complexity/src/Exception/RuntimeException.php', - 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php', - 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php', - 'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php', - 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php', - 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php', - 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\FileIterator\\ExcludeIterator' => $vendorDir . '/phpunit/php-file-iterator/src/ExcludeIterator.php', - 'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', - 'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', - 'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', - 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php', - 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php', - 'SebastianBergmann\\GlobalState\\ExcludeList' => $vendorDir . '/sebastian/global-state/src/ExcludeList.php', - 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', - 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', - 'SebastianBergmann\\Invoker\\Exception' => $vendorDir . '/phpunit/php-invoker/src/exceptions/Exception.php', - 'SebastianBergmann\\Invoker\\Invoker' => $vendorDir . '/phpunit/php-invoker/src/Invoker.php', - 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php', - 'SebastianBergmann\\Invoker\\TimeoutException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/TimeoutException.php', - 'SebastianBergmann\\LinesOfCode\\Counter' => $vendorDir . '/sebastian/lines-of-code/src/Counter.php', - 'SebastianBergmann\\LinesOfCode\\Exception' => $vendorDir . '/sebastian/lines-of-code/src/Exception/Exception.php', - 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', - 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => $vendorDir . '/sebastian/lines-of-code/src/LineCountingVisitor.php', - 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => $vendorDir . '/sebastian/lines-of-code/src/LinesOfCode.php', - 'SebastianBergmann\\LinesOfCode\\RuntimeException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', - 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php', - 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php', - 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', - 'SebastianBergmann\\Template\\Exception' => $vendorDir . '/phpunit/php-text-template/src/exceptions/Exception.php', - 'SebastianBergmann\\Template\\InvalidArgumentException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php', - 'SebastianBergmann\\Template\\RuntimeException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\Template\\Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', - 'SebastianBergmann\\Timer\\Duration' => $vendorDir . '/phpunit/php-timer/src/Duration.php', - 'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/exceptions/Exception.php', - 'SebastianBergmann\\Timer\\NoActiveTimerException' => $vendorDir . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php', - 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => $vendorDir . '/phpunit/php-timer/src/ResourceUsageFormatter.php', - 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => $vendorDir . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php', - 'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', - 'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/type/CallableType.php', - 'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php', - 'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/type/FalseType.php', - 'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/type/GenericObjectType.php', - 'SebastianBergmann\\Type\\IntersectionType' => $vendorDir . '/sebastian/type/src/type/IntersectionType.php', - 'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/type/IterableType.php', - 'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/type/MixedType.php', - 'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php', - 'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php', - 'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php', - 'SebastianBergmann\\Type\\Parameter' => $vendorDir . '/sebastian/type/src/Parameter.php', - 'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php', - 'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php', - 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php', - 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php', - 'SebastianBergmann\\Type\\TrueType' => $vendorDir . '/sebastian/type/src/type/TrueType.php', - 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php', - 'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php', - 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php', - 'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php', - 'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php', - 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', - 'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php', - 'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php', - 'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php', - 'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php', - 'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php', - 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php', - 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php', - 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php', - 'staabm\\SideEffectsDetector\\SideEffect' => $vendorDir . '/staabm/side-effects-detector/lib/SideEffect.php', - 'staabm\\SideEffectsDetector\\SideEffectsDetector' => $vendorDir . '/staabm/side-effects-detector/lib/SideEffectsDetector.php', - '' => $vendorDir . '/symfony/cache/Traits/ValueWrapper.php', + 'FastRoute\\BadRouteException' => $vendorDir . '/nikic/fast-route/src/BadRouteException.php', + 'FastRoute\\DataGenerator' => $vendorDir . '/nikic/fast-route/src/DataGenerator.php', + 'FastRoute\\DataGenerator\\CharCountBased' => $vendorDir . '/nikic/fast-route/src/DataGenerator/CharCountBased.php', + 'FastRoute\\DataGenerator\\GroupCountBased' => $vendorDir . '/nikic/fast-route/src/DataGenerator/GroupCountBased.php', + 'FastRoute\\DataGenerator\\GroupPosBased' => $vendorDir . '/nikic/fast-route/src/DataGenerator/GroupPosBased.php', + 'FastRoute\\DataGenerator\\MarkBased' => $vendorDir . '/nikic/fast-route/src/DataGenerator/MarkBased.php', + 'FastRoute\\DataGenerator\\RegexBasedAbstract' => $vendorDir . '/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php', + 'FastRoute\\Dispatcher' => $vendorDir . '/nikic/fast-route/src/Dispatcher.php', + 'FastRoute\\Dispatcher\\CharCountBased' => $vendorDir . '/nikic/fast-route/src/Dispatcher/CharCountBased.php', + 'FastRoute\\Dispatcher\\GroupCountBased' => $vendorDir . '/nikic/fast-route/src/Dispatcher/GroupCountBased.php', + 'FastRoute\\Dispatcher\\GroupPosBased' => $vendorDir . '/nikic/fast-route/src/Dispatcher/GroupPosBased.php', + 'FastRoute\\Dispatcher\\MarkBased' => $vendorDir . '/nikic/fast-route/src/Dispatcher/MarkBased.php', + 'FastRoute\\Dispatcher\\RegexBasedAbstract' => $vendorDir . '/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php', + 'FastRoute\\Route' => $vendorDir . '/nikic/fast-route/src/Route.php', + 'FastRoute\\RouteCollector' => $vendorDir . '/nikic/fast-route/src/RouteCollector.php', + 'FastRoute\\RouteParser' => $vendorDir . '/nikic/fast-route/src/RouteParser.php', + 'FastRoute\\RouteParser\\Std' => $vendorDir . '/nikic/fast-route/src/RouteParser/Std.php', + 'Framework\\Core\\Application' => $baseDir . '/framework/Core/Application.php', + 'Framework\\Core\\Container' => $baseDir . '/framework/Core/Container.php', + 'Framework\\Exception\\Handler' => $baseDir . '/framework/Exception/Handler.php', + 'Framework\\Http\\Request' => $baseDir . '/framework/Http/Request.php', + 'Framework\\Http\\Response' => $baseDir . '/framework/Http/Response.php', + 'Framework\\Log\\Logger' => $baseDir . '/framework/Log/Logger.php', + 'Framework\\Routing\\Router' => $baseDir . '/framework/Routing/Router.php', + 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/src/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/src/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/src/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/src/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/src/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/src/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/src/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/src/NullLogger.php', + 'Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php', + 'Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php', + 'Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php', + 'think\\Collection' => $vendorDir . '/topthink/think-helper/src/Collection.php', + 'think\\DbManager' => $vendorDir . '/topthink/think-orm/src/DbManager.php', + 'think\\Model' => $vendorDir . '/topthink/think-orm/src/Model.php', + 'think\\Paginator' => $vendorDir . '/topthink/think-orm/src/Paginator.php', + 'think\\contract\\Arrayable' => $vendorDir . '/topthink/think-helper/src/contract/Arrayable.php', + 'think\\contract\\Jsonable' => $vendorDir . '/topthink/think-helper/src/contract/Jsonable.php', + 'think\\db\\BaseQuery' => $vendorDir . '/topthink/think-orm/src/db/BaseQuery.php', + 'think\\db\\Builder' => $vendorDir . '/topthink/think-orm/src/db/Builder.php', + 'think\\db\\CacheItem' => $vendorDir . '/topthink/think-orm/src/db/CacheItem.php', + 'think\\db\\Connection' => $vendorDir . '/topthink/think-orm/src/db/Connection.php', + 'think\\db\\ConnectionInterface' => $vendorDir . '/topthink/think-orm/src/db/ConnectionInterface.php', + 'think\\db\\Fetch' => $vendorDir . '/topthink/think-orm/src/db/Fetch.php', + 'think\\db\\Mongo' => $vendorDir . '/topthink/think-orm/src/db/Mongo.php', + 'think\\db\\PDOConnection' => $vendorDir . '/topthink/think-orm/src/db/PDOConnection.php', + 'think\\db\\Query' => $vendorDir . '/topthink/think-orm/src/db/Query.php', + 'think\\db\\Raw' => $vendorDir . '/topthink/think-orm/src/db/Raw.php', + 'think\\db\\Where' => $vendorDir . '/topthink/think-orm/src/db/Where.php', + 'think\\db\\builder\\Mongo' => $vendorDir . '/topthink/think-orm/src/db/builder/Mongo.php', + 'think\\db\\builder\\Mysql' => $vendorDir . '/topthink/think-orm/src/db/builder/Mysql.php', + 'think\\db\\builder\\Oracle' => $vendorDir . '/topthink/think-orm/src/db/builder/Oracle.php', + 'think\\db\\builder\\Pgsql' => $vendorDir . '/topthink/think-orm/src/db/builder/Pgsql.php', + 'think\\db\\builder\\Sqlite' => $vendorDir . '/topthink/think-orm/src/db/builder/Sqlite.php', + 'think\\db\\builder\\Sqlsrv' => $vendorDir . '/topthink/think-orm/src/db/builder/Sqlsrv.php', + 'think\\db\\concern\\AggregateQuery' => $vendorDir . '/topthink/think-orm/src/db/concern/AggregateQuery.php', + 'think\\db\\concern\\JoinAndViewQuery' => $vendorDir . '/topthink/think-orm/src/db/concern/JoinAndViewQuery.php', + 'think\\db\\concern\\ModelRelationQuery' => $vendorDir . '/topthink/think-orm/src/db/concern/ModelRelationQuery.php', + 'think\\db\\concern\\ParamsBind' => $vendorDir . '/topthink/think-orm/src/db/concern/ParamsBind.php', + 'think\\db\\concern\\ResultOperation' => $vendorDir . '/topthink/think-orm/src/db/concern/ResultOperation.php', + 'think\\db\\concern\\TableFieldInfo' => $vendorDir . '/topthink/think-orm/src/db/concern/TableFieldInfo.php', + 'think\\db\\concern\\TimeFieldQuery' => $vendorDir . '/topthink/think-orm/src/db/concern/TimeFieldQuery.php', + 'think\\db\\concern\\Transaction' => $vendorDir . '/topthink/think-orm/src/db/concern/Transaction.php', + 'think\\db\\concern\\WhereQuery' => $vendorDir . '/topthink/think-orm/src/db/concern/WhereQuery.php', + 'think\\db\\connector\\Mongo' => $vendorDir . '/topthink/think-orm/src/db/connector/Mongo.php', + 'think\\db\\connector\\Mysql' => $vendorDir . '/topthink/think-orm/src/db/connector/Mysql.php', + 'think\\db\\connector\\Oracle' => $vendorDir . '/topthink/think-orm/src/db/connector/Oracle.php', + 'think\\db\\connector\\Pgsql' => $vendorDir . '/topthink/think-orm/src/db/connector/Pgsql.php', + 'think\\db\\connector\\Sqlite' => $vendorDir . '/topthink/think-orm/src/db/connector/Sqlite.php', + 'think\\db\\connector\\Sqlsrv' => $vendorDir . '/topthink/think-orm/src/db/connector/Sqlsrv.php', + 'think\\db\\exception\\BindParamException' => $vendorDir . '/topthink/think-orm/src/db/exception/BindParamException.php', + 'think\\db\\exception\\DataNotFoundException' => $vendorDir . '/topthink/think-orm/src/db/exception/DataNotFoundException.php', + 'think\\db\\exception\\DbEventException' => $vendorDir . '/topthink/think-orm/src/db/exception/DbEventException.php', + 'think\\db\\exception\\DbException' => $vendorDir . '/topthink/think-orm/src/db/exception/DbException.php', + 'think\\db\\exception\\InvalidArgumentException' => $vendorDir . '/topthink/think-orm/src/db/exception/InvalidArgumentException.php', + 'think\\db\\exception\\ModelEventException' => $vendorDir . '/topthink/think-orm/src/db/exception/ModelEventException.php', + 'think\\db\\exception\\ModelNotFoundException' => $vendorDir . '/topthink/think-orm/src/db/exception/ModelNotFoundException.php', + 'think\\db\\exception\\PDOException' => $vendorDir . '/topthink/think-orm/src/db/exception/PDOException.php', + 'think\\facade\\Db' => $vendorDir . '/topthink/think-orm/src/facade/Db.php', + 'think\\helper\\Arr' => $vendorDir . '/topthink/think-helper/src/helper/Arr.php', + 'think\\helper\\Macroable' => $vendorDir . '/topthink/think-helper/src/helper/Macroable.php', + 'think\\helper\\Str' => $vendorDir . '/topthink/think-helper/src/helper/Str.php', + 'think\\model\\Collection' => $vendorDir . '/topthink/think-orm/src/model/Collection.php', + 'think\\model\\Pivot' => $vendorDir . '/topthink/think-orm/src/model/Pivot.php', + 'think\\model\\Relation' => $vendorDir . '/topthink/think-orm/src/model/Relation.php', + 'think\\model\\concern\\Attribute' => $vendorDir . '/topthink/think-orm/src/model/concern/Attribute.php', + 'think\\model\\concern\\Conversion' => $vendorDir . '/topthink/think-orm/src/model/concern/Conversion.php', + 'think\\model\\concern\\ModelEvent' => $vendorDir . '/topthink/think-orm/src/model/concern/ModelEvent.php', + 'think\\model\\concern\\OptimLock' => $vendorDir . '/topthink/think-orm/src/model/concern/OptimLock.php', + 'think\\model\\concern\\RelationShip' => $vendorDir . '/topthink/think-orm/src/model/concern/RelationShip.php', + 'think\\model\\concern\\SoftDelete' => $vendorDir . '/topthink/think-orm/src/model/concern/SoftDelete.php', + 'think\\model\\concern\\TimeStamp' => $vendorDir . '/topthink/think-orm/src/model/concern/TimeStamp.php', + 'think\\model\\concern\\Virtual' => $vendorDir . '/topthink/think-orm/src/model/concern/Virtual.php', + 'think\\model\\relation\\BelongsTo' => $vendorDir . '/topthink/think-orm/src/model/relation/BelongsTo.php', + 'think\\model\\relation\\BelongsToMany' => $vendorDir . '/topthink/think-orm/src/model/relation/BelongsToMany.php', + 'think\\model\\relation\\HasMany' => $vendorDir . '/topthink/think-orm/src/model/relation/HasMany.php', + 'think\\model\\relation\\HasManyThrough' => $vendorDir . '/topthink/think-orm/src/model/relation/HasManyThrough.php', + 'think\\model\\relation\\HasOne' => $vendorDir . '/topthink/think-orm/src/model/relation/HasOne.php', + 'think\\model\\relation\\HasOneThrough' => $vendorDir . '/topthink/think-orm/src/model/relation/HasOneThrough.php', + 'think\\model\\relation\\MorphMany' => $vendorDir . '/topthink/think-orm/src/model/relation/MorphMany.php', + 'think\\model\\relation\\MorphOne' => $vendorDir . '/topthink/think-orm/src/model/relation/MorphOne.php', + 'think\\model\\relation\\MorphTo' => $vendorDir . '/topthink/think-orm/src/model/relation/MorphTo.php', + 'think\\model\\relation\\MorphToMany' => $vendorDir . '/topthink/think-orm/src/model/relation/MorphToMany.php', + 'think\\model\\relation\\OneToOne' => $vendorDir . '/topthink/think-orm/src/model/relation/OneToOne.php', + 'think\\paginator\\driver\\Bootstrap' => $vendorDir . '/topthink/think-orm/src/paginator/driver/Bootstrap.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 16927a63..789b4c72 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,24 +6,7 @@ $baseDir = dirname($vendorDir); return array( - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '662a729f963d39afe703c9d9b7ab4a8c' => $vendorDir . '/symfony/polyfill-php83/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', - 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', - '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', - 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php', - 'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php', - 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', - '99c5493c05508c06e1e64161947ee08c' => $vendorDir . '/topthink/think-cache/src/helper.php', + '253c157292f75eb38082b5acb06f3f01' => $vendorDir . '/nikic/fast-route/src/functions.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php', - '89efb1254ef2d1c5d80096acd12c4098' => $vendorDir . '/twig/twig/src/Resources/core.php', - 'ffecb95d45175fd40f75be8a23b34f90' => $vendorDir . '/twig/twig/src/Resources/debug.php', - 'c7baa00073ee9c61edf148c51917cfb4' => $vendorDir . '/twig/twig/src/Resources/escaper.php', - 'f844ccf1d25df8663951193c3fc307c8' => $vendorDir . '/twig/twig/src/Resources/string_loader.php', - '9fe841f12d00dcbe79120156bb3ae7ed' => $baseDir . '/framework/helpers.php', ); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index e60f3526..15a2ff3a 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,5 +6,4 @@ $baseDir = dirname($vendorDir); return array( - 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 1a827a60..2e762824 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,52 +6,10 @@ $baseDir = dirname($vendorDir); return array( - 'think\\' => array($vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-cache/src', $vendorDir . '/topthink/think-container/src', $vendorDir . '/topthink/think-helper/src'), - 'Twig\\' => array($vendorDir . '/twig/twig/src'), - 'Tests\\' => array($baseDir . '/tests'), - 'Symfony\\Polyfill\\Php83\\' => array($vendorDir . '/symfony/polyfill-php83'), - 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), - 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), - 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), - 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), - 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), - 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), - 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), - 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), - 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), - 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), - 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), - 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), - 'Symfony\\Component\\RateLimiter\\' => array($vendorDir . '/symfony/rate-limiter'), - 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), - 'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'), - 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), - 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'), - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'), - 'Symfony\\Component\\Dotenv\\' => array($vendorDir . '/symfony/dotenv'), - 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), - 'Symfony\\Component\\Config\\' => array($vendorDir . '/symfony/config'), - 'Symfony\\Component\\Cache\\' => array($vendorDir . '/symfony/cache'), - 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), - 'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'), + 'think\\' => array($vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-helper/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), - 'Psr\\Http\\Server\\' => array($vendorDir . '/psr/http-server-middleware/src', $vendorDir . '/psr/http-server-handler/src'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), - 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), - 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), - 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), - 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Framework\\' => array($baseDir . '/framework'), - 'Fig\\Http\\Message\\' => array($vendorDir . '/fig/http-message-util/src'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), - 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), - 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'), - 'App\\' => array($baseDir . '/app'), + 'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'), + 'App\\' => array($baseDir . '/App'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index c417519d..d45a391c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitab0f065e34a4b36481d66daec2e48422 +class ComposerAutoloaderInit9b08b741b9b29d9b8d308493e978457f { private static $loader; @@ -22,16 +22,18 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitab0f065e34a4b36481d66daec2e48422', 'loadClassLoader'), true, true); + require __DIR__ . '/platform_check.php'; + + spl_autoload_register(array('ComposerAutoloaderInit9b08b741b9b29d9b8d308493e978457f', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitab0f065e34a4b36481d66daec2e48422', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit9b08b741b9b29d9b8d308493e978457f', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitab0f065e34a4b36481d66daec2e48422::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit9b08b741b9b29d9b8d308493e978457f::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitab0f065e34a4b36481d66daec2e48422::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit9b08b741b9b29d9b8d308493e978457f::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 59d19ab9..39c22e91 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,29 +4,12 @@ namespace Composer\Autoload; -class ComposerStaticInitab0f065e34a4b36481d66daec2e48422 +class ComposerStaticInit9b08b741b9b29d9b8d308493e978457f { public static $files = array ( - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', - 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', - 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', - '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', - 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php', - 'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php', - 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', - '99c5493c05508c06e1e64161947ee08c' => __DIR__ . '/..' . '/topthink/think-cache/src/helper.php', + '253c157292f75eb38082b5acb06f3f01' => __DIR__ . '/..' . '/nikic/fast-route/src/functions.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php', - '89efb1254ef2d1c5d80096acd12c4098' => __DIR__ . '/..' . '/twig/twig/src/Resources/core.php', - 'ffecb95d45175fd40f75be8a23b34f90' => __DIR__ . '/..' . '/twig/twig/src/Resources/debug.php', - 'c7baa00073ee9c61edf148c51917cfb4' => __DIR__ . '/..' . '/twig/twig/src/Resources/escaper.php', - 'f844ccf1d25df8663951193c3fc307c8' => __DIR__ . '/..' . '/twig/twig/src/Resources/string_loader.php', - '9fe841f12d00dcbe79120156bb3ae7ed' => __DIR__ . '/../..' . '/framework/helpers.php', ); public static $prefixLengthsPsr4 = array ( @@ -34,75 +17,15 @@ class ComposerStaticInitab0f065e34a4b36481d66daec2e48422 array ( 'think\\' => 6, ), - 'T' => - array ( - 'Twig\\' => 5, - 'Tests\\' => 6, - ), - 'S' => - array ( - 'Symfony\\Polyfill\\Php83\\' => 23, - 'Symfony\\Polyfill\\Mbstring\\' => 26, - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, - 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, - 'Symfony\\Polyfill\\Ctype\\' => 23, - 'Symfony\\Contracts\\Translation\\' => 30, - 'Symfony\\Contracts\\Service\\' => 26, - 'Symfony\\Contracts\\EventDispatcher\\' => 34, - 'Symfony\\Contracts\\Cache\\' => 24, - 'Symfony\\Component\\Yaml\\' => 23, - 'Symfony\\Component\\VarExporter\\' => 30, - 'Symfony\\Component\\VarDumper\\' => 28, - 'Symfony\\Component\\Translation\\' => 30, - 'Symfony\\Component\\Routing\\' => 26, - 'Symfony\\Component\\RateLimiter\\' => 30, - 'Symfony\\Component\\OptionsResolver\\' => 34, - 'Symfony\\Component\\Mime\\' => 23, - 'Symfony\\Component\\HttpKernel\\' => 29, - 'Symfony\\Component\\HttpFoundation\\' => 33, - 'Symfony\\Component\\Finder\\' => 25, - 'Symfony\\Component\\Filesystem\\' => 29, - 'Symfony\\Component\\EventDispatcher\\' => 34, - 'Symfony\\Component\\ErrorHandler\\' => 31, - 'Symfony\\Component\\Dotenv\\' => 25, - 'Symfony\\Component\\DependencyInjection\\' => 38, - 'Symfony\\Component\\Config\\' => 25, - 'Symfony\\Component\\Cache\\' => 24, - ), - 'R' => - array ( - 'Ramsey\\Uuid\\' => 12, - 'Ramsey\\Collection\\' => 18, - ), 'P' => array ( 'Psr\\SimpleCache\\' => 16, 'Psr\\Log\\' => 8, - 'Psr\\Http\\Server\\' => 16, - 'Psr\\Http\\Message\\' => 17, - 'Psr\\EventDispatcher\\' => 20, - 'Psr\\Container\\' => 14, - 'Psr\\Cache\\' => 10, - 'PhpParser\\' => 10, - ), - 'M' => - array ( - 'Monolog\\' => 8, ), 'F' => array ( 'Framework\\' => 10, - 'Fig\\Http\\Message\\' => 17, - ), - 'D' => - array ( - 'Doctrine\\Common\\Lexer\\' => 22, - 'Doctrine\\Common\\Annotations\\' => 28, - 'DeepCopy\\' => 9, - ), - 'B' => - array ( - 'Brick\\Math\\' => 11, + 'FastRoute\\' => 10, ), 'A' => array ( @@ -114,133 +37,7 @@ class ComposerStaticInitab0f065e34a4b36481d66daec2e48422 'think\\' => array ( 0 => __DIR__ . '/..' . '/topthink/think-orm/src', - 1 => __DIR__ . '/..' . '/topthink/think-cache/src', - 2 => __DIR__ . '/..' . '/topthink/think-container/src', - 3 => __DIR__ . '/..' . '/topthink/think-helper/src', - ), - 'Twig\\' => - array ( - 0 => __DIR__ . '/..' . '/twig/twig/src', - ), - 'Tests\\' => - array ( - 0 => __DIR__ . '/../..' . '/tests', - ), - 'Symfony\\Polyfill\\Php83\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php83', - ), - 'Symfony\\Polyfill\\Mbstring\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', - ), - 'Symfony\\Polyfill\\Intl\\Normalizer\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', - ), - 'Symfony\\Polyfill\\Intl\\Idn\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', - ), - 'Symfony\\Polyfill\\Ctype\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', - ), - 'Symfony\\Contracts\\Translation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/translation-contracts', - ), - 'Symfony\\Contracts\\Service\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/service-contracts', - ), - 'Symfony\\Contracts\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', - ), - 'Symfony\\Contracts\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache-contracts', - ), - 'Symfony\\Component\\Yaml\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/yaml', - ), - 'Symfony\\Component\\VarExporter\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-exporter', - ), - 'Symfony\\Component\\VarDumper\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/var-dumper', - ), - 'Symfony\\Component\\Translation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/translation', - ), - 'Symfony\\Component\\Routing\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/routing', - ), - 'Symfony\\Component\\RateLimiter\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/rate-limiter', - ), - 'Symfony\\Component\\OptionsResolver\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/options-resolver', - ), - 'Symfony\\Component\\Mime\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/mime', - ), - 'Symfony\\Component\\HttpKernel\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-kernel', - ), - 'Symfony\\Component\\HttpFoundation\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/http-foundation', - ), - 'Symfony\\Component\\Finder\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/finder', - ), - 'Symfony\\Component\\Filesystem\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/filesystem', - ), - 'Symfony\\Component\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', - ), - 'Symfony\\Component\\ErrorHandler\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/error-handler', - ), - 'Symfony\\Component\\Dotenv\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dotenv', - ), - 'Symfony\\Component\\DependencyInjection\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dependency-injection', - ), - 'Symfony\\Component\\Config\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/config', - ), - 'Symfony\\Component\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/cache', - ), - 'Ramsey\\Uuid\\' => - array ( - 0 => __DIR__ . '/..' . '/ramsey/uuid/src', - ), - 'Ramsey\\Collection\\' => - array ( - 0 => __DIR__ . '/..' . '/ramsey/collection/src', + 1 => __DIR__ . '/..' . '/topthink/think-helper/src', ), 'Psr\\SimpleCache\\' => array ( @@ -250,1389 +47,139 @@ class ComposerStaticInitab0f065e34a4b36481d66daec2e48422 array ( 0 => __DIR__ . '/..' . '/psr/log/src', ), - 'Psr\\Http\\Server\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-server-middleware/src', - 1 => __DIR__ . '/..' . '/psr/http-server-handler/src', - ), - 'Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Psr\\EventDispatcher\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', - ), - 'Psr\\Container\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/container/src', - ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), - 'PhpParser\\' => - array ( - 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', - ), - 'Monolog\\' => - array ( - 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', - ), 'Framework\\' => array ( 0 => __DIR__ . '/../..' . '/framework', ), - 'Fig\\Http\\Message\\' => + 'FastRoute\\' => array ( - 0 => __DIR__ . '/..' . '/fig/http-message-util/src', - ), - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/src', - ), - 'Doctrine\\Common\\Annotations\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', - ), - 'DeepCopy\\' => - array ( - 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy', - ), - 'Brick\\Math\\' => - array ( - 0 => __DIR__ . '/..' . '/brick/math/src', + 0 => __DIR__ . '/..' . '/nikic/fast-route/src', ), 'App\\' => array ( - 0 => __DIR__ . '/../..' . '/app', - ), - ); - - public static $prefixesPsr0 = array ( - 'H' => - array ( - 'HTMLPurifier' => - array ( - 0 => __DIR__ . '/..' . '/ezyang/htmlpurifier/library', - ), + 0 => __DIR__ . '/../..' . '/App', ), ); public static $classMap = array ( + 'App\\Controller\\HomeController' => __DIR__ . '/../..' . '/App/Controller/HomeController.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php', - 'DateException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateException.php', - 'DateInvalidOperationException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidOperationException.php', - 'DateInvalidTimeZoneException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateInvalidTimeZoneException.php', - 'DateMalformedIntervalStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedIntervalStringException.php', - 'DateMalformedPeriodStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedPeriodStringException.php', - 'DateMalformedStringException' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateMalformedStringException.php', - 'DateObjectError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateObjectError.php', - 'DateRangeError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateRangeError.php', - 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - 'Override' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/Override.php', - 'PHPUnit\\Event\\Application\\Finished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/Finished.php', - 'PHPUnit\\Event\\Application\\FinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php', - 'PHPUnit\\Event\\Application\\Started' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/Started.php', - 'PHPUnit\\Event\\Application\\StartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/StartedSubscriber.php', - 'PHPUnit\\Event\\Code\\ClassMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/ClassMethod.php', - 'PHPUnit\\Event\\Code\\ComparisonFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/ComparisonFailure.php', - 'PHPUnit\\Event\\Code\\ComparisonFailureBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/ComparisonFailureBuilder.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\DirectTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/DirectTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\IndirectTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/IndirectTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\IssueTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/IssueTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\SelfTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/SelfTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\TestTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/TestTrigger.php', - 'PHPUnit\\Event\\Code\\IssueTrigger\\UnknownTrigger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Issue/UnknownTrigger.php', - 'PHPUnit\\Event\\Code\\NoTestCaseObjectOnCallStackException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoTestCaseObjectOnCallStackException.php', - 'PHPUnit\\Event\\Code\\Phpt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Phpt.php', - 'PHPUnit\\Event\\Code\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/Test.php', - 'PHPUnit\\Event\\Code\\TestCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestCollection.php', - 'PHPUnit\\Event\\Code\\TestCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestCollectionIterator.php', - 'PHPUnit\\Event\\Code\\TestDox' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestDox.php', - 'PHPUnit\\Event\\Code\\TestDoxBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php', - 'PHPUnit\\Event\\Code\\TestMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestMethod.php', - 'PHPUnit\\Event\\Code\\TestMethodBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php', - 'PHPUnit\\Event\\Code\\Throwable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Throwable.php', - 'PHPUnit\\Event\\Code\\ThrowableBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php', - 'PHPUnit\\Event\\CollectingDispatcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Dispatcher/CollectingDispatcher.php', - 'PHPUnit\\Event\\DeferringDispatcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php', - 'PHPUnit\\Event\\DirectDispatcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php', - 'PHPUnit\\Event\\Dispatcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Dispatcher/Dispatcher.php', - 'PHPUnit\\Event\\DispatchingEmitter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php', - 'PHPUnit\\Event\\Emitter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Emitter/Emitter.php', - 'PHPUnit\\Event\\Event' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Event.php', - 'PHPUnit\\Event\\EventAlreadyAssignedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/EventAlreadyAssignedException.php', - 'PHPUnit\\Event\\EventCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/EventCollection.php', - 'PHPUnit\\Event\\EventCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/EventCollectionIterator.php', - 'PHPUnit\\Event\\EventFacadeIsSealedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/EventFacadeIsSealedException.php', - 'PHPUnit\\Event\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/Exception.php', - 'PHPUnit\\Event\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Facade.php', - 'PHPUnit\\Event\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/InvalidArgumentException.php', - 'PHPUnit\\Event\\InvalidEventException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/InvalidEventException.php', - 'PHPUnit\\Event\\InvalidSubscriberException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/InvalidSubscriberException.php', - 'PHPUnit\\Event\\MapError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/MapError.php', - 'PHPUnit\\Event\\NoPreviousThrowableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoPreviousThrowableException.php', - 'PHPUnit\\Event\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/RuntimeException.php', - 'PHPUnit\\Event\\Runtime\\OperatingSystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Runtime/OperatingSystem.php', - 'PHPUnit\\Event\\Runtime\\PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Runtime/PHP.php', - 'PHPUnit\\Event\\Runtime\\PHPUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Runtime/PHPUnit.php', - 'PHPUnit\\Event\\Runtime\\Runtime' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Runtime/Runtime.php', - 'PHPUnit\\Event\\SubscribableDispatcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Dispatcher/SubscribableDispatcher.php', - 'PHPUnit\\Event\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Subscriber.php', - 'PHPUnit\\Event\\SubscriberTypeAlreadyRegisteredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/SubscriberTypeAlreadyRegisteredException.php', - 'PHPUnit\\Event\\Telemetry\\Duration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php', - 'PHPUnit\\Event\\Telemetry\\GarbageCollectorStatus' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php', - 'PHPUnit\\Event\\Telemetry\\GarbageCollectorStatusProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatusProvider.php', - 'PHPUnit\\Event\\Telemetry\\HRTime' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php', - 'PHPUnit\\Event\\Telemetry\\Info' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Info.php', - 'PHPUnit\\Event\\Telemetry\\MemoryMeter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php', - 'PHPUnit\\Event\\Telemetry\\MemoryUsage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php', - 'PHPUnit\\Event\\Telemetry\\Snapshot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php', - 'PHPUnit\\Event\\Telemetry\\StopWatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php', - 'PHPUnit\\Event\\Telemetry\\System' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/System.php', - 'PHPUnit\\Event\\Telemetry\\SystemGarbageCollectorStatusProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php', - 'PHPUnit\\Event\\Telemetry\\SystemMemoryMeter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php', - 'PHPUnit\\Event\\Telemetry\\SystemStopWatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php', - 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', - 'PHPUnit\\Event\\TestData\\DataFromDataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php', - 'PHPUnit\\Event\\TestData\\DataFromTestDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php', - 'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php', - 'PHPUnit\\Event\\TestData\\TestData' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php', - 'PHPUnit\\Event\\TestData\\TestDataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php', - 'PHPUnit\\Event\\TestData\\TestDataCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollectionIterator.php', - 'PHPUnit\\Event\\TestRunner\\BootstrapFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinished.php', - 'PHPUnit\\Event\\TestRunner\\BootstrapFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErrored.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErroredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinished.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessStarted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStarted.php', - 'PHPUnit\\Event\\TestRunner\\ChildProcessStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Configured' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/Configured.php', - 'PHPUnit\\Event\\TestRunner\\ConfiguredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ConfiguredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\DeprecationTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggered.php', - 'PHPUnit\\Event\\TestRunner\\DeprecationTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\EventFacadeSealed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealed.php', - 'PHPUnit\\Event\\TestRunner\\EventFacadeSealedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionAborted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAborted.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionAbortedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAbortedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinished.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionStarted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStarted.php', - 'PHPUnit\\Event\\TestRunner\\ExecutionStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionBootstrapped' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrapped.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionBootstrappedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrappedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionLoadedFromPhar' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPhar.php', - 'PHPUnit\\Event\\TestRunner\\ExtensionLoadedFromPharSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPharSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Finished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/Finished.php', - 'PHPUnit\\Event\\TestRunner\\FinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/FinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionDisabled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabled.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionDisabledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabledSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionEnabled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabled.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionEnabledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabledSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggered.php', - 'PHPUnit\\Event\\TestRunner\\GarbageCollectionTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\NoticeTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggered.php', - 'PHPUnit\\Event\\TestRunner\\NoticeTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\Started' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/Started.php', - 'PHPUnit\\Event\\TestRunner\\StartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/StartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinished.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinishedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageStarted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStarted.php', - 'PHPUnit\\Event\\TestRunner\\StaticAnalysisForCodeCoverageStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStartedSubscriber.php', - 'PHPUnit\\Event\\TestRunner\\WarningTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggered.php', - 'PHPUnit\\Event\\TestRunner\\WarningTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Filtered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Filtered.php', - 'PHPUnit\\Event\\TestSuite\\FilteredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/FilteredSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Finished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Finished.php', - 'PHPUnit\\Event\\TestSuite\\FinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/FinishedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Loaded' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Loaded.php', - 'PHPUnit\\Event\\TestSuite\\LoadedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/LoadedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Skipped' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Skipped.php', - 'PHPUnit\\Event\\TestSuite\\SkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/SkippedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Sorted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Sorted.php', - 'PHPUnit\\Event\\TestSuite\\SortedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/SortedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\Started' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/Started.php', - 'PHPUnit\\Event\\TestSuite\\StartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/TestSuite/StartedSubscriber.php', - 'PHPUnit\\Event\\TestSuite\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuite.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteForTestClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestClass.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteForTestMethodWithDataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestMethodWithDataProvider.php', - 'PHPUnit\\Event\\TestSuite\\TestSuiteWithName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteWithName.php', - 'PHPUnit\\Event\\Test\\AdditionalInformationProvided' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvided.php', - 'PHPUnit\\Event\\Test\\AdditionalInformationProvidedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvidedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\AfterLastTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalled.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErrored.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailed.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinished.php', - 'PHPUnit\\Event\\Test\\BeforeTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\ComparatorRegistered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/ComparatorRegistered.php', - 'PHPUnit\\Event\\Test\\ComparatorRegisteredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/ComparatorRegisteredSubscriber.php', - 'PHPUnit\\Event\\Test\\ConsideredRisky' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRisky.php', - 'PHPUnit\\Event\\Test\\ConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRiskySubscriber.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalled.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinished.php', - 'PHPUnit\\Event\\Test\\DataProviderMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\DeprecationTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\DeprecationTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\ErrorTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggered.php', - 'PHPUnit\\Event\\Test\\ErrorTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\Errored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php', - 'PHPUnit\\Event\\Test\\ErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/ErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\Failed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Failed.php', - 'PHPUnit\\Event\\Test\\FailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/FailedSubscriber.php', - 'PHPUnit\\Event\\Test\\Finished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Finished.php', - 'PHPUnit\\Event\\Test\\FinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/FinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\MarkedIncomplete' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncomplete.php', - 'PHPUnit\\Event\\Test\\MarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php', - 'PHPUnit\\Event\\Test\\MockObjectCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php', - 'PHPUnit\\Event\\Test\\MockObjectCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php', - 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\NoComparisonFailureException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php', - 'PHPUnit\\Event\\Test\\NoticeTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php', - 'PHPUnit\\Event\\Test\\NoticeTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PartialMockObjectCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreated.php', - 'PHPUnit\\Event\\Test\\PartialMockObjectCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\Passed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Passed.php', - 'PHPUnit\\Event\\Test\\PassedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/PassedSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpDeprecationTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\PhpDeprecationTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpNoticeTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggered.php', - 'PHPUnit\\Event\\Test\\PhpNoticeTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpWarningTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggered.php', - 'PHPUnit\\Event\\Test\\PhpWarningTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitDeprecationTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitDeprecationTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitErrorTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitErrorTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitNoticeTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitNoticeTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PhpunitWarningTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggered.php', - 'PHPUnit\\Event\\Test\\PhpunitWarningTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalled.php', - 'PHPUnit\\Event\\Test\\PostConditionCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErrored.php', - 'PHPUnit\\Event\\Test\\PostConditionErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailed.php', - 'PHPUnit\\Event\\Test\\PostConditionFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PostConditionFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinished.php', - 'PHPUnit\\Event\\Test\\PostConditionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalled.php', - 'PHPUnit\\Event\\Test\\PreConditionCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalledSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErrored.php', - 'PHPUnit\\Event\\Test\\PreConditionErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailed.php', - 'PHPUnit\\Event\\Test\\PreConditionFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreConditionFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinished.php', - 'PHPUnit\\Event\\Test\\PreConditionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinishedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErrored.php', - 'PHPUnit\\Event\\Test\\PreparationErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErroredSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailed.php', - 'PHPUnit\\Event\\Test\\PreparationFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailedSubscriber.php', - 'PHPUnit\\Event\\Test\\PreparationStarted' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStarted.php', - 'PHPUnit\\Event\\Test\\PreparationStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStartedSubscriber.php', - 'PHPUnit\\Event\\Test\\Prepared' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Prepared.php', - 'PHPUnit\\Event\\Test\\PreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparedSubscriber.php', - 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutput' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php', - 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutputSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php', - 'PHPUnit\\Event\\Test\\Skipped' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php', - 'PHPUnit\\Event\\Test\\SkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php', - 'PHPUnit\\Event\\Test\\TestStubCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php', - 'PHPUnit\\Event\\Test\\TestStubCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php', - 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreatedSubscriber.php', - 'PHPUnit\\Event\\Test\\WarningTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggered.php', - 'PHPUnit\\Event\\Test\\WarningTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggeredSubscriber.php', - 'PHPUnit\\Event\\Tracer\\Tracer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Tracer.php', - 'PHPUnit\\Event\\TypeMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/TypeMap.php', - 'PHPUnit\\Event\\UnknownEventException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/UnknownEventException.php', - 'PHPUnit\\Event\\UnknownEventTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/UnknownEventTypeException.php', - 'PHPUnit\\Event\\UnknownSubscriberException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/UnknownSubscriberException.php', - 'PHPUnit\\Event\\UnknownSubscriberTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/UnknownSubscriberTypeException.php', - 'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ActualValueIsNotAnObjectException.php', - 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php', - 'PHPUnit\\Framework\\Attributes\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/After.php', - 'PHPUnit\\Framework\\Attributes\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/AfterClass.php', - 'PHPUnit\\Framework\\Attributes\\BackupGlobals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BackupGlobals.php', - 'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php', - 'PHPUnit\\Framework\\Attributes\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Before.php', - 'PHPUnit\\Framework\\Attributes\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php', - 'PHPUnit\\Framework\\Attributes\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', - 'PHPUnit\\Framework\\Attributes\\CoversMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php', - 'PHPUnit\\Framework\\Attributes\\CoversNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php', - 'PHPUnit\\Framework\\Attributes\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', - 'PHPUnit\\Framework\\Attributes\\CoversTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php', - 'PHPUnit\\Framework\\Attributes\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DataProvider.php', - 'PHPUnit\\Framework\\Attributes\\DataProviderExternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DataProviderExternal.php', - 'PHPUnit\\Framework\\Attributes\\Depends' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Depends.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsExternal.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternalUsingDeepClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsExternalUsingShallowClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClass.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClassUsingDeepClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsOnClassUsingShallowClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsUsingDeepClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsUsingDeepClone.php', - 'PHPUnit\\Framework\\Attributes\\DependsUsingShallowClone' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DependsUsingShallowClone.php', - 'PHPUnit\\Framework\\Attributes\\DisableReturnValueGenerationForTestDoubles' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DisableReturnValueGenerationForTestDoubles.php', - 'PHPUnit\\Framework\\Attributes\\DoesNotPerformAssertions' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DoesNotPerformAssertions.php', - 'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php', - 'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php', - 'PHPUnit\\Framework\\Attributes\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Group.php', - 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php', - 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php', - 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitWarnings' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitWarnings.php', - 'PHPUnit\\Framework\\Attributes\\Large' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Large.php', - 'PHPUnit\\Framework\\Attributes\\Medium' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Medium.php', - 'PHPUnit\\Framework\\Attributes\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', - 'PHPUnit\\Framework\\Attributes\\PreCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PreCondition.php', - 'PHPUnit\\Framework\\Attributes\\PreserveGlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php', - 'PHPUnit\\Framework\\Attributes\\RequiresEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php', - 'PHPUnit\\Framework\\Attributes\\RequiresFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php', - 'PHPUnit\\Framework\\Attributes\\RequiresMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php', - 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php', - 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystemFamily' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystemFamily.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhp.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpExtension.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpunit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunit.php', - 'PHPUnit\\Framework\\Attributes\\RequiresPhpunitExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunitExtension.php', - 'PHPUnit\\Framework\\Attributes\\RequiresSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresSetting.php', - 'PHPUnit\\Framework\\Attributes\\RunClassInSeparateProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RunClassInSeparateProcess.php', - 'PHPUnit\\Framework\\Attributes\\RunInSeparateProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RunInSeparateProcess.php', - 'PHPUnit\\Framework\\Attributes\\RunTestsInSeparateProcesses' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RunTestsInSeparateProcesses.php', - 'PHPUnit\\Framework\\Attributes\\Small' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Small.php', - 'PHPUnit\\Framework\\Attributes\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Test.php', - 'PHPUnit\\Framework\\Attributes\\TestDox' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestDox.php', - 'PHPUnit\\Framework\\Attributes\\TestDoxFormatter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatter.php', - 'PHPUnit\\Framework\\Attributes\\TestDoxFormatterExternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatterExternal.php', - 'PHPUnit\\Framework\\Attributes\\TestWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestWith.php', - 'PHPUnit\\Framework\\Attributes\\TestWithJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php', - 'PHPUnit\\Framework\\Attributes\\Ticket' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Ticket.php', - 'PHPUnit\\Framework\\Attributes\\UsesClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php', - 'PHPUnit\\Framework\\Attributes\\UsesFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php', - 'PHPUnit\\Framework\\Attributes\\UsesMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php', - 'PHPUnit\\Framework\\Attributes\\UsesNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php', - 'PHPUnit\\Framework\\Attributes\\UsesTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php', - 'PHPUnit\\Framework\\Attributes\\WithEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/WithEnvironmentVariable.php', - 'PHPUnit\\Framework\\Attributes\\WithoutErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php', - 'PHPUnit\\Framework\\ChildProcessResultProcessor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestRunner/ChildProcessResultProcessor.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotAcceptParameterTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareParameterTypeException.php', - 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotExistException.php', - 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php', - 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php', - 'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php', - 'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php', - 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php', - 'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionMessageIsOrContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageIsOrContains.php', - 'PHPUnit\\Framework\\Constraint\\ExceptionMessageMatchesRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageMatchesRegularExpression.php', - 'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php', - 'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php', - 'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php', - 'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php', - 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php', - 'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php', - 'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php', - 'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php', - 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php', - 'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php', - 'PHPUnit\\Framework\\Constraint\\IsList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/IsList.php', - 'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php', - 'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php', - 'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php', - 'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php', - 'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php', - 'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php', - 'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php', - 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php', - 'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php', - 'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php', - 'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', - 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', - 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', - 'PHPUnit\\Framework\\Constraint\\Operator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', - 'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', - 'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', - 'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php', - 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php', - 'PHPUnit\\Framework\\Constraint\\StringEqualsStringIgnoringLineEndings' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringEqualsStringIgnoringLineEndings.php', - 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php', - 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php', - 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php', - 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php', - 'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php', - 'PHPUnit\\Framework\\EmptyStringException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/EmptyStringException.php', - 'PHPUnit\\Framework\\ErrorLogNotWritableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ErrorLogNotWritableException.php', - 'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Exception.php', - 'PHPUnit\\Framework\\ExecutionOrderDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php', - 'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php', - 'PHPUnit\\Framework\\GeneratorNotSupportedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/GeneratorNotSupportedException.php', - 'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTest.php', - 'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTestError.php', - 'PHPUnit\\Framework\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php', - 'PHPUnit\\Framework\\InvalidDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php', - 'PHPUnit\\Framework\\InvalidDependencyException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDependencyException.php', - 'PHPUnit\\Framework\\IsolatedTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunner.php', - 'PHPUnit\\Framework\\IsolatedTestRunnerRegistry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunnerRegistry.php', - 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', - 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', - 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', - 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DuplicateMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\HookedProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\HookedPropertyGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\InvalidMethodNameException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\MethodNamedMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\NameAlreadyInUseException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\TemplateLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownInterfaceException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownInterfaceException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php', - 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', - 'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php', - 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php', - 'PHPUnit\\Framework\\MockObject\\InvocationStubber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/InvocationStubber.php', - 'PHPUnit\\Framework\\MockObject\\InvocationStubberImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationStubberImplementation.php', - 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php', - 'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php', - 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php', - 'PHPUnit\\Framework\\MockObject\\Method' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php', - 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/MethodNameConstraint.php', - 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php', - 'PHPUnit\\Framework\\MockObject\\MockObjectApi' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php', - 'PHPUnit\\Framework\\MockObject\\MockObjectInternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php', - 'PHPUnit\\Framework\\MockObject\\NeverReturningMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php', - 'PHPUnit\\Framework\\MockObject\\NoMoreReturnValuesConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\ProxiedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php', - 'PHPUnit\\Framework\\MockObject\\ReturnValueGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php', - 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyInvokedCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyParameters.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvocationOrder.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastOnce.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtMostCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedCount.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/MethodName.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/Parameters.php', - 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/ParametersRule.php', - 'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertyGetHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyGetHook.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertyHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyHook.php', - 'PHPUnit\\Framework\\MockObject\\Runtime\\PropertySetHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertySetHook.php', - 'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php', - 'PHPUnit\\Framework\\MockObject\\StubApi' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/StubApi.php', - 'PHPUnit\\Framework\\MockObject\\StubInternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ConsecutiveCalls.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnArgument.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnReference.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnSelf.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnStub.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnValueMap.php', - 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Stub.php', - 'PHPUnit\\Framework\\MockObject\\TestDoubleState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php', - 'PHPUnit\\Framework\\NativeType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/NativeType.php', - 'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php', - 'PHPUnit\\Framework\\PhptAssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/PhptAssertionFailedError.php', - 'PHPUnit\\Framework\\ProcessIsolationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ProcessIsolationException.php', - 'PHPUnit\\Framework\\Reorderable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Reorderable.php', - 'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit\\Framework\\SeparateProcessTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php', - 'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTest.php', - 'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTestSuiteError.php', - 'PHPUnit\\Framework\\SkippedWithMessageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedWithMessageException.php', - 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit\\Framework\\TestBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestBuilder.php', - 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit\\Framework\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php', - 'PHPUnit\\Framework\\TestSize\\Known' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/Known.php', - 'PHPUnit\\Framework\\TestSize\\Large' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/Large.php', - 'PHPUnit\\Framework\\TestSize\\Medium' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/Medium.php', - 'PHPUnit\\Framework\\TestSize\\Small' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/Small.php', - 'PHPUnit\\Framework\\TestSize\\TestSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/TestSize.php', - 'PHPUnit\\Framework\\TestSize\\Unknown' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSize/Unknown.php', - 'PHPUnit\\Framework\\TestStatus\\Deprecation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php', - 'PHPUnit\\Framework\\TestStatus\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Error.php', - 'PHPUnit\\Framework\\TestStatus\\Failure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Failure.php', - 'PHPUnit\\Framework\\TestStatus\\Incomplete' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php', - 'PHPUnit\\Framework\\TestStatus\\Known' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Known.php', - 'PHPUnit\\Framework\\TestStatus\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Notice.php', - 'PHPUnit\\Framework\\TestStatus\\Risky' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Risky.php', - 'PHPUnit\\Framework\\TestStatus\\Skipped' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Skipped.php', - 'PHPUnit\\Framework\\TestStatus\\Success' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Success.php', - 'PHPUnit\\Framework\\TestStatus\\TestStatus' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php', - 'PHPUnit\\Framework\\TestStatus\\Unknown' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Unknown.php', - 'PHPUnit\\Framework\\TestStatus\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestStatus/Warning.php', - 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', - 'PHPUnit\\Framework\\UnknownClassOrInterfaceException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php', - 'PHPUnit\\Framework\\UnknownNativeTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php', - 'PHPUnit\\Logging\\EventLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/EventLogger.php', - 'PHPUnit\\Logging\\JUnit\\JunitXmlLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php', - 'PHPUnit\\Logging\\JUnit\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationErroredSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparationStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestPrintedUnexpectedOutputSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPrintedUnexpectedOutputSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestRunnerExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSuiteFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\JUnit\\TestSuiteStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\AfterLastTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\AfterLastTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\BeforeFirstTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\BeforeFirstTestMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\CannotOpenUriForWritingException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/CannotOpenUriForWritingException.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/Exception.php', - 'PHPUnit\\Logging\\OpenTestReporting\\InfrastructureInformationProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/InfrastructureInformationProvider.php', - 'PHPUnit\\Logging\\OpenTestReporting\\OtrXmlLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/OtrXmlLogger.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Status' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Status.php', - 'PHPUnit\\Logging\\OpenTestReporting\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestAbortedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestAbortedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparationErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationErroredSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparationFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationFailedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestRunnerFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestRunnerStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerStartedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\Logging\\OpenTestReporting\\TestSuiteStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TeamCityLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php', - 'PHPUnit\\Logging\\TeamCity\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestRunnerExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestRunnerExecutionFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteBeforeFirstTestMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteBeforeFirstTestMethodErroredSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\Logging\\TeamCity\\TestSuiteStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\HtmlRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php', - 'PHPUnit\\Logging\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php', - 'PHPUnit\\Logging\\TestDox\\PlainTextRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php', - 'PHPUnit\\Logging\\TestDox\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', - 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', - 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php', - 'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php', - 'PHPUnit\\Metadata\\Api\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php', - 'PHPUnit\\Metadata\\Api\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/DataProvider.php', - 'PHPUnit\\Metadata\\Api\\Dependencies' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/Dependencies.php', - 'PHPUnit\\Metadata\\Api\\Groups' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/Groups.php', - 'PHPUnit\\Metadata\\Api\\HookMethods' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/HookMethods.php', - 'PHPUnit\\Metadata\\Api\\ProvidedData' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/ProvidedData.php', - 'PHPUnit\\Metadata\\Api\\Requirements' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/Requirements.php', - 'PHPUnit\\Metadata\\BackupGlobals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/BackupGlobals.php', - 'PHPUnit\\Metadata\\BackupStaticProperties' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/BackupStaticProperties.php', - 'PHPUnit\\Metadata\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Before.php', - 'PHPUnit\\Metadata\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/BeforeClass.php', - 'PHPUnit\\Metadata\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php', - 'PHPUnit\\Metadata\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversFunction.php', - 'PHPUnit\\Metadata\\CoversMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversMethod.php', - 'PHPUnit\\Metadata\\CoversNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversNamespace.php', - 'PHPUnit\\Metadata\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversNothing.php', - 'PHPUnit\\Metadata\\CoversTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversTrait.php', - 'PHPUnit\\Metadata\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DataProvider.php', - 'PHPUnit\\Metadata\\DependsOnClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DependsOnClass.php', - 'PHPUnit\\Metadata\\DependsOnMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DependsOnMethod.php', - 'PHPUnit\\Metadata\\DisableReturnValueGenerationForTestDoubles' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DisableReturnValueGenerationForTestDoubles.php', - 'PHPUnit\\Metadata\\DoesNotPerformAssertions' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DoesNotPerformAssertions.php', - 'PHPUnit\\Metadata\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/Exception.php', - 'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php', - 'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php', - 'PHPUnit\\Metadata\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Group.php', - 'PHPUnit\\Metadata\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php', - 'PHPUnit\\Metadata\\IgnorePhpunitDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php', - 'PHPUnit\\Metadata\\IgnorePhpunitWarnings' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnorePhpunitWarnings.php', - 'PHPUnit\\Metadata\\InvalidAttributeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/InvalidAttributeException.php', - 'PHPUnit\\Metadata\\InvalidVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php', - 'PHPUnit\\Metadata\\Metadata' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Metadata.php', - 'PHPUnit\\Metadata\\MetadataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', - 'PHPUnit\\Metadata\\MetadataCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php', - 'PHPUnit\\Metadata\\NoVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php', - 'PHPUnit\\Metadata\\Parser\\AttributeParser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php', - 'PHPUnit\\Metadata\\Parser\\CachingParser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/CachingParser.php', - 'PHPUnit\\Metadata\\Parser\\Parser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Parser.php', - 'PHPUnit\\Metadata\\Parser\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Registry.php', - 'PHPUnit\\Metadata\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PostCondition.php', - 'PHPUnit\\Metadata\\PreCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PreCondition.php', - 'PHPUnit\\Metadata\\PreserveGlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PreserveGlobalState.php', - 'PHPUnit\\Metadata\\RequiresEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php', - 'PHPUnit\\Metadata\\RequiresFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresFunction.php', - 'PHPUnit\\Metadata\\RequiresMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresMethod.php', - 'PHPUnit\\Metadata\\RequiresOperatingSystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php', - 'PHPUnit\\Metadata\\RequiresOperatingSystemFamily' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php', - 'PHPUnit\\Metadata\\RequiresPhp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresPhp.php', - 'PHPUnit\\Metadata\\RequiresPhpExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php', - 'PHPUnit\\Metadata\\RequiresPhpunit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresPhpunit.php', - 'PHPUnit\\Metadata\\RequiresPhpunitExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresPhpunitExtension.php', - 'PHPUnit\\Metadata\\RequiresSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresSetting.php', - 'PHPUnit\\Metadata\\RunClassInSeparateProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RunClassInSeparateProcess.php', - 'PHPUnit\\Metadata\\RunInSeparateProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RunInSeparateProcess.php', - 'PHPUnit\\Metadata\\RunTestsInSeparateProcesses' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RunTestsInSeparateProcesses.php', - 'PHPUnit\\Metadata\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Test.php', - 'PHPUnit\\Metadata\\TestDox' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/TestDox.php', - 'PHPUnit\\Metadata\\TestDoxFormatter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/TestDoxFormatter.php', - 'PHPUnit\\Metadata\\TestWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/TestWith.php', - 'PHPUnit\\Metadata\\UsesClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php', - 'PHPUnit\\Metadata\\UsesFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesFunction.php', - 'PHPUnit\\Metadata\\UsesMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesMethod.php', - 'PHPUnit\\Metadata\\UsesNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesNamespace.php', - 'PHPUnit\\Metadata\\UsesTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesTrait.php', - 'PHPUnit\\Metadata\\Version\\ComparisonRequirement' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php', - 'PHPUnit\\Metadata\\Version\\ConstraintRequirement' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php', - 'PHPUnit\\Metadata\\Version\\Requirement' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Version/Requirement.php', - 'PHPUnit\\Metadata\\WithEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/WithEnvironmentVariable.php', - 'PHPUnit\\Metadata\\WithoutErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/WithoutErrorHandler.php', - 'PHPUnit\\Runner\\BackedUpEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BackedUpEnvironmentVariable.php', - 'PHPUnit\\Runner\\Baseline\\Baseline' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Baseline.php', - 'PHPUnit\\Runner\\Baseline\\CannotLoadBaselineException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Exception/CannotLoadBaselineException.php', - 'PHPUnit\\Runner\\Baseline\\CannotWriteBaselineException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Exception/CannotWriteBaselineException.php', - 'PHPUnit\\Runner\\Baseline\\FileDoesNotHaveLineException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Exception/FileDoesNotHaveLineException.php', - 'PHPUnit\\Runner\\Baseline\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Generator.php', - 'PHPUnit\\Runner\\Baseline\\Issue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Issue.php', - 'PHPUnit\\Runner\\Baseline\\Reader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Reader.php', - 'PHPUnit\\Runner\\Baseline\\RelativePathCalculator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/RelativePathCalculator.php', - 'PHPUnit\\Runner\\Baseline\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\Runner\\Baseline\\Writer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Baseline/Writer.php', - 'PHPUnit\\Runner\\ClassCannotBeFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassCannotBeFoundException.php', - 'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php', - 'PHPUnit\\Runner\\ClassIsAbstractException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php', - 'PHPUnit\\Runner\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/CodeCoverage.php', - 'PHPUnit\\Runner\\CodeCoverageInitializationStatus' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/CodeCoverageInitializationStatus.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Collector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php', - 'PHPUnit\\Runner\\DeprecationCollector\\InIsolationCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/InIsolationCollector.php', - 'PHPUnit\\Runner\\DeprecationCollector\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\DeprecationCollector\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Runner\\DeprecationCollector\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\Runner\\DirectoryDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/DirectoryDoesNotExistException.php', - 'PHPUnit\\Runner\\ErrorException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php', - 'PHPUnit\\Runner\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ErrorHandler.php', - 'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/Exception.php', - 'PHPUnit\\Runner\\Extension\\Extension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/Extension.php', - 'PHPUnit\\Runner\\Extension\\ExtensionBootstrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php', - 'PHPUnit\\Runner\\Extension\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/Facade.php', - 'PHPUnit\\Runner\\Extension\\ParameterCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/ParameterCollection.php', - 'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', - 'PHPUnit\\Runner\\FileDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php', - 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\ExcludeNameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\IncludeNameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', - 'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php', - 'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\ExecutionStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionStartedSubscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\GarbageCollectionHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/GarbageCollectionHandler.php', - 'PHPUnit\\Runner\\GarbageCollection\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\GarbageCollection\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Runner\\HookMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/HookMethod/HookMethod.php', - 'PHPUnit\\Runner\\HookMethodCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/HookMethod/HookMethodCollection.php', - 'PHPUnit\\Runner\\InvalidOrderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/InvalidOrderException.php', - 'PHPUnit\\Runner\\ParameterDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ParameterDoesNotExistException.php', - 'PHPUnit\\Runner\\Phpt\\InvalidPhptFileException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/Exception/InvalidPhptFileException.php', - 'PHPUnit\\Runner\\Phpt\\Parser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/Parser.php', - 'PHPUnit\\Runner\\Phpt\\PhptExternalFileCannotBeLoadedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/Exception/PhptExternalFileCannotBeLoadedException.php', - 'PHPUnit\\Runner\\Phpt\\Renderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/Renderer.php', - 'PHPUnit\\Runner\\Phpt\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/TestCase.php', - 'PHPUnit\\Runner\\Phpt\\UnsupportedPhptSectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Phpt/Exception/UnsupportedPhptSectionException.php', - 'PHPUnit\\Runner\\ResultCache\\DefaultResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\NullResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/NullResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/ResultCache.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCacheHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php', - 'PHPUnit\\Runner\\ResultCache\\ResultCacheId' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/ResultCacheId.php', - 'PHPUnit\\Runner\\ResultCache\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/Subscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSuiteFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\Runner\\ResultCache\\TestSuiteStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\Runner\\ShutdownHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ShutdownHandler.php', - 'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', - 'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit\\TestRunner\\IssueFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/IssueFilter.php', - 'PHPUnit\\TestRunner\\TestResult\\AfterTestClassMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\AfterTestClassMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\BeforeTestClassMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\BeforeTestClassMethodFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\ChildProcessErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/ChildProcessErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\Collector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Collector.php', - 'PHPUnit\\TestRunner\\TestResult\\ExecutionStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/ExecutionStartedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Facade.php', - 'PHPUnit\\TestRunner\\TestResult\\Issues\\Issue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Issue.php', - 'PHPUnit\\TestRunner\\TestResult\\PassedTests' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/PassedTests.php', - 'PHPUnit\\TestRunner\\TestResult\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/Subscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/TestResult.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestRunnerTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteFinishedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteSkippedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestSuiteStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteStartedSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredErrorSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitNoticeSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredPhpunitWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\TestRunner\\TestResult\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\TextUI\\Application' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Application.php', - 'PHPUnit\\TextUI\\CannotOpenSocketException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/CannotOpenSocketException.php', - 'PHPUnit\\TextUI\\CliArguments\\Builder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php', - 'PHPUnit\\TextUI\\CliArguments\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php', - 'PHPUnit\\TextUI\\CliArguments\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php', - 'PHPUnit\\TextUI\\CliArguments\\XmlConfigurationFileFinder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Cli/XmlConfigurationFileFinder.php', - 'PHPUnit\\TextUI\\Command\\AtLeastVersionCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php', - 'PHPUnit\\TextUI\\Command\\CheckPhpConfigurationCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/CheckPhpConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Command.php', - 'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestFilesCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php', - 'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php', - 'PHPUnit\\TextUI\\Command\\MigrateConfigurationCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php', - 'PHPUnit\\TextUI\\Command\\Result' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Result.php', - 'PHPUnit\\TextUI\\Command\\ShowHelpCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ShowHelpCommand.php', - 'PHPUnit\\TextUI\\Command\\ShowVersionCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ShowVersionCommand.php', - 'PHPUnit\\TextUI\\Command\\VersionCheckCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/VersionCheckCommand.php', - 'PHPUnit\\TextUI\\Command\\WarmCodeCoverageCacheCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/BootstrapLoader.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapScriptDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptDoesNotExistException.php', - 'PHPUnit\\TextUI\\Configuration\\BootstrapScriptException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptException.php', - 'PHPUnit\\TextUI\\Configuration\\Builder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Builder.php', - 'PHPUnit\\TextUI\\Configuration\\CodeCoverageFilterRegistry' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/CodeCoverageFilterRegistry.php', - 'PHPUnit\\TextUI\\Configuration\\CodeCoverageReportNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/CodeCoverageReportNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Configuration.php', - 'PHPUnit\\TextUI\\Configuration\\ConfigurationCannotBeBuiltException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/ConfigurationCannotBeBuiltException.php', - 'PHPUnit\\TextUI\\Configuration\\Constant' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Constant.php', - 'PHPUnit\\TextUI\\Configuration\\ConstantCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollection.php', - 'PHPUnit\\TextUI\\Configuration\\ConstantCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Directory.php', - 'PHPUnit\\TextUI\\Configuration\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/Exception.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrap' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrap.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrapCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollection.php', - 'PHPUnit\\TextUI\\Configuration\\ExtensionBootstrapCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\File' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/File.php', - 'PHPUnit\\TextUI\\Configuration\\FileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollection.php', - 'PHPUnit\\TextUI\\Configuration\\FileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectory.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\FilterDirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\FilterNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/FilterNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Group.php', - 'PHPUnit\\TextUI\\Configuration\\GroupCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollection.php', - 'PHPUnit\\TextUI\\Configuration\\GroupCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\IniSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSetting.php', - 'PHPUnit\\TextUI\\Configuration\\IniSettingCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollection.php', - 'PHPUnit\\TextUI\\Configuration\\IniSettingCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\LoggingNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/LoggingNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\Merger' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Merger.php', - 'PHPUnit\\TextUI\\Configuration\\NoBaselineException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBaselineException.php', - 'PHPUnit\\TextUI\\Configuration\\NoBootstrapException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBootstrapException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCacheDirectoryException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCacheDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\NoConfigurationFileException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoConfigurationFileException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCoverageCacheDirectoryException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCoverageCacheDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\NoCustomCssFileException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCustomCssFileException.php', - 'PHPUnit\\TextUI\\Configuration\\NoDefaultTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoDefaultTestSuiteException.php', - 'PHPUnit\\TextUI\\Configuration\\NoPharExtensionDirectoryException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/NoPharExtensionDirectoryException.php', - 'PHPUnit\\TextUI\\Configuration\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php', - 'PHPUnit\\TextUI\\Configuration\\PhpHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/PhpHandler.php', - 'PHPUnit\\TextUI\\Configuration\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Registry.php', - 'PHPUnit\\TextUI\\Configuration\\Source' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php', - 'PHPUnit\\TextUI\\Configuration\\SourceFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/SourceFilter.php', - 'PHPUnit\\TextUI\\Configuration\\SourceMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/SourceMapper.php', - 'PHPUnit\\TextUI\\Configuration\\SpecificDeprecationToStopOnNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/SpecificDeprecationToStopOnNotConfiguredException.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectory.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestDirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\TestFile' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFile.php', - 'PHPUnit\\TextUI\\Configuration\\TestFileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestFileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuite.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/TestSuiteBuilder.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollection.php', - 'PHPUnit\\TextUI\\Configuration\\TestSuiteCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollectionIterator.php', - 'PHPUnit\\TextUI\\Configuration\\Variable' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/Variable.php', - 'PHPUnit\\TextUI\\Configuration\\VariableCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollection.php', - 'PHPUnit\\TextUI\\Configuration\\VariableCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollectionIterator.php', - 'PHPUnit\\TextUI\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/Exception.php', - 'PHPUnit\\TextUI\\Help' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Help.php', - 'PHPUnit\\TextUI\\InvalidSocketException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/InvalidSocketException.php', - 'PHPUnit\\TextUI\\Output\\DefaultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Printer/DefaultPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\BeforeTestClassMethodErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/BeforeTestClassMethodErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\ChildProcessErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/ChildProcessErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\ProgressPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/Subscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestConsideredRiskySubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestErroredSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFailedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFinishedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestMarkedIncompleteSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestPreparedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestRunnerExecutionStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestRunnerExecutionStartedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredErrorSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredNoticeSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpNoticeSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpunitDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredPhpunitWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ProgressPrinter\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredWarningSubscriber.php', - 'PHPUnit\\TextUI\\Output\\Default\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php', - 'PHPUnit\\TextUI\\Output\\Default\\UnexpectedOutputPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php', - 'PHPUnit\\TextUI\\Output\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Facade.php', - 'PHPUnit\\TextUI\\Output\\NullPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Printer/NullPrinter.php', - 'PHPUnit\\TextUI\\Output\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/Printer/Printer.php', - 'PHPUnit\\TextUI\\Output\\SummaryPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/SummaryPrinter.php', - 'PHPUnit\\TextUI\\Output\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php', - 'PHPUnit\\TextUI\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php', - 'PHPUnit\\TextUI\\ShellExitCodeCalculator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php', - 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php', - 'PHPUnit\\TextUI\\TestFileNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php', - 'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit\\TextUI\\TestSuiteFilterProcessor' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestSuiteFilterProcessor.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CannotFindSchemaException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Exception/CannotFindSchemaException.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Clover.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Cobertura.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Crap4j.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Html.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\OpenClover' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/OpenClover.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Text.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Xml.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Configuration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ConvertLogTypes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCloverToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCrap4jToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageHtmlToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoveragePhpToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageTextToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageXmlToReport.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\DefaultConfiguration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\FailedSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/FailedSchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Groups.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCacheDirectoryAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCacheDirectoryAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCoverageElement.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\LoadedFromFileConfiguration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/LoadedFromFileConfiguration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/LogToReportMigration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Junit.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Logging.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Otr' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Otr.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TeamCity.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Html.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Text.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/Migration.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationException.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromRootToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveCoverageDirectoriesToSource' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/PHPUnit.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveBeStrictAboutTodoAnnotatedTestsAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutTodoAnnotatedTestsAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheResultFileAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheResultFileAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheTokensAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveConversionToExceptionsAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveConversionToExceptionsAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCoverageElementCacheDirectoryAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementCacheDirectoryAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCoverageElementProcessUncoveredFilesAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementProcessUncoveredFilesAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveEmptyFilter.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveListeners' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveListeners.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLogTypes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameBackupStaticAttributesAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBackupStaticAttributesAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameBeStrictAboutCoversAnnotationAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBeStrictAboutCoversAnnotationAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\RenameForceCoversAnnotationAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameForceCoversAnnotationAttribute.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ReplaceRestrictDeprecationsWithIgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ReplaceRestrictDeprecationsWithIgnoreDeprecations.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaDetector' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SchemaFinder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SnapshotNodeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\SuccessfulSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/TestSuiteMapper.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php', - 'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php', - 'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/Exception.php', - 'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php', - 'PHPUnit\\Util\\Exporter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exporter.php', - 'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit\\Util\\Http\\Downloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Http/Downloader.php', - 'PHPUnit\\Util\\Http\\PhpDownloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Http/PhpDownloader.php', - 'PHPUnit\\Util\\InvalidDirectoryException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/InvalidDirectoryException.php', - 'PHPUnit\\Util\\InvalidJsonException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/InvalidJsonException.php', - 'PHPUnit\\Util\\InvalidVersionOperatorException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/InvalidVersionOperatorException.php', - 'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php', - 'PHPUnit\\Util\\PHP\\DefaultJobRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultJobRunner.php', - 'PHPUnit\\Util\\PHP\\Job' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Job.php', - 'PHPUnit\\Util\\PHP\\JobRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/JobRunner.php', - 'PHPUnit\\Util\\PHP\\JobRunnerRegistry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/JobRunnerRegistry.php', - 'PHPUnit\\Util\\PHP\\PhpProcessException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/PhpProcessException.php', - 'PHPUnit\\Util\\PHP\\Result' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Result.php', - 'PHPUnit\\Util\\Reflection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Reflection.php', - 'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit\\Util\\ThrowableToStringMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ThrowableToStringMapper.php', - 'PHPUnit\\Util\\VersionComparisonOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php', - 'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Xml.php', - 'PHPUnit\\Util\\Xml\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Loader.php', - 'PHPUnit\\Util\\Xml\\XmlException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/XmlException.php', - 'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php', - 'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php', - 'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php', - 'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php', - 'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php', - 'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php', - 'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php', - 'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php', - 'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php', - 'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php', - 'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php', - 'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php', - 'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php', - 'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php', - 'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php', - 'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php', - 'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php', - 'PharIo\\Manifest\\ElementCollectionException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ElementCollectionException.php', - 'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php', - 'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php', - 'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php', - 'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php', - 'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php', - 'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php', - 'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php', - 'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php', - 'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php', - 'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php', - 'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php', - 'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php', - 'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php', - 'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php', - 'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php', - 'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php', - 'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php', - 'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php', - 'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php', - 'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php', - 'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php', - 'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', - 'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php', - 'PharIo\\Manifest\\NoEmailAddressException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', - 'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php', - 'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', - 'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php', - 'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php', - 'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php', - 'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php', - 'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php', - 'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php', - 'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php', - 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', - 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', - 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php', - 'PharIo\\Version\\BuildMetaData' => __DIR__ . '/..' . '/phar-io/version/src/BuildMetaData.php', - 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php', - 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php', - 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', - 'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', - 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php', - 'PharIo\\Version\\NoBuildMetaDataException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php', - 'PharIo\\Version\\NoPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php', - 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', - 'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php', - 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', - 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', - 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', - 'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php', - 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php', - 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php', - 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php', - 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php', - 'SQLite3Exception' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/SQLite3Exception.php', - 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', - 'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php', - 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', - 'SebastianBergmann\\CliParser\\Parser' => __DIR__ . '/..' . '/sebastian/cli-parser/src/Parser.php', - 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php', - 'SebastianBergmann\\CliParser\\UnknownOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php', - 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php', - 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'SebastianBergmann\\CodeCoverage\\Data\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php', - 'SebastianBergmann\\CodeCoverage\\Data\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Selector.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/XdebugDriver.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugVersionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php', - 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php', - 'SebastianBergmann\\CodeCoverage\\FileCouldNotBeWrittenException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php', - 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php', - 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', - 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php', - 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php', - 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/CrapIndex.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php', - 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php', - 'SebastianBergmann\\CodeCoverage\\ParserException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ParserException.php', - 'SebastianBergmann\\CodeCoverage\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', - 'SebastianBergmann\\CodeCoverage\\ReflectionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php', - 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Cobertura.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Colors' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Colors.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\CustomCssFile' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', - 'SebastianBergmann\\CodeCoverage\\Report\\OpenClover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/OpenClover.php', - 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Thresholds' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Thresholds.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', - 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\AnalysisResult' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/AnalysisResult.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\AttributeParentConnectingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/AttributeParentConnectingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingSourceAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingSourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Class_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/CodeUnitFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/ExecutableLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Function_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/IgnoredLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Interface_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\LinesOfCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingSourceAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingSourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\SourceAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/SourceAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Trait_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Visibility' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php', - 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Class_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Class_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Function_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Function_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\InvalidCodeCoverageTargetException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\MapBuilder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/MapBuilder.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Mapper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Mapper.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Method.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Namespace_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Namespace_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Target' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Target.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollection' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollection.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionIterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionValidator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Trait_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationFailure' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationFailure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationResult' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationResult.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationSuccess' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationSuccess.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Known' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Known.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Large' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Large.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Medium' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Medium.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Small' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Small.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\TestSize' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/TestSize.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Unknown' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Unknown.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Failure' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestStatus/Failure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Known' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestStatus/Known.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Success' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestStatus/Success.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\TestStatus' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestStatus/TestStatus.php', - 'SebastianBergmann\\CodeCoverage\\Test\\TestStatus\\Unknown' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestStatus/Unknown.php', - 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', - 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Filesystem.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php', - 'SebastianBergmann\\CodeCoverage\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Xml.php', - 'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php', - 'SebastianBergmann\\CodeCoverage\\WriteOperationFailedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php', - 'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\ClosureComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ClosureComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\EnumerationComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/EnumerationComparator.php', - 'SebastianBergmann\\Comparator\\Exception' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/Exception.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumberComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\RuntimeException' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Complexity\\Calculator' => __DIR__ . '/..' . '/sebastian/complexity/src/Calculator.php', - 'SebastianBergmann\\Complexity\\Complexity' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/Complexity.php', - 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php', - 'SebastianBergmann\\Complexity\\ComplexityCollection' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollection.php', - 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php', - 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php', - 'SebastianBergmann\\Complexity\\Exception' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/Exception.php', - 'SebastianBergmann\\Complexity\\RuntimeException' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/RuntimeException.php', - 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php', - 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php', - 'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php', - 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php', - 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php', - 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php', - 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php', - 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\FileIterator\\ExcludeIterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/ExcludeIterator.php', - 'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', - 'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', - 'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', - 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', - 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php', - 'SebastianBergmann\\GlobalState\\ExcludeList' => __DIR__ . '/..' . '/sebastian/global-state/src/ExcludeList.php', - 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', - 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', - 'SebastianBergmann\\Invoker\\Exception' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/Exception.php', - 'SebastianBergmann\\Invoker\\Invoker' => __DIR__ . '/..' . '/phpunit/php-invoker/src/Invoker.php', - 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php', - 'SebastianBergmann\\Invoker\\TimeoutException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/TimeoutException.php', - 'SebastianBergmann\\LinesOfCode\\Counter' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Counter.php', - 'SebastianBergmann\\LinesOfCode\\Exception' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/Exception.php', - 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', - 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LineCountingVisitor.php', - 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LinesOfCode.php', - 'SebastianBergmann\\LinesOfCode\\RuntimeException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', - 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php', - 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php', - 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', - 'SebastianBergmann\\Template\\Exception' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/Exception.php', - 'SebastianBergmann\\Template\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php', - 'SebastianBergmann\\Template\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/RuntimeException.php', - 'SebastianBergmann\\Template\\Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', - 'SebastianBergmann\\Timer\\Duration' => __DIR__ . '/..' . '/phpunit/php-timer/src/Duration.php', - 'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/Exception.php', - 'SebastianBergmann\\Timer\\NoActiveTimerException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php', - 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => __DIR__ . '/..' . '/phpunit/php-timer/src/ResourceUsageFormatter.php', - 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php', - 'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', - 'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/type/CallableType.php', - 'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php', - 'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/type/FalseType.php', - 'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/GenericObjectType.php', - 'SebastianBergmann\\Type\\IntersectionType' => __DIR__ . '/..' . '/sebastian/type/src/type/IntersectionType.php', - 'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/type/IterableType.php', - 'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/type/MixedType.php', - 'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php', - 'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php', - 'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php', - 'SebastianBergmann\\Type\\Parameter' => __DIR__ . '/..' . '/sebastian/type/src/Parameter.php', - 'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php', - 'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php', - 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php', - 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php', - 'SebastianBergmann\\Type\\TrueType' => __DIR__ . '/..' . '/sebastian/type/src/type/TrueType.php', - 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php', - 'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php', - 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php', - 'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php', - 'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php', - 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', - 'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php', - 'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php', - 'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php', - 'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php', - 'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php', - 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php', - 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php', - 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php', - 'staabm\\SideEffectsDetector\\SideEffect' => __DIR__ . '/..' . '/staabm/side-effects-detector/lib/SideEffect.php', - 'staabm\\SideEffectsDetector\\SideEffectsDetector' => __DIR__ . '/..' . '/staabm/side-effects-detector/lib/SideEffectsDetector.php', - '' => __DIR__ . '/..' . '/symfony/cache/Traits/ValueWrapper.php', + 'FastRoute\\BadRouteException' => __DIR__ . '/..' . '/nikic/fast-route/src/BadRouteException.php', + 'FastRoute\\DataGenerator' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator.php', + 'FastRoute\\DataGenerator\\CharCountBased' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator/CharCountBased.php', + 'FastRoute\\DataGenerator\\GroupCountBased' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator/GroupCountBased.php', + 'FastRoute\\DataGenerator\\GroupPosBased' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator/GroupPosBased.php', + 'FastRoute\\DataGenerator\\MarkBased' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator/MarkBased.php', + 'FastRoute\\DataGenerator\\RegexBasedAbstract' => __DIR__ . '/..' . '/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php', + 'FastRoute\\Dispatcher' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher.php', + 'FastRoute\\Dispatcher\\CharCountBased' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher/CharCountBased.php', + 'FastRoute\\Dispatcher\\GroupCountBased' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher/GroupCountBased.php', + 'FastRoute\\Dispatcher\\GroupPosBased' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher/GroupPosBased.php', + 'FastRoute\\Dispatcher\\MarkBased' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher/MarkBased.php', + 'FastRoute\\Dispatcher\\RegexBasedAbstract' => __DIR__ . '/..' . '/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php', + 'FastRoute\\Route' => __DIR__ . '/..' . '/nikic/fast-route/src/Route.php', + 'FastRoute\\RouteCollector' => __DIR__ . '/..' . '/nikic/fast-route/src/RouteCollector.php', + 'FastRoute\\RouteParser' => __DIR__ . '/..' . '/nikic/fast-route/src/RouteParser.php', + 'FastRoute\\RouteParser\\Std' => __DIR__ . '/..' . '/nikic/fast-route/src/RouteParser/Std.php', + 'Framework\\Core\\Application' => __DIR__ . '/../..' . '/framework/Core/Application.php', + 'Framework\\Core\\Container' => __DIR__ . '/../..' . '/framework/Core/Container.php', + 'Framework\\Exception\\Handler' => __DIR__ . '/../..' . '/framework/Exception/Handler.php', + 'Framework\\Http\\Request' => __DIR__ . '/../..' . '/framework/Http/Request.php', + 'Framework\\Http\\Response' => __DIR__ . '/../..' . '/framework/Http/Response.php', + 'Framework\\Log\\Logger' => __DIR__ . '/../..' . '/framework/Log/Logger.php', + 'Framework\\Routing\\Router' => __DIR__ . '/../..' . '/framework/Routing/Router.php', + 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/src/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/src/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/src/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/src/NullLogger.php', + 'Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php', + 'Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php', + 'Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php', + 'think\\Collection' => __DIR__ . '/..' . '/topthink/think-helper/src/Collection.php', + 'think\\DbManager' => __DIR__ . '/..' . '/topthink/think-orm/src/DbManager.php', + 'think\\Model' => __DIR__ . '/..' . '/topthink/think-orm/src/Model.php', + 'think\\Paginator' => __DIR__ . '/..' . '/topthink/think-orm/src/Paginator.php', + 'think\\contract\\Arrayable' => __DIR__ . '/..' . '/topthink/think-helper/src/contract/Arrayable.php', + 'think\\contract\\Jsonable' => __DIR__ . '/..' . '/topthink/think-helper/src/contract/Jsonable.php', + 'think\\db\\BaseQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/BaseQuery.php', + 'think\\db\\Builder' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Builder.php', + 'think\\db\\CacheItem' => __DIR__ . '/..' . '/topthink/think-orm/src/db/CacheItem.php', + 'think\\db\\Connection' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Connection.php', + 'think\\db\\ConnectionInterface' => __DIR__ . '/..' . '/topthink/think-orm/src/db/ConnectionInterface.php', + 'think\\db\\Fetch' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Fetch.php', + 'think\\db\\Mongo' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Mongo.php', + 'think\\db\\PDOConnection' => __DIR__ . '/..' . '/topthink/think-orm/src/db/PDOConnection.php', + 'think\\db\\Query' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Query.php', + 'think\\db\\Raw' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Raw.php', + 'think\\db\\Where' => __DIR__ . '/..' . '/topthink/think-orm/src/db/Where.php', + 'think\\db\\builder\\Mongo' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Mongo.php', + 'think\\db\\builder\\Mysql' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Mysql.php', + 'think\\db\\builder\\Oracle' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Oracle.php', + 'think\\db\\builder\\Pgsql' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Pgsql.php', + 'think\\db\\builder\\Sqlite' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Sqlite.php', + 'think\\db\\builder\\Sqlsrv' => __DIR__ . '/..' . '/topthink/think-orm/src/db/builder/Sqlsrv.php', + 'think\\db\\concern\\AggregateQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/AggregateQuery.php', + 'think\\db\\concern\\JoinAndViewQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/JoinAndViewQuery.php', + 'think\\db\\concern\\ModelRelationQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/ModelRelationQuery.php', + 'think\\db\\concern\\ParamsBind' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/ParamsBind.php', + 'think\\db\\concern\\ResultOperation' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/ResultOperation.php', + 'think\\db\\concern\\TableFieldInfo' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/TableFieldInfo.php', + 'think\\db\\concern\\TimeFieldQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/TimeFieldQuery.php', + 'think\\db\\concern\\Transaction' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/Transaction.php', + 'think\\db\\concern\\WhereQuery' => __DIR__ . '/..' . '/topthink/think-orm/src/db/concern/WhereQuery.php', + 'think\\db\\connector\\Mongo' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Mongo.php', + 'think\\db\\connector\\Mysql' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Mysql.php', + 'think\\db\\connector\\Oracle' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Oracle.php', + 'think\\db\\connector\\Pgsql' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Pgsql.php', + 'think\\db\\connector\\Sqlite' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Sqlite.php', + 'think\\db\\connector\\Sqlsrv' => __DIR__ . '/..' . '/topthink/think-orm/src/db/connector/Sqlsrv.php', + 'think\\db\\exception\\BindParamException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/BindParamException.php', + 'think\\db\\exception\\DataNotFoundException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/DataNotFoundException.php', + 'think\\db\\exception\\DbEventException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/DbEventException.php', + 'think\\db\\exception\\DbException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/DbException.php', + 'think\\db\\exception\\InvalidArgumentException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/InvalidArgumentException.php', + 'think\\db\\exception\\ModelEventException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/ModelEventException.php', + 'think\\db\\exception\\ModelNotFoundException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/ModelNotFoundException.php', + 'think\\db\\exception\\PDOException' => __DIR__ . '/..' . '/topthink/think-orm/src/db/exception/PDOException.php', + 'think\\facade\\Db' => __DIR__ . '/..' . '/topthink/think-orm/src/facade/Db.php', + 'think\\helper\\Arr' => __DIR__ . '/..' . '/topthink/think-helper/src/helper/Arr.php', + 'think\\helper\\Macroable' => __DIR__ . '/..' . '/topthink/think-helper/src/helper/Macroable.php', + 'think\\helper\\Str' => __DIR__ . '/..' . '/topthink/think-helper/src/helper/Str.php', + 'think\\model\\Collection' => __DIR__ . '/..' . '/topthink/think-orm/src/model/Collection.php', + 'think\\model\\Pivot' => __DIR__ . '/..' . '/topthink/think-orm/src/model/Pivot.php', + 'think\\model\\Relation' => __DIR__ . '/..' . '/topthink/think-orm/src/model/Relation.php', + 'think\\model\\concern\\Attribute' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/Attribute.php', + 'think\\model\\concern\\Conversion' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/Conversion.php', + 'think\\model\\concern\\ModelEvent' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/ModelEvent.php', + 'think\\model\\concern\\OptimLock' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/OptimLock.php', + 'think\\model\\concern\\RelationShip' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/RelationShip.php', + 'think\\model\\concern\\SoftDelete' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/SoftDelete.php', + 'think\\model\\concern\\TimeStamp' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/TimeStamp.php', + 'think\\model\\concern\\Virtual' => __DIR__ . '/..' . '/topthink/think-orm/src/model/concern/Virtual.php', + 'think\\model\\relation\\BelongsTo' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/BelongsTo.php', + 'think\\model\\relation\\BelongsToMany' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/BelongsToMany.php', + 'think\\model\\relation\\HasMany' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/HasMany.php', + 'think\\model\\relation\\HasManyThrough' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/HasManyThrough.php', + 'think\\model\\relation\\HasOne' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/HasOne.php', + 'think\\model\\relation\\HasOneThrough' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/HasOneThrough.php', + 'think\\model\\relation\\MorphMany' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/MorphMany.php', + 'think\\model\\relation\\MorphOne' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/MorphOne.php', + 'think\\model\\relation\\MorphTo' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/MorphTo.php', + 'think\\model\\relation\\MorphToMany' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/MorphToMany.php', + 'think\\model\\relation\\OneToOne' => __DIR__ . '/..' . '/topthink/think-orm/src/model/relation/OneToOne.php', + 'think\\paginator\\driver\\Bootstrap' => __DIR__ . '/..' . '/topthink/think-orm/src/paginator/driver/Bootstrap.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitab0f065e34a4b36481d66daec2e48422::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitab0f065e34a4b36481d66daec2e48422::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInitab0f065e34a4b36481d66daec2e48422::$prefixesPsr0; - $loader->classMap = ComposerStaticInitab0f065e34a4b36481d66daec2e48422::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit9b08b741b9b29d9b8d308493e978457f::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit9b08b741b9b29d9b8d308493e978457f::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit9b08b741b9b29d9b8d308493e978457f::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2b3f96bf..a30d3c6d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,5109 +1,88 @@ { "packages": [ { - "name": "brick/math", - "version": "0.14.0", - "version_normalized": "0.14.0.0", + "name": "nikic/fast-route", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", - "url": "https://github.com/brick/math.git", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2" + "url": "https://github.com/nikic/FastRoute.git", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", + "reference": "181d480e08d9476e61381e04a71b34dc0432e812", "shasum": "" }, "require": { - "php": "^8.2" + "php": ">=5.4.0" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "2.1.22", - "phpunit/phpunit": "^11.5" + "phpunit/phpunit": "^4.8.35|~5.7" }, - "time": "2025-08-29T12:40:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Brick\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Arbitrary-precision arithmetic library", - "keywords": [ - "Arbitrary-precision", - "BigInteger", - "BigRational", - "arithmetic", - "bigdecimal", - "bignum", - "bignumber", - "brick", - "decimal", - "integer", - "math", - "mathematics", - "rational" - ], - "support": { - "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.0" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "install-path": "../brick/math" - }, - { - "name": "doctrine/annotations", - "version": "2.0.2", - "version_normalized": "2.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "time": "2024-09-05T10:17:24+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.2" - }, - "abandoned": true, - "install-path": "../doctrine/annotations" - }, - { - "name": "doctrine/lexer", - "version": "3.0.1", - "version_normalized": "3.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "time": "2024-02-05T11:56:58+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "install-path": "../doctrine/lexer" - }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.18.0", - "version_normalized": "4.18.0.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", - "reference": "cb56001e54359df7ae76dc522d08845dc741621b", - "shasum": "" - }, - "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" - }, - "require-dev": { - "cerdic/css-tidy": "^1.7 || ^2.0", - "simpletest/simpletest": "dev-master" - }, - "suggest": { - "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", - "ext-bcmath": "Used for unit conversion and imagecrash protection", - "ext-iconv": "Converts text to and from non-UTF-8 encodings", - "ext-tidy": "Used for pretty-printing HTML" - }, - "time": "2024-11-01T03:51:45+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "library/HTMLPurifier.composer.php" - ], - "psr-0": { - "HTMLPurifier": "library/" - }, - "exclude-from-classmap": [ - "/library/HTMLPurifier/Language/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "support": { - "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" - }, - "install-path": "../ezyang/htmlpurifier" - }, - { - "name": "fig/http-message-util", - "version": "1.1.5", - "version_normalized": "1.1.5.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" - }, - "time": "2020-11-24T22:02:12+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Fig\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" - }, - "install-path": "../fig/http-message-util" - }, - { - "name": "monolog/monolog", - "version": "3.7.0", - "version_normalized": "3.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", - "reference": "f4393b648b78a5408747de94fca38beb5f7e9ef8", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "time": "2024-06-28T09:40:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.7.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "install-path": "../monolog/monolog" - }, - { - "name": "myclabs/deep-copy", - "version": "1.13.4", - "version_normalized": "1.13.4.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "time": "2025-08-01T08:46:24+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "install-path": "../myclabs/deep-copy" - }, - { - "name": "nikic/php-parser", - "version": "v5.6.1", - "version_normalized": "5.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "time": "2025-08-13T20:13:15+00:00", - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" - }, - "install-path": "../nikic/php-parser" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "version_normalized": "2.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "time": "2024-03-03T12:33:53+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "install-path": "../phar-io/manifest" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "version_normalized": "3.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "time": "2022-02-21T01:04:05+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "install-path": "../phar-io/version" - }, - { - "name": "phpunit/php-code-coverage", - "version": "12.4.0", - "version_normalized": "12.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^5.6.1", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0", - "phpunit/php-text-template": "^5.0", - "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.0.3", - "sebastian/lines-of-code": "^4.0", - "sebastian/version": "^6.0", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.3.7" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "time": "2025-09-24T13:44:41+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "12.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.4.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", - "type": "tidelift" - } - ], - "install-path": "../phpunit/php-code-coverage" - }, - { - "name": "phpunit/php-file-iterator", - "version": "6.0.0", - "version_normalized": "6.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/961bc913d42fe24a257bfff826a5068079ac7782", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:58:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../phpunit/php-file-iterator" - }, - { - "name": "phpunit/php-invoker", - "version": "6.0.0", - "version_normalized": "6.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-pcntl": "*" - }, - "time": "2025-02-07T04:58:58+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../phpunit/php-invoker" - }, - { - "name": "phpunit/php-text-template", - "version": "5.0.0", - "version_normalized": "5.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:59:16+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../phpunit/php-text-template" - }, - { - "name": "phpunit/php-timer", - "version": "8.0.0", - "version_normalized": "8.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:59:38+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../phpunit/php-timer" - }, - { - "name": "phpunit/phpunit", - "version": "12.4.1", - "version_normalized": "12.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc5413a2e6d240d2f6d9317bdf7f0a24e73de194" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc5413a2e6d240d2f6d9317bdf7f0a24e73de194", - "reference": "fc5413a2e6d240d2f6d9317bdf7f0a24e73de194", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=8.3", - "phpunit/php-code-coverage": "^12.4.0", - "phpunit/php-file-iterator": "^6.0.0", - "phpunit/php-invoker": "^6.0.0", - "phpunit/php-text-template": "^5.0.0", - "phpunit/php-timer": "^8.0.0", - "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.3", - "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.3", - "sebastian/exporter": "^7.0.2", - "sebastian/global-state": "^8.0.2", - "sebastian/object-enumerator": "^7.0.0", - "sebastian/type": "^6.0.3", - "sebastian/version": "^6.0.0", - "staabm/side-effects-detector": "^1.0.5" - }, - "time": "2025-10-09T14:08:29+00:00", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "12.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.4.1" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "install-path": "../phpunit/phpunit" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2021-02-03T23:26:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "install-path": "../psr/cache" - }, - { - "name": "psr/container", - "version": "2.0.2", - "version_normalized": "2.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "time": "2021-11-05T16:47:00+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "install-path": "../psr/container" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "time": "2019-01-08T18:20:26+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "install-path": "../psr/event-dispatcher" - }, - { - "name": "psr/http-message", - "version": "2.0", - "version_normalized": "2.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "time": "2023-04-04T09:54:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "install-path": "../psr/http-message" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "time": "2023-04-10T20:06:20+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "support": { - "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" - }, - "install-path": "../psr/http-server-handler" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "time": "2023-04-11T06:14:47+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "support": { - "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" - }, - "install-path": "../psr/http-server-middleware" - }, - { - "name": "psr/log", - "version": "3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2024-09-11T13:17:53+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "install-path": "../psr/log" - }, - { - "name": "psr/simple-cache", - "version": "3.0.0", - "version_normalized": "3.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2021-10-29T13:26:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" - }, - "install-path": "../psr/simple-cache" - }, - { - "name": "ramsey/collection", - "version": "2.1.1", - "version_normalized": "2.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/ramsey/collection.git", - "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", - "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.45", - "fakerphp/faker": "^1.24", - "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^2.1", - "mockery/mockery": "^1.6", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.4", - "phpspec/prophecy-phpunit": "^2.3", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.5", - "ramsey/coding-standard": "^2.3", - "ramsey/conventional-commits": "^1.6", - "roave/security-advisories": "dev-latest" - }, - "time": "2025-03-22T05:38:12+00:00", - "type": "library", - "extra": { - "captainhook": { - "force-install": true - }, - "ramsey/conventional-commits": { - "configFile": "conventional-commits.json" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Ramsey\\Collection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "A PHP library for representing and manipulating collections.", - "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" - ], - "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.1" - }, - "install-path": "../ramsey/collection" - }, - { - "name": "ramsey/uuid", - "version": "4.9.1", - "version_normalized": "4.9.1.0", - "source": { - "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440", - "reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440", - "shasum": "" - }, - "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "captainhook/captainhook": "^5.25", - "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "ergebnis/composer-normalize": "^2.47", - "mockery/mockery": "^1.6", - "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.6", - "php-mock/php-mock-mockery": "^1.5", - "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpbench/phpbench": "^1.2.14", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^9.6", - "slevomat/coding-standard": "^8.18", - "squizlabs/php_codesniffer": "^3.13" - }, - "suggest": { - "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", - "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "time": "2025-09-04T20:59:21+00:00", - "type": "library", - "extra": { - "captainhook": { - "force-install": true - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Ramsey\\Uuid\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "support": { - "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.1" - }, - "install-path": "../ramsey/uuid" - }, - { - "name": "sebastian/cli-parser", - "version": "4.2.0", - "version_normalized": "4.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-09-14T09:36:45+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", - "type": "tidelift" - } - ], - "install-path": "../sebastian/cli-parser" - }, - { - "name": "sebastian/comparator", - "version": "7.1.3", - "version_normalized": "7.1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dc904b4bb3ab070865fa4068cd84f3da8b945148", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.2" - }, - "suggest": { - "ext-bcmath": "For comparing BcMath\\Number objects" - }, - "time": "2025-08-20T11:27:00+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", - "type": "tidelift" - } - ], - "install-path": "../sebastian/comparator" - }, - { - "name": "sebastian/complexity", - "version": "5.0.0", - "version_normalized": "5.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:55:25+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/complexity" - }, - { - "name": "sebastian/diff", - "version": "7.0.0", - "version_normalized": "7.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" - }, - "time": "2025-02-07T04:55:46+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/diff" - }, - { - "name": "sebastian/environment", - "version": "8.0.3", - "version_normalized": "8.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-posix": "*" - }, - "time": "2025-08-12T14:11:56+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", - "type": "tidelift" - } - ], - "install-path": "../sebastian/environment" - }, - { - "name": "sebastian/exporter", - "version": "7.0.2", - "version_normalized": "7.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-09-24T06:16:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", - "type": "tidelift" - } - ], - "install-path": "../sebastian/exporter" - }, - { - "name": "sebastian/global-state", - "version": "8.0.2", - "version_normalized": "8.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^12.0" - }, - "time": "2025-08-29T11:29:25+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", - "type": "tidelift" - } - ], - "install-path": "../sebastian/global-state" - }, - { - "name": "sebastian/lines-of-code", - "version": "4.0.0", - "version_normalized": "4.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:57:28+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/lines-of-code" - }, - { - "name": "sebastian/object-enumerator", - "version": "7.0.0", - "version_normalized": "7.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:57:48+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/object-enumerator" - }, - { - "name": "sebastian/object-reflector", - "version": "5.0.0", - "version_normalized": "5.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-02-07T04:58:17+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/object-reflector" - }, - { - "name": "sebastian/recursion-context", - "version": "7.0.1", - "version_normalized": "7.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-08-13T04:44:59+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", - "type": "tidelift" - } - ], - "install-path": "../sebastian/recursion-context" - }, - { - "name": "sebastian/type", - "version": "6.0.3", - "version_normalized": "6.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "time": "2025-08-09T06:57:12+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/type", - "type": "tidelift" - } - ], - "install-path": "../sebastian/type" - }, - { - "name": "sebastian/version", - "version": "6.0.0", - "version_normalized": "6.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "time": "2025-02-07T05:00:38+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "install-path": "../sebastian/version" - }, - { - "name": "staabm/side-effects-detector", - "version": "1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/staabm/side-effects-detector.git", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.6", - "phpunit/phpunit": "^9.6.21", - "symfony/var-dumper": "^5.4.43", - "tomasvotruba/type-coverage": "1.0.0", - "tomasvotruba/unused-public": "1.0.0" - }, - "time": "2024-10-20T05:08:20+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A static analysis tool to detect side effects in PHP code", - "keywords": [ - "static analysis" - ], - "support": { - "issues": "https://github.com/staabm/side-effects-detector/issues", - "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" - }, - "funding": [ - { - "url": "https://github.com/staabm", - "type": "github" - } - ], - "install-path": "../staabm/side-effects-detector" - }, - { - "name": "symfony/cache", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f", - "reference": "bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/cache": "^2.0|^3.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^3.6", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.4|^7.0" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/dependency-injection": "<6.4", - "symfony/http-kernel": "<6.4", - "symfony/var-dumper": "<6.4" - }, - "provide": { - "psr/cache-implementation": "2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0", - "symfony/cache-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/filesystem": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "time": "2025-09-11T10:12:26+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "classmap": [ - "Traits/ValueWrapper.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache" - }, - { - "name": "symfony/cache-contracts", - "version": "v3.6.0", - "version_normalized": "3.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", - "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/cache": "^3.0" - }, - "time": "2025-03-13T15:25:07+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/cache-contracts" - }, - { - "name": "symfony/config", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/8a09223170046d2cfda3d2e11af01df2c641e961", - "reference": "8a09223170046d2cfda3d2e11af01df2c641e961", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "time": "2025-09-22T12:46:16+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/config" - }, - { - "name": "symfony/dependency-injection", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "82119812ab0bf3425c1234d413efd1b19bb92ae4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/82119812ab0bf3425c1234d413efd1b19bb92ae4", - "reference": "82119812ab0bf3425c1234d413efd1b19bb92ae4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4.20|^7.2.5" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.4", - "symfony/finder": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "symfony/service-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "symfony/config": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" - }, - "time": "2025-09-11T10:12:26+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dependency-injection" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.6.0", - "version_normalized": "3.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "time": "2024-09-25T14:21:43+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/deprecation-contracts" - }, - { - "name": "symfony/dotenv", - "version": "v7.3.2", - "version_normalized": "7.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dotenv.git", - "reference": "2192790a11f9e22cbcf9dc705a3ff22a5503923a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/2192790a11f9e22cbcf9dc705a3ff22a5503923a", - "reference": "2192790a11f9e22cbcf9dc705a3ff22a5503923a", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "conflict": { - "symfony/console": "<6.4", - "symfony/process": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0" - }, - "time": "2025-07-10T08:29:33+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Dotenv\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Registers environment variables from a .env file", - "homepage": "https://symfony.com", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "source": "https://github.com/symfony/dotenv/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/dotenv" - }, - { - "name": "symfony/error-handler", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "99f81bc944ab8e5dae4f21b4ca9972698bbad0e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/99f81bc944ab8e5dae4f21b4ca9972698bbad0e4", - "reference": "99f81bc944ab8e5dae4f21b4ca9972698bbad0e4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^6.4|^7.0" - }, - "conflict": { - "symfony/deprecation-contracts": "<2.5", - "symfony/http-kernel": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/webpack-encore-bundle": "^1.0|^2.0" - }, - "time": "2025-09-11T10:12:26+00:00", - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/error-handler" - }, - { - "name": "symfony/event-dispatcher", - "version": "v7.3.3", - "version_normalized": "7.3.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" - }, - "time": "2025-08-13T11:49:31+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.6.0", - "version_normalized": "3.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "time": "2024-09-25T14:21:43+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/event-dispatcher-contracts" - }, - { - "name": "symfony/filesystem", - "version": "v7.3.2", - "version_normalized": "7.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "require-dev": { - "symfony/process": "^6.4|^7.0" - }, - "time": "2025-07-07T08:17:47+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/filesystem" - }, - { - "name": "symfony/finder", - "version": "v7.3.2", - "version_normalized": "7.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" - }, - "time": "2025-07-15T13:41:35+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/finder" - }, - { - "name": "symfony/http-foundation", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "c061c7c18918b1b64268771aad04b40be41dd2e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c061c7c18918b1b64268771aad04b40be41dd2e6", - "reference": "c061c7c18918b1b64268771aad04b40be41dd2e6", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php83": "^1.27" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4.12|>=7.0,<7.1.5" - }, - "require-dev": { - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4.12|^7.1.5", - "symfony/clock": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0" - }, - "time": "2025-09-16T08:38:17+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-foundation" - }, - { - "name": "symfony/http-kernel", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "b796dffea7821f035047235e076b60ca2446e3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b796dffea7821f035047235e076b60ca2446e3cf", - "reference": "b796dffea7821f035047235e076b60ca2446e3cf", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^7.3", - "symfony/http-foundation": "^7.3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/browser-kit": "<6.4", - "symfony/cache": "<6.4", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<6.4", - "symfony/form": "<6.4", - "symfony/http-client": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/translation": "<6.4", - "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<6.4", - "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.4", - "twig/twig": "<3.12" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^6.4|^7.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/css-selector": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^7.1", - "symfony/routing": "^6.4|^7.0", - "symfony/serializer": "^7.1", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/translation": "^6.4|^7.0", - "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^6.4|^7.0", - "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0", - "symfony/var-exporter": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "time": "2025-09-27T12:32:17+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/http-kernel" - }, - { - "name": "symfony/mime", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/b1b828f69cbaf887fa835a091869e55df91d0e35", - "reference": "b1b828f69cbaf887fa835a091869e55df91d0e35", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<6.4", - "symfony/serializer": "<6.4.3|>7.0,<7.0.3" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1|^4", - "league/html-to-markdown": "^5.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/serializer": "^6.4.3|^7.0.3" - }, - "time": "2025-09-16T08:38:17+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows manipulating MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "support": { - "source": "https://github.com/symfony/mime/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/mime" - }, - { - "name": "symfony/options-resolver", - "version": "v7.3.3", - "version_normalized": "7.3.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "time": "2025-08-05T10:16:07+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/options-resolver" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.33.0", - "version_normalized": "1.33.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "time": "2024-09-09T11:45:10+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-ctype" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.33.0", - "version_normalized": "1.33.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "symfony/polyfill-intl-normalizer": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2024-09-10T14:38:51+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-idn" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", - "version_normalized": "1.33.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "time": "2024-09-09T11:45:10+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-intl-normalizer" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", - "version_normalized": "1.33.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2024-12-23T08:48:59+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-mbstring" - }, - { - "name": "symfony/polyfill-php83", - "version": "v1.33.0", - "version_normalized": "1.33.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "time": "2025-07-08T02:45:35+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php83\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/polyfill-php83" - }, - { - "name": "symfony/rate-limiter", - "version": "v7.3.2", - "version_normalized": "7.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/rate-limiter.git", - "reference": "7e855541d302ba752f86fb0e97932e7969fe9c04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/7e855541d302ba752f86fb0e97932e7969fe9c04", - "reference": "7e855541d302ba752f86fb0e97932e7969fe9c04", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/options-resolver": "^7.3" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/lock": "^6.4|^7.0" - }, - "time": "2025-07-07T08:17:57+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\RateLimiter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Wouter de Jong", - "email": "wouter@wouterj.nl" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a Token Bucket implementation to rate limit input and output in your application", - "homepage": "https://symfony.com", - "keywords": [ - "limiter", - "rate-limiter" - ], - "support": { - "source": "https://github.com/symfony/rate-limiter/tree/v7.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/rate-limiter" - }, - { - "name": "symfony/routing", - "version": "v6.4.26", - "version_normalized": "6.4.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "6fc4c445f22857d4b8b40a02b73f423ddab295de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/6fc4c445f22857d4b8b40a02b73f423ddab295de", - "reference": "6fc4c445f22857d4b8b40a02b73f423ddab295de", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" - }, - "require-dev": { - "doctrine/annotations": "^1.12|^2", - "psr/log": "^1|^2|^3", - "symfony/config": "^6.2|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" - }, - "time": "2025-09-11T09:57:09+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Maps an HTTP request to a set of configuration variables", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.26" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/routing" - }, - { - "name": "symfony/service-contracts", - "version": "v3.6.0", - "version_normalized": "3.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "time": "2025-04-25T09:37:31+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/service-contracts" - }, - { - "name": "symfony/translation", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "ec25870502d0c7072d086e8ffba1420c85965174" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/ec25870502d0c7072d086e8ffba1420c85965174", - "reference": "ec25870502d0c7072d086e8ffba1420c85965174", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.5|^3.0" - }, - "conflict": { - "nikic/php-parser": "<5.0", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", - "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "symfony/translation-implementation": "2.3|3.0" - }, - "require-dev": { - "nikic/php-parser": "^5.0", - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "time": "2025-09-07T11:39:36+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/translation" - }, - { - "name": "symfony/translation-contracts", - "version": "v3.6.0", - "version_normalized": "3.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "time": "2024-09-27T08:32:26+00:00", - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/translation-contracts" - }, - { - "name": "symfony/var-dumper", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "time": "2025-09-11T10:12:26+00:00", - "bin": [ - "Resources/bin/var-dump-server" - ], + "time": "2018-02-13T20:26:39+00:00", "type": "library", "installation-source": "dist", "autoload": { "files": [ - "Resources/functions/dump.php" + "src/functions.php" ], "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "FastRoute\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Nikita Popov", + "email": "nikic@php.net" } ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", + "description": "Fast request router for PHP", "keywords": [ - "debug", - "dump" + "router", + "routing" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.3.4" + "issues": "https://github.com/nikic/FastRoute/issues", + "source": "https://github.com/nikic/FastRoute/tree/master" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/var-dumper" + "install-path": "../nikic/fast-route" }, { - "name": "symfony/var-exporter", - "version": "v7.3.4", - "version_normalized": "7.3.4.0", + "name": "psr/log", + "version": "2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4" + "url": "https://github.com/php-fig/log.git", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", - "reference": "0f020b544a30a7fe8ba972e53ee48a74c0bc87f4", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "require-dev": { - "symfony/property-access": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "php": ">=8.0.0" }, - "time": "2025-09-11T10:12:26+00:00", + "time": "2021-07-14T16:41:46+00:00", "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "lazy-loading", - "proxy", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" } - ], - "install-path": "../symfony/var-exporter" - }, - { - "name": "symfony/yaml", - "version": "v7.3.3", - "version_normalized": "7.3.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d4f4a66866fe2451f61296924767280ab5732d9d", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<6.4" }, - "require-dev": { - "symfony/console": "^6.4|^7.0" - }, - "time": "2025-08-27T11:34:33+00:00", - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Psr\\Log\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5111,188 +90,75 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v7.3.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "install-path": "../symfony/yaml" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "version_normalized": "1.2.3.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "time": "2024-03-03T12:36:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "install-path": "../theseer/tokenizer" + "install-path": "../psr/log" }, { - "name": "topthink/think-cache", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "name": "psr/simple-cache", + "version": "2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", - "url": "https://github.com/top-think/think-cache.git", - "reference": "4f8becaf802e2ebcd0e37df46495fe3999e917ca" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-cache/zipball/4f8becaf802e2ebcd0e37df46495fe3999e917ca", - "reference": "4f8becaf802e2ebcd0e37df46495fe3999e917ca", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { - "php": ">=8.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "topthink/think-container": "^3.0" + "php": ">=8.0.0" }, - "time": "2025-01-15T05:30:04+00:00", + "time": "2021-10-29T13:22:09+00:00", "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/helper.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" } - ], - "description": "Cache Manager", - "support": { - "issues": "https://github.com/top-think/think-cache/issues", - "source": "https://github.com/top-think/think-cache/tree/v3.0.1" - }, - "install-path": "../topthink/think-cache" - }, - { - "name": "topthink/think-container", - "version": "v3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-container.git", - "reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-container/zipball/b2df244be1e7399ad4c8be1ccc40ed57868f730a", - "reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a", - "shasum": "" }, - "require": { - "php": ">=8.0", - "psr/container": "^2.0", - "topthink/think-helper": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "time": "2025-04-07T03:21:51+00:00", - "type": "library", "installation-source": "dist", "autoload": { - "files": [], "psr-4": { - "think\\": "src" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "liu21st", - "email": "liu21st@gmail.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "PHP Container & Facade Manager", + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], "support": { - "issues": "https://github.com/top-think/think-container/issues", - "source": "https://github.com/top-think/think-container/tree/v3.0.2" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, - "install-path": "../topthink/think-container" + "install-path": "../psr/simple-cache" }, { "name": "topthink/think-helper", @@ -5345,34 +211,31 @@ }, { "name": "topthink/think-orm", - "version": "v3.0.34", - "version_normalized": "3.0.34.0", + "version": "v2.0.62", + "version_normalized": "2.0.62.0", "source": { "type": "git", "url": "https://github.com/top-think/think-orm.git", - "reference": "715e55da149fe32a12d68ef10e5b00e70bd3dbec" + "reference": "e53bfea572a133039ad687077120de5521af617f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/715e55da149fe32a12d68ef10e5b00e70bd3dbec", - "reference": "715e55da149fe32a12d68ef10e5b00e70bd3dbec", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/e53bfea572a133039ad687077120de5521af617f", + "reference": "e53bfea572a133039ad687077120de5521af617f", "shasum": "" }, "require": { "ext-json": "*", "ext-pdo": "*", - "php": ">=8.0.0", - "psr/log": ">=1.0", - "psr/simple-cache": ">=1.0", + "php": ">=7.1.0", + "psr/log": "^1.0|^2.0", + "psr/simple-cache": "^1.0|^2.0", "topthink/think-helper": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^9.6|^10" + "phpunit/phpunit": "^7|^8|^9.5" }, - "suggest": { - "ext-mongodb": "provide mongodb support" - }, - "time": "2025-01-14T06:03:33+00:00", + "time": "2024-09-22T06:17:47+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5393,126 +256,18 @@ "email": "liu21st@gmail.com" } ], - "description": "the PHP Database&ORM Framework", + "description": "think orm", "keywords": [ "database", "orm" ], "support": { "issues": "https://github.com/top-think/think-orm/issues", - "source": "https://github.com/top-think/think-orm/tree/v3.0.34" + "source": "https://github.com/top-think/think-orm/tree/v2.0.62" }, "install-path": "../topthink/think-orm" - }, - { - "name": "twig/twig", - "version": "v3.21.1", - "version_normalized": "3.21.1.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", - "shasum": "" - }, - "require": { - "php": ">=8.1.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "phpstan/phpstan": "^2.0", - "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" - }, - "time": "2025-05-03T07:21:55+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/Resources/core.php", - "src/Resources/debug.php", - "src/Resources/escaper.php", - "src/Resources/string_loader.php" - ], - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.21.1" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "install-path": "../twig/twig" } ], "dev": true, - "dev-package-names": [ - "myclabs/deep-copy", - "nikic/php-parser", - "phar-io/manifest", - "phar-io/version", - "phpunit/php-code-coverage", - "phpunit/php-file-iterator", - "phpunit/php-invoker", - "phpunit/php-text-template", - "phpunit/php-timer", - "phpunit/phpunit", - "sebastian/cli-parser", - "sebastian/comparator", - "sebastian/complexity", - "sebastian/diff", - "sebastian/environment", - "sebastian/exporter", - "sebastian/global-state", - "sebastian/lines-of-code", - "sebastian/object-enumerator", - "sebastian/object-reflector", - "sebastian/recursion-context", - "sebastian/type", - "sebastian/version", - "staabm/side-effects-detector", - "theseer/tokenizer" - ] + "dev-package-names": [] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 56ff7340..6b48cd7d 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,6 +1,6 @@ array( - 'name' => 'your-vendor/your-framework', + 'name' => 'my/framework', 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', 'reference' => null, @@ -10,706 +10,42 @@ 'dev' => true, ), 'versions' => array( - 'brick/math' => array( - 'pretty_version' => '0.14.0', - 'version' => '0.14.0.0', - 'reference' => '113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2', - 'type' => 'library', - 'install_path' => __DIR__ . '/../brick/math', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'doctrine/annotations' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', - 'reference' => '901c2ee5d26eb64ff43c47976e114bf00843acf7', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/annotations', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'doctrine/lexer' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/lexer', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'ezyang/htmlpurifier' => array( - 'pretty_version' => 'v4.18.0', - 'version' => '4.18.0.0', - 'reference' => 'cb56001e54359df7ae76dc522d08845dc741621b', - 'type' => 'library', - 'install_path' => __DIR__ . '/../ezyang/htmlpurifier', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'fig/http-message-util' => array( - 'pretty_version' => '1.1.5', - 'version' => '1.1.5.0', - 'reference' => '9d94dc0154230ac39e5bf89398b324a86f63f765', - 'type' => 'library', - 'install_path' => __DIR__ . '/../fig/http-message-util', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'monolog/monolog' => array( - 'pretty_version' => '3.7.0', - 'version' => '3.7.0.0', - 'reference' => 'f4393b648b78a5408747de94fca38beb5f7e9ef8', - 'type' => 'library', - 'install_path' => __DIR__ . '/../monolog/monolog', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'myclabs/deep-copy' => array( - 'pretty_version' => '1.13.4', - 'version' => '1.13.4.0', - 'reference' => '07d290f0c47959fd5eed98c95ee5602db07e0b6a', - 'type' => 'library', - 'install_path' => __DIR__ . '/../myclabs/deep-copy', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'nikic/php-parser' => array( - 'pretty_version' => 'v5.6.1', - 'version' => '5.6.1.0', - 'reference' => 'f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2', - 'type' => 'library', - 'install_path' => __DIR__ . '/../nikic/php-parser', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phar-io/manifest' => array( - 'pretty_version' => '2.0.4', - 'version' => '2.0.4.0', - 'reference' => '54750ef60c58e43759730615a392c31c80e23176', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phar-io/manifest', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phar-io/version' => array( - 'pretty_version' => '3.2.1', - 'version' => '3.2.1.0', - 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phar-io/version', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/php-code-coverage' => array( - 'pretty_version' => '12.4.0', - 'version' => '12.4.0.0', - 'reference' => '67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/php-file-iterator' => array( - 'pretty_version' => '6.0.0', - 'version' => '6.0.0.0', - 'reference' => '961bc913d42fe24a257bfff826a5068079ac7782', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/php-invoker' => array( - 'pretty_version' => '6.0.0', - 'version' => '6.0.0.0', - 'reference' => '12b54e689b07a25a9b41e57736dfab6ec9ae5406', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/php-invoker', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/php-text-template' => array( - 'pretty_version' => '5.0.0', - 'version' => '5.0.0.0', - 'reference' => 'e1367a453f0eda562eedb4f659e13aa900d66c53', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/php-text-template', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/php-timer' => array( - 'pretty_version' => '8.0.0', - 'version' => '8.0.0.0', - 'reference' => 'f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/php-timer', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'phpunit/phpunit' => array( - 'pretty_version' => '12.4.1', - 'version' => '12.4.1.0', - 'reference' => 'fc5413a2e6d240d2f6d9317bdf7f0a24e73de194', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpunit/phpunit', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'psr/cache' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/cache', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.0|3.0', - ), - ), - 'psr/container' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', - 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/container', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/container-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.1|2.0', - ), - ), - 'psr/event-dispatcher' => array( - 'pretty_version' => '1.0.0', + 'my/framework' => array( + 'pretty_version' => '1.0.0+no-version-set', 'version' => '1.0.0.0', - 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/event-dispatcher', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-message' => array( - 'pretty_version' => '2.0', - 'version' => '2.0.0.0', - 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-message', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/http-server-handler' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => '84c4fb66179be4caaf8e97bd239203245302e7d4', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-server-handler', + 'reference' => null, + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/http-server-middleware' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => 'c1481f747daaa6a0782775cd6a8c26a1bf4a3829', + 'nikic/fast-route' => array( + 'pretty_version' => 'v1.3.0', + 'version' => '1.3.0.0', + 'reference' => '181d480e08d9476e61381e04a71b34dc0432e812', 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-server-middleware', + 'install_path' => __DIR__ . '/../nikic/fast-route', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/log' => array( - 'pretty_version' => '3.0.2', - 'version' => '3.0.2.0', - 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/log-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0|3.0', - 1 => '3.0.0', - ), - ), 'psr/simple-cache' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', - 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', + 'reference' => '8707bf3cea6f710bf6ef05491234e3ab06f6432a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/simple-cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0|2.0|3.0', - ), - ), - 'ramsey/collection' => array( - 'pretty_version' => '2.1.1', - 'version' => '2.1.1.0', - 'reference' => '344572933ad0181accbf4ba763e85a0306a8c5e2', - 'type' => 'library', - 'install_path' => __DIR__ . '/../ramsey/collection', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'ramsey/uuid' => array( - 'pretty_version' => '4.9.1', - 'version' => '4.9.1.0', - 'reference' => '81f941f6f729b1e3ceea61d9d014f8b6c6800440', - 'type' => 'library', - 'install_path' => __DIR__ . '/../ramsey/uuid', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'rhumsaa/uuid' => array( - 'dev_requirement' => false, - 'replaced' => array( - 0 => '4.9.1', - ), - ), - 'sebastian/cli-parser' => array( - 'pretty_version' => '4.2.0', - 'version' => '4.2.0.0', - 'reference' => '90f41072d220e5c40df6e8635f5dafba2d9d4d04', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/cli-parser', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/comparator' => array( - 'pretty_version' => '7.1.3', - 'version' => '7.1.3.0', - 'reference' => 'dc904b4bb3ab070865fa4068cd84f3da8b945148', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/comparator', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/complexity' => array( - 'pretty_version' => '5.0.0', - 'version' => '5.0.0.0', - 'reference' => 'bad4316aba5303d0221f43f8cee37eb58d384bbb', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/complexity', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/diff' => array( - 'pretty_version' => '7.0.0', - 'version' => '7.0.0.0', - 'reference' => '7ab1ea946c012266ca32390913653d844ecd085f', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/diff', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/environment' => array( - 'pretty_version' => '8.0.3', - 'version' => '8.0.3.0', - 'reference' => '24a711b5c916efc6d6e62aa65aa2ec98fef77f68', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/environment', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/exporter' => array( - 'pretty_version' => '7.0.2', - 'version' => '7.0.2.0', - 'reference' => '016951ae10980765e4e7aee491eb288c64e505b7', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/exporter', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/global-state' => array( - 'pretty_version' => '8.0.2', - 'version' => '8.0.2.0', - 'reference' => 'ef1377171613d09edd25b7816f05be8313f9115d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/global-state', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/lines-of-code' => array( - 'pretty_version' => '4.0.0', - 'version' => '4.0.0.0', - 'reference' => '97ffee3bcfb5805568d6af7f0f893678fc076d2f', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/lines-of-code', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/object-enumerator' => array( - 'pretty_version' => '7.0.0', - 'version' => '7.0.0.0', - 'reference' => '1effe8e9b8e068e9ae228e542d5d11b5d16db894', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/object-enumerator', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/object-reflector' => array( - 'pretty_version' => '5.0.0', - 'version' => '5.0.0.0', - 'reference' => '4bfa827c969c98be1e527abd576533293c634f6a', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/object-reflector', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/recursion-context' => array( - 'pretty_version' => '7.0.1', - 'version' => '7.0.1.0', - 'reference' => '0b01998a7d5b1f122911a66bebcb8d46f0c82d8c', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/recursion-context', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/type' => array( - 'pretty_version' => '6.0.3', - 'version' => '6.0.3.0', - 'reference' => 'e549163b9760b8f71f191651d22acf32d56d6d4d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/type', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'sebastian/version' => array( - 'pretty_version' => '6.0.0', - 'version' => '6.0.0.0', - 'reference' => '3e6ccf7657d4f0a59200564b08cead899313b53c', - 'type' => 'library', - 'install_path' => __DIR__ . '/../sebastian/version', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'staabm/side-effects-detector' => array( - 'pretty_version' => '1.0.5', - 'version' => '1.0.5.0', - 'reference' => 'd8334211a140ce329c13726d4a715adbddd0a163', - 'type' => 'library', - 'install_path' => __DIR__ . '/../staabm/side-effects-detector', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'symfony/cache' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'bf8afc8ffd4bfd3d9c373e417f041d9f1e5b863f', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/cache-contracts' => array( - 'pretty_version' => 'v3.6.0', - 'version' => '3.6.0.0', - 'reference' => '5d68a57d66910405e5c0b63d6f0af941e66fc868', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/cache-contracts', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/cache-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.1|2.0|3.0', - ), - ), - 'symfony/config' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => '8a09223170046d2cfda3d2e11af01df2c641e961', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/config', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/dependency-injection' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => '82119812ab0bf3425c1234d413efd1b19bb92ae4', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dependency-injection', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.6.0', - 'version' => '3.6.0.0', - 'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/dotenv' => array( - 'pretty_version' => 'v7.3.2', - 'version' => '7.3.2.0', - 'reference' => '2192790a11f9e22cbcf9dc705a3ff22a5503923a', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/dotenv', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/error-handler' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => '99f81bc944ab8e5dae4f21b4ca9972698bbad0e4', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/error-handler', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v7.3.3', - 'version' => '7.3.3.0', - 'reference' => 'b7dc69e71de420ac04bc9ab830cf3ffebba48191', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-contracts' => array( - 'pretty_version' => 'v3.6.0', - 'version' => '3.6.0.0', - 'reference' => '59eb412e93815df44f05f342958efa9f46b1e586', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/event-dispatcher-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.0|3.0', - ), - ), - 'symfony/filesystem' => array( - 'pretty_version' => 'v7.3.2', - 'version' => '7.3.2.0', - 'reference' => 'edcbb768a186b5c3f25d0643159a787d3e63b7fd', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/filesystem', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/finder' => array( - 'pretty_version' => 'v7.3.2', - 'version' => '7.3.2.0', - 'reference' => '2a6614966ba1074fa93dae0bc804227422df4dfe', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/finder', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/http-foundation' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'c061c7c18918b1b64268771aad04b40be41dd2e6', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-foundation', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/http-kernel' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'b796dffea7821f035047235e076b60ca2446e3cf', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/http-kernel', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/mime' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'b1b828f69cbaf887fa835a091869e55df91d0e35', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/mime', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/options-resolver' => array( - 'pretty_version' => 'v7.3.3', - 'version' => '7.3.3.0', - 'reference' => '0ff2f5c3df08a395232bbc3c2eb7e84912df911d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/options-resolver', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.33.0', - 'version' => '1.33.0.0', - 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.33.0', - 'version' => '1.33.0.0', - 'reference' => '9614ac4d8061dc257ecc64cba1b140873dce8ad3', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.33.0', - 'version' => '1.33.0.0', - 'reference' => '3833d7255cc303546435cb650316bff708a1c75c', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.33.0', - 'version' => '1.33.0.0', - 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/polyfill-php83' => array( - 'pretty_version' => 'v1.33.0', - 'version' => '1.33.0.0', - 'reference' => '17f6f9a6b1735c0f163024d959f700cfbc5155e5', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php83', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/rate-limiter' => array( - 'pretty_version' => 'v7.3.2', - 'version' => '7.3.2.0', - 'reference' => '7e855541d302ba752f86fb0e97932e7969fe9c04', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/rate-limiter', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/routing' => array( - 'pretty_version' => 'v6.4.26', - 'version' => '6.4.26.0', - 'reference' => '6fc4c445f22857d4b8b40a02b73f423ddab295de', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/routing', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/service-contracts' => array( - 'pretty_version' => 'v3.6.0', - 'version' => '3.6.0.0', - 'reference' => 'f021b05a130d35510bd6b25fe9053c2a8a15d5d4', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/service-contracts', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/service-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.1|2.0|3.0', - ), - ), - 'symfony/translation' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'ec25870502d0c7072d086e8ffba1420c85965174', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/translation', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/translation-contracts' => array( - 'pretty_version' => 'v3.6.0', - 'version' => '3.6.0.0', - 'reference' => 'df210c7a2573f1913b2d17cc95f90f53a73d8f7d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/translation-contracts', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/translation-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '2.3|3.0', - ), - ), - 'symfony/var-dumper' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => 'b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-dumper', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/var-exporter' => array( - 'pretty_version' => 'v7.3.4', - 'version' => '7.3.4.0', - 'reference' => '0f020b544a30a7fe8ba972e53ee48a74c0bc87f4', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-exporter', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/yaml' => array( - 'pretty_version' => 'v7.3.3', - 'version' => '7.3.3.0', - 'reference' => 'd4f4a66866fe2451f61296924767280ab5732d9d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/yaml', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'theseer/tokenizer' => array( - 'pretty_version' => '1.2.3', - 'version' => '1.2.3.0', - 'reference' => '737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2', - 'type' => 'library', - 'install_path' => __DIR__ . '/../theseer/tokenizer', - 'aliases' => array(), - 'dev_requirement' => true, - ), - 'topthink/think-cache' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', - 'reference' => '4f8becaf802e2ebcd0e37df46495fe3999e917ca', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-cache', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'topthink/think-container' => array( - 'pretty_version' => 'v3.0.2', - 'version' => '3.0.2.0', - 'reference' => 'b2df244be1e7399ad4c8be1ccc40ed57868f730a', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-container', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'topthink/think-helper' => array( 'pretty_version' => 'v3.1.11', 'version' => '3.1.11.0', @@ -720,31 +56,13 @@ 'dev_requirement' => false, ), 'topthink/think-orm' => array( - 'pretty_version' => 'v3.0.34', - 'version' => '3.0.34.0', - 'reference' => '715e55da149fe32a12d68ef10e5b00e70bd3dbec', + 'pretty_version' => 'v2.0.62', + 'version' => '2.0.62.0', + 'reference' => 'e53bfea572a133039ad687077120de5521af617f', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/think-orm', 'aliases' => array(), 'dev_requirement' => false, ), - 'twig/twig' => array( - 'pretty_version' => 'v3.21.1', - 'version' => '3.21.1.0', - 'reference' => '285123877d4dd97dd7c11842ac5fb7e86e60d81d', - 'type' => 'library', - 'install_path' => __DIR__ . '/../twig/twig', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'your-vendor/your-framework' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => null, - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev_requirement' => false, - ), ), ); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 00000000..a70ba47c --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,25 @@ += 80000)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) + ); +} diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE deleted file mode 100644 index 5e781fce..00000000 --- a/vendor/doctrine/annotations/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2013 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md deleted file mode 100644 index 11640c33..00000000 --- a/vendor/doctrine/annotations/README.md +++ /dev/null @@ -1,31 +0,0 @@ -⚠️ PHP 8 introduced -[attributes](https://www.php.net/manual/en/language.attributes.overview.php), -which are a native replacement for annotations. As such, this library is -considered feature complete, and should receive exclusively bugfixes and -security fixes. - -We do not recommend using this library in new projects and encourage authors -of downstream libraries to offer support for attributes as an alternative to -Doctrine Annotations. - -Have a look at [our blog](https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html) -to learn more. - -# Doctrine Annotations - -[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations) -[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references) -[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations) -[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations) - -Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). - -## Documentation - -See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/stable/index.html). - -## Contributing - -When making a pull request, make sure your changes follow the -[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). diff --git a/vendor/doctrine/annotations/UPGRADE.md b/vendor/doctrine/annotations/UPGRADE.md deleted file mode 100644 index b729ca73..00000000 --- a/vendor/doctrine/annotations/UPGRADE.md +++ /dev/null @@ -1,18 +0,0 @@ -# Upgrade from 1.0.x to 2.0.x - -- The `NamedArgumentConstructorAnnotation` has been removed. Use the `@NamedArgumentConstructor` - annotation instead. -- `SimpleAnnotationReader` has been removed. -- `DocLexer::peek()` and `DocLexer::glimpse` now return -`Doctrine\Common\Lexer\Token` objects. When using `doctrine/lexer` 2, these -implement `ArrayAccess` as a way for you to still be able to treat them as -arrays in some ways. -- `CachedReader` and `FileCacheReader` have been removed use `PsrCachedReader` instead. -- `AnnotationRegistry` methods related to registering annotations instead of - using autoloading have been removed. -- Parameter type declarations have been added to all methods of all classes. If -you have classes inheriting from classes inside this package, you should add -parameter and return type declarations. -- Support for PHP < 7.2 has been removed -- `PhpParser::parseClass()` has been removed. Use - `PhpParser::parseUseStatements()` instead. diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json deleted file mode 100644 index d487ed59..00000000 --- a/vendor/doctrine/annotations/composer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "doctrine/annotations", - "description": "Docblock Annotations Parser", - "license": "MIT", - "type": "library", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "require": { - "php": "^7.2 || ^8.0", - "ext-tokenizer": "*", - "doctrine/lexer": "^2 || ^3", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations", - "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations" - }, - "files": [ - "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php", - "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php" - ] - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst deleted file mode 100644 index d32b15d1..00000000 --- a/vendor/doctrine/annotations/docs/en/annotations.rst +++ /dev/null @@ -1,189 +0,0 @@ -Handling Annotations -==================== - -There are several different approaches to handling annotations in PHP. -Doctrine Annotations maps docblock annotations to PHP classes. Because -not all docblock annotations are used for metadata purposes a filter is -applied to ignore or skip classes that are not Doctrine annotations. - -Take a look at the following code snippet: - -.. code-block:: php - - namespace MyProject\Entities; - - use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validator\Constraints AS Assert; - - /** - * @author Benjamin Eberlei - * @ORM\Entity - * @MyProject\Annotations\Foobarable - */ - class User - { - /** - * @ORM\Id @ORM\Column @ORM\GeneratedValue - * @dummy - * @var int - */ - private $id; - - /** - * @ORM\Column(type="string") - * @Assert\NotEmpty - * @Assert\Email - * @var string - */ - private $email; - } - -In this snippet you can see a variety of different docblock annotations: - -- Documentation annotations such as ``@var`` and ``@author``. These - annotations are ignored and never considered for throwing an - exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use - Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace - available as ``@ORM\ClassName``. Same goes for the import of - ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and - not ignored. For Doctrine Annotations it is not entirely clear how - to handle this annotation. Depending on the configuration an exception - (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. - This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could -guess that the ORM Mapping, Assert Validation and the fully qualified -annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error -handling reasons every check for class existence inside the -``AnnotationReader`` sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the -``AnnotationReader`` requires silent autoloaders which many autoloaders are -not. Silent autoloading is NOT part of the `PSR-0 specification -`_ -for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism -through a global registry. If you are wondering about the annotation -registry being global, there is no other way to solve the architectural -problems of autoloading annotation classes in a straightforward fashion. -Additionally if you think about PHP autoloading then you recognize it is -a global as well. - -To anticipate the configuration section, making the above PHP class work -with Doctrine Annotations requires this setup: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('dummy'); - -We create the actual ``AnnotationReader`` instance. -Note that we also add ``dummy`` to the global list of ignored -annotations for which we do not throw exceptions. Setting this is -necessary in our example case, otherwise ``@dummy`` would trigger an -exception to be thrown during the parsing of the docblock of -``MyProject\Entities\User#id``. - -Setup and Configuration ------------------------ - -To use the annotations library is simple, you just need to create a new -``AnnotationReader`` instance: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - -This creates a simple annotation reader with no caching other than in -memory (in php arrays). Since parsing docblocks can be expensive you -should cache this process by using a caching reader. - -To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. -This reader decorates the original reader and stores all annotations in a PSR-6 -cache: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\PsrCachedReader; - - $cache = ... // instantiate a PSR-6 Cache pool - - $reader = new PsrCachedReader( - new AnnotationReader(), - $cache, - $debug = true - ); - -The ``debug`` flag is used here as well to invalidate the cache files -when the PHP class with annotations changed and should be used during -development. - -.. warning :: - - The ``AnnotationReader`` works and caches under the - assumption that all annotations of a doc-block are processed at - once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the - AnnotationRegistry) would never be visible and not accessible if a - cache is used unless the cache is cleared and the annotations - requested again, this time with all annotations defined. - -By default the annotation reader returns a list of annotations with -numeric indexes. If you want your annotations to be indexed by their -class name you can wrap the reader in an ``IndexedReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\IndexedReader; - - $reader = new IndexedReader(new AnnotationReader()); - -.. warning:: - - You should never wrap the indexed reader inside a cached reader, - only the other way around. This way you can re-use the cache with - indexed or numeric keys, otherwise your code may experience failures - due to caching in a numerical or indexed format. - -Ignoring missing exceptions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default an exception is thrown from the ``AnnotationReader`` if an -annotation was found that: - -- is not part of the list of ignored "documentation annotations"; -- was not imported through a use statement; -- is not a fully qualified class that exists. - -You can disable this behavior for specific names if your docblocks do -not follow strict requirements: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - AnnotationReader::addGlobalIgnoredName('foo'); - -PHP Imports -~~~~~~~~~~~ - -By default the annotation reader parses the use-statement of a php file -to gain access to the import rules and register them for the annotation -processing. Only if you are using PHP Imports can you validate the -correct usage of annotations and throw exceptions if you misspelled an -annotation. This mechanism is enabled by default. - -To ease the upgrade path, we still allow you to disable this mechanism. -Note however that we will remove this in future versions: - -.. code-block:: php - - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $reader->setEnabledPhpImports(false); diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst deleted file mode 100644 index 30051662..00000000 --- a/vendor/doctrine/annotations/docs/en/custom.rst +++ /dev/null @@ -1,443 +0,0 @@ -Custom Annotation Classes -========================= - -If you want to define your own annotations, you just have to group them -in a namespace. -Annotation classes have to contain a class-level docblock with the text -``@Annotation``: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** @Annotation */ - class Bar - { - // some code - } - -Inject annotation values ------------------------- - -The annotation parser checks if the annotation constructor has arguments, -if so then it will pass the value array, otherwise it will try to inject -values into public properties directly: - - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * - * Some Annotation using a constructor - */ - class Bar - { - private $foo; - - public function __construct(array $values) - { - $this->foo = $values['foo']; - } - } - - /** - * @Annotation - * - * Some Annotation without a constructor - */ - class Foo - { - public $bar; - } - -Optional: Constructors with Named Parameters --------------------------------------------- - -Starting with Annotations v1.11 a new annotation instantiation strategy -is available that aims at compatibility of Annotation classes with the PHP 8 -attribute feature. You need to declare a constructor with regular parameter -names that match the named arguments in the annotation syntax. - -To enable this feature, you can tag your annotation class with -``@NamedArgumentConstructor`` (available from v1.12) or implement the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface -(available from v1.11 and deprecated as of v1.12). -When using the ``@NamedArgumentConstructor`` tag, the first argument of the -constructor is considered as the default one. - - -Usage with the ``@NamedArgumentConstructor`` tag - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(string $foo) - { - $this->foo = $foo; - } - } - - /** Usable with @Bar(foo="baz") */ - /** Usable with @Bar("baz") */ - -In combination with PHP 8's constructor property promotion feature -you can simplify this to: - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @NamedArgumentConstructor - */ - class Bar implements NamedArgumentConstructorAnnotation - { - public function __construct(private string $foo) {} - } - - -Usage with the -``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` -interface (v1.11, deprecated as of v1.12): -.. code-block:: php - - namespace MyCompany\Annotations; - - use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; - - /** @Annotation */ - class Bar implements NamedArgumentConstructorAnnotation - { - private $foo; - - public function __construct(private string $foo) {} - } - - /** Usable with @Bar(foo="baz") */ - -Annotation Target ------------------ - -``@Target`` indicates the kinds of class elements to which an annotation -type is applicable. Then you could define one or more targets: - -- ``CLASS`` Allowed in class docblocks -- ``PROPERTY`` Allowed in property docblocks -- ``METHOD`` Allowed in the method docblocks -- ``FUNCTION`` Allowed in function dockblocks -- ``ALL`` Allowed in class, property, method and function docblocks -- ``ANNOTATION`` Allowed inside other annotations - -If the annotations is not allowed in the current context, an -``AnnotationException`` is thrown. - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - // some code - } - - /** - * @Annotation - * @Target("CLASS") - */ - class Foo - { - // some code - } - -Attribute types ---------------- - -The annotation parser checks the given parameters using the phpdoc -annotation ``@var``, The data type could be validated using the ``@var`` -annotation on the annotation properties or using the ``@Attributes`` and -``@Attribute`` annotations. - -If the data type does not match you get an ``AnnotationException`` - -.. code-block:: php - - namespace MyCompany\Annotations; - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - */ - class Bar - { - /** @var mixed */ - public $mixed; - - /** @var boolean */ - public $boolean; - - /** @var bool */ - public $bool; - - /** @var float */ - public $float; - - /** @var string */ - public $string; - - /** @var integer */ - public $integer; - - /** @var array */ - public $array; - - /** @var SomeAnnotationClass */ - public $annotation; - - /** @var array */ - public $arrayOfIntegers; - - /** @var array */ - public $arrayOfAnnotations; - } - - /** - * @Annotation - * @Target({"METHOD","PROPERTY"}) - * @Attributes({ - * @Attribute("stringProperty", type = "string"), - * @Attribute("annotProperty", type = "SomeAnnotationClass"), - * }) - */ - class Foo - { - public function __construct(array $values) - { - $this->stringProperty = $values['stringProperty']; - $this->annotProperty = $values['annotProperty']; - } - - // some code - } - -Annotation Required -------------------- - -``@Required`` indicates that the field must be specified when the -annotation is used. If it is not used you get an ``AnnotationException`` -stating that this value can not be null. - -Declaring a required field: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Foo - { - /** @Required */ - public $requiredField; - } - -Usage: - -.. code-block:: php - - /** @Foo(requiredField="value") */ - public $direction; // Valid - - /** @Foo */ - public $direction; // Required field missing, throws an AnnotationException - - -Enumerated values ------------------ - -- An annotation property marked with ``@Enum`` is a field that accepts a - fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed - values. -- The annotation parser checks the given value and throws an - ``AnnotationException`` if the value does not match. - - -Declaring an enumerated property: - -.. code-block:: php - - /** - * @Annotation - * @Target("ALL") - */ - class Direction - { - /** - * @Enum({"NORTH", "SOUTH", "EAST", "WEST"}) - */ - public $value; - } - -Annotation usage: - -.. code-block:: php - - /** @Direction("NORTH") */ - public $direction; // Valid value - - /** @Direction("NORTHEAST") */ - public $direction; // Invalid value, throws an AnnotationException - - -Constants ---------- - -The use of constants and class constants is available on the annotations -parser. - -The following usages are allowed: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - use MyCompany\Entity\SomeClass; - - /** - * @Foo(PHP_EOL) - * @Bar(Bar::FOO) - * @Foo({SomeClass::FOO, SomeClass::BAR}) - * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE}) - */ - class User - { - } - - -Be careful with constants and the cache ! - -.. note:: - - The cached reader will not re-evaluate each time an annotation is - loaded from cache. When a constant is changed the cache must be - cleaned. - - -Usage ------ - -Using the library API is simple. Using the annotations described in the -previous section, you can now annotate other classes with your -annotations: - -.. code-block:: php - - namespace MyCompany\Entity; - - use MyCompany\Annotations\Foo; - use MyCompany\Annotations\Bar; - - /** - * @Foo(bar="foo") - * @Bar(foo="bar") - */ - class User - { - } - -Now we can write a script to get the annotations above: - -.. code-block:: php - - $reflClass = new ReflectionClass('MyCompany\Entity\User'); - $classAnnotations = $reader->getClassAnnotations($reflClass); - - foreach ($classAnnotations AS $annot) { - if ($annot instanceof \MyCompany\Annotations\Foo) { - echo $annot->bar; // prints "foo"; - } else if ($annot instanceof \MyCompany\Annotations\Bar) { - echo $annot->foo; // prints "bar"; - } - } - -You have a complete API for retrieving annotation class instances from a -class, property or method docblock: - - -Reader API -~~~~~~~~~~ - -Access all annotations of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotations(\ReflectionClass $class); - -Access one annotation of a class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getClassAnnotation(\ReflectionClass $class, $annotationName); - -Access all annotations of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotations(\ReflectionMethod $method); - -Access one annotation of a method -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - -Access all annotations of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotations(\ReflectionProperty $property); - -Access one annotation of a property -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); - -Access all annotations of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotations(\ReflectionFunction $property); - -Access one annotation of a function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: php - - public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst deleted file mode 100644 index 3cf37e50..00000000 --- a/vendor/doctrine/annotations/docs/en/index.rst +++ /dev/null @@ -1,109 +0,0 @@ -Deprecation notice -================== - -PHP 8 introduced `attributes -`_, -which are a native replacement for annotations. As such, this library is -considered feature complete, and should receive exclusively bugfixes and -security fixes. - -We do not recommend using this library in new projects and encourage authors -of downstream libraries to offer support for attributes as an alternative to -Doctrine Annotations. - -Have a look at [our blog](https://www.doctrine-project.org/2022/11/04/annotations-to-attributes.html) -to learn more. - -Introduction -============ - -Doctrine Annotations allows to implement custom annotation -functionality for PHP classes and functions. - -.. code-block:: php - - class Foo - { - /** - * @MyAnnotation(myProperty="value") - */ - private $bar; - } - -Annotations aren't implemented in PHP itself which is why this component -offers a way to use the PHP doc-blocks as a place for the well known -annotation syntax using the ``@`` char. - -Annotations in Doctrine are used for the ORM configuration to build the -class mapping, but it can be used in other projects for other purposes -too. - -Installation -============ - -You can install the Annotation component with composer: - -.. code-block:: - - $ composer require doctrine/annotations - -Create an annotation class -========================== - -An annotation class is a representation of the later used annotation -configuration in classes. The annotation class of the previous example -looks like this: - -.. code-block:: php - - /** - * @Annotation - */ - final class MyAnnotation - { - public $myProperty; - } - -The annotation class is declared as an annotation by ``@Annotation``. - -:ref:`Read more about custom annotations. ` - -Reading annotations -=================== - -The access to the annotations happens by reflection of the class or function -containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can access the -annotations of a class. A common one is -``Doctrine\Common\Annotations\AnnotationReader``: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - - $reflectionClass = new ReflectionClass(Foo::class); - $property = $reflectionClass->getProperty('bar'); - - $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation( - $property, - MyAnnotation::class - ); - - echo $myAnnotation->myProperty; // result: "value" - -A reader has multiple methods to access the annotations of a class or -function. - -:ref:`Read more about handling annotations. ` - -IDE Support ------------ - -Some IDEs already provide support for annotations: - -- Eclipse via the `Symfony2 Plugin `_ -- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ - -.. _Read more about handling annotations.: annotations -.. _Read more about custom annotations.: custom diff --git a/vendor/doctrine/annotations/docs/en/sidebar.rst b/vendor/doctrine/annotations/docs/en/sidebar.rst deleted file mode 100644 index 6f5d13c4..00000000 --- a/vendor/doctrine/annotations/docs/en/sidebar.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. toctree:: - :depth: 3 - - index - annotations - custom diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index fba23e9f..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,54 +0,0 @@ - $data Key-value for properties to be defined in this class. */ - final public function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @throws BadMethodCallException - */ - public function __get(string $name) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param mixed $value Property value. - * - * @throws BadMethodCallException - */ - public function __set(string $name, $value) - { - throw new BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index b1f85140..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,21 +0,0 @@ - */ - public $value; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 6f24d9f1..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,69 +0,0 @@ - */ - public $value; - - /** - * Literal target declaration. - * - * @var mixed[] - */ - public $literal; - - /** - * @phpstan-param array{literal?: mixed[], value: list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['literal'])) { - $values['literal'] = []; - } - - foreach ($values['value'] as $var) { - if (! is_scalar($var)) { - throw new InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if (! in_array($key, $values['value'])) { - throw new InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key, - $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index 97a15c25..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,43 +0,0 @@ - */ - public $names; - - /** - * @phpstan-param array{value: string|list} $values - * - * @throws RuntimeException - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new RuntimeException(sprintf( - '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', - json_encode($values['value']) - )); - } - - $this->names = $values['value']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php deleted file mode 100644 index 16906010..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php +++ /dev/null @@ -1,13 +0,0 @@ - */ - private static $map = [ - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'FUNCTION' => self::TARGET_FUNCTION, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ]; - - /** @phpstan-var list */ - public $value; - - /** - * Targets as bitmask. - * - * @var int - */ - public $targets; - - /** - * Literal target declaration. - * - * @var string - */ - public $literal; - - /** - * @phpstan-param array{value?: string|list} $values - * - * @throws InvalidArgumentException - */ - public function __construct(array $values) - { - if (! isset($values['value'])) { - $values['value'] = null; - } - - if (is_string($values['value'])) { - $values['value'] = [$values['value']]; - } - - if (! is_array($values['value'])) { - throw new InvalidArgumentException( - sprintf( - '@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if (! isset(self::$map[$literal])) { - throw new InvalidArgumentException( - sprintf( - 'Invalid Target "%s". Available targets: [%s]', - $literal, - implode(', ', array_keys(self::$map)) - ) - ); - } - - $bitmask |= self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index 002ee049..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,158 +0,0 @@ - $available - * - * @return AnnotationException - */ - public static function enumeratorError( - string $attributeName, - string $annotationName, - string $context, - array $available, - $given - ) { - return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** @return AnnotationException */ - public static function optimizerPlusSaveComments() - { - return new self( - 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' - ); - } - - /** @return AnnotationException */ - public static function optimizerPlusLoadComments() - { - return new self( - 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index c7ea577d..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,392 +0,0 @@ - - */ - private static $globalImports = [ - 'ignoreannotation' => Annotation\IgnoreAnnotation::class, - ]; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNamespaces = []; - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - */ - public static function addGlobalIgnoredName(string $name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling. - */ - public static function addGlobalIgnoredNamespace(string $namespace) - { - self::$globalIgnoredNamespaces[$namespace] = true; - } - - /** - * Annotations parser. - * - * @var DocParser - */ - private $parser; - - /** - * Annotations parser used to collect parsing metadata. - * - * @var DocParser - */ - private $preParser; - - /** - * PHP parser used to collect imports. - * - * @var PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $imports = []; - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @psalm-var array<'class'|'function', array>> - */ - private $ignoredAnnotationNames = []; - - /** - * Initializes a new AnnotationReader. - * - * @throws AnnotationException - */ - public function __construct(?DocParser $parser = null) - { - if ( - extension_loaded('Zend Optimizer+') && - (filter_var(ini_get('zend_optimizerplus.save_comments'), FILTER_VALIDATE_BOOLEAN) === false || - filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false) - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if ( - extension_loaded('Zend OPcache') && - filter_var(ini_get('opcache.save_comments'), FILTER_VALIDATE_BOOLEAN) === false - ) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - // Make sure that the IgnoreAnnotation annotation is loaded - class_exists(IgnoreAnnotation::class); - - $this->parser = $parser ?: new DocParser(); - - $this->preParser = new DocParser(); - - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - - $this->phpParser = new PhpParser(); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . '::$' . $property->getName(); - - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getPropertyImports($property)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getMethodImports($method)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a function. - * - * @phpstan-return list An array of Annotations. - */ - public function getFunctionAnnotations(ReflectionFunction $function): array - { - $context = 'function ' . $function->getName(); - - $this->parser->setTarget(Target::TARGET_FUNCTION); - $this->parser->setImports($this->getImports($function)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); - $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); - - return $this->parser->parse($function->getDocComment(), $context); - } - - /** - * Gets a function annotation. - * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. - */ - public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) - { - $annotations = $this->getFunctionAnnotations($function); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getIgnoredAnnotationNames($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->ignoredAnnotationNames[$type][$name])) { - return $this->ignoredAnnotationNames[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->ignoredAnnotationNames[$type][$name]; - } - - /** - * Retrieves imports for a class or a function. - * - * @param ReflectionClass|ReflectionFunction $reflection - * - * @return array - */ - private function getImports($reflection): array - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - if (isset($this->imports[$type][$name])) { - return $this->imports[$type][$name]; - } - - $this->collectParsingMetadata($reflection); - - return $this->imports[$type][$name]; - } - - /** - * Retrieves imports for methods. - * - * @return array - */ - private function getMethodImports(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if ( - ! $trait->hasMethod($method->getName()) - || $trait->getFileName() !== $method->getFileName() - ) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Retrieves imports for properties. - * - * @return array - */ - private function getPropertyImports(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $classImports = $this->getImports($class); - - $traitImports = []; - - foreach ($class->getTraits() as $trait) { - if (! $trait->hasProperty($property->getName())) { - continue; - } - - $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); - } - - return array_merge($classImports, $traitImports); - } - - /** - * Collects parsing metadata for a given class or function. - * - * @param ReflectionClass|ReflectionFunction $reflection - */ - private function collectParsingMetadata($reflection): void - { - $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; - $name = $reflection->getName(); - - $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); - - foreach ($annotations as $annotation) { - if (! ($annotation instanceof IgnoreAnnotation)) { - continue; - } - - foreach ($annotation->names as $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - - $this->imports[$type][$name] = array_merge( - self::$globalImports, - $this->phpParser->parseUseStatements($reflection), - [ - '__NAMESPACE__' => $reflection->getNamespaceName(), - 'self' => $name, - ] - ); - - $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 290e60ab..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -final class DocLexer extends AbstractLexer -{ - public const T_NONE = 1; - public const T_INTEGER = 2; - public const T_STRING = 3; - public const T_FLOAT = 4; - - // All tokens that are also identifiers should be >= 100 - public const T_IDENTIFIER = 100; - public const T_AT = 101; - public const T_CLOSE_CURLY_BRACES = 102; - public const T_CLOSE_PARENTHESIS = 103; - public const T_COMMA = 104; - public const T_EQUALS = 105; - public const T_FALSE = 106; - public const T_NAMESPACE_SEPARATOR = 107; - public const T_OPEN_CURLY_BRACES = 108; - public const T_OPEN_PARENTHESIS = 109; - public const T_TRUE = 110; - public const T_NULL = 111; - public const T_COLON = 112; - public const T_MINUS = 113; - - /** @var array */ - protected $noCase = [ - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR, - ]; - - /** @var array */ - protected $withCase = [ - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL, - ]; - - /** - * Whether the next token starts immediately, or if there were - * non-captured symbols before that - */ - public function nextTokenIsAdjacent(): bool - { - return $this->token === null - || ($this->lookahead !== null - && ($this->lookahead->position - $this->token->position) === strlen($this->token->value)); - } - - /** - * {@inheritDoc} - */ - protected function getCatchablePatterns() - { - return [ - '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:""|[^"])*+"', - ]; - } - - /** - * {@inheritDoc} - */ - protected function getNonCatchablePatterns() - { - return ['\s+', '\*+', '(.)']; - } - - /** - * {@inheritDoc} - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return strpos($value, '.') !== false || stripos($value, 'e') !== false - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index 6faff09a..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1496 +0,0 @@ -, named_arguments?: array} - */ -final class DocParser -{ - /** - * An array of all valid tokens for a class name. - * - * @phpstan-var list - */ - private static $classIdentifiers = [ - DocLexer::T_IDENTIFIER, - DocLexer::T_TRUE, - DocLexer::T_FALSE, - DocLexer::T_NULL, - ]; - - /** - * The lexer. - * - * @var DocLexer - */ - private $lexer; - - /** - * Current target context. - * - * @var int - */ - private $target; - - /** - * Doc parser used to collect annotation target. - * - * @var DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var bool - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = []; - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = []; - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var bool - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var string[] - */ - private $namespaces = []; - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * - * @var bool[] indexed by annotation name - */ - private $ignoredAnnotationNames = []; - - /** - * A list with annotations in namespaced format - * that are not causing exceptions when not resolved to an annotation class. - * - * @var bool[] indexed by namespace name - */ - private $ignoredAnnotationNamespaces = []; - - /** @var string */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata. - * - * @var array - */ - private static $annotationMetadata = [ - Annotation\Target::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ - 'value' => [ - 'required' => false, - 'type' => 'array', - 'array_type' => 'string', - 'value' => 'array', - ], - ], - ], - Annotation\Attribute::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ - 'name' => 'name', - 'type' => 'type', - 'required' => 'required', - ], - 'attribute_types' => [ - 'value' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'type' => [ - 'required' => true, - 'type' => 'string', - 'value' => 'string', - ], - 'required' => [ - 'required' => false, - 'type' => 'boolean', - 'value' => 'boolean', - ], - ], - ], - Annotation\Attributes::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - 'array_type' => Annotation\Attribute::class, - 'value' => 'array<' . Annotation\Attribute::class . '>', - ], - ], - ], - Annotation\Enum::class => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => ['value' => 'value'], - 'attribute_types' => [ - 'value' => [ - 'type' => 'array', - 'required' => true, - ], - 'literal' => [ - 'type' => 'array', - 'required' => false, - ], - ], - ], - Annotation\NamedArgumentConstructor::class => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'has_named_argument_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => null, - 'properties' => [], - 'attribute_types' => [], - ], - ]; - - /** - * Hash-map for handle types declaration. - * - * @var array - */ - private static $typeMap = [ - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ]; - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer(); - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param bool[] $names indexed by annotation name - * - * @return void - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets the annotation namespaces that are ignored during the parsing process. - * - * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name - * - * @return void - */ - public function setIgnoredAnnotationNamespaces(array $ignoredAnnotationNamespaces) - { - $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces; - } - - /** - * Sets ignore on not-imported annotations. - * - * @return void - */ - public function setIgnoreNotImportedAnnotations(bool $bool) - { - $this->ignoreNotImportedAnnotations = $bool; - } - - /** - * Sets the default namespaces. - * - * @return void - * - * @throws RuntimeException - */ - public function addNamespace(string $namespace) - { - if ($this->imports) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports. - * - * @param array $imports - * - * @return void - * - * @throws RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @return void - */ - public function setTarget(int $target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. - * - * @throws AnnotationException - * @throws ReflectionException - */ - public function parse(string $input, string $context = '') - { - $pos = $this->findInitialTokenPosition($input); - if ($pos === null) { - return []; - } - - $this->context = $context; - - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Finds the first valid annotation - */ - private function findInitialTokenPosition(string $input): ?int - { - $pos = 0; - - // search for first valid annotation - while (($pos = strpos($input, '@', $pos)) !== false) { - $preceding = substr($input, $pos - 1, 1); - - // if the @ is preceded by a space, a tab or * it is valid - if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") { - return $pos; - } - - $pos++; - } - - return null; - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token Type of token. - * - * @return bool True if tokens match; false otherwise. - * - * @throws AnnotationException - */ - private function match(int $token): bool - { - if (! $this->lexer->isNextToken($token)) { - throw $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @phpstan-param list $tokens - * - * @throws AnnotationException - */ - private function matchAny(array $tokens): bool - { - if (! $this->lexer->isNextTokenAny($tokens)) { - throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param mixed[]|null $token Optional token. - */ - private function syntaxError(string $expected, ?array $token = null): AnnotationException - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = sprintf('Expected %s, got ', $expected); - $message .= $this->lexer->lookahead === null - ? 'end of string' - : sprintf("'%s' at position %s", $token->value, $token->position); - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - return AnnotationException::syntaxError($message); - } - - /** - * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param class-string $fqcn - */ - private function classExists(string $fqcn): bool - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param class-string $name The annotation name - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function collectAnnotationMetadata(string $name): void - { - if (self::$metadataParser === null) { - self::$metadataParser = new self(); - - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports([ - 'enum' => Enum::class, - 'target' => Target::class, - 'attribute' => Attribute::class, - 'attributes' => Attributes::class, - 'namedargumentconstructor' => NamedArgumentConstructor::class, - ]); - - // Make sure that annotations from metadata are loaded - class_exists(Enum::class); - class_exists(Target::class); - class_exists(Attribute::class); - class_exists(Attributes::class); - class_exists(NamedArgumentConstructor::class); - } - - $class = new ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $constructor = $class->getConstructor(); - $metadata = [ - 'default_property' => null, - 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, - 'constructor_args' => [], - 'properties' => [], - 'property_types' => [], - 'attribute_types' => [], - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => strpos($docComment, '@Annotation') !== false, - ]; - - $metadata['has_named_argument_constructor'] = false; - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - continue; - } - - if ($annotation instanceof NamedArgumentConstructor) { - $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; - if ($metadata['has_named_argument_constructor']) { - // choose the first argument as the default property - $metadata['default_property'] = $constructor->getParameters()[0]->getName(); - } - } - - if (! ($annotation instanceof Attributes)) { - continue; - } - - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); - } - } - - // if not has a constructor will inject values into public properties - if ($metadata['has_constructor'] === false) { - // collect all public properties - foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - $propertyComment = $property->getDocComment(); - if ($propertyComment === false) { - continue; - } - - $attribute = new Attribute(); - - $attribute->required = (strpos($propertyComment, '@Required') !== false); - $attribute->name = $property->name; - $attribute->type = (strpos($propertyComment, '@var') !== false && - preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) - ? $matches[1] - : 'mixed'; - - $this->collectAttributeTypeMetadata($metadata, $attribute); - - // checks if the property has @Enum - if (strpos($propertyComment, '@Enum') === false) { - continue; - } - - $context = 'property ' . $class->name . '::$' . $property->name; - - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if (! $annotation instanceof Enum) { - continue; - } - - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } elseif ($metadata['has_named_argument_constructor']) { - foreach ($constructor->getParameters() as $parameter) { - if ($parameter->isVariadic()) { - break; - } - - $metadata['constructor_args'][$parameter->getName()] = [ - 'position' => $parameter->getPosition(), - 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, - ]; - } - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Collects parsing metadata for a given attribute. - * - * @param mixed[] $metadata - */ - private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void - { - // handle internal type declaration - $type = self::$typeMap[$attribute->type] ?? $attribute->type; - - // handle the case if the property type is mixed - if ($type === 'mixed') { - return; - } - - // Evaluate type - $pos = strpos($type, '<'); - if ($pos !== false) { - // Checks if the property has array - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } else { - // Checks if the property has type[] - $pos = strrpos($type, '['); - if ($pos !== false) { - $arrayType = substr($type, 0, $pos); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - } - } - - $metadata['attribute_types'][$attribute->name]['type'] = $type; - $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type; - $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @phpstan-return list - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotations(): array - { - $annotations = []; - - while ($this->lexer->lookahead !== null) { - if ($this->lexer->lookahead->type !== DocLexer::T_AT) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if ( - $this->lexer->token !== null && - $this->lexer->lookahead->position === $this->lexer->token->position + strlen( - $this->lexer->token->value - ) - ) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - $peek = $this->lexer->glimpse(); - if ( - ($peek === null) - || ($peek->type !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( - $peek->type, - self::$classIdentifiers, - true - )) - || $peek->position !== $this->lexer->lookahead->position + 1 - ) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - $annot = $this->Annotation(); - if ($annot === false) { - continue; - } - - $annotations[] = $annot; - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName MethodCall - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @return object|false False if it is not a valid annotation. - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - if ( - $this->lexer->isNextToken(DocLexer::T_MINUS) - && $this->lexer->nextTokenIsAdjacent() - ) { - // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded - return false; - } - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - - if ($name[0] !== '\\') { - $pos = strpos($name, '\\'); - $alias = ($pos === false) ? $name : substr($name, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace . '\\' . $name)) { - $name = $namespace . '\\' . $name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias])) { - $namespace = ltrim($this->imports[$loweredAlias], '\\'); - $name = ($pos !== false) - ? $namespace . substr($name, $pos) - : $namespace; - $found = $this->classExists($name); - } elseif ( - ! isset($this->ignoredAnnotationNames[$name]) - && isset($this->imports['__NAMESPACE__']) - && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) - ) { - $name = $this->imports['__NAMESPACE__'] . '\\' . $name; - $found = true; - } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { - $found = true; - } - - if (! $found) { - if ($this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? -EXCEPTION - , - $name, - $this->context - )); - } - } - - $name = ltrim($name, '\\'); - - if (! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf( - 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', - $name, - $this->context - )); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - // collects the metadata annotation only if there is not yet - if (! isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { - return false; - } - - throw AnnotationException::semanticalError(sprintf( - <<<'EXCEPTION' -The class "%s" is not annotated with @Annotation. -Are you sure this class can be used as annotation? -If so, then you need to add @Annotation to the _class_ doc comment of "%s". -If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. -EXCEPTION - , - $name, - $name, - $originalName, - $this->context - )); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { - throw AnnotationException::semanticalError( - sprintf( - <<<'EXCEPTION' -Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. -EXCEPTION - , - $originalName, - $this->context, - self::$annotationMetadata[$name]['targets_literal'] - ) - ); - } - - $arguments = $this->MethodCall(); - $values = $this->resolvePositionalValues($arguments, $name); - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError( - $property, - $name, - $this->context, - $enum['literal'], - $values[$property] - ); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ( - $property === self::$annotationMetadata[$name]['default_property'] - && ! isset($values[$property]) && isset($values['value']) - ) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (! isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'] - ); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if (! is_array($values[$property])) { - $values[$property] = [$values[$property]]; - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', - $item - ); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError( - $property, - $originalName, - $this->context, - 'a(n) ' . $type['value'], - $values[$property] - ); - } - } - - if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { - if (PHP_VERSION_ID >= 80000) { - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $values); - } - - $positionalValues = []; - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $positionalValues[$parameter['position']] = $parameter['default']; - } - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s" -that can be set through its named arguments constructor. -Available named arguments: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) - )); - } - - $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; - } - - return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues); - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]); - } - - $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []); - - foreach ($values as $property => $value) { - if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ($property !== 'value') { - throw AnnotationException::creationError(sprintf( - <<<'EXCEPTION' -The annotation @%s declared on %s does not have a property named "%s". -Available properties: %s -EXCEPTION - , - $originalName, - $this->context, - $property, - implode(', ', self::$annotationMetadata[$name]['properties']) - )); - } - - // handle the case if the property has no annotations - $property = self::$annotationMetadata[$name]['default_property']; - if (! $property) { - throw AnnotationException::creationError(sprintf( - 'The annotation @%s declared on %s does not accept any values, but got %s.', - $originalName, - $this->context, - json_encode($values) - )); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * MethodCall ::= ["(" [Values] ")"] - * - * @psalm-return Arguments - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function MethodCall(): array - { - $values = []; - - if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - return $values; - } - - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - - return $values; - } - - /** - * Values ::= Array | Value {"," Value}* [","] - * - * @psalm-return Arguments - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Values(): array - { - $values = [$this->Value()]; - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - break; - } - - $token = $this->lexer->lookahead; - $value = $this->Value(); - - $values[] = $value; - } - - $namedArguments = []; - $positionalArguments = []; - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof stdClass) { - $namedArguments[$value->name] = $value->value; - } else { - $positionalArguments[$k] = $value; - } - } - - return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @return mixed - * - * @throws AnnotationException - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { - [$className, $const] = explode('::', $identifier); - - $pos = strpos($className, '\\'); - $alias = ($pos === false) ? $className : substr($className, 0, $pos); - $found = false; - $loweredAlias = strtolower($alias); - - switch (true) { - case ! empty($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - break; - } - } - - break; - - case isset($this->imports[$loweredAlias]): - $found = true; - $className = ($pos !== false) - ? $this->imports[$loweredAlias] . substr($className, $pos) - : $this->imports[$loweredAlias]; - break; - - default: - if (isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - - if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { - $className = $ns . '\\' . $className; - $found = true; - } - } - - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - /** - * Checks if identifier ends with ::class and remove the leading backslash if it exists. - */ - if ( - $this->identifierEndsWithClassConstant($identifier) && - ! $this->identifierStartsWithBackslash($identifier) - ) { - return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); - } - - if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { - return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); - } - - if (! defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - private function identifierStartsWithBackslash(string $identifier): bool - { - return $identifier[0] === '\\'; - } - - private function identifierEndsWithClassConstant(string $identifier): bool - { - return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); - } - - /** @return int|false */ - private function getClassConstantPositionInIdentifier(string $identifier) - { - return stripos($identifier, '::class'); - } - - /** - * Identifier ::= string - * - * @throws AnnotationException - */ - private function Identifier(): string - { - // check if we have an annotation - if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - throw $this->syntaxError('namespace separator or identifier'); - } - - $this->lexer->moveNext(); - - $className = $this->lexer->token->value; - - while ( - $this->lexer->lookahead !== null && - $this->lexer->lookahead->position === ($this->lexer->token->position + - strlen($this->lexer->token->value)) && - $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) - ) { - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - - $className .= '\\' . $this->lexer->token->value; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if ($peek->type === DocLexer::T_EQUALS) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead->type) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - - return $this->lexer->token->value; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - - return (int) $this->lexer->token->value; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - - return (float) $this->lexer->token->value; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - - return null; - - default: - throw $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function FieldAssignment(): stdClass - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token->value; - - $this->match(DocLexer::T_EQUALS); - - $item = new stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return mixed[] - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function Arrayx(): array - { - $array = $values = []; - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - - // If the array is empty, stop parsing and return. - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - return $array; - } - - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - [$key, $val] = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @phpstan-return array{mixed, mixed} - * - * @throws AnnotationException - * @throws ReflectionException - */ - private function ArrayEntry(): array - { - $peek = $this->lexer->glimpse(); - - if ( - $peek->type === DocLexer::T_EQUALS - || $peek->type === DocLexer::T_COLON - ) { - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]); - $key = $this->lexer->token->value; - } - - $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]); - - return [$key, $this->PlainValue()]; - } - - return [null, $this->Value()]; - } - - /** - * Checks whether the given $name matches any ignored annotation name or namespace - */ - private function isIgnoredAnnotation(string $name): bool - { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return true; - } - - foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { - $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - - if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { - return true; - } - } - - return false; - } - - /** - * Resolve positional arguments (without name) to named ones - * - * @psalm-param Arguments $arguments - * - * @return array - */ - private function resolvePositionalValues(array $arguments, string $name): array - { - $positionalArguments = $arguments['positional_arguments'] ?? []; - $values = $arguments['named_arguments'] ?? []; - - if ( - self::$annotationMetadata[$name]['has_named_argument_constructor'] - && self::$annotationMetadata[$name]['default_property'] !== null - ) { - // We must ensure that we don't have positional arguments after named ones - $positions = array_keys($positionalArguments); - $lastPosition = null; - foreach ($positions as $position) { - if ( - ($lastPosition === null && $position !== 0) || - ($lastPosition !== null && $position !== $lastPosition + 1) - ) { - throw $this->syntaxError('Positional arguments after named arguments is not allowed'); - } - - $lastPosition = $position; - } - - foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { - $position = $parameter['position']; - if (isset($values[$property]) || ! isset($positionalArguments[$position])) { - continue; - } - - $values[$property] = $positionalArguments[$position]; - } - } else { - if (count($positionalArguments) > 0 && ! isset($values['value'])) { - if (count($positionalArguments) === 1) { - $value = array_pop($positionalArguments); - } else { - $value = array_values($positionalArguments); - } - - $values['value'] = $value; - } - } - - return $values; - } - - /** - * Try to instantiate the annotation and catch and process any exceptions related to failure - * - * @param class-string $name - * @param array $arguments - * - * @return object - * - * @throws AnnotationException - */ - private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments) - { - try { - return new $name(...$arguments); - } catch (Throwable $exception) { - throw AnnotationException::creationError( - sprintf( - 'An error occurred while instantiating the annotation @%s declared on %s: "%s".', - $originalName, - $context, - $exception->getMessage() - ), - $exception - ); - } - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php deleted file mode 100644 index ab27f8a5..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php +++ /dev/null @@ -1,178 +0,0 @@ - true, - 'Attribute' => true, - 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - 'NamedArgumentConstructor' => true, - ]; - - private const WidelyUsedNonStandard = [ - 'fix' => true, - 'fixme' => true, - 'override' => true, - ]; - - private const PhpDocumentor1 = [ - 'abstract' => true, - 'access' => true, - 'code' => true, - 'deprec' => true, - 'endcode' => true, - 'exception' => true, - 'final' => true, - 'ingroup' => true, - 'inheritdoc' => true, - 'inheritDoc' => true, - 'magic' => true, - 'name' => true, - 'private' => true, - 'static' => true, - 'staticvar' => true, - 'staticVar' => true, - 'toc' => true, - 'tutorial' => true, - 'throw' => true, - ]; - - private const PhpDocumentor2 = [ - 'api' => true, - 'author' => true, - 'category' => true, - 'copyright' => true, - 'deprecated' => true, - 'example' => true, - 'filesource' => true, - 'global' => true, - 'ignore' => true, - /* Can we enable this? 'index' => true, */ - 'internal' => true, - 'license' => true, - 'link' => true, - 'method' => true, - 'package' => true, - 'param' => true, - 'property' => true, - 'property-read' => true, - 'property-write' => true, - 'return' => true, - 'see' => true, - 'since' => true, - 'source' => true, - 'subpackage' => true, - 'throws' => true, - 'todo' => true, - 'TODO' => true, - 'usedby' => true, - 'uses' => true, - 'var' => true, - 'version' => true, - ]; - - private const PHPUnit = [ - 'author' => true, - 'after' => true, - 'afterClass' => true, - 'backupGlobals' => true, - 'backupStaticAttributes' => true, - 'before' => true, - 'beforeClass' => true, - 'codeCoverageIgnore' => true, - 'codeCoverageIgnoreStart' => true, - 'codeCoverageIgnoreEnd' => true, - 'covers' => true, - 'coversDefaultClass' => true, - 'coversNothing' => true, - 'dataProvider' => true, - 'depends' => true, - 'doesNotPerformAssertions' => true, - 'expectedException' => true, - 'expectedExceptionCode' => true, - 'expectedExceptionMessage' => true, - 'expectedExceptionMessageRegExp' => true, - 'group' => true, - 'large' => true, - 'medium' => true, - 'preserveGlobalState' => true, - 'requires' => true, - 'runTestsInSeparateProcesses' => true, - 'runInSeparateProcess' => true, - 'small' => true, - 'test' => true, - 'testdox' => true, - 'testWith' => true, - 'ticket' => true, - 'uses' => true, - ]; - - private const PhpCheckStyle = ['SuppressWarnings' => true]; - - private const PhpStorm = ['noinspection' => true]; - - private const PEAR = ['package_version' => true]; - - private const PlainUML = [ - 'startuml' => true, - 'enduml' => true, - ]; - - private const Symfony = ['experimental' => true]; - - private const PhpCodeSniffer = [ - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; - - private const SlevomatCodingStandard = ['phpcsSuppress' => true]; - - private const Phan = ['suppress' => true]; - - private const Rector = ['noRector' => true]; - - private const StaticAnalysis = [ - // PHPStan, Psalm - 'extends' => true, - 'implements' => true, - 'readonly' => true, - 'template' => true, - 'use' => true, - - // Psalm - 'pure' => true, - 'immutable' => true, - ]; - - public const LIST = self::Reserved - + self::WidelyUsedNonStandard - + self::PhpDocumentor1 - + self::PhpDocumentor2 - + self::PHPUnit - + self::PhpCheckStyle - + self::PhpStorm - + self::PEAR - + self::PlainUML - + self::Symfony - + self::SlevomatCodingStandard - + self::PhpCodeSniffer - + self::Phan - + self::Rector - + self::StaticAnalysis; - - private function __construct() - { - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 77b5b9cb..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,99 +0,0 @@ -delegate = $reader; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $annotations = []; - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - return $this->delegate->getClassAnnotation($class, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $annotations = []; - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - return $this->delegate->getMethodAnnotation($method, $annotationName); - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $annotations = []; - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - return $this->delegate->getPropertyAnnotation($property, $annotationName); - } - - /** - * Proxies all methods to the delegate. - * - * @param mixed[] $args - * - * @return mixed - */ - public function __call(string $method, array $args) - { - return call_user_func_array([$this->delegate, $method], $args); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php deleted file mode 100644 index 312a2ab1..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php +++ /dev/null @@ -1,78 +0,0 @@ - a list with use statements in the form (Alias => FQN). - */ - public function parseUseStatements($reflection): array - { - if (method_exists($reflection, 'getUseStatements')) { - return $reflection->getUseStatements(); - } - - $filename = $reflection->getFileName(); - - if ($filename === false) { - return []; - } - - $content = $this->getFileContent($filename, $reflection->getStartLine()); - - if ($content === null) { - return []; - } - - $namespace = preg_quote($reflection->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($reflection->getNamespaceName()); - } - - /** - * Gets the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * - * @return string|null The content of the file or null if the file does not exist. - */ - private function getFileContent(string $filename, $lineNumber) - { - if (! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (! $file->eof()) { - if ($lineCnt++ === $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php deleted file mode 100644 index b42da39a..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php +++ /dev/null @@ -1,233 +0,0 @@ -> */ - private $loadedAnnotations = []; - - /** @var int[] */ - private $loadedFilemtimes = []; - - public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (bool) $debug; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotations(ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName() . '$' . $property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName() . '#' . $method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * {@inheritDoc} - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - public function clearLoadedAnnotations(): void - { - $this->loadedAnnotations = []; - $this->loadedFilemtimes = []; - } - - /** @return mixed[] */ - private function fetchFromCache( - string $cacheKey, - ReflectionClass $class, - string $method, - Reflector $reflector - ): array { - $cacheKey = rawurlencode($cacheKey); - - $item = $this->cache->getItem($cacheKey); - if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) { - $this->cache->save($item->set($this->delegate->{$method}($reflector))); - } - - return $item->get(); - } - - /** - * Used in debug mode to check if the cache is fresh. - * - * @return bool Returns true if the cache was fresh, or false if the class - * being read was modified since writing to the cache. - */ - private function refresh(string $cacheKey, ReflectionClass $class): bool - { - $lastModification = $this->getLastModification($class); - if ($lastModification === 0) { - return true; - } - - $item = $this->cache->getItem('[C]' . $cacheKey); - if ($item->isHit() && $item->get() >= $lastModification) { - return true; - } - - $this->cache->save($item->set(time())); - - return false; - } - - /** - * Returns the time the class was last modified, testing traits and parents - */ - private function getLastModification(ReflectionClass $class): int - { - $filename = $class->getFileName(); - - if (isset($this->loadedFilemtimes[$filename])) { - return $this->loadedFilemtimes[$filename]; - } - - $parent = $class->getParentClass(); - - $lastModification = max(array_merge( - [$filename !== false && is_file($filename) ? filemtime($filename) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $class->getTraits()), - array_map(function (ReflectionClass $class): int { - return $this->getLastModification($class); - }, $class->getInterfaces()), - $parent ? [$this->getLastModification($parent)] : [] - )); - - assert($lastModification !== false); - - return $this->loadedFilemtimes[$filename] = $lastModification; - } - - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int - { - $fileName = $reflectionTrait->getFileName(); - - if (isset($this->loadedFilemtimes[$fileName])) { - return $this->loadedFilemtimes[$fileName]; - } - - $lastModificationTime = max(array_merge( - [$fileName !== false && is_file($fileName) ? filemtime($fileName) : 0], - array_map(function (ReflectionClass $reflectionTrait): int { - return $this->getTraitLastModificationTime($reflectionTrait); - }, $reflectionTrait->getTraits()) - )); - - assert($lastModificationTime !== false); - - return $this->loadedFilemtimes[$fileName] = $lastModificationTime; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 0663ffda..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,80 +0,0 @@ - An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class); - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName); - - /** - * Gets the annotations applied to a method. - * - * @param ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method); - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName); - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property); - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param class-string $annotationName The name of the annotation. - * - * @return T|null The Annotation or NULL, if the requested annotation does not exist. - * - * @template T - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index 0534fd17..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,205 +0,0 @@ - - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - public function __construct(string $contents) - { - $this->tokens = token_get_all($contents); - - // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it - // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored - // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a - // docblock. If the first thing in the file is a class without a doc block this would cause calls to - // getDocBlock() on said class to return our long lost doc_comment. Argh. - // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least - // it's harmless to us. - token_get_all("numTokens = count($this->tokens); - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return mixed[]|string|null The token if exists, null otherwise. - */ - public function next(bool $docCommentIsComment = true) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ( - $this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) - ) { - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parses a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; - $explicitAlias = false; - while (($token = $this->next())) { - if (! $explicitAlias && $token[0] === T_STRING) { - $class .= $token[1]; - $alias = $token[1]; - } elseif ($explicitAlias && $token[0] === T_STRING) { - $alias = $token[1]; - } elseif ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - ) { - $class .= $token[1]; - - $classSplit = explode('\\', $token[1]); - $alias = $classSplit[count($classSplit) - 1]; - } elseif ($token[0] === T_NS_SEPARATOR) { - $class .= '\\'; - $alias = ''; - } elseif ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } elseif ($token === ',') { - $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } elseif ($token === ';') { - $statements[strtolower($alias)] = $groupRoot . $class; - break; - } elseif ($token === '{') { - $groupRoot = $class; - $class = ''; - } elseif ($token === '}') { - continue; - } else { - break; - } - } - - return $statements; - } - - /** - * Gets all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * - * @return array A list with all found use statements. - */ - public function parseUseStatements(string $namespaceName) - { - $statements = []; - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = []; - } - - return $statements; - } - - /** - * Gets the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while ( - ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( - PHP_VERSION_ID >= 80000 && - ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) - )) - ) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Gets the class name. - * - * @return string The found class name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE deleted file mode 100644 index e8fdec4a..00000000 --- a/vendor/doctrine/lexer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2006-2018 Doctrine Project - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md deleted file mode 100644 index 784f2a27..00000000 --- a/vendor/doctrine/lexer/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Lexer - -[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions) - -Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. - -This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). - -https://www.doctrine-project.org/projects/lexer.html diff --git a/vendor/doctrine/lexer/UPGRADE.md b/vendor/doctrine/lexer/UPGRADE.md deleted file mode 100644 index 1933fcb2..00000000 --- a/vendor/doctrine/lexer/UPGRADE.md +++ /dev/null @@ -1,22 +0,0 @@ -Note about upgrading: Doctrine uses static and runtime mechanisms to raise -awareness about deprecated code. - -- Use of `@deprecated` docblock that is detected by IDEs (like PHPStorm) or - Static Analysis tools (like Psalm, phpstan) -- Use of our low-overhead runtime deprecation API, details: - https://github.com/doctrine/deprecations/ - -# Upgrade to 3.0.0 - -`Doctrine\Common\Lexer\Token` no longer implements `ArrayAccess`. -Parameter type declarations have been added to -`Doctrine\Common\Lexer\AbstractLexer` and `Doctrine\Common\Lexer\Token`. -You should add both parameter type declarations and return type declarations to -your lexers, based on the `@return` phpdoc. - -# Upgrade to 2.0.0 - -`AbstractLexer::glimpse()` and `AbstractLexer::peek()` now return -instances of `Doctrine\Common\Lexer\Token`, which is an array-like class -Using it as an array is deprecated in favor of using properties of that class. -Using `count()` on it is deprecated with no replacement. diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json deleted file mode 100644 index 995dafa0..00000000 --- a/vendor/doctrine/lexer/composer.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "doctrine/lexer", - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "license": "MIT", - "type": "library", - "keywords": [ - "php", - "parser", - "lexer", - "annotations", - "docblock" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Doctrine\\Tests\\Common\\Lexer\\": "tests" - } - }, - "config": { - "allow-plugins": { - "composer/package-versions-deprecated": true, - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "sort-packages": true - } -} diff --git a/vendor/doctrine/lexer/src/AbstractLexer.php b/vendor/doctrine/lexer/src/AbstractLexer.php deleted file mode 100644 index 2436885e..00000000 --- a/vendor/doctrine/lexer/src/AbstractLexer.php +++ /dev/null @@ -1,328 +0,0 @@ -> - */ - private array $tokens = []; - - /** - * Current lexer position in input string. - */ - private int $position = 0; - - /** - * Current peek of current lexer position. - */ - private int $peek = 0; - - /** - * The next token in the input. - * - * @var Token|null - */ - public Token|null $lookahead; - - /** - * The last matched/seen token. - * - * @var Token|null - */ - public Token|null $token; - - /** - * Composed regex for input parsing. - * - * @var non-empty-string|null - */ - private string|null $regex = null; - - /** - * Sets the input data to be tokenized. - * - * The Lexer is immediately reset and the new input tokenized. - * Any unprocessed tokens from any previous input are lost. - * - * @param string $input The input to be tokenized. - * - * @return void - */ - public function setInput(string $input) - { - $this->input = $input; - $this->tokens = []; - - $this->reset(); - $this->scan($input); - } - - /** - * Resets the lexer. - * - * @return void - */ - public function reset() - { - $this->lookahead = null; - $this->token = null; - $this->peek = 0; - $this->position = 0; - } - - /** - * Resets the peek pointer to 0. - * - * @return void - */ - public function resetPeek() - { - $this->peek = 0; - } - - /** - * Resets the lexer position on the input to the given position. - * - * @param int $position Position to place the lexical scanner. - * - * @return void - */ - public function resetPosition(int $position = 0) - { - $this->position = $position; - } - - /** - * Retrieve the original lexer's input until a given position. - * - * @return string - */ - public function getInputUntilPosition(int $position) - { - return substr($this->input, 0, $position); - } - - /** - * Checks whether a given token matches the current lookahead. - * - * @param T $type - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextToken(int|string|UnitEnum $type) - { - return $this->lookahead !== null && $this->lookahead->isA($type); - } - - /** - * Checks whether any of the given tokens matches the current lookahead. - * - * @param list $types - * - * @return bool - * - * @psalm-assert-if-true !=null $this->lookahead - */ - public function isNextTokenAny(array $types) - { - return $this->lookahead !== null && $this->lookahead->isA(...$types); - } - - /** - * Moves to the next token in the input string. - * - * @return bool - * - * @psalm-assert-if-true !null $this->lookahead - */ - public function moveNext() - { - $this->peek = 0; - $this->token = $this->lookahead; - $this->lookahead = isset($this->tokens[$this->position]) - ? $this->tokens[$this->position++] : null; - - return $this->lookahead !== null; - } - - /** - * Tells the lexer to skip input tokens until it sees a token with the given value. - * - * @param T $type The token type to skip until. - * - * @return void - */ - public function skipUntil(int|string|UnitEnum $type) - { - while ($this->lookahead !== null && ! $this->lookahead->isA($type)) { - $this->moveNext(); - } - } - - /** - * Checks if given value is identical to the given token. - * - * @return bool - */ - public function isA(string $value, int|string|UnitEnum $token) - { - return $this->getType($value) === $token; - } - - /** - * Moves the lookahead token forward. - * - * @return Token|null The next token or NULL if there are no more tokens ahead. - */ - public function peek() - { - if (isset($this->tokens[$this->position + $this->peek])) { - return $this->tokens[$this->position + $this->peek++]; - } - - return null; - } - - /** - * Peeks at the next token, returns it and immediately resets the peek. - * - * @return Token|null The next token or NULL if there are no more tokens ahead. - */ - public function glimpse() - { - $peek = $this->peek(); - $this->peek = 0; - - return $peek; - } - - /** - * Scans the input string for tokens. - * - * @param string $input A query string. - * - * @return void - */ - protected function scan(string $input) - { - if (! isset($this->regex)) { - $this->regex = sprintf( - '/(%s)|%s/%s', - implode(')|(', $this->getCatchablePatterns()), - implode('|', $this->getNonCatchablePatterns()), - $this->getModifiers(), - ); - } - - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - $matches = preg_split($this->regex, $input, -1, $flags); - - if ($matches === false) { - // Work around https://bugs.php.net/78122 - $matches = [[$input, 0]]; - } - - foreach ($matches as $match) { - // Must remain before 'value' assignment since it can change content - $firstMatch = $match[0]; - $type = $this->getType($firstMatch); - - $this->tokens[] = new Token( - $firstMatch, - $type, - $match[1], - ); - } - } - - /** - * Gets the literal for a given token. - * - * @param T $token - * - * @return int|string - */ - public function getLiteral(int|string|UnitEnum $token) - { - if ($token instanceof UnitEnum) { - return $token::class . '::' . $token->name; - } - - $className = static::class; - - $reflClass = new ReflectionClass($className); - $constants = $reflClass->getConstants(); - - foreach ($constants as $name => $value) { - if ($value === $token) { - return $className . '::' . $name; - } - } - - return $token; - } - - /** - * Regex modifiers - * - * @return string - */ - protected function getModifiers() - { - return 'iu'; - } - - /** - * Lexical catchable patterns. - * - * @return string[] - */ - abstract protected function getCatchablePatterns(); - - /** - * Lexical non-catchable patterns. - * - * @return string[] - */ - abstract protected function getNonCatchablePatterns(); - - /** - * Retrieve token type. Also processes the token value if necessary. - * - * @return T|null - * - * @param-out V $value - */ - abstract protected function getType(string &$value); -} diff --git a/vendor/doctrine/lexer/src/Token.php b/vendor/doctrine/lexer/src/Token.php deleted file mode 100644 index b6df6946..00000000 --- a/vendor/doctrine/lexer/src/Token.php +++ /dev/null @@ -1,56 +0,0 @@ -value = $value; - $this->type = $type; - $this->position = $position; - } - - /** @param T ...$types */ - public function isA(...$types): bool - { - return in_array($this->type, $types, true); - } -} diff --git a/vendor/ezyang/htmlpurifier/CREDITS b/vendor/ezyang/htmlpurifier/CREDITS deleted file mode 100644 index 7921b45a..00000000 --- a/vendor/ezyang/htmlpurifier/CREDITS +++ /dev/null @@ -1,9 +0,0 @@ - -CREDITS - -Almost everything written by Edward Z. Yang (Ambush Commander). Lots of thanks -to the DevNetwork Community for their help (see docs/ref-devnetwork.html for -more details), Feyd especially (namely IPv6 and optimization). Thanks to RSnake -for letting me package his fantastic XSS cheatsheet for a smoketest. - - vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/LICENSE b/vendor/ezyang/htmlpurifier/LICENSE deleted file mode 100644 index 8c88a20d..00000000 --- a/vendor/ezyang/htmlpurifier/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/README.md b/vendor/ezyang/htmlpurifier/README.md deleted file mode 100644 index e6b7199c..00000000 --- a/vendor/ezyang/htmlpurifier/README.md +++ /dev/null @@ -1,29 +0,0 @@ -HTML Purifier [![Build Status](https://github.com/ezyang/htmlpurifier/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/ezyang/htmlpurifier/actions/workflows/ci.yml) -============= - -HTML Purifier is an HTML filtering solution that uses a unique combination -of robust whitelists and aggressive parsing to ensure that not only are -XSS attacks thwarted, but the resulting HTML is standards compliant. - -HTML Purifier is oriented towards richly formatted documents from -untrusted sources that require CSS and a full tag-set. This library can -be configured to accept a more restrictive set of tags, but it won't be -as efficient as more bare-bones parsers. It will, however, do the job -right, which may be more important. - -Places to go: - -* See INSTALL for a quick installation guide -* See docs/ for developer-oriented documentation, code examples and - an in-depth installation guide. -* See WYSIWYG for information on editors like TinyMCE and FCKeditor - -HTML Purifier can be found on the web at: [http://htmlpurifier.org/](http://htmlpurifier.org/) - -## Installation - -Package available on [Composer](https://packagist.org/packages/ezyang/htmlpurifier). - -If you're using Composer to manage dependencies, you can use - - $ composer require ezyang/htmlpurifier diff --git a/vendor/ezyang/htmlpurifier/VERSION b/vendor/ezyang/htmlpurifier/VERSION deleted file mode 100644 index ef8ffbdd..00000000 --- a/vendor/ezyang/htmlpurifier/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.18.0 \ No newline at end of file diff --git a/vendor/ezyang/htmlpurifier/composer.json b/vendor/ezyang/htmlpurifier/composer.json deleted file mode 100644 index 7799d1d2..00000000 --- a/vendor/ezyang/htmlpurifier/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ezyang/htmlpurifier", - "description": "Standards compliant HTML filter written in PHP", - "type": "library", - "keywords": ["html"], - "homepage": "http://htmlpurifier.org/", - "license": "LGPL-2.1-or-later", - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" - }, - "require-dev": { - "cerdic/css-tidy": "^1.7 || ^2.0", - "simpletest/simpletest": "dev-master" - }, - "autoload": { - "psr-0": { "HTMLPurifier": "library/" }, - "files": ["library/HTMLPurifier.composer.php"], - "exclude-from-classmap": [ - "/library/HTMLPurifier/Language/" - ] - }, - "suggest": { - "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", - "ext-iconv": "Converts text to and from non-UTF-8 encodings", - "ext-bcmath": "Used for unit conversion and imagecrash protection", - "ext-tidy": "Used for pretty-printing HTML" - }, - "config": { - "sort-packages": true - }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/ezyang/simpletest.git", - "no-api": true - } - ] -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php deleted file mode 100644 index 1960c399..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php +++ /dev/null @@ -1,11 +0,0 @@ -purify($html, $config); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php deleted file mode 100644 index 4c713a33..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.includes.php +++ /dev/null @@ -1,236 +0,0 @@ - $attributes) { - $allowed_elements[$element] = true; - foreach ($attributes as $attribute => $x) { - $allowed_attributes["$element.$attribute"] = true; - } - } - $config->set('HTML.AllowedElements', $allowed_elements); - $config->set('HTML.AllowedAttributes', $allowed_attributes); - if ($allowed_protocols !== null) { - $config->set('URI.AllowedSchemes', $allowed_protocols); - } - $purifier = new HTMLPurifier($config); - return $purifier->purify($string); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php deleted file mode 100644 index 39b1b653..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.path.php +++ /dev/null @@ -1,11 +0,0 @@ -config = HTMLPurifier_Config::create($config); - $this->strategy = new HTMLPurifier_Strategy_Core(); - } - - /** - * Adds a filter to process the output. First come first serve - * - * @param HTMLPurifier_Filter $filter HTMLPurifier_Filter object - */ - public function addFilter($filter) - { - trigger_error( - 'HTMLPurifier->addFilter() is deprecated, use configuration directives' . - ' in the Filter namespace or Filter.Custom', - E_USER_WARNING - ); - $this->filters[] = $filter; - } - - /** - * Filters an HTML snippet/document to be XSS-free and standards-compliant. - * - * @param string $html String of HTML to purify - * @param HTMLPurifier_Config $config Config object for this operation, - * if omitted, defaults to the config object specified during this - * object's construction. The parameter can also be any type - * that HTMLPurifier_Config::create() supports. - * - * @return string Purified HTML - */ - public function purify($html, $config = null) - { - // :TODO: make the config merge in, instead of replace - $config = $config ? HTMLPurifier_Config::create($config) : $this->config; - - // implementation is partially environment dependant, partially - // configuration dependant - $lexer = HTMLPurifier_Lexer::create($config); - - $context = new HTMLPurifier_Context(); - - // setup HTML generator - $this->generator = new HTMLPurifier_Generator($config, $context); - $context->register('Generator', $this->generator); - - // set up global context variables - if ($config->get('Core.CollectErrors')) { - // may get moved out if other facilities use it - $language_factory = HTMLPurifier_LanguageFactory::instance(); - $language = $language_factory->create($config, $context); - $context->register('Locale', $language); - - $error_collector = new HTMLPurifier_ErrorCollector($context); - $context->register('ErrorCollector', $error_collector); - } - - // setup id_accumulator context, necessary due to the fact that - // AttrValidator can be called from many places - $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); - $context->register('IDAccumulator', $id_accumulator); - - $html = HTMLPurifier_Encoder::convertToUTF8($html, $config, $context); - - // setup filters - $filter_flags = $config->getBatch('Filter'); - $custom_filters = $filter_flags['Custom']; - unset($filter_flags['Custom']); - $filters = array(); - foreach ($filter_flags as $filter => $flag) { - if (!$flag) { - continue; - } - if (strpos($filter, '.') !== false) { - continue; - } - $class = "HTMLPurifier_Filter_$filter"; - $filters[] = new $class; - } - foreach ($custom_filters as $filter) { - // maybe "HTMLPurifier_Filter_$filter", but be consistent with AutoFormat - $filters[] = $filter; - } - $filters = array_merge($filters, $this->filters); - // maybe prepare(), but later - - for ($i = 0, $filter_size = count($filters); $i < $filter_size; $i++) { - $html = $filters[$i]->preFilter($html, $config, $context); - } - - // purified HTML - $html = - $this->generator->generateFromTokens( - // list of tokens - $this->strategy->execute( - // list of un-purified tokens - $lexer->tokenizeHTML( - // un-purified HTML - $html, - $config, - $context - ), - $config, - $context - ) - ); - - for ($i = $filter_size - 1; $i >= 0; $i--) { - $html = $filters[$i]->postFilter($html, $config, $context); - } - - $html = HTMLPurifier_Encoder::convertFromUTF8($html, $config, $context); - $this->context =& $context; - return $html; - } - - /** - * Filters an array of HTML snippets - * - * @param string[] $array_of_html Array of html snippets - * @param HTMLPurifier_Config $config Optional config object for this operation. - * See HTMLPurifier::purify() for more details. - * - * @return string[] Array of purified HTML - */ - public function purifyArray($array_of_html, $config = null) - { - $context_array = array(); - $array = array(); - foreach($array_of_html as $key=>$value){ - if (is_array($value)) { - $array[$key] = $this->purifyArray($value, $config); - } else { - $array[$key] = $this->purify($value, $config); - } - $context_array[$key] = $this->context; - } - $this->context = $context_array; - return $array; - } - - /** - * Singleton for enforcing just one HTML Purifier in your system - * - * @param HTMLPurifier|HTMLPurifier_Config $prototype Optional prototype - * HTMLPurifier instance to overload singleton with, - * or HTMLPurifier_Config instance to configure the - * generated version with. - * - * @return HTMLPurifier - */ - public static function instance($prototype = null) - { - if (!self::$instance || $prototype) { - if ($prototype instanceof HTMLPurifier) { - self::$instance = $prototype; - } elseif ($prototype) { - self::$instance = new HTMLPurifier($prototype); - } else { - self::$instance = new HTMLPurifier(); - } - } - return self::$instance; - } - - /** - * Singleton for enforcing just one HTML Purifier in your system - * - * @param HTMLPurifier|HTMLPurifier_Config $prototype Optional prototype - * HTMLPurifier instance to overload singleton with, - * or HTMLPurifier_Config instance to configure the - * generated version with. - * - * @return HTMLPurifier - * @note Backwards compatibility, see instance() - */ - public static function getInstance($prototype = null) - { - return HTMLPurifier::instance($prototype); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php deleted file mode 100644 index 8a417d24..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier.safe-includes.php +++ /dev/null @@ -1,230 +0,0 @@ -getHTMLDefinition(); - $parent = new HTMLPurifier_Token_Start($definition->info_parent); - $stack = array($parent->toNode()); - foreach ($tokens as $token) { - $token->skip = null; // [MUT] - $token->carryover = null; // [MUT] - if ($token instanceof HTMLPurifier_Token_End) { - $token->start = null; // [MUT] - $r = array_pop($stack); - //assert($r->name === $token->name); - //assert(empty($token->attr)); - $r->endCol = $token->col; - $r->endLine = $token->line; - $r->endArmor = $token->armor; - continue; - } - $node = $token->toNode(); - $stack[count($stack)-1]->children[] = $node; - if ($token instanceof HTMLPurifier_Token_Start) { - $stack[] = $node; - } - } - //assert(count($stack) == 1); - return $stack[0]; - } - - public static function flatten($node, $config, $context) { - $level = 0; - $nodes = array($level => new HTMLPurifier_Queue(array($node))); - $closingTokens = array(); - $tokens = array(); - do { - while (!$nodes[$level]->isEmpty()) { - $node = $nodes[$level]->shift(); // FIFO - list($start, $end) = $node->toTokenPair(); - if ($level > 0) { - $tokens[] = $start; - } - if ($end !== NULL) { - $closingTokens[$level][] = $end; - } - if ($node instanceof HTMLPurifier_Node_Element) { - $level++; - $nodes[$level] = new HTMLPurifier_Queue(); - foreach ($node->children as $childNode) { - $nodes[$level]->push($childNode); - } - } - } - $level--; - if ($level && isset($closingTokens[$level])) { - while ($token = array_pop($closingTokens[$level])) { - $tokens[] = $token; - } - } - } while ($level > 0); - return $tokens; - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php deleted file mode 100644 index c7b17cf1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php +++ /dev/null @@ -1,148 +0,0 @@ -doConstruct($attr_types, $modules); - } - - public function doConstruct($attr_types, $modules) - { - // load extensions from the modules - foreach ($modules as $module) { - foreach ($module->attr_collections as $coll_i => $coll) { - if (!isset($this->info[$coll_i])) { - $this->info[$coll_i] = array(); - } - foreach ($coll as $attr_i => $attr) { - if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) { - // merge in includes - $this->info[$coll_i][$attr_i] = array_merge( - $this->info[$coll_i][$attr_i], - $attr - ); - continue; - } - $this->info[$coll_i][$attr_i] = $attr; - } - } - } - // perform internal expansions and inclusions - foreach ($this->info as $name => $attr) { - // merge attribute collections that include others - $this->performInclusions($this->info[$name]); - // replace string identifiers with actual attribute objects - $this->expandIdentifiers($this->info[$name], $attr_types); - } - } - - /** - * Takes a reference to an attribute associative array and performs - * all inclusions specified by the zero index. - * @param array &$attr Reference to attribute array - */ - public function performInclusions(&$attr) - { - if (!isset($attr[0])) { - return; - } - $merge = $attr[0]; - $seen = array(); // recursion guard - // loop through all the inclusions - for ($i = 0; isset($merge[$i]); $i++) { - if (isset($seen[$merge[$i]])) { - continue; - } - $seen[$merge[$i]] = true; - // foreach attribute of the inclusion, copy it over - if (!isset($this->info[$merge[$i]])) { - continue; - } - foreach ($this->info[$merge[$i]] as $key => $value) { - if (isset($attr[$key])) { - continue; - } // also catches more inclusions - $attr[$key] = $value; - } - if (isset($this->info[$merge[$i]][0])) { - // recursion - $merge = array_merge($merge, $this->info[$merge[$i]][0]); - } - } - unset($attr[0]); - } - - /** - * Expands all string identifiers in an attribute array by replacing - * them with the appropriate values inside HTMLPurifier_AttrTypes - * @param array &$attr Reference to attribute array - * @param HTMLPurifier_AttrTypes $attr_types HTMLPurifier_AttrTypes instance - */ - public function expandIdentifiers(&$attr, $attr_types) - { - // because foreach will process new elements we add, make sure we - // skip duplicates - $processed = array(); - - foreach ($attr as $def_i => $def) { - // skip inclusions - if ($def_i === 0) { - continue; - } - - if (isset($processed[$def_i])) { - continue; - } - - // determine whether or not attribute is required - if ($required = (strpos($def_i, '*') !== false)) { - // rename the definition - unset($attr[$def_i]); - $def_i = trim($def_i, '*'); - $attr[$def_i] = $def; - } - - $processed[$def_i] = true; - - // if we've already got a literal object, move on - if (is_object($def)) { - // preserve previous required - $attr[$def_i]->required = ($required || $attr[$def_i]->required); - continue; - } - - if ($def === false) { - unset($attr[$def_i]); - continue; - } - - if ($t = $attr_types->get($def)) { - $attr[$def_i] = $t; - $attr[$def_i]->required = $required; - } else { - unset($attr[$def_i]); - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php deleted file mode 100644 index 739646fa..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php +++ /dev/null @@ -1,144 +0,0 @@ - by removing - * leading and trailing whitespace, ignoring line feeds, and replacing - * carriage returns and tabs with spaces. While most useful for HTML - * attributes specified as CDATA, it can also be applied to most CSS - * values. - * - * @note This method is not entirely standards compliant, as trim() removes - * more types of whitespace than specified in the spec. In practice, - * this is rarely a problem, as those extra characters usually have - * already been removed by HTMLPurifier_Encoder. - * - * @warning This processing is inconsistent with XML's whitespace handling - * as specified by section 3.3.3 and referenced XHTML 1.0 section - * 4.7. However, note that we are NOT necessarily - * parsing XML, thus, this behavior may still be correct. We - * assume that newlines have been normalized. - */ - public function parseCDATA($string) - { - $string = trim($string); - $string = str_replace(array("\n", "\t", "\r"), ' ', $string); - return $string; - } - - /** - * Factory method for creating this class from a string. - * @param string $string String construction info - * @return HTMLPurifier_AttrDef Created AttrDef object corresponding to $string - */ - public function make($string) - { - // default implementation, return a flyweight of this object. - // If $string has an effect on the returned object (i.e. you - // need to overload this method), it is best - // to clone or instantiate new copies. (Instantiation is safer.) - return $this; - } - - /** - * Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work - * properly. THIS IS A HACK! - * @param string $string a CSS colour definition - * @return string - */ - protected function mungeRgb($string) - { - $p = '\s*(\d+(\.\d+)?([%]?))\s*'; - - if (preg_match('/(rgba|hsla)\(/', $string)) { - return preg_replace('/(rgba|hsla)\('.$p.','.$p.','.$p.','.$p.'\)/', '\1(\2,\5,\8,\11)', $string); - } - - return preg_replace('/(rgb|hsl)\('.$p.','.$p.','.$p.'\)/', '\1(\2,\5,\8)', $string); - } - - /** - * Parses a possibly escaped CSS string and returns the "pure" - * version of it. - */ - protected function expandCSSEscape($string) - { - // flexibly parse it - $ret = ''; - for ($i = 0, $c = strlen($string); $i < $c; $i++) { - if ($string[$i] === '\\') { - $i++; - if ($i >= $c) { - $ret .= '\\'; - break; - } - if (ctype_xdigit($string[$i])) { - $code = $string[$i]; - for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) { - if (!ctype_xdigit($string[$i])) { - break; - } - $code .= $string[$i]; - } - // We have to be extremely careful when adding - // new characters, to make sure we're not breaking - // the encoding. - $char = HTMLPurifier_Encoder::unichr(hexdec($code)); - if (HTMLPurifier_Encoder::cleanUTF8($char) === '') { - continue; - } - $ret .= $char; - if ($i < $c && trim($string[$i]) !== '') { - $i--; - } - continue; - } - if ($string[$i] === "\n") { - continue; - } - } - $ret .= $string[$i]; - } - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php deleted file mode 100644 index af6b8a05..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php +++ /dev/null @@ -1,140 +0,0 @@ -parseCDATA($css); - - $definition = $config->getCSSDefinition(); - $allow_duplicates = $config->get("CSS.AllowDuplicates"); - - $universal_attrdef = new HTMLPurifier_AttrDef_Enum( - array( - 'initial', - 'inherit', - 'unset', - ) - ); - - // According to the CSS2.1 spec, the places where a - // non-delimiting semicolon can appear are in strings - // escape sequences. So here is some dumb hack to - // handle quotes. - $len = strlen($css); - $accum = ""; - $declarations = array(); - $quoted = false; - for ($i = 0; $i < $len; $i++) { - $c = strcspn($css, ";'\"", $i); - $accum .= substr($css, $i, $c); - $i += $c; - if ($i == $len) break; - $d = $css[$i]; - if ($quoted) { - $accum .= $d; - if ($d == $quoted) { - $quoted = false; - } - } else { - if ($d == ";") { - $declarations[] = $accum; - $accum = ""; - } else { - $accum .= $d; - $quoted = $d; - } - } - } - if ($accum != "") $declarations[] = $accum; - - $propvalues = array(); - $new_declarations = ''; - - /** - * Name of the current CSS property being validated. - */ - $property = false; - $context->register('CurrentCSSProperty', $property); - - foreach ($declarations as $declaration) { - if (!$declaration) { - continue; - } - if (!strpos($declaration, ':')) { - continue; - } - list($property, $value) = explode(':', $declaration, 2); - $property = trim($property); - $value = trim($value); - $ok = false; - do { - if (isset($definition->info[$property])) { - $ok = true; - break; - } - if (ctype_lower($property)) { - break; - } - $property = strtolower($property); - if (isset($definition->info[$property])) { - $ok = true; - break; - } - } while (0); - if (!$ok) { - continue; - } - $result = $universal_attrdef->validate($value, $config, $context); - if ($result === false) { - $result = $definition->info[$property]->validate( - $value, - $config, - $context - ); - } - if ($result === false) { - continue; - } - if ($allow_duplicates) { - $new_declarations .= "$property:$result;"; - } else { - $propvalues[$property] = $result; - } - } - - $context->destroy('CurrentCSSProperty'); - - // procedure does not write the new CSS simultaneously, so it's - // slightly inefficient, but it's the only way of getting rid of - // duplicates. Perhaps config to optimize it, but not now. - - foreach ($propvalues as $prop => $value) { - $new_declarations .= "$prop:$value;"; - } - - return $new_declarations ? $new_declarations : false; - - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php deleted file mode 100644 index af2b83df..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/AlphaValue.php +++ /dev/null @@ -1,34 +0,0 @@ - 1.0) { - $result = '1'; - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php deleted file mode 100644 index 28c49883..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Background.php +++ /dev/null @@ -1,113 +0,0 @@ -getCSSDefinition(); - $this->info['background-color'] = $def->info['background-color']; - $this->info['background-image'] = $def->info['background-image']; - $this->info['background-repeat'] = $def->info['background-repeat']; - $this->info['background-attachment'] = $def->info['background-attachment']; - $this->info['background-position'] = $def->info['background-position']; - $this->info['background-size'] = $def->info['background-size']; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') { - return false; - } - - // munge rgb() decl if necessary - $string = $this->mungeRgb($string); - - // assumes URI doesn't have spaces in it - $bits = explode(' ', $string); // bits to process - - $caught = array(); - $caught['color'] = false; - $caught['image'] = false; - $caught['repeat'] = false; - $caught['attachment'] = false; - $caught['position'] = false; - $caught['size'] = false; - - $i = 0; // number of catches - - foreach ($bits as $bit) { - if ($bit === '') { - continue; - } - foreach ($caught as $key => $status) { - if ($key != 'position') { - if ($status !== false) { - continue; - } - $r = $this->info['background-' . $key]->validate($bit, $config, $context); - } else { - $r = $bit; - } - if ($r === false) { - continue; - } - if ($key == 'position') { - if ($caught[$key] === false) { - $caught[$key] = ''; - } - $caught[$key] .= $r . ' '; - } else { - $caught[$key] = $r; - } - $i++; - break; - } - } - - if (!$i) { - return false; - } - if ($caught['position'] !== false) { - $caught['position'] = $this->info['background-position']-> - validate($caught['position'], $config, $context); - } - - $ret = array(); - foreach ($caught as $value) { - if ($value === false) { - continue; - } - $ret[] = $value; - } - - if (empty($ret)) { - return false; - } - return implode(' ', $ret); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php deleted file mode 100644 index 4580ef5a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php +++ /dev/null @@ -1,157 +0,0 @@ - | | left | center | right - ] - [ - | | top | center | bottom - ]? - ] | - [ // this signifies that the vertical and horizontal adjectives - // can be arbitrarily ordered, however, there can only be two, - // one of each, or none at all - [ - left | center | right - ] || - [ - top | center | bottom - ] - ] - top, left = 0% - center, (none) = 50% - bottom, right = 100% -*/ - -/* QuirksMode says: - keyword + length/percentage must be ordered correctly, as per W3C - - Internet Explorer and Opera, however, support arbitrary ordering. We - should fix it up. - - Minor issue though, not strictly necessary. -*/ - -// control freaks may appreciate the ability to convert these to -// percentages or something, but it's not necessary - -/** - * Validates the value of background-position. - */ -class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_AttrDef -{ - - /** - * @type HTMLPurifier_AttrDef_CSS_Length - */ - protected $length; - - /** - * @type HTMLPurifier_AttrDef_CSS_Percentage - */ - protected $percentage; - - public function __construct() - { - $this->length = new HTMLPurifier_AttrDef_CSS_Length(); - $this->percentage = new HTMLPurifier_AttrDef_CSS_Percentage(); - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = $this->parseCDATA($string); - $bits = explode(' ', $string); - - $keywords = array(); - $keywords['h'] = false; // left, right - $keywords['v'] = false; // top, bottom - $keywords['ch'] = false; // center (first word) - $keywords['cv'] = false; // center (second word) - $measures = array(); - - $i = 0; - - $lookup = array( - 'top' => 'v', - 'bottom' => 'v', - 'left' => 'h', - 'right' => 'h', - 'center' => 'c' - ); - - foreach ($bits as $bit) { - if ($bit === '') { - continue; - } - - // test for keyword - $lbit = ctype_lower($bit) ? $bit : strtolower($bit); - if (isset($lookup[$lbit])) { - $status = $lookup[$lbit]; - if ($status == 'c') { - if ($i == 0) { - $status = 'ch'; - } else { - $status = 'cv'; - } - } - $keywords[$status] = $lbit; - $i++; - } - - // test for length - $r = $this->length->validate($bit, $config, $context); - if ($r !== false) { - $measures[] = $r; - $i++; - } - - // test for percentage - $r = $this->percentage->validate($bit, $config, $context); - if ($r !== false) { - $measures[] = $r; - $i++; - } - } - - if (!$i) { - return false; - } // no valid values were caught - - $ret = array(); - - // first keyword - if ($keywords['h']) { - $ret[] = $keywords['h']; - } elseif ($keywords['ch']) { - $ret[] = $keywords['ch']; - $keywords['cv'] = false; // prevent re-use: center = center center - } elseif (count($measures)) { - $ret[] = array_shift($measures); - } - - if ($keywords['v']) { - $ret[] = $keywords['v']; - } elseif ($keywords['cv']) { - $ret[] = $keywords['cv']; - } elseif (count($measures)) { - $ret[] = array_shift($measures); - } - - if (empty($ret)) { - return false; - } - return implode(' ', $ret); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php deleted file mode 100644 index 16243ba1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Border.php +++ /dev/null @@ -1,56 +0,0 @@ -getCSSDefinition(); - $this->info['border-width'] = $def->info['border-width']; - $this->info['border-style'] = $def->info['border-style']; - $this->info['border-top-color'] = $def->info['border-top-color']; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = $this->parseCDATA($string); - $string = $this->mungeRgb($string); - $bits = explode(' ', $string); - $done = array(); // segments we've finished - $ret = ''; // return value - foreach ($bits as $bit) { - foreach ($this->info as $propname => $validator) { - if (isset($done[$propname])) { - continue; - } - $r = $validator->validate($bit, $config, $context); - if ($r !== false) { - $ret .= $r . ' '; - $done[$propname] = true; - break; - } - } - } - return rtrim($ret); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php deleted file mode 100644 index d7287a00..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Color.php +++ /dev/null @@ -1,161 +0,0 @@ -alpha = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - } - - /** - * @param string $color - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($color, $config, $context) - { - static $colors = null; - if ($colors === null) { - $colors = $config->get('Core.ColorKeywords'); - } - - $color = trim($color); - if ($color === '') { - return false; - } - - $lower = strtolower($color); - if (isset($colors[$lower])) { - return $colors[$lower]; - } - - if (preg_match('#(rgb|rgba|hsl|hsla)\(#', $color, $matches) === 1) { - $length = strlen($color); - if (strpos($color, ')') !== $length - 1) { - return false; - } - - // get used function : rgb, rgba, hsl or hsla - $function = $matches[1]; - - $parameters_size = 3; - $alpha_channel = false; - if (substr($function, -1) === 'a') { - $parameters_size = 4; - $alpha_channel = true; - } - - /* - * Allowed types for values : - * parameter_position => [type => max_value] - */ - $allowed_types = array( - 1 => array('percentage' => 100, 'integer' => 255), - 2 => array('percentage' => 100, 'integer' => 255), - 3 => array('percentage' => 100, 'integer' => 255), - ); - $allow_different_types = false; - - if (strpos($function, 'hsl') !== false) { - $allowed_types = array( - 1 => array('integer' => 360), - 2 => array('percentage' => 100), - 3 => array('percentage' => 100), - ); - $allow_different_types = true; - } - - $values = trim(str_replace($function, '', $color), ' ()'); - - $parts = explode(',', $values); - if (count($parts) !== $parameters_size) { - return false; - } - - $type = false; - $new_parts = array(); - $i = 0; - - foreach ($parts as $part) { - $i++; - $part = trim($part); - - if ($part === '') { - return false; - } - - // different check for alpha channel - if ($alpha_channel === true && $i === count($parts)) { - $result = $this->alpha->validate($part, $config, $context); - - if ($result === false) { - return false; - } - - $new_parts[] = (string)$result; - continue; - } - - if (substr($part, -1) === '%') { - $current_type = 'percentage'; - } else { - $current_type = 'integer'; - } - - if (!array_key_exists($current_type, $allowed_types[$i])) { - return false; - } - - if (!$type) { - $type = $current_type; - } - - if ($allow_different_types === false && $type != $current_type) { - return false; - } - - $max_value = $allowed_types[$i][$current_type]; - - if ($current_type == 'integer') { - // Return value between range 0 -> $max_value - $new_parts[] = (int)max(min($part, $max_value), 0); - } elseif ($current_type == 'percentage') { - $new_parts[] = (float)max(min(rtrim($part, '%'), $max_value), 0) . '%'; - } - } - - $new_values = implode(',', $new_parts); - - $color = $function . '(' . $new_values . ')'; - } else { - // hexadecimal handling - if ($color[0] === '#') { - $hex = substr($color, 1); - } else { - $hex = $color; - $color = '#' . $color; - } - $length = strlen($hex); - if ($length !== 3 && $length !== 6) { - return false; - } - if (!ctype_xdigit($hex)) { - return false; - } - } - return $color; - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php deleted file mode 100644 index 9c175055..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Composite.php +++ /dev/null @@ -1,48 +0,0 @@ -defs = $defs; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - foreach ($this->defs as $i => $def) { - $result = $this->defs[$i]->validate($string, $config, $context); - if ($result !== false) { - return $result; - } - } - return false; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php deleted file mode 100644 index 9d77cc9a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php +++ /dev/null @@ -1,44 +0,0 @@ -def = $def; - $this->element = $element; - } - - /** - * Checks if CurrentToken is set and equal to $this->element - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $token = $context->get('CurrentToken', true); - if ($token && $token->name == $this->element) { - return false; - } - return $this->def->validate($string, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php deleted file mode 100644 index bde4c330..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Filter.php +++ /dev/null @@ -1,77 +0,0 @@ -intValidator = new HTMLPurifier_AttrDef_Integer(); - } - - /** - * @param string $value - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($value, $config, $context) - { - $value = $this->parseCDATA($value); - if ($value === 'none') { - return $value; - } - // if we looped this we could support multiple filters - $function_length = strcspn($value, '('); - $function = trim(substr($value, 0, $function_length)); - if ($function !== 'alpha' && - $function !== 'Alpha' && - $function !== 'progid:DXImageTransform.Microsoft.Alpha' - ) { - return false; - } - $cursor = $function_length + 1; - $parameters_length = strcspn($value, ')', $cursor); - $parameters = substr($value, $cursor, $parameters_length); - $params = explode(',', $parameters); - $ret_params = array(); - $lookup = array(); - foreach ($params as $param) { - list($key, $value) = explode('=', $param); - $key = trim($key); - $value = trim($value); - if (isset($lookup[$key])) { - continue; - } - if ($key !== 'opacity') { - continue; - } - $value = $this->intValidator->validate($value, $config, $context); - if ($value === false) { - continue; - } - $int = (int)$value; - if ($int > 100) { - $value = '100'; - } - if ($int < 0) { - $value = '0'; - } - $ret_params[] = "$key=$value"; - $lookup[$key] = true; - } - $ret_parameters = implode(',', $ret_params); - $ret_function = "$function($ret_parameters)"; - return $ret_function; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php deleted file mode 100644 index 579b97ef..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Font.php +++ /dev/null @@ -1,176 +0,0 @@ -getCSSDefinition(); - $this->info['font-style'] = $def->info['font-style']; - $this->info['font-variant'] = $def->info['font-variant']; - $this->info['font-weight'] = $def->info['font-weight']; - $this->info['font-size'] = $def->info['font-size']; - $this->info['line-height'] = $def->info['line-height']; - $this->info['font-family'] = $def->info['font-family']; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - static $system_fonts = array( - 'caption' => true, - 'icon' => true, - 'menu' => true, - 'message-box' => true, - 'small-caption' => true, - 'status-bar' => true - ); - - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') { - return false; - } - - // check if it's one of the keywords - $lowercase_string = strtolower($string); - if (isset($system_fonts[$lowercase_string])) { - return $lowercase_string; - } - - $bits = explode(' ', $string); // bits to process - $stage = 0; // this indicates what we're looking for - $caught = array(); // which stage 0 properties have we caught? - $stage_1 = array('font-style', 'font-variant', 'font-weight'); - $final = ''; // output - - for ($i = 0, $size = count($bits); $i < $size; $i++) { - if ($bits[$i] === '') { - continue; - } - switch ($stage) { - case 0: // attempting to catch font-style, font-variant or font-weight - foreach ($stage_1 as $validator_name) { - if (isset($caught[$validator_name])) { - continue; - } - $r = $this->info[$validator_name]->validate( - $bits[$i], - $config, - $context - ); - if ($r !== false) { - $final .= $r . ' '; - $caught[$validator_name] = true; - break; - } - } - // all three caught, continue on - if (count($caught) >= 3) { - $stage = 1; - } - if ($r !== false) { - break; - } - case 1: // attempting to catch font-size and perhaps line-height - $found_slash = false; - if (strpos($bits[$i], '/') !== false) { - list($font_size, $line_height) = - explode('/', $bits[$i]); - if ($line_height === '') { - // ooh, there's a space after the slash! - $line_height = false; - $found_slash = true; - } - } else { - $font_size = $bits[$i]; - $line_height = false; - } - $r = $this->info['font-size']->validate( - $font_size, - $config, - $context - ); - if ($r !== false) { - $final .= $r; - // attempt to catch line-height - if ($line_height === false) { - // we need to scroll forward - for ($j = $i + 1; $j < $size; $j++) { - if ($bits[$j] === '') { - continue; - } - if ($bits[$j] === '/') { - if ($found_slash) { - return false; - } else { - $found_slash = true; - continue; - } - } - $line_height = $bits[$j]; - break; - } - } else { - // slash already found - $found_slash = true; - $j = $i; - } - if ($found_slash) { - $i = $j; - $r = $this->info['line-height']->validate( - $line_height, - $config, - $context - ); - if ($r !== false) { - $final .= '/' . $r; - } - } - $final .= ' '; - $stage = 2; - break; - } - return false; - case 2: // attempting to catch font-family - $font_family = - implode(' ', array_slice($bits, $i, $size - $i)); - $r = $this->info['font-family']->validate( - $font_family, - $config, - $context - ); - if ($r !== false) { - $final .= $r . ' '; - // processing completed successfully - return rtrim($final); - } - return false; - } - } - return false; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php deleted file mode 100644 index f1ff1163..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/FontFamily.php +++ /dev/null @@ -1,217 +0,0 @@ -mask = array_reduce($c, function ($carry, $value) { - return $carry . $value; - }, '_- '); - - /* - PHP's internal strcspn implementation is - O(length of string * length of mask), making it inefficient - for large masks. However, it's still faster than - preg_match 8) - for (p = s1;;) { - spanp = s2; - do { - if (*spanp == c || p == s1_end) { - return p - s1; - } - } while (spanp++ < (s2_end - 1)); - c = *++p; - } - */ - // possible optimization: invert the mask. - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - static $generic_names = array( - 'serif' => true, - 'sans-serif' => true, - 'monospace' => true, - 'fantasy' => true, - 'cursive' => true - ); - $allowed_fonts = $config->get('CSS.AllowedFonts'); - - // assume that no font names contain commas in them - $fonts = explode(',', $string); - $final = ''; - foreach ($fonts as $font) { - $font = trim($font); - if ($font === '') { - continue; - } - // match a generic name - if (isset($generic_names[$font])) { - if ($allowed_fonts === null || isset($allowed_fonts[$font])) { - $final .= $font . ', '; - } - continue; - } - // match a quoted name - if ($font[0] === '"' || $font[0] === "'") { - $length = strlen($font); - if ($length <= 2) { - continue; - } - $quote = $font[0]; - if ($font[$length - 1] !== $quote) { - continue; - } - $font = substr($font, 1, $length - 2); - } - - $font = $this->expandCSSEscape($font); - - // $font is a pure representation of the font name - - if ($allowed_fonts !== null && !isset($allowed_fonts[$font])) { - continue; - } - - if (ctype_alnum($font) && $font !== '') { - // very simple font, allow it in unharmed - $final .= $font . ', '; - continue; - } - - // bugger out on whitespace. form feed (0C) really - // shouldn't show up regardless - $font = str_replace(array("\n", "\t", "\r", "\x0C"), ' ', $font); - - // Here, there are various classes of characters which need - // to be treated differently: - // - Alphanumeric characters are essentially safe. We - // handled these above. - // - Spaces require quoting, though most parsers will do - // the right thing if there aren't any characters that - // can be misinterpreted - // - Dashes rarely occur, but they fairly unproblematic - // for parsing/rendering purposes. - // The above characters cover the majority of Western font - // names. - // - Arbitrary Unicode characters not in ASCII. Because - // most parsers give little thought to Unicode, treatment - // of these codepoints is basically uniform, even for - // punctuation-like codepoints. These characters can - // show up in non-Western pages and are supported by most - // major browsers, for example: "MS 明朝" is a - // legitimate font-name - // . See - // the CSS3 spec for more examples: - // - // You can see live samples of these on the Internet: - // - // However, most of these fonts have ASCII equivalents: - // for example, 'MS Mincho', and it's considered - // professional to use ASCII font names instead of - // Unicode font names. Thanks Takeshi Terada for - // providing this information. - // The following characters, to my knowledge, have not been - // used to name font names. - // - Single quote. While theoretically you might find a - // font name that has a single quote in its name (serving - // as an apostrophe, e.g. Dave's Scribble), I haven't - // been able to find any actual examples of this. - // Internet Explorer's cssText translation (which I - // believe is invoked by innerHTML) normalizes any - // quoting to single quotes, and fails to escape single - // quotes. (Note that this is not IE's behavior for all - // CSS properties, just some sort of special casing for - // font-family). So a single quote *cannot* be used - // safely in the font-family context if there will be an - // innerHTML/cssText translation. Note that Firefox 3.x - // does this too. - // - Double quote. In IE, these get normalized to - // single-quotes, no matter what the encoding. (Fun - // fact, in IE8, the 'content' CSS property gained - // support, where they special cased to preserve encoded - // double quotes, but still translate unadorned double - // quotes into single quotes.) So, because their - // fixpoint behavior is identical to single quotes, they - // cannot be allowed either. Firefox 3.x displays - // single-quote style behavior. - // - Backslashes are reduced by one (so \\ -> \) every - // iteration, so they cannot be used safely. This shows - // up in IE7, IE8 and FF3 - // - Semicolons, commas and backticks are handled properly. - // - The rest of the ASCII punctuation is handled properly. - // We haven't checked what browsers do to unadorned - // versions, but this is not important as long as the - // browser doesn't /remove/ surrounding quotes (as IE does - // for HTML). - // - // With these results in hand, we conclude that there are - // various levels of safety: - // - Paranoid: alphanumeric, spaces and dashes(?) - // - International: Paranoid + non-ASCII Unicode - // - Edgy: Everything except quotes, backslashes - // - NoJS: Standards compliance, e.g. sod IE. Note that - // with some judicious character escaping (since certain - // types of escaping doesn't work) this is theoretically - // OK as long as innerHTML/cssText is not called. - // We believe that international is a reasonable default - // (that we will implement now), and once we do more - // extensive research, we may feel comfortable with dropping - // it down to edgy. - - // Edgy: alphanumeric, spaces, dashes, underscores and Unicode. Use of - // str(c)spn assumes that the string was already well formed - // Unicode (which of course it is). - if (strspn($font, $this->mask) !== strlen($font)) { - continue; - } - - // Historical: - // In the absence of innerHTML/cssText, these ugly - // transforms don't pose a security risk (as \\ and \" - // might--these escapes are not supported by most browsers). - // We could try to be clever and use single-quote wrapping - // when there is a double quote present, but I have choosen - // not to implement that. (NOTE: you can reduce the amount - // of escapes by one depending on what quoting style you use) - // $font = str_replace('\\', '\\5C ', $font); - // $font = str_replace('"', '\\22 ', $font); - // $font = str_replace("'", '\\27 ', $font); - - // font possibly with spaces, requires quoting - $final .= "'$font', "; - } - $final = rtrim($final, ', '); - if ($final === '') { - return false; - } - return $final; - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php deleted file mode 100644 index 973002c1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php +++ /dev/null @@ -1,32 +0,0 @@ -def = $def; - $this->allow = $allow; - } - - /** - * Intercepts and removes !important if necessary - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - // test for ! and important tokens - $string = trim($string); - $is_important = false; - // :TODO: optimization: test directly for !important and ! important - if (strlen($string) >= 9 && substr($string, -9) === 'important') { - $temp = rtrim(substr($string, 0, -9)); - // use a temp, because we might want to restore important - if (strlen($temp) >= 1 && substr($temp, -1) === '!') { - $string = rtrim(substr($temp, 0, -1)); - $is_important = true; - } - } - $string = $this->def->validate($string, $config, $context); - if ($this->allow && $is_important) { - $string .= ' !important'; - } - return $string; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php deleted file mode 100644 index f12453a0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Length.php +++ /dev/null @@ -1,77 +0,0 @@ -min = $min !== null ? HTMLPurifier_Length::make($min) : null; - $this->max = $max !== null ? HTMLPurifier_Length::make($max) : null; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = $this->parseCDATA($string); - - // Optimizations - if ($string === '') { - return false; - } - if ($string === '0') { - return '0'; - } - if (strlen($string) === 1) { - return false; - } - - $length = HTMLPurifier_Length::make($string); - if (!$length->isValid()) { - return false; - } - - if ($this->min) { - $c = $length->compareTo($this->min); - if ($c === false) { - return false; - } - if ($c < 0) { - return false; - } - } - if ($this->max) { - $c = $length->compareTo($this->max); - if ($c === false) { - return false; - } - if ($c > 0) { - return false; - } - } - return $length->toString(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php deleted file mode 100644 index e74d4265..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/ListStyle.php +++ /dev/null @@ -1,112 +0,0 @@ -getCSSDefinition(); - $this->info['list-style-type'] = $def->info['list-style-type']; - $this->info['list-style-position'] = $def->info['list-style-position']; - $this->info['list-style-image'] = $def->info['list-style-image']; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - // regular pre-processing - $string = $this->parseCDATA($string); - if ($string === '') { - return false; - } - - // assumes URI doesn't have spaces in it - $bits = explode(' ', strtolower($string)); // bits to process - - $caught = array(); - $caught['type'] = false; - $caught['position'] = false; - $caught['image'] = false; - - $i = 0; // number of catches - $none = false; - - foreach ($bits as $bit) { - if ($i >= 3) { - return; - } // optimization bit - if ($bit === '') { - continue; - } - foreach ($caught as $key => $status) { - if ($status !== false) { - continue; - } - $r = $this->info['list-style-' . $key]->validate($bit, $config, $context); - if ($r === false) { - continue; - } - if ($r === 'none') { - if ($none) { - continue; - } else { - $none = true; - } - if ($key == 'image') { - continue; - } - } - $caught[$key] = $r; - $i++; - break; - } - } - - if (!$i) { - return false; - } - - $ret = array(); - - // construct type - if ($caught['type']) { - $ret[] = $caught['type']; - } - - // construct image - if ($caught['image']) { - $ret[] = $caught['image']; - } - - // construct position - if ($caught['position']) { - $ret[] = $caught['position']; - } - - if (empty($ret)) { - return false; - } - return implode(' ', $ret); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php deleted file mode 100644 index e707f871..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Multiple.php +++ /dev/null @@ -1,71 +0,0 @@ -single = $single; - $this->max = $max; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = $this->mungeRgb($this->parseCDATA($string)); - if ($string === '') { - return false; - } - $parts = explode(' ', $string); // parseCDATA replaced \r, \t and \n - $length = count($parts); - $final = ''; - for ($i = 0, $num = 0; $i < $length && $num < $this->max; $i++) { - if (ctype_space($parts[$i])) { - continue; - } - $result = $this->single->validate($parts[$i], $config, $context); - if ($result !== false) { - $final .= $result . ' '; - $num++; - } - } - if ($final === '') { - return false; - } - return rtrim($final); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php deleted file mode 100644 index ef49d20f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Number.php +++ /dev/null @@ -1,90 +0,0 @@ -non_negative = $non_negative; - } - - /** - * @param string $number - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string|bool - * @warning Some contexts do not pass $config, $context. These - * variables should not be used without checking HTMLPurifier_Length - */ - public function validate($number, $config, $context) - { - $number = $this->parseCDATA($number); - - if ($number === '') { - return false; - } - if ($number === '0') { - return '0'; - } - - $sign = ''; - switch ($number[0]) { - case '-': - if ($this->non_negative) { - return false; - } - $sign = '-'; - case '+': - $number = substr($number, 1); - } - - if (ctype_digit($number)) { - $number = ltrim($number, '0'); - return $number ? $sign . $number : '0'; - } - - // Period is the only non-numeric character allowed - if (strpos($number, '.') === false) { - return false; - } - - list($left, $right) = explode('.', $number, 2); - - if ($left === '' && $right === '') { - return false; - } - if ($left !== '' && !ctype_digit($left)) { - return false; - } - - // Remove leading zeros until positive number or a zero stays left - if (ltrim($left, '0') != '') { - $left = ltrim($left, '0'); - } else { - $left = '0'; - } - - $right = rtrim($right, '0'); - - if ($right === '') { - return $left ? $sign . $left : '0'; - } elseif (!ctype_digit($right)) { - return false; - } - return $sign . $left . '.' . $right; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php deleted file mode 100644 index f0f25c50..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Percentage.php +++ /dev/null @@ -1,54 +0,0 @@ -number_def = new HTMLPurifier_AttrDef_CSS_Number($non_negative); - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = $this->parseCDATA($string); - - if ($string === '') { - return false; - } - $length = strlen($string); - if ($length === 1) { - return false; - } - if ($string[$length - 1] !== '%') { - return false; - } - - $number = substr($string, 0, $length - 1); - $number = $this->number_def->validate($number, $config, $context); - - if ($number === false) { - return false; - } - return "$number%"; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ratio.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ratio.php deleted file mode 100644 index e08e2c49..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ratio.php +++ /dev/null @@ -1,46 +0,0 @@ -parseCDATA($ratio); - - $parts = explode('/', $ratio, 2); - $length = count($parts); - - if ($length < 1 || $length > 2) { - return false; - } - - $num = new \HTMLPurifier_AttrDef_CSS_Number(); - - if ($length === 1) { - return $num->validate($parts[0], $config, $context); - } - - $num1 = $num->validate($parts[0], $config, $context); - $num2 = $num->validate($parts[1], $config, $context); - - if ($num1 === false || $num2 === false) { - return false; - } - - return $num1 . '/' . $num2; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php deleted file mode 100644 index 5fd4b7f7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/TextDecoration.php +++ /dev/null @@ -1,46 +0,0 @@ - true, - 'overline' => true, - 'underline' => true, - ); - - $string = strtolower($this->parseCDATA($string)); - - if ($string === 'none') { - return $string; - } - - $parts = explode(' ', $string); - $final = ''; - foreach ($parts as $part) { - if (isset($allowed_values[$part])) { - $final .= $part . ' '; - } - } - $final = rtrim($final); - if ($final === '') { - return false; - } - return $final; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php deleted file mode 100644 index 6617acac..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php +++ /dev/null @@ -1,77 +0,0 @@ -parseCDATA($uri_string); - if (strpos($uri_string, 'url(') !== 0) { - return false; - } - $uri_string = substr($uri_string, 4); - if (strlen($uri_string) == 0) { - return false; - } - $new_length = strlen($uri_string) - 1; - if ($uri_string[$new_length] != ')') { - return false; - } - $uri = trim(substr($uri_string, 0, $new_length)); - - if (!empty($uri) && ($uri[0] == "'" || $uri[0] == '"')) { - $quote = $uri[0]; - $new_length = strlen($uri) - 1; - if ($uri[$new_length] !== $quote) { - return false; - } - $uri = substr($uri, 1, $new_length - 1); - } - - $uri = $this->expandCSSEscape($uri); - - $result = parent::validate($uri, $config, $context); - - if ($result === false) { - return false; - } - - // extra sanity check; should have been done by URI - $result = str_replace(array('"', "\\", "\n", "\x0c", "\r"), "", $result); - - // suspicious characters are ()'; we're going to percent encode - // them for safety. - $result = str_replace(array('(', ')', "'"), array('%28', '%29', '%27'), $result); - - // there's an extra bug where ampersands lose their escaping on - // an innerHTML cycle, so a very unlucky query parameter could - // then change the meaning of the URL. Unfortunately, there's - // not much we can do about that... - return "url(\"$result\")"; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php deleted file mode 100644 index 6698a00c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php +++ /dev/null @@ -1,44 +0,0 @@ -clone = $clone; - } - - /** - * @param string $v - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($v, $config, $context) - { - return $this->clone->validate($v, $config, $context); - } - - /** - * @param string $string - * @return HTMLPurifier_AttrDef - */ - public function make($string) - { - return clone $this->clone; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php deleted file mode 100644 index 8abda7f6..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php +++ /dev/null @@ -1,73 +0,0 @@ -valid_values = array_flip($valid_values); - $this->case_sensitive = $case_sensitive; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = trim($string); - if (!$this->case_sensitive) { - // we may want to do full case-insensitive libraries - $string = ctype_lower($string) ? $string : strtolower($string); - } - $result = isset($this->valid_values[$string]); - - return $result ? $string : false; - } - - /** - * @param string $string In form of comma-delimited list of case-insensitive - * valid values. Example: "foo,bar,baz". Prepend "s:" to make - * case sensitive - * @return HTMLPurifier_AttrDef_Enum - */ - public function make($string) - { - if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') { - $string = substr($string, 2); - $sensitive = true; - } else { - $sensitive = false; - } - $values = explode(',', $string); - return new HTMLPurifier_AttrDef_Enum($values, $sensitive); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php deleted file mode 100644 index be3bbc8d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Bool.php +++ /dev/null @@ -1,48 +0,0 @@ -name = $name; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - return $this->name; - } - - /** - * @param string $string Name of attribute - * @return HTMLPurifier_AttrDef_HTML_Bool - */ - public function make($string) - { - return new HTMLPurifier_AttrDef_HTML_Bool($string); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php deleted file mode 100644 index d5013488..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php +++ /dev/null @@ -1,48 +0,0 @@ -getDefinition('HTML')->doctype->name; - if ($name == "XHTML 1.1" || $name == "XHTML 2.0") { - return parent::split($string, $config, $context); - } else { - return preg_split('/\s+/', $string); - } - } - - /** - * @param array $tokens - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - protected function filter($tokens, $config, $context) - { - $allowed = $config->get('Attr.AllowedClasses'); - $forbidden = $config->get('Attr.ForbiddenClasses'); - $ret = array(); - foreach ($tokens as $token) { - if (($allowed === null || isset($allowed[$token])) && - !isset($forbidden[$token]) && - // We need this O(n) check because of PHP's array - // implementation that casts -0 to 0. - !in_array($token, $ret, true) - ) { - $ret[] = $token; - } - } - return $ret; - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php deleted file mode 100644 index 946ebb78..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php +++ /dev/null @@ -1,51 +0,0 @@ -get('Core.ColorKeywords'); - } - - $string = trim($string); - - if (empty($string)) { - return false; - } - $lower = strtolower($string); - if (isset($colors[$lower])) { - return $colors[$lower]; - } - if ($string[0] === '#') { - $hex = substr($string, 1); - } else { - $hex = $string; - } - - $length = strlen($hex); - if ($length !== 3 && $length !== 6) { - return false; - } - if (!ctype_xdigit($hex)) { - return false; - } - if ($length === 3) { - $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; - } - return "#$hex"; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php deleted file mode 100644 index 5b03d3e3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ContentEditable.php +++ /dev/null @@ -1,16 +0,0 @@ -get('HTML.Trusted')) { - $allowed = array('', 'true', 'false'); - } - - $enum = new HTMLPurifier_AttrDef_Enum($allowed); - - return $enum->validate($string, $config, $context); - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php deleted file mode 100644 index d79ba12b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/FrameTarget.php +++ /dev/null @@ -1,38 +0,0 @@ -valid_values === false) { - $this->valid_values = $config->get('Attr.AllowedFrameTargets'); - } - return parent::validate($string, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php deleted file mode 100644 index 4ba45610..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php +++ /dev/null @@ -1,113 +0,0 @@ -selector = $selector; - } - - /** - * @param string $id - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($id, $config, $context) - { - if (!$this->selector && !$config->get('Attr.EnableID')) { - return false; - } - - $id = trim($id); // trim it first - - if ($id === '') { - return false; - } - - $prefix = $config->get('Attr.IDPrefix'); - if ($prefix !== '') { - $prefix .= $config->get('Attr.IDPrefixLocal'); - // prevent re-appending the prefix - if (strpos($id, $prefix) !== 0) { - $id = $prefix . $id; - } - } elseif ($config->get('Attr.IDPrefixLocal') !== '') { - trigger_error( - '%Attr.IDPrefixLocal cannot be used unless ' . - '%Attr.IDPrefix is set', - E_USER_WARNING - ); - } - - if (!$this->selector) { - $id_accumulator =& $context->get('IDAccumulator'); - if (isset($id_accumulator->ids[$id])) { - return false; - } - } - - // we purposely avoid using regex, hopefully this is faster - - if ($config->get('Attr.ID.HTML5') === true) { - if (preg_match('/[\t\n\x0b\x0c ]/', $id)) { - return false; - } - } else { - if (ctype_alpha($id)) { - // OK - } else { - if (!ctype_alpha(@$id[0])) { - return false; - } - // primitive style of regexps, I suppose - $trim = trim( - $id, - 'A..Za..z0..9:-._' - ); - if ($trim !== '') { - return false; - } - } - } - - $regexp = $config->get('Attr.IDBlacklistRegexp'); - if ($regexp && preg_match($regexp, $id)) { - return false; - } - - if (!$this->selector) { - $id_accumulator->add($id); - } - - // if no change was made to the ID, return the result - // else, return the new id if stripping whitespace made it - // valid, or return false. - return $id; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php deleted file mode 100644 index 1c4006fb..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php +++ /dev/null @@ -1,56 +0,0 @@ - 100) { - return '100%'; - } - return ((string)$points) . '%'; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php deleted file mode 100644 index 63fa04c1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php +++ /dev/null @@ -1,72 +0,0 @@ - 'AllowedRel', - 'rev' => 'AllowedRev' - ); - if (!isset($configLookup[$name])) { - trigger_error( - 'Unrecognized attribute name for link ' . - 'relationship.', - E_USER_ERROR - ); - return; - } - $this->name = $configLookup[$name]; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $allowed = $config->get('Attr.' . $this->name); - if (empty($allowed)) { - return false; - } - - $string = $this->parseCDATA($string); - $parts = explode(' ', $string); - - // lookup to prevent duplicates - $ret_lookup = array(); - foreach ($parts as $part) { - $part = strtolower(trim($part)); - if (!isset($allowed[$part])) { - continue; - } - $ret_lookup[$part] = true; - } - - if (empty($ret_lookup)) { - return false; - } - $string = implode(' ', array_keys($ret_lookup)); - return $string; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php deleted file mode 100644 index bbb20f2f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php +++ /dev/null @@ -1,60 +0,0 @@ -split($string, $config, $context); - $tokens = $this->filter($tokens, $config, $context); - if (empty($tokens)) { - return false; - } - return implode(' ', $tokens); - } - - /** - * Splits a space separated list of tokens into its constituent parts. - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - protected function split($string, $config, $context) - { - // OPTIMIZABLE! - // do the preg_match, capture all subpatterns for reformulation - - // we don't support U+00A1 and up codepoints or - // escaping because I don't know how to do that with regexps - // and plus it would complicate optimization efforts (you never - // see that anyway). - $pattern = '/(?:(?<=\s)|\A)' . // look behind for space or string start - '((?:--|-?[A-Za-z_])[A-Za-z_\-0-9]*)' . - '(?:(?=\s)|\z)/'; // look ahead for space or string end - preg_match_all($pattern, $string, $matches); - return $matches[1]; - } - - /** - * Template method for removing certain tokens based on arbitrary criteria. - * @note If we wanted to be really functional, we'd do an array_filter - * with a callback. But... we're not. - * @param array $tokens - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - protected function filter($tokens, $config, $context) - { - return $tokens; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php deleted file mode 100644 index a1d019e0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Pixels.php +++ /dev/null @@ -1,76 +0,0 @@ -max = $max; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = trim($string); - if ($string === '0') { - return $string; - } - if ($string === '') { - return false; - } - $length = strlen($string); - if (substr($string, $length - 2) == 'px') { - $string = substr($string, 0, $length - 2); - } - if (!is_numeric($string)) { - return false; - } - $int = (int)$string; - - if ($int < 0) { - return '0'; - } - - // upper-bound value, extremely high values can - // crash operating systems, see - // WARNING, above link WILL crash you if you're using Windows - - if ($this->max !== null && $int > $this->max) { - return (string)$this->max; - } - return (string)$int; - } - - /** - * @param string $string - * @return HTMLPurifier_AttrDef - */ - public function make($string) - { - if ($string === '') { - $max = null; - } else { - $max = (int)$string; - } - $class = get_class($this); - return new $class($max); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php deleted file mode 100644 index 400e707d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Integer.php +++ /dev/null @@ -1,91 +0,0 @@ -negative = $negative; - $this->zero = $zero; - $this->positive = $positive; - } - - /** - * @param string $integer - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($integer, $config, $context) - { - $integer = $this->parseCDATA($integer); - if ($integer === '') { - return false; - } - - // we could possibly simply typecast it to integer, but there are - // certain fringe cases that must not return an integer. - - // clip leading sign - if ($this->negative && $integer[0] === '-') { - $digits = substr($integer, 1); - if ($digits === '0') { - $integer = '0'; - } // rm minus sign for zero - } elseif ($this->positive && $integer[0] === '+') { - $digits = $integer = substr($integer, 1); // rm unnecessary plus - } else { - $digits = $integer; - } - - // test if it's numeric - if (!ctype_digit($digits)) { - return false; - } - - // perform scope tests - if (!$this->zero && $integer == 0) { - return false; - } - if (!$this->positive && $integer > 0) { - return false; - } - if (!$this->negative && $integer < 0) { - return false; - } - - return $integer; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php deleted file mode 100644 index 2a55cea6..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Lang.php +++ /dev/null @@ -1,86 +0,0 @@ - 8 || !ctype_alnum($subtags[1])) { - return $new_string; - } - if (!ctype_lower($subtags[1])) { - $subtags[1] = strtolower($subtags[1]); - } - - $new_string .= '-' . $subtags[1]; - if ($num_subtags == 2) { - return $new_string; - } - - // process all other subtags, index 2 and up - for ($i = 2; $i < $num_subtags; $i++) { - $length = strlen($subtags[$i]); - if ($length == 0 || $length > 8 || !ctype_alnum($subtags[$i])) { - return $new_string; - } - if (!ctype_lower($subtags[$i])) { - $subtags[$i] = strtolower($subtags[$i]); - } - $new_string .= '-' . $subtags[$i]; - } - return $new_string; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php deleted file mode 100644 index c7eb3199..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Switch.php +++ /dev/null @@ -1,53 +0,0 @@ -tag = $tag; - $this->withTag = $with_tag; - $this->withoutTag = $without_tag; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $token = $context->get('CurrentToken', true); - if (!$token || $token->name !== $this->tag) { - return $this->withoutTag->validate($string, $config, $context); - } else { - return $this->withTag->validate($string, $config, $context); - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php deleted file mode 100644 index 4553a4ea..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Text.php +++ /dev/null @@ -1,21 +0,0 @@ -parseCDATA($string); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php deleted file mode 100644 index c1cd8977..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php +++ /dev/null @@ -1,111 +0,0 @@ -parser = new HTMLPurifier_URIParser(); - $this->embedsResource = (bool)$embeds_resource; - } - - /** - * @param string $string - * @return HTMLPurifier_AttrDef_URI - */ - public function make($string) - { - $embeds = ($string === 'embedded'); - return new HTMLPurifier_AttrDef_URI($embeds); - } - - /** - * @param string $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($uri, $config, $context) - { - if ($config->get('URI.Disable')) { - return false; - } - - $uri = $this->parseCDATA($uri); - - // parse the URI - $uri = $this->parser->parse($uri); - if ($uri === false) { - return false; - } - - // add embedded flag to context for validators - $context->register('EmbeddedURI', $this->embedsResource); - - $ok = false; - do { - - // generic validation - $result = $uri->validate($config, $context); - if (!$result) { - break; - } - - // chained filtering - $uri_def = $config->getDefinition('URI'); - $result = $uri_def->filter($uri, $config, $context); - if (!$result) { - break; - } - - // scheme-specific validation - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) { - break; - } - if ($this->embedsResource && !$scheme_obj->browsable) { - break; - } - $result = $scheme_obj->validate($uri, $config, $context); - if (!$result) { - break; - } - - // Post chained filtering - $result = $uri_def->postFilter($uri, $config, $context); - if (!$result) { - break; - } - - // survived gauntlet - $ok = true; - - } while (false); - - $context->destroy('EmbeddedURI'); - if (!$ok) { - return false; - } - // back to string - return $uri->toString(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php deleted file mode 100644 index daf32b76..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php +++ /dev/null @@ -1,20 +0,0 @@ -" - // that needs more percent encoding to be done - if ($string == '') { - return false; - } - $string = trim($string); - $result = preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $string); - return $result ? $string : false; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php deleted file mode 100644 index 17a97c1e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Host.php +++ /dev/null @@ -1,136 +0,0 @@ -ipv4 = new HTMLPurifier_AttrDef_URI_IPv4(); - $this->ipv6 = new HTMLPurifier_AttrDef_URI_IPv6(); - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $length = strlen($string); - // empty hostname is OK; it's usually semantically equivalent: - // the default host as defined by a URI scheme is used: - // - // If the URI scheme defines a default for host, then that - // default applies when the host subcomponent is undefined - // or when the registered name is empty (zero length). - if ($string === '') { - return ''; - } - if ($length > 1 && $string[0] === '[' && $string[$length - 1] === ']') { - //IPv6 - $ip = substr($string, 1, $length - 2); - $valid = $this->ipv6->validate($ip, $config, $context); - if ($valid === false) { - return false; - } - return '[' . $valid . ']'; - } - - // need to do checks on unusual encodings too - $ipv4 = $this->ipv4->validate($string, $config, $context); - if ($ipv4 !== false) { - return $ipv4; - } - - // A regular domain name. - - // This doesn't match I18N domain names, but we don't have proper IRI support, - // so force users to insert Punycode. - - // Underscores defined as Unreserved Characters in RFC 3986 are - // allowed in a URI. There are cases where we want to consider a - // URI containing "_" such as "_dmarc.example.com". - // Underscores are not allowed in the default. If you want to - // allow it, set Core.AllowHostnameUnderscore to true. - $underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : ''; - - // Based off of RFC 1738, but amended so that - // as per RFC 3696, the top label need only not be all numeric. - // The productions describing this are: - $a = '[a-z]'; // alpha - $an = "[a-z0-9$underscore]"; // alphanum - $and = "[a-z0-9-$underscore]"; // alphanum | "-" - // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum - $domainlabel = "$an(?:$and*$an)?"; - // AMENDED as per RFC 3696 - // toplabel = alphanum | alphanum *( alphanum | "-" ) alphanum - // side condition: not all numeric - $toplabel = "$an(?:$and*$an)?"; - // hostname = *( domainlabel "." ) toplabel [ "." ] - if (preg_match("/^(?:$domainlabel\.)*($toplabel)\.?$/i", $string, $matches)) { - if (!ctype_digit($matches[1])) { - return $string; - } - } - - // PHP 5.3 and later support this functionality natively - if (function_exists('idn_to_ascii')) { - if (defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46')) { - $string = idn_to_ascii($string, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46); - } else { - $string = idn_to_ascii($string); - } - - // If we have Net_IDNA2 support, we can support IRIs by - // punycoding them. (This is the most portable thing to do, - // since otherwise we have to assume browsers support - } elseif ($config->get('Core.EnableIDNA') && class_exists('Net_IDNA2')) { - $idna = new Net_IDNA2(array('encoding' => 'utf8', 'overlong' => false, 'strict' => true)); - // we need to encode each period separately - $parts = explode('.', $string); - try { - $new_parts = array(); - foreach ($parts as $part) { - $encodable = false; - for ($i = 0, $c = strlen($part); $i < $c; $i++) { - if (ord($part[$i]) > 0x7a) { - $encodable = true; - break; - } - } - if (!$encodable) { - $new_parts[] = $part; - } else { - $new_parts[] = $idna->encode($part); - } - } - $string = implode('.', $new_parts); - } catch (Exception $e) { - // XXX error reporting - } - } - // Try again - if (preg_match("/^($domainlabel\.)*$toplabel\.?$/i", $string)) { - return $string; - } - return false; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php deleted file mode 100644 index 30ac16c9..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php +++ /dev/null @@ -1,45 +0,0 @@ -ip4) { - $this->_loadRegex(); - } - - if (preg_match('#^' . $this->ip4 . '$#s', $aIP)) { - return $aIP; - } - return false; - } - - /** - * Lazy load function to prevent regex from being stuffed in - * cache. - */ - protected function _loadRegex() - { - $oct = '(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])'; // 0-255 - $this->ip4 = "(?:{$oct}\\.{$oct}\\.{$oct}\\.{$oct})"; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php deleted file mode 100644 index f243793e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php +++ /dev/null @@ -1,89 +0,0 @@ -ip4) { - $this->_loadRegex(); - } - - $original = $aIP; - - $hex = '[0-9a-fA-F]'; - $blk = '(?:' . $hex . '{1,4})'; - $pre = '(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))'; // /0 - /128 - - // prefix check - if (strpos($aIP, '/') !== false) { - if (preg_match('#' . $pre . '$#s', $aIP, $find)) { - $aIP = substr($aIP, 0, 0 - strlen($find[0])); - unset($find); - } else { - return false; - } - } - - // IPv4-compatiblity check - if (preg_match('#(?<=:' . ')' . $this->ip4 . '$#s', $aIP, $find)) { - $aIP = substr($aIP, 0, 0 - strlen($find[0])); - $ip = explode('.', $find[0]); - $ip = array_map('dechex', $ip); - $aIP .= $ip[0] . $ip[1] . ':' . $ip[2] . $ip[3]; - unset($find, $ip); - } - - // compression check - $aIP = explode('::', $aIP); - $c = count($aIP); - if ($c > 2) { - return false; - } elseif ($c == 2) { - list($first, $second) = $aIP; - $first = explode(':', $first); - $second = explode(':', $second); - - if (count($first) + count($second) > 8) { - return false; - } - - while (count($first) < 8) { - array_push($first, '0'); - } - - array_splice($first, 8 - count($second), 8, $second); - $aIP = $first; - unset($first, $second); - } else { - $aIP = explode(':', $aIP[0]); - } - $c = count($aIP); - - if ($c != 8) { - return false; - } - - // All the pieces should be 16-bit hex strings. Are they? - foreach ($aIP as $piece) { - if (!preg_match('#^[0-9a-fA-F]{4}$#s', sprintf('%04s', $piece))) { - return false; - } - } - return $original; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php deleted file mode 100644 index b428331f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform.php +++ /dev/null @@ -1,60 +0,0 @@ -confiscateAttr($attr, 'background'); - // some validation should happen here - - $this->prependCSS($attr, "background-image:url($background);"); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php deleted file mode 100644 index d66c04a5..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php +++ /dev/null @@ -1,27 +0,0 @@ -get('Attr.DefaultTextDir'); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php deleted file mode 100644 index 0f51fd2c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php +++ /dev/null @@ -1,28 +0,0 @@ -confiscateAttr($attr, 'bgcolor'); - // some validation should happen here - - $this->prependCSS($attr, "background-color:$bgcolor;"); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php deleted file mode 100644 index f25cd019..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php +++ /dev/null @@ -1,47 +0,0 @@ -attr = $attr; - $this->css = $css; - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr[$this->attr])) { - return $attr; - } - unset($attr[$this->attr]); - $this->prependCSS($attr, $this->css); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php deleted file mode 100644 index 057dc017..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php +++ /dev/null @@ -1,26 +0,0 @@ -confiscateAttr($attr, 'border'); - // some validation should happen here - $this->prependCSS($attr, "border:{$border_width}px solid;"); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php deleted file mode 100644 index 7ccd0e3f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php +++ /dev/null @@ -1,68 +0,0 @@ -attr = $attr; - $this->enumToCSS = $enum_to_css; - $this->caseSensitive = (bool)$case_sensitive; - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr[$this->attr])) { - return $attr; - } - - $value = trim($attr[$this->attr]); - unset($attr[$this->attr]); - - if (!$this->caseSensitive) { - $value = strtolower($value); - } - - if (!isset($this->enumToCSS[$value])) { - return $attr; - } - $this->prependCSS($attr, $this->enumToCSS[$value]); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php deleted file mode 100644 index 235ebb34..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php +++ /dev/null @@ -1,47 +0,0 @@ -get('Core.RemoveInvalidImg')) { - return $attr; - } - $attr['src'] = $config->get('Attr.DefaultInvalidImage'); - $src = false; - } - - if (!isset($attr['alt'])) { - if ($src) { - $alt = $config->get('Attr.DefaultImageAlt'); - if ($alt === null) { - $attr['alt'] = basename($attr['src']); - } else { - $attr['alt'] = $alt; - } - } else { - $attr['alt'] = $config->get('Attr.DefaultInvalidImageAlt'); - } - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php deleted file mode 100644 index 350b3358..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php +++ /dev/null @@ -1,61 +0,0 @@ - array('left', 'right'), - 'vspace' => array('top', 'bottom') - ); - - /** - * @param string $attr - */ - public function __construct($attr) - { - $this->attr = $attr; - if (!isset($this->css[$attr])) { - trigger_error(htmlspecialchars($attr) . ' is not valid space attribute'); - } - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr[$this->attr])) { - return $attr; - } - - $width = $this->confiscateAttr($attr, $this->attr); - // some validation could happen here - - if (!isset($this->css[$this->attr])) { - return $attr; - } - - $style = ''; - foreach ($this->css[$this->attr] as $suffix) { - $property = "margin-$suffix"; - $style .= "$property:{$width}px;"; - } - $this->prependCSS($attr, $style); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php deleted file mode 100644 index 3ab47ed8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php +++ /dev/null @@ -1,56 +0,0 @@ -pixels = new HTMLPurifier_AttrDef_HTML_Pixels(); - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr['type'])) { - $t = 'text'; - } else { - $t = strtolower($attr['type']); - } - if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') { - unset($attr['checked']); - } - if (isset($attr['maxlength']) && $t !== 'text' && $t !== 'password') { - unset($attr['maxlength']); - } - if (isset($attr['size']) && $t !== 'text' && $t !== 'password') { - $result = $this->pixels->validate($attr['size'], $config, $context); - if ($result === false) { - unset($attr['size']); - } else { - $attr['size'] = $result; - } - } - if (isset($attr['src']) && $t !== 'image') { - unset($attr['src']); - } - if (!isset($attr['value']) && ($t === 'radio' || $t === 'checkbox')) { - $attr['value'] = ''; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php deleted file mode 100644 index 5b0aff0e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php +++ /dev/null @@ -1,31 +0,0 @@ -name = $name; - $this->cssName = $css_name ? $css_name : $name; - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr[$this->name])) { - return $attr; - } - $length = $this->confiscateAttr($attr, $this->name); - if (ctype_digit($length)) { - $length .= 'px'; - } - $this->prependCSS($attr, $this->cssName . ":$length;"); - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php deleted file mode 100644 index 63cce683..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Name.php +++ /dev/null @@ -1,33 +0,0 @@ -get('HTML.Attr.Name.UseCDATA')) { - return $attr; - } - if (!isset($attr['name'])) { - return $attr; - } - $id = $this->confiscateAttr($attr, 'name'); - if (isset($attr['id'])) { - return $attr; - } - $attr['id'] = $id; - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php deleted file mode 100644 index 5a1fdbbf..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/NameSync.php +++ /dev/null @@ -1,46 +0,0 @@ -idDef = new HTMLPurifier_AttrDef_HTML_ID(); - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr['name'])) { - return $attr; - } - $name = $attr['name']; - if (isset($attr['id']) && $attr['id'] === $name) { - return $attr; - } - $result = $this->idDef->validate($name, $config, $context); - if ($result === false) { - unset($attr['name']); - } else { - $attr['name'] = $result; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php deleted file mode 100644 index 1057ebee..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php +++ /dev/null @@ -1,52 +0,0 @@ -parser = new HTMLPurifier_URIParser(); - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr['href'])) { - return $attr; - } - - // XXX Kind of inefficient - $url = $this->parser->parse($attr['href']); - $scheme = $url->getSchemeObj($config, $context); - - if ($scheme->browsable && !$url->isLocal($config, $context)) { - if (isset($attr['rel'])) { - $rels = explode(' ', $attr['rel']); - if (!in_array('nofollow', $rels)) { - $rels[] = 'nofollow'; - } - $attr['rel'] = implode(' ', $rels); - } else { - $attr['rel'] = 'nofollow'; - } - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php deleted file mode 100644 index 231c81a3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php +++ /dev/null @@ -1,25 +0,0 @@ -uri = new HTMLPurifier_AttrDef_URI(true); // embedded - $this->wmode = new HTMLPurifier_AttrDef_Enum(array('window', 'opaque', 'transparent')); - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - // If we add support for other objects, we'll need to alter the - // transforms. - switch ($attr['name']) { - // application/x-shockwave-flash - // Keep this synchronized with Injector/SafeObject.php - case 'allowScriptAccess': - $attr['value'] = 'never'; - break; - case 'allowNetworking': - $attr['value'] = 'internal'; - break; - case 'allowFullScreen': - if ($config->get('HTML.FlashAllowFullScreen')) { - $attr['value'] = ($attr['value'] == 'true') ? 'true' : 'false'; - } else { - $attr['value'] = 'false'; - } - break; - case 'wmode': - $attr['value'] = $this->wmode->validate($attr['value'], $config, $context); - break; - case 'movie': - case 'src': - $attr['name'] = "movie"; - $attr['value'] = $this->uri->validate($attr['value'], $config, $context); - break; - case 'flashvars': - // we're going to allow arbitrary inputs to the SWF, on - // the reasoning that it could only hack the SWF, not us. - break; - // add other cases to support other param name/value pairs - default: - $attr['name'] = $attr['value'] = null; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php deleted file mode 100644 index b7057bbf..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -class HTMLPurifier_AttrTransform_ScriptRequired extends HTMLPurifier_AttrTransform -{ - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr['type'])) { - $attr['type'] = 'text/javascript'; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php deleted file mode 100644 index cc30ab8c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php +++ /dev/null @@ -1,49 +0,0 @@ -parser = new HTMLPurifier_URIParser(); - } - - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - if (!isset($attr['href'])) { - return $attr; - } - - // XXX Kind of inefficient - $url = $this->parser->parse($attr['href']); - - // Ignore invalid schemes (e.g. `javascript:`) - if (!($scheme = $url->getSchemeObj($config, $context))) { - return $attr; - } - - if ($scheme->browsable && !$url->isBenign($config, $context)) { - $attr['target'] = '_blank'; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoopener.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoopener.php deleted file mode 100644 index 1db3c6c0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoopener.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class HTMLPurifier_AttrTransform_Textarea extends HTMLPurifier_AttrTransform -{ - /** - * @param array $attr - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function transform($attr, $config, $context) - { - // Calculated from Firefox - if (!isset($attr['cols'])) { - $attr['cols'] = '22'; - } - if (!isset($attr['rows'])) { - $attr['rows'] = '3'; - } - return $attr; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php deleted file mode 100644 index e4429e86..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTypes.php +++ /dev/null @@ -1,97 +0,0 @@ -info['Enum'] = new HTMLPurifier_AttrDef_Enum(); - $this->info['Bool'] = new HTMLPurifier_AttrDef_HTML_Bool(); - - $this->info['CDATA'] = new HTMLPurifier_AttrDef_Text(); - $this->info['ID'] = new HTMLPurifier_AttrDef_HTML_ID(); - $this->info['Length'] = new HTMLPurifier_AttrDef_HTML_Length(); - $this->info['MultiLength'] = new HTMLPurifier_AttrDef_HTML_MultiLength(); - $this->info['NMTOKENS'] = new HTMLPurifier_AttrDef_HTML_Nmtokens(); - $this->info['Pixels'] = new HTMLPurifier_AttrDef_HTML_Pixels(); - $this->info['Text'] = new HTMLPurifier_AttrDef_Text(); - $this->info['URI'] = new HTMLPurifier_AttrDef_URI(); - $this->info['LanguageCode'] = new HTMLPurifier_AttrDef_Lang(); - $this->info['Color'] = new HTMLPurifier_AttrDef_HTML_Color(); - $this->info['IAlign'] = self::makeEnum('top,middle,bottom,left,right'); - $this->info['LAlign'] = self::makeEnum('top,bottom,left,right'); - $this->info['FrameTarget'] = new HTMLPurifier_AttrDef_HTML_FrameTarget(); - $this->info['ContentEditable'] = new HTMLPurifier_AttrDef_HTML_ContentEditable(); - - // unimplemented aliases - $this->info['ContentType'] = new HTMLPurifier_AttrDef_Text(); - $this->info['ContentTypes'] = new HTMLPurifier_AttrDef_Text(); - $this->info['Charsets'] = new HTMLPurifier_AttrDef_Text(); - $this->info['Character'] = new HTMLPurifier_AttrDef_Text(); - - // "proprietary" types - $this->info['Class'] = new HTMLPurifier_AttrDef_HTML_Class(); - - // number is really a positive integer (one or more digits) - // FIXME: ^^ not always, see start and value of list items - $this->info['Number'] = new HTMLPurifier_AttrDef_Integer(false, false, true); - } - - private static function makeEnum($in) - { - return new HTMLPurifier_AttrDef_Clone(new HTMLPurifier_AttrDef_Enum(explode(',', $in))); - } - - /** - * Retrieves a type - * @param string $type String type name - * @return HTMLPurifier_AttrDef Object AttrDef for type - */ - public function get($type) - { - // determine if there is any extra info tacked on - if (strpos($type, '#') !== false) { - list($type, $string) = explode('#', $type, 2); - } else { - $string = ''; - } - - if (!isset($this->info[$type])) { - trigger_error('Cannot retrieve undefined attribute type ' . $type, E_USER_ERROR); - return; - } - return $this->info[$type]->make($string); - } - - /** - * Sets a new implementation for a type - * @param string $type String type name - * @param HTMLPurifier_AttrDef $impl Object AttrDef for type - */ - public function set($type, $impl) - { - $this->info[$type] = $impl; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php deleted file mode 100644 index f97dc93e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrValidator.php +++ /dev/null @@ -1,178 +0,0 @@ -getHTMLDefinition(); - $e =& $context->get('ErrorCollector', true); - - // initialize IDAccumulator if necessary - $ok =& $context->get('IDAccumulator', true); - if (!$ok) { - $id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context); - $context->register('IDAccumulator', $id_accumulator); - } - - // initialize CurrentToken if necessary - $current_token =& $context->get('CurrentToken', true); - if (!$current_token) { - $context->register('CurrentToken', $token); - } - - if (!$token instanceof HTMLPurifier_Token_Start && - !$token instanceof HTMLPurifier_Token_Empty - ) { - return; - } - - // create alias to global definition array, see also $defs - // DEFINITION CALL - $d_defs = $definition->info_global_attr; - - // don't update token until the very end, to ensure an atomic update - $attr = $token->attr; - - // do global transformations (pre) - // nothing currently utilizes this - foreach ($definition->info_attr_transform_pre as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) { - $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - } - - // do local transformations only applicable to this element (pre) - // ex.

to

- foreach ($definition->info[$token->name]->attr_transform_pre as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) { - $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - } - - // create alias to this element's attribute definition array, see - // also $d_defs (global attribute definition array) - // DEFINITION CALL - $defs = $definition->info[$token->name]->attr; - - $attr_key = false; - $context->register('CurrentAttr', $attr_key); - - // iterate through all the attribute keypairs - // Watch out for name collisions: $key has previously been used - foreach ($attr as $attr_key => $value) { - - // call the definition - if (isset($defs[$attr_key])) { - // there is a local definition defined - if ($defs[$attr_key] === false) { - // We've explicitly been told not to allow this element. - // This is usually when there's a global definition - // that must be overridden. - // Theoretically speaking, we could have a - // AttrDef_DenyAll, but this is faster! - $result = false; - } else { - // validate according to the element's definition - $result = $defs[$attr_key]->validate( - $value, - $config, - $context - ); - } - } elseif (isset($d_defs[$attr_key])) { - // there is a global definition defined, validate according - // to the global definition - $result = $d_defs[$attr_key]->validate( - $value, - $config, - $context - ); - } else { - // system never heard of the attribute? DELETE! - $result = false; - } - - // put the results into effect - if ($result === false || $result === null) { - // this is a generic error message that should replaced - // with more specific ones when possible - if ($e) { - $e->send(E_ERROR, 'AttrValidator: Attribute removed'); - } - - // remove the attribute - unset($attr[$attr_key]); - } elseif (is_string($result)) { - // generally, if a substitution is happening, there - // was some sort of implicit correction going on. We'll - // delegate it to the attribute classes to say exactly what. - - // simple substitution - $attr[$attr_key] = $result; - } else { - // nothing happens - } - - // we'd also want slightly more complicated substitution - // involving an array as the return value, - // although we're not sure how colliding attributes would - // resolve (certain ones would be completely overriden, - // others would prepend themselves). - } - - $context->destroy('CurrentAttr'); - - // post transforms - - // global (error reporting untested) - foreach ($definition->info_attr_transform_post as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) { - $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - } - - // local (error reporting untested) - foreach ($definition->info[$token->name]->attr_transform_post as $transform) { - $attr = $transform->transform($o = $attr, $config, $context); - if ($e) { - if ($attr != $o) { - $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); - } - } - } - - $token->attr = $attr; - - // destroy CurrentToken if we made it ourselves - if (!$current_token) { - $context->destroy('CurrentToken'); - } - - } - - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php deleted file mode 100644 index bd8f9984..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Bootstrap.php +++ /dev/null @@ -1,91 +0,0 @@ - -if (!defined('PHP_EOL')) { - switch (strtoupper(substr(PHP_OS, 0, 3))) { - case 'WIN': - define('PHP_EOL', "\r\n"); - break; - case 'DAR': - define('PHP_EOL', "\r"); - break; - default: - define('PHP_EOL', "\n"); - } -} - -/** - * Bootstrap class that contains meta-functionality for HTML Purifier such as - * the autoload function. - * - * @note - * This class may be used without any other files from HTML Purifier. - */ -class HTMLPurifier_Bootstrap -{ - - /** - * Autoload function for HTML Purifier - * @param string $class Class to load - * @return bool - */ - public static function autoload($class) - { - $file = HTMLPurifier_Bootstrap::getPath($class); - if (!$file) { - return false; - } - // Technically speaking, it should be ok and more efficient to - // just do 'require', but Antonio Parraga reports that with - // Zend extensions such as Zend debugger and APC, this invariant - // may be broken. Since we have efficient alternatives, pay - // the cost here and avoid the bug. - require_once HTMLPURIFIER_PREFIX . '/' . $file; - return true; - } - - /** - * Returns the path for a specific class. - * @param string $class Class path to get - * @return string - */ - public static function getPath($class) - { - if (strncmp('HTMLPurifier', $class, 12) !== 0) { - return false; - } - // Custom implementations - if (strncmp('HTMLPurifier_Language_', $class, 22) === 0) { - $code = str_replace('_', '-', substr($class, 22)); - $file = 'HTMLPurifier/Language/classes/' . $code . '.php'; - } else { - $file = str_replace('_', '/', $class) . '.php'; - } - if (!file_exists(HTMLPURIFIER_PREFIX . '/' . $file)) { - return false; - } - return $file; - } - - /** - * "Pre-registers" our autoloader on the SPL stack. - */ - public static function registerAutoload() - { - $autoload = array('HTMLPurifier_Bootstrap', 'autoload'); - if (spl_autoload_functions() === false) { - spl_autoload_register($autoload); - } else { - // prepend flag exists, no need for shenanigans - spl_autoload_register($autoload, true, true); - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php deleted file mode 100644 index 3732c076..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php +++ /dev/null @@ -1,565 +0,0 @@ -info['text-align'] = new HTMLPurifier_AttrDef_Enum( - ['left', 'right', 'center', 'justify'], - false - ); - - $border_style = - $this->info['border-bottom-style'] = - $this->info['border-right-style'] = - $this->info['border-left-style'] = - $this->info['border-top-style'] = new HTMLPurifier_AttrDef_Enum( - [ - 'none', - 'hidden', - 'dotted', - 'dashed', - 'solid', - 'double', - 'groove', - 'ridge', - 'inset', - 'outset' - ], - false - ); - - $this->info['border-style'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_style); - - $this->info['clear'] = new HTMLPurifier_AttrDef_Enum( - ['none', 'left', 'right', 'both'], - false - ); - $this->info['float'] = new HTMLPurifier_AttrDef_Enum( - ['none', 'left', 'right'], - false - ); - $this->info['font-style'] = new HTMLPurifier_AttrDef_Enum( - ['normal', 'italic', 'oblique'], - false - ); - $this->info['font-variant'] = new HTMLPurifier_AttrDef_Enum( - ['normal', 'small-caps'], - false - ); - - $uri_or_none = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['none']), - new HTMLPurifier_AttrDef_CSS_URI() - ] - ); - - $this->info['list-style-position'] = new HTMLPurifier_AttrDef_Enum( - ['inside', 'outside'], - false - ); - $this->info['list-style-type'] = new HTMLPurifier_AttrDef_Enum( - [ - 'disc', - 'circle', - 'square', - 'decimal', - 'lower-roman', - 'upper-roman', - 'lower-alpha', - 'upper-alpha', - 'none' - ], - false - ); - $this->info['list-style-image'] = $uri_or_none; - - $this->info['list-style'] = new HTMLPurifier_AttrDef_CSS_ListStyle($config); - - $this->info['text-transform'] = new HTMLPurifier_AttrDef_Enum( - ['capitalize', 'uppercase', 'lowercase', 'none'], - false - ); - $this->info['color'] = new HTMLPurifier_AttrDef_CSS_Color(); - - $this->info['background-image'] = $uri_or_none; - $this->info['background-repeat'] = new HTMLPurifier_AttrDef_Enum( - ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'] - ); - $this->info['background-attachment'] = new HTMLPurifier_AttrDef_Enum( - ['scroll', 'fixed'] - ); - $this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition(); - - $this->info['background-size'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum( - [ - 'auto', - 'cover', - 'contain', - ] - ), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_CSS_Length() - ] - ); - - $border_color = - $this->info['border-top-color'] = - $this->info['border-bottom-color'] = - $this->info['border-left-color'] = - $this->info['border-right-color'] = - $this->info['background-color'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['transparent']), - new HTMLPurifier_AttrDef_CSS_Color() - ] - ); - - $this->info['background'] = new HTMLPurifier_AttrDef_CSS_Background($config); - - $this->info['border-color'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_color); - - $border_width = - $this->info['border-top-width'] = - $this->info['border-bottom-width'] = - $this->info['border-left-width'] = - $this->info['border-right-width'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['thin', 'medium', 'thick']), - new HTMLPurifier_AttrDef_CSS_Length('0') //disallow negative - ] - ); - - $this->info['border-width'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_width); - - $this->info['letter-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['normal']), - new HTMLPurifier_AttrDef_CSS_Length() - ] - ); - - $this->info['word-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['normal']), - new HTMLPurifier_AttrDef_CSS_Length() - ] - ); - - $this->info['font-size'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum( - [ - 'xx-small', - 'x-small', - 'small', - 'medium', - 'large', - 'x-large', - 'xx-large', - 'larger', - 'smaller' - ] - ), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_CSS_Length() - ] - ); - - $this->info['line-height'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum(['normal']), - new HTMLPurifier_AttrDef_CSS_Number(true), // no negatives - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true) - ] - ); - - $margin = - $this->info['margin-top'] = - $this->info['margin-bottom'] = - $this->info['margin-left'] = - $this->info['margin-right'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_Enum(['auto']) - ] - ); - - $this->info['margin'] = new HTMLPurifier_AttrDef_CSS_Multiple($margin); - - // non-negative - $padding = - $this->info['padding-top'] = - $this->info['padding-bottom'] = - $this->info['padding-left'] = - $this->info['padding-right'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true) - ] - ); - - $this->info['padding'] = new HTMLPurifier_AttrDef_CSS_Multiple($padding); - - $this->info['text-indent'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage() - ] - ); - - $trusted_wh = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true), - new HTMLPurifier_AttrDef_Enum(['auto']) - ] - ); - $trusted_min_wh = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true), - ] - ); - $trusted_max_wh = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0'), - new HTMLPurifier_AttrDef_CSS_Percentage(true), - new HTMLPurifier_AttrDef_Enum(['none']) - ] - ); - $max = $config->get('CSS.MaxImgLength'); - - $this->info['width'] = - $this->info['height'] = - $max === null ? - $trusted_wh : - new HTMLPurifier_AttrDef_Switch( - 'img', - // For img tags: - new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0', $max), - new HTMLPurifier_AttrDef_Enum(['auto']) - ] - ), - // For everyone else: - $trusted_wh - ); - $this->info['min-width'] = - $this->info['min-height'] = - $max === null ? - $trusted_min_wh : - new HTMLPurifier_AttrDef_Switch( - 'img', - // For img tags: - new HTMLPurifier_AttrDef_CSS_Length('0', $max), - // For everyone else: - $trusted_min_wh - ); - $this->info['max-width'] = - $this->info['max-height'] = - $max === null ? - $trusted_max_wh : - new HTMLPurifier_AttrDef_Switch( - 'img', - // For img tags: - new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length('0', $max), - new HTMLPurifier_AttrDef_Enum(['none']) - ] - ), - // For everyone else: - $trusted_max_wh - ); - - $this->info['aspect-ratio'] = new HTMLPurifier_AttrDef_CSS_Multiple( - new HTMLPurifier_AttrDef_CSS_Composite([ - new HTMLPurifier_AttrDef_CSS_Ratio(), - new HTMLPurifier_AttrDef_Enum(['auto']), - ]) - ); - - // text-decoration and related shorthands - $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration(); - - $this->info['text-decoration-line'] = new HTMLPurifier_AttrDef_Enum( - ['none', 'underline', 'overline', 'line-through'] - ); - - $this->info['text-decoration-style'] = new HTMLPurifier_AttrDef_Enum( - ['solid', 'double', 'dotted', 'dashed', 'wavy'] - ); - - $this->info['text-decoration-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - - $this->info['text-decoration-thickness'] = new HTMLPurifier_AttrDef_CSS_Composite([ - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_Enum(['auto', 'from-font']) - ]); - - $this->info['font-family'] = new HTMLPurifier_AttrDef_CSS_FontFamily(); - - // this could use specialized code - $this->info['font-weight'] = new HTMLPurifier_AttrDef_Enum( - [ - 'normal', - 'bold', - 'bolder', - 'lighter', - '100', - '200', - '300', - '400', - '500', - '600', - '700', - '800', - '900' - ], - false - ); - - // MUST be called after other font properties, as it references - // a CSSDefinition object - $this->info['font'] = new HTMLPurifier_AttrDef_CSS_Font($config); - - // same here - $this->info['border'] = - $this->info['border-bottom'] = - $this->info['border-top'] = - $this->info['border-left'] = - $this->info['border-right'] = new HTMLPurifier_AttrDef_CSS_Border($config); - - $this->info['border-collapse'] = new HTMLPurifier_AttrDef_Enum( - ['collapse', 'separate'] - ); - - $this->info['caption-side'] = new HTMLPurifier_AttrDef_Enum( - ['top', 'bottom'] - ); - - $this->info['table-layout'] = new HTMLPurifier_AttrDef_Enum( - ['auto', 'fixed'] - ); - - $this->info['vertical-align'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Enum( - [ - 'baseline', - 'sub', - 'super', - 'top', - 'text-top', - 'middle', - 'bottom', - 'text-bottom' - ] - ), - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage() - ] - ); - - $this->info['border-spacing'] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2); - - // These CSS properties don't work on many browsers, but we live - // in THE FUTURE! - $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum( - ['nowrap', 'normal', 'pre', 'pre-wrap', 'pre-line'] - ); - - if ($config->get('CSS.Proprietary')) { - $this->doSetupProprietary($config); - } - - if ($config->get('CSS.AllowTricky')) { - $this->doSetupTricky($config); - } - - if ($config->get('CSS.Trusted')) { - $this->doSetupTrusted($config); - } - - $allow_important = $config->get('CSS.AllowImportant'); - // wrap all attr-defs with decorator that handles !important - foreach ($this->info as $k => $v) { - $this->info[$k] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important); - } - - $this->setupConfigStuff($config); - } - - /** - * @param HTMLPurifier_Config $config - */ - protected function doSetupProprietary($config) - { - // Internet Explorer only scrollbar colors - $this->info['scrollbar-arrow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-base-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-darkshadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-face-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color(); - - // vendor specific prefixes of opacity - $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - - // only opacity, for now - $this->info['filter'] = new HTMLPurifier_AttrDef_CSS_Filter(); - - // more CSS3 - $this->info['page-break-after'] = - $this->info['page-break-before'] = new HTMLPurifier_AttrDef_Enum( - [ - 'auto', - 'always', - 'avoid', - 'left', - 'right' - ] - ); - $this->info['page-break-inside'] = new HTMLPurifier_AttrDef_Enum(['auto', 'avoid']); - - $border_radius = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Percentage(true), // disallow negative - new HTMLPurifier_AttrDef_CSS_Length('0') // disallow negative - ]); - - $this->info['border-top-left-radius'] = - $this->info['border-top-right-radius'] = - $this->info['border-bottom-right-radius'] = - $this->info['border-bottom-left-radius'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_radius, 2); - // TODO: support SLASH syntax - $this->info['border-radius'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_radius, 4); - - } - - /** - * @param HTMLPurifier_Config $config - */ - protected function doSetupTricky($config) - { - $this->info['display'] = new HTMLPurifier_AttrDef_Enum( - [ - 'inline', - 'block', - 'list-item', - 'run-in', - 'compact', - 'marker', - 'table', - 'inline-block', - 'inline-table', - 'table-row-group', - 'table-header-group', - 'table-footer-group', - 'table-row', - 'table-column-group', - 'table-column', - 'table-cell', - 'table-caption', - 'none' - ] - ); - $this->info['visibility'] = new HTMLPurifier_AttrDef_Enum( - ['visible', 'hidden', 'collapse'] - ); - $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(['visible', 'hidden', 'auto', 'scroll']); - $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue(); - } - - /** - * @param HTMLPurifier_Config $config - */ - protected function doSetupTrusted($config) - { - $this->info['position'] = new HTMLPurifier_AttrDef_Enum( - ['static', 'relative', 'absolute', 'fixed'] - ); - $this->info['top'] = - $this->info['left'] = - $this->info['right'] = - $this->info['bottom'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_CSS_Length(), - new HTMLPurifier_AttrDef_CSS_Percentage(), - new HTMLPurifier_AttrDef_Enum(['auto']), - ] - ); - $this->info['z-index'] = new HTMLPurifier_AttrDef_CSS_Composite( - [ - new HTMLPurifier_AttrDef_Integer(), - new HTMLPurifier_AttrDef_Enum(['auto']), - ] - ); - } - - /** - * Performs extra config-based processing. Based off of - * HTMLPurifier_HTMLDefinition. - * @param HTMLPurifier_Config $config - * @todo Refactor duplicate elements into common class (probably using - * composition, not inheritance). - */ - protected function setupConfigStuff($config) - { - // setup allowed elements - $support = "(for information on implementing this, see the " . - "support forums) "; - $allowed_properties = $config->get('CSS.AllowedProperties'); - if ($allowed_properties !== null) { - foreach ($this->info as $name => $d) { - if (!isset($allowed_properties[$name])) { - unset($this->info[$name]); - } - unset($allowed_properties[$name]); - } - // emit errors - foreach ($allowed_properties as $name => $d) { - // :TODO: Is this htmlspecialchars() call really necessary? - $name = htmlspecialchars($name); - trigger_error("Style attribute '$name' is not supported $support", E_USER_WARNING); - } - } - - $forbidden_properties = $config->get('CSS.ForbiddenProperties'); - if ($forbidden_properties !== null) { - foreach ($this->info as $name => $d) { - if (isset($forbidden_properties[$name])) { - unset($this->info[$name]); - } - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php deleted file mode 100644 index 8eb17b82..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef.php +++ /dev/null @@ -1,52 +0,0 @@ -elements; - } - - /** - * Validates nodes according to definition and returns modification. - * - * @param HTMLPurifier_Node[] $children Array of HTMLPurifier_Node - * @param HTMLPurifier_Config $config HTMLPurifier_Config object - * @param HTMLPurifier_Context $context HTMLPurifier_Context object - * @return bool|array true to leave nodes as is, false to remove parent node, array of replacement children - */ - abstract public function validateChildren($children, $config, $context); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php deleted file mode 100644 index 7439be26..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Chameleon.php +++ /dev/null @@ -1,67 +0,0 @@ -inline = new HTMLPurifier_ChildDef_Optional($inline); - $this->block = new HTMLPurifier_ChildDef_Optional($block); - $this->elements = $this->block->elements; - } - - /** - * @param HTMLPurifier_Node[] $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function validateChildren($children, $config, $context) - { - if ($context->get('IsInline') === false) { - return $this->block->validateChildren( - $children, - $config, - $context - ); - } else { - return $this->inline->validateChildren( - $children, - $config, - $context - ); - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php deleted file mode 100644 index f515888a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Custom.php +++ /dev/null @@ -1,102 +0,0 @@ -dtd_regex = $dtd_regex; - $this->_compileRegex(); - } - - /** - * Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex) - */ - protected function _compileRegex() - { - $raw = str_replace(' ', '', $this->dtd_regex); - if ($raw[0] != '(') { - $raw = "($raw)"; - } - $el = '[#a-zA-Z0-9_.-]+'; - $reg = $raw; - - // COMPLICATED! AND MIGHT BE BUGGY! I HAVE NO CLUE WHAT I'M - // DOING! Seriously: if there's problems, please report them. - - // collect all elements into the $elements array - preg_match_all("/$el/", $reg, $matches); - foreach ($matches[0] as $match) { - $this->elements[$match] = true; - } - - // setup all elements as parentheticals with leading commas - $reg = preg_replace("/$el/", '(,\\0)', $reg); - - // remove commas when they were not solicited - $reg = preg_replace("/([^,(|]\(+),/", '\\1', $reg); - - // remove all non-paranthetical commas: they are handled by first regex - $reg = preg_replace("/,\(/", '(', $reg); - - $this->_pcre_regex = $reg; - } - - /** - * @param HTMLPurifier_Node[] $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function validateChildren($children, $config, $context) - { - $list_of_children = ''; - $nesting = 0; // depth into the nest - foreach ($children as $node) { - if (!empty($node->is_whitespace)) { - continue; - } - $list_of_children .= $node->name . ','; - } - // add leading comma to deal with stray comma declarations - $list_of_children = ',' . rtrim($list_of_children, ','); - $okay = - preg_match( - '/^,?' . $this->_pcre_regex . '$/', - $list_of_children - ); - return (bool)$okay; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php deleted file mode 100644 index a8a6cbdd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Empty.php +++ /dev/null @@ -1,38 +0,0 @@ - true, 'ul' => true, 'ol' => true); - - public $whitespace; - - /** - * @param array $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function validateChildren($children, $config, $context) - { - // Flag for subclasses - $this->whitespace = false; - - // if there are no tokens, delete parent node - if (empty($children)) { - return false; - } - - // if li is not allowed, delete parent node - if (!isset($config->getHTMLDefinition()->info['li'])) { - trigger_error("Cannot allow ul/ol without allowing li", E_USER_WARNING); - return false; - } - - // the new set of children - $result = array(); - - // a little sanity check to make sure it's not ALL whitespace - $all_whitespace = true; - - $current_li = null; - - foreach ($children as $node) { - if (!empty($node->is_whitespace)) { - $result[] = $node; - continue; - } - $all_whitespace = false; // phew, we're not talking about whitespace - - if ($node->name === 'li') { - // good - $current_li = $node; - $result[] = $node; - } else { - // we want to tuck this into the previous li - // Invariant: we expect the node to be ol/ul - // ToDo: Make this more robust in the case of not ol/ul - // by distinguishing between existing li and li created - // to handle non-list elements; non-list elements should - // not be appended to an existing li; only li created - // for non-list. This distinction is not currently made. - if ($current_li === null) { - $current_li = new HTMLPurifier_Node_Element('li'); - $result[] = $current_li; - } - $current_li->children[] = $node; - $current_li->empty = false; // XXX fascinating! Check for this error elsewhere ToDo - } - } - if (empty($result)) { - return false; - } - if ($all_whitespace) { - return false; - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php deleted file mode 100644 index b9468063..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Optional.php +++ /dev/null @@ -1,45 +0,0 @@ -whitespace) { - return $children; - } else { - return array(); - } - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php deleted file mode 100644 index 0d1c8f5f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Required.php +++ /dev/null @@ -1,118 +0,0 @@ - $x) { - $elements[$i] = true; - if (empty($i)) { - unset($elements[$i]); - } // remove blank - } - } - $this->elements = $elements; - } - - /** - * @type bool - */ - public $allow_empty = false; - - /** - * @type string - */ - public $type = 'required'; - - /** - * @param array $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function validateChildren($children, $config, $context) - { - // Flag for subclasses - $this->whitespace = false; - - // if there are no tokens, delete parent node - if (empty($children)) { - return false; - } - - // the new set of children - $result = array(); - - // whether or not parsed character data is allowed - // this controls whether or not we silently drop a tag - // or generate escaped HTML from it - $pcdata_allowed = isset($this->elements['#PCDATA']); - - // a little sanity check to make sure it's not ALL whitespace - $all_whitespace = true; - - $stack = array_reverse($children); - while (!empty($stack)) { - $node = array_pop($stack); - if (!empty($node->is_whitespace)) { - $result[] = $node; - continue; - } - $all_whitespace = false; // phew, we're not talking about whitespace - - if (!isset($this->elements[$node->name])) { - // special case text - // XXX One of these ought to be redundant or something - if ($pcdata_allowed && $node instanceof HTMLPurifier_Node_Text) { - $result[] = $node; - continue; - } - // spill the child contents in - // ToDo: Make configurable - if ($node instanceof HTMLPurifier_Node_Element) { - for ($i = count($node->children) - 1; $i >= 0; $i--) { - $stack[] = $node->children[$i]; - } - continue; - } - continue; - } - $result[] = $node; - } - if (empty($result)) { - return false; - } - if ($all_whitespace) { - $this->whitespace = true; - return false; - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php deleted file mode 100644 index 3270a46e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/StrictBlockquote.php +++ /dev/null @@ -1,110 +0,0 @@ -init($config); - return $this->fake_elements; - } - - /** - * @param array $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function validateChildren($children, $config, $context) - { - $this->init($config); - - // trick the parent class into thinking it allows more - $this->elements = $this->fake_elements; - $result = parent::validateChildren($children, $config, $context); - $this->elements = $this->real_elements; - - if ($result === false) { - return array(); - } - if ($result === true) { - $result = $children; - } - - $def = $config->getHTMLDefinition(); - $block_wrap_name = $def->info_block_wrapper; - $block_wrap = false; - $ret = array(); - - foreach ($result as $node) { - if ($block_wrap === false) { - if (($node instanceof HTMLPurifier_Node_Text && !$node->is_whitespace) || - ($node instanceof HTMLPurifier_Node_Element && !isset($this->elements[$node->name]))) { - $block_wrap = new HTMLPurifier_Node_Element($def->info_block_wrapper); - $ret[] = $block_wrap; - } - } else { - if ($node instanceof HTMLPurifier_Node_Element && isset($this->elements[$node->name])) { - $block_wrap = false; - - } - } - if ($block_wrap) { - $block_wrap->children[] = $node; - } else { - $ret[] = $node; - } - } - return $ret; - } - - /** - * @param HTMLPurifier_Config $config - */ - private function init($config) - { - if (!$this->init) { - $def = $config->getHTMLDefinition(); - // allow all inline elements - $this->real_elements = $this->elements; - $this->fake_elements = $def->info_content_sets['Flow']; - $this->fake_elements['#PCDATA'] = true; - $this->init = true; - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php deleted file mode 100644 index d92205b3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ChildDef/Table.php +++ /dev/null @@ -1,227 +0,0 @@ - true, - 'tbody' => true, - 'thead' => true, - 'tfoot' => true, - 'caption' => true, - 'colgroup' => true, - 'col' => true - ); - - public function __construct() - { - } - - /** - * @param array $children - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array - */ - public function validateChildren($children, $config, $context) - { - if (empty($children)) { - return false; - } - - // only one of these elements is allowed in a table - $caption = false; - $thead = false; - $tfoot = false; - - // whitespace - $initial_ws = array(); - $after_caption_ws = array(); - $after_thead_ws = array(); - $after_tfoot_ws = array(); - - // as many of these as you want - $cols = array(); - $content = array(); - - $tbody_mode = false; // if true, then we need to wrap any stray - // s with a . - - $ws_accum =& $initial_ws; - - foreach ($children as $node) { - if ($node instanceof HTMLPurifier_Node_Comment) { - $ws_accum[] = $node; - continue; - } - switch ($node->name) { - case 'tbody': - $tbody_mode = true; - // fall through - case 'tr': - $content[] = $node; - $ws_accum =& $content; - break; - case 'caption': - // there can only be one caption! - if ($caption !== false) break; - $caption = $node; - $ws_accum =& $after_caption_ws; - break; - case 'thead': - $tbody_mode = true; - // XXX This breaks rendering properties with - // Firefox, which never floats a to - // the top. Ever. (Our scheme will float the - // first to the top.) So maybe - // s that are not first should be - // turned into ? Very tricky, indeed. - if ($thead === false) { - $thead = $node; - $ws_accum =& $after_thead_ws; - } else { - // Oops, there's a second one! What - // should we do? Current behavior is to - // transmutate the first and last entries into - // tbody tags, and then put into content. - // Maybe a better idea is to *attach - // it* to the existing thead or tfoot? - // We don't do this, because Firefox - // doesn't float an extra tfoot to the - // bottom like it does for the first one. - $node->name = 'tbody'; - $content[] = $node; - $ws_accum =& $content; - } - break; - case 'tfoot': - // see above for some aveats - $tbody_mode = true; - if ($tfoot === false) { - $tfoot = $node; - $ws_accum =& $after_tfoot_ws; - } else { - $node->name = 'tbody'; - $content[] = $node; - $ws_accum =& $content; - } - break; - case 'colgroup': - case 'col': - $cols[] = $node; - $ws_accum =& $cols; - break; - case '#PCDATA': - // How is whitespace handled? We treat is as sticky to - // the *end* of the previous element. So all of the - // nonsense we have worked on is to keep things - // together. - if (!empty($node->is_whitespace)) { - $ws_accum[] = $node; - } - break; - } - } - - if (empty($content) && $thead === false && $tfoot === false) { - return false; - } - - $ret = $initial_ws; - if ($caption !== false) { - $ret[] = $caption; - $ret = array_merge($ret, $after_caption_ws); - } - if ($cols !== false) { - $ret = array_merge($ret, $cols); - } - if ($thead !== false) { - $ret[] = $thead; - $ret = array_merge($ret, $after_thead_ws); - } - if ($tfoot !== false) { - $ret[] = $tfoot; - $ret = array_merge($ret, $after_tfoot_ws); - } - - if ($tbody_mode) { - // we have to shuffle tr into tbody - $current_tr_tbody = null; - - foreach($content as $node) { - if (!isset($node->name)) { - continue; - } - switch ($node->name) { - case 'tbody': - $current_tr_tbody = null; - $ret[] = $node; - break; - case 'tr': - if ($current_tr_tbody === null) { - $current_tr_tbody = new HTMLPurifier_Node_Element('tbody'); - $ret[] = $current_tr_tbody; - } - $current_tr_tbody->children[] = $node; - break; - case '#PCDATA': - //assert($node->is_whitespace); - if ($current_tr_tbody === null) { - $ret[] = $node; - } else { - $current_tr_tbody->children[] = $node; - } - break; - } - } - } else { - $ret = array_merge($ret, $content); - } - - return $ret; - - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php deleted file mode 100644 index e6566e80..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php +++ /dev/null @@ -1,920 +0,0 @@ -defaultPlist; - $this->plist = new HTMLPurifier_PropertyList($parent); - $this->def = $definition; // keep a copy around for checking - $this->parser = new HTMLPurifier_VarParser_Flexible(); - } - - /** - * Convenience constructor that creates a config object based on a mixed var - * @param mixed $config Variable that defines the state of the config - * object. Can be: a HTMLPurifier_Config() object, - * an array of directives based on loadArray(), - * or a string filename of an ini file. - * @param HTMLPurifier_ConfigSchema $schema Schema object - * @return HTMLPurifier_Config Configured object - */ - public static function create($config, $schema = null) - { - if ($config instanceof HTMLPurifier_Config) { - // pass-through - return $config; - } - if (!$schema) { - $ret = HTMLPurifier_Config::createDefault(); - } else { - $ret = new HTMLPurifier_Config($schema); - } - if (is_string($config)) { - $ret->loadIni($config); - } elseif (is_array($config)) $ret->loadArray($config); - return $ret; - } - - /** - * Creates a new config object that inherits from a previous one. - * @param HTMLPurifier_Config $config Configuration object to inherit from. - * @return HTMLPurifier_Config object with $config as its parent. - */ - public static function inherit(HTMLPurifier_Config $config) - { - return new HTMLPurifier_Config($config->def, $config->plist); - } - - /** - * Convenience constructor that creates a default configuration object. - * @return HTMLPurifier_Config default object. - */ - public static function createDefault() - { - $definition = HTMLPurifier_ConfigSchema::instance(); - $config = new HTMLPurifier_Config($definition); - return $config; - } - - /** - * Retrieves a value from the configuration. - * - * @param string $key String key - * @param mixed $a - * - * @return mixed - */ - public function get($key, $a = null) - { - if ($a !== null) { - $this->triggerError( - "Using deprecated API: use \$config->get('$key.$a') instead", - E_USER_WARNING - ); - $key = "$key.$a"; - } - if (!$this->finalized) { - $this->autoFinalize(); - } - if (!isset($this->def->info[$key])) { - // can't add % due to SimpleTest bug - $this->triggerError( - 'Cannot retrieve value of undefined directive ' . htmlspecialchars($key), - E_USER_WARNING - ); - return; - } - if (isset($this->def->info[$key]->isAlias)) { - $d = $this->def->info[$key]; - $this->triggerError( - 'Cannot get value from aliased directive, use real name ' . $d->key, - E_USER_ERROR - ); - return; - } - if ($this->lock) { - list($ns) = explode('.', $key); - if ($ns !== $this->lock) { - $this->triggerError( - 'Cannot get value of namespace ' . $ns . ' when lock for ' . - $this->lock . - ' is active, this probably indicates a Definition setup method ' . - 'is accessing directives that are not within its namespace', - E_USER_ERROR - ); - return; - } - } - return $this->plist->get($key); - } - - /** - * Retrieves an array of directives to values from a given namespace - * - * @param string $namespace String namespace - * - * @return array - */ - public function getBatch($namespace) - { - if (!$this->finalized) { - $this->autoFinalize(); - } - $full = $this->getAll(); - if (!isset($full[$namespace])) { - $this->triggerError( - 'Cannot retrieve undefined namespace ' . - htmlspecialchars($namespace), - E_USER_WARNING - ); - return; - } - return $full[$namespace]; - } - - /** - * Returns a SHA-1 signature of a segment of the configuration object - * that uniquely identifies that particular configuration - * - * @param string $namespace Namespace to get serial for - * - * @return string - * @note Revision is handled specially and is removed from the batch - * before processing! - */ - public function getBatchSerial($namespace) - { - if (empty($this->serials[$namespace])) { - $batch = $this->getBatch($namespace); - unset($batch['DefinitionRev']); - $this->serials[$namespace] = sha1(serialize($batch)); - } - return $this->serials[$namespace]; - } - - /** - * Returns a SHA-1 signature for the entire configuration object - * that uniquely identifies that particular configuration - * - * @return string - */ - public function getSerial() - { - if (empty($this->serial)) { - $this->serial = sha1(serialize($this->getAll())); - } - return $this->serial; - } - - /** - * Retrieves all directives, organized by namespace - * - * @warning This is a pretty inefficient function, avoid if you can - */ - public function getAll() - { - if (!$this->finalized) { - $this->autoFinalize(); - } - $ret = array(); - foreach ($this->plist->squash() as $name => $value) { - list($ns, $key) = explode('.', $name, 2); - $ret[$ns][$key] = $value; - } - return $ret; - } - - /** - * Sets a value to configuration. - * - * @param string $key key - * @param mixed $value value - * @param mixed $a - */ - public function set($key, $value, $a = null) - { - if (strpos($key, '.') === false) { - $namespace = $key; - $directive = $value; - $value = $a; - $key = "$key.$directive"; - $this->triggerError("Using deprecated API: use \$config->set('$key', ...) instead", E_USER_NOTICE); - } else { - list($namespace) = explode('.', $key); - } - if ($this->isFinalized('Cannot set directive after finalization')) { - return; - } - if (!isset($this->def->info[$key])) { - $this->triggerError( - 'Cannot set undefined directive ' . htmlspecialchars($key) . ' to value', - E_USER_WARNING - ); - return; - } - $def = $this->def->info[$key]; - - if (isset($def->isAlias)) { - if ($this->aliasMode) { - $this->triggerError( - 'Double-aliases not allowed, please fix '. - 'ConfigSchema bug with' . $key, - E_USER_ERROR - ); - return; - } - $this->aliasMode = true; - $this->set($def->key, $value); - $this->aliasMode = false; - $this->triggerError("$key is an alias, preferred directive name is {$def->key}", E_USER_NOTICE); - return; - } - - // Raw type might be negative when using the fully optimized form - // of stdClass, which indicates allow_null == true - $rtype = is_int($def) ? $def : $def->type; - if ($rtype < 0) { - $type = -$rtype; - $allow_null = true; - } else { - $type = $rtype; - $allow_null = isset($def->allow_null); - } - - try { - $value = $this->parser->parse($value, $type, $allow_null); - } catch (HTMLPurifier_VarParserException $e) { - $this->triggerError( - 'Value for ' . $key . ' is of invalid type, should be ' . - HTMLPurifier_VarParser::getTypeName($type), - E_USER_WARNING - ); - return; - } - if (is_string($value) && is_object($def)) { - // resolve value alias if defined - if (isset($def->aliases[$value])) { - $value = $def->aliases[$value]; - } - // check to see if the value is allowed - if (isset($def->allowed) && !isset($def->allowed[$value])) { - $this->triggerError( - 'Value not supported, valid values are: ' . - $this->_listify($def->allowed), - E_USER_WARNING - ); - return; - } - } - $this->plist->set($key, $value); - - // reset definitions if the directives they depend on changed - // this is a very costly process, so it's discouraged - // with finalization - if ($namespace == 'HTML' || $namespace == 'CSS' || $namespace == 'URI') { - $this->definitions[$namespace] = null; - } - - $this->serials[$namespace] = false; - } - - /** - * Convenience function for error reporting - * - * @param array $lookup - * - * @return string - */ - private function _listify($lookup) - { - $list = array(); - foreach ($lookup as $name => $b) { - $list[] = $name; - } - return implode(', ', $list); - } - - /** - * Retrieves object reference to the HTML definition. - * - * @param bool $raw Return a copy that has not been setup yet. Must be - * called before it's been setup, otherwise won't work. - * @param bool $optimized If true, this method may return null, to - * indicate that a cached version of the modified - * definition object is available and no further edits - * are necessary. Consider using - * maybeGetRawHTMLDefinition, which is more explicitly - * named, instead. - * - * @return HTMLPurifier_HTMLDefinition|null - */ - public function getHTMLDefinition($raw = false, $optimized = false) - { - return $this->getDefinition('HTML', $raw, $optimized); - } - - /** - * Retrieves object reference to the CSS definition - * - * @param bool $raw Return a copy that has not been setup yet. Must be - * called before it's been setup, otherwise won't work. - * @param bool $optimized If true, this method may return null, to - * indicate that a cached version of the modified - * definition object is available and no further edits - * are necessary. Consider using - * maybeGetRawCSSDefinition, which is more explicitly - * named, instead. - * - * @return HTMLPurifier_CSSDefinition|null - */ - public function getCSSDefinition($raw = false, $optimized = false) - { - return $this->getDefinition('CSS', $raw, $optimized); - } - - /** - * Retrieves object reference to the URI definition - * - * @param bool $raw Return a copy that has not been setup yet. Must be - * called before it's been setup, otherwise won't work. - * @param bool $optimized If true, this method may return null, to - * indicate that a cached version of the modified - * definition object is available and no further edits - * are necessary. Consider using - * maybeGetRawURIDefinition, which is more explicitly - * named, instead. - * - * @return HTMLPurifier_URIDefinition|null - */ - public function getURIDefinition($raw = false, $optimized = false) - { - return $this->getDefinition('URI', $raw, $optimized); - } - - /** - * Retrieves a definition - * - * @param string $type Type of definition: HTML, CSS, etc - * @param bool $raw Whether or not definition should be returned raw - * @param bool $optimized Only has an effect when $raw is true. Whether - * or not to return null if the result is already present in - * the cache. This is off by default for backwards - * compatibility reasons, but you need to do things this - * way in order to ensure that caching is done properly. - * Check out enduser-customize.html for more details. - * We probably won't ever change this default, as much as the - * maybe semantics is the "right thing to do." - * - * @throws HTMLPurifier_Exception - * @return HTMLPurifier_Definition|null - */ - public function getDefinition($type, $raw = false, $optimized = false) - { - if ($optimized && !$raw) { - throw new HTMLPurifier_Exception("Cannot set optimized = true when raw = false"); - } - if (!$this->finalized) { - $this->autoFinalize(); - } - // temporarily suspend locks, so we can handle recursive definition calls - $lock = $this->lock; - $this->lock = null; - $factory = HTMLPurifier_DefinitionCacheFactory::instance(); - $cache = $factory->create($type, $this); - $this->lock = $lock; - if (!$raw) { - // full definition - // --------------- - // check if definition is in memory - if (!empty($this->definitions[$type])) { - $def = $this->definitions[$type]; - // check if the definition is setup - if ($def->setup) { - return $def; - } else { - $def->setup($this); - if ($def->optimized) { - $cache->add($def, $this); - } - return $def; - } - } - // check if definition is in cache - $def = $cache->get($this); - if ($def) { - // definition in cache, save to memory and return it - $this->definitions[$type] = $def; - return $def; - } - // initialize it - $def = $this->initDefinition($type); - // set it up - $this->lock = $type; - $def->setup($this); - $this->lock = null; - // save in cache - $cache->add($def, $this); - // return it - return $def; - } else { - // raw definition - // -------------- - // check preconditions - $def = null; - if ($optimized) { - if (is_null($this->get($type . '.DefinitionID'))) { - // fatally error out if definition ID not set - throw new HTMLPurifier_Exception( - "Cannot retrieve raw version without specifying %$type.DefinitionID" - ); - } - } - if (!empty($this->definitions[$type])) { - $def = $this->definitions[$type]; - if ($def->setup && !$optimized) { - $extra = $this->chatty ? - " (try moving this code block earlier in your initialization)" : - ""; - throw new HTMLPurifier_Exception( - "Cannot retrieve raw definition after it has already been setup" . - $extra - ); - } - if ($def->optimized === null) { - $extra = $this->chatty ? " (try flushing your cache)" : ""; - throw new HTMLPurifier_Exception( - "Optimization status of definition is unknown" . $extra - ); - } - if ($def->optimized !== $optimized) { - $msg = $optimized ? "optimized" : "unoptimized"; - $extra = $this->chatty ? - " (this backtrace is for the first inconsistent call, which was for a $msg raw definition)" - : ""; - throw new HTMLPurifier_Exception( - "Inconsistent use of optimized and unoptimized raw definition retrievals" . $extra - ); - } - } - // check if definition was in memory - if ($def) { - if ($def->setup) { - // invariant: $optimized === true (checked above) - return null; - } else { - return $def; - } - } - // if optimized, check if definition was in cache - // (because we do the memory check first, this formulation - // is prone to cache slamming, but I think - // guaranteeing that either /all/ of the raw - // setup code or /none/ of it is run is more important.) - if ($optimized) { - // This code path only gets run once; once we put - // something in $definitions (which is guaranteed by the - // trailing code), we always short-circuit above. - $def = $cache->get($this); - if ($def) { - // save the full definition for later, but don't - // return it yet - $this->definitions[$type] = $def; - return null; - } - } - // check invariants for creation - if (!$optimized) { - if (!is_null($this->get($type . '.DefinitionID'))) { - if ($this->chatty) { - $this->triggerError( - 'Due to a documentation error in previous version of HTML Purifier, your ' . - 'definitions are not being cached. If this is OK, you can remove the ' . - '%$type.DefinitionRev and %$type.DefinitionID declaration. Otherwise, ' . - 'modify your code to use maybeGetRawDefinition, and test if the returned ' . - 'value is null before making any edits (if it is null, that means that a ' . - 'cached version is available, and no raw operations are necessary). See ' . - '' . - 'Customize for more details', - E_USER_WARNING - ); - } else { - $this->triggerError( - "Useless DefinitionID declaration", - E_USER_WARNING - ); - } - } - } - // initialize it - $def = $this->initDefinition($type); - $def->optimized = $optimized; - return $def; - } - throw new HTMLPurifier_Exception("The impossible happened!"); - } - - /** - * Initialise definition - * - * @param string $type What type of definition to create - * - * @return HTMLPurifier_CSSDefinition|HTMLPurifier_HTMLDefinition|HTMLPurifier_URIDefinition - * @throws HTMLPurifier_Exception - */ - private function initDefinition($type) - { - // quick checks failed, let's create the object - if ($type == 'HTML') { - $def = new HTMLPurifier_HTMLDefinition(); - } elseif ($type == 'CSS') { - $def = new HTMLPurifier_CSSDefinition(); - } elseif ($type == 'URI') { - $def = new HTMLPurifier_URIDefinition(); - } else { - throw new HTMLPurifier_Exception( - "Definition of $type type not supported" - ); - } - $this->definitions[$type] = $def; - return $def; - } - - public function maybeGetRawDefinition($name) - { - return $this->getDefinition($name, true, true); - } - - /** - * @return HTMLPurifier_HTMLDefinition|null - */ - public function maybeGetRawHTMLDefinition() - { - return $this->getDefinition('HTML', true, true); - } - - /** - * @return HTMLPurifier_CSSDefinition|null - */ - public function maybeGetRawCSSDefinition() - { - return $this->getDefinition('CSS', true, true); - } - - /** - * @return HTMLPurifier_URIDefinition|null - */ - public function maybeGetRawURIDefinition() - { - return $this->getDefinition('URI', true, true); - } - - /** - * Loads configuration values from an array with the following structure: - * Namespace.Directive => Value - * - * @param array $config_array Configuration associative array - */ - public function loadArray($config_array) - { - if ($this->isFinalized('Cannot load directives after finalization')) { - return; - } - foreach ($config_array as $key => $value) { - $key = str_replace('_', '.', $key); - if (strpos($key, '.') !== false) { - $this->set($key, $value); - } else { - $namespace = $key; - $namespace_values = $value; - foreach ($namespace_values as $directive => $value2) { - $this->set($namespace .'.'. $directive, $value2); - } - } - } - } - - /** - * Returns a list of array(namespace, directive) for all directives - * that are allowed in a web-form context as per an allowed - * namespaces/directives list. - * - * @param array $allowed List of allowed namespaces/directives - * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy - * - * @return array - */ - public static function getAllowedDirectivesForForm($allowed, $schema = null) - { - if (!$schema) { - $schema = HTMLPurifier_ConfigSchema::instance(); - } - if ($allowed !== true) { - if (is_string($allowed)) { - $allowed = array($allowed); - } - $allowed_ns = array(); - $allowed_directives = array(); - $blacklisted_directives = array(); - foreach ($allowed as $ns_or_directive) { - if (strpos($ns_or_directive, '.') !== false) { - // directive - if ($ns_or_directive[0] == '-') { - $blacklisted_directives[substr($ns_or_directive, 1)] = true; - } else { - $allowed_directives[$ns_or_directive] = true; - } - } else { - // namespace - $allowed_ns[$ns_or_directive] = true; - } - } - } - $ret = array(); - foreach ($schema->info as $key => $def) { - list($ns, $directive) = explode('.', $key, 2); - if ($allowed !== true) { - if (isset($blacklisted_directives["$ns.$directive"])) { - continue; - } - if (!isset($allowed_directives["$ns.$directive"]) && !isset($allowed_ns[$ns])) { - continue; - } - } - if (isset($def->isAlias)) { - continue; - } - if ($directive == 'DefinitionID' || $directive == 'DefinitionRev') { - continue; - } - $ret[] = array($ns, $directive); - } - return $ret; - } - - /** - * Loads configuration values from $_GET/$_POST that were posted - * via ConfigForm - * - * @param array $array $_GET or $_POST array to import - * @param string|bool $index Index/name that the config variables are in - * @param array|bool $allowed List of allowed namespaces/directives - * @param bool $mq_fix Boolean whether or not to enable magic quotes fix - * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy - * - * @return mixed - */ - public static function loadArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) - { - $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $schema); - $config = HTMLPurifier_Config::create($ret, $schema); - return $config; - } - - /** - * Merges in configuration values from $_GET/$_POST to object. NOT STATIC. - * - * @param array $array $_GET or $_POST array to import - * @param string|bool $index Index/name that the config variables are in - * @param array|bool $allowed List of allowed namespaces/directives - * @param bool $mq_fix Boolean whether or not to enable magic quotes fix - */ - public function mergeArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true) - { - $ret = HTMLPurifier_Config::prepareArrayFromForm($array, $index, $allowed, $mq_fix, $this->def); - $this->loadArray($ret); - } - - /** - * Prepares an array from a form into something usable for the more - * strict parts of HTMLPurifier_Config - * - * @param array $array $_GET or $_POST array to import - * @param string|bool $index Index/name that the config variables are in - * @param array|bool $allowed List of allowed namespaces/directives - * @param bool $mq_fix Boolean whether or not to enable magic quotes fix - * @param HTMLPurifier_ConfigSchema $schema Schema to use, if not global copy - * - * @return array - */ - public static function prepareArrayFromForm($array, $index = false, $allowed = true, $mq_fix = true, $schema = null) - { - if ($index !== false) { - $array = (isset($array[$index]) && is_array($array[$index])) ? $array[$index] : array(); - } - $mq = $mq_fix && version_compare(PHP_VERSION, '7.4.0', '<') && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc(); - - $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $schema); - $ret = array(); - foreach ($allowed as $key) { - list($ns, $directive) = $key; - $skey = "$ns.$directive"; - if (!empty($array["Null_$skey"])) { - $ret[$ns][$directive] = null; - continue; - } - if (!isset($array[$skey])) { - continue; - } - $value = $mq ? stripslashes($array[$skey]) : $array[$skey]; - $ret[$ns][$directive] = $value; - } - return $ret; - } - - /** - * Loads configuration values from an ini file - * - * @param string $filename Name of ini file - */ - public function loadIni($filename) - { - if ($this->isFinalized('Cannot load directives after finalization')) { - return; - } - $array = parse_ini_file($filename, true); - $this->loadArray($array); - } - - /** - * Checks whether or not the configuration object is finalized. - * - * @param string|bool $error String error message, or false for no error - * - * @return bool - */ - public function isFinalized($error = false) - { - if ($this->finalized && $error) { - $this->triggerError($error, E_USER_ERROR); - } - return $this->finalized; - } - - /** - * Finalizes configuration only if auto finalize is on and not - * already finalized - */ - public function autoFinalize() - { - if ($this->autoFinalize) { - $this->finalize(); - } else { - $this->plist->squash(true); - } - } - - /** - * Finalizes a configuration object, prohibiting further change - */ - public function finalize() - { - $this->finalized = true; - $this->parser = null; - } - - /** - * Produces a nicely formatted error message by supplying the - * stack frame information OUTSIDE of HTMLPurifier_Config. - * - * @param string $msg An error message - * @param int $no An error number - */ - protected function triggerError($msg, $no) - { - // determine previous stack frame - $extra = ''; - if ($this->chatty) { - $trace = debug_backtrace(); - // zip(tail(trace), trace) -- but PHP is not Haskell har har - for ($i = 0, $c = count($trace); $i < $c - 1; $i++) { - // XXX this is not correct on some versions of HTML Purifier - if (isset($trace[$i + 1]['class']) && $trace[$i + 1]['class'] === 'HTMLPurifier_Config') { - continue; - } - $frame = $trace[$i]; - $extra = " invoked on line {$frame['line']} in file {$frame['file']}"; - break; - } - } - trigger_error($msg . $extra, $no); - } - - /** - * Returns a serialized form of the configuration object that can - * be reconstituted. - * - * @return string - */ - public function serialize() - { - $this->getDefinition('HTML'); - $this->getDefinition('CSS'); - $this->getDefinition('URI'); - return serialize($this); - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php deleted file mode 100644 index c3fe8cd4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php +++ /dev/null @@ -1,176 +0,0 @@ - array( - * 'Directive' => new stdClass(), - * ) - * ) - * - * The stdClass may have the following properties: - * - * - If isAlias isn't set: - * - type: Integer type of directive, see HTMLPurifier_VarParser for definitions - * - allow_null: If set, this directive allows null values - * - aliases: If set, an associative array of value aliases to real values - * - allowed: If set, a lookup array of allowed (string) values - * - If isAlias is set: - * - namespace: Namespace this directive aliases to - * - name: Directive name this directive aliases to - * - * In certain degenerate cases, stdClass will actually be an integer. In - * that case, the value is equivalent to an stdClass with the type - * property set to the integer. If the integer is negative, type is - * equal to the absolute value of integer, and allow_null is true. - * - * This class is friendly with HTMLPurifier_Config. If you need introspection - * about the schema, you're better of using the ConfigSchema_Interchange, - * which uses more memory but has much richer information. - * @type array - */ - public $info = array(); - - /** - * Application-wide singleton - * @type HTMLPurifier_ConfigSchema - */ - protected static $singleton; - - public function __construct() - { - $this->defaultPlist = new HTMLPurifier_PropertyList(); - } - - /** - * Unserializes the default ConfigSchema. - * @return HTMLPurifier_ConfigSchema - */ - public static function makeFromSerial() - { - $contents = file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema.ser'); - $r = unserialize($contents); - if (!$r) { - $hash = sha1($contents); - trigger_error("Unserialization of configuration schema failed, sha1 of file was $hash", E_USER_ERROR); - } - return $r; - } - - /** - * Retrieves an instance of the application-wide configuration definition. - * @param HTMLPurifier_ConfigSchema $prototype - * @return HTMLPurifier_ConfigSchema - */ - public static function instance($prototype = null) - { - if ($prototype !== null) { - HTMLPurifier_ConfigSchema::$singleton = $prototype; - } elseif (HTMLPurifier_ConfigSchema::$singleton === null || $prototype === true) { - HTMLPurifier_ConfigSchema::$singleton = HTMLPurifier_ConfigSchema::makeFromSerial(); - } - return HTMLPurifier_ConfigSchema::$singleton; - } - - /** - * Defines a directive for configuration - * @warning Will fail of directive's namespace is defined. - * @warning This method's signature is slightly different from the legacy - * define() static method! Beware! - * @param string $key Name of directive - * @param mixed $default Default value of directive - * @param string $type Allowed type of the directive. See - * HTMLPurifier_VarParser::$types for allowed values - * @param bool $allow_null Whether or not to allow null values - */ - public function add($key, $default, $type, $allow_null) - { - $obj = new stdClass(); - $obj->type = is_int($type) ? $type : HTMLPurifier_VarParser::$types[$type]; - if ($allow_null) { - $obj->allow_null = true; - } - $this->info[$key] = $obj; - $this->defaults[$key] = $default; - $this->defaultPlist->set($key, $default); - } - - /** - * Defines a directive value alias. - * - * Directive value aliases are convenient for developers because it lets - * them set a directive to several values and get the same result. - * @param string $key Name of Directive - * @param array $aliases Hash of aliased values to the real alias - */ - public function addValueAliases($key, $aliases) - { - if (!isset($this->info[$key]->aliases)) { - $this->info[$key]->aliases = array(); - } - foreach ($aliases as $alias => $real) { - $this->info[$key]->aliases[$alias] = $real; - } - } - - /** - * Defines a set of allowed values for a directive. - * @warning This is slightly different from the corresponding static - * method definition. - * @param string $key Name of directive - * @param array $allowed Lookup array of allowed values - */ - public function addAllowedValues($key, $allowed) - { - $this->info[$key]->allowed = $allowed; - } - - /** - * Defines a directive alias for backwards compatibility - * @param string $key Directive that will be aliased - * @param string $new_key Directive that the alias will be to - */ - public function addAlias($key, $new_key) - { - $obj = new stdClass; - $obj->key = $new_key; - $obj->isAlias = true; - $this->info[$key] = $obj; - } - - /** - * Replaces any stdClass that only has the type property with type integer. - */ - public function postProcess() - { - foreach ($this->info as $key => $v) { - if (count((array) $v) == 1) { - $this->info[$key] = $v->type; - } elseif (count((array) $v) == 2 && isset($v->allow_null)) { - $this->info[$key] = -$v->type; - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php deleted file mode 100644 index d5906cd4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php +++ /dev/null @@ -1,48 +0,0 @@ -directives as $d) { - $schema->add( - $d->id->key, - $d->default, - $d->type, - $d->typeAllowsNull - ); - if ($d->allowed !== null) { - $schema->addAllowedValues( - $d->id->key, - $d->allowed - ); - } - foreach ($d->aliases as $alias) { - $schema->addAlias( - $alias->key, - $d->id->key - ); - } - if ($d->valueAliases !== null) { - $schema->addValueAliases( - $d->id->key, - $d->valueAliases - ); - } - } - $schema->postProcess(); - return $schema; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php deleted file mode 100644 index 5fa56f7d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Builder/Xml.php +++ /dev/null @@ -1,144 +0,0 @@ -startElement('div'); - - $purifier = HTMLPurifier::getInstance(); - $html = $purifier->purify($html); - $this->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); - $this->writeRaw($html); - - $this->endElement(); // div - } - - /** - * @param mixed $var - * @return string - */ - protected function export($var) - { - if ($var === array()) { - return 'array()'; - } - return var_export($var, true); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - */ - public function build($interchange) - { - // global access, only use as last resort - $this->interchange = $interchange; - - $this->setIndent(true); - $this->startDocument('1.0', 'UTF-8'); - $this->startElement('configdoc'); - $this->writeElement('title', $interchange->name); - - foreach ($interchange->directives as $directive) { - $this->buildDirective($directive); - } - - if ($this->namespace) { - $this->endElement(); - } // namespace - - $this->endElement(); // configdoc - $this->flush(); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $directive - */ - public function buildDirective($directive) - { - // Kludge, although I suppose having a notion of a "root namespace" - // certainly makes things look nicer when documentation is built. - // Depends on things being sorted. - if (!$this->namespace || $this->namespace !== $directive->id->getRootNamespace()) { - if ($this->namespace) { - $this->endElement(); - } // namespace - $this->namespace = $directive->id->getRootNamespace(); - $this->startElement('namespace'); - $this->writeAttribute('id', $this->namespace); - $this->writeElement('name', $this->namespace); - } - - $this->startElement('directive'); - $this->writeAttribute('id', $directive->id->toString()); - - $this->writeElement('name', $directive->id->getDirective()); - - $this->startElement('aliases'); - foreach ($directive->aliases as $alias) { - $this->writeElement('alias', $alias->toString()); - } - $this->endElement(); // aliases - - $this->startElement('constraints'); - if ($directive->version) { - $this->writeElement('version', $directive->version); - } - $this->startElement('type'); - if ($directive->typeAllowsNull) { - $this->writeAttribute('allow-null', 'yes'); - } - $this->text($directive->type); - $this->endElement(); // type - if ($directive->allowed) { - $this->startElement('allowed'); - foreach ($directive->allowed as $value => $x) { - $this->writeElement('value', $value); - } - $this->endElement(); // allowed - } - $this->writeElement('default', $this->export($directive->default)); - $this->writeAttribute('xml:space', 'preserve'); - if ($directive->external) { - $this->startElement('external'); - foreach ($directive->external as $project) { - $this->writeElement('project', $project); - } - $this->endElement(); - } - $this->endElement(); // constraints - - if ($directive->deprecatedVersion) { - $this->startElement('deprecated'); - $this->writeElement('version', $directive->deprecatedVersion); - $this->writeElement('use', $directive->deprecatedUse->toString()); - $this->endElement(); // deprecated - } - - $this->startElement('description'); - $this->writeHTMLDiv($directive->description); - $this->endElement(); // description - - $this->endElement(); // directive - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php deleted file mode 100644 index 2671516c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Exception.php +++ /dev/null @@ -1,11 +0,0 @@ - array(directive info) - * @type HTMLPurifier_ConfigSchema_Interchange_Directive[] - */ - public $directives = array(); - - /** - * Adds a directive array to $directives - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $directive - * @throws HTMLPurifier_ConfigSchema_Exception - */ - public function addDirective($directive) - { - if (isset($this->directives[$i = $directive->id->toString()])) { - throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'"); - } - $this->directives[$i] = $directive; - } - - /** - * Convenience function to perform standard validation. Throws exception - * on failed validation. - */ - public function validate() - { - $validator = new HTMLPurifier_ConfigSchema_Validator(); - return $validator->validate($this); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php deleted file mode 100644 index 127a39a6..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Directive.php +++ /dev/null @@ -1,89 +0,0 @@ - true). - * Null if all values are allowed. - * @type array - */ - public $allowed; - - /** - * List of aliases for the directive. - * e.g. array(new HTMLPurifier_ConfigSchema_Interchange_Id('Ns', 'Dir'))). - * @type HTMLPurifier_ConfigSchema_Interchange_Id[] - */ - public $aliases = array(); - - /** - * Hash of value aliases, e.g. array('alt' => 'real'). Null if value - * aliasing is disabled (necessary for non-scalar types). - * @type array - */ - public $valueAliases; - - /** - * Version of HTML Purifier the directive was introduced, e.g. '1.3.1'. - * Null if the directive has always existed. - * @type string - */ - public $version; - - /** - * ID of directive that supercedes this old directive. - * Null if not deprecated. - * @type HTMLPurifier_ConfigSchema_Interchange_Id - */ - public $deprecatedUse; - - /** - * Version of HTML Purifier this directive was deprecated. Null if not - * deprecated. - * @type string - */ - public $deprecatedVersion; - - /** - * List of external projects this directive depends on, e.g. array('CSSTidy'). - * @type array - */ - public $external = array(); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php deleted file mode 100644 index 126f09d9..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php +++ /dev/null @@ -1,58 +0,0 @@ -key = $key; - } - - /** - * @return string - * @warning This is NOT magic, to ensure that people don't abuse SPL and - * cause problems for PHP 5.0 support. - */ - public function toString() - { - return $this->key; - } - - /** - * @return string - */ - public function getRootNamespace() - { - return substr($this->key, 0, strpos($this->key, ".")); - } - - /** - * @return string - */ - public function getDirective() - { - return substr($this->key, strpos($this->key, ".") + 1); - } - - /** - * @param string $id - * @return HTMLPurifier_ConfigSchema_Interchange_Id - */ - public static function make($id) - { - return new HTMLPurifier_ConfigSchema_Interchange_Id($id); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php deleted file mode 100644 index 655e6dd1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php +++ /dev/null @@ -1,226 +0,0 @@ -varParser = $varParser ? $varParser : new HTMLPurifier_VarParser_Native(); - } - - /** - * @param string $dir - * @return HTMLPurifier_ConfigSchema_Interchange - */ - public static function buildFromDirectory($dir = null) - { - $builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder(); - $interchange = new HTMLPurifier_ConfigSchema_Interchange(); - return $builder->buildDir($interchange, $dir); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - * @param string $dir - * @return HTMLPurifier_ConfigSchema_Interchange - */ - public function buildDir($interchange, $dir = null) - { - if (!$dir) { - $dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema'; - } - if (file_exists($dir . '/info.ini')) { - $info = parse_ini_file($dir . '/info.ini'); - $interchange->name = $info['name']; - } - - $files = array(); - $dh = opendir($dir); - while (false !== ($file = readdir($dh))) { - if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') { - continue; - } - $files[] = $file; - } - closedir($dh); - - sort($files); - foreach ($files as $file) { - $this->buildFile($interchange, $dir . '/' . $file); - } - return $interchange; - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - * @param string $file - */ - public function buildFile($interchange, $file) - { - $parser = new HTMLPurifier_StringHashParser(); - $this->build( - $interchange, - new HTMLPurifier_StringHash($parser->parseFile($file)) - ); - } - - /** - * Builds an interchange object based on a hash. - * @param HTMLPurifier_ConfigSchema_Interchange $interchange HTMLPurifier_ConfigSchema_Interchange object to build - * @param HTMLPurifier_StringHash $hash source data - * @throws HTMLPurifier_ConfigSchema_Exception - */ - public function build($interchange, $hash) - { - if (!$hash instanceof HTMLPurifier_StringHash) { - $hash = new HTMLPurifier_StringHash($hash); - } - if (!isset($hash['ID'])) { - throw new HTMLPurifier_ConfigSchema_Exception('Hash does not have any ID'); - } - if (strpos($hash['ID'], '.') === false) { - if (count($hash) == 2 && isset($hash['DESCRIPTION'])) { - $hash->offsetGet('DESCRIPTION'); // prevent complaining - } else { - throw new HTMLPurifier_ConfigSchema_Exception('All directives must have a namespace'); - } - } else { - $this->buildDirective($interchange, $hash); - } - $this->_findUnused($hash); - } - - /** - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - * @param HTMLPurifier_StringHash $hash - * @throws HTMLPurifier_ConfigSchema_Exception - */ - public function buildDirective($interchange, $hash) - { - $directive = new HTMLPurifier_ConfigSchema_Interchange_Directive(); - - // These are required elements: - $directive->id = $this->id($hash->offsetGet('ID')); - $id = $directive->id->toString(); // convenience - - if (isset($hash['TYPE'])) { - $type = explode('/', $hash->offsetGet('TYPE')); - if (isset($type[1])) { - $directive->typeAllowsNull = true; - } - $directive->type = $type[0]; - } else { - throw new HTMLPurifier_ConfigSchema_Exception("TYPE in directive hash '$id' not defined"); - } - - if (isset($hash['DEFAULT'])) { - try { - $directive->default = $this->varParser->parse( - $hash->offsetGet('DEFAULT'), - $directive->type, - $directive->typeAllowsNull - ); - } catch (HTMLPurifier_VarParserException $e) { - throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage() . " in DEFAULT in directive hash '$id'"); - } - } - - if (isset($hash['DESCRIPTION'])) { - $directive->description = $hash->offsetGet('DESCRIPTION'); - } - - if (isset($hash['ALLOWED'])) { - $directive->allowed = $this->lookup($this->evalArray($hash->offsetGet('ALLOWED'))); - } - - if (isset($hash['VALUE-ALIASES'])) { - $directive->valueAliases = $this->evalArray($hash->offsetGet('VALUE-ALIASES')); - } - - if (isset($hash['ALIASES'])) { - $raw_aliases = trim($hash->offsetGet('ALIASES')); - $aliases = preg_split('/\s*,\s*/', $raw_aliases); - foreach ($aliases as $alias) { - $directive->aliases[] = $this->id($alias); - } - } - - if (isset($hash['VERSION'])) { - $directive->version = $hash->offsetGet('VERSION'); - } - - if (isset($hash['DEPRECATED-USE'])) { - $directive->deprecatedUse = $this->id($hash->offsetGet('DEPRECATED-USE')); - } - - if (isset($hash['DEPRECATED-VERSION'])) { - $directive->deprecatedVersion = $hash->offsetGet('DEPRECATED-VERSION'); - } - - if (isset($hash['EXTERNAL'])) { - $directive->external = preg_split('/\s*,\s*/', trim($hash->offsetGet('EXTERNAL'))); - } - - $interchange->addDirective($directive); - } - - /** - * Evaluates an array PHP code string without array() wrapper - * @param string $contents - */ - protected function evalArray($contents) - { - return eval('return array(' . $contents . ');'); - } - - /** - * Converts an array list into a lookup array. - * @param array $array - * @return array - */ - protected function lookup($array) - { - $ret = array(); - foreach ($array as $val) { - $ret[$val] = true; - } - return $ret; - } - - /** - * Convenience function that creates an HTMLPurifier_ConfigSchema_Interchange_Id - * object based on a string Id. - * @param string $id - * @return HTMLPurifier_ConfigSchema_Interchange_Id - */ - protected function id($id) - { - return HTMLPurifier_ConfigSchema_Interchange_Id::make($id); - } - - /** - * Triggers errors for any unused keys passed in the hash; such keys - * may indicate typos, missing values, etc. - * @param HTMLPurifier_StringHash $hash Hash to check. - */ - protected function _findUnused($hash) - { - $accessed = $hash->getAccessed(); - foreach ($hash as $k => $v) { - if (!isset($accessed[$k])) { - trigger_error("String hash key '$k' not used by builder", E_USER_NOTICE); - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php deleted file mode 100644 index fb312778..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/Validator.php +++ /dev/null @@ -1,248 +0,0 @@ -parser = new HTMLPurifier_VarParser(); - } - - /** - * Validates a fully-formed interchange object. - * @param HTMLPurifier_ConfigSchema_Interchange $interchange - * @return bool - */ - public function validate($interchange) - { - $this->interchange = $interchange; - $this->aliases = array(); - // PHP is a bit lax with integer <=> string conversions in - // arrays, so we don't use the identical !== comparison - foreach ($interchange->directives as $i => $directive) { - $id = $directive->id->toString(); - if ($i != $id) { - $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'"); - } - $this->validateDirective($directive); - } - return true; - } - - /** - * Validates a HTMLPurifier_ConfigSchema_Interchange_Id object. - * @param HTMLPurifier_ConfigSchema_Interchange_Id $id - */ - public function validateId($id) - { - $id_string = $id->toString(); - $this->context[] = "id '$id_string'"; - if (!$id instanceof HTMLPurifier_ConfigSchema_Interchange_Id) { - // handled by InterchangeBuilder - $this->error(false, 'is not an instance of HTMLPurifier_ConfigSchema_Interchange_Id'); - } - // keys are now unconstrained (we might want to narrow down to A-Za-z0-9.) - // we probably should check that it has at least one namespace - $this->with($id, 'key') - ->assertNotEmpty() - ->assertIsString(); // implicit assertIsString handled by InterchangeBuilder - array_pop($this->context); - } - - /** - * Validates a HTMLPurifier_ConfigSchema_Interchange_Directive object. - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d - */ - public function validateDirective($d) - { - $id = $d->id->toString(); - $this->context[] = "directive '$id'"; - $this->validateId($d->id); - - $this->with($d, 'description') - ->assertNotEmpty(); - - // BEGIN - handled by InterchangeBuilder - $this->with($d, 'type') - ->assertNotEmpty(); - $this->with($d, 'typeAllowsNull') - ->assertIsBool(); - try { - // This also tests validity of $d->type - $this->parser->parse($d->default, $d->type, $d->typeAllowsNull); - } catch (HTMLPurifier_VarParserException $e) { - $this->error('default', 'had error: ' . $e->getMessage()); - } - // END - handled by InterchangeBuilder - - if (!is_null($d->allowed) || !empty($d->valueAliases)) { - // allowed and valueAliases require that we be dealing with - // strings, so check for that early. - $d_int = HTMLPurifier_VarParser::$types[$d->type]; - if (!isset(HTMLPurifier_VarParser::$stringTypes[$d_int])) { - $this->error('type', 'must be a string type when used with allowed or value aliases'); - } - } - - $this->validateDirectiveAllowed($d); - $this->validateDirectiveValueAliases($d); - $this->validateDirectiveAliases($d); - - array_pop($this->context); - } - - /** - * Extra validation if $allowed member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d - */ - public function validateDirectiveAllowed($d) - { - if (is_null($d->allowed)) { - return; - } - $this->with($d, 'allowed') - ->assertNotEmpty() - ->assertIsLookup(); // handled by InterchangeBuilder - if (is_string($d->default) && !isset($d->allowed[$d->default])) { - $this->error('default', 'must be an allowed value'); - } - $this->context[] = 'allowed'; - foreach ($d->allowed as $val => $x) { - if (!is_string($val)) { - $this->error("value $val", 'must be a string'); - } - } - array_pop($this->context); - } - - /** - * Extra validation if $valueAliases member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d - */ - public function validateDirectiveValueAliases($d) - { - if (is_null($d->valueAliases)) { - return; - } - $this->with($d, 'valueAliases') - ->assertIsArray(); // handled by InterchangeBuilder - $this->context[] = 'valueAliases'; - foreach ($d->valueAliases as $alias => $real) { - if (!is_string($alias)) { - $this->error("alias $alias", 'must be a string'); - } - if (!is_string($real)) { - $this->error("alias target $real from alias '$alias'", 'must be a string'); - } - if ($alias === $real) { - $this->error("alias '$alias'", "must not be an alias to itself"); - } - } - if (!is_null($d->allowed)) { - foreach ($d->valueAliases as $alias => $real) { - if (isset($d->allowed[$alias])) { - $this->error("alias '$alias'", 'must not be an allowed value'); - } elseif (!isset($d->allowed[$real])) { - $this->error("alias '$alias'", 'must be an alias to an allowed value'); - } - } - } - array_pop($this->context); - } - - /** - * Extra validation if $aliases member variable of - * HTMLPurifier_ConfigSchema_Interchange_Directive is defined. - * @param HTMLPurifier_ConfigSchema_Interchange_Directive $d - */ - public function validateDirectiveAliases($d) - { - $this->with($d, 'aliases') - ->assertIsArray(); // handled by InterchangeBuilder - $this->context[] = 'aliases'; - foreach ($d->aliases as $alias) { - $this->validateId($alias); - $s = $alias->toString(); - if (isset($this->interchange->directives[$s])) { - $this->error("alias '$s'", 'collides with another directive'); - } - if (isset($this->aliases[$s])) { - $other_directive = $this->aliases[$s]; - $this->error("alias '$s'", "collides with alias for directive '$other_directive'"); - } - $this->aliases[$s] = $d->id->toString(); - } - array_pop($this->context); - } - - // protected helper functions - - /** - * Convenience function for generating HTMLPurifier_ConfigSchema_ValidatorAtom - * for validating simple member variables of objects. - * @param $obj - * @param $member - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - protected function with($obj, $member) - { - return new HTMLPurifier_ConfigSchema_ValidatorAtom($this->getFormattedContext(), $obj, $member); - } - - /** - * Emits an error, providing helpful context. - * @throws HTMLPurifier_ConfigSchema_Exception - */ - protected function error($target, $msg) - { - if ($target !== false) { - $prefix = ucfirst($target) . ' in ' . $this->getFormattedContext(); - } else { - $prefix = ucfirst($this->getFormattedContext()); - } - throw new HTMLPurifier_ConfigSchema_Exception(trim($prefix . ' ' . $msg)); - } - - /** - * Returns a formatted context string. - * @return string - */ - protected function getFormattedContext() - { - return implode(' in ', array_reverse($this->context)); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php deleted file mode 100644 index c9aa3644..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/ValidatorAtom.php +++ /dev/null @@ -1,130 +0,0 @@ -context = $context; - $this->obj = $obj; - $this->member = $member; - $this->contents =& $obj->$member; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertIsString() - { - if (!is_string($this->contents)) { - $this->error('must be a string'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertIsBool() - { - if (!is_bool($this->contents)) { - $this->error('must be a boolean'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertIsArray() - { - if (!is_array($this->contents)) { - $this->error('must be an array'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertNotNull() - { - if ($this->contents === null) { - $this->error('must not be null'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertAlnum() - { - $this->assertIsString(); - if (!ctype_alnum($this->contents)) { - $this->error('must be alphanumeric'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertNotEmpty() - { - if (empty($this->contents)) { - $this->error('must not be empty'); - } - return $this; - } - - /** - * @return HTMLPurifier_ConfigSchema_ValidatorAtom - */ - public function assertIsLookup() - { - $this->assertIsArray(); - foreach ($this->contents as $v) { - if ($v !== true) { - $this->error('must be a lookup array'); - } - } - return $this; - } - - /** - * @param string $msg - * @throws HTMLPurifier_ConfigSchema_Exception - */ - protected function error($msg) - { - throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member) . ' in ' . $this->context . ' ' . $msg); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser deleted file mode 100644 index 3cd756be..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema.ser +++ /dev/null @@ -1 +0,0 @@ -O:25:"HTMLPurifier_ConfigSchema":3:{s:8:"defaults";a:128:{s:19:"Attr.AllowedClasses";N;s:24:"Attr.AllowedFrameTargets";a:0:{}s:15:"Attr.AllowedRel";a:0:{}s:15:"Attr.AllowedRev";a:0:{}s:18:"Attr.ClassUseCDATA";N;s:20:"Attr.DefaultImageAlt";N;s:24:"Attr.DefaultInvalidImage";s:0:"";s:27:"Attr.DefaultInvalidImageAlt";s:13:"Invalid image";s:19:"Attr.DefaultTextDir";s:3:"ltr";s:13:"Attr.EnableID";b:0;s:21:"Attr.ForbiddenClasses";a:0:{}s:13:"Attr.ID.HTML5";N;s:16:"Attr.IDBlacklist";a:0:{}s:22:"Attr.IDBlacklistRegexp";N;s:13:"Attr.IDPrefix";s:0:"";s:18:"Attr.IDPrefixLocal";s:0:"";s:24:"AutoFormat.AutoParagraph";b:0;s:17:"AutoFormat.Custom";a:0:{}s:25:"AutoFormat.DisplayLinkURI";b:0;s:18:"AutoFormat.Linkify";b:0;s:33:"AutoFormat.PurifierLinkify.DocURL";s:3:"#%s";s:26:"AutoFormat.PurifierLinkify";b:0;s:32:"AutoFormat.RemoveEmpty.Predicate";a:4:{s:8:"colgroup";a:0:{}s:2:"th";a:0:{}s:2:"td";a:0:{}s:6:"iframe";a:1:{i:0;s:3:"src";}}s:44:"AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions";a:2:{s:2:"td";b:1;s:2:"th";b:1;}s:33:"AutoFormat.RemoveEmpty.RemoveNbsp";b:0;s:22:"AutoFormat.RemoveEmpty";b:0;s:39:"AutoFormat.RemoveSpansWithoutAttributes";b:0;s:19:"CSS.AllowDuplicates";b:0;s:18:"CSS.AllowImportant";b:0;s:15:"CSS.AllowTricky";b:0;s:16:"CSS.AllowedFonts";N;s:21:"CSS.AllowedProperties";N;s:17:"CSS.DefinitionRev";i:1;s:23:"CSS.ForbiddenProperties";a:0:{}s:16:"CSS.MaxImgLength";s:6:"1200px";s:15:"CSS.Proprietary";b:0;s:11:"CSS.Trusted";b:0;s:20:"Cache.DefinitionImpl";s:10:"Serializer";s:20:"Cache.SerializerPath";N;s:27:"Cache.SerializerPermissions";i:493;s:22:"Core.AggressivelyFixLt";b:1;s:29:"Core.AggressivelyRemoveScript";b:1;s:28:"Core.AllowHostnameUnderscore";b:0;s:23:"Core.AllowParseManyTags";b:0;s:18:"Core.CollectErrors";b:0;s:18:"Core.ColorKeywords";a:148:{s:9:"aliceblue";s:7:"#F0F8FF";s:12:"antiquewhite";s:7:"#FAEBD7";s:4:"aqua";s:7:"#00FFFF";s:10:"aquamarine";s:7:"#7FFFD4";s:5:"azure";s:7:"#F0FFFF";s:5:"beige";s:7:"#F5F5DC";s:6:"bisque";s:7:"#FFE4C4";s:5:"black";s:7:"#000000";s:14:"blanchedalmond";s:7:"#FFEBCD";s:4:"blue";s:7:"#0000FF";s:10:"blueviolet";s:7:"#8A2BE2";s:5:"brown";s:7:"#A52A2A";s:9:"burlywood";s:7:"#DEB887";s:9:"cadetblue";s:7:"#5F9EA0";s:10:"chartreuse";s:7:"#7FFF00";s:9:"chocolate";s:7:"#D2691E";s:5:"coral";s:7:"#FF7F50";s:14:"cornflowerblue";s:7:"#6495ED";s:8:"cornsilk";s:7:"#FFF8DC";s:7:"crimson";s:7:"#DC143C";s:4:"cyan";s:7:"#00FFFF";s:8:"darkblue";s:7:"#00008B";s:8:"darkcyan";s:7:"#008B8B";s:13:"darkgoldenrod";s:7:"#B8860B";s:8:"darkgray";s:7:"#A9A9A9";s:8:"darkgrey";s:7:"#A9A9A9";s:9:"darkgreen";s:7:"#006400";s:9:"darkkhaki";s:7:"#BDB76B";s:11:"darkmagenta";s:7:"#8B008B";s:14:"darkolivegreen";s:7:"#556B2F";s:10:"darkorange";s:7:"#FF8C00";s:10:"darkorchid";s:7:"#9932CC";s:7:"darkred";s:7:"#8B0000";s:10:"darksalmon";s:7:"#E9967A";s:12:"darkseagreen";s:7:"#8FBC8F";s:13:"darkslateblue";s:7:"#483D8B";s:13:"darkslategray";s:7:"#2F4F4F";s:13:"darkslategrey";s:7:"#2F4F4F";s:13:"darkturquoise";s:7:"#00CED1";s:10:"darkviolet";s:7:"#9400D3";s:8:"deeppink";s:7:"#FF1493";s:11:"deepskyblue";s:7:"#00BFFF";s:7:"dimgray";s:7:"#696969";s:7:"dimgrey";s:7:"#696969";s:10:"dodgerblue";s:7:"#1E90FF";s:9:"firebrick";s:7:"#B22222";s:11:"floralwhite";s:7:"#FFFAF0";s:11:"forestgreen";s:7:"#228B22";s:7:"fuchsia";s:7:"#FF00FF";s:9:"gainsboro";s:7:"#DCDCDC";s:10:"ghostwhite";s:7:"#F8F8FF";s:4:"gold";s:7:"#FFD700";s:9:"goldenrod";s:7:"#DAA520";s:4:"gray";s:7:"#808080";s:4:"grey";s:7:"#808080";s:5:"green";s:7:"#008000";s:11:"greenyellow";s:7:"#ADFF2F";s:8:"honeydew";s:7:"#F0FFF0";s:7:"hotpink";s:7:"#FF69B4";s:9:"indianred";s:7:"#CD5C5C";s:6:"indigo";s:7:"#4B0082";s:5:"ivory";s:7:"#FFFFF0";s:5:"khaki";s:7:"#F0E68C";s:8:"lavender";s:7:"#E6E6FA";s:13:"lavenderblush";s:7:"#FFF0F5";s:9:"lawngreen";s:7:"#7CFC00";s:12:"lemonchiffon";s:7:"#FFFACD";s:9:"lightblue";s:7:"#ADD8E6";s:10:"lightcoral";s:7:"#F08080";s:9:"lightcyan";s:7:"#E0FFFF";s:20:"lightgoldenrodyellow";s:7:"#FAFAD2";s:9:"lightgray";s:7:"#D3D3D3";s:9:"lightgrey";s:7:"#D3D3D3";s:10:"lightgreen";s:7:"#90EE90";s:9:"lightpink";s:7:"#FFB6C1";s:11:"lightsalmon";s:7:"#FFA07A";s:13:"lightseagreen";s:7:"#20B2AA";s:12:"lightskyblue";s:7:"#87CEFA";s:14:"lightslategray";s:7:"#778899";s:14:"lightslategrey";s:7:"#778899";s:14:"lightsteelblue";s:7:"#B0C4DE";s:11:"lightyellow";s:7:"#FFFFE0";s:4:"lime";s:7:"#00FF00";s:9:"limegreen";s:7:"#32CD32";s:5:"linen";s:7:"#FAF0E6";s:7:"magenta";s:7:"#FF00FF";s:6:"maroon";s:7:"#800000";s:16:"mediumaquamarine";s:7:"#66CDAA";s:10:"mediumblue";s:7:"#0000CD";s:12:"mediumorchid";s:7:"#BA55D3";s:12:"mediumpurple";s:7:"#9370DB";s:14:"mediumseagreen";s:7:"#3CB371";s:15:"mediumslateblue";s:7:"#7B68EE";s:17:"mediumspringgreen";s:7:"#00FA9A";s:15:"mediumturquoise";s:7:"#48D1CC";s:15:"mediumvioletred";s:7:"#C71585";s:12:"midnightblue";s:7:"#191970";s:9:"mintcream";s:7:"#F5FFFA";s:9:"mistyrose";s:7:"#FFE4E1";s:8:"moccasin";s:7:"#FFE4B5";s:11:"navajowhite";s:7:"#FFDEAD";s:4:"navy";s:7:"#000080";s:7:"oldlace";s:7:"#FDF5E6";s:5:"olive";s:7:"#808000";s:9:"olivedrab";s:7:"#6B8E23";s:6:"orange";s:7:"#FFA500";s:9:"orangered";s:7:"#FF4500";s:6:"orchid";s:7:"#DA70D6";s:13:"palegoldenrod";s:7:"#EEE8AA";s:9:"palegreen";s:7:"#98FB98";s:13:"paleturquoise";s:7:"#AFEEEE";s:13:"palevioletred";s:7:"#DB7093";s:10:"papayawhip";s:7:"#FFEFD5";s:9:"peachpuff";s:7:"#FFDAB9";s:4:"peru";s:7:"#CD853F";s:4:"pink";s:7:"#FFC0CB";s:4:"plum";s:7:"#DDA0DD";s:10:"powderblue";s:7:"#B0E0E6";s:6:"purple";s:7:"#800080";s:13:"rebeccapurple";s:7:"#663399";s:3:"red";s:7:"#FF0000";s:9:"rosybrown";s:7:"#BC8F8F";s:9:"royalblue";s:7:"#4169E1";s:11:"saddlebrown";s:7:"#8B4513";s:6:"salmon";s:7:"#FA8072";s:10:"sandybrown";s:7:"#F4A460";s:8:"seagreen";s:7:"#2E8B57";s:8:"seashell";s:7:"#FFF5EE";s:6:"sienna";s:7:"#A0522D";s:6:"silver";s:7:"#C0C0C0";s:7:"skyblue";s:7:"#87CEEB";s:9:"slateblue";s:7:"#6A5ACD";s:9:"slategray";s:7:"#708090";s:9:"slategrey";s:7:"#708090";s:4:"snow";s:7:"#FFFAFA";s:11:"springgreen";s:7:"#00FF7F";s:9:"steelblue";s:7:"#4682B4";s:3:"tan";s:7:"#D2B48C";s:4:"teal";s:7:"#008080";s:7:"thistle";s:7:"#D8BFD8";s:6:"tomato";s:7:"#FF6347";s:9:"turquoise";s:7:"#40E0D0";s:6:"violet";s:7:"#EE82EE";s:5:"wheat";s:7:"#F5DEB3";s:5:"white";s:7:"#FFFFFF";s:10:"whitesmoke";s:7:"#F5F5F5";s:6:"yellow";s:7:"#FFFF00";s:11:"yellowgreen";s:7:"#9ACD32";}s:30:"Core.ConvertDocumentToFragment";b:1;s:36:"Core.DirectLexLineNumberSyncInterval";i:0;s:20:"Core.DisableExcludes";b:0;s:15:"Core.EnableIDNA";b:0;s:13:"Core.Encoding";s:5:"utf-8";s:26:"Core.EscapeInvalidChildren";b:0;s:22:"Core.EscapeInvalidTags";b:0;s:29:"Core.EscapeNonASCIICharacters";b:0;s:19:"Core.HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:13:"Core.Language";s:2:"en";s:24:"Core.LegacyEntityDecoder";b:0;s:14:"Core.LexerImpl";N;s:24:"Core.MaintainLineNumbers";N;s:22:"Core.NormalizeNewlines";b:1;s:17:"Core.RemoveBlanks";b:0;s:21:"Core.RemoveInvalidImg";b:1;s:33:"Core.RemoveProcessingInstructions";b:0;s:25:"Core.RemoveScriptContents";N;s:13:"Filter.Custom";a:0:{}s:34:"Filter.ExtractStyleBlocks.Escaping";b:1;s:31:"Filter.ExtractStyleBlocks.Scope";N;s:34:"Filter.ExtractStyleBlocks.TidyImpl";N;s:25:"Filter.ExtractStyleBlocks";b:0;s:14:"Filter.YouTube";b:0;s:12:"HTML.Allowed";N;s:22:"HTML.AllowedAttributes";N;s:20:"HTML.AllowedComments";a:0:{}s:26:"HTML.AllowedCommentsRegexp";N;s:20:"HTML.AllowedElements";N;s:19:"HTML.AllowedModules";N;s:23:"HTML.Attr.Name.UseCDATA";b:0;s:17:"HTML.BlockWrapper";s:1:"p";s:16:"HTML.CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:18:"HTML.CustomDoctype";N;s:17:"HTML.DefinitionID";N;s:18:"HTML.DefinitionRev";i:1;s:12:"HTML.Doctype";N;s:25:"HTML.FlashAllowFullScreen";b:0;s:24:"HTML.ForbiddenAttributes";a:0:{}s:22:"HTML.ForbiddenElements";a:0:{}s:10:"HTML.Forms";b:0;s:17:"HTML.MaxImgLength";i:1200;s:13:"HTML.Nofollow";b:0;s:11:"HTML.Parent";s:3:"div";s:16:"HTML.Proprietary";b:0;s:14:"HTML.SafeEmbed";b:0;s:15:"HTML.SafeIframe";b:0;s:15:"HTML.SafeObject";b:0;s:18:"HTML.SafeScripting";a:0:{}s:11:"HTML.Strict";b:0;s:16:"HTML.TargetBlank";b:0;s:19:"HTML.TargetNoopener";b:1;s:21:"HTML.TargetNoreferrer";b:1;s:12:"HTML.TidyAdd";a:0:{}s:14:"HTML.TidyLevel";s:6:"medium";s:15:"HTML.TidyRemove";a:0:{}s:12:"HTML.Trusted";b:0;s:10:"HTML.XHTML";b:1;s:28:"Output.CommentScriptContents";b:1;s:19:"Output.FixInnerHTML";b:1;s:18:"Output.FlashCompat";b:0;s:14:"Output.Newline";N;s:15:"Output.SortAttr";b:0;s:17:"Output.TidyFormat";b:0;s:17:"Test.ForceNoIconv";b:0;s:18:"URI.AllowedSchemes";a:7:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;s:3:"tel";b:1;}s:8:"URI.Base";N;s:17:"URI.DefaultScheme";s:4:"http";s:16:"URI.DefinitionID";N;s:17:"URI.DefinitionRev";i:1;s:11:"URI.Disable";b:0;s:19:"URI.DisableExternal";b:0;s:28:"URI.DisableExternalResources";b:0;s:20:"URI.DisableResources";b:0;s:8:"URI.Host";N;s:17:"URI.HostBlacklist";a:0:{}s:16:"URI.MakeAbsolute";b:0;s:9:"URI.Munge";N;s:18:"URI.MungeResources";b:0;s:18:"URI.MungeSecretKey";N;s:26:"URI.OverrideAllowedSchemes";b:1;s:20:"URI.SafeIframeRegexp";N;}s:12:"defaultPlist";O:25:"HTMLPurifier_PropertyList":3:{s:7:"*data";a:128:{s:19:"Attr.AllowedClasses";N;s:24:"Attr.AllowedFrameTargets";a:0:{}s:15:"Attr.AllowedRel";a:0:{}s:15:"Attr.AllowedRev";a:0:{}s:18:"Attr.ClassUseCDATA";N;s:20:"Attr.DefaultImageAlt";N;s:24:"Attr.DefaultInvalidImage";s:0:"";s:27:"Attr.DefaultInvalidImageAlt";s:13:"Invalid image";s:19:"Attr.DefaultTextDir";s:3:"ltr";s:13:"Attr.EnableID";b:0;s:21:"Attr.ForbiddenClasses";a:0:{}s:13:"Attr.ID.HTML5";N;s:16:"Attr.IDBlacklist";a:0:{}s:22:"Attr.IDBlacklistRegexp";N;s:13:"Attr.IDPrefix";s:0:"";s:18:"Attr.IDPrefixLocal";s:0:"";s:24:"AutoFormat.AutoParagraph";b:0;s:17:"AutoFormat.Custom";a:0:{}s:25:"AutoFormat.DisplayLinkURI";b:0;s:18:"AutoFormat.Linkify";b:0;s:33:"AutoFormat.PurifierLinkify.DocURL";s:3:"#%s";s:26:"AutoFormat.PurifierLinkify";b:0;s:32:"AutoFormat.RemoveEmpty.Predicate";a:4:{s:8:"colgroup";a:0:{}s:2:"th";a:0:{}s:2:"td";a:0:{}s:6:"iframe";a:1:{i:0;s:3:"src";}}s:44:"AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions";a:2:{s:2:"td";b:1;s:2:"th";b:1;}s:33:"AutoFormat.RemoveEmpty.RemoveNbsp";b:0;s:22:"AutoFormat.RemoveEmpty";b:0;s:39:"AutoFormat.RemoveSpansWithoutAttributes";b:0;s:19:"CSS.AllowDuplicates";b:0;s:18:"CSS.AllowImportant";b:0;s:15:"CSS.AllowTricky";b:0;s:16:"CSS.AllowedFonts";N;s:21:"CSS.AllowedProperties";N;s:17:"CSS.DefinitionRev";i:1;s:23:"CSS.ForbiddenProperties";a:0:{}s:16:"CSS.MaxImgLength";s:6:"1200px";s:15:"CSS.Proprietary";b:0;s:11:"CSS.Trusted";b:0;s:20:"Cache.DefinitionImpl";s:10:"Serializer";s:20:"Cache.SerializerPath";N;s:27:"Cache.SerializerPermissions";i:493;s:22:"Core.AggressivelyFixLt";b:1;s:29:"Core.AggressivelyRemoveScript";b:1;s:28:"Core.AllowHostnameUnderscore";b:0;s:23:"Core.AllowParseManyTags";b:0;s:18:"Core.CollectErrors";b:0;s:18:"Core.ColorKeywords";a:148:{s:9:"aliceblue";s:7:"#F0F8FF";s:12:"antiquewhite";s:7:"#FAEBD7";s:4:"aqua";s:7:"#00FFFF";s:10:"aquamarine";s:7:"#7FFFD4";s:5:"azure";s:7:"#F0FFFF";s:5:"beige";s:7:"#F5F5DC";s:6:"bisque";s:7:"#FFE4C4";s:5:"black";s:7:"#000000";s:14:"blanchedalmond";s:7:"#FFEBCD";s:4:"blue";s:7:"#0000FF";s:10:"blueviolet";s:7:"#8A2BE2";s:5:"brown";s:7:"#A52A2A";s:9:"burlywood";s:7:"#DEB887";s:9:"cadetblue";s:7:"#5F9EA0";s:10:"chartreuse";s:7:"#7FFF00";s:9:"chocolate";s:7:"#D2691E";s:5:"coral";s:7:"#FF7F50";s:14:"cornflowerblue";s:7:"#6495ED";s:8:"cornsilk";s:7:"#FFF8DC";s:7:"crimson";s:7:"#DC143C";s:4:"cyan";s:7:"#00FFFF";s:8:"darkblue";s:7:"#00008B";s:8:"darkcyan";s:7:"#008B8B";s:13:"darkgoldenrod";s:7:"#B8860B";s:8:"darkgray";s:7:"#A9A9A9";s:8:"darkgrey";s:7:"#A9A9A9";s:9:"darkgreen";s:7:"#006400";s:9:"darkkhaki";s:7:"#BDB76B";s:11:"darkmagenta";s:7:"#8B008B";s:14:"darkolivegreen";s:7:"#556B2F";s:10:"darkorange";s:7:"#FF8C00";s:10:"darkorchid";s:7:"#9932CC";s:7:"darkred";s:7:"#8B0000";s:10:"darksalmon";s:7:"#E9967A";s:12:"darkseagreen";s:7:"#8FBC8F";s:13:"darkslateblue";s:7:"#483D8B";s:13:"darkslategray";s:7:"#2F4F4F";s:13:"darkslategrey";s:7:"#2F4F4F";s:13:"darkturquoise";s:7:"#00CED1";s:10:"darkviolet";s:7:"#9400D3";s:8:"deeppink";s:7:"#FF1493";s:11:"deepskyblue";s:7:"#00BFFF";s:7:"dimgray";s:7:"#696969";s:7:"dimgrey";s:7:"#696969";s:10:"dodgerblue";s:7:"#1E90FF";s:9:"firebrick";s:7:"#B22222";s:11:"floralwhite";s:7:"#FFFAF0";s:11:"forestgreen";s:7:"#228B22";s:7:"fuchsia";s:7:"#FF00FF";s:9:"gainsboro";s:7:"#DCDCDC";s:10:"ghostwhite";s:7:"#F8F8FF";s:4:"gold";s:7:"#FFD700";s:9:"goldenrod";s:7:"#DAA520";s:4:"gray";s:7:"#808080";s:4:"grey";s:7:"#808080";s:5:"green";s:7:"#008000";s:11:"greenyellow";s:7:"#ADFF2F";s:8:"honeydew";s:7:"#F0FFF0";s:7:"hotpink";s:7:"#FF69B4";s:9:"indianred";s:7:"#CD5C5C";s:6:"indigo";s:7:"#4B0082";s:5:"ivory";s:7:"#FFFFF0";s:5:"khaki";s:7:"#F0E68C";s:8:"lavender";s:7:"#E6E6FA";s:13:"lavenderblush";s:7:"#FFF0F5";s:9:"lawngreen";s:7:"#7CFC00";s:12:"lemonchiffon";s:7:"#FFFACD";s:9:"lightblue";s:7:"#ADD8E6";s:10:"lightcoral";s:7:"#F08080";s:9:"lightcyan";s:7:"#E0FFFF";s:20:"lightgoldenrodyellow";s:7:"#FAFAD2";s:9:"lightgray";s:7:"#D3D3D3";s:9:"lightgrey";s:7:"#D3D3D3";s:10:"lightgreen";s:7:"#90EE90";s:9:"lightpink";s:7:"#FFB6C1";s:11:"lightsalmon";s:7:"#FFA07A";s:13:"lightseagreen";s:7:"#20B2AA";s:12:"lightskyblue";s:7:"#87CEFA";s:14:"lightslategray";s:7:"#778899";s:14:"lightslategrey";s:7:"#778899";s:14:"lightsteelblue";s:7:"#B0C4DE";s:11:"lightyellow";s:7:"#FFFFE0";s:4:"lime";s:7:"#00FF00";s:9:"limegreen";s:7:"#32CD32";s:5:"linen";s:7:"#FAF0E6";s:7:"magenta";s:7:"#FF00FF";s:6:"maroon";s:7:"#800000";s:16:"mediumaquamarine";s:7:"#66CDAA";s:10:"mediumblue";s:7:"#0000CD";s:12:"mediumorchid";s:7:"#BA55D3";s:12:"mediumpurple";s:7:"#9370DB";s:14:"mediumseagreen";s:7:"#3CB371";s:15:"mediumslateblue";s:7:"#7B68EE";s:17:"mediumspringgreen";s:7:"#00FA9A";s:15:"mediumturquoise";s:7:"#48D1CC";s:15:"mediumvioletred";s:7:"#C71585";s:12:"midnightblue";s:7:"#191970";s:9:"mintcream";s:7:"#F5FFFA";s:9:"mistyrose";s:7:"#FFE4E1";s:8:"moccasin";s:7:"#FFE4B5";s:11:"navajowhite";s:7:"#FFDEAD";s:4:"navy";s:7:"#000080";s:7:"oldlace";s:7:"#FDF5E6";s:5:"olive";s:7:"#808000";s:9:"olivedrab";s:7:"#6B8E23";s:6:"orange";s:7:"#FFA500";s:9:"orangered";s:7:"#FF4500";s:6:"orchid";s:7:"#DA70D6";s:13:"palegoldenrod";s:7:"#EEE8AA";s:9:"palegreen";s:7:"#98FB98";s:13:"paleturquoise";s:7:"#AFEEEE";s:13:"palevioletred";s:7:"#DB7093";s:10:"papayawhip";s:7:"#FFEFD5";s:9:"peachpuff";s:7:"#FFDAB9";s:4:"peru";s:7:"#CD853F";s:4:"pink";s:7:"#FFC0CB";s:4:"plum";s:7:"#DDA0DD";s:10:"powderblue";s:7:"#B0E0E6";s:6:"purple";s:7:"#800080";s:13:"rebeccapurple";s:7:"#663399";s:3:"red";s:7:"#FF0000";s:9:"rosybrown";s:7:"#BC8F8F";s:9:"royalblue";s:7:"#4169E1";s:11:"saddlebrown";s:7:"#8B4513";s:6:"salmon";s:7:"#FA8072";s:10:"sandybrown";s:7:"#F4A460";s:8:"seagreen";s:7:"#2E8B57";s:8:"seashell";s:7:"#FFF5EE";s:6:"sienna";s:7:"#A0522D";s:6:"silver";s:7:"#C0C0C0";s:7:"skyblue";s:7:"#87CEEB";s:9:"slateblue";s:7:"#6A5ACD";s:9:"slategray";s:7:"#708090";s:9:"slategrey";s:7:"#708090";s:4:"snow";s:7:"#FFFAFA";s:11:"springgreen";s:7:"#00FF7F";s:9:"steelblue";s:7:"#4682B4";s:3:"tan";s:7:"#D2B48C";s:4:"teal";s:7:"#008080";s:7:"thistle";s:7:"#D8BFD8";s:6:"tomato";s:7:"#FF6347";s:9:"turquoise";s:7:"#40E0D0";s:6:"violet";s:7:"#EE82EE";s:5:"wheat";s:7:"#F5DEB3";s:5:"white";s:7:"#FFFFFF";s:10:"whitesmoke";s:7:"#F5F5F5";s:6:"yellow";s:7:"#FFFF00";s:11:"yellowgreen";s:7:"#9ACD32";}s:30:"Core.ConvertDocumentToFragment";b:1;s:36:"Core.DirectLexLineNumberSyncInterval";i:0;s:20:"Core.DisableExcludes";b:0;s:15:"Core.EnableIDNA";b:0;s:13:"Core.Encoding";s:5:"utf-8";s:26:"Core.EscapeInvalidChildren";b:0;s:22:"Core.EscapeInvalidTags";b:0;s:29:"Core.EscapeNonASCIICharacters";b:0;s:19:"Core.HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:13:"Core.Language";s:2:"en";s:24:"Core.LegacyEntityDecoder";b:0;s:14:"Core.LexerImpl";N;s:24:"Core.MaintainLineNumbers";N;s:22:"Core.NormalizeNewlines";b:1;s:17:"Core.RemoveBlanks";b:0;s:21:"Core.RemoveInvalidImg";b:1;s:33:"Core.RemoveProcessingInstructions";b:0;s:25:"Core.RemoveScriptContents";N;s:13:"Filter.Custom";a:0:{}s:34:"Filter.ExtractStyleBlocks.Escaping";b:1;s:31:"Filter.ExtractStyleBlocks.Scope";N;s:34:"Filter.ExtractStyleBlocks.TidyImpl";N;s:25:"Filter.ExtractStyleBlocks";b:0;s:14:"Filter.YouTube";b:0;s:12:"HTML.Allowed";N;s:22:"HTML.AllowedAttributes";N;s:20:"HTML.AllowedComments";a:0:{}s:26:"HTML.AllowedCommentsRegexp";N;s:20:"HTML.AllowedElements";N;s:19:"HTML.AllowedModules";N;s:23:"HTML.Attr.Name.UseCDATA";b:0;s:17:"HTML.BlockWrapper";s:1:"p";s:16:"HTML.CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:18:"HTML.CustomDoctype";N;s:17:"HTML.DefinitionID";N;s:18:"HTML.DefinitionRev";i:1;s:12:"HTML.Doctype";N;s:25:"HTML.FlashAllowFullScreen";b:0;s:24:"HTML.ForbiddenAttributes";a:0:{}s:22:"HTML.ForbiddenElements";a:0:{}s:10:"HTML.Forms";b:0;s:17:"HTML.MaxImgLength";i:1200;s:13:"HTML.Nofollow";b:0;s:11:"HTML.Parent";s:3:"div";s:16:"HTML.Proprietary";b:0;s:14:"HTML.SafeEmbed";b:0;s:15:"HTML.SafeIframe";b:0;s:15:"HTML.SafeObject";b:0;s:18:"HTML.SafeScripting";a:0:{}s:11:"HTML.Strict";b:0;s:16:"HTML.TargetBlank";b:0;s:19:"HTML.TargetNoopener";b:1;s:21:"HTML.TargetNoreferrer";b:1;s:12:"HTML.TidyAdd";a:0:{}s:14:"HTML.TidyLevel";s:6:"medium";s:15:"HTML.TidyRemove";a:0:{}s:12:"HTML.Trusted";b:0;s:10:"HTML.XHTML";b:1;s:28:"Output.CommentScriptContents";b:1;s:19:"Output.FixInnerHTML";b:1;s:18:"Output.FlashCompat";b:0;s:14:"Output.Newline";N;s:15:"Output.SortAttr";b:0;s:17:"Output.TidyFormat";b:0;s:17:"Test.ForceNoIconv";b:0;s:18:"URI.AllowedSchemes";a:7:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;s:3:"tel";b:1;}s:8:"URI.Base";N;s:17:"URI.DefaultScheme";s:4:"http";s:16:"URI.DefinitionID";N;s:17:"URI.DefinitionRev";i:1;s:11:"URI.Disable";b:0;s:19:"URI.DisableExternal";b:0;s:28:"URI.DisableExternalResources";b:0;s:20:"URI.DisableResources";b:0;s:8:"URI.Host";N;s:17:"URI.HostBlacklist";a:0:{}s:16:"URI.MakeAbsolute";b:0;s:9:"URI.Munge";N;s:18:"URI.MungeResources";b:0;s:18:"URI.MungeSecretKey";N;s:26:"URI.OverrideAllowedSchemes";b:1;s:20:"URI.SafeIframeRegexp";N;}s:9:"*parent";N;s:8:"*cache";N;}s:4:"info";a:141:{s:19:"Attr.AllowedClasses";i:-8;s:24:"Attr.AllowedFrameTargets";i:8;s:15:"Attr.AllowedRel";i:8;s:15:"Attr.AllowedRev";i:8;s:18:"Attr.ClassUseCDATA";i:-7;s:20:"Attr.DefaultImageAlt";i:-1;s:24:"Attr.DefaultInvalidImage";i:1;s:27:"Attr.DefaultInvalidImageAlt";i:1;s:19:"Attr.DefaultTextDir";O:8:"stdClass":2:{s:4:"type";i:1;s:7:"allowed";a:2:{s:3:"ltr";b:1;s:3:"rtl";b:1;}}s:13:"Attr.EnableID";i:7;s:17:"HTML.EnableAttrID";O:8:"stdClass":2:{s:3:"key";s:13:"Attr.EnableID";s:7:"isAlias";b:1;}s:21:"Attr.ForbiddenClasses";i:8;s:13:"Attr.ID.HTML5";i:-7;s:16:"Attr.IDBlacklist";i:9;s:22:"Attr.IDBlacklistRegexp";i:-1;s:13:"Attr.IDPrefix";i:1;s:18:"Attr.IDPrefixLocal";i:1;s:24:"AutoFormat.AutoParagraph";i:7;s:17:"AutoFormat.Custom";i:9;s:25:"AutoFormat.DisplayLinkURI";i:7;s:18:"AutoFormat.Linkify";i:7;s:33:"AutoFormat.PurifierLinkify.DocURL";i:1;s:37:"AutoFormatParam.PurifierLinkifyDocURL";O:8:"stdClass":2:{s:3:"key";s:33:"AutoFormat.PurifierLinkify.DocURL";s:7:"isAlias";b:1;}s:26:"AutoFormat.PurifierLinkify";i:7;s:32:"AutoFormat.RemoveEmpty.Predicate";i:10;s:44:"AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions";i:8;s:33:"AutoFormat.RemoveEmpty.RemoveNbsp";i:7;s:22:"AutoFormat.RemoveEmpty";i:7;s:39:"AutoFormat.RemoveSpansWithoutAttributes";i:7;s:19:"CSS.AllowDuplicates";i:7;s:18:"CSS.AllowImportant";i:7;s:15:"CSS.AllowTricky";i:7;s:16:"CSS.AllowedFonts";i:-8;s:21:"CSS.AllowedProperties";i:-8;s:17:"CSS.DefinitionRev";i:5;s:23:"CSS.ForbiddenProperties";i:8;s:16:"CSS.MaxImgLength";i:-1;s:15:"CSS.Proprietary";i:7;s:11:"CSS.Trusted";i:7;s:20:"Cache.DefinitionImpl";i:-1;s:20:"Core.DefinitionCache";O:8:"stdClass":2:{s:3:"key";s:20:"Cache.DefinitionImpl";s:7:"isAlias";b:1;}s:20:"Cache.SerializerPath";i:-1;s:27:"Cache.SerializerPermissions";i:-5;s:22:"Core.AggressivelyFixLt";i:7;s:29:"Core.AggressivelyRemoveScript";i:7;s:28:"Core.AllowHostnameUnderscore";i:7;s:23:"Core.AllowParseManyTags";i:7;s:18:"Core.CollectErrors";i:7;s:18:"Core.ColorKeywords";i:10;s:30:"Core.ConvertDocumentToFragment";i:7;s:24:"Core.AcceptFullDocuments";O:8:"stdClass":2:{s:3:"key";s:30:"Core.ConvertDocumentToFragment";s:7:"isAlias";b:1;}s:36:"Core.DirectLexLineNumberSyncInterval";i:5;s:20:"Core.DisableExcludes";i:7;s:15:"Core.EnableIDNA";i:7;s:13:"Core.Encoding";i:2;s:26:"Core.EscapeInvalidChildren";i:7;s:22:"Core.EscapeInvalidTags";i:7;s:29:"Core.EscapeNonASCIICharacters";i:7;s:19:"Core.HiddenElements";i:8;s:13:"Core.Language";i:1;s:24:"Core.LegacyEntityDecoder";i:7;s:14:"Core.LexerImpl";i:-11;s:24:"Core.MaintainLineNumbers";i:-7;s:22:"Core.NormalizeNewlines";i:7;s:17:"Core.RemoveBlanks";i:7;s:21:"Core.RemoveInvalidImg";i:7;s:33:"Core.RemoveProcessingInstructions";i:7;s:25:"Core.RemoveScriptContents";i:-7;s:13:"Filter.Custom";i:9;s:34:"Filter.ExtractStyleBlocks.Escaping";i:7;s:33:"Filter.ExtractStyleBlocksEscaping";O:8:"stdClass":2:{s:3:"key";s:34:"Filter.ExtractStyleBlocks.Escaping";s:7:"isAlias";b:1;}s:38:"FilterParam.ExtractStyleBlocksEscaping";O:8:"stdClass":2:{s:3:"key";s:34:"Filter.ExtractStyleBlocks.Escaping";s:7:"isAlias";b:1;}s:31:"Filter.ExtractStyleBlocks.Scope";i:-1;s:30:"Filter.ExtractStyleBlocksScope";O:8:"stdClass":2:{s:3:"key";s:31:"Filter.ExtractStyleBlocks.Scope";s:7:"isAlias";b:1;}s:35:"FilterParam.ExtractStyleBlocksScope";O:8:"stdClass":2:{s:3:"key";s:31:"Filter.ExtractStyleBlocks.Scope";s:7:"isAlias";b:1;}s:34:"Filter.ExtractStyleBlocks.TidyImpl";i:-11;s:38:"FilterParam.ExtractStyleBlocksTidyImpl";O:8:"stdClass":2:{s:3:"key";s:34:"Filter.ExtractStyleBlocks.TidyImpl";s:7:"isAlias";b:1;}s:25:"Filter.ExtractStyleBlocks";i:7;s:14:"Filter.YouTube";i:7;s:12:"HTML.Allowed";i:-4;s:22:"HTML.AllowedAttributes";i:-8;s:20:"HTML.AllowedComments";i:8;s:26:"HTML.AllowedCommentsRegexp";i:-1;s:20:"HTML.AllowedElements";i:-8;s:19:"HTML.AllowedModules";i:-8;s:23:"HTML.Attr.Name.UseCDATA";i:7;s:17:"HTML.BlockWrapper";i:1;s:16:"HTML.CoreModules";i:8;s:18:"HTML.CustomDoctype";i:-1;s:17:"HTML.DefinitionID";i:-1;s:18:"HTML.DefinitionRev";i:5;s:12:"HTML.Doctype";O:8:"stdClass":3:{s:4:"type";i:1;s:10:"allow_null";b:1;s:7:"allowed";a:5:{s:22:"HTML 4.01 Transitional";b:1;s:16:"HTML 4.01 Strict";b:1;s:22:"XHTML 1.0 Transitional";b:1;s:16:"XHTML 1.0 Strict";b:1;s:9:"XHTML 1.1";b:1;}}s:25:"HTML.FlashAllowFullScreen";i:7;s:24:"HTML.ForbiddenAttributes";i:8;s:22:"HTML.ForbiddenElements";i:8;s:10:"HTML.Forms";i:7;s:17:"HTML.MaxImgLength";i:-5;s:13:"HTML.Nofollow";i:7;s:11:"HTML.Parent";i:1;s:16:"HTML.Proprietary";i:7;s:14:"HTML.SafeEmbed";i:7;s:15:"HTML.SafeIframe";i:7;s:15:"HTML.SafeObject";i:7;s:18:"HTML.SafeScripting";i:8;s:11:"HTML.Strict";i:7;s:16:"HTML.TargetBlank";i:7;s:19:"HTML.TargetNoopener";i:7;s:21:"HTML.TargetNoreferrer";i:7;s:12:"HTML.TidyAdd";i:8;s:14:"HTML.TidyLevel";O:8:"stdClass":2:{s:4:"type";i:1;s:7:"allowed";a:4:{s:4:"none";b:1;s:5:"light";b:1;s:6:"medium";b:1;s:5:"heavy";b:1;}}s:15:"HTML.TidyRemove";i:8;s:12:"HTML.Trusted";i:7;s:10:"HTML.XHTML";i:7;s:10:"Core.XHTML";O:8:"stdClass":2:{s:3:"key";s:10:"HTML.XHTML";s:7:"isAlias";b:1;}s:28:"Output.CommentScriptContents";i:7;s:26:"Core.CommentScriptContents";O:8:"stdClass":2:{s:3:"key";s:28:"Output.CommentScriptContents";s:7:"isAlias";b:1;}s:19:"Output.FixInnerHTML";i:7;s:18:"Output.FlashCompat";i:7;s:14:"Output.Newline";i:-1;s:15:"Output.SortAttr";i:7;s:17:"Output.TidyFormat";i:7;s:15:"Core.TidyFormat";O:8:"stdClass":2:{s:3:"key";s:17:"Output.TidyFormat";s:7:"isAlias";b:1;}s:17:"Test.ForceNoIconv";i:7;s:18:"URI.AllowedSchemes";i:8;s:8:"URI.Base";i:-1;s:17:"URI.DefaultScheme";i:-1;s:16:"URI.DefinitionID";i:-1;s:17:"URI.DefinitionRev";i:5;s:11:"URI.Disable";i:7;s:15:"Attr.DisableURI";O:8:"stdClass":2:{s:3:"key";s:11:"URI.Disable";s:7:"isAlias";b:1;}s:19:"URI.DisableExternal";i:7;s:28:"URI.DisableExternalResources";i:7;s:20:"URI.DisableResources";i:7;s:8:"URI.Host";i:-1;s:17:"URI.HostBlacklist";i:9;s:16:"URI.MakeAbsolute";i:7;s:9:"URI.Munge";i:-1;s:18:"URI.MungeResources";i:7;s:18:"URI.MungeSecretKey";i:-1;s:26:"URI.OverrideAllowedSchemes";i:7;s:20:"URI.SafeIframeRegexp";i:-1;}} \ No newline at end of file diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt deleted file mode 100644 index 0517fed0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedClasses.txt +++ /dev/null @@ -1,8 +0,0 @@ -Attr.AllowedClasses -TYPE: lookup/null -VERSION: 4.0.0 -DEFAULT: null ---DESCRIPTION-- -List of allowed class values in the class attribute. By default, this is null, -which means all classes are allowed. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt deleted file mode 100644 index 249edd64..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedFrameTargets.txt +++ /dev/null @@ -1,12 +0,0 @@ -Attr.AllowedFrameTargets -TYPE: lookup -DEFAULT: array() ---DESCRIPTION-- -Lookup table of all allowed link frame targets. Some commonly used link -targets include _blank, _self, _parent and _top. Values should be -lowercase, as validation will be done in a case-sensitive manner despite -W3C's recommendation. XHTML 1.0 Strict does not permit the target attribute -so this directive will have no effect in that doctype. XHTML 1.1 does not -enable the Target module by default, you will have to manually enable it -(see the module documentation for more details.) ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt deleted file mode 100644 index 9a8fa6a2..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRel.txt +++ /dev/null @@ -1,9 +0,0 @@ -Attr.AllowedRel -TYPE: lookup -VERSION: 1.6.0 -DEFAULT: array() ---DESCRIPTION-- -List of allowed forward document relationships in the rel attribute. Common -values may be nofollow or print. By default, this is empty, meaning that no -document relationships are allowed. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt deleted file mode 100644 index b0178834..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.AllowedRev.txt +++ /dev/null @@ -1,9 +0,0 @@ -Attr.AllowedRev -TYPE: lookup -VERSION: 1.6.0 -DEFAULT: array() ---DESCRIPTION-- -List of allowed reverse document relationships in the rev attribute. This -attribute is a bit of an edge-case; if you don't know what it is for, stay -away. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt deleted file mode 100644 index e774b823..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ClassUseCDATA.txt +++ /dev/null @@ -1,19 +0,0 @@ -Attr.ClassUseCDATA -TYPE: bool/null -DEFAULT: null -VERSION: 4.0.0 ---DESCRIPTION-- -If null, class will auto-detect the doctype and, if matching XHTML 1.1 or -XHTML 2.0, will use the restrictive NMTOKENS specification of class. Otherwise, -it will use a relaxed CDATA definition. If true, the relaxed CDATA definition -is forced; if false, the NMTOKENS definition is forced. To get behavior -of HTML Purifier prior to 4.0.0, set this directive to false. - -Some rational behind the auto-detection: -in previous versions of HTML Purifier, it was assumed that the form of -class was NMTOKENS, as specified by the XHTML Modularization (representing -XHTML 1.1 and XHTML 2.0). The DTDs for HTML 4.01 and XHTML 1.0, however -specify class as CDATA. HTML 5 effectively defines it as CDATA, but -with the additional constraint that each name should be unique (this is not -explicitly outlined in previous specifications). ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt deleted file mode 100644 index 533165e1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultImageAlt.txt +++ /dev/null @@ -1,11 +0,0 @@ -Attr.DefaultImageAlt -TYPE: string/null -DEFAULT: null -VERSION: 3.2.0 ---DESCRIPTION-- -This is the content of the alt tag of an image if the user had not -previously specified an alt attribute. This applies to all images without -a valid alt attribute, as opposed to %Attr.DefaultInvalidImageAlt, which -only applies to invalid images, and overrides in the case of an invalid image. -Default behavior with null is to use the basename of the src tag for the alt. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt deleted file mode 100644 index 9eb7e384..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImage.txt +++ /dev/null @@ -1,9 +0,0 @@ -Attr.DefaultInvalidImage -TYPE: string -DEFAULT: '' ---DESCRIPTION-- -This is the default image an img tag will be pointed to if it does not have -a valid src attribute. In future versions, we may allow the image tag to -be removed completely, but due to design issues, this is not possible right -now. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt deleted file mode 100644 index 2f17bf47..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultInvalidImageAlt.txt +++ /dev/null @@ -1,8 +0,0 @@ -Attr.DefaultInvalidImageAlt -TYPE: string -DEFAULT: 'Invalid image' ---DESCRIPTION-- -This is the content of the alt tag of an invalid image if the user had not -previously specified an alt attribute. It has no effect when the image is -valid but there was no alt attribute present. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt deleted file mode 100644 index 52654b53..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.DefaultTextDir.txt +++ /dev/null @@ -1,10 +0,0 @@ -Attr.DefaultTextDir -TYPE: string -DEFAULT: 'ltr' ---DESCRIPTION-- -Defines the default text direction (ltr or rtl) of the document being -parsed. This generally is the same as the value of the dir attribute in -HTML, or ltr if that is not specified. ---ALLOWED-- -'ltr', 'rtl' ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt deleted file mode 100644 index 6440d210..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt +++ /dev/null @@ -1,16 +0,0 @@ -Attr.EnableID -TYPE: bool -DEFAULT: false -VERSION: 1.2.0 ---DESCRIPTION-- -Allows the ID attribute in HTML. This is disabled by default due to the -fact that without proper configuration user input can easily break the -validation of a webpage by specifying an ID that is already on the -surrounding HTML. If you don't mind throwing caution to the wind, enable -this directive, but I strongly recommend you also consider blacklisting IDs -you use (%Attr.IDBlacklist) or prefixing all user supplied IDs -(%Attr.IDPrefix). When set to true HTML Purifier reverts to the behavior of -pre-1.2.0 versions. ---ALIASES-- -HTML.EnableAttrID ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt deleted file mode 100644 index f31d226f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ForbiddenClasses.txt +++ /dev/null @@ -1,8 +0,0 @@ -Attr.ForbiddenClasses -TYPE: lookup -VERSION: 4.0.0 -DEFAULT: array() ---DESCRIPTION-- -List of forbidden class values in the class attribute. By default, this is -empty, which means that no classes are forbidden. See also %Attr.AllowedClasses. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt deleted file mode 100644 index 735d4b7a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.ID.HTML5.txt +++ /dev/null @@ -1,10 +0,0 @@ -Attr.ID.HTML5 -TYPE: bool/null -DEFAULT: null -VERSION: 4.8.0 ---DESCRIPTION-- -In HTML5, restrictions on the format of the id attribute have been significantly -relaxed, such that any string is valid so long as it contains no spaces and -is at least one character. In lieu of a general HTML5 compatibility flag, -set this configuration directive to true to use the relaxed rules. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt deleted file mode 100644 index 5f2b5e3d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklist.txt +++ /dev/null @@ -1,5 +0,0 @@ -Attr.IDBlacklist -TYPE: list -DEFAULT: array() -DESCRIPTION: Array of IDs not allowed in the document. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt deleted file mode 100644 index 6f582458..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDBlacklistRegexp.txt +++ /dev/null @@ -1,9 +0,0 @@ -Attr.IDBlacklistRegexp -TYPE: string/null -VERSION: 1.6.0 -DEFAULT: NULL ---DESCRIPTION-- -PCRE regular expression to be matched against all IDs. If the expression is -matches, the ID is rejected. Use this with care: may cause significant -degradation. ID matching is done after all other validation. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt deleted file mode 100644 index cc49d43f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt +++ /dev/null @@ -1,12 +0,0 @@ -Attr.IDPrefix -TYPE: string -VERSION: 1.2.0 -DEFAULT: '' ---DESCRIPTION-- -String to prefix to IDs. If you have no idea what IDs your pages may use, -you may opt to simply add a prefix to all user-submitted ID attributes so -that they are still usable, but will not conflict with core page IDs. -Example: setting the directive to 'user_' will result in a user submitted -'foo' to become 'user_foo' Be sure to set %HTML.EnableAttrID to true -before using this. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt deleted file mode 100644 index 2c5924a7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefixLocal.txt +++ /dev/null @@ -1,14 +0,0 @@ -Attr.IDPrefixLocal -TYPE: string -VERSION: 1.2.0 -DEFAULT: '' ---DESCRIPTION-- -Temporary prefix for IDs used in conjunction with %Attr.IDPrefix. If you -need to allow multiple sets of user content on web page, you may need to -have a seperate prefix that changes with each iteration. This way, -seperately submitted user content displayed on the same page doesn't -clobber each other. Ideal values are unique identifiers for the content it -represents (i.e. the id of the row in the database). Be sure to add a -seperator (like an underscore) at the end. Warning: this directive will -not work unless %Attr.IDPrefix is set to a non-empty value! ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt deleted file mode 100644 index d5caa1bb..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.AutoParagraph.txt +++ /dev/null @@ -1,31 +0,0 @@ -AutoFormat.AutoParagraph -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -

- This directive turns on auto-paragraphing, where double newlines are - converted in to paragraphs whenever possible. Auto-paragraphing: -

-
    -
  • Always applies to inline elements or text in the root node,
  • -
  • Applies to inline elements or text with double newlines in nodes - that allow paragraph tags,
  • -
  • Applies to double newlines in paragraph tags
  • -
-

- p tags must be allowed for this directive to take effect. - We do not use br tags for paragraphing, as that is - semantically incorrect. -

-

- To prevent auto-paragraphing as a content-producer, refrain from using - double-newlines except to specify a new paragraph or in contexts where - it has special meaning (whitespace usually has no meaning except in - tags like pre, so this should not be difficult.) To prevent - the paragraphing of inline text adjacent to block elements, wrap them - in div tags (the behavior is slightly different outside of - the root node.) -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt deleted file mode 100644 index 2a476481..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt +++ /dev/null @@ -1,12 +0,0 @@ -AutoFormat.Custom -TYPE: list -VERSION: 2.0.1 -DEFAULT: array() ---DESCRIPTION-- - -

- This directive can be used to add custom auto-format injectors. - Specify an array of injector names (class name minus the prefix) - or concrete implementations. Injector class must exist. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt deleted file mode 100644 index 663064a3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.DisplayLinkURI.txt +++ /dev/null @@ -1,11 +0,0 @@ -AutoFormat.DisplayLinkURI -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -

- This directive turns on the in-text display of URIs in <a> tags, and disables - those links. For example, example becomes - example (http://example.com). -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt deleted file mode 100644 index 3a48ba96..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.Linkify.txt +++ /dev/null @@ -1,12 +0,0 @@ -AutoFormat.Linkify -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -

- This directive turns on linkification, auto-linking http, ftp and - https URLs. a tags with the href attribute - must be allowed. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt deleted file mode 100644 index db58b134..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.DocURL.txt +++ /dev/null @@ -1,12 +0,0 @@ -AutoFormat.PurifierLinkify.DocURL -TYPE: string -VERSION: 2.0.1 -DEFAULT: '#%s' -ALIASES: AutoFormatParam.PurifierLinkifyDocURL ---DESCRIPTION-- -

- Location of configuration documentation to link to, let %s substitute - into the configuration's namespace and directive names sans the percent - sign. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt deleted file mode 100644 index 7996488b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.PurifierLinkify.txt +++ /dev/null @@ -1,12 +0,0 @@ -AutoFormat.PurifierLinkify -TYPE: bool -VERSION: 2.0.1 -DEFAULT: false ---DESCRIPTION-- - -

- Internal auto-formatter that converts configuration directives in - syntax %Namespace.Directive to links. a tags - with the href attribute must be allowed. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt deleted file mode 100644 index 6367fe23..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.Predicate.txt +++ /dev/null @@ -1,14 +0,0 @@ -AutoFormat.RemoveEmpty.Predicate -TYPE: hash -VERSION: 4.7.0 -DEFAULT: array('colgroup' => array(), 'th' => array(), 'td' => array(), 'iframe' => array('src')) ---DESCRIPTION-- -

- Given that an element has no contents, it will be removed by default, unless - this predicate dictates otherwise. The predicate can either be an associative - map from tag name to list of attributes that must be present for the element - to be considered preserved: thus, the default always preserves colgroup, - th and td, and also iframe if it - has a src. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt deleted file mode 100644 index 35c393b4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions.txt +++ /dev/null @@ -1,11 +0,0 @@ -AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions -TYPE: lookup -VERSION: 4.0.0 -DEFAULT: array('td' => true, 'th' => true) ---DESCRIPTION-- -

- When %AutoFormat.RemoveEmpty and %AutoFormat.RemoveEmpty.RemoveNbsp - are enabled, this directive defines what HTML elements should not be - removede if they have only a non-breaking space in them. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt deleted file mode 100644 index 9228dee2..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.RemoveNbsp.txt +++ /dev/null @@ -1,15 +0,0 @@ -AutoFormat.RemoveEmpty.RemoveNbsp -TYPE: bool -VERSION: 4.0.0 -DEFAULT: false ---DESCRIPTION-- -

- When enabled, HTML Purifier will treat any elements that contain only - non-breaking spaces as well as regular whitespace as empty, and remove - them when %AutoFormat.RemoveEmpty is enabled. -

-

- See %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions for a list of elements - that don't have this behavior applied to them. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt deleted file mode 100644 index 34657ba4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveEmpty.txt +++ /dev/null @@ -1,46 +0,0 @@ -AutoFormat.RemoveEmpty -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -

- When enabled, HTML Purifier will attempt to remove empty elements that - contribute no semantic information to the document. The following types - of nodes will be removed: -

-
  • - Tags with no attributes and no content, and that are not empty - elements (remove <a></a> but not - <br />), and -
  • -
  • - Tags with no content, except for:
      -
    • The colgroup element, or
    • -
    • - Elements with the id or name attribute, - when those attributes are permitted on those elements. -
    • -
  • -
-

- Please be very careful when using this functionality; while it may not - seem that empty elements contain useful information, they can alter the - layout of a document given appropriate styling. This directive is most - useful when you are processing machine-generated HTML, please avoid using - it on regular user HTML. -

-

- Elements that contain only whitespace will be treated as empty. Non-breaking - spaces, however, do not count as whitespace. See - %AutoFormat.RemoveEmpty.RemoveNbsp for alternate behavior. -

-

- This algorithm is not perfect; you may still notice some empty tags, - particularly if a node had elements, but those elements were later removed - because they were not permitted in that context, or tags that, after - being auto-closed by another tag, where empty. This is for safety reasons - to prevent clever code from breaking validation. The general rule of thumb: - if a tag looked empty on the way in, it will get removed; if HTML Purifier - made it empty, it will stay. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt deleted file mode 100644 index dde990ab..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/AutoFormat.RemoveSpansWithoutAttributes.txt +++ /dev/null @@ -1,11 +0,0 @@ -AutoFormat.RemoveSpansWithoutAttributes -TYPE: bool -VERSION: 4.0.1 -DEFAULT: false ---DESCRIPTION-- -

- This directive causes span tags without any attributes - to be removed. It will also remove spans that had all attributes - removed during processing. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt deleted file mode 100644 index 4d054b1f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowDuplicates.txt +++ /dev/null @@ -1,11 +0,0 @@ -CSS.AllowDuplicates -TYPE: bool -DEFAULT: false -VERSION: 4.8.0 ---DESCRIPTION-- -

- By default, HTML Purifier removes duplicate CSS properties, - like color:red; color:blue. If this is set to - true, duplicate properties are allowed. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt deleted file mode 100644 index b324608f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt +++ /dev/null @@ -1,8 +0,0 @@ -CSS.AllowImportant -TYPE: bool -DEFAULT: false -VERSION: 3.1.0 ---DESCRIPTION-- -This parameter determines whether or not !important cascade modifiers should -be allowed in user CSS. If false, !important will stripped. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt deleted file mode 100644 index 748be0ee..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowTricky.txt +++ /dev/null @@ -1,11 +0,0 @@ -CSS.AllowTricky -TYPE: bool -DEFAULT: false -VERSION: 3.1.0 ---DESCRIPTION-- -This parameter determines whether or not to allow "tricky" CSS properties and -values. Tricky CSS properties/values can drastically modify page layout or -be used for deceptive practices but do not directly constitute a security risk. -For example, display:none; is considered a tricky property that -will only be allowed if this directive is set to true. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt deleted file mode 100644 index 3fd46540..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedFonts.txt +++ /dev/null @@ -1,12 +0,0 @@ -CSS.AllowedFonts -TYPE: lookup/null -VERSION: 4.3.0 -DEFAULT: NULL ---DESCRIPTION-- -

- Allows you to manually specify a set of allowed fonts. If - NULL, all fonts are allowed. This directive - affects generic names (serif, sans-serif, monospace, cursive, - fantasy) as well as specific font families. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt deleted file mode 100644 index 460112eb..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowedProperties.txt +++ /dev/null @@ -1,18 +0,0 @@ -CSS.AllowedProperties -TYPE: lookup/null -VERSION: 3.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- If HTML Purifier's style attributes set is unsatisfactory for your needs, - you can overload it with your own list of tags to allow. Note that this - method is subtractive: it does its job by taking away from HTML Purifier - usual feature set, so you cannot add an attribute that HTML Purifier never - supported in the first place. -

-

- Warning: If another directive conflicts with the - elements here, that directive will win and override. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt deleted file mode 100644 index 5cb7dda3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.DefinitionRev.txt +++ /dev/null @@ -1,11 +0,0 @@ -CSS.DefinitionRev -TYPE: int -VERSION: 2.0.0 -DEFAULT: 1 ---DESCRIPTION-- - -

- Revision identifier for your custom definition. See - %HTML.DefinitionRev for details. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt deleted file mode 100644 index f1f5c5f1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.ForbiddenProperties.txt +++ /dev/null @@ -1,13 +0,0 @@ -CSS.ForbiddenProperties -TYPE: lookup -VERSION: 4.2.0 -DEFAULT: array() ---DESCRIPTION-- -

- This is the logical inverse of %CSS.AllowedProperties, and it will - override that directive or any other directive. If possible, - %CSS.AllowedProperties is recommended over this directive, - because it can sometimes be difficult to tell whether or not you've - forbidden all of the CSS properties you truly would like to disallow. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt deleted file mode 100644 index 7a329147..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.MaxImgLength.txt +++ /dev/null @@ -1,16 +0,0 @@ -CSS.MaxImgLength -TYPE: string/null -DEFAULT: '1200px' -VERSION: 3.1.1 ---DESCRIPTION-- -

- This parameter sets the maximum allowed length on img tags, - effectively the width and height properties. - Only absolute units of measurement (in, pt, pc, mm, cm) and pixels (px) are allowed. This is - in place to prevent imagecrash attacks, disable with null at your own risk. - This directive is similar to %HTML.MaxImgLength, and both should be - concurrently edited, although there are - subtle differences in the input format (the CSS max is a number with - a unit). -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt deleted file mode 100644 index 148eedb8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Proprietary.txt +++ /dev/null @@ -1,10 +0,0 @@ -CSS.Proprietary -TYPE: bool -VERSION: 3.0.0 -DEFAULT: false ---DESCRIPTION-- - -

- Whether or not to allow safe, proprietary CSS values. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt deleted file mode 100644 index e733a61e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/CSS.Trusted.txt +++ /dev/null @@ -1,9 +0,0 @@ -CSS.Trusted -TYPE: bool -VERSION: 4.2.1 -DEFAULT: false ---DESCRIPTION-- -Indicates whether or not the user's CSS input is trusted or not. If the -input is trusted, a more expansive set of allowed properties. See -also %HTML.Trusted. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt deleted file mode 100644 index c486724c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.DefinitionImpl.txt +++ /dev/null @@ -1,14 +0,0 @@ -Cache.DefinitionImpl -TYPE: string/null -VERSION: 2.0.0 -DEFAULT: 'Serializer' ---DESCRIPTION-- - -This directive defines which method to use when caching definitions, -the complex data-type that makes HTML Purifier tick. Set to null -to disable caching (not recommended, as you will see a definite -performance degradation). - ---ALIASES-- -Core.DefinitionCache ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt deleted file mode 100644 index 54036507..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPath.txt +++ /dev/null @@ -1,13 +0,0 @@ -Cache.SerializerPath -TYPE: string/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- Absolute path with no trailing slash to store serialized definitions in. - Default is within the - HTML Purifier library inside DefinitionCache/Serializer. This - path must be writable by the webserver. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt deleted file mode 100644 index 2e0cc810..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Cache.SerializerPermissions.txt +++ /dev/null @@ -1,16 +0,0 @@ -Cache.SerializerPermissions -TYPE: int/null -VERSION: 4.3.0 -DEFAULT: 0755 ---DESCRIPTION-- - -

- Directory permissions of the files and directories created inside - the DefinitionCache/Serializer or other custom serializer path. -

-

- In HTML Purifier 4.8.0, this also supports NULL, - which means that no chmod'ing or directory creation shall - occur. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt deleted file mode 100644 index 568cbf3b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyFixLt.txt +++ /dev/null @@ -1,18 +0,0 @@ -Core.AggressivelyFixLt -TYPE: bool -VERSION: 2.1.0 -DEFAULT: true ---DESCRIPTION-- -

- This directive enables aggressive pre-filter fixes HTML Purifier can - perform in order to ensure that open angled-brackets do not get killed - during parsing stage. Enabling this will result in two preg_replace_callback - calls and at least two preg_replace calls for every HTML document parsed; - if your users make very well-formed HTML, you can set this directive false. - This has no effect when DirectLex is used. -

-

- Notice: This directive's default turned from false to true - in HTML Purifier 3.2.0. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt deleted file mode 100644 index b2b6ab14..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AggressivelyRemoveScript.txt +++ /dev/null @@ -1,16 +0,0 @@ -Core.AggressivelyRemoveScript -TYPE: bool -VERSION: 4.9.0 -DEFAULT: true ---DESCRIPTION-- -

- This directive enables aggressive pre-filter removal of - script tags. This is not necessary for security, - but it can help work around a bug in libxml where embedded - HTML elements inside script sections cause the parser to - choke. To revert to pre-4.9.0 behavior, set this to false. - This directive has no effect if %Core.Trusted is true, - %Core.RemoveScriptContents is false, or %Core.HiddenElements - does not contain script. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt deleted file mode 100644 index 2c910cc7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowHostnameUnderscore.txt +++ /dev/null @@ -1,16 +0,0 @@ -Core.AllowHostnameUnderscore -TYPE: bool -VERSION: 4.6.0 -DEFAULT: false ---DESCRIPTION-- -

- By RFC 1123, underscores are not permitted in host names. - (This is in contrast to the specification for DNS, RFC - 2181, which allows underscores.) - However, most browsers do the right thing when faced with - an underscore in the host name, and so some poorly written - websites are written with the expectation this should work. - Setting this parameter to true relaxes our allowed character - check so that underscores are permitted. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt deleted file mode 100644 index 06278f82..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt +++ /dev/null @@ -1,12 +0,0 @@ -Core.AllowParseManyTags -TYPE: bool -DEFAULT: false -VERSION: 4.10.1 ---DESCRIPTION-- -

- This directive allows parsing of many nested tags. - If you set true, relaxes any hardcoded limit from the parser. - However, in that case it may cause a Dos attack. - Be careful when enabling it. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt deleted file mode 100644 index d7317911..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.CollectErrors.txt +++ /dev/null @@ -1,12 +0,0 @@ -Core.CollectErrors -TYPE: bool -VERSION: 2.0.0 -DEFAULT: false ---DESCRIPTION-- - -Whether or not to collect errors found while filtering the document. This -is a useful way to give feedback to your users. Warning: -Currently this feature is very patchy and experimental, with lots of -possible error messages not yet implemented. It will not cause any -problems, but it may not help your users either. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt deleted file mode 100644 index a75844cd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ColorKeywords.txt +++ /dev/null @@ -1,160 +0,0 @@ -Core.ColorKeywords -TYPE: hash -VERSION: 2.0.0 ---DEFAULT-- -array ( - 'aliceblue' => '#F0F8FF', - 'antiquewhite' => '#FAEBD7', - 'aqua' => '#00FFFF', - 'aquamarine' => '#7FFFD4', - 'azure' => '#F0FFFF', - 'beige' => '#F5F5DC', - 'bisque' => '#FFE4C4', - 'black' => '#000000', - 'blanchedalmond' => '#FFEBCD', - 'blue' => '#0000FF', - 'blueviolet' => '#8A2BE2', - 'brown' => '#A52A2A', - 'burlywood' => '#DEB887', - 'cadetblue' => '#5F9EA0', - 'chartreuse' => '#7FFF00', - 'chocolate' => '#D2691E', - 'coral' => '#FF7F50', - 'cornflowerblue' => '#6495ED', - 'cornsilk' => '#FFF8DC', - 'crimson' => '#DC143C', - 'cyan' => '#00FFFF', - 'darkblue' => '#00008B', - 'darkcyan' => '#008B8B', - 'darkgoldenrod' => '#B8860B', - 'darkgray' => '#A9A9A9', - 'darkgrey' => '#A9A9A9', - 'darkgreen' => '#006400', - 'darkkhaki' => '#BDB76B', - 'darkmagenta' => '#8B008B', - 'darkolivegreen' => '#556B2F', - 'darkorange' => '#FF8C00', - 'darkorchid' => '#9932CC', - 'darkred' => '#8B0000', - 'darksalmon' => '#E9967A', - 'darkseagreen' => '#8FBC8F', - 'darkslateblue' => '#483D8B', - 'darkslategray' => '#2F4F4F', - 'darkslategrey' => '#2F4F4F', - 'darkturquoise' => '#00CED1', - 'darkviolet' => '#9400D3', - 'deeppink' => '#FF1493', - 'deepskyblue' => '#00BFFF', - 'dimgray' => '#696969', - 'dimgrey' => '#696969', - 'dodgerblue' => '#1E90FF', - 'firebrick' => '#B22222', - 'floralwhite' => '#FFFAF0', - 'forestgreen' => '#228B22', - 'fuchsia' => '#FF00FF', - 'gainsboro' => '#DCDCDC', - 'ghostwhite' => '#F8F8FF', - 'gold' => '#FFD700', - 'goldenrod' => '#DAA520', - 'gray' => '#808080', - 'grey' => '#808080', - 'green' => '#008000', - 'greenyellow' => '#ADFF2F', - 'honeydew' => '#F0FFF0', - 'hotpink' => '#FF69B4', - 'indianred' => '#CD5C5C', - 'indigo' => '#4B0082', - 'ivory' => '#FFFFF0', - 'khaki' => '#F0E68C', - 'lavender' => '#E6E6FA', - 'lavenderblush' => '#FFF0F5', - 'lawngreen' => '#7CFC00', - 'lemonchiffon' => '#FFFACD', - 'lightblue' => '#ADD8E6', - 'lightcoral' => '#F08080', - 'lightcyan' => '#E0FFFF', - 'lightgoldenrodyellow' => '#FAFAD2', - 'lightgray' => '#D3D3D3', - 'lightgrey' => '#D3D3D3', - 'lightgreen' => '#90EE90', - 'lightpink' => '#FFB6C1', - 'lightsalmon' => '#FFA07A', - 'lightseagreen' => '#20B2AA', - 'lightskyblue' => '#87CEFA', - 'lightslategray' => '#778899', - 'lightslategrey' => '#778899', - 'lightsteelblue' => '#B0C4DE', - 'lightyellow' => '#FFFFE0', - 'lime' => '#00FF00', - 'limegreen' => '#32CD32', - 'linen' => '#FAF0E6', - 'magenta' => '#FF00FF', - 'maroon' => '#800000', - 'mediumaquamarine' => '#66CDAA', - 'mediumblue' => '#0000CD', - 'mediumorchid' => '#BA55D3', - 'mediumpurple' => '#9370DB', - 'mediumseagreen' => '#3CB371', - 'mediumslateblue' => '#7B68EE', - 'mediumspringgreen' => '#00FA9A', - 'mediumturquoise' => '#48D1CC', - 'mediumvioletred' => '#C71585', - 'midnightblue' => '#191970', - 'mintcream' => '#F5FFFA', - 'mistyrose' => '#FFE4E1', - 'moccasin' => '#FFE4B5', - 'navajowhite' => '#FFDEAD', - 'navy' => '#000080', - 'oldlace' => '#FDF5E6', - 'olive' => '#808000', - 'olivedrab' => '#6B8E23', - 'orange' => '#FFA500', - 'orangered' => '#FF4500', - 'orchid' => '#DA70D6', - 'palegoldenrod' => '#EEE8AA', - 'palegreen' => '#98FB98', - 'paleturquoise' => '#AFEEEE', - 'palevioletred' => '#DB7093', - 'papayawhip' => '#FFEFD5', - 'peachpuff' => '#FFDAB9', - 'peru' => '#CD853F', - 'pink' => '#FFC0CB', - 'plum' => '#DDA0DD', - 'powderblue' => '#B0E0E6', - 'purple' => '#800080', - 'rebeccapurple' => '#663399', - 'red' => '#FF0000', - 'rosybrown' => '#BC8F8F', - 'royalblue' => '#4169E1', - 'saddlebrown' => '#8B4513', - 'salmon' => '#FA8072', - 'sandybrown' => '#F4A460', - 'seagreen' => '#2E8B57', - 'seashell' => '#FFF5EE', - 'sienna' => '#A0522D', - 'silver' => '#C0C0C0', - 'skyblue' => '#87CEEB', - 'slateblue' => '#6A5ACD', - 'slategray' => '#708090', - 'slategrey' => '#708090', - 'snow' => '#FFFAFA', - 'springgreen' => '#00FF7F', - 'steelblue' => '#4682B4', - 'tan' => '#D2B48C', - 'teal' => '#008080', - 'thistle' => '#D8BFD8', - 'tomato' => '#FF6347', - 'turquoise' => '#40E0D0', - 'violet' => '#EE82EE', - 'wheat' => '#F5DEB3', - 'white' => '#FFFFFF', - 'whitesmoke' => '#F5F5F5', - 'yellow' => '#FFFF00', - 'yellowgreen' => '#9ACD32' -) ---DESCRIPTION-- - -Lookup array of color names to six digit hexadecimal number corresponding -to color, with preceding hash mark. Used when parsing colors. The lookup -is done in a case-insensitive manner. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt deleted file mode 100644 index 64b114fc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.ConvertDocumentToFragment.txt +++ /dev/null @@ -1,14 +0,0 @@ -Core.ConvertDocumentToFragment -TYPE: bool -DEFAULT: true ---DESCRIPTION-- - -This parameter determines whether or not the filter should convert -input that is a full document with html and body tags to a fragment -of just the contents of a body tag. This parameter is simply something -HTML Purifier can do during an edge-case: for most inputs, this -processing is not necessary. - ---ALIASES-- -Core.AcceptFullDocuments ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt deleted file mode 100644 index 36f16e07..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DirectLexLineNumberSyncInterval.txt +++ /dev/null @@ -1,17 +0,0 @@ -Core.DirectLexLineNumberSyncInterval -TYPE: int -VERSION: 2.0.0 -DEFAULT: 0 ---DESCRIPTION-- - -

- Specifies the number of tokens the DirectLex line number tracking - implementations should process before attempting to resyncronize the - current line count by manually counting all previous new-lines. When - at 0, this functionality is disabled. Lower values will decrease - performance, and this is only strictly necessary if the counting - algorithm is buggy (in which case you should report it as a bug). - This has no effect when %Core.MaintainLineNumbers is disabled or DirectLex is - not being used. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt deleted file mode 100644 index 1cd4c2c9..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt +++ /dev/null @@ -1,14 +0,0 @@ -Core.DisableExcludes -TYPE: bool -DEFAULT: false -VERSION: 4.5.0 ---DESCRIPTION-- -

- This directive disables SGML-style exclusions, e.g. the exclusion of - <object> in any descendant of a - <pre> tag. Disabling excludes will allow some - invalid documents to pass through HTML Purifier, but HTML Purifier - will also be less likely to accidentally remove large documents during - processing. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt deleted file mode 100644 index ce243c35..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EnableIDNA.txt +++ /dev/null @@ -1,9 +0,0 @@ -Core.EnableIDNA -TYPE: bool -DEFAULT: false -VERSION: 4.4.0 ---DESCRIPTION-- -Allows international domain names in URLs. This configuration option -requires the PEAR Net_IDNA2 module to be installed. It operates by -punycoding any internationalized host names for maximum portability. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt deleted file mode 100644 index 8bfb47c3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Encoding.txt +++ /dev/null @@ -1,15 +0,0 @@ -Core.Encoding -TYPE: istring -DEFAULT: 'utf-8' ---DESCRIPTION-- -If for some reason you are unable to convert all webpages to UTF-8, you can -use this directive as a stop-gap compatibility change to let HTML Purifier -deal with non UTF-8 input. This technique has notable deficiencies: -absolutely no characters outside of the selected character encoding will be -preserved, not even the ones that have been ampersand escaped (this is due -to a UTF-8 specific feature that automatically resolves all -entities), making it pretty useless for anything except the most I18N-blind -applications, although %Core.EscapeNonASCIICharacters offers fixes this -trouble with another tradeoff. This directive only accepts ISO-8859-1 if -iconv is not enabled. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt deleted file mode 100644 index a3881be7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidChildren.txt +++ /dev/null @@ -1,12 +0,0 @@ -Core.EscapeInvalidChildren -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -

Warning: this configuration option is no longer does anything as of 4.6.0.

- -

When true, a child is found that is not allowed in the context of the -parent element will be transformed into text as if it were ASCII. When -false, that element and all internal tags will be dropped, though text will -be preserved. There is no option for dropping the element but preserving -child nodes.

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt deleted file mode 100644 index a7a5b249..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeInvalidTags.txt +++ /dev/null @@ -1,7 +0,0 @@ -Core.EscapeInvalidTags -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -When true, invalid tags will be written back to the document as plain text. -Otherwise, they are silently dropped. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt deleted file mode 100644 index abb49994..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.EscapeNonASCIICharacters.txt +++ /dev/null @@ -1,13 +0,0 @@ -Core.EscapeNonASCIICharacters -TYPE: bool -VERSION: 1.4.0 -DEFAULT: false ---DESCRIPTION-- -This directive overcomes a deficiency in %Core.Encoding by blindly -converting all non-ASCII characters into decimal numeric entities before -converting it to its native encoding. This means that even characters that -can be expressed in the non-UTF-8 encoding will be entity-ized, which can -be a real downer for encodings like Big5. It also assumes that the ASCII -repetoire is available, although this is the case for almost all encodings. -Anyway, use UTF-8! ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt deleted file mode 100644 index 915391ed..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.HiddenElements.txt +++ /dev/null @@ -1,19 +0,0 @@ -Core.HiddenElements -TYPE: lookup ---DEFAULT-- -array ( - 'script' => true, - 'style' => true, -) ---DESCRIPTION-- - -

- This directive is a lookup array of elements which should have their - contents removed when they are not allowed by the HTML definition. - For example, the contents of a script tag are not - normally shown in a document, so if script tags are to be removed, - their contents should be removed to. This is opposed to a b - tag, which defines some presentational changes but does not hide its - contents. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt deleted file mode 100644 index 233fca14..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.Language.txt +++ /dev/null @@ -1,10 +0,0 @@ -Core.Language -TYPE: string -VERSION: 2.0.0 -DEFAULT: 'en' ---DESCRIPTION-- - -ISO 639 language code for localizable things in HTML Purifier to use, -which is mainly error reporting. There is currently only an English (en) -translation, so this directive is currently useless. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt deleted file mode 100644 index 392b4364..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LegacyEntityDecoder.txt +++ /dev/null @@ -1,36 +0,0 @@ -Core.LegacyEntityDecoder -TYPE: bool -VERSION: 4.9.0 -DEFAULT: false ---DESCRIPTION-- -

- Prior to HTML Purifier 4.9.0, entities were decoded by performing - a global search replace for all entities whose decoded versions - did not have special meanings under HTML, and replaced them with - their decoded versions. We would match all entities, even if they did - not have a trailing semicolon, but only if there weren't any trailing - alphanumeric characters. -

- - - - - - -
OriginalTextAttribute
&yen;¥¥
&yen¥¥
&yena&yena&yena
&yen=¥=¥=
-

- In HTML Purifier 4.9.0, we changed the behavior of entity parsing - to match entities that had missing trailing semicolons in less - cases, to more closely match HTML5 parsing behavior: -

- - - - - - -
OriginalTextAttribute
&yen;¥¥
&yen¥¥
&yena¥a&yena
&yen=¥=&yen=
-

- This flag reverts back to pre-HTML Purifier 4.9.0 behavior. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt deleted file mode 100644 index 8983e2cc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.LexerImpl.txt +++ /dev/null @@ -1,34 +0,0 @@ -Core.LexerImpl -TYPE: mixed/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- This parameter determines what lexer implementation can be used. The - valid values are: -

-
-
null
-
- Recommended, the lexer implementation will be auto-detected based on - your PHP-version and configuration. -
-
string lexer identifier
-
- This is a slim way of manually overridding the implementation. - Currently recognized values are: DOMLex (the default PHP5 -implementation) - and DirectLex (the default PHP4 implementation). Only use this if - you know what you are doing: usually, the auto-detection will - manage things for cases you aren't even aware of. -
-
object lexer instance
-
- Super-advanced: you can specify your own, custom, implementation that - implements the interface defined by HTMLPurifier_Lexer. - I may remove this option simply because I don't expect anyone - to use it. -
-
---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt deleted file mode 100644 index eb841a75..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.MaintainLineNumbers.txt +++ /dev/null @@ -1,16 +0,0 @@ -Core.MaintainLineNumbers -TYPE: bool/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- If true, HTML Purifier will add line number information to all tokens. - This is useful when error reporting is turned on, but can result in - significant performance degradation and should not be used when - unnecessary. This directive must be used with the DirectLex lexer, - as the DOMLex lexer does not (yet) support this functionality. - If the value is null, an appropriate value will be selected based - on other configuration. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt deleted file mode 100644 index d77f5360..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.NormalizeNewlines.txt +++ /dev/null @@ -1,11 +0,0 @@ -Core.NormalizeNewlines -TYPE: bool -VERSION: 4.2.0 -DEFAULT: true ---DESCRIPTION-- -

- Whether or not to normalize newlines to the operating - system default. When false, HTML Purifier - will attempt to preserve mixed newline files. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveBlanks.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveBlanks.txt deleted file mode 100644 index 95e5285c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveBlanks.txt +++ /dev/null @@ -1,10 +0,0 @@ -Core.RemoveBlanks -TYPE: bool -DEFAULT: false -VERSION: 4.18 ---DESCRIPTION-- -

- If set to true, blank nodes will be removed. This can be useful for maintaining - backwards compatibility when upgrading from previous versions of PHP. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt deleted file mode 100644 index 4070c2a0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveInvalidImg.txt +++ /dev/null @@ -1,12 +0,0 @@ -Core.RemoveInvalidImg -TYPE: bool -DEFAULT: true -VERSION: 1.3.0 ---DESCRIPTION-- - -

- This directive enables pre-emptive URI checking in img - tags, as the attribute validation strategy is not authorized to - remove elements from the document. Revert to pre-1.3.0 behavior by setting to false. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt deleted file mode 100644 index 3397d9f7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveProcessingInstructions.txt +++ /dev/null @@ -1,11 +0,0 @@ -Core.RemoveProcessingInstructions -TYPE: bool -VERSION: 4.2.0 -DEFAULT: false ---DESCRIPTION-- -Instead of escaping processing instructions in the form <? ... -?>, remove it out-right. This may be useful if the HTML -you are validating contains XML processing instruction gunk, however, -it can also be user-unfriendly for people attempting to post PHP -snippets. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt deleted file mode 100644 index a4cd966d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.RemoveScriptContents.txt +++ /dev/null @@ -1,12 +0,0 @@ -Core.RemoveScriptContents -TYPE: bool/null -DEFAULT: NULL -VERSION: 2.0.0 -DEPRECATED-VERSION: 2.1.0 -DEPRECATED-USE: Core.HiddenElements ---DESCRIPTION-- -

- This directive enables HTML Purifier to remove not only script tags - but all of their contents. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt deleted file mode 100644 index 3db50ef2..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.Custom.txt +++ /dev/null @@ -1,11 +0,0 @@ -Filter.Custom -TYPE: list -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -

- This directive can be used to add custom filters; it is nearly the - equivalent of the now deprecated HTMLPurifier->addFilter() - method. Specify an array of concrete implementations. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt deleted file mode 100644 index 16829bcd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Escaping.txt +++ /dev/null @@ -1,14 +0,0 @@ -Filter.ExtractStyleBlocks.Escaping -TYPE: bool -VERSION: 3.0.0 -DEFAULT: true -ALIASES: Filter.ExtractStyleBlocksEscaping, FilterParam.ExtractStyleBlocksEscaping ---DESCRIPTION-- - -

- Whether or not to escape the dangerous characters <, > and & - as \3C, \3E and \26, respectively. This is can be safely set to false - if the contents of StyleBlocks will be placed in an external stylesheet, - where there is no risk of it being interpreted as HTML. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt deleted file mode 100644 index 7f95f54d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.Scope.txt +++ /dev/null @@ -1,29 +0,0 @@ -Filter.ExtractStyleBlocks.Scope -TYPE: string/null -VERSION: 3.0.0 -DEFAULT: NULL -ALIASES: Filter.ExtractStyleBlocksScope, FilterParam.ExtractStyleBlocksScope ---DESCRIPTION-- - -

- If you would like users to be able to define external stylesheets, but - only allow them to specify CSS declarations for a specific node and - prevent them from fiddling with other elements, use this directive. - It accepts any valid CSS selector, and will prepend this to any - CSS declaration extracted from the document. For example, if this - directive is set to #user-content and a user uses the - selector a:hover, the final selector will be - #user-content a:hover. -

-

- The comma shorthand may be used; consider the above example, with - #user-content, #user-content2, the final selector will - be #user-content a:hover, #user-content2 a:hover. -

-

- Warning: It is possible for users to bypass this measure - using a naughty + selector. This is a bug in CSS Tidy 1.3, not HTML - Purifier, and I am working to get it fixed. Until then, HTML Purifier - performs a basic check to prevent this. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt deleted file mode 100644 index 6c231b2d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.TidyImpl.txt +++ /dev/null @@ -1,16 +0,0 @@ -Filter.ExtractStyleBlocks.TidyImpl -TYPE: mixed/null -VERSION: 3.1.0 -DEFAULT: NULL -ALIASES: FilterParam.ExtractStyleBlocksTidyImpl ---DESCRIPTION-- -

- If left NULL, HTML Purifier will attempt to instantiate a csstidy - class to use for internal cleaning. This will usually be good enough. -

-

- However, for trusted user input, you can set this to false to - disable cleaning. In addition, you can supply your own concrete implementation - of Tidy's interface to use, although I don't know why you'd want to do that. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt deleted file mode 100644 index 078d0874..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.ExtractStyleBlocks.txt +++ /dev/null @@ -1,74 +0,0 @@ -Filter.ExtractStyleBlocks -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false -EXTERNAL: CSSTidy ---DESCRIPTION-- -

- This directive turns on the style block extraction filter, which removes - style blocks from input HTML, cleans them up with CSSTidy, - and places them in the StyleBlocks context variable, for further - use by you, usually to be placed in an external stylesheet, or a - style block in the head of your document. -

-

- Sample usage: -

-
';
-?>
-
-
-
-  Filter.ExtractStyleBlocks
-body {color:#F00;} Some text';
-
-    $config = HTMLPurifier_Config::createDefault();
-    $config->set('Filter', 'ExtractStyleBlocks', true);
-    $purifier = new HTMLPurifier($config);
-
-    $html = $purifier->purify($dirty);
-
-    // This implementation writes the stylesheets to the styles/ directory.
-    // You can also echo the styles inside the document, but it's a bit
-    // more difficult to make sure they get interpreted properly by
-    // browsers; try the usual CSS armoring techniques.
-    $styles = $purifier->context->get('StyleBlocks');
-    $dir = 'styles/';
-    if (!is_dir($dir)) mkdir($dir);
-    $hash = sha1($_GET['html']);
-    foreach ($styles as $i => $style) {
-        file_put_contents($name = $dir . $hash . "_$i");
-        echo '';
-    }
-?>
-
-
-  
- -
- - -]]>
-

- Warning: It is possible for a user to mount an - imagecrash attack using this CSS. Counter-measures are difficult; - it is not simply enough to limit the range of CSS lengths (using - relative lengths with many nesting levels allows for large values - to be attained without actually specifying them in the stylesheet), - and the flexible nature of selectors makes it difficult to selectively - disable lengths on image tags (HTML Purifier, however, does disable - CSS width and height in inline styling). There are probably two effective - counter measures: an explicit width and height set to auto in all - images in your document (unlikely) or the disabling of width and - height (somewhat reasonable). Whether or not these measures should be - used is left to the reader. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt deleted file mode 100644 index 321eaa2d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Filter.YouTube.txt +++ /dev/null @@ -1,16 +0,0 @@ -Filter.YouTube -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false ---DESCRIPTION-- -

- Warning: Deprecated in favor of %HTML.SafeObject and - %Output.FlashCompat (turn both on to allow YouTube videos and other - Flash content). -

-

- This directive enables YouTube video embedding in HTML Purifier. Check - this document - on embedding videos for more information on what this filter does. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt deleted file mode 100644 index 0b2c106d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Allowed.txt +++ /dev/null @@ -1,25 +0,0 @@ -HTML.Allowed -TYPE: itext/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- This is a preferred convenience directive that combines - %HTML.AllowedElements and %HTML.AllowedAttributes. - Specify elements and attributes that are allowed using: - element1[attr1|attr2],element2.... For example, - if you would like to only allow paragraphs and links, specify - a[href],p. You can specify attributes that apply - to all elements using an asterisk, e.g. *[lang]. - You can also use newlines instead of commas to separate elements. -

-

- Warning: - All of the constraints on the component directives are still enforced. - The syntax is a subset of TinyMCE's valid_elements - whitelist: directly copy-pasting it here will probably result in - broken whitelists. If %HTML.AllowedElements or %HTML.AllowedAttributes - are set, this directive has no effect. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt deleted file mode 100644 index fcf093f1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedAttributes.txt +++ /dev/null @@ -1,19 +0,0 @@ -HTML.AllowedAttributes -TYPE: lookup/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- If HTML Purifier's attribute set is unsatisfactory, overload it! - The syntax is "tag.attr" or "*.attr" for the global attributes - (style, id, class, dir, lang, xml:lang). -

-

- Warning: If another directive conflicts with the - elements here, that directive will win and override. For - example, %HTML.EnableAttrID will take precedence over *.id in this - directive. You must set that directive to true before you can use - IDs at all. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt deleted file mode 100644 index 140e2142..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt +++ /dev/null @@ -1,10 +0,0 @@ -HTML.AllowedComments -TYPE: lookup -VERSION: 4.4.0 -DEFAULT: array() ---DESCRIPTION-- -A whitelist which indicates what explicit comment bodies should be -allowed, modulo leading and trailing whitespace. See also %HTML.AllowedCommentsRegexp -(these directives are union'ed together, so a comment is considered -valid if any directive deems it valid.) ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt deleted file mode 100644 index f22e977d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt +++ /dev/null @@ -1,15 +0,0 @@ -HTML.AllowedCommentsRegexp -TYPE: string/null -VERSION: 4.4.0 -DEFAULT: NULL ---DESCRIPTION-- -A regexp, which if it matches the body of a comment, indicates that -it should be allowed. Trailing and leading spaces are removed prior -to running this regular expression. -Warning: Make sure you specify -correct anchor metacharacters ^regex$, otherwise you may accept -comments that you did not mean to! In particular, the regex /foo|bar/ -is probably not sufficiently strict, since it also allows foobar. -See also %HTML.AllowedComments (these directives are union'ed together, -so a comment is considered valid if any directive deems it valid.) ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt deleted file mode 100644 index 1d3fa790..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedElements.txt +++ /dev/null @@ -1,23 +0,0 @@ -HTML.AllowedElements -TYPE: lookup/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- -

- If HTML Purifier's tag set is unsatisfactory for your needs, you can - overload it with your own list of tags to allow. If you change - this, you probably also want to change %HTML.AllowedAttributes; see - also %HTML.Allowed which lets you set allowed elements and - attributes at the same time. -

-

- If you attempt to allow an element that HTML Purifier does not know - about, HTML Purifier will raise an error. You will need to manually - tell HTML Purifier about this element by using the - advanced customization features. -

-

- Warning: If another directive conflicts with the - elements here, that directive will win and override. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt deleted file mode 100644 index 5a59a55c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedModules.txt +++ /dev/null @@ -1,20 +0,0 @@ -HTML.AllowedModules -TYPE: lookup/null -VERSION: 2.0.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- A doctype comes with a set of usual modules to use. Without having - to mucking about with the doctypes, you can quickly activate or - disable these modules by specifying which modules you wish to allow - with this directive. This is most useful for unit testing specific - modules, although end users may find it useful for their own ends. -

-

- If you specify a module that does not exist, the manager will silently - fail to use it, so be careful! User-defined modules are not affected - by this directive. Modules defined in %HTML.CoreModules are not - affected by this directive. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt deleted file mode 100644 index 151fb7b8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Attr.Name.UseCDATA.txt +++ /dev/null @@ -1,11 +0,0 @@ -HTML.Attr.Name.UseCDATA -TYPE: bool -DEFAULT: false -VERSION: 4.0.0 ---DESCRIPTION-- -The W3C specification DTD defines the name attribute to be CDATA, not ID, due -to limitations of DTD. In certain documents, this relaxed behavior is desired, -whether it is to specify duplicate names, or to specify names that would be -illegal IDs (for example, names that begin with a digit.) Set this configuration -directive to true to use the relaxed parsing rules. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt deleted file mode 100644 index 45ae469e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.BlockWrapper.txt +++ /dev/null @@ -1,18 +0,0 @@ -HTML.BlockWrapper -TYPE: string -VERSION: 1.3.0 -DEFAULT: 'p' ---DESCRIPTION-- - -

- String name of element to wrap inline elements that are inside a block - context. This only occurs in the children of blockquote in strict mode. -

-

- Example: by default value, - <blockquote>Foo</blockquote> would become - <blockquote><p>Foo</p></blockquote>. - The <p> tags can be replaced with whatever you desire, - as long as it is a block level element. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt deleted file mode 100644 index 52461887..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CoreModules.txt +++ /dev/null @@ -1,23 +0,0 @@ -HTML.CoreModules -TYPE: lookup -VERSION: 2.0.0 ---DEFAULT-- -array ( - 'Structure' => true, - 'Text' => true, - 'Hypertext' => true, - 'List' => true, - 'NonXMLCommonAttributes' => true, - 'XMLCommonAttributes' => true, - 'CommonAttributes' => true, -) ---DESCRIPTION-- - -

- Certain modularized doctypes (XHTML, namely), have certain modules - that must be included for the doctype to be an conforming document - type: put those modules here. By default, XHTML's core modules - are used. You can set this to a blank array to disable core module - protection, but this is not recommended. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt deleted file mode 100644 index 6ed70b59..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.CustomDoctype.txt +++ /dev/null @@ -1,9 +0,0 @@ -HTML.CustomDoctype -TYPE: string/null -VERSION: 2.0.1 -DEFAULT: NULL ---DESCRIPTION-- - -A custom doctype for power-users who defined their own document -type. This directive only applies when %HTML.Doctype is blank. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt deleted file mode 100644 index 103db754..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionID.txt +++ /dev/null @@ -1,33 +0,0 @@ -HTML.DefinitionID -TYPE: string/null -DEFAULT: NULL -VERSION: 2.0.0 ---DESCRIPTION-- - -

- Unique identifier for a custom-built HTML definition. If you edit - the raw version of the HTMLDefinition, introducing changes that the - configuration object does not reflect, you must specify this variable. - If you change your custom edits, you should change this directive, or - clear your cache. Example: -

-
-$config = HTMLPurifier_Config::createDefault();
-$config->set('HTML', 'DefinitionID', '1');
-$def = $config->getHTMLDefinition();
-$def->addAttribute('a', 'tabindex', 'Number');
-
-

- In the above example, the configuration is still at the defaults, but - using the advanced API, an extra attribute has been added. The - configuration object normally has no way of knowing that this change - has taken place, so it needs an extra directive: %HTML.DefinitionID. - If someone else attempts to use the default configuration, these two - pieces of code will not clobber each other in the cache, since one has - an extra directive attached to it. -

-

- You must specify a value to this directive to use the - advanced API features. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt deleted file mode 100644 index 229ae026..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.DefinitionRev.txt +++ /dev/null @@ -1,16 +0,0 @@ -HTML.DefinitionRev -TYPE: int -VERSION: 2.0.0 -DEFAULT: 1 ---DESCRIPTION-- - -

- Revision identifier for your custom definition specified in - %HTML.DefinitionID. This serves the same purpose: uniquely identifying - your custom definition, but this one does so in a chronological - context: revision 3 is more up-to-date then revision 2. Thus, when - this gets incremented, the cache handling is smart enough to clean - up any older revisions of your definition as well as flush the - cache. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt deleted file mode 100644 index 9dab497f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Doctype.txt +++ /dev/null @@ -1,11 +0,0 @@ -HTML.Doctype -TYPE: string/null -DEFAULT: NULL ---DESCRIPTION-- -Doctype to use during filtering. Technically speaking this is not actually -a doctype (as it does not identify a corresponding DTD), but we are using -this name for sake of simplicity. When non-blank, this will override any -older directives like %HTML.XHTML or %HTML.Strict. ---ALLOWED-- -'HTML 4.01 Transitional', 'HTML 4.01 Strict', 'XHTML 1.0 Transitional', 'XHTML 1.0 Strict', 'XHTML 1.1' ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt deleted file mode 100644 index 7878dc0b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.FlashAllowFullScreen.txt +++ /dev/null @@ -1,11 +0,0 @@ -HTML.FlashAllowFullScreen -TYPE: bool -VERSION: 4.2.0 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to permit embedded Flash content from - %HTML.SafeObject to expand to the full screen. Corresponds to - the allowFullScreen parameter. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt deleted file mode 100644 index 57358f9b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenAttributes.txt +++ /dev/null @@ -1,21 +0,0 @@ -HTML.ForbiddenAttributes -TYPE: lookup -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -

- While this directive is similar to %HTML.AllowedAttributes, for - forwards-compatibility with XML, this attribute has a different syntax. Instead of - tag.attr, use tag@attr. To disallow href - attributes in a tags, set this directive to - a@href. You can also disallow an attribute globally with - attr or *@attr (either syntax is fine; the latter - is provided for consistency with %HTML.AllowedAttributes). -

-

- Warning: This directive complements %HTML.ForbiddenElements, - accordingly, check - out that directive for a discussion of why you - should think twice before using this directive. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt deleted file mode 100644 index 93a53e14..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.ForbiddenElements.txt +++ /dev/null @@ -1,20 +0,0 @@ -HTML.ForbiddenElements -TYPE: lookup -VERSION: 3.1.0 -DEFAULT: array() ---DESCRIPTION-- -

- This was, perhaps, the most requested feature ever in HTML - Purifier. Please don't abuse it! This is the logical inverse of - %HTML.AllowedElements, and it will override that directive, or any - other directive. -

-

- If possible, %HTML.Allowed is recommended over this directive, because it - can sometimes be difficult to tell whether or not you've forbidden all of - the behavior you would like to disallow. If you forbid img - with the expectation of preventing images on your site, you'll be in for - a nasty surprise when people start using the background-image - CSS property. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt deleted file mode 100644 index 4a432d89..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Forms.txt +++ /dev/null @@ -1,11 +0,0 @@ -HTML.Forms -TYPE: bool -VERSION: 4.13.0 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to permit form elements in the user input, regardless of - %HTML.Trusted value. Please be very careful when using this functionality, as - enabling forms in untrusted documents may allow for phishing attacks. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt deleted file mode 100644 index e424c386..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.MaxImgLength.txt +++ /dev/null @@ -1,14 +0,0 @@ -HTML.MaxImgLength -TYPE: int/null -DEFAULT: 1200 -VERSION: 3.1.1 ---DESCRIPTION-- -

- This directive controls the maximum number of pixels in the width and - height attributes in img tags. This is - in place to prevent imagecrash attacks, disable with null at your own risk. - This directive is similar to %CSS.MaxImgLength, and both should be - concurrently edited, although there are - subtle differences in the input format (the HTML max is an integer). -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt deleted file mode 100644 index 700b3092..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Nofollow.txt +++ /dev/null @@ -1,7 +0,0 @@ -HTML.Nofollow -TYPE: bool -VERSION: 4.3.0 -DEFAULT: FALSE ---DESCRIPTION-- -If enabled, nofollow rel attributes are added to all outgoing links. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt deleted file mode 100644 index 62e8e160..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Parent.txt +++ /dev/null @@ -1,12 +0,0 @@ -HTML.Parent -TYPE: string -VERSION: 1.3.0 -DEFAULT: 'div' ---DESCRIPTION-- - -

- String name of element that HTML fragment passed to library will be - inserted in. An interesting variation would be using span as the - parent element, meaning that only inline tags would be allowed. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt deleted file mode 100644 index dfb72049..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Proprietary.txt +++ /dev/null @@ -1,12 +0,0 @@ -HTML.Proprietary -TYPE: bool -VERSION: 3.1.0 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to allow proprietary elements and attributes in your - documents, as per HTMLPurifier_HTMLModule_Proprietary. - Warning: This can cause your documents to stop - validating! -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt deleted file mode 100644 index cdda09a4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeEmbed.txt +++ /dev/null @@ -1,13 +0,0 @@ -HTML.SafeEmbed -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to permit embed tags in documents, with a number of extra - security features added to prevent script execution. This is similar to - what websites like MySpace do to embed tags. Embed is a proprietary - element and will cause your website to stop validating; you should - see if you can use %Output.FlashCompat with %HTML.SafeObject instead - first.

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt deleted file mode 100644 index 5eb6ec2b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeIframe.txt +++ /dev/null @@ -1,13 +0,0 @@ -HTML.SafeIframe -TYPE: bool -VERSION: 4.4.0 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to permit iframe tags in untrusted documents. This - directive must be accompanied by a whitelist of permitted iframes, - such as %URI.SafeIframeRegexp, otherwise it will fatally error. - This directive has no effect on strict doctypes, as iframes are not - valid. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt deleted file mode 100644 index ceb342e2..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeObject.txt +++ /dev/null @@ -1,13 +0,0 @@ -HTML.SafeObject -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -

- Whether or not to permit object tags in documents, with a number of extra - security features added to prevent script execution. This is similar to - what websites like MySpace do to object tags. You should also enable - %Output.FlashCompat in order to generate Internet Explorer - compatibility code for your object tags. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt deleted file mode 100644 index 5ebc7a19..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt +++ /dev/null @@ -1,10 +0,0 @@ -HTML.SafeScripting -TYPE: lookup -VERSION: 4.5.0 -DEFAULT: array() ---DESCRIPTION-- -

- Whether or not to permit script tags to external scripts in documents. - Inline scripting is not allowed, and the script must match an explicit whitelist. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt deleted file mode 100644 index a8b1de56..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Strict.txt +++ /dev/null @@ -1,9 +0,0 @@ -HTML.Strict -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false -DEPRECATED-VERSION: 1.7.0 -DEPRECATED-USE: HTML.Doctype ---DESCRIPTION-- -Determines whether or not to use Transitional (loose) or Strict rulesets. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt deleted file mode 100644 index 587a1677..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetBlank.txt +++ /dev/null @@ -1,8 +0,0 @@ -HTML.TargetBlank -TYPE: bool -VERSION: 4.4.0 -DEFAULT: FALSE ---DESCRIPTION-- -If enabled, target=blank attributes are added to all outgoing links. -(This includes links from an HTTPS version of a page to an HTTP version.) ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt deleted file mode 100644 index dd514c0d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoopener.txt +++ /dev/null @@ -1,10 +0,0 @@ ---# vim: et sw=4 sts=4 -HTML.TargetNoopener -TYPE: bool -VERSION: 4.8.0 -DEFAULT: TRUE ---DESCRIPTION-- -If enabled, noopener rel attributes are added to links which have -a target attribute associated with them. This prevents malicious -destinations from overwriting the original window. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt deleted file mode 100644 index cb5a0b0e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TargetNoreferrer.txt +++ /dev/null @@ -1,9 +0,0 @@ -HTML.TargetNoreferrer -TYPE: bool -VERSION: 4.8.0 -DEFAULT: TRUE ---DESCRIPTION-- -If enabled, noreferrer rel attributes are added to links which have -a target attribute associated with them. This prevents malicious -destinations from overwriting the original window. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt deleted file mode 100644 index b4c271b7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyAdd.txt +++ /dev/null @@ -1,8 +0,0 @@ -HTML.TidyAdd -TYPE: lookup -VERSION: 2.0.0 -DEFAULT: array() ---DESCRIPTION-- - -Fixes to add to the default set of Tidy fixes as per your level. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt deleted file mode 100644 index 4186ccd0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyLevel.txt +++ /dev/null @@ -1,24 +0,0 @@ -HTML.TidyLevel -TYPE: string -VERSION: 2.0.0 -DEFAULT: 'medium' ---DESCRIPTION-- - -

General level of cleanliness the Tidy module should enforce. -There are four allowed values:

-
-
none
-
No extra tidying should be done
-
light
-
Only fix elements that would be discarded otherwise due to - lack of support in doctype
-
medium
-
Enforce best practices
-
heavy
-
Transform all deprecated elements and attributes to standards - compliant equivalents
-
- ---ALLOWED-- -'none', 'light', 'medium', 'heavy' ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt deleted file mode 100644 index 996762bd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.TidyRemove.txt +++ /dev/null @@ -1,8 +0,0 @@ -HTML.TidyRemove -TYPE: lookup -VERSION: 2.0.0 -DEFAULT: array() ---DESCRIPTION-- - -Fixes to remove from the default set of Tidy fixes as per your level. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt deleted file mode 100644 index 1db9237e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.Trusted.txt +++ /dev/null @@ -1,9 +0,0 @@ -HTML.Trusted -TYPE: bool -VERSION: 2.0.0 -DEFAULT: false ---DESCRIPTION-- -Indicates whether or not the user input is trusted or not. If the input is -trusted, a more expansive set of allowed tags and attributes will be used. -See also %CSS.Trusted. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt deleted file mode 100644 index 2a47e384..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/HTML.XHTML.txt +++ /dev/null @@ -1,11 +0,0 @@ -HTML.XHTML -TYPE: bool -DEFAULT: true -VERSION: 1.1.0 -DEPRECATED-VERSION: 1.7.0 -DEPRECATED-USE: HTML.Doctype ---DESCRIPTION-- -Determines whether or not output is XHTML 1.0 or HTML 4.01 flavor. ---ALIASES-- -Core.XHTML ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt deleted file mode 100644 index 08921fde..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.CommentScriptContents.txt +++ /dev/null @@ -1,10 +0,0 @@ -Output.CommentScriptContents -TYPE: bool -VERSION: 2.0.0 -DEFAULT: true ---DESCRIPTION-- -Determines whether or not HTML Purifier should attempt to fix up the -contents of script tags for legacy browsers with comments. ---ALIASES-- -Core.CommentScriptContents ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt deleted file mode 100644 index d6f0d9f2..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FixInnerHTML.txt +++ /dev/null @@ -1,15 +0,0 @@ -Output.FixInnerHTML -TYPE: bool -VERSION: 4.3.0 -DEFAULT: true ---DESCRIPTION-- -

- If true, HTML Purifier will protect against Internet Explorer's - mishandling of the innerHTML attribute by appending - a space to any attribute that does not contain angled brackets, spaces - or quotes, but contains a backtick. This slightly changes the - semantics of any given attribute, so if this is unacceptable and - you do not use innerHTML on any of your pages, you can - turn this directive off. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt deleted file mode 100644 index 93398e85..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.FlashCompat.txt +++ /dev/null @@ -1,11 +0,0 @@ -Output.FlashCompat -TYPE: bool -VERSION: 4.1.0 -DEFAULT: false ---DESCRIPTION-- -

- If true, HTML Purifier will generate Internet Explorer compatibility - code for all object code. This is highly recommended if you enable - %HTML.SafeObject. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt deleted file mode 100644 index 79f8ad82..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.Newline.txt +++ /dev/null @@ -1,13 +0,0 @@ -Output.Newline -TYPE: string/null -VERSION: 2.0.1 -DEFAULT: NULL ---DESCRIPTION-- - -

- Newline string to format final output with. If left null, HTML Purifier - will auto-detect the default newline type of the system and use that; - you can manually override it here. Remember, \r\n is Windows, \r - is Mac, and \n is Unix. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt deleted file mode 100644 index 232b0236..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.SortAttr.txt +++ /dev/null @@ -1,14 +0,0 @@ -Output.SortAttr -TYPE: bool -VERSION: 3.2.0 -DEFAULT: false ---DESCRIPTION-- -

- If true, HTML Purifier will sort attributes by name before writing them back - to the document, converting a tag like: <el b="" a="" c="" /> - to <el a="" b="" c="" />. This is a workaround for - a bug in FCKeditor which causes it to swap attributes order, adding noise - to text diffs. If you're not seeing this bug, chances are, you don't need - this directive. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt deleted file mode 100644 index 06bab00a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Output.TidyFormat.txt +++ /dev/null @@ -1,25 +0,0 @@ -Output.TidyFormat -TYPE: bool -VERSION: 1.1.1 -DEFAULT: false ---DESCRIPTION-- -

- Determines whether or not to run Tidy on the final output for pretty - formatting reasons, such as indentation and wrap. -

-

- This can greatly improve readability for editors who are hand-editing - the HTML, but is by no means necessary as HTML Purifier has already - fixed all major errors the HTML may have had. Tidy is a non-default - extension, and this directive will silently fail if Tidy is not - available. -

-

- If you are looking to make the overall look of your page's source - better, I recommend running Tidy on the entire page rather than just - user-content (after all, the indentation relative to the containing - blocks will be incorrect). -

---ALIASES-- -Core.TidyFormat ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt deleted file mode 100644 index 071bc029..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Test.ForceNoIconv.txt +++ /dev/null @@ -1,7 +0,0 @@ -Test.ForceNoIconv -TYPE: bool -DEFAULT: false ---DESCRIPTION-- -When set to true, HTMLPurifier_Encoder will act as if iconv does not exist -and use only pure PHP implementations. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt deleted file mode 100644 index eb97307e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.AllowedSchemes.txt +++ /dev/null @@ -1,18 +0,0 @@ -URI.AllowedSchemes -TYPE: lookup ---DEFAULT-- -array ( - 'http' => true, - 'https' => true, - 'mailto' => true, - 'ftp' => true, - 'nntp' => true, - 'news' => true, - 'tel' => true, -) ---DESCRIPTION-- -Whitelist that defines the schemes that a URI is allowed to have. This -prevents XSS attacks from using pseudo-schemes like javascript or mocha. -There is also support for the data and file -URI schemes, but they are not enabled by default. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt deleted file mode 100644 index 876f0680..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Base.txt +++ /dev/null @@ -1,17 +0,0 @@ -URI.Base -TYPE: string/null -VERSION: 2.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- The base URI is the URI of the document this purified HTML will be - inserted into. This information is important if HTML Purifier needs - to calculate absolute URIs from relative URIs, such as when %URI.MakeAbsolute - is on. You may use a non-absolute URI for this value, but behavior - may vary (%URI.MakeAbsolute deals nicely with both absolute and - relative paths, but forwards-compatibility is not guaranteed). - Warning: If set, the scheme on this URI - overrides the one specified by %URI.DefaultScheme. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt deleted file mode 100644 index 834bc08c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefaultScheme.txt +++ /dev/null @@ -1,15 +0,0 @@ -URI.DefaultScheme -TYPE: string/null -DEFAULT: 'http' ---DESCRIPTION-- - -

- Defines through what scheme the output will be served, in order to - select the proper object validator when no scheme information is present. -

- -

- Starting with HTML Purifier 4.9.0, the default scheme can be null, in - which case we reject all URIs which do not have explicit schemes. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt deleted file mode 100644 index f05312ba..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionID.txt +++ /dev/null @@ -1,11 +0,0 @@ -URI.DefinitionID -TYPE: string/null -VERSION: 2.1.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- Unique identifier for a custom-built URI definition. If you want - to add custom URIFilters, you must specify this value. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt deleted file mode 100644 index 80cfea93..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DefinitionRev.txt +++ /dev/null @@ -1,11 +0,0 @@ -URI.DefinitionRev -TYPE: int -VERSION: 2.1.0 -DEFAULT: 1 ---DESCRIPTION-- - -

- Revision identifier for your custom definition. See - %HTML.DefinitionRev for details. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt deleted file mode 100644 index 71ce025a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Disable.txt +++ /dev/null @@ -1,14 +0,0 @@ -URI.Disable -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false ---DESCRIPTION-- - -

- Disables all URIs in all forms. Not sure why you'd want to do that - (after all, the Internet's founded on the notion of a hyperlink). -

- ---ALIASES-- -Attr.DisableURI ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt deleted file mode 100644 index 13c122c8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternal.txt +++ /dev/null @@ -1,11 +0,0 @@ -URI.DisableExternal -TYPE: bool -VERSION: 1.2.0 -DEFAULT: false ---DESCRIPTION-- -Disables links to external websites. This is a highly effective anti-spam -and anti-pagerank-leech measure, but comes at a hefty price: nolinks or -images outside of your domain will be allowed. Non-linkified URIs will -still be preserved. If you want to be able to link to subdomains or use -absolute URIs, specify %URI.Host for your website. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt deleted file mode 100644 index abcc1efd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableExternalResources.txt +++ /dev/null @@ -1,13 +0,0 @@ -URI.DisableExternalResources -TYPE: bool -VERSION: 1.3.0 -DEFAULT: false ---DESCRIPTION-- -Disables the embedding of external resources, preventing users from -embedding things like images from other hosts. This prevents access -tracking (good for email viewers), bandwidth leeching, cross-site request -forging, goatse.cx posting, and other nasties, but also results in a loss -of end-user functionality (they can't directly post a pic they posted from -Flickr anymore). Use it if you don't have a robust user-content moderation -team. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt deleted file mode 100644 index f891de49..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.DisableResources.txt +++ /dev/null @@ -1,15 +0,0 @@ -URI.DisableResources -TYPE: bool -VERSION: 4.2.0 -DEFAULT: false ---DESCRIPTION-- -

- Disables embedding resources, essentially meaning no pictures. You can - still link to them though. See %URI.DisableExternalResources for why - this might be a good idea. -

-

- Note: While this directive has been available since 1.3.0, - it didn't actually start doing anything until 4.2.0. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt deleted file mode 100644 index ee83b121..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Host.txt +++ /dev/null @@ -1,19 +0,0 @@ -URI.Host -TYPE: string/null -VERSION: 1.2.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- Defines the domain name of the server, so we can determine whether or - an absolute URI is from your website or not. Not strictly necessary, - as users should be using relative URIs to reference resources on your - website. It will, however, let you use absolute URIs to link to - subdomains of the domain you post here: i.e. example.com will allow - sub.example.com. However, higher up domains will still be excluded: - if you set %URI.Host to sub.example.com, example.com will be blocked. - Note: This directive overrides %URI.Base because - a given page may be on a sub-domain, but you wish HTML Purifier to be - more relaxed and allow some of the parent domains too. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt deleted file mode 100644 index 0b6df762..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.HostBlacklist.txt +++ /dev/null @@ -1,9 +0,0 @@ -URI.HostBlacklist -TYPE: list -VERSION: 1.3.0 -DEFAULT: array() ---DESCRIPTION-- -List of strings that are forbidden in the host of any URI. Use it to kill -domain names of spam, etc. Note that it will catch anything in the domain, -so moo.com will catch moo.com.example.com. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt deleted file mode 100644 index 4214900a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MakeAbsolute.txt +++ /dev/null @@ -1,13 +0,0 @@ -URI.MakeAbsolute -TYPE: bool -VERSION: 2.1.0 -DEFAULT: false ---DESCRIPTION-- - -

- Converts all URIs into absolute forms. This is useful when the HTML - being filtered assumes a specific base path, but will actually be - viewed in a different context (and setting an alternate base URI is - not possible). %URI.Base must be set for this directive to work. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt deleted file mode 100644 index 58c81dcc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.Munge.txt +++ /dev/null @@ -1,83 +0,0 @@ -URI.Munge -TYPE: string/null -VERSION: 1.3.0 -DEFAULT: NULL ---DESCRIPTION-- - -

- Munges all browsable (usually http, https and ftp) - absolute URIs into another URI, usually a URI redirection service. - This directive accepts a URI, formatted with a %s where - the url-encoded original URI should be inserted (sample: - http://www.google.com/url?q=%s). -

-

- Uses for this directive: -

-
    -
  • - Prevent PageRank leaks, while being fairly transparent - to users (you may also want to add some client side JavaScript to - override the text in the statusbar). Notice: - Many security experts believe that this form of protection does not deter spam-bots. -
  • -
  • - Redirect users to a splash page telling them they are leaving your - website. While this is poor usability practice, it is often mandated - in corporate environments. -
  • -
-

- Prior to HTML Purifier 3.1.1, this directive also enabled the munging - of browsable external resources, which could break things if your redirection - script was a splash page or used meta tags. To revert to - previous behavior, please use %URI.MungeResources. -

-

- You may want to also use %URI.MungeSecretKey along with this directive - in order to enforce what URIs your redirector script allows. Open - redirector scripts can be a security risk and negatively affect the - reputation of your domain name. -

-

- Starting with HTML Purifier 3.1.1, there is also these substitutions: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyDescriptionExample <a href="">
%r1 - The URI embeds a resource
(blank) - The URI is merely a link
%nThe name of the tag this URI came froma
%mThe name of the attribute this URI came fromhref
%pThe name of the CSS property this URI came from, or blank if irrelevant
-

- Admittedly, these letters are somewhat arbitrary; the only stipulation - was that they couldn't be a through f. r is for resource (I would have preferred - e, but you take what you can get), n is for name, m - was picked because it came after n (and I couldn't use a), p is for - property. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt deleted file mode 100644 index 6fce0fdc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeResources.txt +++ /dev/null @@ -1,17 +0,0 @@ -URI.MungeResources -TYPE: bool -VERSION: 3.1.1 -DEFAULT: false ---DESCRIPTION-- -

- If true, any URI munging directives like %URI.Munge - will also apply to embedded resources, such as <img src="">. - Be careful enabling this directive if you have a redirector script - that does not use the Location HTTP header; all of your images - and other embedded resources will break. -

-

- Warning: It is strongly advised you use this in conjunction - %URI.MungeSecretKey to mitigate the security risk of an open redirector. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt deleted file mode 100644 index 1e17c1d4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.MungeSecretKey.txt +++ /dev/null @@ -1,30 +0,0 @@ -URI.MungeSecretKey -TYPE: string/null -VERSION: 3.1.1 -DEFAULT: NULL ---DESCRIPTION-- -

- This directive enables secure checksum generation along with %URI.Munge. - It should be set to a secure key that is not shared with anyone else. - The checksum can be placed in the URI using %t. Use of this checksum - affords an additional level of protection by allowing a redirector - to check if a URI has passed through HTML Purifier with this line: -

- -
$checksum === hash_hmac("sha256", $url, $secret_key)
- -

- If the output is TRUE, the redirector script should accept the URI. -

- -

- Please note that it would still be possible for an attacker to procure - secure hashes en-mass by abusing your website's Preview feature or the - like, but this service affords an additional level of protection - that should be combined with website blacklisting. -

- -

- Remember this has no effect if %URI.Munge is not on. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt deleted file mode 100644 index 23331a4e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.OverrideAllowedSchemes.txt +++ /dev/null @@ -1,9 +0,0 @@ -URI.OverrideAllowedSchemes -TYPE: bool -DEFAULT: true ---DESCRIPTION-- -If this is set to true (which it is by default), you can override -%URI.AllowedSchemes by simply registering a HTMLPurifier_URIScheme to the -registry. If false, you will also have to update that directive in order -to add more schemes. ---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt deleted file mode 100644 index 79084832..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/URI.SafeIframeRegexp.txt +++ /dev/null @@ -1,22 +0,0 @@ -URI.SafeIframeRegexp -TYPE: string/null -VERSION: 4.4.0 -DEFAULT: NULL ---DESCRIPTION-- -

- A PCRE regular expression that will be matched against an iframe URI. This is - a relatively inflexible scheme, but works well enough for the most common - use-case of iframes: embedded video. This directive only has an effect if - %HTML.SafeIframe is enabled. Here are some example values: -

-
    -
  • %^http://www.youtube.com/embed/% - Allow YouTube videos
  • -
  • %^http://player.vimeo.com/video/% - Allow Vimeo videos
  • -
  • %^http://(www.youtube.com/embed/|player.vimeo.com/video/)% - Allow both
  • -
-

- Note that this directive does not give you enough granularity to, say, disable - all autoplay videos. Pipe up on the HTML Purifier forums if this - is a capability you want. -

---# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini deleted file mode 100644 index 5de4505e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/info.ini +++ /dev/null @@ -1,3 +0,0 @@ -name = "HTML Purifier" - -; vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php deleted file mode 100644 index 543e3f8f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ContentSets.php +++ /dev/null @@ -1,170 +0,0 @@ - true) indexed by name. - * @type array - * @note This is in HTMLPurifier_HTMLDefinition->info_content_sets - */ - public $lookup = array(); - - /** - * Synchronized list of defined content sets (keys of info). - * @type array - */ - protected $keys = array(); - /** - * Synchronized list of defined content values (values of info). - * @type array - */ - protected $values = array(); - - /** - * Merges in module's content sets, expands identifiers in the content - * sets and populates the keys, values and lookup member variables. - * @param HTMLPurifier_HTMLModule[] $modules List of HTMLPurifier_HTMLModule - */ - public function __construct($modules) - { - if (!is_array($modules)) { - $modules = array($modules); - } - // populate content_sets based on module hints - // sorry, no way of overloading - foreach ($modules as $module) { - foreach ($module->content_sets as $key => $value) { - $temp = $this->convertToLookup($value); - if (isset($this->lookup[$key])) { - // add it into the existing content set - $this->lookup[$key] = array_merge($this->lookup[$key], $temp); - } else { - $this->lookup[$key] = $temp; - } - } - } - $old_lookup = false; - while ($old_lookup !== $this->lookup) { - $old_lookup = $this->lookup; - foreach ($this->lookup as $i => $set) { - $add = array(); - foreach ($set as $element => $x) { - if (isset($this->lookup[$element])) { - $add += $this->lookup[$element]; - unset($this->lookup[$i][$element]); - } - } - $this->lookup[$i] += $add; - } - } - - foreach ($this->lookup as $key => $lookup) { - $this->info[$key] = implode(' | ', array_keys($lookup)); - } - $this->keys = array_keys($this->info); - $this->values = array_values($this->info); - } - - /** - * Accepts a definition; generates and assigns a ChildDef for it - * @param HTMLPurifier_ElementDef $def HTMLPurifier_ElementDef reference - * @param HTMLPurifier_HTMLModule $module Module that defined the ElementDef - */ - public function generateChildDef(&$def, $module) - { - if (!empty($def->child)) { // already done! - return; - } - $content_model = $def->content_model; - if (is_string($content_model)) { - // Assume that $this->keys is alphanumeric - $def->content_model = preg_replace_callback( - '/\b(' . implode('|', $this->keys) . ')\b/', - array($this, 'generateChildDefCallback'), - $content_model - ); - //$def->content_model = str_replace( - // $this->keys, $this->values, $content_model); - } - $def->child = $this->getChildDef($def, $module); - } - - public function generateChildDefCallback($matches) - { - return $this->info[$matches[0]]; - } - - /** - * Instantiates a ChildDef based on content_model and content_model_type - * member variables in HTMLPurifier_ElementDef - * @note This will also defer to modules for custom HTMLPurifier_ChildDef - * subclasses that need content set expansion - * @param HTMLPurifier_ElementDef $def HTMLPurifier_ElementDef to have ChildDef extracted - * @param HTMLPurifier_HTMLModule $module Module that defined the ElementDef - * @return HTMLPurifier_ChildDef corresponding to ElementDef - */ - public function getChildDef($def, $module) - { - $value = $def->content_model; - if (is_object($value)) { - trigger_error( - 'Literal object child definitions should be stored in '. - 'ElementDef->child not ElementDef->content_model', - E_USER_NOTICE - ); - return $value; - } - switch ($def->content_model_type) { - case 'required': - return new HTMLPurifier_ChildDef_Required($value); - case 'optional': - return new HTMLPurifier_ChildDef_Optional($value); - case 'empty': - return new HTMLPurifier_ChildDef_Empty(); - case 'custom': - return new HTMLPurifier_ChildDef_Custom($value); - } - // defer to its module - $return = false; - if ($module->defines_child_def) { // save a func call - $return = $module->getChildDef($def); - } - if ($return !== false) { - return $return; - } - // error-out - trigger_error( - 'Could not determine which ChildDef class to instantiate', - E_USER_ERROR - ); - return false; - } - - /** - * Converts a string list of elements separated by pipes into - * a lookup array. - * @param string $string List of elements - * @return array Lookup array of elements - */ - protected function convertToLookup($string) - { - $array = explode('|', str_replace(' ', '', $string)); - $ret = array(); - foreach ($array as $k) { - $ret[$k] = true; - } - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php deleted file mode 100644 index 00e509c8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Context.php +++ /dev/null @@ -1,95 +0,0 @@ -_storage)) { - trigger_error( - "Name $name produces collision, cannot re-register", - E_USER_ERROR - ); - return; - } - $this->_storage[$name] =& $ref; - } - - /** - * Retrieves a variable reference from the context. - * @param string $name String name - * @param bool $ignore_error Boolean whether or not to ignore error - * @return mixed - */ - public function &get($name, $ignore_error = false) - { - if (!array_key_exists($name, $this->_storage)) { - if (!$ignore_error) { - trigger_error( - "Attempted to retrieve non-existent variable $name", - E_USER_ERROR - ); - } - $var = null; // so we can return by reference - return $var; - } - return $this->_storage[$name]; - } - - /** - * Destroys a variable in the context. - * @param string $name String name - */ - public function destroy($name) - { - if (!array_key_exists($name, $this->_storage)) { - trigger_error( - "Attempted to destroy non-existent variable $name", - E_USER_ERROR - ); - return; - } - unset($this->_storage[$name]); - } - - /** - * Checks whether or not the variable exists. - * @param string $name String name - * @return bool - */ - public function exists($name) - { - return array_key_exists($name, $this->_storage); - } - - /** - * Loads a series of variables from an associative array - * @param array $context_array Assoc array of variables to load - */ - public function loadArray($context_array) - { - foreach ($context_array as $key => $discard) { - $this->register($key, $context_array[$key]); - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php deleted file mode 100644 index bc6d4336..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Definition.php +++ /dev/null @@ -1,55 +0,0 @@ -setup) { - return; - } - $this->setup = true; - $this->doSetup($config); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php deleted file mode 100644 index 9aa8ff35..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache.php +++ /dev/null @@ -1,129 +0,0 @@ -type = $type; - } - - /** - * Generates a unique identifier for a particular configuration - * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config - * @return string - */ - public function generateKey($config) - { - return $config->version . ',' . // possibly replace with function calls - $config->getBatchSerial($this->type) . ',' . - $config->get($this->type . '.DefinitionRev'); - } - - /** - * Tests whether or not a key is old with respect to the configuration's - * version and revision number. - * @param string $key Key to test - * @param HTMLPurifier_Config $config Instance of HTMLPurifier_Config to test against - * @return bool - */ - public function isOld($key, $config) - { - if (substr_count($key, ',') < 2) { - return true; - } - list($version, $hash, $revision) = explode(',', $key, 3); - $compare = version_compare($version, $config->version); - // version mismatch, is always old - if ($compare != 0) { - return true; - } - // versions match, ids match, check revision number - if ($hash == $config->getBatchSerial($this->type) && - $revision < $config->get($this->type . '.DefinitionRev')) { - return true; - } - return false; - } - - /** - * Checks if a definition's type jives with the cache's type - * @note Throws an error on failure - * @param HTMLPurifier_Definition $def Definition object to check - * @return bool true if good, false if not - */ - public function checkDefType($def) - { - if ($def->type !== $this->type) { - trigger_error("Cannot use definition of type {$def->type} in cache for {$this->type}"); - return false; - } - return true; - } - - /** - * Adds a definition object to the cache - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - */ - abstract public function add($def, $config); - - /** - * Unconditionally saves a definition object to the cache - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - */ - abstract public function set($def, $config); - - /** - * Replace an object in the cache - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - */ - abstract public function replace($def, $config); - - /** - * Retrieves a definition object from the cache - * @param HTMLPurifier_Config $config - */ - abstract public function get($config); - - /** - * Removes a definition object to the cache - * @param HTMLPurifier_Config $config - */ - abstract public function remove($config); - - /** - * Clears all objects from cache - * @param HTMLPurifier_Config $config - */ - abstract public function flush($config); - - /** - * Clears all expired (older version or revision) objects from cache - * @note Be careful implementing this method as flush. Flush must - * not interfere with other Definition types, and cleanup() - * should not be repeatedly called by userland code. - * @param HTMLPurifier_Config $config - */ - abstract public function cleanup($config); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php deleted file mode 100644 index b57a51b6..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php +++ /dev/null @@ -1,112 +0,0 @@ -copy(); - // reference is necessary for mocks in PHP 4 - $decorator->cache =& $cache; - $decorator->type = $cache->type; - return $decorator; - } - - /** - * Cross-compatible clone substitute - * @return HTMLPurifier_DefinitionCache_Decorator - */ - public function copy() - { - return new HTMLPurifier_DefinitionCache_Decorator(); - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function add($def, $config) - { - return $this->cache->add($def, $config); - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function set($def, $config) - { - return $this->cache->set($def, $config); - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function replace($def, $config) - { - return $this->cache->replace($def, $config); - } - - /** - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function get($config) - { - return $this->cache->get($config); - } - - /** - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function remove($config) - { - return $this->cache->remove($config); - } - - /** - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function flush($config) - { - return $this->cache->flush($config); - } - - /** - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function cleanup($config) - { - return $this->cache->cleanup($config); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php deleted file mode 100644 index 4991777c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php +++ /dev/null @@ -1,78 +0,0 @@ -definitions[$this->generateKey($config)] = $def; - } - return $status; - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function set($def, $config) - { - $status = parent::set($def, $config); - if ($status) { - $this->definitions[$this->generateKey($config)] = $def; - } - return $status; - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function replace($def, $config) - { - $status = parent::replace($def, $config); - if ($status) { - $this->definitions[$this->generateKey($config)] = $def; - } - return $status; - } - - /** - * @param HTMLPurifier_Config $config - * @return mixed - */ - public function get($config) - { - $key = $this->generateKey($config); - if (isset($this->definitions[$key])) { - return $this->definitions[$key]; - } - $this->definitions[$key] = parent::get($config); - return $this->definitions[$key]; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in deleted file mode 100644 index b1fec8d3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator/Template.php.in +++ /dev/null @@ -1,82 +0,0 @@ -checkDefType($def)) { - return; - } - $file = $this->generateFilePath($config); - if (file_exists($file)) { - return false; - } - if (!$this->_prepareDir($config)) { - return false; - } - return $this->_write($file, serialize($def), $config); - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return int|bool - */ - public function set($def, $config) - { - if (!$this->checkDefType($def)) { - return; - } - $file = $this->generateFilePath($config); - if (!$this->_prepareDir($config)) { - return false; - } - return $this->_write($file, serialize($def), $config); - } - - /** - * @param HTMLPurifier_Definition $def - * @param HTMLPurifier_Config $config - * @return int|bool - */ - public function replace($def, $config) - { - if (!$this->checkDefType($def)) { - return; - } - $file = $this->generateFilePath($config); - if (!file_exists($file)) { - return false; - } - if (!$this->_prepareDir($config)) { - return false; - } - return $this->_write($file, serialize($def), $config); - } - - /** - * @param HTMLPurifier_Config $config - * @return bool|HTMLPurifier_Config - */ - public function get($config) - { - $file = $this->generateFilePath($config); - if (!file_exists($file)) { - return false; - } - return unserialize(file_get_contents($file)); - } - - /** - * @param HTMLPurifier_Config $config - * @return bool - */ - public function remove($config) - { - $file = $this->generateFilePath($config); - if (!file_exists($file)) { - return false; - } - return unlink($file); - } - - /** - * @param HTMLPurifier_Config $config - * @return bool - */ - public function flush($config) - { - if (!$this->_prepareDir($config)) { - return false; - } - $dir = $this->generateDirectoryPath($config); - $dh = opendir($dir); - // Apparently, on some versions of PHP, readdir will return - // an empty string if you pass an invalid argument to readdir. - // So you need this test. See #49. - if (false === $dh) { - return false; - } - while (false !== ($filename = readdir($dh))) { - if (empty($filename)) { - continue; - } - if ($filename[0] === '.') { - continue; - } - unlink($dir . '/' . $filename); - } - closedir($dh); - return true; - } - - /** - * @param HTMLPurifier_Config $config - * @return bool - */ - public function cleanup($config) - { - if (!$this->_prepareDir($config)) { - return false; - } - $dir = $this->generateDirectoryPath($config); - $dh = opendir($dir); - // See #49 (and above). - if (false === $dh) { - return false; - } - while (false !== ($filename = readdir($dh))) { - if (empty($filename)) { - continue; - } - if ($filename[0] === '.') { - continue; - } - $key = substr($filename, 0, strlen($filename) - 4); - if ($this->isOld($key, $config)) { - unlink($dir . '/' . $filename); - } - } - closedir($dh); - return true; - } - - /** - * Generates the file path to the serial file corresponding to - * the configuration and definition name - * @param HTMLPurifier_Config $config - * @return string - * @todo Make protected - */ - public function generateFilePath($config) - { - $key = $this->generateKey($config); - return $this->generateDirectoryPath($config) . '/' . $key . '.ser'; - } - - /** - * Generates the path to the directory contain this cache's serial files - * @param HTMLPurifier_Config $config - * @return string - * @note No trailing slash - * @todo Make protected - */ - public function generateDirectoryPath($config) - { - $base = $this->generateBaseDirectoryPath($config); - return $base . '/' . $this->type; - } - - /** - * Generates path to base directory that contains all definition type - * serials - * @param HTMLPurifier_Config $config - * @return mixed|string - * @todo Make protected - */ - public function generateBaseDirectoryPath($config) - { - $base = $config->get('Cache.SerializerPath'); - $base = is_null($base) ? HTMLPURIFIER_PREFIX . '/HTMLPurifier/DefinitionCache/Serializer' : $base; - return $base; - } - - /** - * Convenience wrapper function for file_put_contents - * @param string $file File name to write to - * @param string $data Data to write into file - * @param HTMLPurifier_Config $config - * @return int|bool Number of bytes written if success, or false if failure. - */ - private function _write($file, $data, $config) - { - $result = file_put_contents($file, $data); - if ($result !== false) { - // set permissions of the new file (no execute) - $chmod = $config->get('Cache.SerializerPermissions'); - if ($chmod !== null) { - chmod($file, $chmod & 0666); - } - } - return $result; - } - - /** - * Prepares the directory that this type stores the serials in - * @param HTMLPurifier_Config $config - * @return bool True if successful - */ - private function _prepareDir($config) - { - $directory = $this->generateDirectoryPath($config); - $chmod = $config->get('Cache.SerializerPermissions'); - if ($chmod === null) { - if (!@mkdir($directory) && !is_dir($directory)) { - trigger_error( - 'Could not create directory ' . $directory . '', - E_USER_WARNING - ); - return false; - } - return true; - } - if (!is_dir($directory)) { - $base = $this->generateBaseDirectoryPath($config); - if (!is_dir($base)) { - trigger_error( - 'Base directory ' . $base . ' does not exist, - please create or change using %Cache.SerializerPath', - E_USER_WARNING - ); - return false; - } elseif (!$this->_testPermissions($base, $chmod)) { - return false; - } - if (!@mkdir($directory, $chmod) && !is_dir($directory)) { - trigger_error( - 'Could not create directory ' . $directory . '', - E_USER_WARNING - ); - return false; - } - if (!$this->_testPermissions($directory, $chmod)) { - return false; - } - } elseif (!$this->_testPermissions($directory, $chmod)) { - return false; - } - return true; - } - - /** - * Tests permissions on a directory and throws out friendly - * error messages and attempts to chmod it itself if possible - * @param string $dir Directory path - * @param int $chmod Permissions - * @return bool True if directory is writable - */ - private function _testPermissions($dir, $chmod) - { - // early abort, if it is writable, everything is hunky-dory - if (is_writable($dir)) { - return true; - } - if (!is_dir($dir)) { - // generally, you'll want to handle this beforehand - // so a more specific error message can be given - trigger_error( - 'Directory ' . $dir . ' does not exist', - E_USER_WARNING - ); - return false; - } - if (function_exists('posix_getuid') && $chmod !== null) { - // POSIX system, we can give more specific advice - if (fileowner($dir) === posix_getuid()) { - // we can chmod it ourselves - $chmod = $chmod | 0700; - if (chmod($dir, $chmod)) { - return true; - } - } elseif (filegroup($dir) === posix_getgid()) { - $chmod = $chmod | 0070; - } else { - // PHP's probably running as nobody, it is - // not obvious how to fix this (777 is probably - // bad if you are multi-user), let the user figure it out - $chmod = null; - } - trigger_error( - 'Directory ' . $dir . ' not writable. ' . - ($chmod === null ? '' : 'Please chmod to ' . decoct($chmod)), - E_USER_WARNING - ); - } else { - // generic error message - trigger_error( - 'Directory ' . $dir . ' not writable, ' . - 'please alter file permissions', - E_USER_WARNING - ); - } - return false; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README deleted file mode 100644 index 2e35c1c3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/README +++ /dev/null @@ -1,3 +0,0 @@ -This is a dummy file to prevent Git from ignoring this empty directory. - - vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php deleted file mode 100644 index 3a0f4616..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCacheFactory.php +++ /dev/null @@ -1,106 +0,0 @@ - array()); - - /** - * @type array - */ - protected $implementations = array(); - - /** - * @type HTMLPurifier_DefinitionCache_Decorator[] - */ - protected $decorators = array(); - - /** - * Initialize default decorators - */ - public function setup() - { - $this->addDecorator('Cleanup'); - } - - /** - * Retrieves an instance of global definition cache factory. - * @param HTMLPurifier_DefinitionCacheFactory $prototype - * @return HTMLPurifier_DefinitionCacheFactory - */ - public static function instance($prototype = null) - { - static $instance; - if ($prototype !== null) { - $instance = $prototype; - } elseif ($instance === null || $prototype === true) { - $instance = new HTMLPurifier_DefinitionCacheFactory(); - $instance->setup(); - } - return $instance; - } - - /** - * Registers a new definition cache object - * @param string $short Short name of cache object, for reference - * @param string $long Full class name of cache object, for construction - */ - public function register($short, $long) - { - $this->implementations[$short] = $long; - } - - /** - * Factory method that creates a cache object based on configuration - * @param string $type Name of definitions handled by cache - * @param HTMLPurifier_Config $config Config instance - * @return mixed - */ - public function create($type, $config) - { - $method = $config->get('Cache.DefinitionImpl'); - if ($method === null) { - return new HTMLPurifier_DefinitionCache_Null($type); - } - if (!empty($this->caches[$method][$type])) { - return $this->caches[$method][$type]; - } - if (isset($this->implementations[$method]) && - class_exists($class = $this->implementations[$method])) { - $cache = new $class($type); - } else { - if ($method != 'Serializer') { - trigger_error("Unrecognized DefinitionCache $method, using Serializer instead", E_USER_WARNING); - } - $cache = new HTMLPurifier_DefinitionCache_Serializer($type); - } - foreach ($this->decorators as $decorator) { - $new_cache = $decorator->decorate($cache); - // prevent infinite recursion in PHP 4 - unset($cache); - $cache = $new_cache; - } - $this->caches[$method][$type] = $cache; - return $this->caches[$method][$type]; - } - - /** - * Registers a decorator to add to all new cache objects - * @param HTMLPurifier_DefinitionCache_Decorator|string $decorator An instance or the name of a decorator - */ - public function addDecorator($decorator) - { - if (is_string($decorator)) { - $class = "HTMLPurifier_DefinitionCache_Decorator_$decorator"; - $decorator = new $class; - } - $this->decorators[$decorator->name] = $decorator; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php deleted file mode 100644 index 4acd06e5..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Doctype.php +++ /dev/null @@ -1,73 +0,0 @@ -renderDoctype. - * If structure changes, please update that function. - */ -class HTMLPurifier_Doctype -{ - /** - * Full name of doctype - * @type string - */ - public $name; - - /** - * List of standard modules (string identifiers or literal objects) - * that this doctype uses - * @type array - */ - public $modules = array(); - - /** - * List of modules to use for tidying up code - * @type array - */ - public $tidyModules = array(); - - /** - * Is the language derived from XML (i.e. XHTML)? - * @type bool - */ - public $xml = true; - - /** - * List of aliases for this doctype - * @type array - */ - public $aliases = array(); - - /** - * Public DTD identifier - * @type string - */ - public $dtdPublic; - - /** - * System DTD identifier - * @type string - */ - public $dtdSystem; - - public function __construct( - $name = null, - $xml = true, - $modules = array(), - $tidyModules = array(), - $aliases = array(), - $dtd_public = null, - $dtd_system = null - ) { - $this->name = $name; - $this->xml = $xml; - $this->modules = $modules; - $this->tidyModules = $tidyModules; - $this->aliases = $aliases; - $this->dtdPublic = $dtd_public; - $this->dtdSystem = $dtd_system; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php deleted file mode 100644 index acc1d64a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php +++ /dev/null @@ -1,142 +0,0 @@ -doctypes[$doctype->name] = $doctype; - $name = $doctype->name; - // hookup aliases - foreach ($doctype->aliases as $alias) { - if (isset($this->doctypes[$alias])) { - continue; - } - $this->aliases[$alias] = $name; - } - // remove old aliases - if (isset($this->aliases[$name])) { - unset($this->aliases[$name]); - } - return $doctype; - } - - /** - * Retrieves reference to a doctype of a certain name - * @note This function resolves aliases - * @note When possible, use the more fully-featured make() - * @param string $doctype Name of doctype - * @return HTMLPurifier_Doctype Editable doctype object - */ - public function get($doctype) - { - if (isset($this->aliases[$doctype])) { - $doctype = $this->aliases[$doctype]; - } - if (!isset($this->doctypes[$doctype])) { - trigger_error('Doctype ' . htmlspecialchars($doctype) . ' does not exist', E_USER_ERROR); - $anon = new HTMLPurifier_Doctype($doctype); - return $anon; - } - return $this->doctypes[$doctype]; - } - - /** - * Creates a doctype based on a configuration object, - * will perform initialization on the doctype - * @note Use this function to get a copy of doctype that config - * can hold on to (this is necessary in order to tell - * Generator whether or not the current document is XML - * based or not). - * @param HTMLPurifier_Config $config - * @return HTMLPurifier_Doctype - */ - public function make($config) - { - return clone $this->get($this->getDoctypeFromConfig($config)); - } - - /** - * Retrieves the doctype from the configuration object - * @param HTMLPurifier_Config $config - * @return string - */ - public function getDoctypeFromConfig($config) - { - // recommended test - $doctype = $config->get('HTML.Doctype'); - if (!empty($doctype)) { - return $doctype; - } - $doctype = $config->get('HTML.CustomDoctype'); - if (!empty($doctype)) { - return $doctype; - } - // backwards-compatibility - if ($config->get('HTML.XHTML')) { - $doctype = 'XHTML 1.0'; - } else { - $doctype = 'HTML 4.01'; - } - if ($config->get('HTML.Strict')) { - $doctype .= ' Strict'; - } else { - $doctype .= ' Transitional'; - } - return $doctype; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php deleted file mode 100644 index 57cfd2bb..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ElementDef.php +++ /dev/null @@ -1,216 +0,0 @@ -setup(), this array may also - * contain an array at index 0 that indicates which attribute - * collections to load into the full array. It may also - * contain string indentifiers in lieu of HTMLPurifier_AttrDef, - * see HTMLPurifier_AttrTypes on how they are expanded during - * HTMLPurifier_HTMLDefinition->setup() processing. - */ - public $attr = array(); - - // XXX: Design note: currently, it's not possible to override - // previously defined AttrTransforms without messing around with - // the final generated config. This is by design; a previous version - // used an associated list of attr_transform, but it was extremely - // easy to accidentally override other attribute transforms by - // forgetting to specify an index (and just using 0.) While we - // could check this by checking the index number and complaining, - // there is a second problem which is that it is not at all easy to - // tell when something is getting overridden. Combine this with a - // codebase where this isn't really being used, and it's perfect for - // nuking. - - /** - * List of tags HTMLPurifier_AttrTransform to be done before validation. - * @type array - */ - public $attr_transform_pre = array(); - - /** - * List of tags HTMLPurifier_AttrTransform to be done after validation. - * @type array - */ - public $attr_transform_post = array(); - - /** - * HTMLPurifier_ChildDef of this tag. - * @type HTMLPurifier_ChildDef - */ - public $child; - - /** - * Abstract string representation of internal ChildDef rules. - * @see HTMLPurifier_ContentSets for how this is parsed and then transformed - * into an HTMLPurifier_ChildDef. - * @warning This is a temporary variable that is not available after - * being processed by HTMLDefinition - * @type string - */ - public $content_model; - - /** - * Value of $child->type, used to determine which ChildDef to use, - * used in combination with $content_model. - * @warning This must be lowercase - * @warning This is a temporary variable that is not available after - * being processed by HTMLDefinition - * @type string - */ - public $content_model_type; - - /** - * Does the element have a content model (#PCDATA | Inline)*? This - * is important for chameleon ins and del processing in - * HTMLPurifier_ChildDef_Chameleon. Dynamically set: modules don't - * have to worry about this one. - * @type bool - */ - public $descendants_are_inline = false; - - /** - * List of the names of required attributes this element has. - * Dynamically populated by HTMLPurifier_HTMLDefinition::getElement() - * @type array - */ - public $required_attr = array(); - - /** - * Lookup table of tags excluded from all descendants of this tag. - * @type array - * @note SGML permits exclusions for all descendants, but this is - * not possible with DTDs or XML Schemas. W3C has elected to - * use complicated compositions of content_models to simulate - * exclusion for children, but we go the simpler, SGML-style - * route of flat-out exclusions, which correctly apply to - * all descendants and not just children. Note that the XHTML - * Modularization Abstract Modules are blithely unaware of such - * distinctions. - */ - public $excludes = array(); - - /** - * This tag is explicitly auto-closed by the following tags. - * @type array - */ - public $autoclose = array(); - - /** - * If a foreign element is found in this element, test if it is - * allowed by this sub-element; if it is, instead of closing the - * current element, place it inside this element. - * @type string - */ - public $wrap; - - /** - * Whether or not this is a formatting element affected by the - * "Active Formatting Elements" algorithm. - * @type bool - */ - public $formatting; - - /** - * Low-level factory constructor for creating new standalone element defs - */ - public static function create($content_model, $content_model_type, $attr) - { - $def = new HTMLPurifier_ElementDef(); - $def->content_model = $content_model; - $def->content_model_type = $content_model_type; - $def->attr = $attr; - return $def; - } - - /** - * Merges the values of another element definition into this one. - * Values from the new element def take precedence if a value is - * not mergeable. - * @param HTMLPurifier_ElementDef $def - */ - public function mergeIn($def) - { - // later keys takes precedence - foreach ($def->attr as $k => $v) { - if ($k === 0) { - // merge in the includes - // sorry, no way to override an include - foreach ($v as $v2) { - $this->attr[0][] = $v2; - } - continue; - } - if ($v === false) { - if (isset($this->attr[$k])) { - unset($this->attr[$k]); - } - continue; - } - $this->attr[$k] = $v; - } - $this->_mergeAssocArray($this->excludes, $def->excludes); - $this->attr_transform_pre = array_merge($this->attr_transform_pre, $def->attr_transform_pre); - $this->attr_transform_post = array_merge($this->attr_transform_post, $def->attr_transform_post); - - if (!empty($def->content_model)) { - $this->content_model = - str_replace("#SUPER", (string)$this->content_model, $def->content_model); - $this->child = false; - } - if (!empty($def->content_model_type)) { - $this->content_model_type = $def->content_model_type; - $this->child = false; - } - if (!is_null($def->child)) { - $this->child = $def->child; - } - if (!is_null($def->formatting)) { - $this->formatting = $def->formatting; - } - if ($def->descendants_are_inline) { - $this->descendants_are_inline = $def->descendants_are_inline; - } - } - - /** - * Merges one array into another, removes values which equal false - * @param $a1 Array by reference that is merged into - * @param $a2 Array that merges into $a1 - */ - private function _mergeAssocArray(&$a1, $a2) - { - foreach ($a2 as $k => $v) { - if ($v === false) { - if (isset($a1[$k])) { - unset($a1[$k]); - } - continue; - } - $a1[$k] = $v; - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php deleted file mode 100644 index d4791cc1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Encoder.php +++ /dev/null @@ -1,617 +0,0 @@ -= $c) { - $r .= self::unsafeIconv($in, $out, substr($text, $i)); - break; - } - // wibble the boundary - if (0x80 != (0xC0 & ord($text[$i + $max_chunk_size]))) { - $chunk_size = $max_chunk_size; - } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 1]))) { - $chunk_size = $max_chunk_size - 1; - } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 2]))) { - $chunk_size = $max_chunk_size - 2; - } elseif (0x80 != (0xC0 & ord($text[$i + $max_chunk_size - 3]))) { - $chunk_size = $max_chunk_size - 3; - } else { - return false; // rather confusing UTF-8... - } - $chunk = substr($text, $i, $chunk_size); // substr doesn't mind overlong lengths - $r .= self::unsafeIconv($in, $out, $chunk); - $i += $chunk_size; - } - return $r; - } else { - return false; - } - } else { - return false; - } - } - - /** - * Cleans a UTF-8 string for well-formedness and SGML validity - * - * It will parse according to UTF-8 and return a valid UTF8 string, with - * non-SGML codepoints excluded. - * - * Specifically, it will permit: - * \x{9}\x{A}\x{D}\x{20}-\x{7E}\x{A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF} - * Source: https://www.w3.org/TR/REC-xml/#NT-Char - * Arguably this function should be modernized to the HTML5 set - * of allowed characters: - * https://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream - * which simultaneously expand and restrict the set of allowed characters. - * - * @param string $str The string to clean - * @param bool $force_php - * @return string - * - * @note Just for reference, the non-SGML code points are 0 to 31 and - * 127 to 159, inclusive. However, we allow code points 9, 10 - * and 13, which are the tab, line feed and carriage return - * respectively. 128 and above the code points map to multibyte - * UTF-8 representations. - * - * @note Fallback code adapted from utf8ToUnicode by Henri Sivonen and - * hsivonen@iki.fi at under the - * LGPL license. Notes on what changed are inside, but in general, - * the original code transformed UTF-8 text into an array of integer - * Unicode codepoints. Understandably, transforming that back to - * a string would be somewhat expensive, so the function was modded to - * directly operate on the string. However, this discourages code - * reuse, and the logic enumerated here would be useful for any - * function that needs to be able to understand UTF-8 characters. - * As of right now, only smart lossless character encoding converters - * would need that, and I'm probably not going to implement them. - */ - public static function cleanUTF8($str, $force_php = false) - { - // UTF-8 validity is checked since PHP 4.3.5 - // This is an optimization: if the string is already valid UTF-8, no - // need to do PHP stuff. 99% of the time, this will be the case. - if (preg_match( - '/^[\x{9}\x{A}\x{D}\x{20}-\x{7E}\x{A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]*$/Du', - $str - )) { - return $str; - } - - $mState = 0; // cached expected number of octets after the current octet - // until the beginning of the next UTF8 character sequence - $mUcs4 = 0; // cached Unicode character - $mBytes = 1; // cached expected number of octets in the current sequence - - // original code involved an $out that was an array of Unicode - // codepoints. Instead of having to convert back into UTF-8, we've - // decided to directly append valid UTF-8 characters onto a string - // $out once they're done. $char accumulates raw bytes, while $mUcs4 - // turns into the Unicode code point, so there's some redundancy. - - $out = ''; - $char = ''; - - $len = strlen($str); - for ($i = 0; $i < $len; $i++) { - $in = ord($str[$i]); - $char .= $str[$i]; // append byte to char - if (0 == $mState) { - // When mState is zero we expect either a US-ASCII character - // or a multi-octet sequence. - if (0 == (0x80 & ($in))) { - // US-ASCII, pass straight through. - if (($in <= 31 || $in == 127) && - !($in == 9 || $in == 13 || $in == 10) // save \r\t\n - ) { - // control characters, remove - } else { - $out .= $char; - } - // reset - $char = ''; - $mBytes = 1; - } elseif (0xC0 == (0xE0 & ($in))) { - // First octet of 2 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x1F) << 6; - $mState = 1; - $mBytes = 2; - } elseif (0xE0 == (0xF0 & ($in))) { - // First octet of 3 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x0F) << 12; - $mState = 2; - $mBytes = 3; - } elseif (0xF0 == (0xF8 & ($in))) { - // First octet of 4 octet sequence - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x07) << 18; - $mState = 3; - $mBytes = 4; - } elseif (0xF8 == (0xFC & ($in))) { - // First octet of 5 octet sequence. - // - // This is illegal because the encoded codepoint must be - // either: - // (a) not the shortest form or - // (b) outside the Unicode range of 0-0x10FFFF. - // Rather than trying to resynchronize, we will carry on - // until the end of the sequence and let the later error - // handling code catch it. - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 0x03) << 24; - $mState = 4; - $mBytes = 5; - } elseif (0xFC == (0xFE & ($in))) { - // First octet of 6 octet sequence, see comments for 5 - // octet sequence. - $mUcs4 = ($in); - $mUcs4 = ($mUcs4 & 1) << 30; - $mState = 5; - $mBytes = 6; - } else { - // Current octet is neither in the US-ASCII range nor a - // legal first octet of a multi-octet sequence. - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char = ''; - } - } else { - // When mState is non-zero, we expect a continuation of the - // multi-octet sequence - if (0x80 == (0xC0 & ($in))) { - // Legal continuation. - $shift = ($mState - 1) * 6; - $tmp = $in; - $tmp = ($tmp & 0x0000003F) << $shift; - $mUcs4 |= $tmp; - - if (0 == --$mState) { - // End of the multi-octet sequence. mUcs4 now contains - // the final Unicode codepoint to be output - - // Check for illegal sequences and codepoints. - - // From Unicode 3.1, non-shortest form is illegal - if (((2 == $mBytes) && ($mUcs4 < 0x0080)) || - ((3 == $mBytes) && ($mUcs4 < 0x0800)) || - ((4 == $mBytes) && ($mUcs4 < 0x10000)) || - (4 < $mBytes) || - // From Unicode 3.2, surrogate characters = illegal - (($mUcs4 & 0xFFFFF800) == 0xD800) || - // Codepoints outside the Unicode range are illegal - ($mUcs4 > 0x10FFFF) - ) { - - } elseif (0xFEFF != $mUcs4 && // omit BOM - // check for valid Char unicode codepoints - ( - 0x9 == $mUcs4 || - 0xA == $mUcs4 || - 0xD == $mUcs4 || - (0x20 <= $mUcs4 && 0x7E >= $mUcs4) || - // 7F-9F is not strictly prohibited by XML, - // but it is non-SGML, and thus we don't allow it - (0xA0 <= $mUcs4 && 0xD7FF >= $mUcs4) || - (0xE000 <= $mUcs4 && 0xFFFD >= $mUcs4) || - (0x10000 <= $mUcs4 && 0x10FFFF >= $mUcs4) - ) - ) { - $out .= $char; - } - // initialize UTF8 cache (reset) - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char = ''; - } - } else { - // ((0xC0 & (*in) != 0x80) && (mState != 0)) - // Incomplete multi-octet sequence. - // used to result in complete fail, but we'll reset - $mState = 0; - $mUcs4 = 0; - $mBytes = 1; - $char =''; - } - } - } - return $out; - } - - /** - * Translates a Unicode codepoint into its corresponding UTF-8 character. - * @note Based on Feyd's function at - * , - * which is in public domain. - * @note While we're going to do code point parsing anyway, a good - * optimization would be to refuse to translate code points that - * are non-SGML characters. However, this could lead to duplication. - * @note This is very similar to the unichr function in - * maintenance/generate-entity-file.php (although this is superior, - * due to its sanity checks). - */ - - // +----------+----------+----------+----------+ - // | 33222222 | 22221111 | 111111 | | - // | 10987654 | 32109876 | 54321098 | 76543210 | bit - // +----------+----------+----------+----------+ - // | | | | 0xxxxxxx | 1 byte 0x00000000..0x0000007F - // | | | 110yyyyy | 10xxxxxx | 2 byte 0x00000080..0x000007FF - // | | 1110zzzz | 10yyyyyy | 10xxxxxx | 3 byte 0x00000800..0x0000FFFF - // | 11110www | 10wwzzzz | 10yyyyyy | 10xxxxxx | 4 byte 0x00010000..0x0010FFFF - // +----------+----------+----------+----------+ - // | 00000000 | 00011111 | 11111111 | 11111111 | Theoretical upper limit of legal scalars: 2097151 (0x001FFFFF) - // | 00000000 | 00010000 | 11111111 | 11111111 | Defined upper limit of legal scalar codes - // +----------+----------+----------+----------+ - - public static function unichr($code) - { - if ($code > 1114111 or $code < 0 or - ($code >= 55296 and $code <= 57343) ) { - // bits are set outside the "valid" range as defined - // by UNICODE 4.1.0 - return ''; - } - - $x = $y = $z = $w = 0; - if ($code < 128) { - // regular ASCII character - $x = $code; - } else { - // set up bits for UTF-8 - $x = ($code & 63) | 128; - if ($code < 2048) { - $y = (($code & 2047) >> 6) | 192; - } else { - $y = (($code & 4032) >> 6) | 128; - if ($code < 65536) { - $z = (($code >> 12) & 15) | 224; - } else { - $z = (($code >> 12) & 63) | 128; - $w = (($code >> 18) & 7) | 240; - } - } - } - // set up the actual character - $ret = ''; - if ($w) { - $ret .= chr($w); - } - if ($z) { - $ret .= chr($z); - } - if ($y) { - $ret .= chr($y); - } - $ret .= chr($x); - - return $ret; - } - - /** - * @return bool - */ - public static function iconvAvailable() - { - static $iconv = null; - if ($iconv === null) { - $iconv = function_exists('iconv') && self::testIconvTruncateBug() != self::ICONV_UNUSABLE; - } - return $iconv; - } - - /** - * Convert a string to UTF-8 based on configuration. - * @param string $str The string to convert - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - */ - public static function convertToUTF8($str, $config, $context) - { - $encoding = $config->get('Core.Encoding'); - if ($encoding === 'utf-8') { - return $str; - } - static $iconv = null; - if ($iconv === null) { - $iconv = self::iconvAvailable(); - } - if ($iconv && !$config->get('Test.ForceNoIconv')) { - // unaffected by bugs, since UTF-8 support all characters - $str = self::unsafeIconv($encoding, 'utf-8//IGNORE', $str); - if ($str === false) { - // $encoding is not a valid encoding - trigger_error('Invalid encoding ' . $encoding, E_USER_ERROR); - return ''; - } - // If the string is bjorked by Shift_JIS or a similar encoding - // that doesn't support all of ASCII, convert the naughty - // characters to their true byte-wise ASCII/UTF-8 equivalents. - $str = strtr($str, self::testEncodingSupportsASCII($encoding)); - return $str; - } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) { - $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1'); - return $str; - } - $bug = HTMLPurifier_Encoder::testIconvTruncateBug(); - if ($bug == self::ICONV_OK) { - trigger_error('Encoding not supported, please install iconv', E_USER_ERROR); - } else { - trigger_error( - 'You have a buggy version of iconv, see https://bugs.php.net/bug.php?id=48147 ' . - 'and http://sourceware.org/bugzilla/show_bug.cgi?id=13541', - E_USER_ERROR - ); - } - } - - /** - * Converts a string from UTF-8 based on configuration. - * @param string $str The string to convert - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - * @note Currently, this is a lossy conversion, with unexpressable - * characters being omitted. - */ - public static function convertFromUTF8($str, $config, $context) - { - $encoding = $config->get('Core.Encoding'); - if ($escape = $config->get('Core.EscapeNonASCIICharacters')) { - $str = self::convertToASCIIDumbLossless($str); - } - if ($encoding === 'utf-8') { - return $str; - } - static $iconv = null; - if ($iconv === null) { - $iconv = self::iconvAvailable(); - } - if ($iconv && !$config->get('Test.ForceNoIconv')) { - // Undo our previous fix in convertToUTF8, otherwise iconv will barf - $ascii_fix = self::testEncodingSupportsASCII($encoding); - if (!$escape && !empty($ascii_fix)) { - $clear_fix = array(); - foreach ($ascii_fix as $utf8 => $native) { - $clear_fix[$utf8] = ''; - } - $str = strtr($str, $clear_fix); - } - $str = strtr($str, array_flip($ascii_fix)); - // Normal stuff - $str = self::iconv('utf-8', $encoding . '//IGNORE', $str); - return $str; - } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) { - $str = mb_convert_encoding($str, 'ISO-8859-1', 'UTF-8'); - return $str; - } - trigger_error('Encoding not supported', E_USER_ERROR); - // You might be tempted to assume that the ASCII representation - // might be OK, however, this is *not* universally true over all - // encodings. So we take the conservative route here, rather - // than forcibly turn on %Core.EscapeNonASCIICharacters - } - - /** - * Lossless (character-wise) conversion of HTML to ASCII - * @param string $str UTF-8 string to be converted to ASCII - * @return string ASCII encoded string with non-ASCII character entity-ized - * @warning Adapted from MediaWiki, claiming fair use: this is a common - * algorithm. If you disagree with this license fudgery, - * implement it yourself. - * @note Uses decimal numeric entities since they are best supported. - * @note This is a DUMB function: it has no concept of keeping - * character entities that the projected character encoding - * can allow. We could possibly implement a smart version - * but that would require it to also know which Unicode - * codepoints the charset supported (not an easy task). - * @note Sort of with cleanUTF8() but it assumes that $str is - * well-formed UTF-8 - */ - public static function convertToASCIIDumbLossless($str) - { - $bytesleft = 0; - $result = ''; - $working = 0; - $len = strlen($str); - for ($i = 0; $i < $len; $i++) { - $bytevalue = ord($str[$i]); - if ($bytevalue <= 0x7F) { //0xxx xxxx - $result .= chr($bytevalue); - $bytesleft = 0; - } elseif ($bytevalue <= 0xBF) { //10xx xxxx - $working = $working << 6; - $working += ($bytevalue & 0x3F); - $bytesleft--; - if ($bytesleft <= 0) { - $result .= "&#" . $working . ";"; - } - } elseif ($bytevalue <= 0xDF) { //110x xxxx - $working = $bytevalue & 0x1F; - $bytesleft = 1; - } elseif ($bytevalue <= 0xEF) { //1110 xxxx - $working = $bytevalue & 0x0F; - $bytesleft = 2; - } else { //1111 0xxx - $working = $bytevalue & 0x07; - $bytesleft = 3; - } - } - return $result; - } - - /** No bugs detected in iconv. */ - const ICONV_OK = 0; - - /** Iconv truncates output if converting from UTF-8 to another - * character set with //IGNORE, and a non-encodable character is found */ - const ICONV_TRUNCATES = 1; - - /** Iconv does not support //IGNORE, making it unusable for - * transcoding purposes */ - const ICONV_UNUSABLE = 2; - - /** - * glibc iconv has a known bug where it doesn't handle the magic - * //IGNORE stanza correctly. In particular, rather than ignore - * characters, it will return an EILSEQ after consuming some number - * of characters, and expect you to restart iconv as if it were - * an E2BIG. Old versions of PHP did not respect the errno, and - * returned the fragment, so as a result you would see iconv - * mysteriously truncating output. We can work around this by - * manually chopping our input into segments of about 8000 - * characters, as long as PHP ignores the error code. If PHP starts - * paying attention to the error code, iconv becomes unusable. - * - * @return int Error code indicating severity of bug. - */ - public static function testIconvTruncateBug() - { - static $code = null; - if ($code === null) { - // better not use iconv, otherwise infinite loop! - $r = self::unsafeIconv('utf-8', 'ascii//IGNORE', "\xCE\xB1" . str_repeat('a', 9000)); - if ($r === false) { - $code = self::ICONV_UNUSABLE; - } elseif (($c = strlen($r)) < 9000) { - $code = self::ICONV_TRUNCATES; - } elseif ($c > 9000) { - trigger_error( - 'Your copy of iconv is extremely buggy. Please notify HTML Purifier maintainers: ' . - 'include your iconv version as per phpversion()', - E_USER_ERROR - ); - } else { - $code = self::ICONV_OK; - } - } - return $code; - } - - /** - * This expensive function tests whether or not a given character - * encoding supports ASCII. 7/8-bit encodings like Shift_JIS will - * fail this test, and require special processing. Variable width - * encodings shouldn't ever fail. - * - * @param string $encoding Encoding name to test, as per iconv format - * @param bool $bypass Whether or not to bypass the precompiled arrays. - * @return Array of UTF-8 characters to their corresponding ASCII, - * which can be used to "undo" any overzealous iconv action. - */ - public static function testEncodingSupportsASCII($encoding, $bypass = false) - { - // All calls to iconv here are unsafe, proof by case analysis: - // If ICONV_OK, no difference. - // If ICONV_TRUNCATE, all calls involve one character inputs, - // so bug is not triggered. - // If ICONV_UNUSABLE, this call is irrelevant - static $encodings = array(); - if (!$bypass) { - if (isset($encodings[$encoding])) { - return $encodings[$encoding]; - } - $lenc = strtolower($encoding); - switch ($lenc) { - case 'shift_jis': - return array("\xC2\xA5" => '\\', "\xE2\x80\xBE" => '~'); - case 'johab': - return array("\xE2\x82\xA9" => '\\'); - } - if (strpos($lenc, 'iso-8859-') === 0) { - return array(); - } - } - $ret = array(); - if (self::unsafeIconv('UTF-8', $encoding, 'a') === false) { - return false; - } - for ($i = 0x20; $i <= 0x7E; $i++) { // all printable ASCII chars - $c = chr($i); // UTF-8 char - $r = self::unsafeIconv('UTF-8', "$encoding//IGNORE", $c); // initial conversion - if ($r === '' || - // This line is needed for iconv implementations that do not - // omit characters that do not exist in the target character set - ($r === $c && self::unsafeIconv($encoding, 'UTF-8//IGNORE', $r) !== $c) - ) { - // Reverse engineer: what's the UTF-8 equiv of this byte - // sequence? This assumes that there's no variable width - // encoding that doesn't support ASCII. - $ret[self::unsafeIconv($encoding, 'UTF-8//IGNORE', $c)] = $c; - } - } - $encodings[$encoding] = $ret; - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php deleted file mode 100644 index f12ff13a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php +++ /dev/null @@ -1,48 +0,0 @@ -table = unserialize(file_get_contents($file)); - } - - /** - * Retrieves sole instance of the object. - * @param bool|HTMLPurifier_EntityLookup $prototype Optional prototype of custom lookup table to overload with. - * @return HTMLPurifier_EntityLookup - */ - public static function instance($prototype = false) - { - // no references, since PHP doesn't copy unless modified - static $instance = null; - if ($prototype) { - $instance = $prototype; - } elseif (!$instance) { - $instance = new HTMLPurifier_EntityLookup(); - $instance->setup(); - } - return $instance; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser deleted file mode 100644 index e8b08128..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup/entities.ser +++ /dev/null @@ -1 +0,0 @@ -a:253:{s:4:"fnof";s:2:"ƒ";s:5:"Alpha";s:2:"Α";s:4:"Beta";s:2:"Β";s:5:"Gamma";s:2:"Γ";s:5:"Delta";s:2:"Δ";s:7:"Epsilon";s:2:"Ε";s:4:"Zeta";s:2:"Ζ";s:3:"Eta";s:2:"Η";s:5:"Theta";s:2:"Θ";s:4:"Iota";s:2:"Ι";s:5:"Kappa";s:2:"Κ";s:6:"Lambda";s:2:"Λ";s:2:"Mu";s:2:"Μ";s:2:"Nu";s:2:"Ν";s:2:"Xi";s:2:"Ξ";s:7:"Omicron";s:2:"Ο";s:2:"Pi";s:2:"Π";s:3:"Rho";s:2:"Ρ";s:5:"Sigma";s:2:"Σ";s:3:"Tau";s:2:"Τ";s:7:"Upsilon";s:2:"Υ";s:3:"Phi";s:2:"Φ";s:3:"Chi";s:2:"Χ";s:3:"Psi";s:2:"Ψ";s:5:"Omega";s:2:"Ω";s:5:"alpha";s:2:"α";s:4:"beta";s:2:"β";s:5:"gamma";s:2:"γ";s:5:"delta";s:2:"δ";s:7:"epsilon";s:2:"ε";s:4:"zeta";s:2:"ζ";s:3:"eta";s:2:"η";s:5:"theta";s:2:"θ";s:4:"iota";s:2:"ι";s:5:"kappa";s:2:"κ";s:6:"lambda";s:2:"λ";s:2:"mu";s:2:"μ";s:2:"nu";s:2:"ν";s:2:"xi";s:2:"ξ";s:7:"omicron";s:2:"ο";s:2:"pi";s:2:"π";s:3:"rho";s:2:"ρ";s:6:"sigmaf";s:2:"ς";s:5:"sigma";s:2:"σ";s:3:"tau";s:2:"τ";s:7:"upsilon";s:2:"υ";s:3:"phi";s:2:"φ";s:3:"chi";s:2:"χ";s:3:"psi";s:2:"ψ";s:5:"omega";s:2:"ω";s:8:"thetasym";s:2:"ϑ";s:5:"upsih";s:2:"ϒ";s:3:"piv";s:2:"ϖ";s:4:"bull";s:3:"•";s:6:"hellip";s:3:"…";s:5:"prime";s:3:"′";s:5:"Prime";s:3:"″";s:5:"oline";s:3:"‾";s:5:"frasl";s:3:"⁄";s:6:"weierp";s:3:"℘";s:5:"image";s:3:"ℑ";s:4:"real";s:3:"ℜ";s:5:"trade";s:3:"™";s:7:"alefsym";s:3:"ℵ";s:4:"larr";s:3:"←";s:4:"uarr";s:3:"↑";s:4:"rarr";s:3:"→";s:4:"darr";s:3:"↓";s:4:"harr";s:3:"↔";s:5:"crarr";s:3:"↵";s:4:"lArr";s:3:"⇐";s:4:"uArr";s:3:"⇑";s:4:"rArr";s:3:"⇒";s:4:"dArr";s:3:"⇓";s:4:"hArr";s:3:"⇔";s:6:"forall";s:3:"∀";s:4:"part";s:3:"∂";s:5:"exist";s:3:"∃";s:5:"empty";s:3:"∅";s:5:"nabla";s:3:"∇";s:4:"isin";s:3:"∈";s:5:"notin";s:3:"∉";s:2:"ni";s:3:"∋";s:4:"prod";s:3:"∏";s:3:"sum";s:3:"∑";s:5:"minus";s:3:"−";s:6:"lowast";s:3:"∗";s:5:"radic";s:3:"√";s:4:"prop";s:3:"∝";s:5:"infin";s:3:"∞";s:3:"ang";s:3:"∠";s:3:"and";s:3:"∧";s:2:"or";s:3:"∨";s:3:"cap";s:3:"∩";s:3:"cup";s:3:"∪";s:3:"int";s:3:"∫";s:6:"there4";s:3:"∴";s:3:"sim";s:3:"∼";s:4:"cong";s:3:"≅";s:5:"asymp";s:3:"≈";s:2:"ne";s:3:"≠";s:5:"equiv";s:3:"≡";s:2:"le";s:3:"≤";s:2:"ge";s:3:"≥";s:3:"sub";s:3:"⊂";s:3:"sup";s:3:"⊃";s:4:"nsub";s:3:"⊄";s:4:"sube";s:3:"⊆";s:4:"supe";s:3:"⊇";s:5:"oplus";s:3:"⊕";s:6:"otimes";s:3:"⊗";s:4:"perp";s:3:"⊥";s:4:"sdot";s:3:"⋅";s:5:"lceil";s:3:"⌈";s:5:"rceil";s:3:"⌉";s:6:"lfloor";s:3:"⌊";s:6:"rfloor";s:3:"⌋";s:4:"lang";s:3:"〈";s:4:"rang";s:3:"〉";s:3:"loz";s:3:"◊";s:6:"spades";s:3:"♠";s:5:"clubs";s:3:"♣";s:6:"hearts";s:3:"♥";s:5:"diams";s:3:"♦";s:4:"quot";s:1:""";s:3:"amp";s:1:"&";s:2:"lt";s:1:"<";s:2:"gt";s:1:">";s:4:"apos";s:1:"'";s:5:"OElig";s:2:"Œ";s:5:"oelig";s:2:"œ";s:6:"Scaron";s:2:"Š";s:6:"scaron";s:2:"š";s:4:"Yuml";s:2:"Ÿ";s:4:"circ";s:2:"ˆ";s:5:"tilde";s:2:"˜";s:4:"ensp";s:3:" ";s:4:"emsp";s:3:" ";s:6:"thinsp";s:3:" ";s:4:"zwnj";s:3:"‌";s:3:"zwj";s:3:"‍";s:3:"lrm";s:3:"‎";s:3:"rlm";s:3:"‏";s:5:"ndash";s:3:"–";s:5:"mdash";s:3:"—";s:5:"lsquo";s:3:"‘";s:5:"rsquo";s:3:"’";s:5:"sbquo";s:3:"‚";s:5:"ldquo";s:3:"“";s:5:"rdquo";s:3:"”";s:5:"bdquo";s:3:"„";s:6:"dagger";s:3:"†";s:6:"Dagger";s:3:"‡";s:6:"permil";s:3:"‰";s:6:"lsaquo";s:3:"‹";s:6:"rsaquo";s:3:"›";s:4:"euro";s:3:"€";s:4:"nbsp";s:2:" ";s:5:"iexcl";s:2:"¡";s:4:"cent";s:2:"¢";s:5:"pound";s:2:"£";s:6:"curren";s:2:"¤";s:3:"yen";s:2:"¥";s:6:"brvbar";s:2:"¦";s:4:"sect";s:2:"§";s:3:"uml";s:2:"¨";s:4:"copy";s:2:"©";s:4:"ordf";s:2:"ª";s:5:"laquo";s:2:"«";s:3:"not";s:2:"¬";s:3:"shy";s:2:"­";s:3:"reg";s:2:"®";s:4:"macr";s:2:"¯";s:3:"deg";s:2:"°";s:6:"plusmn";s:2:"±";s:4:"sup2";s:2:"²";s:4:"sup3";s:2:"³";s:5:"acute";s:2:"´";s:5:"micro";s:2:"µ";s:4:"para";s:2:"¶";s:6:"middot";s:2:"·";s:5:"cedil";s:2:"¸";s:4:"sup1";s:2:"¹";s:4:"ordm";s:2:"º";s:5:"raquo";s:2:"»";s:6:"frac14";s:2:"¼";s:6:"frac12";s:2:"½";s:6:"frac34";s:2:"¾";s:6:"iquest";s:2:"¿";s:6:"Agrave";s:2:"À";s:6:"Aacute";s:2:"Á";s:5:"Acirc";s:2:"Â";s:6:"Atilde";s:2:"Ã";s:4:"Auml";s:2:"Ä";s:5:"Aring";s:2:"Å";s:5:"AElig";s:2:"Æ";s:6:"Ccedil";s:2:"Ç";s:6:"Egrave";s:2:"È";s:6:"Eacute";s:2:"É";s:5:"Ecirc";s:2:"Ê";s:4:"Euml";s:2:"Ë";s:6:"Igrave";s:2:"Ì";s:6:"Iacute";s:2:"Í";s:5:"Icirc";s:2:"Î";s:4:"Iuml";s:2:"Ï";s:3:"ETH";s:2:"Ð";s:6:"Ntilde";s:2:"Ñ";s:6:"Ograve";s:2:"Ò";s:6:"Oacute";s:2:"Ó";s:5:"Ocirc";s:2:"Ô";s:6:"Otilde";s:2:"Õ";s:4:"Ouml";s:2:"Ö";s:5:"times";s:2:"×";s:6:"Oslash";s:2:"Ø";s:6:"Ugrave";s:2:"Ù";s:6:"Uacute";s:2:"Ú";s:5:"Ucirc";s:2:"Û";s:4:"Uuml";s:2:"Ü";s:6:"Yacute";s:2:"Ý";s:5:"THORN";s:2:"Þ";s:5:"szlig";s:2:"ß";s:6:"agrave";s:2:"à";s:6:"aacute";s:2:"á";s:5:"acirc";s:2:"â";s:6:"atilde";s:2:"ã";s:4:"auml";s:2:"ä";s:5:"aring";s:2:"å";s:5:"aelig";s:2:"æ";s:6:"ccedil";s:2:"ç";s:6:"egrave";s:2:"è";s:6:"eacute";s:2:"é";s:5:"ecirc";s:2:"ê";s:4:"euml";s:2:"ë";s:6:"igrave";s:2:"ì";s:6:"iacute";s:2:"í";s:5:"icirc";s:2:"î";s:4:"iuml";s:2:"ï";s:3:"eth";s:2:"ð";s:6:"ntilde";s:2:"ñ";s:6:"ograve";s:2:"ò";s:6:"oacute";s:2:"ó";s:5:"ocirc";s:2:"ô";s:6:"otilde";s:2:"õ";s:4:"ouml";s:2:"ö";s:6:"divide";s:2:"÷";s:6:"oslash";s:2:"ø";s:6:"ugrave";s:2:"ù";s:6:"uacute";s:2:"ú";s:5:"ucirc";s:2:"û";s:4:"uuml";s:2:"ü";s:6:"yacute";s:2:"ý";s:5:"thorn";s:2:"þ";s:4:"yuml";s:2:"ÿ";} \ No newline at end of file diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php deleted file mode 100644 index 0f2b83dc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php +++ /dev/null @@ -1,285 +0,0 @@ -_semiOptionalPrefixRegex = "/&()()()($semi_optional)/"; - - $this->_textEntitiesRegex = - '/&(?:'. - // hex - '[#]x([a-fA-F0-9]+);?|'. - // dec - '[#]0*(\d+);?|'. - // string (mandatory semicolon) - // NB: order matters: match semicolon preferentially - '([A-Za-z_:][A-Za-z0-9.\-_:]*);|'. - // string (optional semicolon) - "($semi_optional)". - ')/'; - - $this->_attrEntitiesRegex = - '/&(?:'. - // hex - '[#]x([a-fA-F0-9]+);?|'. - // dec - '[#]0*(\d+);?|'. - // string (mandatory semicolon) - // NB: order matters: match semicolon preferentially - '([A-Za-z_:][A-Za-z0-9.\-_:]*);|'. - // string (optional semicolon) - // don't match if trailing is equals or alphanumeric (URL - // like) - "($semi_optional)(?![=;A-Za-z0-9])". - ')/'; - - } - - /** - * Substitute entities with the parsed equivalents. Use this on - * textual data in an HTML document (as opposed to attributes.) - * - * @param string $string String to have entities parsed. - * @return string Parsed string. - */ - public function substituteTextEntities($string) - { - return preg_replace_callback( - $this->_textEntitiesRegex, - array($this, 'entityCallback'), - $string - ); - } - - /** - * Substitute entities with the parsed equivalents. Use this on - * attribute contents in documents. - * - * @param string $string String to have entities parsed. - * @return string Parsed string. - */ - public function substituteAttrEntities($string) - { - return preg_replace_callback( - $this->_attrEntitiesRegex, - array($this, 'entityCallback'), - $string - ); - } - - /** - * Callback function for substituteNonSpecialEntities() that does the work. - * - * @param array $matches PCRE matches array, with 0 the entire match, and - * either index 1, 2 or 3 set with a hex value, dec value, - * or string (respectively). - * @return string Replacement string. - */ - - protected function entityCallback($matches) - { - $entity = $matches[0]; - $hex_part = isset($matches[1]) ? $matches[1] : null; - $dec_part = isset($matches[2]) ? $matches[2] : null; - $named_part = empty($matches[3]) ? (empty($matches[4]) ? "" : $matches[4]) : $matches[3]; - if ($hex_part !== NULL && $hex_part !== "") { - return HTMLPurifier_Encoder::unichr(hexdec($hex_part)); - } elseif ($dec_part !== NULL && $dec_part !== "") { - return HTMLPurifier_Encoder::unichr((int) $dec_part); - } else { - if (!$this->_entity_lookup) { - $this->_entity_lookup = HTMLPurifier_EntityLookup::instance(); - } - if (isset($this->_entity_lookup->table[$named_part])) { - return $this->_entity_lookup->table[$named_part]; - } else { - // exact match didn't match anything, so test if - // any of the semicolon optional match the prefix. - // Test that this is an EXACT match is important to - // prevent infinite loop - if (!empty($matches[3])) { - return preg_replace_callback( - $this->_semiOptionalPrefixRegex, - array($this, 'entityCallback'), - $entity - ); - } - return $entity; - } - } - } - - // LEGACY CODE BELOW - - /** - * Callback regex string for parsing entities. - * @type string - */ - protected $_substituteEntitiesRegex = - '/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/'; - // 1. hex 2. dec 3. string (XML style) - - /** - * Decimal to parsed string conversion table for special entities. - * @type array - */ - protected $_special_dec2str = - array( - 34 => '"', - 38 => '&', - 39 => "'", - 60 => '<', - 62 => '>' - ); - - /** - * Stripped entity names to decimal conversion table for special entities. - * @type array - */ - protected $_special_ent2dec = - array( - 'quot' => 34, - 'amp' => 38, - 'lt' => 60, - 'gt' => 62 - ); - - /** - * Substitutes non-special entities with their parsed equivalents. Since - * running this whenever you have parsed character is t3h 5uck, we run - * it before everything else. - * - * @param string $string String to have non-special entities parsed. - * @return string Parsed string. - */ - public function substituteNonSpecialEntities($string) - { - // it will try to detect missing semicolons, but don't rely on it - return preg_replace_callback( - $this->_substituteEntitiesRegex, - array($this, 'nonSpecialEntityCallback'), - $string - ); - } - - /** - * Callback function for substituteNonSpecialEntities() that does the work. - * - * @param array $matches PCRE matches array, with 0 the entire match, and - * either index 1, 2 or 3 set with a hex value, dec value, - * or string (respectively). - * @return string Replacement string. - */ - - protected function nonSpecialEntityCallback($matches) - { - // replaces all but big five - $entity = $matches[0]; - $is_num = (@$matches[0][1] === '#'); - if ($is_num) { - $is_hex = (@$entity[2] === 'x'); - $code = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; - // abort for special characters - if (isset($this->_special_dec2str[$code])) { - return $entity; - } - return HTMLPurifier_Encoder::unichr($code); - } else { - if (isset($this->_special_ent2dec[$matches[3]])) { - return $entity; - } - if (!$this->_entity_lookup) { - $this->_entity_lookup = HTMLPurifier_EntityLookup::instance(); - } - if (isset($this->_entity_lookup->table[$matches[3]])) { - return $this->_entity_lookup->table[$matches[3]]; - } else { - return $entity; - } - } - } - - /** - * Substitutes only special entities with their parsed equivalents. - * - * @notice We try to avoid calling this function because otherwise, it - * would have to be called a lot (for every parsed section). - * - * @param string $string String to have non-special entities parsed. - * @return string Parsed string. - */ - public function substituteSpecialEntities($string) - { - return preg_replace_callback( - $this->_substituteEntitiesRegex, - array($this, 'specialEntityCallback'), - $string - ); - } - - /** - * Callback function for substituteSpecialEntities() that does the work. - * - * This callback has same syntax as nonSpecialEntityCallback(). - * - * @param array $matches PCRE-style matches array, with 0 the entire match, and - * either index 1, 2 or 3 set with a hex value, dec value, - * or string (respectively). - * @return string Replacement string. - */ - protected function specialEntityCallback($matches) - { - $entity = $matches[0]; - $is_num = (@$matches[0][1] === '#'); - if ($is_num) { - $is_hex = (@$entity[2] === 'x'); - $int = $is_hex ? hexdec($matches[1]) : (int) $matches[2]; - return isset($this->_special_dec2str[$int]) ? - $this->_special_dec2str[$int] : - $entity; - } else { - return isset($this->_special_ent2dec[$matches[3]]) ? - $this->_special_dec2str[$this->_special_ent2dec[$matches[3]]] : - $entity; - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php deleted file mode 100644 index d47e3f2e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php +++ /dev/null @@ -1,244 +0,0 @@ -locale =& $context->get('Locale'); - $this->context = $context; - $this->_current =& $this->_stacks[0]; - $this->errors =& $this->_stacks[0]; - } - - /** - * Sends an error message to the collector for later use - * @param int $severity Error severity, PHP error style (don't use E_USER_) - * @param string $msg Error message text - */ - public function send($severity, $msg) - { - $args = array(); - if (func_num_args() > 2) { - $args = func_get_args(); - array_shift($args); - unset($args[0]); - } - - $token = $this->context->get('CurrentToken', true); - $line = $token ? $token->line : $this->context->get('CurrentLine', true); - $col = $token ? $token->col : $this->context->get('CurrentCol', true); - $attr = $this->context->get('CurrentAttr', true); - - // perform special substitutions, also add custom parameters - $subst = array(); - if (!is_null($token)) { - $args['CurrentToken'] = $token; - } - if (!is_null($attr)) { - $subst['$CurrentAttr.Name'] = $attr; - if (isset($token->attr[$attr])) { - $subst['$CurrentAttr.Value'] = $token->attr[$attr]; - } - } - - if (empty($args)) { - $msg = $this->locale->getMessage($msg); - } else { - $msg = $this->locale->formatMessage($msg, $args); - } - - if (!empty($subst)) { - $msg = strtr($msg, $subst); - } - - // (numerically indexed) - $error = array( - self::LINENO => $line, - self::SEVERITY => $severity, - self::MESSAGE => $msg, - self::CHILDREN => array() - ); - $this->_current[] = $error; - - // NEW CODE BELOW ... - // Top-level errors are either: - // TOKEN type, if $value is set appropriately, or - // "syntax" type, if $value is null - $new_struct = new HTMLPurifier_ErrorStruct(); - $new_struct->type = HTMLPurifier_ErrorStruct::TOKEN; - if ($token) { - $new_struct->value = clone $token; - } - if (is_int($line) && is_int($col)) { - if (isset($this->lines[$line][$col])) { - $struct = $this->lines[$line][$col]; - } else { - $struct = $this->lines[$line][$col] = $new_struct; - } - // These ksorts may present a performance problem - ksort($this->lines[$line], SORT_NUMERIC); - } else { - if (isset($this->lines[-1])) { - $struct = $this->lines[-1]; - } else { - $struct = $this->lines[-1] = $new_struct; - } - } - ksort($this->lines, SORT_NUMERIC); - - // Now, check if we need to operate on a lower structure - if (!empty($attr)) { - $struct = $struct->getChild(HTMLPurifier_ErrorStruct::ATTR, $attr); - if (!$struct->value) { - $struct->value = array($attr, 'PUT VALUE HERE'); - } - } - if (!empty($cssprop)) { - $struct = $struct->getChild(HTMLPurifier_ErrorStruct::CSSPROP, $cssprop); - if (!$struct->value) { - // if we tokenize CSS this might be a little more difficult to do - $struct->value = array($cssprop, 'PUT VALUE HERE'); - } - } - - // Ok, structs are all setup, now time to register the error - $struct->addError($severity, $msg); - } - - /** - * Retrieves raw error data for custom formatter to use - */ - public function getRaw() - { - return $this->errors; - } - - /** - * Default HTML formatting implementation for error messages - * @param HTMLPurifier_Config $config Configuration, vital for HTML output nature - * @param array $errors Errors array to display; used for recursion. - * @return string - */ - public function getHTMLFormatted($config, $errors = null) - { - $ret = array(); - - $this->generator = new HTMLPurifier_Generator($config, $this->context); - if ($errors === null) { - $errors = $this->errors; - } - - // 'At line' message needs to be removed - - // generation code for new structure goes here. It needs to be recursive. - foreach ($this->lines as $line => $col_array) { - if ($line == -1) { - continue; - } - foreach ($col_array as $col => $struct) { - $this->_renderStruct($ret, $struct, $line, $col); - } - } - if (isset($this->lines[-1])) { - $this->_renderStruct($ret, $this->lines[-1]); - } - - if (empty($errors)) { - return '

' . $this->locale->getMessage('ErrorCollector: No errors') . '

'; - } else { - return '
  • ' . implode('
  • ', $ret) . '
'; - } - - } - - private function _renderStruct(&$ret, $struct, $line = null, $col = null) - { - $stack = array($struct); - $context_stack = array(array()); - while ($current = array_pop($stack)) { - $context = array_pop($context_stack); - foreach ($current->errors as $error) { - list($severity, $msg) = $error; - $string = ''; - $string .= '
'; - // W3C uses an icon to indicate the severity of the error. - $error = $this->locale->getErrorName($severity); - $string .= "$error "; - if (!is_null($line) && !is_null($col)) { - $string .= "Line $line, Column $col: "; - } else { - $string .= 'End of Document: '; - } - $string .= '' . $this->generator->escape($msg) . ' '; - $string .= '
'; - // Here, have a marker for the character on the column appropriate. - // Be sure to clip extremely long lines. - //$string .= '
';
-                //$string .= '';
-                //$string .= '
'; - $ret[] = $string; - } - foreach ($current->children as $array) { - $context[] = $current; - $stack = array_merge($stack, array_reverse($array, true)); - for ($i = count($array); $i > 0; $i--) { - $context_stack[] = $context; - } - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php deleted file mode 100644 index cf869d32..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorStruct.php +++ /dev/null @@ -1,74 +0,0 @@ -children[$type][$id])) { - $this->children[$type][$id] = new HTMLPurifier_ErrorStruct(); - $this->children[$type][$id]->type = $type; - } - return $this->children[$type][$id]; - } - - /** - * @param int $severity - * @param string $message - */ - public function addError($severity, $message) - { - $this->errors[] = array($severity, $message); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php deleted file mode 100644 index be85b4c5..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Exception.php +++ /dev/null @@ -1,12 +0,0 @@ -preFilter, - * 2->preFilter, 3->preFilter, purify, 3->postFilter, 2->postFilter, - * 1->postFilter. - * - * @note Methods are not declared abstract as it is perfectly legitimate - * for an implementation not to want anything to happen on a step - */ - -class HTMLPurifier_Filter -{ - - /** - * Name of the filter for identification purposes. - * @type string - */ - public $name; - - /** - * Pre-processor function, handles HTML before HTML Purifier - * @param string $html - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - */ - public function preFilter($html, $config, $context) - { - return $html; - } - - /** - * Post-processor function, handles HTML after HTML Purifier - * @param string $html - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - */ - public function postFilter($html, $config, $context) - { - return $html; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php deleted file mode 100644 index e7e3cac1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/ExtractStyleBlocks.php +++ /dev/null @@ -1,362 +0,0 @@ - blocks from input HTML, cleans them up - * using CSSTidy, and then places them in $purifier->context->get('StyleBlocks') - * so they can be used elsewhere in the document. - * - * @note - * See tests/HTMLPurifier/Filter/ExtractStyleBlocksTest.php for - * sample usage. - * - * @note - * This filter can also be used on stylesheets not included in the - * document--something purists would probably prefer. Just directly - * call HTMLPurifier_Filter_ExtractStyleBlocks->cleanCSS() - */ -class HTMLPurifier_Filter_ExtractStyleBlocks extends HTMLPurifier_Filter -{ - /** - * @type string - */ - public $name = 'ExtractStyleBlocks'; - - /** - * @type array - */ - private $_styleMatches = array(); - - /** - * @type csstidy - */ - private $_tidy; - - /** - * @type HTMLPurifier_AttrDef_HTML_ID - */ - private $_id_attrdef; - - /** - * @type HTMLPurifier_AttrDef_CSS_Ident - */ - private $_class_attrdef; - - /** - * @type HTMLPurifier_AttrDef_Enum - */ - private $_enum_attrdef; - - /** - * @type HTMLPurifier_AttrDef_Enum - */ - private $_universal_attrdef; - - public function __construct() - { - $this->_tidy = new csstidy(); - $this->_tidy->set_cfg('lowercase_s', false); - $this->_id_attrdef = new HTMLPurifier_AttrDef_HTML_ID(true); - $this->_class_attrdef = new HTMLPurifier_AttrDef_CSS_Ident(); - $this->_enum_attrdef = new HTMLPurifier_AttrDef_Enum( - array( - 'first-child', - 'link', - 'visited', - 'active', - 'hover', - 'focus' - ) - ); - $this->_universal_attrdef = new HTMLPurifier_AttrDef_Enum( - array( - 'initial', - 'inherit', - 'unset', - ) - ); - } - - /** - * Save the contents of CSS blocks to style matches - * @param array $matches preg_replace style $matches array - */ - protected function styleCallback($matches) - { - $this->_styleMatches[] = $matches[1]; - } - - /** - * Removes inline - // we must not grab foo in a font-family prop). - if ($config->get('Filter.ExtractStyleBlocks.Escaping')) { - $css = str_replace( - array('<', '>', '&'), - array('\3C ', '\3E ', '\26 '), - $css - ); - } - return $css; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php deleted file mode 100644 index 276d8362..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php +++ /dev/null @@ -1,65 +0,0 @@ -]+>.+?' . - '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?
#s'; - $pre_replace = '\1'; - return preg_replace($pre_regex, $pre_replace, $html); - } - - /** - * @param string $html - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - */ - public function postFilter($html, $config, $context) - { - $post_regex = '#((?:v|cp)/[A-Za-z0-9\-_=]+)#'; - return preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html); - } - - /** - * @param $url - * @return string - */ - protected function armorUrl($url) - { - return str_replace('--', '--', $url); - } - - /** - * @param array $matches - * @return string - */ - protected function postFilterCallback($matches) - { - $url = $this->armorUrl($matches[1]); - return '' . - '' . - '' . - ''; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php deleted file mode 100644 index eb56e2df..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Generator.php +++ /dev/null @@ -1,286 +0,0 @@ - tags. - * @type bool - */ - private $_scriptFix = false; - - /** - * Cache of HTMLDefinition during HTML output to determine whether or - * not attributes should be minimized. - * @type HTMLPurifier_HTMLDefinition - */ - private $_def; - - /** - * Cache of %Output.SortAttr. - * @type bool - */ - private $_sortAttr; - - /** - * Cache of %Output.FlashCompat. - * @type bool - */ - private $_flashCompat; - - /** - * Cache of %Output.FixInnerHTML. - * @type bool - */ - private $_innerHTMLFix; - - /** - * Stack for keeping track of object information when outputting IE - * compatibility code. - * @type array - */ - private $_flashStack = array(); - - /** - * Configuration for the generator - * @type HTMLPurifier_Config - */ - protected $config; - - /** - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - */ - public function __construct($config, $context) - { - $this->config = $config; - $this->_scriptFix = $config->get('Output.CommentScriptContents'); - $this->_innerHTMLFix = $config->get('Output.FixInnerHTML'); - $this->_sortAttr = $config->get('Output.SortAttr'); - $this->_flashCompat = $config->get('Output.FlashCompat'); - $this->_def = $config->getHTMLDefinition(); - $this->_xhtml = $this->_def->doctype->xml; - } - - /** - * Generates HTML from an array of tokens. - * @param HTMLPurifier_Token[] $tokens Array of HTMLPurifier_Token - * @return string Generated HTML - */ - public function generateFromTokens($tokens) - { - if (!$tokens) { - return ''; - } - - // Basic algorithm - $html = ''; - for ($i = 0, $size = count($tokens); $i < $size; $i++) { - if ($this->_scriptFix && $tokens[$i]->name === 'script' - && $i + 2 < $size && $tokens[$i+2] instanceof HTMLPurifier_Token_End) { - // script special case - // the contents of the script block must be ONE token - // for this to work. - $html .= $this->generateFromToken($tokens[$i++]); - $html .= $this->generateScriptFromToken($tokens[$i++]); - } - $html .= $this->generateFromToken($tokens[$i]); - } - - // Tidy cleanup - if (extension_loaded('tidy') && $this->config->get('Output.TidyFormat')) { - $tidy = new Tidy; - $tidy->parseString( - $html, - array( - 'indent'=> true, - 'output-xhtml' => $this->_xhtml, - 'show-body-only' => true, - 'indent-spaces' => 2, - 'wrap' => 68, - ), - 'utf8' - ); - $tidy->cleanRepair(); - $html = (string) $tidy; // explicit cast necessary - } - - // Normalize newlines to system defined value - if ($this->config->get('Core.NormalizeNewlines')) { - $nl = $this->config->get('Output.Newline'); - if ($nl === null) { - $nl = PHP_EOL; - } - if ($nl !== "\n") { - $html = str_replace("\n", $nl, $html); - } - } - return $html; - } - - /** - * Generates HTML from a single token. - * @param HTMLPurifier_Token $token HTMLPurifier_Token object. - * @return string Generated HTML - */ - public function generateFromToken($token) - { - if (!$token instanceof HTMLPurifier_Token) { - trigger_error('Cannot generate HTML from non-HTMLPurifier_Token object', E_USER_WARNING); - return ''; - - } elseif ($token instanceof HTMLPurifier_Token_Start) { - $attr = $this->generateAttributes($token->attr, $token->name); - if ($this->_flashCompat) { - if ($token->name == "object") { - $flash = new stdClass(); - $flash->attr = $token->attr; - $flash->param = array(); - $this->_flashStack[] = $flash; - } - } - return '<' . $token->name . ($attr ? ' ' : '') . $attr . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_End) { - $_extra = ''; - if ($this->_flashCompat) { - if ($token->name == "object" && !empty($this->_flashStack)) { - // doesn't do anything for now - } - } - return $_extra . 'name . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - if ($this->_flashCompat && $token->name == "param" && !empty($this->_flashStack)) { - $this->_flashStack[count($this->_flashStack)-1]->param[$token->attr['name']] = $token->attr['value']; - } - $attr = $this->generateAttributes($token->attr, $token->name); - return '<' . $token->name . ($attr ? ' ' : '') . $attr . - ( $this->_xhtml ? ' /': '' ) //
v.
- . '>'; - - } elseif ($token instanceof HTMLPurifier_Token_Text) { - return $this->escape($token->data, ENT_NOQUOTES); - - } elseif ($token instanceof HTMLPurifier_Token_Comment) { - return ''; - } else { - return ''; - - } - } - - /** - * Special case processor for the contents of script tags - * @param HTMLPurifier_Token $token HTMLPurifier_Token object. - * @return string - * @warning This runs into problems if there's already a literal - * --> somewhere inside the script contents. - */ - public function generateScriptFromToken($token) - { - if (!$token instanceof HTMLPurifier_Token_Text) { - return $this->generateFromToken($token); - } - // Thanks - $data = preg_replace('#//\s*$#', '', $token->data); - return ''; - } - - /** - * Generates attribute declarations from attribute array. - * @note This does not include the leading or trailing space. - * @param array $assoc_array_of_attributes Attribute array - * @param string $element Name of element attributes are for, used to check - * attribute minimization. - * @return string Generated HTML fragment for insertion. - */ - public function generateAttributes($assoc_array_of_attributes, $element = '') - { - $html = ''; - if ($this->_sortAttr) { - ksort($assoc_array_of_attributes); - } - foreach ($assoc_array_of_attributes as $key => $value) { - if (!$this->_xhtml) { - // Remove namespaced attributes - if (strpos($key, ':') !== false) { - continue; - } - // Check if we should minimize the attribute: val="val" -> val - if ($element && !empty($this->_def->info[$element]->attr[$key]->minimized)) { - $html .= $key . ' '; - continue; - } - } - // Workaround for Internet Explorer innerHTML bug. - // Essentially, Internet Explorer, when calculating - // innerHTML, omits quotes if there are no instances of - // angled brackets, quotes or spaces. However, when parsing - // HTML (for example, when you assign to innerHTML), it - // treats backticks as quotes. Thus, - // `` - // becomes - // `` - // becomes - // - // Fortunately, all we need to do is trigger an appropriate - // quoting style, which we do by adding an extra space. - // This also is consistent with the W3C spec, which states - // that user agents may ignore leading or trailing - // whitespace (in fact, most don't, at least for attributes - // like alt, but an extra space at the end is barely - // noticeable). Still, we have a configuration knob for - // this, since this transformation is not necesary if you - // don't process user input with innerHTML or you don't plan - // on supporting Internet Explorer. - if ($this->_innerHTMLFix) { - if (strpos($value, '`') !== false) { - // check if correct quoting style would not already be - // triggered - if (strcspn($value, '"\' <>') === strlen($value)) { - // protect! - $value .= ' '; - } - } - } - $html .= $key.'="'.$this->escape($value).'" '; - } - return rtrim($html); - } - - /** - * Escapes raw text data. - * @todo This really ought to be protected, but until we have a facility - * for properly generating HTML here w/o using tokens, it stays - * public. - * @param string $string String data to escape for HTML. - * @param int $quote Quoting style, like htmlspecialchars. ENT_NOQUOTES is - * permissible for non-attribute output. - * @return string escaped data. - */ - public function escape($string, $quote = null) - { - // Workaround for APC bug on Mac Leopard reported by sidepodcast - // http://htmlpurifier.org/phorum/read.php?3,4823,4846 - if ($quote === null) { - $quote = ENT_COMPAT; - } - return htmlspecialchars($string, $quote, 'UTF-8'); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php deleted file mode 100644 index 9b7b334d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php +++ /dev/null @@ -1,493 +0,0 @@ -getAnonymousModule(); - if (!isset($module->info[$element_name])) { - $element = $module->addBlankElement($element_name); - } else { - $element = $module->info[$element_name]; - } - $element->attr[$attr_name] = $def; - } - - /** - * Adds a custom element to your HTML definition - * @see HTMLPurifier_HTMLModule::addElement() for detailed - * parameter and return value descriptions. - */ - public function addElement($element_name, $type, $contents, $attr_collections, $attributes = array()) - { - $module = $this->getAnonymousModule(); - // assume that if the user is calling this, the element - // is safe. This may not be a good idea - $element = $module->addElement($element_name, $type, $contents, $attr_collections, $attributes); - return $element; - } - - /** - * Adds a blank element to your HTML definition, for overriding - * existing behavior - * @param string $element_name - * @return HTMLPurifier_ElementDef - * @see HTMLPurifier_HTMLModule::addBlankElement() for detailed - * parameter and return value descriptions. - */ - public function addBlankElement($element_name) - { - $module = $this->getAnonymousModule(); - $element = $module->addBlankElement($element_name); - return $element; - } - - /** - * Retrieves a reference to the anonymous module, so you can - * bust out advanced features without having to make your own - * module. - * @return HTMLPurifier_HTMLModule - */ - public function getAnonymousModule() - { - if (!$this->_anonModule) { - $this->_anonModule = new HTMLPurifier_HTMLModule(); - $this->_anonModule->name = 'Anonymous'; - } - return $this->_anonModule; - } - - private $_anonModule = null; - - // PUBLIC BUT INTERNAL VARIABLES -------------------------------------- - - /** - * @type string - */ - public $type = 'HTML'; - - /** - * @type HTMLPurifier_HTMLModuleManager - */ - public $manager; - - /** - * Performs low-cost, preliminary initialization. - */ - public function __construct() - { - $this->manager = new HTMLPurifier_HTMLModuleManager(); - } - - /** - * @param HTMLPurifier_Config $config - */ - protected function doSetup($config) - { - $this->processModules($config); - $this->setupConfigStuff($config); - unset($this->manager); - - // cleanup some of the element definitions - foreach ($this->info as $k => $v) { - unset($this->info[$k]->content_model); - unset($this->info[$k]->content_model_type); - } - } - - /** - * Extract out the information from the manager - * @param HTMLPurifier_Config $config - */ - protected function processModules($config) - { - if ($this->_anonModule) { - // for user specific changes - // this is late-loaded so we don't have to deal with PHP4 - // reference wonky-ness - $this->manager->addModule($this->_anonModule); - unset($this->_anonModule); - } - - $this->manager->setup($config); - $this->doctype = $this->manager->doctype; - - foreach ($this->manager->modules as $module) { - foreach ($module->info_tag_transform as $k => $v) { - if ($v === false) { - unset($this->info_tag_transform[$k]); - } else { - $this->info_tag_transform[$k] = $v; - } - } - foreach ($module->info_attr_transform_pre as $k => $v) { - if ($v === false) { - unset($this->info_attr_transform_pre[$k]); - } else { - $this->info_attr_transform_pre[$k] = $v; - } - } - foreach ($module->info_attr_transform_post as $k => $v) { - if ($v === false) { - unset($this->info_attr_transform_post[$k]); - } else { - $this->info_attr_transform_post[$k] = $v; - } - } - foreach ($module->info_injector as $k => $v) { - if ($v === false) { - unset($this->info_injector[$k]); - } else { - $this->info_injector[$k] = $v; - } - } - } - $this->info = $this->manager->getElements(); - $this->info_content_sets = $this->manager->contentSets->lookup; - } - - /** - * Sets up stuff based on config. We need a better way of doing this. - * @param HTMLPurifier_Config $config - */ - protected function setupConfigStuff($config) - { - $block_wrapper = $config->get('HTML.BlockWrapper'); - if (isset($this->info_content_sets['Block'][$block_wrapper])) { - $this->info_block_wrapper = $block_wrapper; - } else { - trigger_error( - 'Cannot use non-block element as block wrapper', - E_USER_ERROR - ); - } - - $parent = $config->get('HTML.Parent'); - $def = $this->manager->getElement($parent, true); - if ($def) { - $this->info_parent = $parent; - $this->info_parent_def = $def; - } else { - trigger_error( - 'Cannot use unrecognized element as parent', - E_USER_ERROR - ); - $this->info_parent_def = $this->manager->getElement($this->info_parent, true); - } - - // support template text - $support = "(for information on implementing this, see the support forums) "; - - // setup allowed elements ----------------------------------------- - - $allowed_elements = $config->get('HTML.AllowedElements'); - $allowed_attributes = $config->get('HTML.AllowedAttributes'); // retrieve early - - if (!is_array($allowed_elements) && !is_array($allowed_attributes)) { - $allowed = $config->get('HTML.Allowed'); - if (is_string($allowed)) { - list($allowed_elements, $allowed_attributes) = $this->parseTinyMCEAllowedList($allowed); - } - } - - if (is_array($allowed_elements)) { - foreach ($this->info as $name => $d) { - if (!isset($allowed_elements[$name])) { - unset($this->info[$name]); - } - unset($allowed_elements[$name]); - } - // emit errors - foreach ($allowed_elements as $element => $d) { - $element = htmlspecialchars($element); // PHP doesn't escape errors, be careful! - trigger_error("Element '$element' is not supported $support", E_USER_WARNING); - } - } - - // setup allowed attributes --------------------------------------- - - $allowed_attributes_mutable = $allowed_attributes; // by copy! - if (is_array($allowed_attributes)) { - // This actually doesn't do anything, since we went away from - // global attributes. It's possible that userland code uses - // it, but HTMLModuleManager doesn't! - foreach ($this->info_global_attr as $attr => $x) { - $keys = array($attr, "*@$attr", "*.$attr"); - $delete = true; - foreach ($keys as $key) { - if ($delete && isset($allowed_attributes[$key])) { - $delete = false; - } - if (isset($allowed_attributes_mutable[$key])) { - unset($allowed_attributes_mutable[$key]); - } - } - if ($delete) { - unset($this->info_global_attr[$attr]); - } - } - - foreach ($this->info as $tag => $info) { - foreach ($info->attr as $attr => $x) { - $keys = array("$tag@$attr", $attr, "*@$attr", "$tag.$attr", "*.$attr"); - $delete = true; - foreach ($keys as $key) { - if ($delete && isset($allowed_attributes[$key])) { - $delete = false; - } - if (isset($allowed_attributes_mutable[$key])) { - unset($allowed_attributes_mutable[$key]); - } - } - if ($delete) { - if ($this->info[$tag]->attr[$attr]->required) { - trigger_error( - "Required attribute '$attr' in element '$tag' " . - "was not allowed, which means '$tag' will not be allowed either", - E_USER_WARNING - ); - } - unset($this->info[$tag]->attr[$attr]); - } - } - } - // emit errors - foreach ($allowed_attributes_mutable as $elattr => $d) { - $bits = preg_split('/[.@]/', $elattr, 2); - $c = count($bits); - switch ($c) { - case 2: - if ($bits[0] !== '*') { - $element = htmlspecialchars($bits[0]); - $attribute = htmlspecialchars($bits[1]); - if (!isset($this->info[$element])) { - trigger_error( - "Cannot allow attribute '$attribute' if element " . - "'$element' is not allowed/supported $support" - ); - } else { - trigger_error( - "Attribute '$attribute' in element '$element' not supported $support", - E_USER_WARNING - ); - } - break; - } - // otherwise fall through - case 1: - $attribute = htmlspecialchars($bits[0]); - trigger_error( - "Global attribute '$attribute' is not ". - "supported in any elements $support", - E_USER_WARNING - ); - break; - } - } - } - - // setup forbidden elements --------------------------------------- - - $forbidden_elements = $config->get('HTML.ForbiddenElements'); - $forbidden_attributes = $config->get('HTML.ForbiddenAttributes'); - - foreach ($this->info as $tag => $info) { - if (isset($forbidden_elements[$tag])) { - unset($this->info[$tag]); - continue; - } - foreach ($info->attr as $attr => $x) { - if (isset($forbidden_attributes["$tag@$attr"]) || - isset($forbidden_attributes["*@$attr"]) || - isset($forbidden_attributes[$attr]) - ) { - unset($this->info[$tag]->attr[$attr]); - continue; - } elseif (isset($forbidden_attributes["$tag.$attr"])) { // this segment might get removed eventually - // $tag.$attr are not user supplied, so no worries! - trigger_error( - "Error with $tag.$attr: tag.attr syntax not supported for " . - "HTML.ForbiddenAttributes; use tag@attr instead", - E_USER_WARNING - ); - } - } - } - foreach ($forbidden_attributes as $key => $v) { - if (strlen($key) < 2) { - continue; - } - if ($key[0] != '*') { - continue; - } - if ($key[1] == '.') { - trigger_error( - "Error with $key: *.attr syntax not supported for HTML.ForbiddenAttributes; use attr instead", - E_USER_WARNING - ); - } - } - - // setup injectors ----------------------------------------------------- - foreach ($this->info_injector as $i => $injector) { - if ($injector->checkNeeded($config) !== false) { - // remove injector that does not have it's required - // elements/attributes present, and is thus not needed. - unset($this->info_injector[$i]); - } - } - } - - /** - * Parses a TinyMCE-flavored Allowed Elements and Attributes list into - * separate lists for processing. Format is element[attr1|attr2],element2... - * @warning Although it's largely drawn from TinyMCE's implementation, - * it is different, and you'll probably have to modify your lists - * @param array $list String list to parse - * @return array - * @todo Give this its own class, probably static interface - */ - public function parseTinyMCEAllowedList($list) - { - $list = str_replace(array(' ', "\t"), '', $list); - - $elements = array(); - $attributes = array(); - - $chunks = preg_split('/(,|[\n\r]+)/', $list); - foreach ($chunks as $chunk) { - if (empty($chunk)) { - continue; - } - // remove TinyMCE element control characters - if (!strpos($chunk, '[')) { - $element = $chunk; - $attr = false; - } else { - list($element, $attr) = explode('[', $chunk); - } - if ($element !== '*') { - $elements[$element] = true; - } - if (!$attr) { - continue; - } - $attr = substr($attr, 0, strlen($attr) - 1); // remove trailing ] - $attr = explode('|', $attr); - foreach ($attr as $key) { - $attributes["$element.$key"] = true; - } - } - return array($elements, $attributes); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php deleted file mode 100644 index 9dbb9872..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule.php +++ /dev/null @@ -1,285 +0,0 @@ -info, since the object's data is only info, - * with extra behavior associated with it. - * @type array - */ - public $attr_collections = array(); - - /** - * Associative array of deprecated tag name to HTMLPurifier_TagTransform. - * @type array - */ - public $info_tag_transform = array(); - - /** - * List of HTMLPurifier_AttrTransform to be performed before validation. - * @type array - */ - public $info_attr_transform_pre = array(); - - /** - * List of HTMLPurifier_AttrTransform to be performed after validation. - * @type array - */ - public $info_attr_transform_post = array(); - - /** - * List of HTMLPurifier_Injector to be performed during well-formedness fixing. - * An injector will only be invoked if all of it's pre-requisites are met; - * if an injector fails setup, there will be no error; it will simply be - * silently disabled. - * @type array - */ - public $info_injector = array(); - - /** - * Boolean flag that indicates whether or not getChildDef is implemented. - * For optimization reasons: may save a call to a function. Be sure - * to set it if you do implement getChildDef(), otherwise it will have - * no effect! - * @type bool - */ - public $defines_child_def = false; - - /** - * Boolean flag whether or not this module is safe. If it is not safe, all - * of its members are unsafe. Modules are safe by default (this might be - * slightly dangerous, but it doesn't make much sense to force HTML Purifier, - * which is based off of safe HTML, to explicitly say, "This is safe," even - * though there are modules which are "unsafe") - * - * @type bool - * @note Previously, safety could be applied at an element level granularity. - * We've removed this ability, so in order to add "unsafe" elements - * or attributes, a dedicated module with this property set to false - * must be used. - */ - public $safe = true; - - /** - * Retrieves a proper HTMLPurifier_ChildDef subclass based on - * content_model and content_model_type member variables of - * the HTMLPurifier_ElementDef class. There is a similar function - * in HTMLPurifier_HTMLDefinition. - * @param HTMLPurifier_ElementDef $def - * @return HTMLPurifier_ChildDef subclass - */ - public function getChildDef($def) - { - return false; - } - - // -- Convenience ----------------------------------------------------- - - /** - * Convenience function that sets up a new element - * @param string $element Name of element to add - * @param string|bool $type What content set should element be registered to? - * Set as false to skip this step. - * @param string|HTMLPurifier_ChildDef $contents Allowed children in form of: - * "$content_model_type: $content_model" - * @param array|string $attr_includes What attribute collections to register to - * element? - * @param array $attr What unique attributes does the element define? - * @see HTMLPurifier_ElementDef:: for in-depth descriptions of these parameters. - * @return HTMLPurifier_ElementDef Created element definition object, so you - * can set advanced parameters - */ - public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array()) - { - $this->elements[] = $element; - // parse content_model - list($content_model_type, $content_model) = $this->parseContents($contents); - // merge in attribute inclusions - $this->mergeInAttrIncludes($attr, $attr_includes); - // add element to content sets - if ($type) { - $this->addElementToContentSet($element, $type); - } - // create element - $this->info[$element] = HTMLPurifier_ElementDef::create( - $content_model, - $content_model_type, - $attr - ); - // literal object $contents means direct child manipulation - if (!is_string($contents)) { - $this->info[$element]->child = $contents; - } - return $this->info[$element]; - } - - /** - * Convenience function that creates a totally blank, non-standalone - * element. - * @param string $element Name of element to create - * @return HTMLPurifier_ElementDef Created element - */ - public function addBlankElement($element) - { - if (!isset($this->info[$element])) { - $this->elements[] = $element; - $this->info[$element] = new HTMLPurifier_ElementDef(); - $this->info[$element]->standalone = false; - } else { - trigger_error("Definition for $element already exists in module, cannot redefine"); - } - return $this->info[$element]; - } - - /** - * Convenience function that registers an element to a content set - * @param string $element Element to register - * @param string $type Name content set (warning: case sensitive, usually upper-case - * first letter) - */ - public function addElementToContentSet($element, $type) - { - if (!isset($this->content_sets[$type])) { - $this->content_sets[$type] = ''; - } else { - $this->content_sets[$type] .= ' | '; - } - $this->content_sets[$type] .= $element; - } - - /** - * Convenience function that transforms single-string contents - * into separate content model and content model type - * @param string $contents Allowed children in form of: - * "$content_model_type: $content_model" - * @return array - * @note If contents is an object, an array of two nulls will be - * returned, and the callee needs to take the original $contents - * and use it directly. - */ - public function parseContents($contents) - { - if (!is_string($contents)) { - return array(null, null); - } // defer - switch ($contents) { - // check for shorthand content model forms - case 'Empty': - return array('empty', ''); - case 'Inline': - return array('optional', 'Inline | #PCDATA'); - case 'Flow': - return array('optional', 'Flow | #PCDATA'); - } - list($content_model_type, $content_model) = explode(':', $contents); - $content_model_type = strtolower(trim($content_model_type)); - $content_model = trim($content_model); - return array($content_model_type, $content_model); - } - - /** - * Convenience function that merges a list of attribute includes into - * an attribute array. - * @param array $attr Reference to attr array to modify - * @param array $attr_includes Array of includes / string include to merge in - */ - public function mergeInAttrIncludes(&$attr, $attr_includes) - { - if (!is_array($attr_includes)) { - if (empty($attr_includes)) { - $attr_includes = array(); - } else { - $attr_includes = array($attr_includes); - } - } - $attr[0] = $attr_includes; - } - - /** - * Convenience function that generates a lookup table with boolean - * true as value. - * @param string $list List of values to turn into a lookup - * @note You can also pass an arbitrary number of arguments in - * place of the regular argument - * @return array array equivalent of list - */ - public function makeLookup($list) - { - $args = func_get_args(); - if (is_string($list)) { - $list = $args; - } - $ret = array(); - foreach ($list as $value) { - if (is_null($value)) { - continue; - } - $ret[$value] = true; - } - return $ret; - } - - /** - * Lazy load construction of the module after determining whether - * or not it's needed, and also when a finalized configuration object - * is available. - * @param HTMLPurifier_Config $config - */ - public function setup($config) - { - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php deleted file mode 100644 index 1e67c790..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php +++ /dev/null @@ -1,44 +0,0 @@ - array('dir' => false) - ); - - /** - * @param HTMLPurifier_Config $config - */ - public function setup($config) - { - $bdo = $this->addElement( - 'bdo', - 'Inline', - 'Inline', - array('Core', 'Lang'), - array( - 'dir' => 'Enum#ltr,rtl', // required - // The Abstract Module specification has the attribute - // inclusions wrong for bdo: bdo allows Lang - ) - ); - $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir(); - - $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl'; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php deleted file mode 100644 index 7220c14c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/CommonAttributes.php +++ /dev/null @@ -1,32 +0,0 @@ - array( - 0 => array('Style'), - // 'xml:space' => false, - 'class' => 'Class', - 'id' => 'ID', - 'title' => 'CDATA', - 'contenteditable' => 'ContentEditable', - ), - 'Lang' => array(), - 'I18N' => array( - 0 => array('Lang'), // proprietary, for xml:lang/lang - ), - 'Common' => array( - 0 => array('Core', 'I18N') - ) - ); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php deleted file mode 100644 index a9042a35..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Edit.php +++ /dev/null @@ -1,55 +0,0 @@ - 'URI', - // 'datetime' => 'Datetime', // not implemented - ); - $this->addElement('del', 'Inline', $contents, 'Common', $attr); - $this->addElement('ins', 'Inline', $contents, 'Common', $attr); - } - - // HTML 4.01 specifies that ins/del must not contain block - // elements when used in an inline context, chameleon is - // a complicated workaround to acheive this effect - - // Inline context ! Block context (exclamation mark is - // separator, see getChildDef for parsing) - - /** - * @type bool - */ - public $defines_child_def = true; - - /** - * @param HTMLPurifier_ElementDef $def - * @return HTMLPurifier_ChildDef_Chameleon - */ - public function getChildDef($def) - { - if ($def->content_model_type != 'chameleon') { - return false; - } - $value = explode('!', $def->content_model); - return new HTMLPurifier_ChildDef_Chameleon($value[0], $value[1]); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php deleted file mode 100644 index eb0edcff..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Forms.php +++ /dev/null @@ -1,194 +0,0 @@ - 'Form', - 'Inline' => 'Formctrl', - ); - - /** - * @param HTMLPurifier_Config $config - */ - public function setup($config) - { - if ($config->get('HTML.Forms')) { - $this->safe = true; - } - - $form = $this->addElement( - 'form', - 'Form', - 'Required: Heading | List | Block | fieldset', - 'Common', - array( - 'accept' => 'ContentTypes', - 'accept-charset' => 'Charsets', - 'action*' => 'URI', - 'method' => 'Enum#get,post', - // really ContentType, but these two are the only ones used today - 'enctype' => 'Enum#application/x-www-form-urlencoded,multipart/form-data', - ) - ); - $form->excludes = array('form' => true); - - $input = $this->addElement( - 'input', - 'Formctrl', - 'Empty', - 'Common', - array( - 'accept' => 'ContentTypes', - 'accesskey' => 'Character', - 'alt' => 'Text', - 'checked' => 'Bool#checked', - 'disabled' => 'Bool#disabled', - 'maxlength' => 'Number', - 'name' => 'CDATA', - 'readonly' => 'Bool#readonly', - 'size' => 'Number', - 'src' => 'URI#embedded', - 'tabindex' => 'Number', - 'type' => 'Enum#text,password,checkbox,button,radio,submit,reset,file,hidden,image', - 'value' => 'CDATA', - ) - ); - $input->attr_transform_post[] = new HTMLPurifier_AttrTransform_Input(); - - $this->addElement( - 'select', - 'Formctrl', - 'Required: optgroup | option', - 'Common', - array( - 'disabled' => 'Bool#disabled', - 'multiple' => 'Bool#multiple', - 'name' => 'CDATA', - 'size' => 'Number', - 'tabindex' => 'Number', - ) - ); - - $this->addElement( - 'option', - false, - 'Optional: #PCDATA', - 'Common', - array( - 'disabled' => 'Bool#disabled', - 'label' => 'Text', - 'selected' => 'Bool#selected', - 'value' => 'CDATA', - ) - ); - // It's illegal for there to be more than one selected, but not - // be multiple. Also, no selected means undefined behavior. This might - // be difficult to implement; perhaps an injector, or a context variable. - - $textarea = $this->addElement( - 'textarea', - 'Formctrl', - 'Optional: #PCDATA', - 'Common', - array( - 'accesskey' => 'Character', - 'cols*' => 'Number', - 'disabled' => 'Bool#disabled', - 'name' => 'CDATA', - 'readonly' => 'Bool#readonly', - 'rows*' => 'Number', - 'tabindex' => 'Number', - ) - ); - $textarea->attr_transform_pre[] = new HTMLPurifier_AttrTransform_Textarea(); - - $button = $this->addElement( - 'button', - 'Formctrl', - 'Optional: #PCDATA | Heading | List | Block | Inline', - 'Common', - array( - 'accesskey' => 'Character', - 'disabled' => 'Bool#disabled', - 'name' => 'CDATA', - 'tabindex' => 'Number', - 'type' => 'Enum#button,submit,reset', - 'value' => 'CDATA', - ) - ); - - // For exclusions, ideally we'd specify content sets, not literal elements - $button->excludes = $this->makeLookup( - 'form', - 'fieldset', // Form - 'input', - 'select', - 'textarea', - 'label', - 'button', // Formctrl - 'a', // as per HTML 4.01 spec, this is omitted by modularization - 'isindex', - 'iframe' // legacy items - ); - - // Extra exclusion: img usemap="" is not permitted within this element. - // We'll omit this for now, since we don't have any good way of - // indicating it yet. - - // This is HIGHLY user-unfriendly; we need a custom child-def for this - $this->addElement('fieldset', 'Form', 'Custom: (#WS?,legend,(Flow|#PCDATA)*)', 'Common'); - - $label = $this->addElement( - 'label', - 'Formctrl', - 'Optional: #PCDATA | Inline', - 'Common', - array( - 'accesskey' => 'Character', - // 'for' => 'IDREF', // IDREF not implemented, cannot allow - ) - ); - $label->excludes = array('label' => true); - - $this->addElement( - 'legend', - false, - 'Optional: #PCDATA | Inline', - 'Common', - array( - 'accesskey' => 'Character', - ) - ); - - $this->addElement( - 'optgroup', - false, - 'Required: option', - 'Common', - array( - 'disabled' => 'Bool#disabled', - 'label*' => 'Text', - ) - ); - // Don't forget an injector for . This one's a little complex - // because it maps to multiple elements. - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php deleted file mode 100644 index 72d7a31e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Hypertext.php +++ /dev/null @@ -1,40 +0,0 @@ -addElement( - 'a', - 'Inline', - 'Inline', - 'Common', - array( - // 'accesskey' => 'Character', - // 'charset' => 'Charset', - 'href' => 'URI', - // 'hreflang' => 'LanguageCode', - 'rel' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rel'), - 'rev' => new HTMLPurifier_AttrDef_HTML_LinkTypes('rev'), - // 'tabindex' => 'Number', - // 'type' => 'ContentType', - ) - ); - $a->formatting = true; - $a->excludes = array('a' => true); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php deleted file mode 100644 index 71dfc774..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php +++ /dev/null @@ -1,57 +0,0 @@ -get('HTML.SafeIframe')) { - $this->safe = true; - } - $attrs = array( - 'src' => 'URI#embedded', - 'width' => 'Length', - 'height' => 'Length', - 'name' => 'ID', - 'scrolling' => 'Enum#yes,no,auto', - 'frameborder' => 'Enum#0,1', - 'longdesc' => 'URI', - 'marginheight' => 'Pixels', - 'marginwidth' => 'Pixels', - ); - - if ($config->get('HTML.Trusted')) { - $attrs['allowfullscreen'] = 'Bool#allowfullscreen'; - } - - $this->addElement( - 'iframe', - 'Inline', - 'Flow', - 'Common', - $attrs - ); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php deleted file mode 100644 index 0f5fdb3b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php +++ /dev/null @@ -1,49 +0,0 @@ -get('HTML.MaxImgLength'); - $img = $this->addElement( - 'img', - 'Inline', - 'Empty', - 'Common', - array( - 'alt*' => 'Text', - // According to the spec, it's Length, but percents can - // be abused, so we allow only Pixels. - 'height' => 'Pixels#' . $max, - 'width' => 'Pixels#' . $max, - 'longdesc' => 'URI', - 'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded - ) - ); - if ($max === null || $config->get('HTML.Trusted')) { - $img->attr['height'] = - $img->attr['width'] = 'Length'; - } - - // kind of strange, but splitting things up would be inefficient - $img->attr_transform_pre[] = - $img->attr_transform_post[] = - new HTMLPurifier_AttrTransform_ImgRequired(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php deleted file mode 100644 index 86b52995..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php +++ /dev/null @@ -1,186 +0,0 @@ -addElement( - 'basefont', - 'Inline', - 'Empty', - null, - array( - 'color' => 'Color', - 'face' => 'Text', // extremely broad, we should - 'size' => 'Text', // tighten it - 'id' => 'ID' - ) - ); - $this->addElement('center', 'Block', 'Flow', 'Common'); - $this->addElement( - 'dir', - 'Block', - 'Required: li', - 'Common', - array( - 'compact' => 'Bool#compact' - ) - ); - $this->addElement( - 'font', - 'Inline', - 'Inline', - array('Core', 'I18N'), - array( - 'color' => 'Color', - 'face' => 'Text', // extremely broad, we should - 'size' => 'Text', // tighten it - ) - ); - $this->addElement( - 'menu', - 'Block', - 'Required: li', - 'Common', - array( - 'compact' => 'Bool#compact' - ) - ); - - $s = $this->addElement('s', 'Inline', 'Inline', 'Common'); - $s->formatting = true; - - $strike = $this->addElement('strike', 'Inline', 'Inline', 'Common'); - $strike->formatting = true; - - $u = $this->addElement('u', 'Inline', 'Inline', 'Common'); - $u->formatting = true; - - // setup modifications to old elements - - $align = 'Enum#left,right,center,justify'; - - $address = $this->addBlankElement('address'); - $address->content_model = 'Inline | #PCDATA | p'; - $address->content_model_type = 'optional'; - $address->child = false; - - $blockquote = $this->addBlankElement('blockquote'); - $blockquote->content_model = 'Flow | #PCDATA'; - $blockquote->content_model_type = 'optional'; - $blockquote->child = false; - - $br = $this->addBlankElement('br'); - $br->attr['clear'] = 'Enum#left,all,right,none'; - - $caption = $this->addBlankElement('caption'); - $caption->attr['align'] = 'Enum#top,bottom,left,right'; - - $div = $this->addBlankElement('div'); - $div->attr['align'] = $align; - - $dl = $this->addBlankElement('dl'); - $dl->attr['compact'] = 'Bool#compact'; - - for ($i = 1; $i <= 6; $i++) { - $h = $this->addBlankElement("h$i"); - $h->attr['align'] = $align; - } - - $hr = $this->addBlankElement('hr'); - $hr->attr['align'] = $align; - $hr->attr['noshade'] = 'Bool#noshade'; - $hr->attr['size'] = 'Pixels'; - $hr->attr['width'] = 'Length'; - - $img = $this->addBlankElement('img'); - $img->attr['align'] = 'IAlign'; - $img->attr['border'] = 'Pixels'; - $img->attr['hspace'] = 'Pixels'; - $img->attr['vspace'] = 'Pixels'; - - // figure out this integer business - - $li = $this->addBlankElement('li'); - $li->attr['value'] = new HTMLPurifier_AttrDef_Integer(); - $li->attr['type'] = 'Enum#s:1,i,I,a,A,disc,square,circle'; - - $ol = $this->addBlankElement('ol'); - $ol->attr['compact'] = 'Bool#compact'; - $ol->attr['start'] = new HTMLPurifier_AttrDef_Integer(); - $ol->attr['type'] = 'Enum#s:1,i,I,a,A'; - - $p = $this->addBlankElement('p'); - $p->attr['align'] = $align; - - $pre = $this->addBlankElement('pre'); - $pre->attr['width'] = 'Number'; - - // script omitted - - $table = $this->addBlankElement('table'); - $table->attr['align'] = 'Enum#left,center,right'; - $table->attr['bgcolor'] = 'Color'; - - $tr = $this->addBlankElement('tr'); - $tr->attr['bgcolor'] = 'Color'; - - $th = $this->addBlankElement('th'); - $th->attr['bgcolor'] = 'Color'; - $th->attr['height'] = 'Length'; - $th->attr['nowrap'] = 'Bool#nowrap'; - $th->attr['width'] = 'Length'; - - $td = $this->addBlankElement('td'); - $td->attr['bgcolor'] = 'Color'; - $td->attr['height'] = 'Length'; - $td->attr['nowrap'] = 'Bool#nowrap'; - $td->attr['width'] = 'Length'; - - $ul = $this->addBlankElement('ul'); - $ul->attr['compact'] = 'Bool#compact'; - $ul->attr['type'] = 'Enum#square,disc,circle'; - - // "safe" modifications to "unsafe" elements - // WARNING: If you want to add support for an unsafe, legacy - // attribute, make a new TrustedLegacy module with the trusted - // bit set appropriately - - $form = $this->addBlankElement('form'); - $form->content_model = 'Flow | #PCDATA'; - $form->content_model_type = 'optional'; - $form->attr['target'] = 'FrameTarget'; - - $input = $this->addBlankElement('input'); - $input->attr['align'] = 'IAlign'; - - $legend = $this->addBlankElement('legend'); - $legend->attr['align'] = 'LAlign'; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php deleted file mode 100644 index 7a20ff70..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php +++ /dev/null @@ -1,51 +0,0 @@ - 'List'); - - /** - * @param HTMLPurifier_Config $config - */ - public function setup($config) - { - $ol = $this->addElement('ol', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); - $ul = $this->addElement('ul', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); - // XXX The wrap attribute is handled by MakeWellFormed. This is all - // quite unsatisfactory, because we generated this - // *specifically* for lists, and now a big chunk of the handling - // is done properly by the List ChildDef. So actually, we just - // want enough information to make autoclosing work properly, - // and then hand off the tricky stuff to the ChildDef. - $ol->wrap = 'li'; - $ul->wrap = 'li'; - $this->addElement('dl', 'List', 'Required: dt | dd', 'Common'); - - $this->addElement('li', false, 'Flow', 'Common'); - - $this->addElement('dd', false, 'Flow', 'Common'); - $this->addElement('dt', false, 'Inline', 'Common'); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php deleted file mode 100644 index 60c05451..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Name.php +++ /dev/null @@ -1,26 +0,0 @@ -addBlankElement($name); - $element->attr['name'] = 'CDATA'; - if (!$config->get('HTML.Attr.Name.UseCDATA')) { - $element->attr_transform_post[] = new HTMLPurifier_AttrTransform_NameSync(); - } - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php deleted file mode 100644 index dc9410a8..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php +++ /dev/null @@ -1,25 +0,0 @@ -addBlankElement('a'); - $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_Nofollow(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php deleted file mode 100644 index da722253..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php +++ /dev/null @@ -1,20 +0,0 @@ - array( - 'lang' => 'LanguageCode', - ) - ); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php deleted file mode 100644 index 2f9efc5c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php +++ /dev/null @@ -1,62 +0,0 @@ - to cater to legacy browsers: this - * module does not allow this sort of behavior - */ -class HTMLPurifier_HTMLModule_Object extends HTMLPurifier_HTMLModule -{ - /** - * @type string - */ - public $name = 'Object'; - - /** - * @type bool - */ - public $safe = false; - - /** - * @param HTMLPurifier_Config $config - */ - public function setup($config) - { - $this->addElement( - 'object', - 'Inline', - 'Optional: #PCDATA | Flow | param', - 'Common', - array( - 'archive' => 'URI', - 'classid' => 'URI', - 'codebase' => 'URI', - 'codetype' => 'Text', - 'data' => 'URI', - 'declare' => 'Bool#declare', - 'height' => 'Length', - 'name' => 'CDATA', - 'standby' => 'Text', - 'tabindex' => 'Number', - 'type' => 'ContentType', - 'width' => 'Length' - ) - ); - - $this->addElement( - 'param', - false, - 'Empty', - null, - array( - 'id' => 'ID', - 'name*' => 'Text', - 'type' => 'Text', - 'value' => 'Text', - 'valuetype' => 'Enum#data,ref,object' - ) - ); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php deleted file mode 100644 index 6458ce9d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php +++ /dev/null @@ -1,42 +0,0 @@ -addElement('hr', 'Block', 'Empty', 'Common'); - $this->addElement('sub', 'Inline', 'Inline', 'Common'); - $this->addElement('sup', 'Inline', 'Inline', 'Common'); - $b = $this->addElement('b', 'Inline', 'Inline', 'Common'); - $b->formatting = true; - $big = $this->addElement('big', 'Inline', 'Inline', 'Common'); - $big->formatting = true; - $i = $this->addElement('i', 'Inline', 'Inline', 'Common'); - $i->formatting = true; - $small = $this->addElement('small', 'Inline', 'Inline', 'Common'); - $small->formatting = true; - $tt = $this->addElement('tt', 'Inline', 'Inline', 'Common'); - $tt->formatting = true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php deleted file mode 100644 index 5ee3c8e6..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Proprietary.php +++ /dev/null @@ -1,40 +0,0 @@ -addElement( - 'marquee', - 'Inline', - 'Flow', - 'Common', - array( - 'direction' => 'Enum#left,right,up,down', - 'behavior' => 'Enum#alternate', - 'width' => 'Length', - 'height' => 'Length', - 'scrolldelay' => 'Number', - 'scrollamount' => 'Number', - 'loop' => 'Number', - 'bgcolor' => 'Color', - 'hspace' => 'Pixels', - 'vspace' => 'Pixels', - ) - ); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php deleted file mode 100644 index a0d48924..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Ruby.php +++ /dev/null @@ -1,36 +0,0 @@ -addElement( - 'ruby', - 'Inline', - 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', - 'Common' - ); - $this->addElement('rbc', false, 'Required: rb', 'Common'); - $this->addElement('rtc', false, 'Required: rt', 'Common'); - $rb = $this->addElement('rb', false, 'Inline', 'Common'); - $rb->excludes = array('ruby' => true); - $rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number')); - $rt->excludes = array('ruby' => true); - $this->addElement('rp', false, 'Optional: #PCDATA', 'Common'); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php deleted file mode 100644 index 04e6689e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeEmbed.php +++ /dev/null @@ -1,40 +0,0 @@ -get('HTML.MaxImgLength'); - $embed = $this->addElement( - 'embed', - 'Inline', - 'Empty', - 'Common', - array( - 'src*' => 'URI#embedded', - 'type' => 'Enum#application/x-shockwave-flash', - 'width' => 'Pixels#' . $max, - 'height' => 'Pixels#' . $max, - 'allowscriptaccess' => 'Enum#never', - 'allownetworking' => 'Enum#internal', - 'flashvars' => 'Text', - 'wmode' => 'Enum#window,transparent,opaque', - 'name' => 'ID', - ) - ); - $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php deleted file mode 100644 index 1297f80a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php +++ /dev/null @@ -1,62 +0,0 @@ -get('HTML.MaxImgLength'); - $object = $this->addElement( - 'object', - 'Inline', - 'Optional: param | Flow | #PCDATA', - 'Common', - array( - // While technically not required by the spec, we're forcing - // it to this value. - 'type' => 'Enum#application/x-shockwave-flash', - 'width' => 'Pixels#' . $max, - 'height' => 'Pixels#' . $max, - 'data' => 'URI#embedded', - 'codebase' => new HTMLPurifier_AttrDef_Enum( - array( - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' - ) - ), - ) - ); - $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject(); - - $param = $this->addElement( - 'param', - false, - 'Empty', - false, - array( - 'id' => 'ID', - 'name*' => 'Text', - 'value' => 'Text' - ) - ); - $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam(); - $this->info_injector[] = 'SafeObject'; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php deleted file mode 100644 index aea7584c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeScripting.php +++ /dev/null @@ -1,40 +0,0 @@ -get('HTML.SafeScripting'); - $script = $this->addElement( - 'script', - 'Inline', - 'Optional:', // Not `Empty` to not allow to autoclose the #i', '', $html); - } - - return $html; - } - - /** - * Takes a string of HTML (fragment or document) and returns the content - * @todo Consider making protected - */ - public function extractBody($html) - { - $matches = array(); - $result = preg_match('|(.*?)]*>(.*)|is', $html, $matches); - if ($result) { - // Make sure it's not in a comment - $comment_start = strrpos($matches[1], ''); - if ($comment_start === false || - ($comment_end !== false && $comment_end > $comment_start)) { - return $matches[2]; - } - } - return $html; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php deleted file mode 100644 index 7d579837..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php +++ /dev/null @@ -1,340 +0,0 @@ -factory = new HTMLPurifier_TokenFactory(); - } - - /** - * @param string $html - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return HTMLPurifier_Token[] - */ - public function tokenizeHTML($html, $config, $context) - { - $html = $this->normalize($html, $config, $context); - - // attempt to armor stray angled brackets that cannot possibly - // form tags and thus are probably being used as emoticons - if ($config->get('Core.AggressivelyFixLt')) { - $char = '[^a-z!\/]'; - $comment = "/|\z)/is"; - $html = preg_replace_callback($comment, array($this, 'callbackArmorCommentEntities'), $html); - do { - $old = $html; - $html = preg_replace("/<($char)/i", '<\\1', $html); - } while ($html !== $old); - $html = preg_replace_callback($comment, array($this, 'callbackUndoCommentSubst'), $html); // fix comments - } - - // preprocess html, essential for UTF-8 - $html = $this->wrapHTML($html, $config, $context); - - $doc = new DOMDocument(); - $doc->encoding = 'UTF-8'; // theoretically, the above has this covered - - $options = 0; - if ($config->get('Core.AllowParseManyTags') && defined('LIBXML_PARSEHUGE')) { - $options |= LIBXML_PARSEHUGE; - } - if ($config->get('Core.RemoveBlanks') && defined('LIBXML_NOBLANKS')) { - $options |= LIBXML_NOBLANKS; - } - - set_error_handler(array($this, 'muteErrorHandler')); - // loadHTML() fails on PHP 5.3 when second parameter is given - if ($options) { - $doc->loadHTML($html, $options); - } else { - $doc->loadHTML($html); - } - restore_error_handler(); - - $body = $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0); // - - $div = $body->getElementsByTagName('div')->item(0); //
- $tokens = array(); - $this->tokenizeDOM($div, $tokens, $config); - // If the div has a sibling, that means we tripped across - // a premature
tag. So remove the div we parsed, - // and then tokenize the rest of body. We can't tokenize - // the sibling directly as we'll lose the tags in that case. - if ($div->nextSibling) { - $body->removeChild($div); - $this->tokenizeDOM($body, $tokens, $config); - } - return $tokens; - } - - /** - * Iterative function that tokenizes a node, putting it into an accumulator. - * To iterate is human, to recurse divine - L. Peter Deutsch - * @param DOMNode $node DOMNode to be tokenized. - * @param HTMLPurifier_Token[] $tokens Array-list of already tokenized tokens. - */ - protected function tokenizeDOM($node, &$tokens, $config) - { - $level = 0; - $nodes = array($level => new HTMLPurifier_Queue(array($node))); - $closingNodes = array(); - do { - while (!$nodes[$level]->isEmpty()) { - $node = $nodes[$level]->shift(); // FIFO - $collect = $level > 0 ? true : false; - $needEndingTag = $this->createStartNode($node, $tokens, $collect, $config); - if ($needEndingTag) { - $closingNodes[$level][] = $node; - } - if ($node->childNodes && $node->childNodes->length) { - $level++; - $nodes[$level] = new HTMLPurifier_Queue(); - foreach ($node->childNodes as $childNode) { - $nodes[$level]->push($childNode); - } - } - } - $level--; - if ($level && isset($closingNodes[$level])) { - while ($node = array_pop($closingNodes[$level])) { - $this->createEndNode($node, $tokens); - } - } - } while ($level > 0); - } - - /** - * Portably retrieve the tag name of a node; deals with older versions - * of libxml like 2.7.6 - * @param DOMNode $node - */ - protected function getTagName($node) - { - if (isset($node->tagName)) { - return $node->tagName; - } else if (isset($node->nodeName)) { - return $node->nodeName; - } else if (isset($node->localName)) { - return $node->localName; - } - return null; - } - - /** - * Portably retrieve the data of a node; deals with older versions - * of libxml like 2.7.6 - * @param DOMNode $node - */ - protected function getData($node) - { - if (isset($node->data)) { - return $node->data; - } else if (isset($node->nodeValue)) { - return $node->nodeValue; - } else if (isset($node->textContent)) { - return $node->textContent; - } - return null; - } - - - /** - * @param DOMNode $node DOMNode to be tokenized. - * @param HTMLPurifier_Token[] $tokens Array-list of already tokenized tokens. - * @param bool $collect Says whether or start and close are collected, set to - * false at first recursion because it's the implicit DIV - * tag you're dealing with. - * @return bool if the token needs an endtoken - * @todo data and tagName properties don't seem to exist in DOMNode? - */ - protected function createStartNode($node, &$tokens, $collect, $config) - { - // intercept non element nodes. WE MUST catch all of them, - // but we're not getting the character reference nodes because - // those should have been preprocessed - if ($node->nodeType === XML_TEXT_NODE) { - $data = $this->getData($node); // Handle variable data property - if ($data !== null) { - $tokens[] = $this->factory->createText($data); - } - return false; - } elseif ($node->nodeType === XML_CDATA_SECTION_NODE) { - // undo libxml's special treatment of )#si', - array($this, 'scriptCallback'), - $html - ); - } - - $html = $this->normalize($html, $config, $context); - - $cursor = 0; // our location in the text - $inside_tag = false; // whether or not we're parsing the inside of a tag - $array = array(); // result array - - // This is also treated to mean maintain *column* numbers too - $maintain_line_numbers = $config->get('Core.MaintainLineNumbers'); - - if ($maintain_line_numbers === null) { - // automatically determine line numbering by checking - // if error collection is on - $maintain_line_numbers = $config->get('Core.CollectErrors'); - } - - if ($maintain_line_numbers) { - $current_line = 1; - $current_col = 0; - $length = strlen($html); - } else { - $current_line = false; - $current_col = false; - $length = false; - } - $context->register('CurrentLine', $current_line); - $context->register('CurrentCol', $current_col); - $nl = "\n"; - // how often to manually recalculate. This will ALWAYS be right, - // but it's pretty wasteful. Set to 0 to turn off - $synchronize_interval = $config->get('Core.DirectLexLineNumberSyncInterval'); - - $e = false; - if ($config->get('Core.CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - // for testing synchronization - $loops = 0; - - while (++$loops) { - // $cursor is either at the start of a token, or inside of - // a tag (i.e. there was a < immediately before it), as indicated - // by $inside_tag - - if ($maintain_line_numbers) { - // $rcursor, however, is always at the start of a token. - $rcursor = $cursor - (int)$inside_tag; - - // Column number is cheap, so we calculate it every round. - // We're interested at the *end* of the newline string, so - // we need to add strlen($nl) == 1 to $nl_pos before subtracting it - // from our "rcursor" position. - $nl_pos = strrpos($html, $nl, $rcursor - $length); - $current_col = $rcursor - (is_bool($nl_pos) ? 0 : $nl_pos + 1); - - // recalculate lines - if ($synchronize_interval && // synchronization is on - $cursor > 0 && // cursor is further than zero - $loops % $synchronize_interval === 0) { // time to synchronize! - $current_line = 1 + $this->substrCount($html, $nl, 0, $cursor); - } - } - - $position_next_lt = strpos($html, '<', $cursor); - $position_next_gt = strpos($html, '>', $cursor); - - // triggers on "asdf" but not "asdf " - // special case to set up context - if ($position_next_lt === $cursor) { - $inside_tag = true; - $cursor++; - } - - if (!$inside_tag && $position_next_lt !== false) { - // We are not inside tag and there still is another tag to parse - $token = new - HTMLPurifier_Token_Text( - $this->parseText( - substr( - $html, - $cursor, - $position_next_lt - $cursor - ), $config - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_lt - $cursor); - } - $array[] = $token; - $cursor = $position_next_lt + 1; - $inside_tag = true; - continue; - } elseif (!$inside_tag) { - // We are not inside tag but there are no more tags - // If we're already at the end, break - if ($cursor === strlen($html)) { - break; - } - // Create Text of rest of string - $token = new - HTMLPurifier_Token_Text( - $this->parseText( - substr( - $html, - $cursor - ), $config - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - } - $array[] = $token; - break; - } elseif ($inside_tag && $position_next_gt !== false) { - // We are in tag and it is well formed - // Grab the internals of the tag - $strlen_segment = $position_next_gt - $cursor; - - if ($strlen_segment < 1) { - // there's nothing to process! - $token = new HTMLPurifier_Token_Text('<'); - $cursor++; - continue; - } - - $segment = substr($html, $cursor, $strlen_segment); - - if ($segment === false) { - // somehow, we attempted to access beyond the end of - // the string, defense-in-depth, reported by Nate Abele - break; - } - - // Check if it's a comment - if (substr($segment, 0, 3) === '!--') { - // re-determine segment length, looking for --> - $position_comment_end = strpos($html, '-->', $cursor); - if ($position_comment_end === false) { - // uh oh, we have a comment that extends to - // infinity. Can't be helped: set comment - // end position to end of string - if ($e) { - $e->send(E_WARNING, 'Lexer: Unclosed comment'); - } - $position_comment_end = strlen($html); - $end = true; - } else { - $end = false; - } - $strlen_segment = $position_comment_end - $cursor; - $segment = substr($html, $cursor, $strlen_segment); - $token = new - HTMLPurifier_Token_Comment( - substr( - $segment, - 3, - $strlen_segment - 3 - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $strlen_segment); - } - $array[] = $token; - $cursor = $end ? $position_comment_end : $position_comment_end + 3; - $inside_tag = false; - continue; - } - - // Check if it's an end tag - $is_end_tag = (strpos($segment, '/') === 0); - if ($is_end_tag) { - $type = substr($segment, 1); - $token = new HTMLPurifier_Token_End($type); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - $cursor = $position_next_gt + 1; - continue; - } - - // Check leading character is alnum, if not, we may - // have accidently grabbed an emoticon. Translate into - // text and go our merry way - if (!ctype_alpha($segment[0])) { - // XML: $segment[0] !== '_' && $segment[0] !== ':' - if ($e) { - $e->send(E_NOTICE, 'Lexer: Unescaped lt'); - } - $token = new HTMLPurifier_Token_Text('<'); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - continue; - } - - // Check if it is explicitly self closing, if so, remove - // trailing slash. Remember, we could have a tag like
, so - // any later token processing scripts must convert improperly - // classified EmptyTags from StartTags. - $is_self_closing = (strrpos($segment, '/') === $strlen_segment - 1); - if ($is_self_closing) { - $strlen_segment--; - $segment = substr($segment, 0, $strlen_segment); - } - - // Check if there are any attributes - $position_first_space = strcspn($segment, $this->_whitespace); - - if ($position_first_space >= $strlen_segment) { - if ($is_self_closing) { - $token = new HTMLPurifier_Token_Empty($segment); - } else { - $token = new HTMLPurifier_Token_Start($segment); - } - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $inside_tag = false; - $cursor = $position_next_gt + 1; - continue; - } - - // Grab out all the data - $type = substr($segment, 0, $position_first_space); - $attribute_string = - trim( - substr( - $segment, - $position_first_space - ) - ); - if ($attribute_string) { - $attr = $this->parseAttributeString( - $attribute_string, - $config, - $context - ); - } else { - $attr = array(); - } - - if ($is_self_closing) { - $token = new HTMLPurifier_Token_Empty($type, $attr); - } else { - $token = new HTMLPurifier_Token_Start($type, $attr); - } - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - $current_line += $this->substrCount($html, $nl, $cursor, $position_next_gt - $cursor); - } - $array[] = $token; - $cursor = $position_next_gt + 1; - $inside_tag = false; - continue; - } else { - // inside tag, but there's no ending > sign - if ($e) { - $e->send(E_WARNING, 'Lexer: Missing gt'); - } - $token = new - HTMLPurifier_Token_Text( - '<' . - $this->parseText( - substr($html, $cursor), $config - ) - ); - if ($maintain_line_numbers) { - $token->rawPosition($current_line, $current_col); - } - // no cursor scroll? Hmm... - $array[] = $token; - break; - } - break; - } - - $context->destroy('CurrentLine'); - $context->destroy('CurrentCol'); - return $array; - } - - /** - * PHP 5.0.x compatible substr_count that implements offset and length - * @param string $haystack - * @param string $needle - * @param int $offset - * @param int $length - * @return int - */ - protected function substrCount($haystack, $needle, $offset, $length) - { - static $oldVersion; - if ($oldVersion === null) { - $oldVersion = version_compare(PHP_VERSION, '5.1', '<'); - } - if ($oldVersion) { - $haystack = substr($haystack, $offset, $length); - return substr_count($haystack, $needle); - } else { - return substr_count($haystack, $needle, $offset, $length); - } - } - - /** - * Takes the inside of an HTML tag and makes an assoc array of attributes. - * - * @param string $string Inside of tag excluding name. - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return array Assoc array of attributes. - */ - public function parseAttributeString($string, $config, $context) - { - $string = (string)$string; // quick typecast - - if ($string == '') { - return array(); - } // no attributes - - $e = false; - if ($config->get('Core.CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - // let's see if we can abort as quickly as possible - // one equal sign, no spaces => one attribute - $num_equal = substr_count($string, '='); - $has_space = strpos($string, ' '); - if ($num_equal === 0 && !$has_space) { - // bool attribute - return array($string => $string); - } elseif ($num_equal === 1 && !$has_space) { - // only one attribute - list($key, $quoted_value) = explode('=', $string); - $quoted_value = trim($quoted_value); - if (!$key) { - if ($e) { - $e->send(E_ERROR, 'Lexer: Missing attribute key'); - } - return array(); - } - if (!$quoted_value) { - return array($key => ''); - } - $first_char = @$quoted_value[0]; - $last_char = @$quoted_value[strlen($quoted_value) - 1]; - - $same_quote = ($first_char == $last_char); - $open_quote = ($first_char == '"' || $first_char == "'"); - - if ($same_quote && $open_quote) { - // well behaved - $value = substr($quoted_value, 1, strlen($quoted_value) - 2); - } else { - // not well behaved - if ($open_quote) { - if ($e) { - $e->send(E_ERROR, 'Lexer: Missing end quote'); - } - $value = substr($quoted_value, 1); - } else { - $value = $quoted_value; - } - } - if ($value === false) { - $value = ''; - } - return array($key => $this->parseAttr($value, $config)); - } - - // setup loop environment - $array = array(); // return assoc array of attributes - $cursor = 0; // current position in string (moves forward) - $size = strlen($string); // size of the string (stays the same) - - // if we have unquoted attributes, the parser expects a terminating - // space, so let's guarantee that there's always a terminating space. - $string .= ' '; - - $old_cursor = -1; - while ($cursor < $size) { - if ($old_cursor >= $cursor) { - throw new Exception("Infinite loop detected"); - } - $old_cursor = $cursor; - - $cursor += ($value = strspn($string, $this->_whitespace, $cursor)); - // grab the key - - $key_begin = $cursor; //we're currently at the start of the key - - // scroll past all characters that are the key (not whitespace or =) - $cursor += strcspn($string, $this->_whitespace . '=', $cursor); - - $key_end = $cursor; // now at the end of the key - - $key = substr($string, $key_begin, $key_end - $key_begin); - - if (!$key) { - if ($e) { - $e->send(E_ERROR, 'Lexer: Missing attribute key'); - } - $cursor += 1 + strcspn($string, $this->_whitespace, $cursor + 1); // prevent infinite loop - continue; // empty key - } - - // scroll past all whitespace - $cursor += strspn($string, $this->_whitespace, $cursor); - - if ($cursor >= $size) { - $array[$key] = $key; - break; - } - - // if the next character is an equal sign, we've got a regular - // pair, otherwise, it's a bool attribute - $first_char = @$string[$cursor]; - - if ($first_char == '=') { - // key="value" - - $cursor++; - $cursor += strspn($string, $this->_whitespace, $cursor); - - if ($cursor === false) { - $array[$key] = ''; - break; - } - - // we might be in front of a quote right now - - $char = @$string[$cursor]; - - if ($char == '"' || $char == "'") { - // it's quoted, end bound is $char - $cursor++; - $value_begin = $cursor; - $cursor = strpos($string, $char, $cursor); - $value_end = $cursor; - } else { - // it's not quoted, end bound is whitespace - $value_begin = $cursor; - $cursor += strcspn($string, $this->_whitespace, $cursor); - $value_end = $cursor; - } - - // we reached a premature end - if ($cursor === false) { - $cursor = $size; - $value_end = $cursor; - } - - $value = substr($string, $value_begin, $value_end - $value_begin); - if ($value === false) { - $value = ''; - } - $array[$key] = $this->parseAttr($value, $config); - $cursor++; - } else { - // boolattr - if ($key !== '') { - $array[$key] = $key; - } else { - // purely theoretical - if ($e) { - $e->send(E_ERROR, 'Lexer: Missing attribute key'); - } - } - } - } - return $array; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php deleted file mode 100644 index 1564f283..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php +++ /dev/null @@ -1,4788 +0,0 @@ -normalize($html, $config, $context); - $new_html = $this->wrapHTML($new_html, $config, $context, false /* no div */); - try { - $parser = new HTML5($new_html); - $doc = $parser->save(); - } catch (DOMException $e) { - // Uh oh, it failed. Punt to DirectLex. - $lexer = new HTMLPurifier_Lexer_DirectLex(); - $context->register('PH5PError', $e); // save the error, so we can detect it - return $lexer->tokenizeHTML($html, $config, $context); // use original HTML - } - $tokens = array(); - $this->tokenizeDOM( - $doc->getElementsByTagName('html')->item(0)-> // - getElementsByTagName('body')->item(0) // - , - $tokens, $config - ); - return $tokens; - } -} - -/* - -Copyright 2007 Jeroen van der Meer - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -class HTML5 -{ - private $data; - private $char; - private $EOF; - private $state; - private $tree; - private $token; - private $content_model; - private $escape = false; - private $entities = array( - 'AElig;', - 'AElig', - 'AMP;', - 'AMP', - 'Aacute;', - 'Aacute', - 'Acirc;', - 'Acirc', - 'Agrave;', - 'Agrave', - 'Alpha;', - 'Aring;', - 'Aring', - 'Atilde;', - 'Atilde', - 'Auml;', - 'Auml', - 'Beta;', - 'COPY;', - 'COPY', - 'Ccedil;', - 'Ccedil', - 'Chi;', - 'Dagger;', - 'Delta;', - 'ETH;', - 'ETH', - 'Eacute;', - 'Eacute', - 'Ecirc;', - 'Ecirc', - 'Egrave;', - 'Egrave', - 'Epsilon;', - 'Eta;', - 'Euml;', - 'Euml', - 'GT;', - 'GT', - 'Gamma;', - 'Iacute;', - 'Iacute', - 'Icirc;', - 'Icirc', - 'Igrave;', - 'Igrave', - 'Iota;', - 'Iuml;', - 'Iuml', - 'Kappa;', - 'LT;', - 'LT', - 'Lambda;', - 'Mu;', - 'Ntilde;', - 'Ntilde', - 'Nu;', - 'OElig;', - 'Oacute;', - 'Oacute', - 'Ocirc;', - 'Ocirc', - 'Ograve;', - 'Ograve', - 'Omega;', - 'Omicron;', - 'Oslash;', - 'Oslash', - 'Otilde;', - 'Otilde', - 'Ouml;', - 'Ouml', - 'Phi;', - 'Pi;', - 'Prime;', - 'Psi;', - 'QUOT;', - 'QUOT', - 'REG;', - 'REG', - 'Rho;', - 'Scaron;', - 'Sigma;', - 'THORN;', - 'THORN', - 'TRADE;', - 'Tau;', - 'Theta;', - 'Uacute;', - 'Uacute', - 'Ucirc;', - 'Ucirc', - 'Ugrave;', - 'Ugrave', - 'Upsilon;', - 'Uuml;', - 'Uuml', - 'Xi;', - 'Yacute;', - 'Yacute', - 'Yuml;', - 'Zeta;', - 'aacute;', - 'aacute', - 'acirc;', - 'acirc', - 'acute;', - 'acute', - 'aelig;', - 'aelig', - 'agrave;', - 'agrave', - 'alefsym;', - 'alpha;', - 'amp;', - 'amp', - 'and;', - 'ang;', - 'apos;', - 'aring;', - 'aring', - 'asymp;', - 'atilde;', - 'atilde', - 'auml;', - 'auml', - 'bdquo;', - 'beta;', - 'brvbar;', - 'brvbar', - 'bull;', - 'cap;', - 'ccedil;', - 'ccedil', - 'cedil;', - 'cedil', - 'cent;', - 'cent', - 'chi;', - 'circ;', - 'clubs;', - 'cong;', - 'copy;', - 'copy', - 'crarr;', - 'cup;', - 'curren;', - 'curren', - 'dArr;', - 'dagger;', - 'darr;', - 'deg;', - 'deg', - 'delta;', - 'diams;', - 'divide;', - 'divide', - 'eacute;', - 'eacute', - 'ecirc;', - 'ecirc', - 'egrave;', - 'egrave', - 'empty;', - 'emsp;', - 'ensp;', - 'epsilon;', - 'equiv;', - 'eta;', - 'eth;', - 'eth', - 'euml;', - 'euml', - 'euro;', - 'exist;', - 'fnof;', - 'forall;', - 'frac12;', - 'frac12', - 'frac14;', - 'frac14', - 'frac34;', - 'frac34', - 'frasl;', - 'gamma;', - 'ge;', - 'gt;', - 'gt', - 'hArr;', - 'harr;', - 'hearts;', - 'hellip;', - 'iacute;', - 'iacute', - 'icirc;', - 'icirc', - 'iexcl;', - 'iexcl', - 'igrave;', - 'igrave', - 'image;', - 'infin;', - 'int;', - 'iota;', - 'iquest;', - 'iquest', - 'isin;', - 'iuml;', - 'iuml', - 'kappa;', - 'lArr;', - 'lambda;', - 'lang;', - 'laquo;', - 'laquo', - 'larr;', - 'lceil;', - 'ldquo;', - 'le;', - 'lfloor;', - 'lowast;', - 'loz;', - 'lrm;', - 'lsaquo;', - 'lsquo;', - 'lt;', - 'lt', - 'macr;', - 'macr', - 'mdash;', - 'micro;', - 'micro', - 'middot;', - 'middot', - 'minus;', - 'mu;', - 'nabla;', - 'nbsp;', - 'nbsp', - 'ndash;', - 'ne;', - 'ni;', - 'not;', - 'not', - 'notin;', - 'nsub;', - 'ntilde;', - 'ntilde', - 'nu;', - 'oacute;', - 'oacute', - 'ocirc;', - 'ocirc', - 'oelig;', - 'ograve;', - 'ograve', - 'oline;', - 'omega;', - 'omicron;', - 'oplus;', - 'or;', - 'ordf;', - 'ordf', - 'ordm;', - 'ordm', - 'oslash;', - 'oslash', - 'otilde;', - 'otilde', - 'otimes;', - 'ouml;', - 'ouml', - 'para;', - 'para', - 'part;', - 'permil;', - 'perp;', - 'phi;', - 'pi;', - 'piv;', - 'plusmn;', - 'plusmn', - 'pound;', - 'pound', - 'prime;', - 'prod;', - 'prop;', - 'psi;', - 'quot;', - 'quot', - 'rArr;', - 'radic;', - 'rang;', - 'raquo;', - 'raquo', - 'rarr;', - 'rceil;', - 'rdquo;', - 'real;', - 'reg;', - 'reg', - 'rfloor;', - 'rho;', - 'rlm;', - 'rsaquo;', - 'rsquo;', - 'sbquo;', - 'scaron;', - 'sdot;', - 'sect;', - 'sect', - 'shy;', - 'shy', - 'sigma;', - 'sigmaf;', - 'sim;', - 'spades;', - 'sub;', - 'sube;', - 'sum;', - 'sup1;', - 'sup1', - 'sup2;', - 'sup2', - 'sup3;', - 'sup3', - 'sup;', - 'supe;', - 'szlig;', - 'szlig', - 'tau;', - 'there4;', - 'theta;', - 'thetasym;', - 'thinsp;', - 'thorn;', - 'thorn', - 'tilde;', - 'times;', - 'times', - 'trade;', - 'uArr;', - 'uacute;', - 'uacute', - 'uarr;', - 'ucirc;', - 'ucirc', - 'ugrave;', - 'ugrave', - 'uml;', - 'uml', - 'upsih;', - 'upsilon;', - 'uuml;', - 'uuml', - 'weierp;', - 'xi;', - 'yacute;', - 'yacute', - 'yen;', - 'yen', - 'yuml;', - 'yuml', - 'zeta;', - 'zwj;', - 'zwnj;' - ); - - const PCDATA = 0; - const RCDATA = 1; - const CDATA = 2; - const PLAINTEXT = 3; - - const DOCTYPE = 0; - const STARTTAG = 1; - const ENDTAG = 2; - const COMMENT = 3; - const CHARACTR = 4; - const EOF = 5; - - public function __construct($data) - { - $this->data = $data; - $this->char = -1; - $this->EOF = strlen($data); - $this->tree = new HTML5TreeConstructer; - $this->content_model = self::PCDATA; - - $this->state = 'data'; - - while ($this->state !== null) { - $this->{$this->state . 'State'}(); - } - } - - public function save() - { - return $this->tree->save(); - } - - private function char() - { - return ($this->char < $this->EOF) - ? $this->data[$this->char] - : false; - } - - private function character($s, $l = 0) - { - if ($s + $l < $this->EOF) { - if ($l === 0) { - return $this->data[$s]; - } else { - return substr($this->data, $s, $l); - } - } - } - - private function characters($char_class, $start) - { - return preg_replace('#^([' . $char_class . ']+).*#s', '\\1', substr($this->data, $start)); - } - - private function dataState() - { - // Consume the next input character - $this->char++; - $char = $this->char(); - - if ($char === '&' && ($this->content_model === self::PCDATA || $this->content_model === self::RCDATA)) { - /* U+0026 AMPERSAND (&) - When the content model flag is set to one of the PCDATA or RCDATA - states: switch to the entity data state. Otherwise: treat it as per - the "anything else" entry below. */ - $this->state = 'entityData'; - - } elseif ($char === '-') { - /* If the content model flag is set to either the RCDATA state or - the CDATA state, and the escape flag is false, and there are at - least three characters before this one in the input stream, and the - last four characters in the input stream, including this one, are - U+003C LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, - and U+002D HYPHEN-MINUS (""), - set the escape flag to false. */ - if (($this->content_model === self::RCDATA || - $this->content_model === self::CDATA) && $this->escape === true && - $this->character($this->char, 3) === '-->' - ) { - $this->escape = false; - } - - /* In any case, emit the input character as a character token. - Stay in the data state. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => $char - ) - ); - - } elseif ($this->char === $this->EOF) { - /* EOF - Emit an end-of-file token. */ - $this->EOF(); - - } elseif ($this->content_model === self::PLAINTEXT) { - /* When the content model flag is set to the PLAINTEXT state - THIS DIFFERS GREATLY FROM THE SPEC: Get the remaining characters of - the text and emit it as a character token. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => substr($this->data, $this->char) - ) - ); - - $this->EOF(); - - } else { - /* Anything else - THIS DIFFERS GREATLY FROM THE SPEC: Get as many character that - otherwise would also be treated as a character token and emit it - as a single character token. Stay in the data state. */ - $len = strcspn($this->data, '<&', $this->char); - $char = substr($this->data, $this->char, $len); - $this->char += $len - 1; - - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => $char - ) - ); - - $this->state = 'data'; - } - } - - private function entityDataState() - { - // Attempt to consume an entity. - $entity = $this->entity(); - - // If nothing is returned, emit a U+0026 AMPERSAND character token. - // Otherwise, emit the character token that was returned. - $char = (!$entity) ? '&' : $entity; - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => $char - ) - ); - - // Finally, switch to the data state. - $this->state = 'data'; - } - - private function tagOpenState() - { - switch ($this->content_model) { - case self::RCDATA: - case self::CDATA: - /* If the next input character is a U+002F SOLIDUS (/) character, - consume it and switch to the close tag open state. If the next - input character is not a U+002F SOLIDUS (/) character, emit a - U+003C LESS-THAN SIGN character token and switch to the data - state to process the next input character. */ - if ($this->character($this->char + 1) === '/') { - $this->char++; - $this->state = 'closeTagOpen'; - - } else { - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => '<' - ) - ); - - $this->state = 'data'; - } - break; - - case self::PCDATA: - // If the content model flag is set to the PCDATA state - // Consume the next input character: - $this->char++; - $char = $this->char(); - - if ($char === '!') { - /* U+0021 EXCLAMATION MARK (!) - Switch to the markup declaration open state. */ - $this->state = 'markupDeclarationOpen'; - - } elseif ($char === '/') { - /* U+002F SOLIDUS (/) - Switch to the close tag open state. */ - $this->state = 'closeTagOpen'; - - } elseif (preg_match('/^[A-Za-z]$/', $char)) { - /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z - Create a new start tag token, set its tag name to the lowercase - version of the input character (add 0x0020 to the character's code - point), then switch to the tag name state. (Don't emit the token - yet; further details will be filled in before it is emitted.) */ - $this->token = array( - 'name' => strtolower($char), - 'type' => self::STARTTAG, - 'attr' => array() - ); - - $this->state = 'tagName'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Parse error. Emit a U+003C LESS-THAN SIGN character token and a - U+003E GREATER-THAN SIGN character token. Switch to the data state. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => '<>' - ) - ); - - $this->state = 'data'; - - } elseif ($char === '?') { - /* U+003F QUESTION MARK (?) - Parse error. Switch to the bogus comment state. */ - $this->state = 'bogusComment'; - - } else { - /* Anything else - Parse error. Emit a U+003C LESS-THAN SIGN character token and - reconsume the current input character in the data state. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => '<' - ) - ); - - $this->char--; - $this->state = 'data'; - } - break; - } - } - - private function closeTagOpenState() - { - $next_node = strtolower($this->characters('A-Za-z', $this->char + 1)); - $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName; - - if (($this->content_model === self::RCDATA || $this->content_model === self::CDATA) && - (!$the_same || ($the_same && (!preg_match( - '/[\t\n\x0b\x0c >\/]/', - $this->character($this->char + 1 + strlen($next_node)) - ) || $this->EOF === $this->char))) - ) { - /* If the content model flag is set to the RCDATA or CDATA states then - examine the next few characters. If they do not match the tag name of - the last start tag token emitted (case insensitively), or if they do but - they are not immediately followed by one of the following characters: - * U+0009 CHARACTER TABULATION - * U+000A LINE FEED (LF) - * U+000B LINE TABULATION - * U+000C FORM FEED (FF) - * U+0020 SPACE - * U+003E GREATER-THAN SIGN (>) - * U+002F SOLIDUS (/) - * EOF - ...then there is a parse error. Emit a U+003C LESS-THAN SIGN character - token, a U+002F SOLIDUS character token, and switch to the data state - to process the next input character. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => 'state = 'data'; - - } else { - /* Otherwise, if the content model flag is set to the PCDATA state, - or if the next few characters do match that tag name, consume the - next input character: */ - $this->char++; - $char = $this->char(); - - if (preg_match('/^[A-Za-z]$/', $char)) { - /* U+0041 LATIN LETTER A through to U+005A LATIN LETTER Z - Create a new end tag token, set its tag name to the lowercase version - of the input character (add 0x0020 to the character's code point), then - switch to the tag name state. (Don't emit the token yet; further details - will be filled in before it is emitted.) */ - $this->token = array( - 'name' => strtolower($char), - 'type' => self::ENDTAG - ); - - $this->state = 'tagName'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Parse error. Switch to the data state. */ - $this->state = 'data'; - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit a U+003C LESS-THAN SIGN character token and a U+002F - SOLIDUS character token. Reconsume the EOF character in the data state. */ - $this->emitToken( - array( - 'type' => self::CHARACTR, - 'data' => 'char--; - $this->state = 'data'; - - } else { - /* Parse error. Switch to the bogus comment state. */ - $this->state = 'bogusComment'; - } - } - } - - private function tagNameState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } elseif ($char === '/') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } else { - /* Anything else - Append the current input character to the current tag token's tag name. - Stay in the tag name state. */ - $this->token['name'] .= strtolower($char); - $this->state = 'tagName'; - } - } - - private function beforeAttributeNameState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($char === '/') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Stay in the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Start a new attribute in the current tag token. Set that attribute's - name to the current input character, and its value to the empty string. - Switch to the attribute name state. */ - $this->token['attr'][] = array( - 'name' => strtolower($char), - 'value' => null - ); - - $this->state = 'attributeName'; - } - } - - private function attributeNameState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute name state. */ - $this->state = 'afterAttributeName'; - - } elseif ($char === '=') { - /* U+003D EQUALS SIGN (=) - Switch to the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($char === '/' && $this->character($this->char + 1) !== '>') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the before - attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's name. - Stay in the attribute name state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['name'] .= strtolower($char); - - $this->state = 'attributeName'; - } - } - - private function afterAttributeNameState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the after attribute name state. */ - $this->state = 'afterAttributeName'; - - } elseif ($char === '=') { - /* U+003D EQUALS SIGN (=) - Switch to the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($char === '/' && $this->character($this->char + 1) !== '>') { - /* U+002F SOLIDUS (/) - Parse error unless this is a permitted slash. Switch to the - before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the EOF - character in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Start a new attribute in the current tag token. Set that attribute's - name to the current input character, and its value to the empty string. - Switch to the attribute name state. */ - $this->token['attr'][] = array( - 'name' => strtolower($char), - 'value' => null - ); - - $this->state = 'attributeName'; - } - } - - private function beforeAttributeValueState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Stay in the before attribute value state. */ - $this->state = 'beforeAttributeValue'; - - } elseif ($char === '"') { - /* U+0022 QUOTATION MARK (") - Switch to the attribute value (double-quoted) state. */ - $this->state = 'attributeValueDoubleQuoted'; - - } elseif ($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the attribute value (unquoted) state and reconsume - this input character. */ - $this->char--; - $this->state = 'attributeValueUnquoted'; - - } elseif ($char === '\'') { - /* U+0027 APOSTROPHE (') - Switch to the attribute value (single-quoted) state. */ - $this->state = 'attributeValueSingleQuoted'; - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Switch to the attribute value (unquoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueUnquoted'; - } - } - - private function attributeValueDoubleQuotedState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if ($char === '"') { - /* U+0022 QUOTATION MARK (") - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState('double'); - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the character - in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (double-quoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueDoubleQuoted'; - } - } - - private function attributeValueSingleQuotedState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if ($char === '\'') { - /* U+0022 QUOTATION MARK (') - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState('single'); - - } elseif ($this->char === $this->EOF) { - /* EOF - Parse error. Emit the current tag token. Reconsume the character - in the data state. */ - $this->emitToken($this->token); - - $this->char--; - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (single-quoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueSingleQuoted'; - } - } - - private function attributeValueUnquotedState() - { - // Consume the next input character: - $this->char++; - $char = $this->character($this->char); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - /* U+0009 CHARACTER TABULATION - U+000A LINE FEED (LF) - U+000B LINE TABULATION - U+000C FORM FEED (FF) - U+0020 SPACE - Switch to the before attribute name state. */ - $this->state = 'beforeAttributeName'; - - } elseif ($char === '&') { - /* U+0026 AMPERSAND (&) - Switch to the entity in attribute value state. */ - $this->entityInAttributeValueState(); - - } elseif ($char === '>') { - /* U+003E GREATER-THAN SIGN (>) - Emit the current tag token. Switch to the data state. */ - $this->emitToken($this->token); - $this->state = 'data'; - - } else { - /* Anything else - Append the current input character to the current attribute's value. - Stay in the attribute value (unquoted) state. */ - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - - $this->state = 'attributeValueUnquoted'; - } - } - - private function entityInAttributeValueState() - { - // Attempt to consume an entity. - $entity = $this->entity(); - - // If nothing is returned, append a U+0026 AMPERSAND character to the - // current attribute's value. Otherwise, emit the character token that - // was returned. - $char = (!$entity) - ? '&' - : $entity; - - $last = count($this->token['attr']) - 1; - $this->token['attr'][$last]['value'] .= $char; - } - - private function bogusCommentState() - { - /* Consume every character up to the first U+003E GREATER-THAN SIGN - character (>) or the end of the file (EOF), whichever comes first. Emit - a comment token whose data is the concatenation of all the characters - starting from and including the character that caused the state machine - to switch into the bogus comment state, up to and including the last - consumed character before the U+003E character, if any, or up to the - end of the file otherwise. (If the comment was started by the end of - the file (EOF), the token is empty.) */ - $data = $this->characters('^>', $this->char); - $this->emitToken( - array( - 'data' => $data, - 'type' => self::COMMENT - ) - ); - - $this->char += strlen($data); - - /* Switch to the data state. */ - $this->state = 'data'; - - /* If the end of the file was reached, reconsume the EOF character. */ - if ($this->char === $this->EOF) { - $this->char = $this->EOF - 1; - } - } - - private function markupDeclarationOpenState() - { - /* If the next two characters are both U+002D HYPHEN-MINUS (-) - characters, consume those two characters, create a comment token whose - data is the empty string, and switch to the comment state. */ - if ($this->character($this->char + 1, 2) === '--') { - $this->char += 2; - $this->state = 'comment'; - $this->token = array( - 'data' => null, - 'type' => self::COMMENT - ); - - /* Otherwise if the next seven chacacters are a case-insensitive match - for the word "DOCTYPE", then consume those characters and switch to the - DOCTYPE state. */ - } elseif (strtolower($this->character($this->char + 1, 7)) === 'doctype') { - $this->char += 7; - $this->state = 'doctype'; - - /* Otherwise, is is a parse error. Switch to the bogus comment state. - The next character that is consumed, if any, is the first character - that will be in the comment. */ - } else { - $this->char++; - $this->state = 'bogusComment'; - } - } - - private function commentState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - /* U+002D HYPHEN-MINUS (-) */ - if ($char === '-') { - /* Switch to the comment dash state */ - $this->state = 'commentDash'; - - /* EOF */ - } elseif ($this->char === $this->EOF) { - /* Parse error. Emit the comment token. Reconsume the EOF character - in the data state. */ - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - /* Anything else */ - } else { - /* Append the input character to the comment token's data. Stay in - the comment state. */ - $this->token['data'] .= $char; - } - } - - private function commentDashState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - /* U+002D HYPHEN-MINUS (-) */ - if ($char === '-') { - /* Switch to the comment end state */ - $this->state = 'commentEnd'; - - /* EOF */ - } elseif ($this->char === $this->EOF) { - /* Parse error. Emit the comment token. Reconsume the EOF character - in the data state. */ - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - /* Anything else */ - } else { - /* Append a U+002D HYPHEN-MINUS (-) character and the input - character to the comment token's data. Switch to the comment state. */ - $this->token['data'] .= '-' . $char; - $this->state = 'comment'; - } - } - - private function commentEndState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if ($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($char === '-') { - $this->token['data'] .= '-'; - - } elseif ($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['data'] .= '--' . $char; - $this->state = 'comment'; - } - } - - private function doctypeState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - $this->state = 'beforeDoctypeName'; - - } else { - $this->char--; - $this->state = 'beforeDoctypeName'; - } - } - - private function beforeDoctypeNameState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - // Stay in the before DOCTYPE name state. - - } elseif (preg_match('/^[a-z]$/', $char)) { - $this->token = array( - 'name' => strtoupper($char), - 'type' => self::DOCTYPE, - 'error' => true - ); - - $this->state = 'doctypeName'; - - } elseif ($char === '>') { - $this->emitToken( - array( - 'name' => null, - 'type' => self::DOCTYPE, - 'error' => true - ) - ); - - $this->state = 'data'; - - } elseif ($this->char === $this->EOF) { - $this->emitToken( - array( - 'name' => null, - 'type' => self::DOCTYPE, - 'error' => true - ) - ); - - $this->char--; - $this->state = 'data'; - - } else { - $this->token = array( - 'name' => $char, - 'type' => self::DOCTYPE, - 'error' => true - ); - - $this->state = 'doctypeName'; - } - } - - private function doctypeNameState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - $this->state = 'AfterDoctypeName'; - - } elseif ($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif (preg_match('/^[a-z]$/', $char)) { - $this->token['name'] .= strtoupper($char); - - } elseif ($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['name'] .= $char; - } - - $this->token['error'] = ($this->token['name'] === 'HTML') - ? false - : true; - } - - private function afterDoctypeNameState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if (preg_match('/^[\t\n\x0b\x0c ]$/', $char)) { - // Stay in the DOCTYPE name state. - - } elseif ($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - $this->token['error'] = true; - $this->state = 'bogusDoctype'; - } - } - - private function bogusDoctypeState() - { - /* Consume the next input character: */ - $this->char++; - $char = $this->char(); - - if ($char === '>') { - $this->emitToken($this->token); - $this->state = 'data'; - - } elseif ($this->char === $this->EOF) { - $this->emitToken($this->token); - $this->char--; - $this->state = 'data'; - - } else { - // Stay in the bogus DOCTYPE state. - } - } - - private function entity() - { - $start = $this->char; - - // This section defines how to consume an entity. This definition is - // used when parsing entities in text and in attributes. - - // The behaviour depends on the identity of the next character (the - // one immediately after the U+0026 AMPERSAND character): - - switch ($this->character($this->char + 1)) { - // U+0023 NUMBER SIGN (#) - case '#': - - // The behaviour further depends on the character after the - // U+0023 NUMBER SIGN: - switch ($this->character($this->char + 1)) { - // U+0078 LATIN SMALL LETTER X - // U+0058 LATIN CAPITAL LETTER X - case 'x': - case 'X': - // Follow the steps below, but using the range of - // characters U+0030 DIGIT ZERO through to U+0039 DIGIT - // NINE, U+0061 LATIN SMALL LETTER A through to U+0066 - // LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER - // A, through to U+0046 LATIN CAPITAL LETTER F (in other - // words, 0-9, A-F, a-f). - $char = 1; - $char_class = '0-9A-Fa-f'; - break; - - // Anything else - default: - // Follow the steps below, but using the range of - // characters U+0030 DIGIT ZERO through to U+0039 DIGIT - // NINE (i.e. just 0-9). - $char = 0; - $char_class = '0-9'; - break; - } - - // Consume as many characters as match the range of characters - // given above. - $this->char++; - $e_name = $this->characters($char_class, $this->char + $char + 1); - $entity = $this->character($start, $this->char); - $cond = strlen($e_name) > 0; - - // The rest of the parsing happens below. - break; - - // Anything else - default: - // Consume the maximum number of characters possible, with the - // consumed characters case-sensitively matching one of the - // identifiers in the first column of the entities table. - - $e_name = $this->characters('0-9A-Za-z;', $this->char + 1); - $len = strlen($e_name); - - for ($c = 1; $c <= $len; $c++) { - $id = substr($e_name, 0, $c); - $this->char++; - - if (in_array($id, $this->entities)) { - if ($e_name[$c - 1] !== ';') { - if ($c < $len && $e_name[$c] == ';') { - $this->char++; // consume extra semicolon - } - } - $entity = $id; - break; - } - } - - $cond = isset($entity); - // The rest of the parsing happens below. - break; - } - - if (!$cond) { - // If no match can be made, then this is a parse error. No - // characters are consumed, and nothing is returned. - $this->char = $start; - return false; - } - - // Return a character token for the character corresponding to the - // entity name (as given by the second column of the entities table). - return html_entity_decode('&' . rtrim($entity, ';') . ';', ENT_QUOTES, 'UTF-8'); - } - - private function emitToken($token) - { - $emit = $this->tree->emitToken($token); - - if (is_int($emit)) { - $this->content_model = $emit; - - } elseif ($token['type'] === self::ENDTAG) { - $this->content_model = self::PCDATA; - } - } - - private function EOF() - { - $this->state = null; - $this->tree->emitToken( - array( - 'type' => self::EOF - ) - ); - } -} - -class HTML5TreeConstructer -{ - public $stack = array(); - - private $phase; - private $mode; - private $dom; - private $foster_parent = null; - private $a_formatting = array(); - - private $head_pointer = null; - private $form_pointer = null; - - private $scoping = array('button', 'caption', 'html', 'marquee', 'object', 'table', 'td', 'th'); - private $formatting = array( - 'a', - 'b', - 'big', - 'em', - 'font', - 'i', - 'nobr', - 's', - 'small', - 'strike', - 'strong', - 'tt', - 'u' - ); - private $special = array( - 'address', - 'area', - 'base', - 'basefont', - 'bgsound', - 'blockquote', - 'body', - 'br', - 'center', - 'col', - 'colgroup', - 'dd', - 'dir', - 'div', - 'dl', - 'dt', - 'embed', - 'fieldset', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'hr', - 'iframe', - 'image', - 'img', - 'input', - 'isindex', - 'li', - 'link', - 'listing', - 'menu', - 'meta', - 'noembed', - 'noframes', - 'noscript', - 'ol', - 'optgroup', - 'option', - 'p', - 'param', - 'plaintext', - 'pre', - 'script', - 'select', - 'spacer', - 'style', - 'tbody', - 'textarea', - 'tfoot', - 'thead', - 'title', - 'tr', - 'ul', - 'wbr' - ); - - // The different phases. - const INIT_PHASE = 0; - const ROOT_PHASE = 1; - const MAIN_PHASE = 2; - const END_PHASE = 3; - - // The different insertion modes for the main phase. - const BEFOR_HEAD = 0; - const IN_HEAD = 1; - const AFTER_HEAD = 2; - const IN_BODY = 3; - const IN_TABLE = 4; - const IN_CAPTION = 5; - const IN_CGROUP = 6; - const IN_TBODY = 7; - const IN_ROW = 8; - const IN_CELL = 9; - const IN_SELECT = 10; - const AFTER_BODY = 11; - const IN_FRAME = 12; - const AFTR_FRAME = 13; - - // The different types of elements. - const SPECIAL = 0; - const SCOPING = 1; - const FORMATTING = 2; - const PHRASING = 3; - - const MARKER = 0; - - public function __construct() - { - $this->phase = self::INIT_PHASE; - $this->mode = self::BEFOR_HEAD; - $this->dom = new DOMDocument; - - $this->dom->encoding = 'UTF-8'; - $this->dom->preserveWhiteSpace = true; - $this->dom->substituteEntities = true; - $this->dom->strictErrorChecking = false; - } - - // Process tag tokens - public function emitToken($token) - { - switch ($this->phase) { - case self::INIT_PHASE: - return $this->initPhase($token); - break; - case self::ROOT_PHASE: - return $this->rootElementPhase($token); - break; - case self::MAIN_PHASE: - return $this->mainPhase($token); - break; - case self::END_PHASE : - return $this->trailingEndPhase($token); - break; - } - } - - private function initPhase($token) - { - /* Initially, the tree construction stage must handle each token - emitted from the tokenisation stage as follows: */ - - /* A DOCTYPE token that is marked as being in error - A comment token - A start tag token - An end tag token - A character token that is not one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE - An end-of-file token */ - if ((isset($token['error']) && $token['error']) || - $token['type'] === HTML5::COMMENT || - $token['type'] === HTML5::STARTTAG || - $token['type'] === HTML5::ENDTAG || - $token['type'] === HTML5::EOF || - ($token['type'] === HTML5::CHARACTR && isset($token['data']) && - !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) - ) { - /* This specification does not define how to handle this case. In - particular, user agents may ignore the entirety of this specification - altogether for such documents, and instead invoke special parse modes - with a greater emphasis on backwards compatibility. */ - - $this->phase = self::ROOT_PHASE; - return $this->rootElementPhase($token); - - /* A DOCTYPE token marked as being correct */ - } elseif (isset($token['error']) && !$token['error']) { - /* Append a DocumentType node to the Document node, with the name - attribute set to the name given in the DOCTYPE token (which will be - "HTML"), and the other attributes specific to DocumentType objects - set to null, empty lists, or the empty string as appropriate. */ - $doctype = new DOMDocumentType(null, null, 'HTML'); - - /* Then, switch to the root element phase of the tree construction - stage. */ - $this->phase = self::ROOT_PHASE; - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif (isset($token['data']) && preg_match( - '/^[\t\n\x0b\x0c ]+$/', - $token['data'] - ) - ) { - /* Append that character to the Document node. */ - $text = $this->dom->createTextNode($token['data']); - $this->dom->appendChild($text); - } - } - - private function rootElementPhase($token) - { - /* After the initial phase, as each token is emitted from the tokenisation - stage, it must be processed as described in this section. */ - - /* A DOCTYPE token */ - if ($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the Document object with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->dom->appendChild($comment); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append that character to the Document node. */ - $text = $this->dom->createTextNode($token['data']); - $this->dom->appendChild($text); - - /* A character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED - (FF), or U+0020 SPACE - A start tag token - An end tag token - An end-of-file token */ - } elseif (($token['type'] === HTML5::CHARACTR && - !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || - $token['type'] === HTML5::STARTTAG || - $token['type'] === HTML5::ENDTAG || - $token['type'] === HTML5::EOF - ) { - /* Create an HTMLElement node with the tag name html, in the HTML - namespace. Append it to the Document object. Switch to the main - phase and reprocess the current token. */ - $html = $this->dom->createElement('html'); - $this->dom->appendChild($html); - $this->stack[] = $html; - - $this->phase = self::MAIN_PHASE; - return $this->mainPhase($token); - } - } - - private function mainPhase($token) - { - /* Tokens in the main phase must be handled as follows: */ - - /* A DOCTYPE token */ - if ($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A start tag token with the tag name "html" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') { - /* If this start tag token was not the first start tag token, then - it is a parse error. */ - - /* For each attribute on the token, check to see if the attribute - is already present on the top element of the stack of open elements. - If it is not, add the attribute and its corresponding value to that - element. */ - foreach ($token['attr'] as $attr) { - if (!$this->stack[0]->hasAttribute($attr['name'])) { - $this->stack[0]->setAttribute($attr['name'], $attr['value']); - } - } - - /* An end-of-file token */ - } elseif ($token['type'] === HTML5::EOF) { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Anything else. */ - } else { - /* Depends on the insertion mode: */ - switch ($this->mode) { - case self::BEFOR_HEAD: - return $this->beforeHead($token); - break; - case self::IN_HEAD: - return $this->inHead($token); - break; - case self::AFTER_HEAD: - return $this->afterHead($token); - break; - case self::IN_BODY: - return $this->inBody($token); - break; - case self::IN_TABLE: - return $this->inTable($token); - break; - case self::IN_CAPTION: - return $this->inCaption($token); - break; - case self::IN_CGROUP: - return $this->inColumnGroup($token); - break; - case self::IN_TBODY: - return $this->inTableBody($token); - break; - case self::IN_ROW: - return $this->inRow($token); - break; - case self::IN_CELL: - return $this->inCell($token); - break; - case self::IN_SELECT: - return $this->inSelect($token); - break; - case self::AFTER_BODY: - return $this->afterBody($token); - break; - case self::IN_FRAME: - return $this->inFrameset($token); - break; - case self::AFTR_FRAME: - return $this->afterFrameset($token); - break; - case self::END_PHASE: - return $this->trailingEndPhase($token); - break; - } - } - } - - private function beforeHead($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token with the tag name "head" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') { - /* Create an element for the token, append the new element to the - current node and push it onto the stack of open elements. */ - $element = $this->insertElement($token); - - /* Set the head element pointer to this new element node. */ - $this->head_pointer = $element; - - /* Change the insertion mode to "in head". */ - $this->mode = self::IN_HEAD; - - /* A start tag token whose tag name is one of: "base", "link", "meta", - "script", "style", "title". Or an end tag with the tag name "html". - Or a character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. Or any other start tag token */ - } elseif ($token['type'] === HTML5::STARTTAG || - ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') || - ($token['type'] === HTML5::CHARACTR && !preg_match( - '/^[\t\n\x0b\x0c ]$/', - $token['data'] - )) - ) { - /* Act as if a start tag token with the tag name "head" and no - attributes had been seen, then reprocess the current token. */ - $this->beforeHead( - array( - 'name' => 'head', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - return $this->inHead($token); - - /* Any other end tag */ - } elseif ($token['type'] === HTML5::ENDTAG) { - /* Parse error. Ignore the token. */ - } - } - - private function inHead($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. - - THIS DIFFERS FROM THE SPEC: If the current node is either a title, style - or script element, append the character to the current node regardless - of its content. */ - if (($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || ( - $token['type'] === HTML5::CHARACTR && in_array( - end($this->stack)->nodeName, - array('title', 'style', 'script') - )) - ) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - } elseif ($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('title', 'style', 'script')) - ) { - array_pop($this->stack); - return HTML5::PCDATA; - - /* A start tag with the tag name "title" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'title') { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if ($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - } else { - $element = $this->insertElement($token); - } - - /* Switch the tokeniser's content model flag to the RCDATA state. */ - return HTML5::RCDATA; - - /* A start tag with the tag name "style" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'style') { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if ($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - } else { - $this->insertElement($token); - } - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - - /* A start tag with the tag name "script" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'script') { - /* Create an element for the token. */ - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - - /* A start tag with the tag name "base", "link", or "meta" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array('base', 'link', 'meta') - ) - ) { - /* Create an element for the token and append the new element to the - node pointed to by the head element pointer, or, if that is null - (innerHTML case), to the current node. */ - if ($this->head_pointer !== null) { - $element = $this->insertElement($token, false); - $this->head_pointer->appendChild($element); - array_pop($this->stack); - - } else { - $this->insertElement($token); - } - - /* An end tag with the tag name "head" */ - } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'head') { - /* If the current node is a head element, pop the current node off - the stack of open elements. */ - if ($this->head_pointer->isSameNode(end($this->stack))) { - array_pop($this->stack); - - /* Otherwise, this is a parse error. */ - } else { - // k - } - - /* Change the insertion mode to "after head". */ - $this->mode = self::AFTER_HEAD; - - /* A start tag with the tag name "head" or an end tag except "html". */ - } elseif (($token['type'] === HTML5::STARTTAG && $token['name'] === 'head') || - ($token['type'] === HTML5::ENDTAG && $token['name'] !== 'html') - ) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* If the current node is a head element, act as if an end tag - token with the tag name "head" had been seen. */ - if ($this->head_pointer->isSameNode(end($this->stack))) { - $this->inHead( - array( - 'name' => 'head', - 'type' => HTML5::ENDTAG - ) - ); - - /* Otherwise, change the insertion mode to "after head". */ - } else { - $this->mode = self::AFTER_HEAD; - } - - /* Then, reprocess the current token. */ - return $this->afterHead($token); - } - } - - private function afterHead($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data attribute - set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token with the tag name "body" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'body') { - /* Insert a body element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in body". */ - $this->mode = self::IN_BODY; - - /* A start tag token with the tag name "frameset" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'frameset') { - /* Insert a frameset element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in frameset". */ - $this->mode = self::IN_FRAME; - - /* A start tag token whose tag name is one of: "base", "link", "meta", - "script", "style", "title" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array('base', 'link', 'meta', 'script', 'style', 'title') - ) - ) { - /* Parse error. Switch the insertion mode back to "in head" and - reprocess the token. */ - $this->mode = self::IN_HEAD; - return $this->inHead($token); - - /* Anything else */ - } else { - /* Act as if a start tag token with the tag name "body" and no - attributes had been seen, and then reprocess the current token. */ - $this->afterHead( - array( - 'name' => 'body', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - return $this->inBody($token); - } - } - - private function inBody($token) - { - /* Handle the token as follows: */ - - switch ($token['type']) { - /* A character token */ - case HTML5::CHARACTR: - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Append the token's character to the current node. */ - $this->insertText($token['data']); - break; - - /* A comment token */ - case HTML5::COMMENT: - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - break; - - case HTML5::STARTTAG: - switch ($token['name']) { - /* A start tag token whose tag name is one of: "script", - "style" */ - case 'script': - case 'style': - /* Process the token as if the insertion mode had been "in - head". */ - return $this->inHead($token); - break; - - /* A start tag token whose tag name is one of: "base", "link", - "meta", "title" */ - case 'base': - case 'link': - case 'meta': - case 'title': - /* Parse error. Process the token as if the insertion mode - had been "in head". */ - return $this->inHead($token); - break; - - /* A start tag token with the tag name "body" */ - case 'body': - /* Parse error. If the second element on the stack of open - elements is not a body element, or, if the stack of open - elements has only one node on it, then ignore the token. - (innerHTML case) */ - if (count($this->stack) === 1 || $this->stack[1]->nodeName !== 'body') { - // Ignore - - /* Otherwise, for each attribute on the token, check to see - if the attribute is already present on the body element (the - second element) on the stack of open elements. If it is not, - add the attribute and its corresponding value to that - element. */ - } else { - foreach ($token['attr'] as $attr) { - if (!$this->stack[1]->hasAttribute($attr['name'])) { - $this->stack[1]->setAttribute($attr['name'], $attr['value']); - } - } - } - break; - - /* A start tag whose tag name is one of: "address", - "blockquote", "center", "dir", "div", "dl", "fieldset", - "listing", "menu", "ol", "p", "ul" */ - case 'address': - case 'blockquote': - case 'center': - case 'dir': - case 'div': - case 'dl': - case 'fieldset': - case 'listing': - case 'menu': - case 'ol': - case 'p': - case 'ul': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - break; - - /* A start tag whose tag name is "form" */ - case 'form': - /* If the form element pointer is not null, ignore the - token with a parse error. */ - if ($this->form_pointer !== null) { - // Ignore. - - /* Otherwise: */ - } else { - /* If the stack of open elements has a p element in - scope, then act as if an end tag with the tag name p - had been seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token, and set the - form element pointer to point to the element created. */ - $element = $this->insertElement($token); - $this->form_pointer = $element; - } - break; - - /* A start tag whose tag name is "li", "dd" or "dt" */ - case 'li': - case 'dd': - case 'dt': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - $stack_length = count($this->stack) - 1; - - for ($n = $stack_length; 0 <= $n; $n--) { - /* 1. Initialise node to be the current node (the - bottommost node of the stack). */ - $stop = false; - $node = $this->stack[$n]; - $cat = $this->getElementCategory($node->tagName); - - /* 2. If node is an li, dd or dt element, then pop all - the nodes from the current node up to node, including - node, then stop this algorithm. */ - if ($token['name'] === $node->tagName || ($token['name'] !== 'li' - && ($node->tagName === 'dd' || $node->tagName === 'dt')) - ) { - for ($x = $stack_length; $x >= $n; $x--) { - array_pop($this->stack); - } - - break; - } - - /* 3. If node is not in the formatting category, and is - not in the phrasing category, and is not an address or - div element, then stop this algorithm. */ - if ($cat !== self::FORMATTING && $cat !== self::PHRASING && - $node->tagName !== 'address' && $node->tagName !== 'div' - ) { - break; - } - } - - /* Finally, insert an HTML element with the same tag - name as the token's. */ - $this->insertElement($token); - break; - - /* A start tag token whose tag name is "plaintext" */ - case 'plaintext': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been - seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - return HTML5::PLAINTEXT; - break; - - /* A start tag whose tag name is one of: "h1", "h2", "h3", "h4", - "h5", "h6" */ - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* If the stack of open elements has in scope an element whose - tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then - this is a parse error; pop elements from the stack until an - element with one of those tag names has been popped from the - stack. */ - while ($this->elementInScope(array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))) { - array_pop($this->stack); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - break; - - /* A start tag whose tag name is "a" */ - case 'a': - /* If the list of active formatting elements contains - an element whose tag name is "a" between the end of the - list and the last marker on the list (or the start of - the list if there is no marker on the list), then this - is a parse error; act as if an end tag with the tag name - "a" had been seen, then remove that element from the list - of active formatting elements and the stack of open - elements if the end tag didn't already remove it (it - might not have if the element is not in table scope). */ - $leng = count($this->a_formatting); - - for ($n = $leng - 1; $n >= 0; $n--) { - if ($this->a_formatting[$n] === self::MARKER) { - break; - - } elseif ($this->a_formatting[$n]->nodeName === 'a') { - $this->emitToken( - array( - 'name' => 'a', - 'type' => HTML5::ENDTAG - ) - ); - break; - } - } - - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $el = $this->insertElement($token); - - /* Add that element to the list of active formatting - elements. */ - $this->a_formatting[] = $el; - break; - - /* A start tag whose tag name is one of: "b", "big", "em", "font", - "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ - case 'b': - case 'big': - case 'em': - case 'font': - case 'i': - case 'nobr': - case 's': - case 'small': - case 'strike': - case 'strong': - case 'tt': - case 'u': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $el = $this->insertElement($token); - - /* Add that element to the list of active formatting - elements. */ - $this->a_formatting[] = $el; - break; - - /* A start tag token whose tag name is "button" */ - case 'button': - /* If the stack of open elements has a button element in scope, - then this is a parse error; act as if an end tag with the tag - name "button" had been seen, then reprocess the token. (We don't - do that. Unnecessary.) */ - if ($this->elementInScope('button')) { - $this->inBody( - array( - 'name' => 'button', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - break; - - /* A start tag token whose tag name is one of: "marquee", "object" */ - case 'marquee': - case 'object': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - break; - - /* A start tag token whose tag name is "xmp" */ - case 'xmp': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Switch the content model flag to the CDATA state. */ - return HTML5::CDATA; - break; - - /* A start tag whose tag name is "table" */ - case 'table': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in table". */ - $this->mode = self::IN_TABLE; - break; - - /* A start tag whose tag name is one of: "area", "basefont", - "bgsound", "br", "embed", "img", "param", "spacer", "wbr" */ - case 'area': - case 'basefont': - case 'bgsound': - case 'br': - case 'embed': - case 'img': - case 'param': - case 'spacer': - case 'wbr': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "hr" */ - case 'hr': - /* If the stack of open elements has a p element in scope, - then act as if an end tag with the tag name p had been seen. */ - if ($this->elementInScope('p')) { - $this->emitToken( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "image" */ - case 'image': - /* Parse error. Change the token's tag name to "img" and - reprocess it. (Don't ask.) */ - $token['name'] = 'img'; - return $this->inBody($token); - break; - - /* A start tag whose tag name is "input" */ - case 'input': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an input element for the token. */ - $element = $this->insertElement($token, false); - - /* If the form element pointer is not null, then associate the - input element with the form element pointed to by the form - element pointer. */ - $this->form_pointer !== null - ? $this->form_pointer->appendChild($element) - : end($this->stack)->appendChild($element); - - /* Pop that input element off the stack of open elements. */ - array_pop($this->stack); - break; - - /* A start tag whose tag name is "isindex" */ - case 'isindex': - /* Parse error. */ - // w/e - - /* If the form element pointer is not null, - then ignore the token. */ - if ($this->form_pointer === null) { - /* Act as if a start tag token with the tag name "form" had - been seen. */ - $this->inBody( - array( - 'name' => 'body', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - /* Act as if a start tag token with the tag name "hr" had - been seen. */ - $this->inBody( - array( - 'name' => 'hr', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - /* Act as if a start tag token with the tag name "p" had - been seen. */ - $this->inBody( - array( - 'name' => 'p', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - /* Act as if a start tag token with the tag name "label" - had been seen. */ - $this->inBody( - array( - 'name' => 'label', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - /* Act as if a stream of character tokens had been seen. */ - $this->insertText( - 'This is a searchable index. ' . - 'Insert your search keywords here: ' - ); - - /* Act as if a start tag token with the tag name "input" - had been seen, with all the attributes from the "isindex" - token, except with the "name" attribute set to the value - "isindex" (ignoring any explicit "name" attribute). */ - $attr = $token['attr']; - $attr[] = array('name' => 'name', 'value' => 'isindex'); - - $this->inBody( - array( - 'name' => 'input', - 'type' => HTML5::STARTTAG, - 'attr' => $attr - ) - ); - - /* Act as if a stream of character tokens had been seen - (see below for what they should say). */ - $this->insertText( - 'This is a searchable index. ' . - 'Insert your search keywords here: ' - ); - - /* Act as if an end tag token with the tag name "label" - had been seen. */ - $this->inBody( - array( - 'name' => 'label', - 'type' => HTML5::ENDTAG - ) - ); - - /* Act as if an end tag token with the tag name "p" had - been seen. */ - $this->inBody( - array( - 'name' => 'p', - 'type' => HTML5::ENDTAG - ) - ); - - /* Act as if a start tag token with the tag name "hr" had - been seen. */ - $this->inBody( - array( - 'name' => 'hr', - 'type' => HTML5::ENDTAG - ) - ); - - /* Act as if an end tag token with the tag name "form" had - been seen. */ - $this->inBody( - array( - 'name' => 'form', - 'type' => HTML5::ENDTAG - ) - ); - } - break; - - /* A start tag whose tag name is "textarea" */ - case 'textarea': - $this->insertElement($token); - - /* Switch the tokeniser's content model flag to the - RCDATA state. */ - return HTML5::RCDATA; - break; - - /* A start tag whose tag name is one of: "iframe", "noembed", - "noframes" */ - case 'iframe': - case 'noembed': - case 'noframes': - $this->insertElement($token); - - /* Switch the tokeniser's content model flag to the CDATA state. */ - return HTML5::CDATA; - break; - - /* A start tag whose tag name is "select" */ - case 'select': - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Change the insertion mode to "in select". */ - $this->mode = self::IN_SELECT; - break; - - /* A start or end tag whose tag name is one of: "caption", "col", - "colgroup", "frame", "frameset", "head", "option", "optgroup", - "tbody", "td", "tfoot", "th", "thead", "tr". */ - case 'caption': - case 'col': - case 'colgroup': - case 'frame': - case 'frameset': - case 'head': - case 'option': - case 'optgroup': - case 'tbody': - case 'td': - case 'tfoot': - case 'th': - case 'thead': - case 'tr': - // Parse error. Ignore the token. - break; - - /* A start or end tag whose tag name is one of: "event-source", - "section", "nav", "article", "aside", "header", "footer", - "datagrid", "command" */ - case 'event-source': - case 'section': - case 'nav': - case 'article': - case 'aside': - case 'header': - case 'footer': - case 'datagrid': - case 'command': - // Work in progress! - break; - - /* A start tag token not covered by the previous entries */ - default: - /* Reconstruct the active formatting elements, if any. */ - $this->reconstructActiveFormattingElements(); - - $this->insertElement($token, true, true); - break; - } - break; - - case HTML5::ENDTAG: - switch ($token['name']) { - /* An end tag with the tag name "body" */ - case 'body': - /* If the second element in the stack of open elements is - not a body element, this is a parse error. Ignore the token. - (innerHTML case) */ - if (count($this->stack) < 2 || $this->stack[1]->nodeName !== 'body') { - // Ignore. - - /* If the current node is not the body element, then this - is a parse error. */ - } elseif (end($this->stack)->nodeName !== 'body') { - // Parse error. - } - - /* Change the insertion mode to "after body". */ - $this->mode = self::AFTER_BODY; - break; - - /* An end tag with the tag name "html" */ - case 'html': - /* Act as if an end tag with tag name "body" had been seen, - then, if that token wasn't ignored, reprocess the current - token. */ - $this->inBody( - array( - 'name' => 'body', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->afterBody($token); - break; - - /* An end tag whose tag name is one of: "address", "blockquote", - "center", "dir", "div", "dl", "fieldset", "listing", "menu", - "ol", "pre", "ul" */ - case 'address': - case 'blockquote': - case 'center': - case 'dir': - case 'div': - case 'dl': - case 'fieldset': - case 'listing': - case 'menu': - case 'ol': - case 'pre': - case 'ul': - /* If the stack of open elements has an element in scope - with the same tag name as that of the token, then generate - implied end tags. */ - if ($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with - the same tag name as that of the token, then this - is a parse error. */ - // w/e - - /* If the stack of open elements has an element in - scope with the same tag name as that of the token, - then pop elements from this stack until an element - with that tag name has been popped from the stack. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is "form" */ - case 'form': - /* If the stack of open elements has an element in scope - with the same tag name as that of the token, then generate - implied end tags. */ - if ($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - } - - if (end($this->stack)->nodeName !== $token['name']) { - /* Now, if the current node is not an element with the - same tag name as that of the token, then this is a parse - error. */ - // w/e - - } else { - /* Otherwise, if the current node is an element with - the same tag name as that of the token pop that element - from the stack. */ - array_pop($this->stack); - } - - /* In any case, set the form element pointer to null. */ - $this->form_pointer = null; - break; - - /* An end tag whose tag name is "p" */ - case 'p': - /* If the stack of open elements has a p element in scope, - then generate implied end tags, except for p elements. */ - if ($this->elementInScope('p')) { - $this->generateImpliedEndTags(array('p')); - - /* If the current node is not a p element, then this is - a parse error. */ - // k - - /* If the stack of open elements has a p element in - scope, then pop elements from this stack until the stack - no longer has a p element in scope. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->elementInScope('p')) { - array_pop($this->stack); - - } else { - break; - } - } - } - break; - - /* An end tag whose tag name is "dd", "dt", or "li" */ - case 'dd': - case 'dt': - case 'li': - /* If the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then - generate implied end tags, except for elements with the - same tag name as the token. */ - if ($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(array($token['name'])); - - /* If the current node is not an element with the same - tag name as the token, then this is a parse error. */ - // w/e - - /* If the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then - pop elements from this stack until an element with that - tag name has been popped from the stack. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is one of: "h1", "h2", "h3", "h4", - "h5", "h6" */ - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - $elements = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'); - - /* If the stack of open elements has in scope an element whose - tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then - generate implied end tags. */ - if ($this->elementInScope($elements)) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with the same - tag name as that of the token, then this is a parse error. */ - // w/e - - /* If the stack of open elements has in scope an element - whose tag name is one of "h1", "h2", "h3", "h4", "h5", or - "h6", then pop elements from the stack until an element - with one of those tag names has been popped from the stack. */ - while ($this->elementInScope($elements)) { - array_pop($this->stack); - } - } - break; - - /* An end tag whose tag name is one of: "a", "b", "big", "em", - "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u" */ - case 'a': - case 'b': - case 'big': - case 'em': - case 'font': - case 'i': - case 'nobr': - case 's': - case 'small': - case 'strike': - case 'strong': - case 'tt': - case 'u': - /* 1. Let the formatting element be the last element in - the list of active formatting elements that: - * is between the end of the list and the last scope - marker in the list, if any, or the start of the list - otherwise, and - * has the same tag name as the token. - */ - while (true) { - for ($a = count($this->a_formatting) - 1; $a >= 0; $a--) { - if ($this->a_formatting[$a] === self::MARKER) { - break; - - } elseif ($this->a_formatting[$a]->tagName === $token['name']) { - $formatting_element = $this->a_formatting[$a]; - $in_stack = in_array($formatting_element, $this->stack, true); - $fe_af_pos = $a; - break; - } - } - - /* If there is no such node, or, if that node is - also in the stack of open elements but the element - is not in scope, then this is a parse error. Abort - these steps. The token is ignored. */ - if (!isset($formatting_element) || ($in_stack && - !$this->elementInScope($token['name'])) - ) { - break; - - /* Otherwise, if there is such a node, but that node - is not in the stack of open elements, then this is a - parse error; remove the element from the list, and - abort these steps. */ - } elseif (isset($formatting_element) && !$in_stack) { - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - break; - } - - /* 2. Let the furthest block be the topmost node in the - stack of open elements that is lower in the stack - than the formatting element, and is not an element in - the phrasing or formatting categories. There might - not be one. */ - $fe_s_pos = array_search($formatting_element, $this->stack, true); - $length = count($this->stack); - - for ($s = $fe_s_pos + 1; $s < $length; $s++) { - $category = $this->getElementCategory($this->stack[$s]->nodeName); - - if ($category !== self::PHRASING && $category !== self::FORMATTING) { - $furthest_block = $this->stack[$s]; - } - } - - /* 3. If there is no furthest block, then the UA must - skip the subsequent steps and instead just pop all - the nodes from the bottom of the stack of open - elements, from the current node up to the formatting - element, and remove the formatting element from the - list of active formatting elements. */ - if (!isset($furthest_block)) { - for ($n = $length - 1; $n >= $fe_s_pos; $n--) { - array_pop($this->stack); - } - - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - break; - } - - /* 4. Let the common ancestor be the element - immediately above the formatting element in the stack - of open elements. */ - $common_ancestor = $this->stack[$fe_s_pos - 1]; - - /* 5. If the furthest block has a parent node, then - remove the furthest block from its parent node. */ - if ($furthest_block->parentNode !== null) { - $furthest_block->parentNode->removeChild($furthest_block); - } - - /* 6. Let a bookmark note the position of the - formatting element in the list of active formatting - elements relative to the elements on either side - of it in the list. */ - $bookmark = $fe_af_pos; - - /* 7. Let node and last node be the furthest block. - Follow these steps: */ - $node = $furthest_block; - $last_node = $furthest_block; - - while (true) { - for ($n = array_search($node, $this->stack, true) - 1; $n >= 0; $n--) { - /* 7.1 Let node be the element immediately - prior to node in the stack of open elements. */ - $node = $this->stack[$n]; - - /* 7.2 If node is not in the list of active - formatting elements, then remove node from - the stack of open elements and then go back - to step 1. */ - if (!in_array($node, $this->a_formatting, true)) { - unset($this->stack[$n]); - $this->stack = array_merge($this->stack); - - } else { - break; - } - } - - /* 7.3 Otherwise, if node is the formatting - element, then go to the next step in the overall - algorithm. */ - if ($node === $formatting_element) { - break; - - /* 7.4 Otherwise, if last node is the furthest - block, then move the aforementioned bookmark to - be immediately after the node in the list of - active formatting elements. */ - } elseif ($last_node === $furthest_block) { - $bookmark = array_search($node, $this->a_formatting, true) + 1; - } - - /* 7.5 If node has any children, perform a - shallow clone of node, replace the entry for - node in the list of active formatting elements - with an entry for the clone, replace the entry - for node in the stack of open elements with an - entry for the clone, and let node be the clone. */ - if ($node->hasChildNodes()) { - $clone = $node->cloneNode(); - $s_pos = array_search($node, $this->stack, true); - $a_pos = array_search($node, $this->a_formatting, true); - - $this->stack[$s_pos] = $clone; - $this->a_formatting[$a_pos] = $clone; - $node = $clone; - } - - /* 7.6 Insert last node into node, first removing - it from its previous parent node if any. */ - if ($last_node->parentNode !== null) { - $last_node->parentNode->removeChild($last_node); - } - - $node->appendChild($last_node); - - /* 7.7 Let last node be node. */ - $last_node = $node; - } - - /* 8. Insert whatever last node ended up being in - the previous step into the common ancestor node, - first removing it from its previous parent node if - any. */ - if ($last_node->parentNode !== null) { - $last_node->parentNode->removeChild($last_node); - } - - $common_ancestor->appendChild($last_node); - - /* 9. Perform a shallow clone of the formatting - element. */ - $clone = $formatting_element->cloneNode(); - - /* 10. Take all of the child nodes of the furthest - block and append them to the clone created in the - last step. */ - while ($furthest_block->hasChildNodes()) { - $child = $furthest_block->firstChild; - $furthest_block->removeChild($child); - $clone->appendChild($child); - } - - /* 11. Append that clone to the furthest block. */ - $furthest_block->appendChild($clone); - - /* 12. Remove the formatting element from the list - of active formatting elements, and insert the clone - into the list of active formatting elements at the - position of the aforementioned bookmark. */ - $fe_af_pos = array_search($formatting_element, $this->a_formatting, true); - unset($this->a_formatting[$fe_af_pos]); - $this->a_formatting = array_merge($this->a_formatting); - - $af_part1 = array_slice($this->a_formatting, 0, $bookmark - 1); - $af_part2 = array_slice($this->a_formatting, $bookmark, count($this->a_formatting)); - $this->a_formatting = array_merge($af_part1, array($clone), $af_part2); - - /* 13. Remove the formatting element from the stack - of open elements, and insert the clone into the stack - of open elements immediately after (i.e. in a more - deeply nested position than) the position of the - furthest block in that stack. */ - $fe_s_pos = array_search($formatting_element, $this->stack, true); - $fb_s_pos = array_search($furthest_block, $this->stack, true); - unset($this->stack[$fe_s_pos]); - - $s_part1 = array_slice($this->stack, 0, $fb_s_pos); - $s_part2 = array_slice($this->stack, $fb_s_pos + 1, count($this->stack)); - $this->stack = array_merge($s_part1, array($clone), $s_part2); - - /* 14. Jump back to step 1 in this series of steps. */ - unset($formatting_element, $fe_af_pos, $fe_s_pos, $furthest_block); - } - break; - - /* An end tag token whose tag name is one of: "button", - "marquee", "object" */ - case 'button': - case 'marquee': - case 'object': - /* If the stack of open elements has an element in scope whose - tag name matches the tag name of the token, then generate implied - tags. */ - if ($this->elementInScope($token['name'])) { - $this->generateImpliedEndTags(); - - /* Now, if the current node is not an element with the same - tag name as the token, then this is a parse error. */ - // k - - /* Now, if the stack of open elements has an element in scope - whose tag name matches the tag name of the token, then pop - elements from the stack until that element has been popped from - the stack, and clear the list of active formatting elements up - to the last marker. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->stack[$n]->nodeName === $token['name']) { - $n = -1; - } - - array_pop($this->stack); - } - - $marker = end(array_keys($this->a_formatting, self::MARKER, true)); - - for ($n = count($this->a_formatting) - 1; $n > $marker; $n--) { - array_pop($this->a_formatting); - } - } - break; - - /* Or an end tag whose tag name is one of: "area", "basefont", - "bgsound", "br", "embed", "hr", "iframe", "image", "img", - "input", "isindex", "noembed", "noframes", "param", "select", - "spacer", "table", "textarea", "wbr" */ - case 'area': - case 'basefont': - case 'bgsound': - case 'br': - case 'embed': - case 'hr': - case 'iframe': - case 'image': - case 'img': - case 'input': - case 'isindex': - case 'noembed': - case 'noframes': - case 'param': - case 'select': - case 'spacer': - case 'table': - case 'textarea': - case 'wbr': - // Parse error. Ignore the token. - break; - - /* An end tag token not covered by the previous entries */ - default: - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - /* Initialise node to be the current node (the bottommost - node of the stack). */ - $node = end($this->stack); - - /* If node has the same tag name as the end tag token, - then: */ - if ($token['name'] === $node->nodeName) { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* If the tag name of the end tag token does not - match the tag name of the current node, this is a - parse error. */ - // k - - /* Pop all the nodes from the current node up to - node, including node, then stop this algorithm. */ - for ($x = count($this->stack) - $n; $x >= $n; $x--) { - array_pop($this->stack); - } - - } else { - $category = $this->getElementCategory($node); - - if ($category !== self::SPECIAL && $category !== self::SCOPING) { - /* Otherwise, if node is in neither the formatting - category nor the phrasing category, then this is a - parse error. Stop this algorithm. The end tag token - is ignored. */ - return false; - } - } - } - break; - } - break; - } - } - - private function inTable($token) - { - $clear = array('html', 'table'); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $text = $this->dom->createTextNode($token['data']); - end($this->stack)->appendChild($text); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - end($this->stack)->appendChild($comment); - - /* A start tag whose tag name is "caption" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'caption' - ) { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert a marker at the end of the list of active - formatting elements. */ - $this->a_formatting[] = self::MARKER; - - /* Insert an HTML element for the token, then switch the - insertion mode to "in caption". */ - $this->insertElement($token); - $this->mode = self::IN_CAPTION; - - /* A start tag whose tag name is "colgroup" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'colgroup' - ) { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the - insertion mode to "in column group". */ - $this->insertElement($token); - $this->mode = self::IN_CGROUP; - - /* A start tag whose tag name is "col" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'col' - ) { - $this->inTable( - array( - 'name' => 'colgroup', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - $this->inColumnGroup($token); - - /* A start tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array('tbody', 'tfoot', 'thead') - ) - ) { - /* Clear the stack back to a table context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the insertion - mode to "in table body". */ - $this->insertElement($token); - $this->mode = self::IN_TBODY; - - /* A start tag whose tag name is one of: "td", "th", "tr" */ - } elseif ($token['type'] === HTML5::STARTTAG && - in_array($token['name'], array('td', 'th', 'tr')) - ) { - /* Act as if a start tag token with the tag name "tbody" had been - seen, then reprocess the current token. */ - $this->inTable( - array( - 'name' => 'tbody', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - return $this->inTableBody($token); - - /* A start tag whose tag name is "table" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'table' - ) { - /* Parse error. Act as if an end tag token with the tag name "table" - had been seen, then, if that token wasn't ignored, reprocess the - current token. */ - $this->inTable( - array( - 'name' => 'table', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->mainPhase($token); - - /* An end tag whose tag name is "table" */ - } elseif ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'table' - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if (!$this->elementInScope($token['name'], true)) { - return false; - - /* Otherwise: */ - } else { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Now, if the current node is not a table element, then this - is a parse error. */ - // w/e - - /* Pop elements from this stack until a table element has been - popped from the stack. */ - while (true) { - $current = end($this->stack)->nodeName; - array_pop($this->stack); - - if ($current === 'table') { - break; - } - } - - /* Reset the insertion mode appropriately. */ - $this->resetInsertionMode(); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array( - 'body', - 'caption', - 'col', - 'colgroup', - 'html', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'tr' - ) - ) - ) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* Parse error. Process the token as if the insertion mode was "in - body", with the following exception: */ - - /* If the current node is a table, tbody, tfoot, thead, or tr - element, then, whenever a node would be inserted into the current - node, it must instead be inserted into the foster parent element. */ - if (in_array( - end($this->stack)->nodeName, - array('table', 'tbody', 'tfoot', 'thead', 'tr') - ) - ) { - /* The foster parent element is the parent element of the last - table element in the stack of open elements, if there is a - table element and it has such a parent element. If there is no - table element in the stack of open elements (innerHTML case), - then the foster parent element is the first element in the - stack of open elements (the html element). Otherwise, if there - is a table element in the stack of open elements, but the last - table element in the stack of open elements has no parent, or - its parent node is not an element, then the foster parent - element is the element before the last table element in the - stack of open elements. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->stack[$n]->nodeName === 'table') { - $table = $this->stack[$n]; - break; - } - } - - if (isset($table) && $table->parentNode !== null) { - $this->foster_parent = $table->parentNode; - - } elseif (!isset($table)) { - $this->foster_parent = $this->stack[0]; - - } elseif (isset($table) && ($table->parentNode === null || - $table->parentNode->nodeType !== XML_ELEMENT_NODE) - ) { - $this->foster_parent = $this->stack[$n - 1]; - } - } - - $this->inBody($token); - } - } - - private function inCaption($token) - { - /* An end tag whose tag name is "caption" */ - if ($token['type'] === HTML5::ENDTAG && $token['name'] === 'caption') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore - - /* Otherwise: */ - } else { - /* Generate implied end tags. */ - $this->generateImpliedEndTags(); - - /* Now, if the current node is not a caption element, then this - is a parse error. */ - // w/e - - /* Pop elements from this stack until a caption element has - been popped from the stack. */ - while (true) { - $node = end($this->stack)->nodeName; - array_pop($this->stack); - - if ($node === 'caption') { - break; - } - } - - /* Clear the list of active formatting elements up to the last - marker. */ - $this->clearTheActiveFormattingElementsUpToTheLastMarker(); - - /* Switch the insertion mode to "in table". */ - $this->mode = self::IN_TABLE; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr", or an end tag whose tag - name is "table" */ - } elseif (($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array( - 'caption', - 'col', - 'colgroup', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'tr' - ) - )) || ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'table') - ) { - /* Parse error. Act as if an end tag with the tag name "caption" - had been seen, then, if that token wasn't ignored, reprocess the - current token. */ - $this->inCaption( - array( - 'name' => 'caption', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->inTable($token); - - /* An end tag whose tag name is one of: "body", "col", "colgroup", - "html", "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array( - 'body', - 'col', - 'colgroup', - 'html', - 'tbody', - 'tfoot', - 'th', - 'thead', - 'tr' - ) - ) - ) { - // Parse error. Ignore the token. - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in body". */ - $this->inBody($token); - } - } - - private function inColumnGroup($token) - { - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $text = $this->dom->createTextNode($token['data']); - end($this->stack)->appendChild($text); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - end($this->stack)->appendChild($comment); - - /* A start tag whose tag name is "col" */ - } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'col') { - /* Insert a col element for the token. Immediately pop the current - node off the stack of open elements. */ - $this->insertElement($token); - array_pop($this->stack); - - /* An end tag whose tag name is "colgroup" */ - } elseif ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'colgroup' - ) { - /* If the current node is the root html element, then this is a - parse error, ignore the token. (innerHTML case) */ - if (end($this->stack)->nodeName === 'html') { - // Ignore - - /* Otherwise, pop the current node (which will be a colgroup - element) from the stack of open elements. Switch the insertion - mode to "in table". */ - } else { - array_pop($this->stack); - $this->mode = self::IN_TABLE; - } - - /* An end tag whose tag name is "col" */ - } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'col') { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Act as if an end tag with the tag name "colgroup" had been seen, - and then, if that token wasn't ignored, reprocess the current token. */ - $this->inColumnGroup( - array( - 'name' => 'colgroup', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->inTable($token); - } - } - - private function inTableBody($token) - { - $clear = array('tbody', 'tfoot', 'thead', 'html'); - - /* A start tag whose tag name is "tr" */ - if ($token['type'] === HTML5::STARTTAG && $token['name'] === 'tr') { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Insert a tr element for the token, then switch the insertion - mode to "in row". */ - $this->insertElement($token); - $this->mode = self::IN_ROW; - - /* A start tag whose tag name is one of: "th", "td" */ - } elseif ($token['type'] === HTML5::STARTTAG && - ($token['name'] === 'th' || $token['name'] === 'td') - ) { - /* Parse error. Act as if a start tag with the tag name "tr" had - been seen, then reprocess the current token. */ - $this->inTableBody( - array( - 'name' => 'tr', - 'type' => HTML5::STARTTAG, - 'attr' => array() - ) - ); - - return $this->inRow($token); - - /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif ($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('tbody', 'tfoot', 'thead')) - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore - - /* Otherwise: */ - } else { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Pop the current node from the stack of open elements. Switch - the insertion mode to "in table". */ - array_pop($this->stack); - $this->mode = self::IN_TABLE; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "tfoot", "thead", or an end tag whose tag name is "table" */ - } elseif (($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'tfoor', 'thead') - )) || - ($token['type'] === HTML5::STARTTAG && $token['name'] === 'table') - ) { - /* If the stack of open elements does not have a tbody, thead, or - tfoot element in table scope, this is a parse error. Ignore the - token. (innerHTML case) */ - if (!$this->elementInScope(array('tbody', 'thead', 'tfoot'), true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Clear the stack back to a table body context. */ - $this->clearStackToTableContext($clear); - - /* Act as if an end tag with the same tag name as the current - node ("tbody", "tfoot", or "thead") had been seen, then - reprocess the current token. */ - $this->inTableBody( - array( - 'name' => end($this->stack)->nodeName, - 'type' => HTML5::ENDTAG - ) - ); - - return $this->mainPhase($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "td", "th", "tr" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr') - ) - ) { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in table". */ - $this->inTable($token); - } - } - - private function inRow($token) - { - $clear = array('tr', 'html'); - - /* A start tag whose tag name is one of: "th", "td" */ - if ($token['type'] === HTML5::STARTTAG && - ($token['name'] === 'th' || $token['name'] === 'td') - ) { - /* Clear the stack back to a table row context. */ - $this->clearStackToTableContext($clear); - - /* Insert an HTML element for the token, then switch the insertion - mode to "in cell". */ - $this->insertElement($token); - $this->mode = self::IN_CELL; - - /* Insert a marker at the end of the list of active formatting - elements. */ - $this->a_formatting[] = self::MARKER; - - /* An end tag whose tag name is "tr" */ - } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'tr') { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Clear the stack back to a table row context. */ - $this->clearStackToTableContext($clear); - - /* Pop the current node (which will be a tr element) from the - stack of open elements. Switch the insertion mode to "in table - body". */ - array_pop($this->stack); - $this->mode = self::IN_TBODY; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "tfoot", "thead", "tr" or an end tag whose tag name is "table" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array('caption', 'col', 'colgroup', 'tbody', 'tfoot', 'thead', 'tr') - ) - ) { - /* Act as if an end tag with the tag name "tr" had been seen, then, - if that token wasn't ignored, reprocess the current token. */ - $this->inRow( - array( - 'name' => 'tr', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->inCell($token); - - /* An end tag whose tag name is one of: "tbody", "tfoot", "thead" */ - } elseif ($token['type'] === HTML5::ENDTAG && - in_array($token['name'], array('tbody', 'tfoot', 'thead')) - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Otherwise, act as if an end tag with the tag name "tr" had - been seen, then reprocess the current token. */ - $this->inRow( - array( - 'name' => 'tr', - 'type' => HTML5::ENDTAG - ) - ); - - return $this->inCell($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html", "td", "th" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array('body', 'caption', 'col', 'colgroup', 'html', 'td', 'th', 'tr') - ) - ) { - /* Parse error. Ignore the token. */ - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in table". */ - $this->inTable($token); - } - } - - private function inCell($token) - { - /* An end tag whose tag name is one of: "td", "th" */ - if ($token['type'] === HTML5::ENDTAG && - ($token['name'] === 'td' || $token['name'] === 'th') - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as that of the token, then this is a - parse error and the token must be ignored. */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise: */ - } else { - /* Generate implied end tags, except for elements with the same - tag name as the token. */ - $this->generateImpliedEndTags(array($token['name'])); - - /* Now, if the current node is not an element with the same tag - name as the token, then this is a parse error. */ - // k - - /* Pop elements from this stack until an element with the same - tag name as the token has been popped from the stack. */ - while (true) { - $node = end($this->stack)->nodeName; - array_pop($this->stack); - - if ($node === $token['name']) { - break; - } - } - - /* Clear the list of active formatting elements up to the last - marker. */ - $this->clearTheActiveFormattingElementsUpToTheLastMarker(); - - /* Switch the insertion mode to "in row". (The current node - will be a tr element at this point.) */ - $this->mode = self::IN_ROW; - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array( - 'caption', - 'col', - 'colgroup', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'tr' - ) - ) - ) { - /* If the stack of open elements does not have a td or th element - in table scope, then this is a parse error; ignore the token. - (innerHTML case) */ - if (!$this->elementInScope(array('td', 'th'), true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* A start tag whose tag name is one of: "caption", "col", "colgroup", - "tbody", "td", "tfoot", "th", "thead", "tr" */ - } elseif ($token['type'] === HTML5::STARTTAG && in_array( - $token['name'], - array( - 'caption', - 'col', - 'colgroup', - 'tbody', - 'td', - 'tfoot', - 'th', - 'thead', - 'tr' - ) - ) - ) { - /* If the stack of open elements does not have a td or th element - in table scope, then this is a parse error; ignore the token. - (innerHTML case) */ - if (!$this->elementInScope(array('td', 'th'), true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* An end tag whose tag name is one of: "body", "caption", "col", - "colgroup", "html" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array('body', 'caption', 'col', 'colgroup', 'html') - ) - ) { - /* Parse error. Ignore the token. */ - - /* An end tag whose tag name is one of: "table", "tbody", "tfoot", - "thead", "tr" */ - } elseif ($token['type'] === HTML5::ENDTAG && in_array( - $token['name'], - array('table', 'tbody', 'tfoot', 'thead', 'tr') - ) - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as that of the token (which can only - happen for "tbody", "tfoot" and "thead", or, in the innerHTML case), - then this is a parse error and the token must be ignored. */ - if (!$this->elementInScope($token['name'], true)) { - // Ignore. - - /* Otherwise, close the cell (see below) and reprocess the current - token. */ - } else { - $this->closeCell(); - return $this->inRow($token); - } - - /* Anything else */ - } else { - /* Process the token as if the insertion mode was "in body". */ - $this->inBody($token); - } - } - - private function inSelect($token) - { - /* Handle the token as follows: */ - - /* A character token */ - if ($token['type'] === HTML5::CHARACTR) { - /* Append the token's character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag token whose tag name is "option" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'option' - ) { - /* If the current node is an option element, act as if an end tag - with the tag name "option" had been seen. */ - if (end($this->stack)->nodeName === 'option') { - $this->inSelect( - array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* A start tag token whose tag name is "optgroup" */ - } elseif ($token['type'] === HTML5::STARTTAG && - $token['name'] === 'optgroup' - ) { - /* If the current node is an option element, act as if an end tag - with the tag name "option" had been seen. */ - if (end($this->stack)->nodeName === 'option') { - $this->inSelect( - array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* If the current node is an optgroup element, act as if an end tag - with the tag name "optgroup" had been seen. */ - if (end($this->stack)->nodeName === 'optgroup') { - $this->inSelect( - array( - 'name' => 'optgroup', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* An end tag token whose tag name is "optgroup" */ - } elseif ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'optgroup' - ) { - /* First, if the current node is an option element, and the node - immediately before it in the stack of open elements is an optgroup - element, then act as if an end tag with the tag name "option" had - been seen. */ - $elements_in_stack = count($this->stack); - - if ($this->stack[$elements_in_stack - 1]->nodeName === 'option' && - $this->stack[$elements_in_stack - 2]->nodeName === 'optgroup' - ) { - $this->inSelect( - array( - 'name' => 'option', - 'type' => HTML5::ENDTAG - ) - ); - } - - /* If the current node is an optgroup element, then pop that node - from the stack of open elements. Otherwise, this is a parse error, - ignore the token. */ - if ($this->stack[$elements_in_stack - 1] === 'optgroup') { - array_pop($this->stack); - } - - /* An end tag token whose tag name is "option" */ - } elseif ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'option' - ) { - /* If the current node is an option element, then pop that node - from the stack of open elements. Otherwise, this is a parse error, - ignore the token. */ - if (end($this->stack)->nodeName === 'option') { - array_pop($this->stack); - } - - /* An end tag whose tag name is "select" */ - } elseif ($token['type'] === HTML5::ENDTAG && - $token['name'] === 'select' - ) { - /* If the stack of open elements does not have an element in table - scope with the same tag name as the token, this is a parse error. - Ignore the token. (innerHTML case) */ - if (!$this->elementInScope($token['name'], true)) { - // w/e - - /* Otherwise: */ - } else { - /* Pop elements from the stack of open elements until a select - element has been popped from the stack. */ - while (true) { - $current = end($this->stack)->nodeName; - array_pop($this->stack); - - if ($current === 'select') { - break; - } - } - - /* Reset the insertion mode appropriately. */ - $this->resetInsertionMode(); - } - - /* A start tag whose tag name is "select" */ - } elseif ($token['name'] === 'select' && - $token['type'] === HTML5::STARTTAG - ) { - /* Parse error. Act as if the token had been an end tag with the - tag name "select" instead. */ - $this->inSelect( - array( - 'name' => 'select', - 'type' => HTML5::ENDTAG - ) - ); - - /* An end tag whose tag name is one of: "caption", "table", "tbody", - "tfoot", "thead", "tr", "td", "th" */ - } elseif (in_array( - $token['name'], - array( - 'caption', - 'table', - 'tbody', - 'tfoot', - 'thead', - 'tr', - 'td', - 'th' - ) - ) && $token['type'] === HTML5::ENDTAG - ) { - /* Parse error. */ - // w/e - - /* If the stack of open elements has an element in table scope with - the same tag name as that of the token, then act as if an end tag - with the tag name "select" had been seen, and reprocess the token. - Otherwise, ignore the token. */ - if ($this->elementInScope($token['name'], true)) { - $this->inSelect( - array( - 'name' => 'select', - 'type' => HTML5::ENDTAG - ) - ); - - $this->mainPhase($token); - } - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function afterBody($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Process the token as it would be processed if the insertion mode - was "in body". */ - $this->inBody($token); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the first element in the stack of open - elements (the html element), with the data attribute set to the - data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->stack[0]->appendChild($comment); - - /* An end tag with the tag name "html" */ - } elseif ($token['type'] === HTML5::ENDTAG && $token['name'] === 'html') { - /* If the parser was originally created in order to handle the - setting of an element's innerHTML attribute, this is a parse error; - ignore the token. (The element will be an html element in this - case.) (innerHTML case) */ - - /* Otherwise, switch to the trailing end phase. */ - $this->phase = self::END_PHASE; - - /* Anything else */ - } else { - /* Parse error. Set the insertion mode to "in body" and reprocess - the token. */ - $this->mode = self::IN_BODY; - return $this->inBody($token); - } - } - - private function inFrameset($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* A start tag with the tag name "frameset" */ - } elseif ($token['name'] === 'frameset' && - $token['type'] === HTML5::STARTTAG - ) { - $this->insertElement($token); - - /* An end tag with the tag name "frameset" */ - } elseif ($token['name'] === 'frameset' && - $token['type'] === HTML5::ENDTAG - ) { - /* If the current node is the root html element, then this is a - parse error; ignore the token. (innerHTML case) */ - if (end($this->stack)->nodeName === 'html') { - // Ignore - - } else { - /* Otherwise, pop the current node from the stack of open - elements. */ - array_pop($this->stack); - - /* If the parser was not originally created in order to handle - the setting of an element's innerHTML attribute (innerHTML case), - and the current node is no longer a frameset element, then change - the insertion mode to "after frameset". */ - $this->mode = self::AFTR_FRAME; - } - - /* A start tag with the tag name "frame" */ - } elseif ($token['name'] === 'frame' && - $token['type'] === HTML5::STARTTAG - ) { - /* Insert an HTML element for the token. */ - $this->insertElement($token); - - /* Immediately pop the current node off the stack of open elements. */ - array_pop($this->stack); - - /* A start tag with the tag name "noframes" */ - } elseif ($token['name'] === 'noframes' && - $token['type'] === HTML5::STARTTAG - ) { - /* Process the token as if the insertion mode had been "in body". */ - $this->inBody($token); - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function afterFrameset($token) - { - /* Handle the token as follows: */ - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+000D CARRIAGE RETURN (CR), or U+0020 SPACE */ - if ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Append the character to the current node. */ - $this->insertText($token['data']); - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the current node with the data - attribute set to the data given in the comment token. */ - $this->insertComment($token['data']); - - /* An end tag with the tag name "html" */ - } elseif ($token['name'] === 'html' && - $token['type'] === HTML5::ENDTAG - ) { - /* Switch to the trailing end phase. */ - $this->phase = self::END_PHASE; - - /* A start tag with the tag name "noframes" */ - } elseif ($token['name'] === 'noframes' && - $token['type'] === HTML5::STARTTAG - ) { - /* Process the token as if the insertion mode had been "in body". */ - $this->inBody($token); - - /* Anything else */ - } else { - /* Parse error. Ignore the token. */ - } - } - - private function trailingEndPhase($token) - { - /* After the main phase, as each token is emitted from the tokenisation - stage, it must be processed as described in this section. */ - - /* A DOCTYPE token */ - if ($token['type'] === HTML5::DOCTYPE) { - // Parse error. Ignore the token. - - /* A comment token */ - } elseif ($token['type'] === HTML5::COMMENT) { - /* Append a Comment node to the Document object with the data - attribute set to the data given in the comment token. */ - $comment = $this->dom->createComment($token['data']); - $this->dom->appendChild($comment); - - /* A character token that is one of one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE */ - } elseif ($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) - ) { - /* Process the token as it would be processed in the main phase. */ - $this->mainPhase($token); - - /* A character token that is not one of U+0009 CHARACTER TABULATION, - U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), - or U+0020 SPACE. Or a start tag token. Or an end tag token. */ - } elseif (($token['type'] === HTML5::CHARACTR && - preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || - $token['type'] === HTML5::STARTTAG || $token['type'] === HTML5::ENDTAG - ) { - /* Parse error. Switch back to the main phase and reprocess the - token. */ - $this->phase = self::MAIN_PHASE; - return $this->mainPhase($token); - - /* An end-of-file token */ - } elseif ($token['type'] === HTML5::EOF) { - /* OMG DONE!! */ - } - } - - private function insertElement($token, $append = true, $check = false) - { - // Proprietary workaround for libxml2's limitations with tag names - if ($check) { - // Slightly modified HTML5 tag-name modification, - // removing anything that's not an ASCII letter, digit, or hyphen - $token['name'] = preg_replace('/[^a-z0-9-]/i', '', $token['name']); - // Remove leading hyphens and numbers - $token['name'] = ltrim($token['name'], '-0..9'); - // In theory, this should ever be needed, but just in case - if ($token['name'] === '') { - $token['name'] = 'span'; - } // arbitrary generic choice - } - - $el = $this->dom->createElement($token['name']); - - foreach ($token['attr'] as $attr) { - if (!$el->hasAttribute($attr['name'])) { - $el->setAttribute($attr['name'], (string)$attr['value']); - } - } - - $this->appendToRealParent($el); - $this->stack[] = $el; - - return $el; - } - - private function insertText($data) - { - $text = $this->dom->createTextNode($data); - $this->appendToRealParent($text); - } - - private function insertComment($data) - { - $comment = $this->dom->createComment($data); - $this->appendToRealParent($comment); - } - - private function appendToRealParent($node) - { - if ($this->foster_parent === null) { - end($this->stack)->appendChild($node); - - } elseif ($this->foster_parent !== null) { - /* If the foster parent element is the parent element of the - last table element in the stack of open elements, then the new - node must be inserted immediately before the last table element - in the stack of open elements in the foster parent element; - otherwise, the new node must be appended to the foster parent - element. */ - for ($n = count($this->stack) - 1; $n >= 0; $n--) { - if ($this->stack[$n]->nodeName === 'table' && - $this->stack[$n]->parentNode !== null - ) { - $table = $this->stack[$n]; - break; - } - } - - if (isset($table) && $this->foster_parent->isSameNode($table->parentNode)) { - $this->foster_parent->insertBefore($node, $table); - } else { - $this->foster_parent->appendChild($node); - } - - $this->foster_parent = null; - } - } - - private function elementInScope($el, $table = false) - { - if (is_array($el)) { - foreach ($el as $element) { - if ($this->elementInScope($element, $table)) { - return true; - } - } - - return false; - } - - $leng = count($this->stack); - - for ($n = 0; $n < $leng; $n++) { - /* 1. Initialise node to be the current node (the bottommost node of - the stack). */ - $node = $this->stack[$leng - 1 - $n]; - - if ($node->tagName === $el) { - /* 2. If node is the target node, terminate in a match state. */ - return true; - - } elseif ($node->tagName === 'table') { - /* 3. Otherwise, if node is a table element, terminate in a failure - state. */ - return false; - - } elseif ($table === true && in_array( - $node->tagName, - array( - 'caption', - 'td', - 'th', - 'button', - 'marquee', - 'object' - ) - ) - ) { - /* 4. Otherwise, if the algorithm is the "has an element in scope" - variant (rather than the "has an element in table scope" variant), - and node is one of the following, terminate in a failure state. */ - return false; - - } elseif ($node === $node->ownerDocument->documentElement) { - /* 5. Otherwise, if node is an html element (root element), terminate - in a failure state. (This can only happen if the node is the topmost - node of the stack of open elements, and prevents the next step from - being invoked if there are no more elements in the stack.) */ - return false; - } - - /* Otherwise, set node to the previous entry in the stack of open - elements and return to step 2. (This will never fail, since the loop - will always terminate in the previous step if the top of the stack - is reached.) */ - } - } - - private function reconstructActiveFormattingElements() - { - /* 1. If there are no entries in the list of active formatting elements, - then there is nothing to reconstruct; stop this algorithm. */ - $formatting_elements = count($this->a_formatting); - - if ($formatting_elements === 0) { - return false; - } - - /* 3. Let entry be the last (most recently added) element in the list - of active formatting elements. */ - $entry = end($this->a_formatting); - - /* 2. If the last (most recently added) entry in the list of active - formatting elements is a marker, or if it is an element that is in the - stack of open elements, then there is nothing to reconstruct; stop this - algorithm. */ - if ($entry === self::MARKER || in_array($entry, $this->stack, true)) { - return false; - } - - for ($a = $formatting_elements - 1; $a >= 0; true) { - /* 4. If there are no entries before entry in the list of active - formatting elements, then jump to step 8. */ - if ($a === 0) { - $step_seven = false; - break; - } - - /* 5. Let entry be the entry one earlier than entry in the list of - active formatting elements. */ - $a--; - $entry = $this->a_formatting[$a]; - - /* 6. If entry is neither a marker nor an element that is also in - thetack of open elements, go to step 4. */ - if ($entry === self::MARKER || in_array($entry, $this->stack, true)) { - break; - } - } - - while (true) { - /* 7. Let entry be the element one later than entry in the list of - active formatting elements. */ - if (isset($step_seven) && $step_seven === true) { - $a++; - $entry = $this->a_formatting[$a]; - } - - /* 8. Perform a shallow clone of the element entry to obtain clone. */ - $clone = $entry->cloneNode(); - - /* 9. Append clone to the current node and push it onto the stack - of open elements so that it is the new current node. */ - end($this->stack)->appendChild($clone); - $this->stack[] = $clone; - - /* 10. Replace the entry for entry in the list with an entry for - clone. */ - $this->a_formatting[$a] = $clone; - - /* 11. If the entry for clone in the list of active formatting - elements is not the last entry in the list, return to step 7. */ - if (end($this->a_formatting) !== $clone) { - $step_seven = true; - } else { - break; - } - } - } - - private function clearTheActiveFormattingElementsUpToTheLastMarker() - { - /* When the steps below require the UA to clear the list of active - formatting elements up to the last marker, the UA must perform the - following steps: */ - - while (true) { - /* 1. Let entry be the last (most recently added) entry in the list - of active formatting elements. */ - $entry = end($this->a_formatting); - - /* 2. Remove entry from the list of active formatting elements. */ - array_pop($this->a_formatting); - - /* 3. If entry was a marker, then stop the algorithm at this point. - The list has been cleared up to the last marker. */ - if ($entry === self::MARKER) { - break; - } - } - } - - private function generateImpliedEndTags($exclude = array()) - { - /* When the steps below require the UA to generate implied end tags, - then, if the current node is a dd element, a dt element, an li element, - a p element, a td element, a th element, or a tr element, the UA must - act as if an end tag with the respective tag name had been seen and - then generate implied end tags again. */ - $node = end($this->stack); - $elements = array_diff(array('dd', 'dt', 'li', 'p', 'td', 'th', 'tr'), $exclude); - - while (in_array(end($this->stack)->nodeName, $elements)) { - array_pop($this->stack); - } - } - - private function getElementCategory($node) - { - $name = $node->tagName; - if (in_array($name, $this->special)) { - return self::SPECIAL; - } elseif (in_array($name, $this->scoping)) { - return self::SCOPING; - } elseif (in_array($name, $this->formatting)) { - return self::FORMATTING; - } else { - return self::PHRASING; - } - } - - private function clearStackToTableContext($elements) - { - /* When the steps above require the UA to clear the stack back to a - table context, it means that the UA must, while the current node is not - a table element or an html element, pop elements from the stack of open - elements. If this causes any elements to be popped from the stack, then - this is a parse error. */ - while (true) { - $node = end($this->stack)->nodeName; - - if (in_array($node, $elements)) { - break; - } else { - array_pop($this->stack); - } - } - } - - private function resetInsertionMode() - { - /* 1. Let last be false. */ - $last = false; - $leng = count($this->stack); - - for ($n = $leng - 1; $n >= 0; $n--) { - /* 2. Let node be the last node in the stack of open elements. */ - $node = $this->stack[$n]; - - /* 3. If node is the first node in the stack of open elements, then - set last to true. If the element whose innerHTML attribute is being - set is neither a td element nor a th element, then set node to the - element whose innerHTML attribute is being set. (innerHTML case) */ - if ($this->stack[0]->isSameNode($node)) { - $last = true; - } - - /* 4. If node is a select element, then switch the insertion mode to - "in select" and abort these steps. (innerHTML case) */ - if ($node->nodeName === 'select') { - $this->mode = self::IN_SELECT; - break; - - /* 5. If node is a td or th element, then switch the insertion mode - to "in cell" and abort these steps. */ - } elseif ($node->nodeName === 'td' || $node->nodeName === 'th') { - $this->mode = self::IN_CELL; - break; - - /* 6. If node is a tr element, then switch the insertion mode to - "in row" and abort these steps. */ - } elseif ($node->nodeName === 'tr') { - $this->mode = self::IN_ROW; - break; - - /* 7. If node is a tbody, thead, or tfoot element, then switch the - insertion mode to "in table body" and abort these steps. */ - } elseif (in_array($node->nodeName, array('tbody', 'thead', 'tfoot'))) { - $this->mode = self::IN_TBODY; - break; - - /* 8. If node is a caption element, then switch the insertion mode - to "in caption" and abort these steps. */ - } elseif ($node->nodeName === 'caption') { - $this->mode = self::IN_CAPTION; - break; - - /* 9. If node is a colgroup element, then switch the insertion mode - to "in column group" and abort these steps. (innerHTML case) */ - } elseif ($node->nodeName === 'colgroup') { - $this->mode = self::IN_CGROUP; - break; - - /* 10. If node is a table element, then switch the insertion mode - to "in table" and abort these steps. */ - } elseif ($node->nodeName === 'table') { - $this->mode = self::IN_TABLE; - break; - - /* 11. If node is a head element, then switch the insertion mode - to "in body" ("in body"! not "in head"!) and abort these steps. - (innerHTML case) */ - } elseif ($node->nodeName === 'head') { - $this->mode = self::IN_BODY; - break; - - /* 12. If node is a body element, then switch the insertion mode to - "in body" and abort these steps. */ - } elseif ($node->nodeName === 'body') { - $this->mode = self::IN_BODY; - break; - - /* 13. If node is a frameset element, then switch the insertion - mode to "in frameset" and abort these steps. (innerHTML case) */ - } elseif ($node->nodeName === 'frameset') { - $this->mode = self::IN_FRAME; - break; - - /* 14. If node is an html element, then: if the head element - pointer is null, switch the insertion mode to "before head", - otherwise, switch the insertion mode to "after head". In either - case, abort these steps. (innerHTML case) */ - } elseif ($node->nodeName === 'html') { - $this->mode = ($this->head_pointer === null) - ? self::BEFOR_HEAD - : self::AFTER_HEAD; - - break; - - /* 15. If last is true, then set the insertion mode to "in body" - and abort these steps. (innerHTML case) */ - } elseif ($last) { - $this->mode = self::IN_BODY; - break; - } - } - } - - private function closeCell() - { - /* If the stack of open elements has a td or th element in table scope, - then act as if an end tag token with that tag name had been seen. */ - foreach (array('td', 'th') as $cell) { - if ($this->elementInScope($cell, true)) { - $this->inCell( - array( - 'name' => $cell, - 'type' => HTML5::ENDTAG - ) - ); - - break; - } - } - } - - public function save() - { - return $this->dom; - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php deleted file mode 100644 index 3995fec9..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node.php +++ /dev/null @@ -1,49 +0,0 @@ -data = $data; - $this->line = $line; - $this->col = $col; - } - - public function toTokenPair() { - return array(new HTMLPurifier_Token_Comment($this->data, $this->line, $this->col), null); - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php deleted file mode 100644 index 6cbf56da..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Element.php +++ /dev/null @@ -1,59 +0,0 @@ - form or the form, i.e. - * is it a pair of start/end tokens or an empty token. - * @bool - */ - public $empty = false; - - public $endCol = null, $endLine = null, $endArmor = array(); - - public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) { - $this->name = $name; - $this->attr = $attr; - $this->line = $line; - $this->col = $col; - $this->armor = $armor; - } - - public function toTokenPair() { - // XXX inefficiency here, normalization is not necessary - if ($this->empty) { - return array(new HTMLPurifier_Token_Empty($this->name, $this->attr, $this->line, $this->col, $this->armor), null); - } else { - $start = new HTMLPurifier_Token_Start($this->name, $this->attr, $this->line, $this->col, $this->armor); - $end = new HTMLPurifier_Token_End($this->name, array(), $this->endLine, $this->endCol, $this->endArmor); - //$end->start = $start; - return array($start, $end); - } - } -} - diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php deleted file mode 100644 index aec91664..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Node/Text.php +++ /dev/null @@ -1,54 +0,0 @@ -data = $data; - $this->is_whitespace = $is_whitespace; - $this->line = $line; - $this->col = $col; - } - - public function toTokenPair() { - return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php deleted file mode 100644 index 18c8bbb0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PercentEncoder.php +++ /dev/null @@ -1,111 +0,0 @@ -preserve[$i] = true; - } - for ($i = 65; $i <= 90; $i++) { // upper-case - $this->preserve[$i] = true; - } - for ($i = 97; $i <= 122; $i++) { // lower-case - $this->preserve[$i] = true; - } - $this->preserve[45] = true; // Dash - - $this->preserve[46] = true; // Period . - $this->preserve[95] = true; // Underscore _ - $this->preserve[126]= true; // Tilde ~ - - // extra letters not to escape - if ($preserve !== false) { - for ($i = 0, $c = strlen($preserve); $i < $c; $i++) { - $this->preserve[ord($preserve[$i])] = true; - } - } - } - - /** - * Our replacement for urlencode, it encodes all non-reserved characters, - * as well as any extra characters that were instructed to be preserved. - * @note - * Assumes that the string has already been normalized, making any - * and all percent escape sequences valid. Percents will not be - * re-escaped, regardless of their status in $preserve - * @param string $string String to be encoded - * @return string Encoded string. - */ - public function encode($string) - { - $ret = ''; - for ($i = 0, $c = strlen($string); $i < $c; $i++) { - if ($string[$i] !== '%' && !isset($this->preserve[$int = ord($string[$i])])) { - $ret .= '%' . sprintf('%02X', $int); - } else { - $ret .= $string[$i]; - } - } - return $ret; - } - - /** - * Fix up percent-encoding by decoding unreserved characters and normalizing. - * @warning This function is affected by $preserve, even though the - * usual desired behavior is for this not to preserve those - * characters. Be careful when reusing instances of PercentEncoder! - * @param string $string String to normalize - * @return string - */ - public function normalize($string) - { - if ($string == '') { - return ''; - } - $parts = explode('%', $string); - $ret = array_shift($parts); - foreach ($parts as $part) { - $length = strlen($part); - if ($length < 2) { - $ret .= '%25' . $part; - continue; - } - $encoding = substr($part, 0, 2); - $text = substr($part, 2); - if (!ctype_xdigit($encoding)) { - $ret .= '%25' . $part; - continue; - } - $int = hexdec($encoding); - if (isset($this->preserve[$int])) { - $ret .= chr($int) . $text; - continue; - } - $encoding = strtoupper($encoding); - $ret .= '%' . $encoding . $text; - } - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php deleted file mode 100644 index 549e4cea..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer.php +++ /dev/null @@ -1,218 +0,0 @@ -getAll(); - $context = new HTMLPurifier_Context(); - $this->generator = new HTMLPurifier_Generator($config, $context); - } - - /** - * Main function that renders object or aspect of that object - * @note Parameters vary depending on printer - */ - // function render() {} - - /** - * Returns a start tag - * @param string $tag Tag name - * @param array $attr Attribute array - * @return string - */ - protected function start($tag, $attr = array()) - { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Start($tag, $attr ? $attr : array()) - ); - } - - /** - * Returns an end tag - * @param string $tag Tag name - * @return string - */ - protected function end($tag) - { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_End($tag) - ); - } - - /** - * Prints a complete element with content inside - * @param string $tag Tag name - * @param string $contents Element contents - * @param array $attr Tag attributes - * @param bool $escape whether or not to escape contents - * @return string - */ - protected function element($tag, $contents, $attr = array(), $escape = true) - { - return $this->start($tag, $attr) . - ($escape ? $this->escape($contents) : $contents) . - $this->end($tag); - } - - /** - * @param string $tag - * @param array $attr - * @return string - */ - protected function elementEmpty($tag, $attr = array()) - { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Empty($tag, $attr) - ); - } - - /** - * @param string $text - * @return string - */ - protected function text($text) - { - return $this->generator->generateFromToken( - new HTMLPurifier_Token_Text($text) - ); - } - - /** - * Prints a simple key/value row in a table. - * @param string $name Key - * @param mixed $value Value - * @return string - */ - protected function row($name, $value) - { - if (is_bool($value)) { - $value = $value ? 'On' : 'Off'; - } - return - $this->start('tr') . "\n" . - $this->element('th', $name) . "\n" . - $this->element('td', $value) . "\n" . - $this->end('tr'); - } - - /** - * Escapes a string for HTML output. - * @param string $string String to escape - * @return string - */ - protected function escape($string) - { - $string = HTMLPurifier_Encoder::cleanUTF8($string); - $string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8'); - return $string; - } - - /** - * Takes a list of strings and turns them into a single list - * @param string[] $array List of strings - * @param bool $polite Bool whether or not to add an end before the last - * @return string - */ - protected function listify($array, $polite = false) - { - if (empty($array)) { - return 'None'; - } - $ret = ''; - $i = count($array); - foreach ($array as $value) { - $i--; - $ret .= $value; - if ($i > 0 && !($polite && $i == 1)) { - $ret .= ', '; - } - if ($polite && $i == 1) { - $ret .= 'and '; - } - } - return $ret; - } - - /** - * Retrieves the class of an object without prefixes, as well as metadata - * @param object $obj Object to determine class of - * @param string $sec_prefix Further prefix to remove - * @return string - */ - protected function getClass($obj, $sec_prefix = '') - { - static $five = null; - if ($five === null) { - $five = version_compare(PHP_VERSION, '5', '>='); - } - $prefix = 'HTMLPurifier_' . $sec_prefix; - if (!$five) { - $prefix = strtolower($prefix); - } - $class = str_replace($prefix, '', get_class($obj)); - $lclass = strtolower($class); - $class .= '('; - switch ($lclass) { - case 'enum': - $values = array(); - foreach ($obj->valid_values as $value => $bool) { - $values[] = $value; - } - $class .= implode(', ', $values); - break; - case 'css_composite': - $values = array(); - foreach ($obj->defs as $def) { - $values[] = $this->getClass($def, $sec_prefix); - } - $class .= implode(', ', $values); - break; - case 'css_multiple': - $class .= $this->getClass($obj->single, $sec_prefix) . ', '; - $class .= $obj->max; - break; - case 'css_denyelementdecorator': - $class .= $this->getClass($obj->def, $sec_prefix) . ', '; - $class .= $obj->element; - break; - case 'css_importantdecorator': - $class .= $this->getClass($obj->def, $sec_prefix); - if ($obj->allow) { - $class .= ', !important'; - } - break; - } - $class .= ')'; - return $class; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php deleted file mode 100644 index 29505fe1..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/CSSDefinition.php +++ /dev/null @@ -1,44 +0,0 @@ -def = $config->getCSSDefinition(); - $ret = ''; - - $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); - $ret .= $this->start('table'); - - $ret .= $this->element('caption', 'Properties ($info)'); - - $ret .= $this->start('thead'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Property', array('class' => 'heavy')); - $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;')); - $ret .= $this->end('tr'); - $ret .= $this->end('thead'); - - ksort($this->def->info); - foreach ($this->def->info as $property => $obj) { - $name = $this->getClass($obj, 'AttrDef_'); - $ret .= $this->row($property, $name); - } - - $ret .= $this->end('table'); - $ret .= $this->end('div'); - - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css deleted file mode 100644 index 3ff1a88a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.css +++ /dev/null @@ -1,10 +0,0 @@ - -.hp-config {} - -.hp-config tbody th {text-align:right; padding-right:0.5em;} -.hp-config thead, .hp-config .namespace {background:#3C578C; color:#FFF;} -.hp-config .namespace th {text-align:center;} -.hp-config .verbose {display:none;} -.hp-config .controls {text-align:center;} - -/* vim: et sw=4 sts=4 */ diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js deleted file mode 100644 index cba00c9b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.js +++ /dev/null @@ -1,5 +0,0 @@ -function toggleWriteability(id_of_patient, checked) { - document.getElementById(id_of_patient).disabled = checked; -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php deleted file mode 100644 index 4c3ce175..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php +++ /dev/null @@ -1,456 +0,0 @@ -docURL = $doc_url; - $this->name = $name; - $this->compress = $compress; - // initialize sub-printers - $this->fields[0] = new HTMLPurifier_Printer_ConfigForm_default(); - $this->fields[HTMLPurifier_VarParser::C_BOOL] = new HTMLPurifier_Printer_ConfigForm_bool(); - } - - /** - * Sets default column and row size for textareas in sub-printers - * @param $cols Integer columns of textarea, null to use default - * @param $rows Integer rows of textarea, null to use default - */ - public function setTextareaDimensions($cols = null, $rows = null) - { - if ($cols) { - $this->fields['default']->cols = $cols; - } - if ($rows) { - $this->fields['default']->rows = $rows; - } - } - - /** - * Retrieves styling, in case it is not accessible by webserver - */ - public static function getCSS() - { - return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css'); - } - - /** - * Retrieves JavaScript, in case it is not accessible by webserver - */ - public static function getJavaScript() - { - return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js'); - } - - /** - * Returns HTML output for a configuration form - * @param HTMLPurifier_Config|array $config Configuration object of current form state, or an array - * where [0] has an HTML namespace and [1] is being rendered. - * @param array|bool $allowed Optional namespace(s) and directives to restrict form to. - * @param bool $render_controls - * @return string - */ - public function render($config, $allowed = true, $render_controls = true) - { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - - $this->config = $config; - $this->genConfig = $gen_config; - $this->prepareGenerator($gen_config); - - $allowed = HTMLPurifier_Config::getAllowedDirectivesForForm($allowed, $config->def); - $all = array(); - foreach ($allowed as $key) { - list($ns, $directive) = $key; - $all[$ns][$directive] = $config->get($ns . '.' . $directive); - } - - $ret = ''; - $ret .= $this->start('table', array('class' => 'hp-config')); - $ret .= $this->start('thead'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Directive', array('class' => 'hp-directive')); - $ret .= $this->element('th', 'Value', array('class' => 'hp-value')); - $ret .= $this->end('tr'); - $ret .= $this->end('thead'); - foreach ($all as $ns => $directives) { - $ret .= $this->renderNamespace($ns, $directives); - } - if ($render_controls) { - $ret .= $this->start('tbody'); - $ret .= $this->start('tr'); - $ret .= $this->start('td', array('colspan' => 2, 'class' => 'controls')); - $ret .= $this->elementEmpty('input', array('type' => 'submit', 'value' => 'Submit')); - $ret .= '[Reset]'; - $ret .= $this->end('td'); - $ret .= $this->end('tr'); - $ret .= $this->end('tbody'); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders a single namespace - * @param $ns String namespace name - * @param array $directives array of directives to values - * @return string - */ - protected function renderNamespace($ns, $directives) - { - $ret = ''; - $ret .= $this->start('tbody', array('class' => 'namespace')); - $ret .= $this->start('tr'); - $ret .= $this->element('th', $ns, array('colspan' => 2)); - $ret .= $this->end('tr'); - $ret .= $this->end('tbody'); - $ret .= $this->start('tbody'); - foreach ($directives as $directive => $value) { - $ret .= $this->start('tr'); - $ret .= $this->start('th'); - if ($this->docURL) { - $url = str_replace('%s', urlencode("$ns.$directive"), $this->docURL); - $ret .= $this->start('a', array('href' => $url)); - } - $attr = array('for' => "{$this->name}:$ns.$directive"); - - // crop directive name if it's too long - if (!$this->compress || (strlen($directive) < $this->compress)) { - $directive_disp = $directive; - } else { - $directive_disp = substr($directive, 0, $this->compress - 2) . '...'; - $attr['title'] = $directive; - } - - $ret .= $this->element( - 'label', - $directive_disp, - // component printers must create an element with this id - $attr - ); - if ($this->docURL) { - $ret .= $this->end('a'); - } - $ret .= $this->end('th'); - - $ret .= $this->start('td'); - $def = $this->config->def->info["$ns.$directive"]; - if (is_int($def)) { - $allow_null = $def < 0; - $type = abs($def); - } else { - $type = $def->type; - $allow_null = isset($def->allow_null); - } - if (!isset($this->fields[$type])) { - $type = 0; - } // default - $type_obj = $this->fields[$type]; - if ($allow_null) { - $type_obj = new HTMLPurifier_Printer_ConfigForm_NullDecorator($type_obj); - } - $ret .= $type_obj->render($ns, $directive, $value, $this->name, array($this->genConfig, $this->config)); - $ret .= $this->end('td'); - $ret .= $this->end('tr'); - } - $ret .= $this->end('tbody'); - return $ret; - } - -} - -/** - * Printer decorator for directives that accept null - */ -class HTMLPurifier_Printer_ConfigForm_NullDecorator extends HTMLPurifier_Printer -{ - /** - * Printer being decorated - * @type HTMLPurifier_Printer - */ - protected $obj; - - /** - * @param HTMLPurifier_Printer $obj Printer to decorate - */ - public function __construct($obj) - { - parent::__construct(); - $this->obj = $obj; - } - - /** - * @param string $ns - * @param string $directive - * @param string $value - * @param string $name - * @param HTMLPurifier_Config|array $config - * @return string - */ - public function render($ns, $directive, $value, $name, $config) - { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - - $ret = ''; - $ret .= $this->start('label', array('for' => "$name:Null_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' Null/Disabled'); - $ret .= $this->end('label'); - $attr = array( - 'type' => 'checkbox', - 'value' => '1', - 'class' => 'null-toggle', - 'name' => "$name" . "[Null_$ns.$directive]", - 'id' => "$name:Null_$ns.$directive", - 'onclick' => "toggleWriteability('$name:$ns.$directive',checked)" // INLINE JAVASCRIPT!!!! - ); - if ($this->obj instanceof HTMLPurifier_Printer_ConfigForm_bool) { - // modify inline javascript slightly - $attr['onclick'] = - "toggleWriteability('$name:Yes_$ns.$directive',checked);" . - "toggleWriteability('$name:No_$ns.$directive',checked)"; - } - if ($value === null) { - $attr['checked'] = 'checked'; - } - $ret .= $this->elementEmpty('input', $attr); - $ret .= $this->text(' or '); - $ret .= $this->elementEmpty('br'); - $ret .= $this->obj->render($ns, $directive, $value, $name, array($gen_config, $config)); - return $ret; - } -} - -/** - * Swiss-army knife configuration form field printer - */ -class HTMLPurifier_Printer_ConfigForm_default extends HTMLPurifier_Printer -{ - /** - * @type int - */ - public $cols = 18; - - /** - * @type int - */ - public $rows = 5; - - /** - * @param string $ns - * @param string $directive - * @param string $value - * @param string $name - * @param HTMLPurifier_Config|array $config - * @return string - */ - public function render($ns, $directive, $value, $name, $config) - { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - // this should probably be split up a little - $ret = ''; - $def = $config->def->info["$ns.$directive"]; - if (is_int($def)) { - $type = abs($def); - } else { - $type = $def->type; - } - if (is_array($value)) { - switch ($type) { - case HTMLPurifier_VarParser::LOOKUP: - $array = $value; - $value = array(); - foreach ($array as $val => $b) { - $value[] = $val; - } - //TODO does this need a break? - case HTMLPurifier_VarParser::ALIST: - $value = implode(PHP_EOL, $value); - break; - case HTMLPurifier_VarParser::HASH: - $nvalue = ''; - foreach ($value as $i => $v) { - if (is_array($v)) { - // HACK - $v = implode(";", $v); - } - $nvalue .= "$i:$v" . PHP_EOL; - } - $value = $nvalue; - break; - default: - $value = ''; - } - } - if ($type === HTMLPurifier_VarParser::C_MIXED) { - return 'Not supported'; - $value = serialize($value); - } - $attr = array( - 'name' => "$name" . "[$ns.$directive]", - 'id' => "$name:$ns.$directive" - ); - if ($value === null) { - $attr['disabled'] = 'disabled'; - } - if (isset($def->allowed)) { - $ret .= $this->start('select', $attr); - foreach ($def->allowed as $val => $b) { - $attr = array(); - if ($value == $val) { - $attr['selected'] = 'selected'; - } - $ret .= $this->element('option', $val, $attr); - } - $ret .= $this->end('select'); - } elseif ($type === HTMLPurifier_VarParser::TEXT || - $type === HTMLPurifier_VarParser::ITEXT || - $type === HTMLPurifier_VarParser::ALIST || - $type === HTMLPurifier_VarParser::HASH || - $type === HTMLPurifier_VarParser::LOOKUP) { - $attr['cols'] = $this->cols; - $attr['rows'] = $this->rows; - $ret .= $this->start('textarea', $attr); - $ret .= $this->text($value); - $ret .= $this->end('textarea'); - } else { - $attr['value'] = $value; - $attr['type'] = 'text'; - $ret .= $this->elementEmpty('input', $attr); - } - return $ret; - } -} - -/** - * Bool form field printer - */ -class HTMLPurifier_Printer_ConfigForm_bool extends HTMLPurifier_Printer -{ - /** - * @param string $ns - * @param string $directive - * @param string $value - * @param string $name - * @param HTMLPurifier_Config|array $config - * @return string - */ - public function render($ns, $directive, $value, $name, $config) - { - if (is_array($config) && isset($config[0])) { - $gen_config = $config[0]; - $config = $config[1]; - } else { - $gen_config = $config; - } - $this->prepareGenerator($gen_config); - $ret = ''; - $ret .= $this->start('div', array('id' => "$name:$ns.$directive")); - - $ret .= $this->start('label', array('for' => "$name:Yes_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' Yes'); - $ret .= $this->end('label'); - - $attr = array( - 'type' => 'radio', - 'name' => "$name" . "[$ns.$directive]", - 'id' => "$name:Yes_$ns.$directive", - 'value' => '1' - ); - if ($value === true) { - $attr['checked'] = 'checked'; - } - if ($value === null) { - $attr['disabled'] = 'disabled'; - } - $ret .= $this->elementEmpty('input', $attr); - - $ret .= $this->start('label', array('for' => "$name:No_$ns.$directive")); - $ret .= $this->element('span', "$ns.$directive:", array('class' => 'verbose')); - $ret .= $this->text(' No'); - $ret .= $this->end('label'); - - $attr = array( - 'type' => 'radio', - 'name' => "$name" . "[$ns.$directive]", - 'id' => "$name:No_$ns.$directive", - 'value' => '0' - ); - if ($value === false) { - $attr['checked'] = 'checked'; - } - if ($value === null) { - $attr['disabled'] = 'disabled'; - } - $ret .= $this->elementEmpty('input', $attr); - - $ret .= $this->end('div'); - - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php deleted file mode 100644 index ae863917..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php +++ /dev/null @@ -1,324 +0,0 @@ -config =& $config; - - $this->def = $config->getHTMLDefinition(); - - $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer')); - - $ret .= $this->renderDoctype(); - $ret .= $this->renderEnvironment(); - $ret .= $this->renderContentSets(); - $ret .= $this->renderInfo(); - - $ret .= $this->end('div'); - - return $ret; - } - - /** - * Renders the Doctype table - * @return string - */ - protected function renderDoctype() - { - $doctype = $this->def->doctype; - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Doctype'); - $ret .= $this->row('Name', $doctype->name); - $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No'); - $ret .= $this->row('Default Modules', implode(', ', $doctype->modules)); - $ret .= $this->row('Default Tidy Modules', implode(', ', $doctype->tidyModules)); - $ret .= $this->end('table'); - return $ret; - } - - - /** - * Renders environment table, which is miscellaneous info - * @return string - */ - protected function renderEnvironment() - { - $def = $this->def; - - $ret = ''; - - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Environment'); - - $ret .= $this->row('Parent of fragment', $def->info_parent); - $ret .= $this->renderChildren($def->info_parent_def->child); - $ret .= $this->row('Block wrap name', $def->info_block_wrapper); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Global attributes'); - $ret .= $this->element('td', $this->listifyAttr($def->info_global_attr), null, 0); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Tag transforms'); - $list = array(); - foreach ($def->info_tag_transform as $old => $new) { - $new = $this->getClass($new, 'TagTransform_'); - $list[] = "<$old> with $new"; - } - $ret .= $this->element('td', $this->listify($list)); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Pre-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_pre)); - $ret .= $this->end('tr'); - - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Post-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->info_attr_transform_post)); - $ret .= $this->end('tr'); - - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders the Content Sets table - * @return string - */ - protected function renderContentSets() - { - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Content Sets'); - foreach ($this->def->info_content_sets as $name => $lookup) { - $ret .= $this->heavyHeader($name); - $ret .= $this->start('tr'); - $ret .= $this->element('td', $this->listifyTagLookup($lookup)); - $ret .= $this->end('tr'); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders the Elements ($info) table - * @return string - */ - protected function renderInfo() - { - $ret = ''; - $ret .= $this->start('table'); - $ret .= $this->element('caption', 'Elements ($info)'); - ksort($this->def->info); - $ret .= $this->heavyHeader('Allowed tags', 2); - $ret .= $this->start('tr'); - $ret .= $this->element('td', $this->listifyTagLookup($this->def->info), array('colspan' => 2)); - $ret .= $this->end('tr'); - foreach ($this->def->info as $name => $def) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', "<$name>", array('class' => 'heavy', 'colspan' => 2)); - $ret .= $this->end('tr'); - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Inline content'); - $ret .= $this->element('td', $def->descendants_are_inline ? 'Yes' : 'No'); - $ret .= $this->end('tr'); - if (!empty($def->excludes)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Excludes'); - $ret .= $this->element('td', $this->listifyTagLookup($def->excludes)); - $ret .= $this->end('tr'); - } - if (!empty($def->attr_transform_pre)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Pre-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_pre)); - $ret .= $this->end('tr'); - } - if (!empty($def->attr_transform_post)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Post-AttrTransform'); - $ret .= $this->element('td', $this->listifyObjectList($def->attr_transform_post)); - $ret .= $this->end('tr'); - } - if (!empty($def->auto_close)) { - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Auto closed by'); - $ret .= $this->element('td', $this->listifyTagLookup($def->auto_close)); - $ret .= $this->end('tr'); - } - $ret .= $this->start('tr'); - $ret .= $this->element('th', 'Allowed attributes'); - $ret .= $this->element('td', $this->listifyAttr($def->attr), array(), 0); - $ret .= $this->end('tr'); - - if (!empty($def->required_attr)) { - $ret .= $this->row('Required attributes', $this->listify($def->required_attr)); - } - - $ret .= $this->renderChildren($def->child); - } - $ret .= $this->end('table'); - return $ret; - } - - /** - * Renders a row describing the allowed children of an element - * @param HTMLPurifier_ChildDef $def HTMLPurifier_ChildDef of pertinent element - * @return string - */ - protected function renderChildren($def) - { - $context = new HTMLPurifier_Context(); - $ret = ''; - $ret .= $this->start('tr'); - $elements = array(); - $attr = array(); - if (isset($def->elements)) { - if ($def->type == 'strictblockquote') { - $def->validateChildren(array(), $this->config, $context); - } - $elements = $def->elements; - } - if ($def->type == 'chameleon') { - $attr['rowspan'] = 2; - } elseif ($def->type == 'empty') { - $elements = array(); - } elseif ($def->type == 'table') { - $elements = array_flip( - array( - 'col', - 'caption', - 'colgroup', - 'thead', - 'tfoot', - 'tbody', - 'tr' - ) - ); - } - $ret .= $this->element('th', 'Allowed children', $attr); - - if ($def->type == 'chameleon') { - - $ret .= $this->element( - 'td', - 'Block: ' . - $this->escape($this->listifyTagLookup($def->block->elements)), - null, - 0 - ); - $ret .= $this->end('tr'); - $ret .= $this->start('tr'); - $ret .= $this->element( - 'td', - 'Inline: ' . - $this->escape($this->listifyTagLookup($def->inline->elements)), - null, - 0 - ); - - } elseif ($def->type == 'custom') { - - $ret .= $this->element( - 'td', - '' . ucfirst($def->type) . ': ' . - $def->dtd_regex - ); - - } else { - $ret .= $this->element( - 'td', - '' . ucfirst($def->type) . ': ' . - $this->escape($this->listifyTagLookup($elements)), - null, - 0 - ); - } - $ret .= $this->end('tr'); - return $ret; - } - - /** - * Listifies a tag lookup table. - * @param array $array Tag lookup array in form of array('tagname' => true) - * @return string - */ - protected function listifyTagLookup($array) - { - ksort($array); - $list = array(); - foreach ($array as $name => $discard) { - if ($name !== '#PCDATA' && !isset($this->def->info[$name])) { - continue; - } - $list[] = $name; - } - return $this->listify($list); - } - - /** - * Listifies a list of objects by retrieving class names and internal state - * @param array $array List of objects - * @return string - * @todo Also add information about internal state - */ - protected function listifyObjectList($array) - { - ksort($array); - $list = array(); - foreach ($array as $obj) { - $list[] = $this->getClass($obj, 'AttrTransform_'); - } - return $this->listify($list); - } - - /** - * Listifies a hash of attributes to AttrDef classes - * @param array $array Array hash in form of array('attrname' => HTMLPurifier_AttrDef) - * @return string - */ - protected function listifyAttr($array) - { - ksort($array); - $list = array(); - foreach ($array as $name => $obj) { - if ($obj === false) { - continue; - } - $list[] = "$name = " . $this->getClass($obj, 'AttrDef_') . ''; - } - return $this->listify($list); - } - - /** - * Creates a heavy header row - * @param string $text - * @param int $num - * @return string - */ - protected function heavyHeader($text, $num = 1) - { - $ret = ''; - $ret .= $this->start('tr'); - $ret .= $this->element('th', $text, array('colspan' => $num, 'class' => 'heavy')); - $ret .= $this->end('tr'); - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php deleted file mode 100644 index 189348fd..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyList.php +++ /dev/null @@ -1,122 +0,0 @@ -parent = $parent; - } - - /** - * Recursively retrieves the value for a key - * @param string $name - * @throws HTMLPurifier_Exception - */ - public function get($name) - { - if ($this->has($name)) { - return $this->data[$name]; - } - // possible performance bottleneck, convert to iterative if necessary - if ($this->parent) { - return $this->parent->get($name); - } - throw new HTMLPurifier_Exception("Key '$name' not found"); - } - - /** - * Sets the value of a key, for this plist - * @param string $name - * @param mixed $value - */ - public function set($name, $value) - { - $this->data[$name] = $value; - } - - /** - * Returns true if a given key exists - * @param string $name - * @return bool - */ - public function has($name) - { - return array_key_exists($name, $this->data); - } - - /** - * Resets a value to the value of it's parent, usually the default. If - * no value is specified, the entire plist is reset. - * @param string $name - */ - public function reset($name = null) - { - if ($name == null) { - $this->data = array(); - } else { - unset($this->data[$name]); - } - } - - /** - * Squashes this property list and all of its property lists into a single - * array, and returns the array. This value is cached by default. - * @param bool $force If true, ignores the cache and regenerates the array. - * @return array - */ - public function squash($force = false) - { - if ($this->cache !== null && !$force) { - return $this->cache; - } - if ($this->parent) { - return $this->cache = array_merge($this->parent->squash($force), $this->data); - } else { - return $this->cache = $this->data; - } - } - - /** - * Returns the parent plist. - * @return HTMLPurifier_PropertyList - */ - public function getParent() - { - return $this->parent; - } - - /** - * Sets the parent plist. - * @param HTMLPurifier_PropertyList $plist Parent plist - */ - public function setParent($plist) - { - $this->parent = $plist; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php deleted file mode 100644 index f68fc8c3..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php +++ /dev/null @@ -1,43 +0,0 @@ -l = strlen($filter); - $this->filter = $filter; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function accept() - { - $key = $this->getInnerIterator()->key(); - if (strncmp($key, $this->filter, $this->l) !== 0) { - return false; - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php deleted file mode 100644 index f58db904..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Queue.php +++ /dev/null @@ -1,56 +0,0 @@ -input = $input; - $this->output = array(); - } - - /** - * Shifts an element off the front of the queue. - */ - public function shift() { - if (empty($this->output)) { - $this->output = array_reverse($this->input); - $this->input = array(); - } - if (empty($this->output)) { - return NULL; - } - return array_pop($this->output); - } - - /** - * Pushes an element onto the front of the queue. - */ - public function push($x) { - array_push($this->input, $x); - } - - /** - * Checks if it's empty. - */ - public function isEmpty() { - return empty($this->input) && empty($this->output); - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php deleted file mode 100644 index e1ff3b72..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy.php +++ /dev/null @@ -1,26 +0,0 @@ -strategies as $strategy) { - $tokens = $strategy->execute($tokens, $config, $context); - } - return $tokens; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php deleted file mode 100644 index 4414c17d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php +++ /dev/null @@ -1,17 +0,0 @@ -strategies[] = new HTMLPurifier_Strategy_RemoveForeignElements(); - $this->strategies[] = new HTMLPurifier_Strategy_MakeWellFormed(); - $this->strategies[] = new HTMLPurifier_Strategy_FixNesting(); - $this->strategies[] = new HTMLPurifier_Strategy_ValidateAttributes(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php deleted file mode 100644 index 6fa673db..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php +++ /dev/null @@ -1,181 +0,0 @@ -getHTMLDefinition(); - - $excludes_enabled = !$config->get('Core.DisableExcludes'); - - // setup the context variable 'IsInline', for chameleon processing - // is 'false' when we are not inline, 'true' when it must always - // be inline, and an integer when it is inline for a certain - // branch of the document tree - $is_inline = $definition->info_parent_def->descendants_are_inline; - $context->register('IsInline', $is_inline); - - // setup error collector - $e =& $context->get('ErrorCollector', true); - - //####################################################################// - // Loop initialization - - // stack that contains all elements that are excluded - // it is organized by parent elements, similar to $stack, - // but it is only populated when an element with exclusions is - // processed, i.e. there won't be empty exclusions. - $exclude_stack = array($definition->info_parent_def->excludes); - - // variable that contains the start token while we are processing - // nodes. This enables error reporting to do its job - $node = $top_node; - // dummy token - list($token, $d) = $node->toTokenPair(); - $context->register('CurrentNode', $node); - $context->register('CurrentToken', $token); - - //####################################################################// - // Loop - - // We need to implement a post-order traversal iteratively, to - // avoid running into stack space limits. This is pretty tricky - // to reason about, so we just manually stack-ify the recursive - // variant: - // - // function f($node) { - // foreach ($node->children as $child) { - // f($child); - // } - // validate($node); - // } - // - // Thus, we will represent a stack frame as array($node, - // $is_inline, stack of children) - // e.g. array_reverse($node->children) - already processed - // children. - - $parent_def = $definition->info_parent_def; - $stack = array( - array($top_node, - $parent_def->descendants_are_inline, - $parent_def->excludes, // exclusions - 0) - ); - - while (!empty($stack)) { - list($node, $is_inline, $excludes, $ix) = array_pop($stack); - // recursive call - $go = false; - $def = empty($stack) ? $definition->info_parent_def : $definition->info[$node->name]; - while (isset($node->children[$ix])) { - $child = $node->children[$ix++]; - if ($child instanceof HTMLPurifier_Node_Element) { - $go = true; - $stack[] = array($node, $is_inline, $excludes, $ix); - $stack[] = array($child, - // ToDo: I don't think it matters if it's def or - // child_def, but double check this... - $is_inline || $def->descendants_are_inline, - empty($def->excludes) ? $excludes - : array_merge($excludes, $def->excludes), - 0); - break; - } - }; - if ($go) continue; - list($token, $d) = $node->toTokenPair(); - // base case - if ($excludes_enabled && isset($excludes[$node->name])) { - $node->dead = true; - if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded'); - } else { - // XXX I suppose it would be slightly more efficient to - // avoid the allocation here and have children - // strategies handle it - $children = array(); - foreach ($node->children as $child) { - if (!$child->dead) $children[] = $child; - } - $result = $def->child->validateChildren($children, $config, $context); - if ($result === true) { - // nop - $node->children = $children; - } elseif ($result === false) { - $node->dead = true; - if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node removed'); - } else { - $node->children = $result; - if ($e) { - // XXX This will miss mutations of internal nodes. Perhaps defer to the child validators - if (empty($result) && !empty($children)) { - $e->send(E_ERROR, 'Strategy_FixNesting: Node contents removed'); - } else if ($result != $children) { - $e->send(E_WARNING, 'Strategy_FixNesting: Node reorganized'); - } - } - } - } - } - - //####################################################################// - // Post-processing - - // remove context variables - $context->destroy('IsInline'); - $context->destroy('CurrentNode'); - $context->destroy('CurrentToken'); - - //####################################################################// - // Return - - return HTMLPurifier_Arborize::flatten($node, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php deleted file mode 100644 index a6eb09e4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/MakeWellFormed.php +++ /dev/null @@ -1,659 +0,0 @@ -getHTMLDefinition(); - - // local variables - $generator = new HTMLPurifier_Generator($config, $context); - $escape_invalid_tags = $config->get('Core.EscapeInvalidTags'); - // used for autoclose early abortion - $global_parent_allowed_elements = $definition->info_parent_def->child->getAllowedElements($config); - $e = $context->get('ErrorCollector', true); - $i = false; // injector index - list($zipper, $token) = HTMLPurifier_Zipper::fromArray($tokens); - if ($token === NULL) { - return array(); - } - $reprocess = false; // whether or not to reprocess the same token - $stack = array(); - - // member variables - $this->stack =& $stack; - $this->tokens =& $tokens; - $this->token =& $token; - $this->zipper =& $zipper; - $this->config = $config; - $this->context = $context; - - // context variables - $context->register('CurrentNesting', $stack); - $context->register('InputZipper', $zipper); - $context->register('CurrentToken', $token); - - // -- begin INJECTOR -- - - $this->injectors = array(); - - $injectors = $config->getBatch('AutoFormat'); - $def_injectors = $definition->info_injector; - $custom_injectors = $injectors['Custom']; - unset($injectors['Custom']); // special case - foreach ($injectors as $injector => $b) { - // XXX: Fix with a legitimate lookup table of enabled filters - if (strpos($injector, '.') !== false) { - continue; - } - $injector = "HTMLPurifier_Injector_$injector"; - if (!$b) { - continue; - } - $this->injectors[] = new $injector; - } - foreach ($def_injectors as $injector) { - // assumed to be objects - $this->injectors[] = $injector; - } - foreach ($custom_injectors as $injector) { - if (!$injector) { - continue; - } - if (is_string($injector)) { - $injector = "HTMLPurifier_Injector_$injector"; - $injector = new $injector; - } - $this->injectors[] = $injector; - } - - // give the injectors references to the definition and context - // variables for performance reasons - foreach ($this->injectors as $ix => $injector) { - $error = $injector->prepare($config, $context); - if (!$error) { - continue; - } - array_splice($this->injectors, $ix, 1); // rm the injector - trigger_error("Cannot enable {$injector->name} injector because $error is not allowed", E_USER_WARNING); - } - - // -- end INJECTOR -- - - // a note on reprocessing: - // In order to reduce code duplication, whenever some code needs - // to make HTML changes in order to make things "correct", the - // new HTML gets sent through the purifier, regardless of its - // status. This means that if we add a start token, because it - // was totally necessary, we don't have to update nesting; we just - // punt ($reprocess = true; continue;) and it does that for us. - - // isset is in loop because $tokens size changes during loop exec - for (;; - // only increment if we don't need to reprocess - $reprocess ? $reprocess = false : $token = $zipper->next($token)) { - - // check for a rewind - if (is_int($i)) { - // possibility: disable rewinding if the current token has a - // rewind set on it already. This would offer protection from - // infinite loop, but might hinder some advanced rewinding. - $rewind_offset = $this->injectors[$i]->getRewindOffset(); - if (is_int($rewind_offset)) { - for ($j = 0; $j < $rewind_offset; $j++) { - if (empty($zipper->front)) break; - $token = $zipper->prev($token); - // indicate that other injectors should not process this token, - // but we need to reprocess it. See Note [Injector skips] - unset($token->skip[$i]); - $token->rewind = $i; - if ($token instanceof HTMLPurifier_Token_Start) { - array_pop($this->stack); - } elseif ($token instanceof HTMLPurifier_Token_End) { - $this->stack[] = $token->start; - } - } - } - $i = false; - } - - // handle case of document end - if ($token === NULL) { - // kill processing if stack is empty - if (empty($this->stack)) { - break; - } - - // peek - $top_nesting = array_pop($this->stack); - $this->stack[] = $top_nesting; - - // send error [TagClosedSuppress] - if ($e && !isset($top_nesting->armor['MakeWellFormed_TagClosedError'])) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by document end', $top_nesting); - } - - // append, don't splice, since this is the end - $token = new HTMLPurifier_Token_End($top_nesting->name); - - // punt! - $reprocess = true; - continue; - } - - //echo '
'; printZipper($zipper, $token);//printTokens($this->stack); - //flush(); - - // quick-check: if it's not a tag, no need to process - if (empty($token->is_tag)) { - if ($token instanceof HTMLPurifier_Token_Text) { - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) { - // See Note [Injector skips] - continue; - } - if ($token->rewind !== null && $token->rewind !== $i) { - continue; - } - // XXX fuckup - $r = $token; - $injector->handleText($r); - $token = $this->processToken($r, $i); - $reprocess = true; - break; - } - } - // another possibility is a comment - continue; - } - - if (isset($definition->info[$token->name])) { - $type = $definition->info[$token->name]->child->type; - } else { - $type = false; // Type is unknown, treat accordingly - } - - // quick tag checks: anything that's *not* an end tag - $ok = false; - if ($type === 'empty' && $token instanceof HTMLPurifier_Token_Start) { - // claims to be a start tag but is empty - $token = new HTMLPurifier_Token_Empty( - $token->name, - $token->attr, - $token->line, - $token->col, - $token->armor - ); - $ok = true; - } elseif ($type && $type !== 'empty' && $token instanceof HTMLPurifier_Token_Empty) { - // claims to be empty but really is a start tag - // NB: this assignment is required - $old_token = $token; - $token = new HTMLPurifier_Token_End($token->name); - $token = $this->insertBefore( - new HTMLPurifier_Token_Start($old_token->name, $old_token->attr, $old_token->line, $old_token->col, $old_token->armor) - ); - // punt (since we had to modify the input stream in a non-trivial way) - $reprocess = true; - continue; - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - // real empty token - $ok = true; - } elseif ($token instanceof HTMLPurifier_Token_Start) { - // start tag - - // ...unless they also have to close their parent - if (!empty($this->stack)) { - - // Performance note: you might think that it's rather - // inefficient, recalculating the autoclose information - // for every tag that a token closes (since when we - // do an autoclose, we push a new token into the - // stream and then /process/ that, before - // re-processing this token.) But this is - // necessary, because an injector can make an - // arbitrary transformations to the autoclosing - // tokens we introduce, so things may have changed - // in the meantime. Also, doing the inefficient thing is - // "easy" to reason about (for certain perverse definitions - // of "easy") - - $parent = array_pop($this->stack); - $this->stack[] = $parent; - - $parent_def = null; - $parent_elements = null; - $autoclose = false; - if (isset($definition->info[$parent->name])) { - $parent_def = $definition->info[$parent->name]; - $parent_elements = $parent_def->child->getAllowedElements($config); - $autoclose = !isset($parent_elements[$token->name]); - } - - if ($autoclose && $definition->info[$token->name]->wrap) { - // Check if an element can be wrapped by another - // element to make it valid in a context (for - // example,
      needs a
    • in between) - $wrapname = $definition->info[$token->name]->wrap; - $wrapdef = $definition->info[$wrapname]; - $elements = $wrapdef->child->getAllowedElements($config); - if (isset($elements[$token->name]) && isset($parent_elements[$wrapname])) { - $newtoken = new HTMLPurifier_Token_Start($wrapname); - $token = $this->insertBefore($newtoken); - $reprocess = true; - continue; - } - } - - $carryover = false; - if ($autoclose && $parent_def->formatting) { - $carryover = true; - } - - if ($autoclose) { - // check if this autoclose is doomed to fail - // (this rechecks $parent, which his harmless) - $autoclose_ok = isset($global_parent_allowed_elements[$token->name]); - if (!$autoclose_ok) { - foreach ($this->stack as $ancestor) { - $elements = $definition->info[$ancestor->name]->child->getAllowedElements($config); - if (isset($elements[$token->name])) { - $autoclose_ok = true; - break; - } - if ($definition->info[$token->name]->wrap) { - $wrapname = $definition->info[$token->name]->wrap; - $wrapdef = $definition->info[$wrapname]; - $wrap_elements = $wrapdef->child->getAllowedElements($config); - if (isset($wrap_elements[$token->name]) && isset($elements[$wrapname])) { - $autoclose_ok = true; - break; - } - } - } - } - if ($autoclose_ok) { - // errors need to be updated - $new_token = new HTMLPurifier_Token_End($parent->name); - $new_token->start = $parent; - // [TagClosedSuppress] - if ($e && !isset($parent->armor['MakeWellFormed_TagClosedError'])) { - if (!$carryover) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag auto closed', $parent); - } else { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag carryover', $parent); - } - } - if ($carryover) { - $element = clone $parent; - // [TagClosedAuto] - $element->armor['MakeWellFormed_TagClosedError'] = true; - $element->carryover = true; - $token = $this->processToken(array($new_token, $token, $element)); - } else { - $token = $this->insertBefore($new_token); - } - } else { - $token = $this->remove(); - } - $reprocess = true; - continue; - } - - } - $ok = true; - } - - if ($ok) { - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) { - // See Note [Injector skips] - continue; - } - if ($token->rewind !== null && $token->rewind !== $i) { - continue; - } - $r = $token; - $injector->handleElement($r); - $token = $this->processToken($r, $i); - $reprocess = true; - break; - } - if (!$reprocess) { - // ah, nothing interesting happened; do normal processing - if ($token instanceof HTMLPurifier_Token_Start) { - $this->stack[] = $token; - } elseif ($token instanceof HTMLPurifier_Token_End) { - throw new HTMLPurifier_Exception( - 'Improper handling of end tag in start code; possible error in MakeWellFormed' - ); - } - } - continue; - } - - // sanity check: we should be dealing with a closing tag - if (!$token instanceof HTMLPurifier_Token_End) { - throw new HTMLPurifier_Exception('Unaccounted for tag token in input stream, bug in HTML Purifier'); - } - - // make sure that we have something open - if (empty($this->stack)) { - if ($escape_invalid_tags) { - if ($e) { - $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag to text'); - } - $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token)); - } else { - if ($e) { - $e->send(E_WARNING, 'Strategy_MakeWellFormed: Unnecessary end tag removed'); - } - $token = $this->remove(); - } - $reprocess = true; - continue; - } - - // first, check for the simplest case: everything closes neatly. - // Eventually, everything passes through here; if there are problems - // we modify the input stream accordingly and then punt, so that - // the tokens get processed again. - $current_parent = array_pop($this->stack); - if ($current_parent->name == $token->name) { - $token->start = $current_parent; - foreach ($this->injectors as $i => $injector) { - if (isset($token->skip[$i])) { - // See Note [Injector skips] - continue; - } - if ($token->rewind !== null && $token->rewind !== $i) { - continue; - } - $r = $token; - $injector->handleEnd($r); - $token = $this->processToken($r, $i); - $this->stack[] = $current_parent; - $reprocess = true; - break; - } - continue; - } - - // okay, so we're trying to close the wrong tag - - // undo the pop previous pop - $this->stack[] = $current_parent; - - // scroll back the entire nest, trying to find our tag. - // (feature could be to specify how far you'd like to go) - $size = count($this->stack); - // -2 because -1 is the last element, but we already checked that - $skipped_tags = false; - for ($j = $size - 2; $j >= 0; $j--) { - if ($this->stack[$j]->name == $token->name) { - $skipped_tags = array_slice($this->stack, $j); - break; - } - } - - // we didn't find the tag, so remove - if ($skipped_tags === false) { - if ($escape_invalid_tags) { - if ($e) { - $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag to text'); - } - $token = new HTMLPurifier_Token_Text($generator->generateFromToken($token)); - } else { - if ($e) { - $e->send(E_WARNING, 'Strategy_MakeWellFormed: Stray end tag removed'); - } - $token = $this->remove(); - } - $reprocess = true; - continue; - } - - // do errors, in REVERSE $j order: a,b,c with - $c = count($skipped_tags); - if ($e) { - for ($j = $c - 1; $j > 0; $j--) { - // notice we exclude $j == 0, i.e. the current ending tag, from - // the errors... [TagClosedSuppress] - if (!isset($skipped_tags[$j]->armor['MakeWellFormed_TagClosedError'])) { - $e->send(E_NOTICE, 'Strategy_MakeWellFormed: Tag closed by element end', $skipped_tags[$j]); - } - } - } - - // insert tags, in FORWARD $j order: c,b,a with - $replace = array($token); - for ($j = 1; $j < $c; $j++) { - // ...as well as from the insertions - $new_token = new HTMLPurifier_Token_End($skipped_tags[$j]->name); - $new_token->start = $skipped_tags[$j]; - array_unshift($replace, $new_token); - if (isset($definition->info[$new_token->name]) && $definition->info[$new_token->name]->formatting) { - // [TagClosedAuto] - $element = clone $skipped_tags[$j]; - $element->carryover = true; - $element->armor['MakeWellFormed_TagClosedError'] = true; - $replace[] = $element; - } - } - $token = $this->processToken($replace); - $reprocess = true; - continue; - } - - $context->destroy('CurrentToken'); - $context->destroy('CurrentNesting'); - $context->destroy('InputZipper'); - - unset($this->injectors, $this->stack, $this->tokens); - return $zipper->toArray($token); - } - - /** - * Processes arbitrary token values for complicated substitution patterns. - * In general: - * - * If $token is an array, it is a list of tokens to substitute for the - * current token. These tokens then get individually processed. If there - * is a leading integer in the list, that integer determines how many - * tokens from the stream should be removed. - * - * If $token is a regular token, it is swapped with the current token. - * - * If $token is false, the current token is deleted. - * - * If $token is an integer, that number of tokens (with the first token - * being the current one) will be deleted. - * - * @param HTMLPurifier_Token|array|int|bool $token Token substitution value - * @param HTMLPurifier_Injector|int $injector Injector that performed the substitution; default is if - * this is not an injector related operation. - * @throws HTMLPurifier_Exception - */ - protected function processToken($token, $injector = -1) - { - // Zend OpCache miscompiles $token = array($token), so - // avoid this pattern. See: https://github.com/ezyang/htmlpurifier/issues/108 - - // normalize forms of token - if (is_object($token)) { - $tmp = $token; - $token = array(1, $tmp); - } - if (is_int($token)) { - $tmp = $token; - $token = array($tmp); - } - if ($token === false) { - $token = array(1); - } - if (!is_array($token)) { - throw new HTMLPurifier_Exception('Invalid token type from injector'); - } - if (!is_int($token[0])) { - array_unshift($token, 1); - } - if ($token[0] === 0) { - throw new HTMLPurifier_Exception('Deleting zero tokens is not valid'); - } - - // $token is now an array with the following form: - // array(number nodes to delete, new node 1, new node 2, ...) - - $delete = array_shift($token); - list($old, $r) = $this->zipper->splice($this->token, $delete, $token); - - if ($injector > -1) { - // See Note [Injector skips] - // Determine appropriate skips. Here's what the code does: - // *If* we deleted one or more tokens, copy the skips - // of those tokens into the skips of the new tokens (in $token). - // Also, mark the newly inserted tokens as having come from - // $injector. - $oldskip = isset($old[0]) ? $old[0]->skip : array(); - foreach ($token as $object) { - $object->skip = $oldskip; - $object->skip[$injector] = true; - } - } - - return $r; - - } - - /** - * Inserts a token before the current token. Cursor now points to - * this token. You must reprocess after this. - * @param HTMLPurifier_Token $token - */ - private function insertBefore($token) - { - // NB not $this->zipper->insertBefore(), due to positioning - // differences - $splice = $this->zipper->splice($this->token, 0, array($token)); - - return $splice[1]; - } - - /** - * Removes current token. Cursor now points to new token occupying previously - * occupied space. You must reprocess after this. - */ - private function remove() - { - return $this->zipper->delete(); - } -} - -// Note [Injector skips] -// ~~~~~~~~~~~~~~~~~~~~~ -// When I originally designed this class, the idea behind the 'skip' -// property of HTMLPurifier_Token was to help avoid infinite loops -// in injector processing. For example, suppose you wrote an injector -// that bolded swear words. Naively, you might write it so that -// whenever you saw ****, you replaced it with ****. -// -// When this happens, we will reprocess all of the tokens with the -// other injectors. Now there is an opportunity for infinite loop: -// if we rerun the swear-word injector on these tokens, we might -// see **** and then reprocess again to get -// **** ad infinitum. -// -// Thus, the idea of a skip is that once we process a token with -// an injector, we mark all of those tokens as having "come from" -// the injector, and we never run the injector again on these -// tokens. -// -// There were two more complications, however: -// -// - With HTMLPurifier_Injector_RemoveEmpty, we noticed that if -// you had , after you removed the , you -// really would like this injector to go back and reprocess -// the tag, discovering that it is now empty and can be -// removed. So we reintroduced the possibility of infinite looping -// by adding a "rewind" function, which let you go back to an -// earlier point in the token stream and reprocess it with injectors. -// Needless to say, we need to UN-skip the token so it gets -// reprocessed. -// -// - Suppose that you successfuly process a token, replace it with -// one with your skip mark, but now another injector wants to -// process the skipped token with another token. Should you continue -// to skip that new token, or reprocess it? If you reprocess, -// you can end up with an infinite loop where one injector converts -// to , and then another injector converts it back. So -// we inherit the skips, but for some reason, I thought that we -// should inherit the skip from the first token of the token -// that we deleted. Why? Well, it seems to work OK. -// -// If I were to redesign this functionality, I would absolutely not -// go about doing it this way: the semantics are just not very well -// defined, and in any case you probably wanted to operate on trees, -// not token streams. - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php deleted file mode 100644 index 1a8149ec..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/RemoveForeignElements.php +++ /dev/null @@ -1,207 +0,0 @@ -getHTMLDefinition(); - $generator = new HTMLPurifier_Generator($config, $context); - $result = array(); - - $escape_invalid_tags = $config->get('Core.EscapeInvalidTags'); - $remove_invalid_img = $config->get('Core.RemoveInvalidImg'); - - // currently only used to determine if comments should be kept - $trusted = $config->get('HTML.Trusted'); - $comment_lookup = $config->get('HTML.AllowedComments'); - $comment_regexp = $config->get('HTML.AllowedCommentsRegexp'); - $check_comments = $comment_lookup !== array() || $comment_regexp !== null; - - $remove_script_contents = $config->get('Core.RemoveScriptContents'); - $hidden_elements = $config->get('Core.HiddenElements'); - - // remove script contents compatibility - if ($remove_script_contents === true) { - $hidden_elements['script'] = true; - } elseif ($remove_script_contents === false && isset($hidden_elements['script'])) { - unset($hidden_elements['script']); - } - - $attr_validator = new HTMLPurifier_AttrValidator(); - - // removes tokens until it reaches a closing tag with its value - $remove_until = false; - - // converts comments into text tokens when this is equal to a tag name - $textify_comments = false; - - $token = false; - $context->register('CurrentToken', $token); - - $e = false; - if ($config->get('Core.CollectErrors')) { - $e =& $context->get('ErrorCollector'); - } - - foreach ($tokens as $token) { - if ($remove_until) { - if (empty($token->is_tag) || $token->name !== $remove_until) { - continue; - } - } - if (!empty($token->is_tag)) { - // DEFINITION CALL - - // before any processing, try to transform the element - if (isset($definition->info_tag_transform[$token->name])) { - $original_name = $token->name; - // there is a transformation for this tag - // DEFINITION CALL - $token = $definition-> - info_tag_transform[$token->name]->transform($token, $config, $context); - if ($e) { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Tag transform', $original_name); - } - } - - if (isset($definition->info[$token->name])) { - // mostly everything's good, but - // we need to make sure required attributes are in order - if (($token instanceof HTMLPurifier_Token_Start || $token instanceof HTMLPurifier_Token_Empty) && - $definition->info[$token->name]->required_attr && - ($token->name != 'img' || $remove_invalid_img) // ensure config option still works - ) { - $attr_validator->validateToken($token, $config, $context); - $ok = true; - foreach ($definition->info[$token->name]->required_attr as $name) { - if (!isset($token->attr[$name])) { - $ok = false; - break; - } - } - if (!$ok) { - if ($e) { - $e->send( - E_ERROR, - 'Strategy_RemoveForeignElements: Missing required attribute', - $name - ); - } - continue; - } - $token->armor['ValidateAttributes'] = true; - } - - if (isset($hidden_elements[$token->name]) && $token instanceof HTMLPurifier_Token_Start) { - $textify_comments = $token->name; - } elseif ($token->name === $textify_comments && $token instanceof HTMLPurifier_Token_End) { - $textify_comments = false; - } - - } elseif ($escape_invalid_tags) { - // invalid tag, generate HTML representation and insert in - if ($e) { - $e->send(E_WARNING, 'Strategy_RemoveForeignElements: Foreign element to text'); - } - $token = new HTMLPurifier_Token_Text( - $generator->generateFromToken($token) - ); - } else { - // check if we need to destroy all of the tag's children - // CAN BE GENERICIZED - if (isset($hidden_elements[$token->name])) { - if ($token instanceof HTMLPurifier_Token_Start) { - $remove_until = $token->name; - } elseif ($token instanceof HTMLPurifier_Token_Empty) { - // do nothing: we're still looking - } else { - $remove_until = false; - } - if ($e) { - $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign meta element removed'); - } - } else { - if ($e) { - $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Foreign element removed'); - } - } - continue; - } - } elseif ($token instanceof HTMLPurifier_Token_Comment) { - // textify comments in script tags when they are allowed - if ($textify_comments !== false) { - $data = $token->data; - $token = new HTMLPurifier_Token_Text($data); - } elseif ($trusted || $check_comments) { - // always cleanup comments - $trailing_hyphen = false; - if ($e) { - // perform check whether or not there's a trailing hyphen - if (substr($token->data, -1) == '-') { - $trailing_hyphen = true; - } - } - $token->data = rtrim($token->data, '-'); - $found_double_hyphen = false; - while (strpos($token->data, '--') !== false) { - $found_double_hyphen = true; - $token->data = str_replace('--', '-', $token->data); - } - if ($trusted || !empty($comment_lookup[trim($token->data)]) || - ($comment_regexp !== null && preg_match($comment_regexp, trim($token->data)))) { - // OK good - if ($e) { - if ($trailing_hyphen) { - $e->send( - E_NOTICE, - 'Strategy_RemoveForeignElements: Trailing hyphen in comment removed' - ); - } - if ($found_double_hyphen) { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Hyphens in comment collapsed'); - } - } - } else { - if ($e) { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); - } - continue; - } - } else { - // strip comments - if ($e) { - $e->send(E_NOTICE, 'Strategy_RemoveForeignElements: Comment removed'); - } - continue; - } - } elseif ($token instanceof HTMLPurifier_Token_Text) { - } else { - continue; - } - $result[] = $token; - } - if ($remove_until && $e) { - // we removed tokens until the end, throw error - $e->send(E_ERROR, 'Strategy_RemoveForeignElements: Token removed to end', $remove_until); - } - $context->destroy('CurrentToken'); - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php deleted file mode 100644 index fbb3d27c..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php +++ /dev/null @@ -1,45 +0,0 @@ -register('CurrentToken', $token); - - foreach ($tokens as $key => $token) { - - // only process tokens that have attributes, - // namely start and empty tags - if (!$token instanceof HTMLPurifier_Token_Start && !$token instanceof HTMLPurifier_Token_Empty) { - continue; - } - - // skip tokens that are armored - if (!empty($token->armor['ValidateAttributes'])) { - continue; - } - - // note that we have no facilities here for removing tokens - $validator->validateToken($token, $config, $context); - } - $context->destroy('CurrentToken'); - return $tokens; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php deleted file mode 100644 index c41ae3a7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHash.php +++ /dev/null @@ -1,48 +0,0 @@ -accessed[$index] = true; - return parent::offsetGet($index); - } - - /** - * Returns a lookup array of all array indexes that have been accessed. - * @return array in form array($index => true). - */ - public function getAccessed() - { - return $this->accessed; - } - - /** - * Resets the access array. - */ - public function resetAccessed() - { - $this->accessed = array(); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php deleted file mode 100644 index 7c73f808..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php +++ /dev/null @@ -1,136 +0,0 @@ - 'DefaultKeyValue', - * 'KEY' => 'Value', - * 'KEY2' => 'Value2', - * 'MULTILINE-KEY' => "Multiline\nvalue.\n", - * ) - * - * We use this as an easy to use file-format for configuration schema - * files, but the class itself is usage agnostic. - * - * You can use ---- to forcibly terminate parsing of a single string-hash; - * this marker is used in multi string-hashes to delimit boundaries. - */ -class HTMLPurifier_StringHashParser -{ - - /** - * @type string - */ - public $default = 'ID'; - - /** - * Parses a file that contains a single string-hash. - * @param string $file - * @return array - */ - public function parseFile($file) - { - if (!file_exists($file)) { - return false; - } - $fh = fopen($file, 'r'); - if (!$fh) { - return false; - } - $ret = $this->parseHandle($fh); - fclose($fh); - return $ret; - } - - /** - * Parses a file that contains multiple string-hashes delimited by '----' - * @param string $file - * @return array - */ - public function parseMultiFile($file) - { - if (!file_exists($file)) { - return false; - } - $ret = array(); - $fh = fopen($file, 'r'); - if (!$fh) { - return false; - } - while (!feof($fh)) { - $ret[] = $this->parseHandle($fh); - } - fclose($fh); - return $ret; - } - - /** - * Internal parser that acepts a file handle. - * @note While it's possible to simulate in-memory parsing by using - * custom stream wrappers, if such a use-case arises we should - * factor out the file handle into its own class. - * @param resource $fh File handle with pointer at start of valid string-hash - * block. - * @return array - */ - protected function parseHandle($fh) - { - $state = false; - $single = false; - $ret = array(); - do { - $line = fgets($fh); - if ($line === false) { - break; - } - $line = rtrim($line, "\n\r"); - if (!$state && $line === '') { - continue; - } - if ($line === '----') { - break; - } - if (strncmp('--#', $line, 3) === 0) { - // Comment - continue; - } elseif (strncmp('--', $line, 2) === 0) { - // Multiline declaration - $state = trim($line, '- '); - if (!isset($ret[$state])) { - $ret[$state] = ''; - } - continue; - } elseif (!$state) { - $single = true; - if (strpos($line, ':') !== false) { - // Single-line declaration - list($state, $line) = explode(':', $line, 2); - $line = trim($line); - } else { - // Use default declaration - $state = $this->default; - } - } - if ($single) { - $ret[$state] = $line; - $single = false; - $state = false; - } else { - $ret[$state] .= "$line\n"; - } - } while (!feof($fh)); - return $ret; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php deleted file mode 100644 index 7b8d8334..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php +++ /dev/null @@ -1,37 +0,0 @@ - 'xx-small', - '1' => 'xx-small', - '2' => 'small', - '3' => 'medium', - '4' => 'large', - '5' => 'x-large', - '6' => 'xx-large', - '7' => '300%', - '-1' => 'smaller', - '-2' => '60%', - '+1' => 'larger', - '+2' => '150%', - '+3' => '200%', - '+4' => '300%' - ); - - /** - * @param HTMLPurifier_Token_Tag $tag - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return HTMLPurifier_Token_End|string - */ - public function transform($tag, $config, $context) - { - if ($tag instanceof HTMLPurifier_Token_End) { - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - return $new_tag; - } - - $attr = $tag->attr; - $prepend_style = ''; - - // handle color transform - if (isset($attr['color'])) { - $prepend_style .= 'color:' . $attr['color'] . ';'; - unset($attr['color']); - } - - // handle face transform - if (isset($attr['face'])) { - $prepend_style .= 'font-family:' . $attr['face'] . ';'; - unset($attr['face']); - } - - // handle size transform - if (isset($attr['size'])) { - // normalize large numbers - if ($attr['size'] !== '') { - if ($attr['size'][0] == '+' || $attr['size'][0] == '-') { - $size = (int)$attr['size']; - if ($size < -2) { - $attr['size'] = '-2'; - } - if ($size > 4) { - $attr['size'] = '+4'; - } - } else { - $size = (int)$attr['size']; - if ($size > 7) { - $attr['size'] = '7'; - } - } - } - if (isset($this->_size_lookup[$attr['size']])) { - $prepend_style .= 'font-size:' . - $this->_size_lookup[$attr['size']] . ';'; - } - unset($attr['size']); - } - - if ($prepend_style) { - $attr['style'] = isset($attr['style']) ? - $prepend_style . $attr['style'] : - $prepend_style; - } - - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - $new_tag->attr = $attr; - - return $new_tag; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php deleted file mode 100644 index 71bf10b9..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform/Simple.php +++ /dev/null @@ -1,44 +0,0 @@ -transform_to = $transform_to; - $this->style = $style; - } - - /** - * @param HTMLPurifier_Token_Tag $tag - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return string - */ - public function transform($tag, $config, $context) - { - $new_tag = clone $tag; - $new_tag->name = $this->transform_to; - if (!is_null($this->style) && - ($new_tag instanceof HTMLPurifier_Token_Start || $new_tag instanceof HTMLPurifier_Token_Empty) - ) { - $this->prependCSS($new_tag->attr, $this->style); - } - return $new_tag; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php deleted file mode 100644 index 84d3619a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token.php +++ /dev/null @@ -1,100 +0,0 @@ -line = $l; - $this->col = $c; - } - - /** - * Convenience function for DirectLex settings line/col position. - * @param int $l - * @param int $c - */ - public function rawPosition($l, $c) - { - if ($c === -1) { - $l++; - } - $this->line = $l; - $this->col = $c; - } - - /** - * Converts a token into its corresponding node. - */ - abstract public function toNode(); -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php deleted file mode 100644 index 23453c70..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Comment.php +++ /dev/null @@ -1,38 +0,0 @@ -data = $data; - $this->line = $line; - $this->col = $col; - } - - public function toNode() { - return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php deleted file mode 100644 index 78a95f55..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Empty.php +++ /dev/null @@ -1,15 +0,0 @@ -empty = true; - return $n; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php deleted file mode 100644 index 59b38fdc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/End.php +++ /dev/null @@ -1,24 +0,0 @@ -toNode not supported!"); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php deleted file mode 100644 index 019f317a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Start.php +++ /dev/null @@ -1,10 +0,0 @@ -!empty($obj->is_tag) - * without having to use a function call is_a(). - * @type bool - */ - public $is_tag = true; - - /** - * The lower-case name of the tag, like 'a', 'b' or 'blockquote'. - * - * @note Strictly speaking, XML tags are case sensitive, so we shouldn't - * be lower-casing them, but these tokens cater to HTML tags, which are - * insensitive. - * @type string - */ - public $name; - - /** - * Associative array of the tag's attributes. - * @type array - */ - public $attr = array(); - - /** - * Non-overloaded constructor, which lower-cases passed tag name. - * - * @param string $name String name. - * @param array $attr Associative array of attributes. - * @param int $line - * @param int $col - * @param array $armor - */ - public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) - { - $this->name = ctype_lower($name) ? $name : strtolower($name); - foreach ($attr as $key => $value) { - // normalization only necessary when key is not lowercase - if (!ctype_lower((string)$key)) { - $new_key = strtolower($key); - if (!isset($attr[$new_key])) { - $attr[$new_key] = $attr[$key]; - } - if ($new_key !== $key) { - unset($attr[$key]); - } - } - } - $this->attr = $attr; - $this->line = $line; - $this->col = $col; - $this->armor = $armor; - } - - public function toNode() { - return new HTMLPurifier_Node_Element($this->name, $this->attr, $this->line, $this->col, $this->armor); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php deleted file mode 100644 index f26a1c21..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Text.php +++ /dev/null @@ -1,53 +0,0 @@ -data = $data; - $this->is_whitespace = ctype_space($data); - $this->line = $line; - $this->col = $col; - } - - public function toNode() { - return new HTMLPurifier_Node_Text($this->data, $this->is_whitespace, $this->line, $this->col); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php deleted file mode 100644 index dea2446b..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/TokenFactory.php +++ /dev/null @@ -1,118 +0,0 @@ -p_start = new HTMLPurifier_Token_Start('', array()); - $this->p_end = new HTMLPurifier_Token_End(''); - $this->p_empty = new HTMLPurifier_Token_Empty('', array()); - $this->p_text = new HTMLPurifier_Token_Text(''); - $this->p_comment = new HTMLPurifier_Token_Comment(''); - } - - /** - * Creates a HTMLPurifier_Token_Start. - * @param string $name Tag name - * @param array $attr Associative array of attributes - * @return HTMLPurifier_Token_Start Generated HTMLPurifier_Token_Start - */ - public function createStart($name, $attr = array()) - { - $p = clone $this->p_start; - $p->__construct($name, $attr); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_End. - * @param string $name Tag name - * @return HTMLPurifier_Token_End Generated HTMLPurifier_Token_End - */ - public function createEnd($name) - { - $p = clone $this->p_end; - $p->__construct($name); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Empty. - * @param string $name Tag name - * @param array $attr Associative array of attributes - * @return HTMLPurifier_Token_Empty Generated HTMLPurifier_Token_Empty - */ - public function createEmpty($name, $attr = array()) - { - $p = clone $this->p_empty; - $p->__construct($name, $attr); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Text. - * @param string $data Data of text token - * @return HTMLPurifier_Token_Text Generated HTMLPurifier_Token_Text - */ - public function createText($data) - { - $p = clone $this->p_text; - $p->__construct($data); - return $p; - } - - /** - * Creates a HTMLPurifier_Token_Comment. - * @param string $data Data of comment token - * @return HTMLPurifier_Token_Comment Generated HTMLPurifier_Token_Comment - */ - public function createComment($data) - { - $p = clone $this->p_comment; - $p->__construct($data); - return $p; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php deleted file mode 100644 index 9c5be39d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URI.php +++ /dev/null @@ -1,316 +0,0 @@ -scheme = is_null($scheme) || ctype_lower($scheme) ? $scheme : strtolower($scheme); - $this->userinfo = $userinfo; - $this->host = $host; - $this->port = is_null($port) ? $port : (int)$port; - $this->path = $path; - $this->query = $query; - $this->fragment = $fragment; - } - - /** - * Retrieves a scheme object corresponding to the URI's scheme/default - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return HTMLPurifier_URIScheme Scheme object appropriate for validating this URI - */ - public function getSchemeObj($config, $context) - { - $registry = HTMLPurifier_URISchemeRegistry::instance(); - if ($this->scheme !== null) { - $scheme_obj = $registry->getScheme($this->scheme, $config, $context); - if (!$scheme_obj) { - return false; - } // invalid scheme, clean it out - } else { - // no scheme: retrieve the default one - $def = $config->getDefinition('URI'); - $scheme_obj = $def->getDefaultScheme($config, $context); - if (!$scheme_obj) { - if ($def->defaultScheme !== null) { - // something funky happened to the default scheme object - trigger_error( - 'Default scheme object "' . $def->defaultScheme . '" was not readable', - E_USER_WARNING - ); - } // suppress error if it's null - return false; - } - } - return $scheme_obj; - } - - /** - * Generic validation method applicable for all schemes. May modify - * this URI in order to get it into a compliant form. - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool True if validation/filtering succeeds, false if failure - */ - public function validate($config, $context) - { - // ABNF definitions from RFC 3986 - $chars_sub_delims = '!$&\'()*+,;='; - $chars_gen_delims = ':/?#[]@'; - $chars_pchar = $chars_sub_delims . ':@'; - - // validate host - if (!is_null($this->host)) { - $host_def = new HTMLPurifier_AttrDef_URI_Host(); - $this->host = $host_def->validate($this->host, $config, $context); - if ($this->host === false) { - $this->host = null; - } - } - - // validate scheme - // NOTE: It's not appropriate to check whether or not this - // scheme is in our registry, since a URIFilter may convert a - // URI that we don't allow into one we do. So instead, we just - // check if the scheme can be dropped because there is no host - // and it is our default scheme. - if (!is_null($this->scheme) && is_null($this->host) || $this->host === '') { - // support for relative paths is pretty abysmal when the - // scheme is present, so axe it when possible - $def = $config->getDefinition('URI'); - if ($def->defaultScheme === $this->scheme) { - $this->scheme = null; - } - } - - // validate username - if (!is_null($this->userinfo)) { - $encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . ':'); - $this->userinfo = $encoder->encode($this->userinfo); - } - - // validate port - if (!is_null($this->port)) { - if ($this->port < 1 || $this->port > 65535) { - $this->port = null; - } - } - - // validate path - $segments_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/'); - if (!is_null($this->host)) { // this catches $this->host === '' - // path-abempty (hier and relative) - // http://www.example.com/my/path - // //www.example.com/my/path (looks odd, but works, and - // recognized by most browsers) - // (this set is valid or invalid on a scheme by scheme - // basis, so we'll deal with it later) - // file:///my/path - // ///my/path - $this->path = $segments_encoder->encode($this->path); - } elseif ($this->path !== '') { - if ($this->path[0] === '/') { - // path-absolute (hier and relative) - // http:/my/path - // /my/path - if (strlen($this->path) >= 2 && $this->path[1] === '/') { - // This could happen if both the host gets stripped - // out - // http://my/path - // //my/path - $this->path = ''; - } else { - $this->path = $segments_encoder->encode($this->path); - } - } elseif (!is_null($this->scheme)) { - // path-rootless (hier) - // http:my/path - // Short circuit evaluation means we don't need to check nz - $this->path = $segments_encoder->encode($this->path); - } else { - // path-noscheme (relative) - // my/path - // (once again, not checking nz) - $segment_nc_encoder = new HTMLPurifier_PercentEncoder($chars_sub_delims . '@'); - $c = strpos($this->path, '/'); - if ($c !== false) { - $this->path = - $segment_nc_encoder->encode(substr($this->path, 0, $c)) . - $segments_encoder->encode(substr($this->path, $c)); - } else { - $this->path = $segment_nc_encoder->encode($this->path); - } - } - } else { - // path-empty (hier and relative) - $this->path = ''; // just to be safe - } - - // qf = query and fragment - $qf_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/?'); - - if (!is_null($this->query)) { - $this->query = $qf_encoder->encode($this->query); - } - - if (!is_null($this->fragment)) { - $this->fragment = $qf_encoder->encode($this->fragment); - } - return true; - } - - /** - * Convert URI back to string - * @return string URI appropriate for output - */ - public function toString() - { - // reconstruct authority - $authority = null; - // there is a rendering difference between a null authority - // (http:foo-bar) and an empty string authority - // (http:///foo-bar). - if (!is_null($this->host)) { - $authority = ''; - if (!is_null($this->userinfo)) { - $authority .= $this->userinfo . '@'; - } - $authority .= $this->host; - if (!is_null($this->port)) { - $authority .= ':' . $this->port; - } - } - - // Reconstruct the result - // One might wonder about parsing quirks from browsers after - // this reconstruction. Unfortunately, parsing behavior depends - // on what *scheme* was employed (file:///foo is handled *very* - // differently than http:///foo), so unfortunately we have to - // defer to the schemes to do the right thing. - $result = ''; - if (!is_null($this->scheme)) { - $result .= $this->scheme . ':'; - } - if (!is_null($authority)) { - $result .= '//' . $authority; - } - $result .= $this->path; - if (!is_null($this->query)) { - $result .= '?' . $this->query; - } - if (!is_null($this->fragment)) { - $result .= '#' . $this->fragment; - } - - return $result; - } - - /** - * Returns true if this URL might be considered a 'local' URL given - * the current context. This is true when the host is null, or - * when it matches the host supplied to the configuration. - * - * Note that this does not do any scheme checking, so it is mostly - * only appropriate for metadata that doesn't care about protocol - * security. isBenign is probably what you actually want. - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function isLocal($config, $context) - { - if ($this->host === null) { - return true; - } - $uri_def = $config->getDefinition('URI'); - if ($uri_def->host === $this->host) { - return true; - } - return false; - } - - /** - * Returns true if this URL should be considered a 'benign' URL, - * that is: - * - * - It is a local URL (isLocal), and - * - It has a equal or better level of security - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function isBenign($config, $context) - { - if (!$this->isLocal($config, $context)) { - return false; - } - - $scheme_obj = $this->getSchemeObj($config, $context); - if (!$scheme_obj) { - return false; - } // conservative approach - - $current_scheme_obj = $config->getDefinition('URI')->getDefaultScheme($config, $context); - if ($current_scheme_obj->secure) { - if (!$scheme_obj->secure) { - return false; - } - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php deleted file mode 100644 index e0bd8bcc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIDefinition.php +++ /dev/null @@ -1,112 +0,0 @@ -registerFilter(new HTMLPurifier_URIFilter_DisableExternal()); - $this->registerFilter(new HTMLPurifier_URIFilter_DisableExternalResources()); - $this->registerFilter(new HTMLPurifier_URIFilter_DisableResources()); - $this->registerFilter(new HTMLPurifier_URIFilter_HostBlacklist()); - $this->registerFilter(new HTMLPurifier_URIFilter_SafeIframe()); - $this->registerFilter(new HTMLPurifier_URIFilter_MakeAbsolute()); - $this->registerFilter(new HTMLPurifier_URIFilter_Munge()); - } - - public function registerFilter($filter) - { - $this->registeredFilters[$filter->name] = $filter; - } - - public function addFilter($filter, $config) - { - $r = $filter->prepare($config); - if ($r === false) return; // null is ok, for backwards compat - if ($filter->post) { - $this->postFilters[$filter->name] = $filter; - } else { - $this->filters[$filter->name] = $filter; - } - } - - protected function doSetup($config) - { - $this->setupMemberVariables($config); - $this->setupFilters($config); - } - - protected function setupFilters($config) - { - foreach ($this->registeredFilters as $name => $filter) { - if ($filter->always_load) { - $this->addFilter($filter, $config); - } else { - $conf = $config->get('URI.' . $name); - if ($conf !== false && $conf !== null) { - $this->addFilter($filter, $config); - } - } - } - unset($this->registeredFilters); - } - - protected function setupMemberVariables($config) - { - $this->host = $config->get('URI.Host'); - $base_uri = $config->get('URI.Base'); - if (!is_null($base_uri)) { - $parser = new HTMLPurifier_URIParser(); - $this->base = $parser->parse($base_uri); - $this->defaultScheme = $this->base->scheme; - if (is_null($this->host)) $this->host = $this->base->host; - } - if (is_null($this->defaultScheme)) $this->defaultScheme = $config->get('URI.DefaultScheme'); - } - - public function getDefaultScheme($config, $context) - { - return HTMLPurifier_URISchemeRegistry::instance()->getScheme($this->defaultScheme, $config, $context); - } - - public function filter(&$uri, $config, $context) - { - foreach ($this->filters as $name => $f) { - $result = $f->filter($uri, $config, $context); - if (!$result) return false; - } - return true; - } - - public function postFilter(&$uri, $config, $context) - { - foreach ($this->postFilters as $name => $f) { - $result = $f->filter($uri, $config, $context); - if (!$result) return false; - } - return true; - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php deleted file mode 100644 index 09724e9f..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter.php +++ /dev/null @@ -1,74 +0,0 @@ -getDefinition('URI')->host; - if ($our_host !== null) { - $this->ourHostParts = array_reverse(explode('.', $our_host)); - } - } - - /** - * @param HTMLPurifier_URI $uri Reference - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function filter(&$uri, $config, $context) - { - if (is_null($uri->host)) { - return true; - } - if ($this->ourHostParts === false) { - return false; - } - $host_parts = array_reverse(explode('.', $uri->host)); - foreach ($this->ourHostParts as $i => $x) { - if (!isset($host_parts[$i])) { - return false; - } - if ($host_parts[$i] != $this->ourHostParts[$i]) { - return false; - } - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php deleted file mode 100644 index c6562169..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php +++ /dev/null @@ -1,25 +0,0 @@ -get('EmbeddedURI', true)) { - return true; - } - return parent::filter($uri, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php deleted file mode 100644 index d5c412c4..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php +++ /dev/null @@ -1,22 +0,0 @@ -get('EmbeddedURI', true); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php deleted file mode 100644 index 32197c0e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php +++ /dev/null @@ -1,46 +0,0 @@ -blacklist = $config->get('URI.HostBlacklist'); - return true; - } - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function filter(&$uri, $config, $context) - { - foreach ($this->blacklist as $blacklisted_host_fragment) { - if ($uri->host !== null && strpos($uri->host, $blacklisted_host_fragment) !== false) { - return false; - } - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php deleted file mode 100644 index c507bbff..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/MakeAbsolute.php +++ /dev/null @@ -1,158 +0,0 @@ -getDefinition('URI'); - $this->base = $def->base; - if (is_null($this->base)) { - trigger_error( - 'URI.MakeAbsolute is being ignored due to lack of ' . - 'value for URI.Base configuration', - E_USER_WARNING - ); - return false; - } - $this->base->fragment = null; // fragment is invalid for base URI - $stack = explode('/', $this->base->path); - array_pop($stack); // discard last segment - $stack = $this->_collapseStack($stack); // do pre-parsing - $this->basePathStack = $stack; - return true; - } - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function filter(&$uri, $config, $context) - { - if (is_null($this->base)) { - return true; - } // abort early - if ($uri->path === '' && is_null($uri->scheme) && - is_null($uri->host) && is_null($uri->query) && is_null($uri->fragment)) { - // reference to current document - $uri = clone $this->base; - return true; - } - if (!is_null($uri->scheme)) { - // absolute URI already: don't change - if (!is_null($uri->host)) { - return true; - } - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) { - // scheme not recognized - return false; - } - if (!$scheme_obj->hierarchical) { - // non-hierarchal URI with explicit scheme, don't change - return true; - } - // special case: had a scheme but always is hierarchical and had no authority - } - if (!is_null($uri->host)) { - // network path, don't bother - return true; - } - if ($uri->path === '') { - $uri->path = $this->base->path; - } elseif ($uri->path[0] !== '/') { - // relative path, needs more complicated processing - $stack = explode('/', $uri->path); - $new_stack = array_merge($this->basePathStack, $stack); - if ($new_stack[0] !== '' && !is_null($this->base->host)) { - array_unshift($new_stack, ''); - } - $new_stack = $this->_collapseStack($new_stack); - $uri->path = implode('/', $new_stack); - } else { - // absolute path, but still we should collapse - $uri->path = implode('/', $this->_collapseStack(explode('/', $uri->path))); - } - // re-combine - $uri->scheme = $this->base->scheme; - if (is_null($uri->userinfo)) { - $uri->userinfo = $this->base->userinfo; - } - if (is_null($uri->host)) { - $uri->host = $this->base->host; - } - if (is_null($uri->port)) { - $uri->port = $this->base->port; - } - return true; - } - - /** - * Resolve dots and double-dots in a path stack - * @param array $stack - * @return array - */ - private function _collapseStack($stack) - { - $result = array(); - $is_folder = false; - for ($i = 0; isset($stack[$i]); $i++) { - $is_folder = false; - // absorb an internally duplicated slash - if ($stack[$i] == '' && $i && isset($stack[$i + 1])) { - continue; - } - if ($stack[$i] == '..') { - if (!empty($result)) { - $segment = array_pop($result); - if ($segment === '' && empty($result)) { - // error case: attempted to back out too far: - // restore the leading slash - $result[] = ''; - } elseif ($segment === '..') { - $result[] = '..'; // cannot remove .. with .. - } - } else { - // relative path, preserve the double-dots - $result[] = '..'; - } - $is_folder = true; - continue; - } - if ($stack[$i] == '.') { - // silently absorb - $is_folder = true; - continue; - } - $result[] = $stack[$i]; - } - if ($is_folder) { - $result[] = ''; - } - return $result; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php deleted file mode 100644 index e1393deb..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php +++ /dev/null @@ -1,115 +0,0 @@ -target = $config->get('URI.' . $this->name); - $this->parser = new HTMLPurifier_URIParser(); - $this->doEmbed = $config->get('URI.MungeResources'); - $this->secretKey = $config->get('URI.MungeSecretKey'); - if ($this->secretKey && !function_exists('hash_hmac')) { - throw new Exception("Cannot use %URI.MungeSecretKey without hash_hmac support."); - } - return true; - } - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function filter(&$uri, $config, $context) - { - if ($context->get('EmbeddedURI', true) && !$this->doEmbed) { - return true; - } - - $scheme_obj = $uri->getSchemeObj($config, $context); - if (!$scheme_obj) { - return true; - } // ignore unknown schemes, maybe another postfilter did it - if (!$scheme_obj->browsable) { - return true; - } // ignore non-browseable schemes, since we can't munge those in a reasonable way - if ($uri->isBenign($config, $context)) { - return true; - } // don't redirect if a benign URL - - $this->makeReplace($uri, $config, $context); - $this->replace = array_map('rawurlencode', $this->replace); - - $new_uri = strtr($this->target, $this->replace); - $new_uri = $this->parser->parse($new_uri); - // don't redirect if the target host is the same as the - // starting host - if ($uri->host === $new_uri->host) { - return true; - } - $uri = $new_uri; // overwrite - return true; - } - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - */ - protected function makeReplace($uri, $config, $context) - { - $string = $uri->toString(); - // always available - $this->replace['%s'] = $string; - $this->replace['%r'] = $context->get('EmbeddedURI', true) ?: ''; - $token = $context->get('CurrentToken', true) ?: ''; - $this->replace['%n'] = $token ? $token->name : ''; - $this->replace['%m'] = $context->get('CurrentAttr', true) ?: ''; - $this->replace['%p'] = $context->get('CurrentCSSProperty', true) ?: ''; - // not always available - if ($this->secretKey) { - $this->replace['%t'] = hash_hmac("sha256", $string, $this->secretKey); - } - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php deleted file mode 100644 index f609c47a..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/SafeIframe.php +++ /dev/null @@ -1,68 +0,0 @@ -regexp = $config->get('URI.SafeIframeRegexp'); - return true; - } - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function filter(&$uri, $config, $context) - { - // check if filter not applicable - if (!$config->get('HTML.SafeIframe')) { - return true; - } - // check if the filter should actually trigger - if (!$context->get('EmbeddedURI', true)) { - return true; - } - $token = $context->get('CurrentToken', true); - if (!($token && $token->name == 'iframe')) { - return true; - } - // check if we actually have some whitelists enabled - if ($this->regexp === null) { - return false; - } - // actually check the whitelists - return preg_match($this->regexp, $uri->toString()); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php deleted file mode 100644 index 0e7381a0..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIParser.php +++ /dev/null @@ -1,71 +0,0 @@ -percentEncoder = new HTMLPurifier_PercentEncoder(); - } - - /** - * Parses a URI. - * @param $uri string URI to parse - * @return HTMLPurifier_URI representation of URI. This representation has - * not been validated yet and may not conform to RFC. - */ - public function parse($uri) - { - $uri = $this->percentEncoder->normalize($uri); - - // Regexp is as per Appendix B. - // Note that ["<>] are an addition to the RFC's recommended - // characters, because they represent external delimeters. - $r_URI = '!'. - '(([a-zA-Z0-9\.\+\-]+):)?'. // 2. Scheme - '(//([^/?#"<>]*))?'. // 4. Authority - '([^?#"<>]*)'. // 5. Path - '(\?([^#"<>]*))?'. // 7. Query - '(#([^"<>]*))?'. // 8. Fragment - '!'; - - $matches = array(); - $result = preg_match($r_URI, $uri, $matches); - - if (!$result) return false; // *really* invalid URI - - // seperate out parts - $scheme = !empty($matches[1]) ? $matches[2] : null; - $authority = !empty($matches[3]) ? $matches[4] : null; - $path = $matches[5]; // always present, can be empty - $query = !empty($matches[6]) ? $matches[7] : null; - $fragment = !empty($matches[8]) ? $matches[9] : null; - - // further parse authority - if ($authority !== null) { - $r_authority = "/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/"; - $matches = array(); - preg_match($r_authority, $authority, $matches); - $userinfo = !empty($matches[1]) ? $matches[2] : null; - $host = !empty($matches[3]) ? $matches[3] : ''; - $port = !empty($matches[4]) ? (int) $matches[5] : null; - } else { - $port = $host = $userinfo = null; - } - - return new HTMLPurifier_URI( - $scheme, $userinfo, $host, $port, $path, $query, $fragment); - } - -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php deleted file mode 100644 index fe9e82cf..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme.php +++ /dev/null @@ -1,102 +0,0 @@ -, resolves edge cases - * with making relative URIs absolute - * @type bool - */ - public $hierarchical = false; - - /** - * Whether or not the URI may omit a hostname when the scheme is - * explicitly specified, ala file:///path/to/file. As of writing, - * 'file' is the only scheme that browsers support his properly. - * @type bool - */ - public $may_omit_host = false; - - /** - * Validates the components of a URI for a specific scheme. - * @param HTMLPurifier_URI $uri Reference to a HTMLPurifier_URI object - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool success or failure - */ - abstract public function doValidate(&$uri, $config, $context); - - /** - * Public interface for validating components of a URI. Performs a - * bunch of default actions. Don't overload this method. - * @param HTMLPurifier_URI $uri Reference to a HTMLPurifier_URI object - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool success or failure - */ - public function validate(&$uri, $config, $context) - { - if ($this->default_port == $uri->port) { - $uri->port = null; - } - // kludge: browsers do funny things when the scheme but not the - // authority is set - if (!$this->may_omit_host && - // if the scheme is present, a missing host is always in error - (!is_null($uri->scheme) && ($uri->host === '' || is_null($uri->host))) || - // if the scheme is not present, a *blank* host is in error, - // since this translates into '///path' which most browsers - // interpret as being 'http://path'. - (is_null($uri->scheme) && $uri->host === '') - ) { - do { - if (is_null($uri->scheme)) { - if (substr($uri->path, 0, 2) != '//') { - $uri->host = null; - break; - } - // URI is '////path', so we cannot nullify the - // host to preserve semantics. Try expanding the - // hostname instead (fall through) - } - // first see if we can manually insert a hostname - $host = $config->get('URI.Host'); - if (!is_null($host)) { - $uri->host = $host; - } else { - // we can't do anything sensible, reject the URL. - return false; - } - } while (false); - } - return $this->doValidate($uri, $config, $context); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php deleted file mode 100644 index 41c49d55..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/data.php +++ /dev/null @@ -1,136 +0,0 @@ - true, - 'image/gif' => true, - 'image/png' => true, - ); - // this is actually irrelevant since we only write out the path - // component - /** - * @type bool - */ - public $may_omit_host = true; - - /** - * @param HTMLPurifier_URI $uri - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool - */ - public function doValidate(&$uri, $config, $context) - { - $result = explode(',', $uri->path, 2); - $is_base64 = false; - $charset = null; - $content_type = null; - if (count($result) == 2) { - list($metadata, $data) = $result; - // do some legwork on the metadata - $metas = explode(';', $metadata); - while (!empty($metas)) { - $cur = array_shift($metas); - if ($cur == 'base64') { - $is_base64 = true; - break; - } - if (substr($cur, 0, 8) == 'charset=') { - // doesn't match if there are arbitrary spaces, but - // whatever dude - if ($charset !== null) { - continue; - } // garbage - $charset = substr($cur, 8); // not used - } else { - if ($content_type !== null) { - continue; - } // garbage - $content_type = $cur; - } - } - } else { - $data = $result[0]; - } - if ($content_type !== null && empty($this->allowed_types[$content_type])) { - return false; - } - if ($charset !== null) { - // error; we don't allow plaintext stuff - $charset = null; - } - $data = rawurldecode($data); - if ($is_base64) { - $raw_data = base64_decode($data); - } else { - $raw_data = $data; - } - if ( strlen($raw_data) < 12 ) { - // error; exif_imagetype throws exception with small files, - // and this likely indicates a corrupt URI/failed parse anyway - return false; - } - // XXX probably want to refactor this into a general mechanism - // for filtering arbitrary content types - if (function_exists('sys_get_temp_dir')) { - $file = tempnam(sys_get_temp_dir(), ""); - } else { - $file = tempnam("/tmp", ""); - } - file_put_contents($file, $raw_data); - if (function_exists('exif_imagetype')) { - $image_code = exif_imagetype($file); - unlink($file); - } elseif (function_exists('getimagesize')) { - set_error_handler(array($this, 'muteErrorHandler')); - $info = getimagesize($file); - restore_error_handler(); - unlink($file); - if ($info == false) { - return false; - } - $image_code = $info[2]; - } else { - trigger_error("could not find exif_imagetype or getimagesize functions", E_USER_ERROR); - } - $real_content_type = image_type_to_mime_type($image_code); - if ($real_content_type != $content_type) { - // we're nice guys; if the content type is something else we - // support, change it over - if (empty($this->allowed_types[$real_content_type])) { - return false; - } - $content_type = $real_content_type; - } - // ok, it's kosher, rewrite what we need - $uri->userinfo = null; - $uri->host = null; - $uri->port = null; - $uri->fragment = null; - $uri->query = null; - $uri->path = "$content_type;base64," . base64_encode($raw_data); - return true; - } - - /** - * @param int $errno - * @param string $errstr - */ - public function muteErrorHandler($errno, $errstr) - { - } -} diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php deleted file mode 100644 index 215be4ba..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php +++ /dev/null @@ -1,44 +0,0 @@ -userinfo = null; - // file:// makes no provisions for accessing the resource - $uri->port = null; - // While it seems to work on Firefox, the querystring has - // no possible effect and is thus stripped. - $uri->query = null; - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php deleted file mode 100644 index 1eb43ee5..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php +++ /dev/null @@ -1,58 +0,0 @@ -query = null; - - // typecode check - $semicolon_pos = strrpos($uri->path, ';'); // reverse - if ($semicolon_pos !== false) { - $type = substr($uri->path, $semicolon_pos + 1); // no semicolon - $uri->path = substr($uri->path, 0, $semicolon_pos); - $type_ret = ''; - if (strpos($type, '=') !== false) { - // figure out whether or not the declaration is correct - list($key, $typecode) = explode('=', $type, 2); - if ($key !== 'type') { - // invalid key, tack it back on encoded - $uri->path .= '%3B' . $type; - } elseif ($typecode === 'a' || $typecode === 'i' || $typecode === 'd') { - $type_ret = ";type=$typecode"; - } - } else { - $uri->path .= '%3B' . $type; - } - $uri->path = str_replace(';', '%3B', $uri->path); - $uri->path .= $type_ret; - } - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php deleted file mode 100644 index ce69ec43..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/http.php +++ /dev/null @@ -1,36 +0,0 @@ -userinfo = null; - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php deleted file mode 100644 index 0e96882d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/https.php +++ /dev/null @@ -1,18 +0,0 @@ -userinfo = null; - $uri->host = null; - $uri->port = null; - // we need to validate path against RFC 2368's addr-spec - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php deleted file mode 100644 index 7490927d..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/news.php +++ /dev/null @@ -1,35 +0,0 @@ -userinfo = null; - $uri->host = null; - $uri->port = null; - $uri->query = null; - // typecode check needed on path - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php deleted file mode 100644 index f211d715..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/nntp.php +++ /dev/null @@ -1,32 +0,0 @@ -userinfo = null; - $uri->query = null; - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php deleted file mode 100644 index dfad8efc..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/tel.php +++ /dev/null @@ -1,46 +0,0 @@ -userinfo = null; - $uri->host = null; - $uri->port = null; - - // Delete all non-numeric characters, commas, and non-x characters - // from phone number, EXCEPT for a leading plus sign. - $uri->path = preg_replace('/(?!^\+)[^\dx,]/', '', - // Normalize e(x)tension to lower-case - str_replace('X', 'x', rawurldecode($uri->path))); - - return true; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php deleted file mode 100644 index 4ac8a0b7..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URISchemeRegistry.php +++ /dev/null @@ -1,81 +0,0 @@ -get('URI.AllowedSchemes'); - if (!$config->get('URI.OverrideAllowedSchemes') && - !isset($allowed_schemes[$scheme]) - ) { - return; - } - - if (isset($this->schemes[$scheme])) { - return $this->schemes[$scheme]; - } - if (!isset($allowed_schemes[$scheme])) { - return; - } - - $class = 'HTMLPurifier_URIScheme_' . $scheme; - if (!class_exists($class)) { - return; - } - $this->schemes[$scheme] = new $class(); - return $this->schemes[$scheme]; - } - - /** - * Registers a custom scheme to the cache, bypassing reflection. - * @param string $scheme Scheme name - * @param HTMLPurifier_URIScheme $scheme_obj - */ - public function register($scheme, $scheme_obj) - { - $this->schemes[$scheme] = $scheme_obj; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php deleted file mode 100644 index b5a1eab5..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/UnitConverter.php +++ /dev/null @@ -1,307 +0,0 @@ - array( - 'px' => 3, // This is as per CSS 2.1 and Firefox. Your mileage may vary - 'pt' => 4, - 'pc' => 48, - 'in' => 288, - self::METRIC => array('pt', '0.352777778', 'mm'), - ), - self::METRIC => array( - 'mm' => 1, - 'cm' => 10, - self::ENGLISH => array('mm', '2.83464567', 'pt'), - ), - ); - - /** - * Minimum bcmath precision for output. - * @type int - */ - protected $outputPrecision; - - /** - * Bcmath precision for internal calculations. - * @type int - */ - protected $internalPrecision; - - /** - * Whether or not BCMath is available. - * @type bool - */ - private $bcmath; - - public function __construct($output_precision = 4, $internal_precision = 10, $force_no_bcmath = false) - { - $this->outputPrecision = $output_precision; - $this->internalPrecision = $internal_precision; - $this->bcmath = !$force_no_bcmath && function_exists('bcmul'); - } - - /** - * Converts a length object of one unit into another unit. - * @param HTMLPurifier_Length $length - * Instance of HTMLPurifier_Length to convert. You must validate() - * it before passing it here! - * @param string $to_unit - * Unit to convert to. - * @return HTMLPurifier_Length|bool - * @note - * About precision: This conversion function pays very special - * attention to the incoming precision of values and attempts - * to maintain a number of significant figure. Results are - * fairly accurate up to nine digits. Some caveats: - * - If a number is zero-padded as a result of this significant - * figure tracking, the zeroes will be eliminated. - * - If a number contains less than four sigfigs ($outputPrecision) - * and this causes some decimals to be excluded, those - * decimals will be added on. - */ - public function convert($length, $to_unit) - { - if (!$length->isValid()) { - return false; - } - - $n = $length->getN(); - $unit = $length->getUnit(); - - if ($n === '0' || $unit === false) { - return new HTMLPurifier_Length('0', false); - } - - $state = $dest_state = false; - foreach (self::$units as $k => $x) { - if (isset($x[$unit])) { - $state = $k; - } - if (isset($x[$to_unit])) { - $dest_state = $k; - } - } - if (!$state || !$dest_state) { - return false; - } - - // Some calculations about the initial precision of the number; - // this will be useful when we need to do final rounding. - $sigfigs = $this->getSigFigs($n); - if ($sigfigs < $this->outputPrecision) { - $sigfigs = $this->outputPrecision; - } - - // BCMath's internal precision deals only with decimals. Use - // our default if the initial number has no decimals, or increase - // it by how ever many decimals, thus, the number of guard digits - // will always be greater than or equal to internalPrecision. - $log = (int)floor(log(abs($n), 10)); - $cp = ($log < 0) ? $this->internalPrecision - $log : $this->internalPrecision; // internal precision - - for ($i = 0; $i < 2; $i++) { - - // Determine what unit IN THIS SYSTEM we need to convert to - if ($dest_state === $state) { - // Simple conversion - $dest_unit = $to_unit; - } else { - // Convert to the smallest unit, pending a system shift - $dest_unit = self::$units[$state][$dest_state][0]; - } - - // Do the conversion if necessary - if ($dest_unit !== $unit) { - $factor = $this->div(self::$units[$state][$unit], self::$units[$state][$dest_unit], $cp); - $n = $this->mul($n, $factor, $cp); - $unit = $dest_unit; - } - - // Output was zero, so bail out early. Shouldn't ever happen. - if ($n === '') { - $n = '0'; - $unit = $to_unit; - break; - } - - // It was a simple conversion, so bail out - if ($dest_state === $state) { - break; - } - - if ($i !== 0) { - // Conversion failed! Apparently, the system we forwarded - // to didn't have this unit. This should never happen! - return false; - } - - // Pre-condition: $i == 0 - - // Perform conversion to next system of units - $n = $this->mul($n, self::$units[$state][$dest_state][1], $cp); - $unit = self::$units[$state][$dest_state][2]; - $state = $dest_state; - - // One more loop around to convert the unit in the new system. - - } - - // Post-condition: $unit == $to_unit - if ($unit !== $to_unit) { - return false; - } - - // Useful for debugging: - //echo "
      n";
      -        //echo "$n\nsigfigs = $sigfigs\nnew_log = $new_log\nlog = $log\nrp = $rp\n
      \n"; - - $n = $this->round($n, $sigfigs); - if (strpos($n, '.') !== false) { - $n = rtrim($n, '0'); - } - $n = rtrim($n, '.'); - - return new HTMLPurifier_Length($n, $unit); - } - - /** - * Returns the number of significant figures in a string number. - * @param string $n Decimal number - * @return int number of sigfigs - */ - public function getSigFigs($n) - { - $n = ltrim($n, '0+-'); - $dp = strpos($n, '.'); // decimal position - if ($dp === false) { - $sigfigs = strlen(rtrim($n, '0')); - } else { - $sigfigs = strlen(ltrim($n, '0.')); // eliminate extra decimal character - if ($dp !== 0) { - $sigfigs--; - } - } - return $sigfigs; - } - - /** - * Adds two numbers, using arbitrary precision when available. - * @param string $s1 - * @param string $s2 - * @param int $scale - * @return string - */ - private function add($s1, $s2, $scale) - { - if ($this->bcmath) { - return bcadd($s1, $s2, $scale); - } else { - return $this->scale((float)$s1 + (float)$s2, $scale); - } - } - - /** - * Multiples two numbers, using arbitrary precision when available. - * @param string $s1 - * @param string $s2 - * @param int $scale - * @return string - */ - private function mul($s1, $s2, $scale) - { - if ($this->bcmath) { - return bcmul($s1, $s2, $scale); - } else { - return $this->scale((float)$s1 * (float)$s2, $scale); - } - } - - /** - * Divides two numbers, using arbitrary precision when available. - * @param string $s1 - * @param string $s2 - * @param int $scale - * @return string - */ - private function div($s1, $s2, $scale) - { - if ($this->bcmath) { - return bcdiv($s1, $s2, $scale); - } else { - return $this->scale((float)$s1 / (float)$s2, $scale); - } - } - - /** - * Rounds a number according to the number of sigfigs it should have, - * using arbitrary precision when available. - * @param float $n - * @param int $sigfigs - * @return string - */ - private function round($n, $sigfigs) - { - $new_log = (int)floor(log(abs((float)$n), 10)); // Number of digits left of decimal - 1 - $rp = $sigfigs - $new_log - 1; // Number of decimal places needed - $neg = $n < 0 ? '-' : ''; // Negative sign - if ($this->bcmath) { - if ($rp >= 0) { - $n = bcadd($n, $neg . '0.' . str_repeat('0', $rp) . '5', $rp + 1); - $n = bcdiv($n, '1', $rp); - } else { - // This algorithm partially depends on the standardized - // form of numbers that comes out of bcmath. - $n = bcadd($n, $neg . '5' . str_repeat('0', $new_log - $sigfigs), 0); - $n = substr($n, 0, $sigfigs + strlen($neg)) . str_repeat('0', $new_log - $sigfigs + 1); - } - return $n; - } else { - return $this->scale(round((float)$n, $sigfigs - $new_log - 1), $rp + 1); - } - } - - /** - * Scales a float to $scale digits right of decimal point, like BCMath. - * @param float $r - * @param int $scale - * @return string - */ - private function scale($r, $scale) - { - if ($scale < 0) { - // The f sprintf type doesn't support negative numbers, so we - // need to cludge things manually. First get the string. - $r = sprintf('%.0f', (float)$r); - // Due to floating point precision loss, $r will more than likely - // look something like 4652999999999.9234. We grab one more digit - // than we need to precise from $r and then use that to round - // appropriately. - $precise = (string)round(substr($r, 0, strlen($r) + $scale), -1); - // Now we return it, truncating the zero that was rounded off. - return substr($precise, 0, -1) . str_repeat('0', -$scale + 1); - } - return number_format((float)$r, $scale, '.', ''); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php deleted file mode 100644 index 0c97c828..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser.php +++ /dev/null @@ -1,198 +0,0 @@ - self::C_STRING, - 'istring' => self::ISTRING, - 'text' => self::TEXT, - 'itext' => self::ITEXT, - 'int' => self::C_INT, - 'float' => self::C_FLOAT, - 'bool' => self::C_BOOL, - 'lookup' => self::LOOKUP, - 'list' => self::ALIST, - 'hash' => self::HASH, - 'mixed' => self::C_MIXED - ); - - /** - * Lookup table of types that are string, and can have aliases or - * allowed value lists. - */ - public static $stringTypes = array( - self::C_STRING => true, - self::ISTRING => true, - self::TEXT => true, - self::ITEXT => true, - ); - - /** - * Validate a variable according to type. - * It may return NULL as a valid type if $allow_null is true. - * - * @param mixed $var Variable to validate - * @param int $type Type of variable, see HTMLPurifier_VarParser->types - * @param bool $allow_null Whether or not to permit null as a value - * @return string Validated and type-coerced variable - * @throws HTMLPurifier_VarParserException - */ - final public function parse($var, $type, $allow_null = false) - { - if (is_string($type)) { - if (!isset(HTMLPurifier_VarParser::$types[$type])) { - throw new HTMLPurifier_VarParserException("Invalid type '$type'"); - } else { - $type = HTMLPurifier_VarParser::$types[$type]; - } - } - $var = $this->parseImplementation($var, $type, $allow_null); - if ($allow_null && $var === null) { - return null; - } - // These are basic checks, to make sure nothing horribly wrong - // happened in our implementations. - switch ($type) { - case (self::C_STRING): - case (self::ISTRING): - case (self::TEXT): - case (self::ITEXT): - if (!is_string($var)) { - break; - } - if ($type == self::ISTRING || $type == self::ITEXT) { - $var = strtolower($var); - } - return $var; - case (self::C_INT): - if (!is_int($var)) { - break; - } - return $var; - case (self::C_FLOAT): - if (!is_float($var)) { - break; - } - return $var; - case (self::C_BOOL): - if (!is_bool($var)) { - break; - } - return $var; - case (self::LOOKUP): - case (self::ALIST): - case (self::HASH): - if (!is_array($var)) { - break; - } - if ($type === self::LOOKUP) { - foreach ($var as $k) { - if ($k !== true) { - $this->error('Lookup table contains value other than true'); - } - } - } elseif ($type === self::ALIST) { - $keys = array_keys($var); - if (array_keys($keys) !== $keys) { - $this->error('Indices for list are not uniform'); - } - } - return $var; - case (self::C_MIXED): - return $var; - default: - $this->errorInconsistent(get_class($this), $type); - } - $this->errorGeneric($var, $type); - } - - /** - * Actually implements the parsing. Base implementation does not - * do anything to $var. Subclasses should overload this! - * @param mixed $var - * @param int $type - * @param bool $allow_null - * @return string - */ - protected function parseImplementation($var, $type, $allow_null) - { - return $var; - } - - /** - * Throws an exception. - * @throws HTMLPurifier_VarParserException - */ - protected function error($msg) - { - throw new HTMLPurifier_VarParserException($msg); - } - - /** - * Throws an inconsistency exception. - * @note This should not ever be called. It would be called if we - * extend the allowed values of HTMLPurifier_VarParser without - * updating subclasses. - * @param string $class - * @param int $type - * @throws HTMLPurifier_Exception - */ - protected function errorInconsistent($class, $type) - { - throw new HTMLPurifier_Exception( - "Inconsistency in $class: " . HTMLPurifier_VarParser::getTypeName($type) . - " not implemented" - ); - } - - /** - * Generic error for if a type didn't work. - * @param mixed $var - * @param int $type - */ - protected function errorGeneric($var, $type) - { - $vtype = gettype($var); - $this->error("Expected type " . HTMLPurifier_VarParser::getTypeName($type) . ", got $vtype"); - } - - /** - * @param int $type - * @return string - */ - public static function getTypeName($type) - { - static $lookup; - if (!$lookup) { - // Lazy load the alternative lookup table - $lookup = array_flip(HTMLPurifier_VarParser::$types); - } - if (!isset($lookup[$type])) { - return 'unknown'; - } - return $lookup[$type]; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php deleted file mode 100644 index 3bfbe838..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Flexible.php +++ /dev/null @@ -1,130 +0,0 @@ - $j) { - $var[$i] = trim($j); - } - if ($type === self::HASH) { - // key:value,key2:value2 - $nvar = array(); - foreach ($var as $keypair) { - $c = explode(':', $keypair, 2); - if (!isset($c[1])) { - continue; - } - $nvar[trim($c[0])] = trim($c[1]); - } - $var = $nvar; - } - } - if (!is_array($var)) { - break; - } - $keys = array_keys($var); - if ($keys === array_keys($keys)) { - if ($type == self::ALIST) { - return $var; - } elseif ($type == self::LOOKUP) { - $new = array(); - foreach ($var as $key) { - $new[$key] = true; - } - return $new; - } else { - break; - } - } - if ($type === self::ALIST) { - trigger_error("Array list did not have consecutive integer indexes", E_USER_WARNING); - return array_values($var); - } - if ($type === self::LOOKUP) { - foreach ($var as $key => $value) { - if ($value !== true) { - trigger_error( - "Lookup array has non-true value at key '$key'; " . - "maybe your input array was not indexed numerically", - E_USER_WARNING - ); - } - $var[$key] = true; - } - } - return $var; - default: - $this->errorInconsistent(__CLASS__, $type); - } - $this->errorGeneric($var, $type); - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php deleted file mode 100644 index f11c318e..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php +++ /dev/null @@ -1,38 +0,0 @@ -evalExpression($var); - } - - /** - * @param string $expr - * @return mixed - * @throws HTMLPurifier_VarParserException - */ - protected function evalExpression($expr) - { - $var = null; - $result = eval("\$var = $expr;"); - if ($result === false) { - throw new HTMLPurifier_VarParserException("Fatal error in evaluated code"); - } - return $var; - } -} - -// vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php deleted file mode 100644 index 5df34149..00000000 --- a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/VarParserException.php +++ /dev/null @@ -1,11 +0,0 @@ -front = $front; - $this->back = $back; - } - - /** - * Creates a zipper from an array, with a hole in the - * 0-index position. - * @param Array to zipper-ify. - * @return Tuple of zipper and element of first position. - */ - static public function fromArray($array) { - $z = new self(array(), array_reverse($array)); - $t = $z->delete(); // delete the "dummy hole" - return array($z, $t); - } - - /** - * Convert zipper back into a normal array, optionally filling in - * the hole with a value. (Usually you should supply a $t, unless you - * are at the end of the array.) - */ - public function toArray($t = NULL) { - $a = $this->front; - if ($t !== NULL) $a[] = $t; - for ($i = count($this->back)-1; $i >= 0; $i--) { - $a[] = $this->back[$i]; - } - return $a; - } - - /** - * Move hole to the next element. - * @param $t Element to fill hole with - * @return Original contents of new hole. - */ - public function next($t) { - if ($t !== NULL) array_push($this->front, $t); - return empty($this->back) ? NULL : array_pop($this->back); - } - - /** - * Iterated hole advancement. - * @param $t Element to fill hole with - * @param $i How many forward to advance hole - * @return Original contents of new hole, i away - */ - public function advance($t, $n) { - for ($i = 0; $i < $n; $i++) { - $t = $this->next($t); - } - return $t; - } - - /** - * Move hole to the previous element - * @param $t Element to fill hole with - * @return Original contents of new hole. - */ - public function prev($t) { - if ($t !== NULL) array_push($this->back, $t); - return empty($this->front) ? NULL : array_pop($this->front); - } - - /** - * Delete contents of current hole, shifting hole to - * next element. - * @return Original contents of new hole. - */ - public function delete() { - return empty($this->back) ? NULL : array_pop($this->back); - } - - /** - * Returns true if we are at the end of the list. - * @return bool - */ - public function done() { - return empty($this->back); - } - - /** - * Insert element before hole. - * @param Element to insert - */ - public function insertBefore($t) { - if ($t !== NULL) array_push($this->front, $t); - } - - /** - * Insert element after hole. - * @param Element to insert - */ - public function insertAfter($t) { - if ($t !== NULL) array_push($this->back, $t); - } - - /** - * Splice in multiple elements at hole. Functional specification - * in terms of array_splice: - * - * $arr1 = $arr; - * $old1 = array_splice($arr1, $i, $delete, $replacement); - * - * list($z, $t) = HTMLPurifier_Zipper::fromArray($arr); - * $t = $z->advance($t, $i); - * list($old2, $t) = $z->splice($t, $delete, $replacement); - * $arr2 = $z->toArray($t); - * - * assert($old1 === $old2); - * assert($arr1 === $arr2); - * - * NB: the absolute index location after this operation is - * *unchanged!* - * - * @param Current contents of hole. - */ - public function splice($t, $delete, $replacement) { - // delete - $old = array(); - $r = $t; - for ($i = $delete; $i > 0; $i--) { - $old[] = $r; - $r = $this->delete(); - } - // insert - for ($i = count($replacement)-1; $i >= 0; $i--) { - $this->insertAfter($r); - $r = $replacement[$i]; - } - return array($old, $r); - } -} diff --git a/vendor/fig/http-message-util/.gitignore b/vendor/fig/http-message-util/.gitignore deleted file mode 100644 index 48b8bf90..00000000 --- a/vendor/fig/http-message-util/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor/ diff --git a/vendor/fig/http-message-util/CHANGELOG.md b/vendor/fig/http-message-util/CHANGELOG.md deleted file mode 100644 index 1a02e547..00000000 --- a/vendor/fig/http-message-util/CHANGELOG.md +++ /dev/null @@ -1,147 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.1.5 - 2020-11-24 - -### Added - -- [#19](https://github.com/php-fig/http-message-util/pull/19) adds support for PHP 8. - -### Changed - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.1.4 - 2020-02-05 - -### Added - -- Nothing. - -### Changed - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- [#15](https://github.com/php-fig/http-message-util/pull/15) removes the dependency on psr/http-message, as it is not technically necessary for usage of this package. - -### Fixed - -- Nothing. - -## 1.1.3 - 2018-11-19 - -### Added - -- [#10](https://github.com/php-fig/http-message-util/pull/10) adds the constants `StatusCodeInterface::STATUS_EARLY_HINTS` (103) and - `StatusCodeInterface::STATUS_TOO_EARLY` (425). - -### Changed - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.1.2 - 2017-02-09 - -### Added - -- [#4](https://github.com/php-fig/http-message-util/pull/4) adds the constant - `StatusCodeInterface::STATUS_MISDIRECTED_REQUEST` (421). - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.1.1 - 2017-02-06 - -### Added - -- [#3](https://github.com/php-fig/http-message-util/pull/3) adds the constant - `StatusCodeInterface::STATUS_IM_A_TEAPOT` (418). - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.1.0 - 2016-09-19 - -### Added - -- [#1](https://github.com/php-fig/http-message-util/pull/1) adds - `Fig\Http\Message\StatusCodeInterface`, with constants named after common - status reason phrases, with values indicating the status codes themselves. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.0.0 - 2017-08-05 - -### Added - -- Adds `Fig\Http\Message\RequestMethodInterface`, with constants covering the - most common HTTP request methods as specified by the IETF. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. diff --git a/vendor/fig/http-message-util/LICENSE b/vendor/fig/http-message-util/LICENSE deleted file mode 100644 index e2fa347a..00000000 --- a/vendor/fig/http-message-util/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/fig/http-message-util/README.md b/vendor/fig/http-message-util/README.md deleted file mode 100644 index ea5b5aa7..00000000 --- a/vendor/fig/http-message-util/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# PSR Http Message Util - -This repository holds utility classes and constants to facilitate common -operations of [PSR-7](https://www.php-fig.org/psr/psr-7/); the primary purpose is -to provide constants for referring to request methods, response status codes and -messages, and potentially common headers. - -Implementation of PSR-7 interfaces is **not** within the scope of this package. - -## Installation - -Install by adding the package as a [Composer](https://getcomposer.org) -requirement: - -```bash -$ composer require fig/http-message-util -``` diff --git a/vendor/fig/http-message-util/composer.json b/vendor/fig/http-message-util/composer.json deleted file mode 100644 index 8645893b..00000000 --- a/vendor/fig/http-message-util/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "fig/http-message-util", - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", - "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" - }, - "autoload": { - "psr-4": { - "Fig\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - } -} diff --git a/vendor/fig/http-message-util/src/RequestMethodInterface.php b/vendor/fig/http-message-util/src/RequestMethodInterface.php deleted file mode 100644 index 97d9a93b..00000000 --- a/vendor/fig/http-message-util/src/RequestMethodInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * class RequestFactory implements RequestMethodInterface - * { - * public static function factory( - * $uri = '/', - * $method = self::METHOD_GET, - * $data = [] - * ) { - * } - * } - * - */ -interface RequestMethodInterface -{ - const METHOD_HEAD = 'HEAD'; - const METHOD_GET = 'GET'; - const METHOD_POST = 'POST'; - const METHOD_PUT = 'PUT'; - const METHOD_PATCH = 'PATCH'; - const METHOD_DELETE = 'DELETE'; - const METHOD_PURGE = 'PURGE'; - const METHOD_OPTIONS = 'OPTIONS'; - const METHOD_TRACE = 'TRACE'; - const METHOD_CONNECT = 'CONNECT'; -} diff --git a/vendor/fig/http-message-util/src/StatusCodeInterface.php b/vendor/fig/http-message-util/src/StatusCodeInterface.php deleted file mode 100644 index 99b7e780..00000000 --- a/vendor/fig/http-message-util/src/StatusCodeInterface.php +++ /dev/null @@ -1,107 +0,0 @@ - - * class ResponseFactory implements StatusCodeInterface - * { - * public function createResponse($code = self::STATUS_OK) - * { - * } - * } - * - */ -interface StatusCodeInterface -{ - // Informational 1xx - const STATUS_CONTINUE = 100; - const STATUS_SWITCHING_PROTOCOLS = 101; - const STATUS_PROCESSING = 102; - const STATUS_EARLY_HINTS = 103; - // Successful 2xx - const STATUS_OK = 200; - const STATUS_CREATED = 201; - const STATUS_ACCEPTED = 202; - const STATUS_NON_AUTHORITATIVE_INFORMATION = 203; - const STATUS_NO_CONTENT = 204; - const STATUS_RESET_CONTENT = 205; - const STATUS_PARTIAL_CONTENT = 206; - const STATUS_MULTI_STATUS = 207; - const STATUS_ALREADY_REPORTED = 208; - const STATUS_IM_USED = 226; - // Redirection 3xx - const STATUS_MULTIPLE_CHOICES = 300; - const STATUS_MOVED_PERMANENTLY = 301; - const STATUS_FOUND = 302; - const STATUS_SEE_OTHER = 303; - const STATUS_NOT_MODIFIED = 304; - const STATUS_USE_PROXY = 305; - const STATUS_RESERVED = 306; - const STATUS_TEMPORARY_REDIRECT = 307; - const STATUS_PERMANENT_REDIRECT = 308; - // Client Errors 4xx - const STATUS_BAD_REQUEST = 400; - const STATUS_UNAUTHORIZED = 401; - const STATUS_PAYMENT_REQUIRED = 402; - const STATUS_FORBIDDEN = 403; - const STATUS_NOT_FOUND = 404; - const STATUS_METHOD_NOT_ALLOWED = 405; - const STATUS_NOT_ACCEPTABLE = 406; - const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407; - const STATUS_REQUEST_TIMEOUT = 408; - const STATUS_CONFLICT = 409; - const STATUS_GONE = 410; - const STATUS_LENGTH_REQUIRED = 411; - const STATUS_PRECONDITION_FAILED = 412; - const STATUS_PAYLOAD_TOO_LARGE = 413; - const STATUS_URI_TOO_LONG = 414; - const STATUS_UNSUPPORTED_MEDIA_TYPE = 415; - const STATUS_RANGE_NOT_SATISFIABLE = 416; - const STATUS_EXPECTATION_FAILED = 417; - const STATUS_IM_A_TEAPOT = 418; - const STATUS_MISDIRECTED_REQUEST = 421; - const STATUS_UNPROCESSABLE_ENTITY = 422; - const STATUS_LOCKED = 423; - const STATUS_FAILED_DEPENDENCY = 424; - const STATUS_TOO_EARLY = 425; - const STATUS_UPGRADE_REQUIRED = 426; - const STATUS_PRECONDITION_REQUIRED = 428; - const STATUS_TOO_MANY_REQUESTS = 429; - const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; - const STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451; - // Server Errors 5xx - const STATUS_INTERNAL_SERVER_ERROR = 500; - const STATUS_NOT_IMPLEMENTED = 501; - const STATUS_BAD_GATEWAY = 502; - const STATUS_SERVICE_UNAVAILABLE = 503; - const STATUS_GATEWAY_TIMEOUT = 504; - const STATUS_VERSION_NOT_SUPPORTED = 505; - const STATUS_VARIANT_ALSO_NEGOTIATES = 506; - const STATUS_INSUFFICIENT_STORAGE = 507; - const STATUS_LOOP_DETECTED = 508; - const STATUS_NOT_EXTENDED = 510; - const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511; -} diff --git a/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md deleted file mode 100644 index ec355568..00000000 --- a/vendor/monolog/monolog/CHANGELOG.md +++ /dev/null @@ -1,757 +0,0 @@ -### 3.7.0 (2024-06-28) - - * Added `NormalizerFormatter->setBasePath(...)` (and `JsonFormatter` by extension) that allows removing the project's path from the stack trace output (47e301d3e) - * Fixed JsonFormatter handling of incomplete classes (#1834) - * Fixed private error handlers causing problems with custom StreamHandler implementations (#1866) - -### 3.6.0 (2024-04-12) - - * Added `LineFormatter->setBasePath(...)` that allows removing the project's path from the stack trace output (#1873) - * Added `$includeExtra` option in `PsrHandler` to also use extra data to replace placeholder values in the message (#1852) - * Added ability to customize what is a duplicated message by extending the `DeduplicationHandler` (#1879) - * Added handling for using `GelfMessageFormatter` together with the `AmqpHandler` (#1869) - * Added ability to extend `GoogleCloudLoggingFormatter` (#1859) - * Fixed `__toString` failures in context data crashing the normalization process (#1868) - * Fixed PHP 8.4 deprecation warnings (#1874) - -### 3.5.0 (2023-10-27) - - * Added ability to indent stack traces in LineFormatter via e.g. `indentStacktraces(' ')` (#1835) - * Added ability to configure a max level name length in LineFormatter via e.g. `setMaxLevelNameLength(3)` (#1850) - * Added support for indexed arrays (i.e. `[]` and not `{}` arrays once json serialized) containing inline linebreaks in LineFormatter (#1818) - * Added `WithMonologChannel` attribute for integrators to use to configure autowiring (#1847) - * Fixed log record `extra` data leaking between handlers that have handler-specific processors set (#1819) - * Fixed LogglyHandler issue with record level filtering (#1841) - * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) - * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) - * Fixed normalization error when normalizing incomplete classes (#1833) - -### 3.4.0 (2023-06-21) - - * Added `LoadAverageProcessor` to track one of the 1, 5 or 15min load averages (#1803) - * Added support for priority to the `AsMonologProcessor` attribute (#1797) - * Added `TelegramBotHandler` `topic`/`message_thread_id` support (#1802) - * Fixed `FingersCrossedHandler` passthruLevel checking (#1801) - * Fixed support of yearly and monthly rotation log file to rotate only once a month/year (#1805) - * Fixed `TestHandler` method docs (#1794) - * Fixed handling of falsey `display_errors` string values (#1804) - -### 3.3.1 (2023-02-06) - - * Fixed Logger not being serializable anymore (#1792) - -### 3.3.0 (2023-02-06) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added `ClosureContextProcessor` to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745) - * Added an ElasticsearchHandler option to set the `op_type` to `create` instead of the default `index` (#1766) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed GitProcessor not filtering correctly based on Level (#1749) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - -### 3.2.0 (2022-07-24) - - * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) - * Marked `Logger` `@final` as it should not be extended, prefer composition or talk to us if you are missing something - * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) - * Added `SyslogFormatter` to output syslog-like files which can be consumed by tools like [lnav](https://lnav.org/) (#1689) - * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) - * Added `GoogleCloudLoggingFormatter` (#1719) - * Added support for Predis 2.x (#1732) - * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) - * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) - * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) - * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) - * Fixed PHP 8.2 deprecation warnings (#1722) - * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) - -### 3.1.0 (2022-06-09) - - * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) - * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) - * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) - * Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680) - * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) - * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) - -### 3.0.0 (2022-05-10) - -Changes from RC1 - -- The `Monolog\LevelName` enum does not exist anymore, use `Monolog\Level->getName()` instead. - -### 3.0.0-RC1 (2022-05-08) - -This is mostly a cleanup release offering stronger type guarantees for integrators with the -array->object/enum changes, but there is no big new feature for end users. - -See [UPGRADE notes](UPGRADE.md#300) for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces. - -Noteworthy BC Breaks: - -- The minimum supported PHP version is now `8.1.0`. -- Log records have been converted from an array to a [`Monolog\LogRecord` object](src/Monolog/LogRecord.php) - with public (and mostly readonly) properties. e.g. instead of doing - `$record['context']` use `$record->context`. - In formatters or handlers if you rather need an array to work with you can use `$record->toArray()` - to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases - in the `level` and `level_name` keys to be more backwards compatible and use simpler data types. -- `FormatterInterface`, `HandlerInterface`, `ProcessorInterface`, etc. changed to contain `LogRecord $record` - instead of `array $record` parameter types. If you want to support multiple Monolog versions this should - be possible by type-hinting nothing, or `array|LogRecord` if you support PHP 8.0+. You can then code - against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC. - The interfaces do not require a `LogRecord` return type even where it would be applicable, but if you only - support Monolog 3 in integration code I would recommend you use `LogRecord` return types wherever fitting - to ensure forward compatibility as it may be added in Monolog 4. -- Log levels are now enums [`Monolog\Level`](src/Monolog/Level.php) and [`Monolog\LevelName`](src/Monolog/LevelName.php) -- Removed deprecated SwiftMailerHandler, migrate to SymfonyMailerHandler instead. -- `ResettableInterface::reset()` now requires a void return type. -- All properties have had types added, which may require you to do so as well if you extended - a Monolog class and declared the same property. - -New deprecations: - -- `Logger::DEBUG`, `Logger::ERROR`, etc. are now deprecated in favor of the `Monolog\Level` enum. - e.g. instead of `Logger::WARNING` use `Level::Warning` if you need to pass the enum case - to Monolog or one of its handlers, or `Level::Warning->value` if you need the integer - value equal to what `Logger::WARNING` was giving you. -- `Logger::getLevelName()` is now deprecated. - -### 2.9.3 (2024-04-12) - - * Fixed PHP 8.4 deprecation warnings (#1874) - -### 2.9.2 (2023-10-27) - - * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) - * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) - * Fixed normalization error when normalizing incomplete classes (#1833) - -### 2.9.1 (2023-02-06) - - * Fixed Logger not being serializable anymore (#1792) - -### 2.9.0 (2023-02-05) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - -### 2.8.0 (2022-07-24) - - * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) - * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) - * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) - * Added `GoogleCloudLoggingFormatter` (#1719) - * Added support for Predis 2.x (#1732) - * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) - * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) - * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) - * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) - * Fixed PHP 8.2 deprecation warnings (#1722) - * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) - -### 2.7.0 (2022-06-09) - - * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) - * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) - * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) - * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) - * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) - -### 2.6.0 (2022-05-10) - - * Deprecated `SwiftMailerHandler`, use `SymfonyMailerHandler` instead - * Added `SymfonyMailerHandler` (#1663) - * Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662) - * Added a way to filter/modify stack traces in LineFormatter (#1665) - * Fixed UdpSocket not being able to reopen/reconnect after close() - * Fixed infinite loops if a Handler is triggering logging while handling log records - -### 2.5.0 (2022-04-08) - - * Added `callType` to IntrospectionProcessor (#1612) - * Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651) - -### 2.4.0 (2022-03-14) - - * Added [`Monolog\LogRecord`](src/Monolog/LogRecord.php) interface that can be used to type-hint records like `array|\Monolog\LogRecord $record` to be forward compatible with the upcoming Monolog 3 changes - * Added `includeStacktraces` constructor params to LineFormatter & JsonFormatter (#1603) - * Added `persistent`, `timeout`, `writingTimeout`, `connectionTimeout`, `chunkSize` constructor params to SocketHandler and derivatives (#1600) - * Added `AsMonologProcessor` PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637) - * Added support for keeping native BSON types as is in MongoDBFormatter (#1620) - * Added support for a `user_agent` key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613) - * Added support for username/userIcon in SlackWebhookHandler (#1617) - * Added extension points to BrowserConsoleHandler (#1593) - * Added record message/context/extra info to exceptions thrown when a StreamHandler cannot open its stream to avoid completely losing the data logged (#1630) - * Fixed error handler signature to accept a null $context which happens with internal PHP errors (#1614) - * Fixed a few setter methods not returning `self` (#1609) - * Fixed handling of records going over the max Telegram message length (#1616) - -### 2.3.5 (2021-10-01) - - * Fixed regression in StreamHandler since 2.3.3 on systems with the memory_limit set to >=20GB (#1592) - -### 2.3.4 (2021-09-15) - - * Fixed support for psr/log 3.x (#1589) - -### 2.3.3 (2021-09-14) - - * Fixed memory usage when using StreamHandler and calling stream_get_contents on the resource you passed to it (#1578, #1577) - * Fixed support for psr/log 2.x (#1587) - * Fixed some type annotations - -### 2.3.2 (2021-07-23) - - * Fixed compatibility with PHP 7.2 - 7.4 when experiencing PCRE errors (#1568) - -### 2.3.1 (2021-07-14) - - * Fixed Utils::getClass handling of anonymous classes not being fully compatible with PHP 8 (#1563) - * Fixed some `@inheritDoc` annotations having the wrong case - -### 2.3.0 (2021-07-05) - - * Added a ton of PHPStan type annotations as well as type aliases on Monolog\Logger for Record, Level and LevelName that you can import (#1557) - * Added ability to customize date format when using JsonFormatter (#1561) - * Fixed FilterHandler not calling reset on its internal handler when reset() is called on it (#1531) - * Fixed SyslogUdpHandler not setting the timezone correctly on DateTimeImmutable instances (#1540) - * Fixed StreamHandler thread safety - chunk size set to 2GB now to avoid interlacing when doing concurrent writes (#1553) - -### 2.2.0 (2020-12-14) - - * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere - * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation - * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH - * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7 - * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms - * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket) - * Added handleBatch support for TelegramBotHandler - * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler - * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars) - * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters - * Fixed PHP 8 issues in SyslogUdpHandler - * Fixed internal type error when mbstring is missing - -### 2.1.1 (2020-07-23) - - * Fixed removing of json encoding options - * Fixed type hint of $level not accepting strings in SendGridHandler and OverflowHandler - * Fixed SwiftMailerHandler not accepting email templates with an empty subject - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 2.1.0 (2020-05-22) - - * Added `JSON_INVALID_UTF8_SUBSTITUTE` to default json flags, so that invalid UTF8 characters now get converted to [�](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) instead of being converted from ISO-8859-15 to UTF8 as it was before, which was hardly a comprehensive solution - * Added `$ignoreEmptyContextAndExtra` option to JsonFormatter to skip empty context/extra entirely from the output - * Added `$parseMode`, `$disableWebPagePreview` and `$disableNotification` options to TelegramBotHandler - * Added tentative support for PHP 8 - * NormalizerFormatter::addJsonEncodeOption and removeJsonEncodeOption are now public to allow modifying default json flags - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 2.0.2 (2019-12-20) - - * Fixed ElasticsearchHandler swallowing exceptions details when failing to index log records - * Fixed normalization of SoapFault objects containing non-strings as "detail" in LineFormatter - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 2.0.1 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler, OverflowHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - * Fixed type error in BrowserConsoleHandler when the context array of log records was not associative. - -### 2.0.0 (2019-08-30) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: Logger methods log/debug/info/notice/warning/error/critical/alert/emergency now have explicit void return types - * Added FallbackGroupHandler which works like the WhatFailureGroupHandler but stops dispatching log records as soon as one handler accepted it - * Fixed support for UTF-8 when cutting strings to avoid cutting a multibyte-character in half - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed date timezone handling in SyslogUdpHandler - -### 2.0.0-beta2 (2019-07-06) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.2 is now the minimum required PHP version. - * BC Break: Removed SlackbotHandler, RavenHandler and HipChatHandler, see [UPGRADE.md](UPGRADE.md) for details - * Added OverflowHandler which will only flush log records to its nested handler when reaching a certain amount of logs (i.e. only pass through when things go really bad) - * Added TelegramBotHandler to log records to a [Telegram](https://core.telegram.org/bots/api) bot account - * Added support for JsonSerializable when normalizing exceptions - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Added SoapFault details to formatted exceptions - * Fixed DeduplicationHandler silently failing to start when file could not be opened - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed GelfFormatter losing some data when one attachment was too long - * Fixed issue in SignalHandler restarting syscalls functionality - * Improved performance of LogglyHandler when sending multiple logs in a single request - -### 2.0.0-beta1 (2018-12-08) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.1 is now the minimum required PHP version. - * BC Break: Quite a few interface changes, only relevant if you implemented your own handlers/processors/formatters - * BC Break: Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) methods as well as `emerg`, `crit`, `err` and `warn` - * BC Break: The record timezone is now set per Logger instance and not statically anymore - * BC Break: There is no more default handler configured on empty Logger instances - * BC Break: ElasticSearchHandler renamed to ElasticaHandler - * BC Break: Various handler-specific breaks, see [UPGRADE.md](UPGRADE.md) for details - * Added scalar type hints and return hints in all the places it was possible. Switched strict_types on for more reliability. - * Added DateTimeImmutable support, all record datetime are now immutable, and will toString/json serialize with the correct date format, including microseconds (unless disabled) - * Added timezone and microseconds to the default date format - * Added SendGridHandler to use the SendGrid API to send emails - * Added LogmaticHandler to use the Logmatic.io API to store log records - * Added SqsHandler to send log records to an AWS SQS queue - * Added ElasticsearchHandler to send records via the official ES library. Elastica users should now use ElasticaHandler instead of ElasticSearchHandler - * Added NoopHandler which is similar to the NullHandle but does not prevent the bubbling of log records to handlers further down the configuration, useful for temporarily disabling a handler in configuration files - * Added ProcessHandler to write log output to the STDIN of a given process - * Added HostnameProcessor that adds the machine's hostname to log records - * Added a `$dateFormat` option to the PsrLogMessageProcessor which lets you format DateTime instances nicely - * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler - * Fixed many minor issues in various handlers, and probably added a few regressions too - -### 1.26.1 (2021-05-28) - - * Fixed PHP 8.1 deprecation warning - -### 1.26.0 (2020-12-14) - - * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x) - -### 1.25.5 (2020-07-23) - - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 1.25.4 (2020-05-22) - - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 1.25.3 (2019-12-20) - - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 1.25.2 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - -### 1.25.1 (2019-09-06) - - * Fixed forward-compatible interfaces to be compatible with Monolog 1.x too. - -### 1.25.0 (2019-09-06) - - * Deprecated SlackbotHandler, use SlackWebhookHandler or SlackHandler instead - * Deprecated RavenHandler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead - * Deprecated HipChatHandler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead - * Added forward-compatible interfaces and traits FormattableHandlerInterface, FormattableHandlerTrait, ProcessableHandlerInterface, ProcessableHandlerTrait. If you use modern PHP and want to make code compatible with Monolog 1 and 2 this can help. You will have to require at least Monolog 1.25 though. - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed issue in SignalHandler restarting syscalls functionality - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed ZendMonitorHandler to work with the latest Zend Server versions - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - -### 1.24.0 (2018-11-05) - - * BC Notice: If you are extending any of the Monolog's Formatters' `normalize` method, make sure you add the new `$depth = 0` argument to your function signature to avoid strict PHP warnings. - * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors - * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) - * Added a way to log signals being received using Monolog\SignalHandler - * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler - * Added InsightOpsHandler to migrate users of the LogEntriesHandler - * Added protection to NormalizerFormatter against circular and very deep structures, it now stops normalizing at a depth of 9 - * Added capture of stack traces to ErrorHandler when logging PHP errors - * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts - * Added forwarding of context info to FluentdFormatter - * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example - * Added ability to extend/override BrowserConsoleHandler - * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility - * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility - * Dropped official support for HHVM in test builds - * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain - * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases - * Fixed HipChatHandler bug where slack dropped messages randomly - * Fixed normalization of objects in Slack handlers - * Fixed support for PHP7's Throwable in NewRelicHandler - * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory - * Fixed table row styling issues in HtmlFormatter - * Fixed RavenHandler dropping the message when logging exception - * Fixed WhatFailureGroupHandler skipping processors when using handleBatch - and implement it where possible - * Fixed display of anonymous class names - -### 1.23.0 (2017-06-19) - - * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument - * Fixed GelfHandler truncation to be per field and not per message - * Fixed compatibility issue with PHP <5.3.6 - * Fixed support for headless Chrome in ChromePHPHandler - * Fixed support for latest Aws SDK in DynamoDbHandler - * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler - -### 1.22.1 (2017-03-13) - - * Fixed lots of minor issues in the new Slack integrations - * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces - -### 1.22.0 (2016-11-26) - - * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily - * Added MercurialProcessor to add mercurial revision and branch names to log records - * Added support for AWS SDK v3 in DynamoDbHandler - * Fixed fatal errors occurring when normalizing generators that have been fully consumed - * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) - * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore - * Fixed SyslogUdpHandler to avoid sending empty frames - * Fixed a few PHP 7.0 and 7.1 compatibility issues - -### 1.21.0 (2016-07-29) - - * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues - * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order - * Added ability to format the main line of text the SlackHandler sends by explicitly setting a formatter on the handler - * Added information about SoapFault instances in NormalizerFormatter - * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level - -### 1.20.0 (2016-07-02) - - * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy - * Added StreamHandler::getUrl to retrieve the stream's URL - * Added ability to override addRow/addTitle in HtmlFormatter - * Added the $context to context information when the ErrorHandler handles a regular php error - * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d - * Fixed WhatFailureGroupHandler to work with PHP7 throwables - * Fixed a few minor bugs - -### 1.19.0 (2016-04-12) - - * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed - * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors - * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler - * Fixed HipChatHandler handling of long messages - -### 1.18.2 (2016-04-02) - - * Fixed ElasticaFormatter to use more precise dates - * Fixed GelfMessageFormatter sending too long messages - -### 1.18.1 (2016-03-13) - - * Fixed SlackHandler bug where slack dropped messages randomly - * Fixed RedisHandler issue when using with the PHPRedis extension - * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension - * Fixed BrowserConsoleHandler regression - -### 1.18.0 (2016-03-01) - - * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond - * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames - * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name - * Added FluentdFormatter for the Fluentd unix socket protocol - * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed - * Added support for replacing context sub-keys using `%context.*%` in LineFormatter - * Added support for `payload` context value in RollbarHandler - * Added setRelease to RavenHandler to describe the application version, sent with every log - * Added support for `fingerprint` context value in RavenHandler - * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed - * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` - * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places - -### 1.17.2 (2015-10-14) - - * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers - * Fixed SlackHandler handling to use slack functionalities better - * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id - * Fixed 5.3 compatibility regression - -### 1.17.1 (2015-08-31) - - * Fixed RollbarHandler triggering PHP notices - -### 1.17.0 (2015-08-30) - - * Added support for `checksum` and `release` context/extra values in RavenHandler - * Added better support for exceptions in RollbarHandler - * Added UidProcessor::getUid - * Added support for showing the resource type in NormalizedFormatter - * Fixed IntrospectionProcessor triggering PHP notices - -### 1.16.0 (2015-08-09) - - * Added IFTTTHandler to notify ifttt.com triggers - * Added Logger::setHandlers() to allow setting/replacing all handlers - * Added $capSize in RedisHandler to cap the log size - * Fixed StreamHandler creation of directory to only trigger when the first log write happens - * Fixed bug in the handling of curl failures - * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler - * Fixed missing fatal errors records with handlers that need to be closed to flush log records - * Fixed TagProcessor::addTags support for associative arrays - -### 1.15.0 (2015-07-12) - - * Added addTags and setTags methods to change a TagProcessor - * Added automatic creation of directories if they are missing for a StreamHandler to open a log file - * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure - * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used - * Fixed HTML/JS escaping in BrowserConsoleHandler - * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) - -### 1.14.0 (2015-06-19) - - * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library - * Added support for objects implementing __toString in the NormalizerFormatter - * Added support for HipChat's v2 API in HipChatHandler - * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app - * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) - * Fixed curl errors being silently suppressed - -### 1.13.1 (2015-03-09) - - * Fixed regression in HipChat requiring a new token to be created - -### 1.13.0 (2015-03-05) - - * Added Registry::hasLogger to check for the presence of a logger instance - * Added context.user support to RavenHandler - * Added HipChat API v2 support in the HipChatHandler - * Added NativeMailerHandler::addParameter to pass params to the mail() process - * Added context data to SlackHandler when $includeContextAndExtra is true - * Added ability to customize the Swift_Message per-email in SwiftMailerHandler - * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided - * Fixed serialization of INF and NaN values in Normalizer and LineFormatter - -### 1.12.0 (2014-12-29) - - * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. - * Added PsrHandler to forward records to another PSR-3 logger - * Added SamplingHandler to wrap around a handler and include only every Nth record - * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) - * Added exception codes in the output of most formatters - * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) - * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data - * Added $host to HipChatHandler for users of private instances - * Added $transactionName to NewRelicHandler and support for a transaction_name context value - * Fixed MandrillHandler to avoid outputting API call responses - * Fixed some non-standard behaviors in SyslogUdpHandler - -### 1.11.0 (2014-09-30) - - * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names - * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails - * Added MandrillHandler to send emails via the Mandrillapp.com API - * Added SlackHandler to log records to a Slack.com account - * Added FleepHookHandler to log records to a Fleep.io account - * Added LogglyHandler::addTag to allow adding tags to an existing handler - * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end - * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing - * Added support for PhpAmqpLib in the AmqpHandler - * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs - * Added support for adding extra fields from $_SERVER in the WebProcessor - * Fixed support for non-string values in PrsLogMessageProcessor - * Fixed SwiftMailer messages being sent with the wrong date in long running scripts - * Fixed minor PHP 5.6 compatibility issues - * Fixed BufferHandler::close being called twice - -### 1.10.0 (2014-06-04) - - * Added Logger::getHandlers() and Logger::getProcessors() methods - * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached - * Added support for extra data in NewRelicHandler - * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines - -### 1.9.1 (2014-04-24) - - * Fixed regression in RotatingFileHandler file permissions - * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records - * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative - -### 1.9.0 (2014-04-20) - - * Added LogEntriesHandler to send logs to a LogEntries account - * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler - * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes - * Added support for table formatting in FirePHPHandler via the table context key - * Added a TagProcessor to add tags to records, and support for tags in RavenHandler - * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files - * Added sound support to the PushoverHandler - * Fixed multi-threading support in StreamHandler - * Fixed empty headers issue when ChromePHPHandler received no records - * Fixed default format of the ErrorLogHandler - -### 1.8.0 (2014-03-23) - - * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them - * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output - * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler - * Added FlowdockHandler to send logs to a Flowdock account - * Added RollbarHandler to send logs to a Rollbar account - * Added HtmlFormatter to send prettier log emails with colors for each log level - * Added GitProcessor to add the current branch/commit to extra record data - * Added a Monolog\Registry class to allow easier global access to pre-configured loggers - * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement - * Added support for HHVM - * Added support for Loggly batch uploads - * Added support for tweaking the content type and encoding in NativeMailerHandler - * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor - * Fixed batch request support in GelfHandler - -### 1.7.0 (2013-11-14) - - * Added ElasticSearchHandler to send logs to an Elastic Search server - * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB - * Added SyslogUdpHandler to send logs to a remote syslogd server - * Added LogglyHandler to send logs to a Loggly account - * Added $level to IntrospectionProcessor so it only adds backtraces when needed - * Added $version to LogstashFormatter to allow using the new v1 Logstash format - * Added $appName to NewRelicHandler - * Added configuration of Pushover notification retries/expiry - * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default - * Added chainability to most setters for all handlers - * Fixed RavenHandler batch processing so it takes the message from the record with highest priority - * Fixed HipChatHandler batch processing so it sends all messages at once - * Fixed issues with eAccelerator - * Fixed and improved many small things - -### 1.6.0 (2013-07-29) - - * Added HipChatHandler to send logs to a HipChat chat room - * Added ErrorLogHandler to send logs to PHP's error_log function - * Added NewRelicHandler to send logs to NewRelic's service - * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler - * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel - * Added stack traces output when normalizing exceptions (json output & co) - * Added Monolog\Logger::API constant (currently 1) - * Added support for ChromePHP's v4.0 extension - * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel - * Added support for sending messages to multiple users at once with the PushoverHandler - * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) - * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now - * Fixed issue in RotatingFileHandler when an open_basedir restriction is active - * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 - * Fixed SyslogHandler issue when many were used concurrently with different facilities - -### 1.5.0 (2013-04-23) - - * Added ProcessIdProcessor to inject the PID in log records - * Added UidProcessor to inject a unique identifier to all log records of one request/run - * Added support for previous exceptions in the LineFormatter exception serialization - * Added Monolog\Logger::getLevels() to get all available levels - * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle - -### 1.4.1 (2013-04-01) - - * Fixed exception formatting in the LineFormatter to be more minimalistic - * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 - * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days - * Fixed WebProcessor array access so it checks for data presence - * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors - -### 1.4.0 (2013-02-13) - - * Added RedisHandler to log to Redis via the Predis library or the phpredis extension - * Added ZendMonitorHandler to log to the Zend Server monitor - * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor - * Added `$useSSL` option to the PushoverHandler which is enabled by default - * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously - * Fixed header injection capability in the NativeMailHandler - -### 1.3.1 (2013-01-11) - - * Fixed LogstashFormatter to be usable with stream handlers - * Fixed GelfMessageFormatter levels on Windows - -### 1.3.0 (2013-01-08) - - * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` - * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance - * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) - * Added PushoverHandler to send mobile notifications - * Added CouchDBHandler and DoctrineCouchDBHandler - * Added RavenHandler to send data to Sentry servers - * Added support for the new MongoClient class in MongoDBHandler - * Added microsecond precision to log records' timestamps - * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing - the oldest entries - * Fixed normalization of objects with cyclic references - -### 1.2.1 (2012-08-29) - - * Added new $logopts arg to SyslogHandler to provide custom openlog options - * Fixed fatal error in SyslogHandler - -### 1.2.0 (2012-08-18) - - * Added AmqpHandler (for use with AMQP servers) - * Added CubeHandler - * Added NativeMailerHandler::addHeader() to send custom headers in mails - * Added the possibility to specify more than one recipient in NativeMailerHandler - * Added the possibility to specify float timeouts in SocketHandler - * Added NOTICE and EMERGENCY levels to conform with RFC 5424 - * Fixed the log records to use the php default timezone instead of UTC - * Fixed BufferHandler not being flushed properly on PHP fatal errors - * Fixed normalization of exotic resource types - * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog - -### 1.1.0 (2012-04-23) - - * Added Monolog\Logger::isHandling() to check if a handler will - handle the given log level - * Added ChromePHPHandler - * Added MongoDBHandler - * Added GelfHandler (for use with Graylog2 servers) - * Added SocketHandler (for use with syslog-ng for example) - * Added NormalizerFormatter - * Added the possibility to change the activation strategy of the FingersCrossedHandler - * Added possibility to show microseconds in logs - * Added `server` and `referer` to WebProcessor output - -### 1.0.2 (2011-10-24) - - * Fixed bug in IE with large response headers and FirePHPHandler - -### 1.0.1 (2011-08-25) - - * Added MemoryPeakUsageProcessor and MemoryUsageProcessor - * Added Monolog\Logger::getName() to get a logger's channel name - -### 1.0.0 (2011-07-06) - - * Added IntrospectionProcessor to get info from where the logger was called - * Fixed WebProcessor in CLI - -### 1.0.0-RC1 (2011-07-01) - - * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE deleted file mode 100644 index aa2a0426..00000000 --- a/vendor/monolog/monolog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2020 Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/monolog/monolog/README.md b/vendor/monolog/monolog/README.md deleted file mode 100644 index c54d83cb..00000000 --- a/vendor/monolog/monolog/README.md +++ /dev/null @@ -1,136 +0,0 @@ -![Monolog](logo.jpg) - -# Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions) - -[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) -[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) - ->**Note** This is the **documentation for Monolog 3.x**, if you are using older releases ->see the documentation for [Monolog 2.x](https://github.com/Seldaek/monolog/blob/2.x/README.md) or [Monolog 1.x](https://github.com/Seldaek/monolog/blob/1.x/README.md) - -Monolog sends your logs to files, sockets, inboxes, databases and various -web services. See the complete list of handlers below. Special handlers -allow you to build advanced logging strategies. - -This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -interface that you can type-hint against in your own libraries to keep -a maximum of interoperability. You can also use it in your applications to -make sure you can always use another compatible logger at a later time. -As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. -Internally Monolog still uses its own level scheme since it predates PSR-3. - -
      - -## Installation - -Install the latest version with - -```bash -composer require monolog/monolog -``` - -## Basic Usage - -```php -pushHandler(new StreamHandler('path/to/your.log', Level::Warning)); - -// add records to the log -$log->warning('Foo'); -$log->error('Bar'); -``` - -## Documentation - -- [Usage Instructions](doc/01-usage.md) -- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) -- [Utility Classes](doc/03-utilities.md) -- [Extending Monolog](doc/04-extending.md) -- [Log Record Structure](doc/message-structure.md) - -## Support Monolog Financially - -Get supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog&utm_medium=referral&utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek). - -Tidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. - -## Third Party Packages - -Third party handlers, formatters and processors are -[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You -can also add your own there if you publish one. - -## About - -### Requirements - -- Monolog `^3.0` works with PHP 8.1 or above. -- Monolog `^2.5` works with PHP 7.2 or above. -- Monolog `^1.25` works with PHP 5.3 up to 8.1, but is not very maintained anymore and will not receive PHP support fixes anymore. - -### Support - -Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 or 3 where possible to benefit from all the latest features and fixes. - -### Submitting bugs and feature requests - -Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) - -### Framework Integrations - -- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) - can be used very easily with Monolog since it implements the interface. -- [Symfony](http://symfony.com) comes out of the box with Monolog. -- [Laravel](http://laravel.com/) comes out of the box with Monolog. -- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. -- [PPI](https://github.com/ppi/framework) comes out of the box with Monolog. -- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. -- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. -- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. -- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. -- [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions. -- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. -- [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog. -- [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog. -- [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins. -- [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog. -- [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog. -- [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module. -- [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension. -- [Magento](https://magento.com/) comes out of the box with Monolog. -- [Spiral Framework](https://spiral.dev) comes out of the box with Monolog bridge. - -### Author - -Jordi Boggiano - -
      -See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project. - -### License - -Monolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details - -### Acknowledgements - -This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) -library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json deleted file mode 100644 index 30a99d7a..00000000 --- a/vendor/monolog/monolog/composer.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "monolog/monolog", - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "keywords": ["log", "logging", "psr-3"], - "homepage": "https://github.com/Seldaek/monolog", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "require-dev": { - "ext-json": "*", - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-openssl": "Required to send log messages using SSL" - }, - "autoload": { - "psr-4": {"Monolog\\": "src/Monolog"} - }, - "autoload-dev": { - "psr-4": {"Monolog\\": "tests/Monolog"} - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "scripts": { - "test": "@php vendor/bin/phpunit", - "phpstan": "@php vendor/bin/phpstan analyse" - }, - "config": { - "lock": false, - "sort-packages": true, - "platform-check": false - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php b/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php deleted file mode 100644 index c519e053..00000000 --- a/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Attribute; - -/** - * A reusable attribute to help configure a class or a method as a processor. - * - * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. - * - * Using it with the Monolog library only has no effect at all: processors should still be turned into a callable if - * needed and manually pushed to the loggers and to the processable handlers. - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsMonologProcessor -{ - /** - * @param string|null $channel The logging channel the processor should be pushed to. - * @param string|null $handler The handler the processor should be pushed to. - * @param string|null $method The method that processes the records (if the attribute is used at the class level). - * @param int|null $priority The priority of the processor so the order can be determined. - */ - public function __construct( - public readonly ?string $channel = null, - public readonly ?string $handler = null, - public readonly ?string $method = null, - public readonly ?int $priority = null - ) { - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php b/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php deleted file mode 100644 index 862e05b3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Attribute/WithMonologChannel.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Attribute; - -/** - * A reusable attribute to help configure a class as expecting a given logger channel. - * - * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. - * - * Using it with the Monolog library only has no effect at all: wiring the logger instance into - * other classes is not managed by Monolog. - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -final class WithMonologChannel -{ - public function __construct( - public readonly string $channel - ) { - } -} diff --git a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php b/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php deleted file mode 100644 index 3d9477f4..00000000 --- a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use DateTimeZone; - -/** - * Overrides default json encoding of date time objects - * - * @author Menno Holtkamp - * @author Jordi Boggiano - */ -class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable -{ - private bool $useMicroseconds; - - public function __construct(bool $useMicroseconds, ?DateTimeZone $timezone = null) - { - $this->useMicroseconds = $useMicroseconds; - - // if you like to use a custom time to pass to Logger::addRecord directly, - // call modify() or setTimestamp() on this instance to change the date after creating it - parent::__construct('now', $timezone); - } - - public function jsonSerialize(): string - { - if ($this->useMicroseconds) { - return $this->format('Y-m-d\TH:i:s.uP'); - } - - return $this->format('Y-m-d\TH:i:sP'); - } - - public function __toString(): string - { - return $this->jsonSerialize(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php deleted file mode 100644 index 452778b8..00000000 --- a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ /dev/null @@ -1,279 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Closure; -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; - -/** - * Monolog error handler - * - * A facility to enable logging of runtime errors, exceptions and fatal errors. - * - * Quick setup: ErrorHandler::register($logger); - * - * @author Jordi Boggiano - */ -class ErrorHandler -{ - private Closure|null $previousExceptionHandler = null; - - /** @var array an array of class name to LogLevel::* constant mapping */ - private array $uncaughtExceptionLevelMap = []; - - /** @var Closure|true|null */ - private Closure|bool|null $previousErrorHandler = null; - - /** @var array an array of E_* constant to LogLevel::* constant mapping */ - private array $errorLevelMap = []; - - private bool $handleOnlyReportedErrors = true; - - private bool $hasFatalErrorHandler = false; - - private string $fatalLevel = LogLevel::ALERT; - - private string|null $reservedMemory = null; - - /** @var ?array{type: int, message: string, file: string, line: int, trace: mixed} */ - private array|null $lastFatalData = null; - - private const FATAL_ERRORS = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; - - public function __construct( - private LoggerInterface $logger - ) { - } - - /** - * Registers a new ErrorHandler for a given Logger - * - * By default it will handle errors, exceptions and fatal errors - * - * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling - * @param array|false $exceptionLevelMap an array of class name to LogLevel::* constant mapping, or false to disable exception handling - * @param LogLevel::*|null|false $fatalLevel a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling - * @return static - */ - public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self - { - /** @phpstan-ignore-next-line */ - $handler = new static($logger); - if ($errorLevelMap !== false) { - $handler->registerErrorHandler($errorLevelMap); - } - if ($exceptionLevelMap !== false) { - $handler->registerExceptionHandler($exceptionLevelMap); - } - if ($fatalLevel !== false) { - $handler->registerFatalHandler($fatalLevel); - } - - return $handler; - } - - /** - * @param array $levelMap an array of class name to LogLevel::* constant mapping - * @return $this - */ - public function registerExceptionHandler(array $levelMap = [], bool $callPrevious = true): self - { - $prev = set_exception_handler(function (\Throwable $e): void { - $this->handleException($e); - }); - $this->uncaughtExceptionLevelMap = $levelMap; - foreach ($this->defaultExceptionLevelMap() as $class => $level) { - if (!isset($this->uncaughtExceptionLevelMap[$class])) { - $this->uncaughtExceptionLevelMap[$class] = $level; - } - } - if ($callPrevious && null !== $prev) { - $this->previousExceptionHandler = $prev(...); - } - - return $this; - } - - /** - * @param array $levelMap an array of E_* constant to LogLevel::* constant mapping - * @return $this - */ - public function registerErrorHandler(array $levelMap = [], bool $callPrevious = true, int $errorTypes = -1, bool $handleOnlyReportedErrors = true): self - { - $prev = set_error_handler($this->handleError(...), $errorTypes); - $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); - if ($callPrevious) { - $this->previousErrorHandler = $prev !== null ? $prev(...) : true; - } else { - $this->previousErrorHandler = null; - } - - $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; - - return $this; - } - - /** - * @param LogLevel::*|null $level a LogLevel::* constant, null to use the default LogLevel::ALERT - * @param int $reservedMemorySize Amount of KBs to reserve in memory so that it can be freed when handling fatal errors giving Monolog some room in memory to get its job done - * @return $this - */ - public function registerFatalHandler($level = null, int $reservedMemorySize = 20): self - { - register_shutdown_function($this->handleFatalError(...)); - - $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); - $this->fatalLevel = null === $level ? LogLevel::ALERT : $level; - $this->hasFatalErrorHandler = true; - - return $this; - } - - /** - * @return array - */ - protected function defaultExceptionLevelMap(): array - { - return [ - 'ParseError' => LogLevel::CRITICAL, - 'Throwable' => LogLevel::ERROR, - ]; - } - - /** - * @return array - */ - protected function defaultErrorLevelMap(): array - { - return [ - E_ERROR => LogLevel::CRITICAL, - E_WARNING => LogLevel::WARNING, - E_PARSE => LogLevel::ALERT, - E_NOTICE => LogLevel::NOTICE, - E_CORE_ERROR => LogLevel::CRITICAL, - E_CORE_WARNING => LogLevel::WARNING, - E_COMPILE_ERROR => LogLevel::ALERT, - E_COMPILE_WARNING => LogLevel::WARNING, - E_USER_ERROR => LogLevel::ERROR, - E_USER_WARNING => LogLevel::WARNING, - E_USER_NOTICE => LogLevel::NOTICE, - E_STRICT => LogLevel::NOTICE, - E_RECOVERABLE_ERROR => LogLevel::ERROR, - E_DEPRECATED => LogLevel::NOTICE, - E_USER_DEPRECATED => LogLevel::NOTICE, - ]; - } - - private function handleException(\Throwable $e): never - { - $level = LogLevel::ERROR; - foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) { - if ($e instanceof $class) { - $level = $candidate; - break; - } - } - - $this->logger->log( - $level, - sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), - ['exception' => $e] - ); - - if (null !== $this->previousExceptionHandler) { - ($this->previousExceptionHandler)($e); - } - - if (!headers_sent() && \in_array(strtolower((string) \ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { - http_response_code(500); - } - - exit(255); - } - - private function handleError(int $code, string $message, string $file = '', int $line = 0): bool - { - if ($this->handleOnlyReportedErrors && 0 === (error_reporting() & $code)) { - return false; - } - - // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries - if (!$this->hasFatalErrorHandler || !\in_array($code, self::FATAL_ERRORS, true)) { - $level = $this->errorLevelMap[$code] ?? LogLevel::CRITICAL; - $this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]); - } else { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - array_shift($trace); // Exclude handleError from trace - $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; - } - - if ($this->previousErrorHandler === true) { - return false; - } - if ($this->previousErrorHandler instanceof Closure) { - return (bool) ($this->previousErrorHandler)($code, $message, $file, $line); - } - - return true; - } - - /** - * @private - */ - public function handleFatalError(): void - { - $this->reservedMemory = ''; - - if (\is_array($this->lastFatalData)) { - $lastError = $this->lastFatalData; - } else { - $lastError = error_get_last(); - } - if (\is_array($lastError) && \in_array($lastError['type'], self::FATAL_ERRORS, true)) { - $trace = $lastError['trace'] ?? null; - $this->logger->log( - $this->fatalLevel, - 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] - ); - - if ($this->logger instanceof Logger) { - foreach ($this->logger->getHandlers() as $handler) { - $handler->close(); - } - } - } - } - - private static function codeToString(int $code): string - { - return match ($code) { - E_ERROR => 'E_ERROR', - E_WARNING => 'E_WARNING', - E_PARSE => 'E_PARSE', - E_NOTICE => 'E_NOTICE', - E_CORE_ERROR => 'E_CORE_ERROR', - E_CORE_WARNING => 'E_CORE_WARNING', - E_COMPILE_ERROR => 'E_COMPILE_ERROR', - E_COMPILE_WARNING => 'E_COMPILE_WARNING', - E_USER_ERROR => 'E_USER_ERROR', - E_USER_WARNING => 'E_USER_WARNING', - E_USER_NOTICE => 'E_USER_NOTICE', - E_STRICT => 'E_STRICT', - E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - E_DEPRECATED => 'E_DEPRECATED', - E_USER_DEPRECATED => 'E_USER_DEPRECATED', - default => 'Unknown PHP error', - }; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php deleted file mode 100644 index beb5106a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Formats a log message according to the ChromePHP array format - * - * @author Christophe Coevoet - */ -class ChromePHPFormatter implements FormatterInterface -{ - /** - * Translates Monolog log levels to Wildfire levels. - * - * @return 'log'|'info'|'warn'|'error' - */ - private function toWildfireLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'log', - Level::Info => 'info', - Level::Notice => 'info', - Level::Warning => 'warn', - Level::Error => 'error', - Level::Critical => 'error', - Level::Alert => 'error', - Level::Emergency => 'error', - }; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $backtrace = 'unknown'; - if (isset($record->extra['file'], $record->extra['line'])) { - $backtrace = $record->extra['file'].' : '.$record->extra['line']; - unset($record->extra['file'], $record->extra['line']); - } - - $message = ['message' => $record->message]; - if (\count($record->context) > 0) { - $message['context'] = $record->context; - } - if (\count($record->extra) > 0) { - $message['extra'] = $record->extra; - } - if (\count($message) === 1) { - $message = reset($message); - } - - return [ - $record->channel, - $message, - $backtrace, - $this->toWildfireLevel($record->level), - ]; - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records) - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php deleted file mode 100644 index 8c92eff2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Elastica\Document; -use Monolog\LogRecord; - -/** - * Format a log message into an Elastica Document - * - * @author Jelle Vink - */ -class ElasticaFormatter extends NormalizerFormatter -{ - /** - * @var string Elastic search index name - */ - protected string $index; - - /** - * @var string|null Elastic search document type - */ - protected string|null $type; - - /** - * @param string $index Elastic Search index name - * @param ?string $type Elastic Search document type, deprecated as of Elastica 7 - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $index, ?string $type) - { - // elasticsearch requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->index = $index; - $this->type = $type; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - public function getIndex(): string - { - return $this->index; - } - - /** - * @deprecated since Elastica 7 type has no effect - */ - public function getType(): string - { - /** @phpstan-ignore-next-line */ - return $this->type; - } - - /** - * Convert a log message into an Elastica Document - * - * @param mixed[] $record - */ - protected function getDocument(array $record): Document - { - $document = new Document(); - $document->setData($record); - if (method_exists($document, 'setType')) { - $document->setType($this->type); - } - $document->setIndex($this->index); - - return $document; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php deleted file mode 100644 index b38aca07..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use DateTimeInterface; -use Monolog\LogRecord; - -/** - * Format a log message into an Elasticsearch record - * - * @author Avtandil Kikabidze - */ -class ElasticsearchFormatter extends NormalizerFormatter -{ - /** - * @var string Elasticsearch index name - */ - protected string $index; - - /** - * @var string Elasticsearch record type - */ - protected string $type; - - /** - * @param string $index Elasticsearch index name - * @param string $type Elasticsearch record type - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $index, string $type) - { - // Elasticsearch requires an ISO 8601 format date with optional millisecond precision. - parent::__construct(DateTimeInterface::ISO8601); - - $this->index = $index; - $this->type = $type; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - /** - * Getter index - */ - public function getIndex(): string - { - return $this->index; - } - - /** - * Getter type - */ - public function getType(): string - { - return $this->type; - } - - /** - * Convert a log message into an Elasticsearch record - * - * @param mixed[] $record Log message - * @return mixed[] - */ - protected function getDocument(array $record): array - { - $record['_index'] = $this->index; - $record['_type'] = $this->type; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php deleted file mode 100644 index cc805c89..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * formats the record to be used in the FlowdockHandler - * - * @author Dominik Liebler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockFormatter implements FormatterInterface -{ - private string $source; - - private string $sourceEmail; - - public function __construct(string $source, string $sourceEmail) - { - $this->source = $source; - $this->sourceEmail = $sourceEmail; - } - - /** - * @inheritDoc - * - * @return mixed[] - */ - public function format(LogRecord $record): array - { - $tags = [ - '#logs', - '#' . $record->level->toPsrLogLevel(), - '#' . $record->channel, - ]; - - foreach ($record->extra as $value) { - $tags[] = '#' . $value; - } - - $subject = sprintf( - 'in %s: %s - %s', - $this->source, - $record->level->getName(), - $this->getShortMessage($record->message) - ); - - return [ - 'source' => $this->source, - 'from_address' => $this->sourceEmail, - 'subject' => $subject, - 'content' => $record->message, - 'tags' => $tags, - 'project' => $this->source, - ]; - } - - /** - * @inheritDoc - * - * @return mixed[][] - */ - public function formatBatch(array $records): array - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } - - public function getShortMessage(string $message): string - { - static $hasMbString; - - if (null === $hasMbString) { - $hasMbString = \function_exists('mb_strlen'); - } - - $maxLength = 45; - - if ($hasMbString) { - if (mb_strlen($message, 'UTF-8') > $maxLength) { - $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; - } - } else { - if (\strlen($message) > $maxLength) { - $message = substr($message, 0, $maxLength - 4) . ' ...'; - } - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php deleted file mode 100644 index 0c9f3e16..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Class FluentdFormatter - * - * Serializes a log message to Fluentd unix socket protocol - * - * Fluentd config: - * - * - * type unix - * path /var/run/td-agent/td-agent.sock - * - * - * Monolog setup: - * - * $logger = new Monolog\Logger('fluent.tag'); - * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); - * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); - * $logger->pushHandler($fluentHandler); - * - * @author Andrius Putna - */ -class FluentdFormatter implements FormatterInterface -{ - /** - * @var bool $levelTag should message level be a part of the fluentd tag - */ - protected bool $levelTag = false; - - /** - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(bool $levelTag = false) - { - if (!\function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); - } - - $this->levelTag = $levelTag; - } - - public function isUsingLevelsInTag(): bool - { - return $this->levelTag; - } - - public function format(LogRecord $record): string - { - $tag = $record->channel; - if ($this->levelTag) { - $tag .= '.' . $record->level->toPsrLogLevel(); - } - - $message = [ - 'message' => $record->message, - 'context' => $record->context, - 'extra' => $record->extra, - ]; - - if (!$this->levelTag) { - $message['level'] = $record->level->value; - $message['level_name'] = $record->level->getName(); - } - - return Utils::jsonEncode([$tag, $record->datetime->getTimestamp(), $message]); - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php deleted file mode 100644 index 3413a4b0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Interface for formatters - * - * @author Jordi Boggiano - */ -interface FormatterInterface -{ - /** - * Formats a log record. - * - * @param LogRecord $record A record to format - * @return mixed The formatted record - */ - public function format(LogRecord $record); - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - */ - public function formatBatch(array $records); -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php deleted file mode 100644 index dd6fefbc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Gelf\Message; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Serializes a log message to GELF - * @see http://docs.graylog.org/en/latest/pages/gelf.html - * - * @author Matt Lehner - */ -class GelfMessageFormatter extends NormalizerFormatter -{ - protected const DEFAULT_MAX_LENGTH = 32766; - - /** - * @var string the name of the system for the Gelf log message - */ - protected string $systemName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected string $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected string $contextPrefix; - - /** - * @var int max length per field - */ - protected int $maxLength; - - /** - * Translates Monolog log levels to Graylog2 log priorities. - */ - private function getGraylog2Priority(Level $level): int - { - return match ($level) { - Level::Debug => 7, - Level::Info => 6, - Level::Notice => 5, - Level::Warning => 4, - Level::Error => 3, - Level::Critical => 2, - Level::Alert => 1, - Level::Emergency => 0, - }; - } - - /** - * @throws \RuntimeException - */ - public function __construct(?string $systemName = null, ?string $extraPrefix = null, string $contextPrefix = 'ctxt_', ?int $maxLength = null) - { - if (!class_exists(Message::class)) { - throw new \RuntimeException('Composer package graylog2/gelf-php is required to use Monolog\'s GelfMessageFormatter'); - } - - parent::__construct('U.u'); - - $this->systemName = (null === $systemName || $systemName === '') ? (string) gethostname() : $systemName; - - $this->extraPrefix = null === $extraPrefix ? '' : $extraPrefix; - $this->contextPrefix = $contextPrefix; - $this->maxLength = null === $maxLength ? self::DEFAULT_MAX_LENGTH : $maxLength; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): Message - { - $context = $extra = []; - if (isset($record->context)) { - /** @var mixed[] $context */ - $context = parent::normalize($record->context); - } - if (isset($record->extra)) { - /** @var mixed[] $extra */ - $extra = parent::normalize($record->extra); - } - - $message = new Message(); - $message - ->setTimestamp($record->datetime) - ->setShortMessage($record->message) - ->setHost($this->systemName) - ->setLevel($this->getGraylog2Priority($record->level)); - - // message length + system name length + 200 for padding / metadata - $len = 200 + \strlen($record->message) + \strlen($this->systemName); - - if ($len > $this->maxLength) { - $message->setShortMessage(Utils::substr($record->message, 0, $this->maxLength)); - } - - if (isset($record->channel)) { - $message->setAdditional('facility', $record->channel); - } - - foreach ($extra as $key => $val) { - $val = \is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = \strlen($this->extraPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->extraPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->extraPrefix . $key, $val); - } - - foreach ($context as $key => $val) { - $val = \is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = \strlen($this->contextPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->contextPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->contextPrefix . $key, $val); - } - - if (!$message->hasAdditional('file') && isset($context['exception']['file'])) { - if (1 === preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { - $message->setAdditional('file', $matches[1]); - $message->setAdditional('line', $matches[2]); - } - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php deleted file mode 100644 index c97b9122..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use DateTimeInterface; -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Cloud logging. - * - * @see https://cloud.google.com/logging/docs/structured-logging - * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry - * - * @author Luís Cobucci - */ -class GoogleCloudLoggingFormatter extends JsonFormatter -{ - protected function normalizeRecord(LogRecord $record): array - { - $normalized = parent::normalizeRecord($record); - - // Re-key level for GCP logging - $normalized['severity'] = $normalized['level_name']; - $normalized['time'] = $record->datetime->format(DateTimeInterface::RFC3339_EXTENDED); - - // Remove keys that are not used by GCP - unset($normalized['level'], $normalized['level_name'], $normalized['datetime']); - - return $normalized; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php deleted file mode 100644 index b5d69bcf..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats incoming records into an HTML table - * - * This is especially useful for html email logging - * - * @author Tiago Brito - */ -class HtmlFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to html color priorities. - */ - protected function getLevelColor(Level $level): string - { - return match ($level) { - Level::Debug => '#CCCCCC', - Level::Info => '#28A745', - Level::Notice => '#17A2B8', - Level::Warning => '#FFC107', - Level::Error => '#FD7E14', - Level::Critical => '#DC3545', - Level::Alert => '#821722', - Level::Emergency => '#000000', - }; - } - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - } - - /** - * Creates an HTML table row - * - * @param string $th Row header content - * @param string $td Row standard cell content - * @param bool $escapeTd false if td content must not be html escaped - */ - protected function addRow(string $th, string $td = ' ', bool $escapeTd = true): string - { - $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); - if ($escapeTd) { - $td = '
      '.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
      '; - } - - return "\n$th:\n".$td."\n"; - } - - /** - * Create a HTML h1 tag - * - * @param string $title Text to be in the h1 - */ - protected function addTitle(string $title, Level $level): string - { - $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); - - return '

      '.$title.'

      '; - } - - /** - * Formats a log record. - * - * @return string The formatted record - */ - public function format(LogRecord $record): string - { - $output = $this->addTitle($record->level->getName(), $record->level); - $output .= ''; - - $output .= $this->addRow('Message', $record->message); - $output .= $this->addRow('Time', $this->formatDate($record->datetime)); - $output .= $this->addRow('Channel', $record->channel); - if (\count($record->context) > 0) { - $embeddedTable = '
      '; - foreach ($record->context as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
      '; - $output .= $this->addRow('Context', $embeddedTable, false); - } - if (\count($record->extra) > 0) { - $embeddedTable = ''; - foreach ($record->extra as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
      '; - $output .= $this->addRow('Extra', $embeddedTable, false); - } - - return $output.''; - } - - /** - * Formats a set of log records. - * - * @return string The formatted set of records - */ - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || \is_scalar($data)) { - return (string) $data; - } - - $data = $this->normalize($data); - - return Utils::jsonEncode($data, JSON_PRETTY_PRINT | Utils::DEFAULT_JSON_FLAGS, true); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php deleted file mode 100644 index 640043a7..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ /dev/null @@ -1,220 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Stringable; -use Throwable; -use Monolog\LogRecord; - -/** - * Encodes whatever record data is passed to it as json - * - * This can be useful to log to databases or remote APIs - * - * @author Jordi Boggiano - */ -class JsonFormatter extends NormalizerFormatter -{ - public const BATCH_MODE_JSON = 1; - public const BATCH_MODE_NEWLINES = 2; - - /** @var self::BATCH_MODE_* */ - protected int $batchMode; - - protected bool $appendNewline; - - protected bool $ignoreEmptyContextAndExtra; - - protected bool $includeStacktraces = false; - - /** - * @param self::BATCH_MODE_* $batchMode - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(int $batchMode = self::BATCH_MODE_JSON, bool $appendNewline = true, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->batchMode = $batchMode; - $this->appendNewline = $appendNewline; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces = $includeStacktraces; - - parent::__construct(); - } - - /** - * The batch mode option configures the formatting style for - * multiple records. By default, multiple records will be - * formatted as a JSON-encoded array. However, for - * compatibility with some API endpoints, alternative styles - * are available. - */ - public function getBatchMode(): int - { - return $this->batchMode; - } - - /** - * True if newlines are appended to every formatted record - */ - public function isAppendingNewlines(): bool - { - return $this->appendNewline; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $normalized = parent::format($record); - - if (isset($normalized['context']) && $normalized['context'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['context']); - } else { - $normalized['context'] = new \stdClass; - } - } - if (isset($normalized['extra']) && $normalized['extra'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['extra']); - } else { - $normalized['extra'] = new \stdClass; - } - } - - return $this->toJson($normalized, true) . ($this->appendNewline ? "\n" : ''); - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records): string - { - return match ($this->batchMode) { - static::BATCH_MODE_NEWLINES => $this->formatBatchNewlines($records), - default => $this->formatBatchJson($records), - }; - } - - /** - * @return $this - */ - public function includeStacktraces(bool $include = true): self - { - $this->includeStacktraces = $include; - - return $this; - } - - /** - * Return a JSON-encoded array of records. - * - * @phpstan-param LogRecord[] $records - */ - protected function formatBatchJson(array $records): string - { - return $this->toJson($this->normalize($records), true); - } - - /** - * Use new lines to separate records instead of a - * JSON-encoded array. - * - * @phpstan-param LogRecord[] $records - */ - protected function formatBatchNewlines(array $records): string - { - $oldNewline = $this->appendNewline; - $this->appendNewline = false; - $formatted = array_map(fn (LogRecord $record) => $this->format($record), $records); - $this->appendNewline = $oldNewline; - - return implode("\n", $formatted); - } - - /** - * Normalizes given $data. - * - * @return null|scalar|array|object - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over '.$this->maxNormalizeDepth.' levels deep, aborting normalization'; - } - - if (\is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over '.$this->maxNormalizeItemCount.' items ('.\count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if (\is_object($data)) { - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - // if the object has specific json serializability we want to make sure we skip the __toString treatment below - if ($data instanceof \JsonSerializable) { - return $data; - } - - if ($data instanceof Stringable) { - return $data->__toString(); - } - - if (\get_class($data) === '__PHP_Incomplete_Class') { - return new \ArrayObject($data); - } - - return $data; - } - - if (\is_resource($data)) { - return parent::normalize($data); - } - - return $data; - } - - /** - * Normalizes given exception with or without its own stack trace based on - * `includeStacktraces` property. - * - * @inheritDoc - */ - protected function normalizeException(Throwable $e, int $depth = 0): array - { - $data = parent::normalizeException($e, $depth); - if (!$this->includeStacktraces) { - unset($data['trace']); - } - - return $data; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php deleted file mode 100644 index ba5852b3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ /dev/null @@ -1,316 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Closure; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats incoming records into a one-line string - * - * This is especially useful for logging to files - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -class LineFormatter extends NormalizerFormatter -{ - public const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; - - protected string $format; - protected bool $allowInlineLineBreaks; - protected bool $ignoreEmptyContextAndExtra; - protected bool $includeStacktraces; - protected ?int $maxLevelNameLength = null; - protected string $indentStacktraces = ''; - protected Closure|null $stacktracesParser = null; - protected string $basePath = ''; - - /** - * @param string|null $format The format of the message - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $format = null, ?string $dateFormat = null, bool $allowInlineLineBreaks = false, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->format = $format === null ? static::SIMPLE_FORMAT : $format; - $this->allowInlineLineBreaks = $allowInlineLineBreaks; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces($includeStacktraces); - parent::__construct($dateFormat); - } - - /** - * Setting a base path will hide the base path from exception and stack trace file names to shorten them - * @return $this - */ - public function setBasePath(string $path = ''): self - { - if ($path !== '') { - $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - } - - $this->basePath = $path; - - return $this; - } - - /** - * @return $this - */ - public function includeStacktraces(bool $include = true, ?Closure $parser = null): self - { - $this->includeStacktraces = $include; - if ($this->includeStacktraces) { - $this->allowInlineLineBreaks = true; - $this->stacktracesParser = $parser; - } - - return $this; - } - - /** - * Indent stack traces to separate them a bit from the main log record messages - * - * @param string $indent The string used to indent, for example " " - * @return $this - */ - public function indentStacktraces(string $indent): self - { - $this->indentStacktraces = $indent; - - return $this; - } - - /** - * @return $this - */ - public function allowInlineLineBreaks(bool $allow = true): self - { - $this->allowInlineLineBreaks = $allow; - - return $this; - } - - /** - * @return $this - */ - public function ignoreEmptyContextAndExtra(bool $ignore = true): self - { - $this->ignoreEmptyContextAndExtra = $ignore; - - return $this; - } - - /** - * Allows cutting the level name to get fixed-length levels like INF for INFO, ERR for ERROR if you set this to 3 for example - * - * @param int|null $maxLevelNameLength Maximum characters for the level name. Set null for infinite length (default) - * @return $this - */ - public function setMaxLevelNameLength(?int $maxLevelNameLength = null): self - { - $this->maxLevelNameLength = $maxLevelNameLength; - - return $this; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $vars = parent::format($record); - - if ($this->maxLevelNameLength !== null) { - $vars['level_name'] = substr($vars['level_name'], 0, $this->maxLevelNameLength); - } - - $output = $this->format; - foreach ($vars['extra'] as $var => $val) { - if (false !== strpos($output, '%extra.'.$var.'%')) { - $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); - unset($vars['extra'][$var]); - } - } - - foreach ($vars['context'] as $var => $val) { - if (false !== strpos($output, '%context.'.$var.'%')) { - $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); - unset($vars['context'][$var]); - } - } - - if ($this->ignoreEmptyContextAndExtra) { - if (\count($vars['context']) === 0) { - unset($vars['context']); - $output = str_replace('%context%', '', $output); - } - - if (\count($vars['extra']) === 0) { - unset($vars['extra']); - $output = str_replace('%extra%', '', $output); - } - } - - foreach ($vars as $var => $val) { - if (false !== strpos($output, '%'.$var.'%')) { - $output = str_replace('%'.$var.'%', $this->stringify($val), $output); - } - } - - // remove leftover %extra.xxx% and %context.xxx% if any - if (false !== strpos($output, '%')) { - $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); - if (null === $output) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to run preg_replace: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - } - - return $output; - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $value - */ - public function stringify($value): string - { - return $this->replaceNewlines($this->convertToString($value)); - } - - protected function normalizeException(\Throwable $e, int $depth = 0): string - { - $str = $this->formatException($e); - - if (($previous = $e->getPrevious()) instanceof \Throwable) { - do { - $depth++; - if ($depth > $this->maxNormalizeDepth) { - $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - break; - } - - $str .= "\n[previous exception] " . $this->formatException($previous); - } while ($previous = $previous->getPrevious()); - } - - return $str; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || \is_bool($data)) { - return var_export($data, true); - } - - if (\is_scalar($data)) { - return (string) $data; - } - - return $this->toJson($data, true); - } - - protected function replaceNewlines(string $str): string - { - if ($this->allowInlineLineBreaks) { - if (0 === strpos($str, '{') || 0 === strpos($str, '[')) { - $str = preg_replace('/(?getCode(); - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $str .= ' faultcode: ' . $e->faultcode; - } - - if (isset($e->faultactor)) { - $str .= ' faultactor: ' . $e->faultactor; - } - - if (isset($e->detail)) { - if (\is_string($e->detail)) { - $str .= ' detail: ' . $e->detail; - } elseif (\is_object($e->detail) || \is_array($e->detail)) { - $str .= ' detail: ' . $this->toJson($e->detail, true); - } - } - } - - $file = $e->getFile(); - if ($this->basePath !== '') { - $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); - } - - $str .= '): ' . $e->getMessage() . ' at ' . $file . ':' . $e->getLine() . ')'; - - if ($this->includeStacktraces) { - $str .= $this->stacktracesParser($e); - } - - return $str; - } - - private function stacktracesParser(\Throwable $e): string - { - $trace = $e->getTraceAsString(); - - if ($this->basePath !== '') { - $trace = preg_replace('{^(#\d+ )' . preg_quote($this->basePath) . '}m', '$1', $trace) ?? $trace; - } - - if ($this->stacktracesParser !== null) { - $trace = $this->stacktracesParserCustom($trace); - } - - if ($this->indentStacktraces !== '') { - $trace = str_replace("\n", "\n{$this->indentStacktraces}", $trace); - } - - return "\n{$this->indentStacktraces}[stacktrace]\n{$this->indentStacktraces}" . $trace . "\n"; - } - - private function stacktracesParserCustom(string $trace): string - { - return implode("\n", array_filter(array_map($this->stacktracesParser, explode("\n", $trace)))); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php deleted file mode 100644 index 5f0b6a45..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Loggly. - * - * @author Adam Pancutt - */ -class LogglyFormatter extends JsonFormatter -{ - /** - * Overrides the default batch mode to new lines for compatibility with the - * Loggly bulk API. - */ - public function __construct(int $batchMode = self::BATCH_MODE_NEWLINES, bool $appendNewline = false) - { - parent::__construct($batchMode, $appendNewline); - } - - /** - * Appends the 'timestamp' parameter for indexing by Loggly. - * - * @see https://www.loggly.com/docs/automated-parsing/#json - * @see \Monolog\Formatter\JsonFormatter::format() - */ - protected function normalizeRecord(LogRecord $record): array - { - $recordData = parent::normalizeRecord($record); - - $recordData["timestamp"] = $record->datetime->format("Y-m-d\TH:i:s.uO"); - unset($recordData["datetime"]); - - return $recordData; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php deleted file mode 100644 index 9e44c19f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Logmatic. - * - * @author Julien Breux - */ -class LogmaticFormatter extends JsonFormatter -{ - protected const MARKERS = ["sourcecode", "php"]; - - protected string $hostname = ''; - - protected string $appName = ''; - - /** - * @return $this - */ - public function setHostname(string $hostname): self - { - $this->hostname = $hostname; - - return $this; - } - - /** - * @return $this - */ - public function setAppName(string $appName): self - { - $this->appName = $appName; - - return $this; - } - - /** - * Appends the 'hostname' and 'appname' parameter for indexing by Logmatic. - * - * @see http://doc.logmatic.io/docs/basics-to-send-data - * @see \Monolog\Formatter\JsonFormatter::format() - */ - public function normalizeRecord(LogRecord $record): array - { - $record = parent::normalizeRecord($record); - - if ($this->hostname !== '') { - $record["hostname"] = $this->hostname; - } - if ($this->appName !== '') { - $record["appname"] = $this->appName; - } - - $record["@marker"] = static::MARKERS; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php deleted file mode 100644 index abee3cd1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Serializes a log message to Logstash Event Format - * - * @see https://www.elastic.co/products/logstash - * @see https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/Event.java - * - * @author Tim Mower - */ -class LogstashFormatter extends NormalizerFormatter -{ - /** - * @var string the name of the system for the Logstash log message, used to fill the @source field - */ - protected string $systemName; - - /** - * @var string an application name for the Logstash log message, used to fill the @type field - */ - protected string $applicationName; - - /** - * @var string the key for 'extra' fields from the Monolog record - */ - protected string $extraKey; - - /** - * @var string the key for 'context' fields from the Monolog record - */ - protected string $contextKey; - - /** - * @param string $applicationName The application that sends the data, used as the "type" field of logstash - * @param string|null $systemName The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine - * @param string $extraKey The key for extra keys inside logstash "fields", defaults to extra - * @param string $contextKey The key for context keys inside logstash "fields", defaults to context - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(string $applicationName, ?string $systemName = null, string $extraKey = 'extra', string $contextKey = 'context') - { - // logstash requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->systemName = $systemName === null ? (string) gethostname() : $systemName; - $this->applicationName = $applicationName; - $this->extraKey = $extraKey; - $this->contextKey = $contextKey; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - $recordData = parent::format($record); - - $message = [ - '@timestamp' => $recordData['datetime'], - '@version' => 1, - 'host' => $this->systemName, - ]; - if (isset($recordData['message'])) { - $message['message'] = $recordData['message']; - } - if (isset($recordData['channel'])) { - $message['type'] = $recordData['channel']; - $message['channel'] = $recordData['channel']; - } - if (isset($recordData['level_name'])) { - $message['level'] = $recordData['level_name']; - } - if (isset($recordData['level'])) { - $message['monolog_level'] = $recordData['level']; - } - if ('' !== $this->applicationName) { - $message['type'] = $this->applicationName; - } - if (\count($recordData['extra']) > 0) { - $message[$this->extraKey] = $recordData['extra']; - } - if (\count($recordData['context']) > 0) { - $message[$this->contextKey] = $recordData['context']; - } - - return $this->toJson($message) . "\n"; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php deleted file mode 100644 index 2da3e0be..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use MongoDB\BSON\Type; -use MongoDB\BSON\UTCDateTime; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Formats a record for use with the MongoDBHandler. - * - * @author Florian Plattner - */ -class MongoDBFormatter implements FormatterInterface -{ - private bool $exceptionTraceAsString; - private int $maxNestingLevel; - private bool $isLegacyMongoExt; - - /** - * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record->context is 2 - * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings - */ - public function __construct(int $maxNestingLevel = 3, bool $exceptionTraceAsString = true) - { - $this->maxNestingLevel = max($maxNestingLevel, 0); - $this->exceptionTraceAsString = $exceptionTraceAsString; - - $this->isLegacyMongoExt = \extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<='); - } - - /** - * @inheritDoc - * - * @return mixed[] - */ - public function format(LogRecord $record): array - { - /** @var mixed[] $res */ - $res = $this->formatArray($record->toArray()); - - return $res; - } - - /** - * @inheritDoc - * - * @return array - */ - public function formatBatch(array $records): array - { - $formatted = []; - foreach ($records as $key => $record) { - $formatted[$key] = $this->format($record); - } - - return $formatted; - } - - /** - * @param mixed[] $array - * @return mixed[]|string Array except when max nesting level is reached then a string "[...]" - */ - protected function formatArray(array $array, int $nestingLevel = 0) - { - if ($this->maxNestingLevel > 0 && $nestingLevel > $this->maxNestingLevel) { - return '[...]'; - } - - foreach ($array as $name => $value) { - if ($value instanceof \DateTimeInterface) { - $array[$name] = $this->formatDate($value, $nestingLevel + 1); - } elseif ($value instanceof \Throwable) { - $array[$name] = $this->formatException($value, $nestingLevel + 1); - } elseif (\is_array($value)) { - $array[$name] = $this->formatArray($value, $nestingLevel + 1); - } elseif (\is_object($value) && !$value instanceof Type) { - $array[$name] = $this->formatObject($value, $nestingLevel + 1); - } - } - - return $array; - } - - /** - * @param mixed $value - * @return mixed[]|string - */ - protected function formatObject($value, int $nestingLevel) - { - $objectVars = get_object_vars($value); - $objectVars['class'] = Utils::getClass($value); - - return $this->formatArray($objectVars, $nestingLevel); - } - - /** - * @return mixed[]|string - */ - protected function formatException(\Throwable $exception, int $nestingLevel) - { - $formattedException = [ - 'class' => Utils::getClass($exception), - 'message' => $exception->getMessage(), - 'code' => (int) $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - ]; - - if ($this->exceptionTraceAsString === true) { - $formattedException['trace'] = $exception->getTraceAsString(); - } else { - $formattedException['trace'] = $exception->getTrace(); - } - - return $this->formatArray($formattedException, $nestingLevel); - } - - protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime - { - if ($this->isLegacyMongoExt) { - return $this->legacyGetMongoDbDateTime($value); - } - - return $this->getMongoDbDateTime($value); - } - - private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000)); - } - - /** - * This is needed to support MongoDB Driver v1.19 and below - * - * See https://github.com/mongodb/mongo-php-driver/issues/426 - * - * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted - */ - private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - $milliseconds = floor(((float) $value->format('U.u')) * 1000); - - $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS? - ? (int) $milliseconds - : (string) $milliseconds; - - return new UTCDateTime($milliseconds); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php deleted file mode 100644 index e6f35be4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ /dev/null @@ -1,357 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\DateTimeImmutable; -use Monolog\Utils; -use Throwable; -use Monolog\LogRecord; - -/** - * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets - * - * @author Jordi Boggiano - */ -class NormalizerFormatter implements FormatterInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:sP"; - - protected string $dateFormat; - protected int $maxNormalizeDepth = 9; - protected int $maxNormalizeItemCount = 1000; - - private int $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS; - - protected string $basePath = ''; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - $this->dateFormat = null === $dateFormat ? static::SIMPLE_DATE : $dateFormat; - if (!\function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); - } - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record) - { - return $this->normalizeRecord($record); - } - - /** - * Normalize an arbitrary value to a scalar|array|null - * - * @return null|scalar|array - */ - public function normalizeValue(mixed $data): mixed - { - return $this->normalize($data); - } - - /** - * @inheritDoc - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - public function getDateFormat(): string - { - return $this->dateFormat; - } - - /** - * @return $this - */ - public function setDateFormat(string $dateFormat): self - { - $this->dateFormat = $dateFormat; - - return $this; - } - - /** - * The maximum number of normalization levels to go through - */ - public function getMaxNormalizeDepth(): int - { - return $this->maxNormalizeDepth; - } - - /** - * @return $this - */ - public function setMaxNormalizeDepth(int $maxNormalizeDepth): self - { - $this->maxNormalizeDepth = $maxNormalizeDepth; - - return $this; - } - - /** - * The maximum number of items to normalize per level - */ - public function getMaxNormalizeItemCount(): int - { - return $this->maxNormalizeItemCount; - } - - /** - * @return $this - */ - public function setMaxNormalizeItemCount(int $maxNormalizeItemCount): self - { - $this->maxNormalizeItemCount = $maxNormalizeItemCount; - - return $this; - } - - /** - * Enables `json_encode` pretty print. - * - * @return $this - */ - public function setJsonPrettyPrint(bool $enable): self - { - if ($enable) { - $this->jsonEncodeOptions |= JSON_PRETTY_PRINT; - } else { - $this->jsonEncodeOptions &= ~JSON_PRETTY_PRINT; - } - - return $this; - } - - /** - * Setting a base path will hide the base path from exception and stack trace file names to shorten them - * @return $this - */ - public function setBasePath(string $path = ''): self - { - if ($path !== '') { - $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - } - - $this->basePath = $path; - - return $this; - } - - /** - * Provided as extension point - * - * Because normalize is called with sub-values of context data etc, normalizeRecord can be - * extended when data needs to be appended on the record array but not to other normalized data. - * - * @return array - */ - protected function normalizeRecord(LogRecord $record): array - { - /** @var array $normalized */ - $normalized = $this->normalize($record->toArray()); - - return $normalized; - } - - /** - * @return null|scalar|array - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - } - - if (null === $data || \is_scalar($data)) { - if (\is_float($data)) { - if (is_infinite($data)) { - return ($data > 0 ? '' : '-') . 'INF'; - } - if (is_nan($data)) { - return 'NaN'; - } - } - - return $data; - } - - if (\is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over ' . $this->maxNormalizeItemCount . ' items ('.\count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if (\is_object($data)) { - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - if ($data instanceof \JsonSerializable) { - /** @var null|scalar|array $value */ - $value = $data->jsonSerialize(); - } elseif (\get_class($data) === '__PHP_Incomplete_Class') { - $accessor = new \ArrayObject($data); - $value = (string) $accessor['__PHP_Incomplete_Class_Name']; - } elseif (method_exists($data, '__toString')) { - try { - /** @var string $value */ - $value = $data->__toString(); - } catch (\Throwable) { - // if the toString method is failing, use the default behavior - /** @var null|scalar|array $value */ - $value = json_decode($this->toJson($data, true), true); - } - } else { - // the rest is normalized by json encoding and decoding it - /** @var null|scalar|array $value */ - $value = json_decode($this->toJson($data, true), true); - } - - return [Utils::getClass($data) => $value]; - } - - if (\is_resource($data)) { - return sprintf('[resource(%s)]', get_resource_type($data)); - } - - return '[unknown('.\gettype($data).')]'; - } - - /** - * @return mixed[] - */ - protected function normalizeException(Throwable $e, int $depth = 0) - { - if ($depth > $this->maxNormalizeDepth) { - return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization']; - } - - if ($e instanceof \JsonSerializable) { - return (array) $e->jsonSerialize(); - } - - $file = $e->getFile(); - if ($this->basePath !== '') { - $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); - } - - $data = [ - 'class' => Utils::getClass($e), - 'message' => $e->getMessage(), - 'code' => (int) $e->getCode(), - 'file' => $file.':'.$e->getLine(), - ]; - - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $data['faultcode'] = $e->faultcode; - } - - if (isset($e->faultactor)) { - $data['faultactor'] = $e->faultactor; - } - - if (isset($e->detail)) { - if (\is_string($e->detail)) { - $data['detail'] = $e->detail; - } elseif (\is_object($e->detail) || \is_array($e->detail)) { - $data['detail'] = $this->toJson($e->detail, true); - } - } - } - - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'], $frame['line'])) { - $file = $frame['file']; - if ($this->basePath !== '') { - $file = preg_replace('{^'.preg_quote($this->basePath).'}', '', $file); - } - $data['trace'][] = $file.':'.$frame['line']; - } - } - - if (($previous = $e->getPrevious()) instanceof \Throwable) { - $data['previous'] = $this->normalizeException($previous, $depth + 1); - } - - return $data; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string if encoding fails and ignoreErrors is true 'null' is returned - */ - protected function toJson($data, bool $ignoreErrors = false): string - { - return Utils::jsonEncode($data, $this->jsonEncodeOptions, $ignoreErrors); - } - - protected function formatDate(\DateTimeInterface $date): string - { - // in case the date format isn't custom then we defer to the custom DateTimeImmutable - // formatting logic, which will pick the right format based on whether useMicroseconds is on - if ($this->dateFormat === self::SIMPLE_DATE && $date instanceof DateTimeImmutable) { - return (string) $date; - } - - return $date->format($this->dateFormat); - } - - /** - * @return $this - */ - public function addJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions |= $option; - - return $this; - } - - /** - * @return $this - */ - public function removeJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions &= ~$option; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php deleted file mode 100644 index ec73a0ec..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\LogRecord; - -/** - * Formats data into an associative array of scalar (+ null) values. - * Objects and arrays will be JSON encoded. - * - * @author Andrew Lawson - */ -class ScalarFormatter extends NormalizerFormatter -{ - /** - * @inheritDoc - * - * @phpstan-return array $record - */ - public function format(LogRecord $record): array - { - $result = []; - foreach ($record->toArray() as $key => $value) { - $result[$key] = $this->toScalar($value); - } - - return $result; - } - - protected function toScalar(mixed $value): string|int|float|bool|null - { - $normalized = $this->normalize($value); - - if (\is_array($normalized)) { - return $this->toJson($normalized, true); - } - - return $normalized; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php deleted file mode 100644 index ccaddf77..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/SyslogFormatter.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Serializes a log message according to RFC 5424 - * - * @author Dalibor Karlović - * @author Renat Gabdullin - */ -class SyslogFormatter extends LineFormatter -{ - private const SYSLOG_FACILITY_USER = 1; - private const FORMAT = "<%extra.priority%>1 %datetime% %extra.hostname% %extra.app-name% %extra.procid% %channel% %extra.structured-data% %level_name%: %message% %context% %extra%\n"; - private const NILVALUE = '-'; - - private string $hostname; - private int $procid; - - public function __construct(private string $applicationName = self::NILVALUE) - { - parent::__construct(self::FORMAT, 'Y-m-d\TH:i:s.uP', true, true); - $this->hostname = (string) gethostname(); - $this->procid = (int) getmypid(); - } - - public function format(LogRecord $record): string - { - $record->extra = $this->formatExtra($record); - - return parent::format($record); - } - - /** - * @return array - */ - private function formatExtra(LogRecord $record): array - { - $extra = $record->extra; - $extra['app-name'] = $this->applicationName; - $extra['hostname'] = $this->hostname; - $extra['procid'] = $this->procid; - $extra['priority'] = self::calculatePriority($record->level); - $extra['structured-data'] = self::NILVALUE; - - return $extra; - } - - private static function calculatePriority(Level $level): int - { - return (self::SYSLOG_FACILITY_USER * 8) + $level->toRFC5424Level(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php deleted file mode 100644 index 28a1deec..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Serializes a log message according to Wildfire's header requirements - * - * @author Eric Clemmons (@ericclemmons) - * @author Christophe Coevoet - * @author Kirill chEbba Chebunin - */ -class WildfireFormatter extends NormalizerFormatter -{ - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - - // http headers do not like non-ISO-8559-1 characters - $this->removeJsonEncodeOption(JSON_UNESCAPED_UNICODE); - } - - /** - * Translates Monolog log levels to Wildfire levels. - * - * @return 'LOG'|'INFO'|'WARN'|'ERROR' - */ - private function toWildfireLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'LOG', - Level::Info => 'INFO', - Level::Notice => 'INFO', - Level::Warning => 'WARN', - Level::Error => 'ERROR', - Level::Critical => 'ERROR', - Level::Alert => 'ERROR', - Level::Emergency => 'ERROR', - }; - } - - /** - * @inheritDoc - */ - public function format(LogRecord $record): string - { - // Retrieve the line and file if set and remove them from the formatted extra - $file = $line = ''; - if (isset($record->extra['file'])) { - $file = $record->extra['file']; - unset($record->extra['file']); - } - if (isset($record->extra['line'])) { - $line = $record->extra['line']; - unset($record->extra['line']); - } - - $message = ['message' => $record->message]; - $handleError = false; - if (\count($record->context) > 0) { - $message['context'] = $this->normalize($record->context); - $handleError = true; - } - if (\count($record->extra) > 0) { - $message['extra'] = $this->normalize($record->extra); - $handleError = true; - } - if (\count($message) === 1) { - $message = reset($message); - } - - if (\is_array($message) && isset($message['context']['table'])) { - $type = 'TABLE'; - $label = $record->channel .': '. $record->message; - $message = $message['context']['table']; - } else { - $type = $this->toWildfireLevel($record->level); - $label = $record->channel; - } - - // Create JSON object describing the appearance of the message in the console - $json = $this->toJson([ - [ - 'Type' => $type, - 'File' => $file, - 'Line' => $line, - 'Label' => $label, - ], - $message, - ], $handleError); - - // The message itself is a serialization of the above JSON object + it's length - return sprintf( - '%d|%s|', - \strlen($json), - $json - ); - } - - /** - * @inheritDoc - * - * @phpstan-return never - */ - public function formatBatch(array $records) - { - throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); - } - - /** - * @inheritDoc - * - * @return null|scalar|array|object - */ - protected function normalize(mixed $data, int $depth = 0): mixed - { - if (\is_object($data) && !$data instanceof \DateTimeInterface) { - return $data; - } - - return parent::normalize($data, $depth); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php deleted file mode 100644 index 61d45d58..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Base Handler class providing basic level/bubble support - * - * @author Jordi Boggiano - */ -abstract class AbstractHandler extends Handler implements ResettableInterface -{ - protected Level $level = Level::Debug; - protected bool $bubble = true; - - /** - * @param int|string|Level|LogLevel::* $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->setLevel($level); - $this->bubble = $bubble; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } - - /** - * Sets minimum logging level at which this handler will be triggered. - * - * @param Level|LogLevel::* $level Level or level name - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setLevel(int|string|Level $level): self - { - $this->level = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Gets minimum logging level at which this handler will be triggered. - */ - public function getLevel(): Level - { - return $this->level; - } - - /** - * Sets the bubbling behavior. - * - * @param bool $bubble true means that this handler allows bubbling. - * false means that bubbling is not permitted. - * @return $this - */ - public function setBubble(bool $bubble): self - { - $this->bubble = $bubble; - - return $this; - } - - /** - * Gets the bubbling behavior. - * - * @return bool true means that this handler allows bubbling. - * false means that bubbling is not permitted. - */ - public function getBubble(): bool - { - return $this->bubble; - } - - /** - * @inheritDoc - */ - public function reset(): void - { - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php deleted file mode 100644 index de13a76b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * Base Handler class providing the Handler structure, including processors and formatters - * - * Classes extending it should (in most cases) only implement write($record) - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -abstract class AbstractProcessingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - use FormattableHandlerTrait; - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $record->formatted = $this->getFormatter()->format($record); - - $this->write($record); - - return false === $this->bubble; - } - - /** - * Writes the (already formatted) record down to the log of the implementing handler - */ - abstract protected function write(LogRecord $record): void; - - public function reset(): void - { - parent::reset(); - - $this->resetProcessors(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php deleted file mode 100644 index 4a703170..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Common syslog functionality - */ -abstract class AbstractSyslogHandler extends AbstractProcessingHandler -{ - protected int $facility; - - /** - * List of valid log facility names. - * @var array - */ - protected array $facilities = [ - 'auth' => \LOG_AUTH, - 'authpriv' => \LOG_AUTHPRIV, - 'cron' => \LOG_CRON, - 'daemon' => \LOG_DAEMON, - 'kern' => \LOG_KERN, - 'lpr' => \LOG_LPR, - 'mail' => \LOG_MAIL, - 'news' => \LOG_NEWS, - 'syslog' => \LOG_SYSLOG, - 'user' => \LOG_USER, - 'uucp' => \LOG_UUCP, - ]; - - /** - * Translates Monolog log levels to syslog log priorities. - */ - protected function toSyslogPriority(Level $level): int - { - return $level->toRFC5424Level(); - } - - /** - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - */ - public function __construct(string|int $facility = \LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!\defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->facilities['local0'] = \LOG_LOCAL0; - $this->facilities['local1'] = \LOG_LOCAL1; - $this->facilities['local2'] = \LOG_LOCAL2; - $this->facilities['local3'] = \LOG_LOCAL3; - $this->facilities['local4'] = \LOG_LOCAL4; - $this->facilities['local5'] = \LOG_LOCAL5; - $this->facilities['local6'] = \LOG_LOCAL6; - $this->facilities['local7'] = \LOG_LOCAL7; - } else { - $this->facilities['local0'] = 128; // LOG_LOCAL0 - $this->facilities['local1'] = 136; // LOG_LOCAL1 - $this->facilities['local2'] = 144; // LOG_LOCAL2 - $this->facilities['local3'] = 152; // LOG_LOCAL3 - $this->facilities['local4'] = 160; // LOG_LOCAL4 - $this->facilities['local5'] = 168; // LOG_LOCAL5 - $this->facilities['local6'] = 176; // LOG_LOCAL6 - $this->facilities['local7'] = 184; // LOG_LOCAL7 - } - - // convert textual description of facility to syslog constant - if (\is_string($facility) && \array_key_exists(strtolower($facility), $this->facilities)) { - $facility = $this->facilities[strtolower($facility)]; - } elseif (!\in_array($facility, array_values($this->facilities), true)) { - throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); - } - - $this->facility = $facility; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php deleted file mode 100644 index 119f3394..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\Message as GelfMessage; -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use PhpAmqpLib\Message\AMQPMessage; -use PhpAmqpLib\Channel\AMQPChannel; -use AMQPExchange; -use Monolog\LogRecord; - -class AmqpHandler extends AbstractProcessingHandler -{ - protected AMQPExchange|AMQPChannel $exchange; - - /** @var array */ - private array $extraAttributes = []; - - protected string $exchangeName; - - /** - * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use - * @param string|null $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only - */ - public function __construct(AMQPExchange|AMQPChannel $exchange, ?string $exchangeName = null, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if ($exchange instanceof AMQPChannel) { - $this->exchangeName = (string) $exchangeName; - } elseif ($exchangeName !== null) { - @trigger_error('The $exchangeName parameter can only be passed when using PhpAmqpLib, if using an AMQPExchange instance configure it beforehand', E_USER_DEPRECATED); - } - $this->exchange = $exchange; - - parent::__construct($level, $bubble); - } - - /** - * @return array - */ - public function getExtraAttributes(): array - { - return $this->extraAttributes; - } - - /** - * Configure extra attributes to pass to the AMQPExchange (if you are using the amqp extension) - * - * @param array $extraAttributes One of content_type, content_encoding, - * message_id, user_id, app_id, delivery_mode, - * priority, timestamp, expiration, type - * or reply_to, headers. - * @return $this - */ - public function setExtraAttributes(array $extraAttributes): self - { - $this->extraAttributes = $extraAttributes; - - return $this; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $data = $record->formatted; - $routingKey = $this->getRoutingKey($record); - - if($data instanceof GelfMessage) { - $data = json_encode($data->toArray()); - } - - if ($this->exchange instanceof AMQPExchange) { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if (\count($this->extraAttributes) > 0) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - $this->exchange->publish( - $data, - $routingKey, - 0, - $attributes - ); - } else { - $this->exchange->basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $routingKey - ); - } - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if ($this->exchange instanceof AMQPExchange) { - parent::handleBatch($records); - - return; - } - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - $record = $this->processRecord($record); - $data = $this->getFormatter()->format($record); - - if($data instanceof GelfMessage) { - $data = json_encode($data->toArray()); - } - - $this->exchange->batch_basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $this->getRoutingKey($record) - ); - } - - $this->exchange->publish_batch(); - } - - /** - * Gets the routing key for the AMQP exchange - */ - protected function getRoutingKey(LogRecord $record): string - { - $routingKey = sprintf('%s.%s', $record->level->name, $record->channel); - - return strtolower($routingKey); - } - - private function createAmqpMessage(string $data): AMQPMessage - { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if (\count($this->extraAttributes) > 0) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - - return new AMQPMessage($data, $attributes); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php deleted file mode 100644 index 0d75cb31..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ /dev/null @@ -1,300 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Utils; -use Monolog\LogRecord; -use Monolog\Level; - -use function headers_list; -use function stripos; - -/** - * Handler sending logs to browser's javascript console with no browser extension required - * - * @author Olivier Poitrey - */ -class BrowserConsoleHandler extends AbstractProcessingHandler -{ - protected static bool $initialized = false; - - /** @var LogRecord[] */ - protected static array $records = []; - - protected const FORMAT_HTML = 'html'; - protected const FORMAT_JS = 'js'; - protected const FORMAT_UNKNOWN = 'unknown'; - - /** - * @inheritDoc - * - * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. - * - * Example of formatted string: - * - * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - // Accumulate records - static::$records[] = $record; - - // Register shutdown handler if not already done - if (!static::$initialized) { - static::$initialized = true; - $this->registerShutdownFunction(); - } - } - - /** - * Convert records to javascript console commands and send it to the browser. - * This method is automatically called on PHP shutdown if output is HTML or Javascript. - */ - public static function send(): void - { - $format = static::getResponseFormat(); - if ($format === self::FORMAT_UNKNOWN) { - return; - } - - if (\count(static::$records) > 0) { - if ($format === self::FORMAT_HTML) { - static::writeOutput(''); - } else { // js format - static::writeOutput(self::generateScript()); - } - static::resetStatic(); - } - } - - public function close(): void - { - self::resetStatic(); - } - - public function reset(): void - { - parent::reset(); - - self::resetStatic(); - } - - /** - * Forget all logged records - */ - public static function resetStatic(): void - { - static::$records = []; - } - - /** - * Wrapper for register_shutdown_function to allow overriding - */ - protected function registerShutdownFunction(): void - { - if (PHP_SAPI !== 'cli') { - register_shutdown_function(['Monolog\Handler\BrowserConsoleHandler', 'send']); - } - } - - /** - * Wrapper for echo to allow overriding - */ - protected static function writeOutput(string $str): void - { - echo $str; - } - - /** - * Checks the format of the response - * - * If Content-Type is set to application/javascript or text/javascript -> js - * If Content-Type is set to text/html, or is unset -> html - * If Content-Type is anything else -> unknown - * - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormat(): string - { - // Check content type - foreach (headers_list() as $header) { - if (stripos($header, 'content-type:') === 0) { - return static::getResponseFormatFromContentType($header); - } - } - - return self::FORMAT_HTML; - } - - /** - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormatFromContentType(string $contentType): string - { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (stripos($contentType, 'application/javascript') !== false || stripos($contentType, 'text/javascript') !== false) { - return self::FORMAT_JS; - } - - if (stripos($contentType, 'text/html') !== false) { - return self::FORMAT_HTML; - } - - return self::FORMAT_UNKNOWN; - } - - private static function generateScript(): string - { - $script = []; - foreach (static::$records as $record) { - $context = self::dump('Context', $record->context); - $extra = self::dump('Extra', $record->extra); - - if (\count($context) === 0 && \count($extra) === 0) { - $script[] = self::call_array(self::getConsoleMethodForLevel($record->level), self::handleStyles($record->formatted)); - } else { - $script = array_merge( - $script, - [self::call_array('groupCollapsed', self::handleStyles($record->formatted))], - $context, - $extra, - [self::call('groupEnd')] - ); - } - } - - return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; - } - - private static function getConsoleMethodForLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'debug', - Level::Info, Level::Notice => 'info', - Level::Warning => 'warn', - Level::Error, Level::Critical, Level::Alert, Level::Emergency => 'error', - }; - } - - /** - * @return string[] - */ - private static function handleStyles(string $formatted): array - { - $args = []; - $format = '%c' . $formatted; - preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - - foreach (array_reverse($matches) as $match) { - $args[] = '"font-weight: normal"'; - $args[] = self::quote(self::handleCustomStyles($match[2][0], $match[1][0])); - - $pos = $match[0][1]; - $format = Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . Utils::substr($format, $pos + \strlen($match[0][0])); - } - - $args[] = self::quote('font-weight: normal'); - $args[] = self::quote($format); - - return array_reverse($args); - } - - private static function handleCustomStyles(string $style, string $string): string - { - static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; - static $labels = []; - - $style = preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function (array $m) use ($string, &$colors, &$labels) { - if (trim($m[1]) === 'autolabel') { - // Format the string as a label with consistent auto assigned background color - if (!isset($labels[$string])) { - $labels[$string] = $colors[\count($labels) % \count($colors)]; - } - $color = $labels[$string]; - - return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; - } - - return $m[1]; - }, $style); - - if (null === $style) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $style; - } - - /** - * @param mixed[] $dict - * @return mixed[] - */ - private static function dump(string $title, array $dict): array - { - $script = []; - $dict = array_filter($dict); - if (\count($dict) === 0) { - return $script; - } - $script[] = self::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title)); - foreach ($dict as $key => $value) { - $value = json_encode($value); - if (false === $value) { - $value = self::quote(''); - } - $script[] = self::call('log', self::quote('%s: %o'), self::quote((string) $key), $value); - } - - return $script; - } - - private static function quote(string $arg): string - { - return '"' . addcslashes($arg, "\"\n\\") . '"'; - } - - /** - * @param mixed $args - */ - private static function call(...$args): string - { - $method = array_shift($args); - if (!\is_string($method)) { - throw new \UnexpectedValueException('Expected the first arg to be a string, got: '.var_export($method, true)); - } - - return self::call_array($method, $args); - } - - /** - * @param mixed[] $args - */ - private static function call_array(string $method, array $args): string - { - return 'c.' . $method . '(' . implode(', ', $args) . ');'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index c241c32f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - */ -class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - protected HandlerInterface $handler; - - protected int $bufferSize = 0; - - protected int $bufferLimit; - - protected bool $flushOnOverflow; - - /** @var LogRecord[] */ - protected array $buffer = []; - - protected bool $initialized = false; - - /** - * @param HandlerInterface $handler Handler. - * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, int $bufferLimit = 0, int|string|Level $level = Level::Debug, bool $bubble = true, bool $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = $bufferLimit; - $this->flushOnOverflow = $flushOnOverflow; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if ($record->level->isLowerThan($this->level)) { - return false; - } - - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->clear(); - } - - public function __destruct() - { - // suppress the parent behavior since we already have register_shutdown_function() - // to call close(), and the reference contained there will prevent this from being - // GC'd until the end of the request - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flush(); - - $this->handler->close(); - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - */ - public function clear(): void - { - $this->bufferSize = 0; - $this->buffer = []; - } - - public function reset(): void - { - $this->flush(); - - parent::reset(); - - $this->resetProcessors(); - - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 8b1cd5a3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; -use Monolog\DateTimeImmutable; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * This also works out of the box with Firefox 43+ - * - * @author Christophe Coevoet - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * Version of the extension - */ - protected const VERSION = '4.0'; - - /** - * Header name - */ - protected const HEADER_NAME = 'X-ChromeLogger-Data'; - - /** - * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) - */ - protected const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; - - protected static bool $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending - */ - protected static bool $overflowed = false; - - /** @var mixed[] */ - protected static array $json = [ - 'version' => self::VERSION, - 'columns' => ['label', 'log', 'backtrace', 'type'], - 'rows' => [], - ]; - - protected static bool $sendHeaders = true; - - /** - * @throws \RuntimeException If the function json_encode does not exist - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - if (!\function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); - } - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (!$this->isWebRequest()) { - return; - } - - $messages = []; - - foreach ($records as $record) { - if ($record->level < $this->level) { - continue; - } - - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (\count($messages) > 0) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - */ - protected function write(LogRecord $record): void - { - if (!$this->isWebRequest()) { - return; - } - - self::$json['rows'][] = $record->formatted; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send(): void - { - if (self::$overflowed || !self::$sendHeaders) { - return; - } - - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; - } - - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - if (\strlen($data) > 3 * 1024) { - self::$overflowed = true; - - $record = new LogRecord( - message: 'Incomplete logs, chrome header size limit reached', - level: Level::Warning, - channel: 'monolog', - datetime: new DateTimeImmutable(true), - ); - self::$json['rows'][\count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - } - - if (trim($data) !== '') { - $this->sendHeader(static::HEADER_NAME, $data); - } - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (!isset($_SERVER['HTTP_USER_AGENT'])) { - return false; - } - - return preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index 8d9c10e7..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * CouchDB handler - * - * @author Markus Bachmann - * @phpstan-type Options array{ - * host: string, - * port: int, - * dbname: string, - * username: string|null, - * password: string|null - * } - * @phpstan-type InputOptions array{ - * host?: string, - * port?: int, - * dbname?: string, - * username?: string|null, - * password?: string|null - * } - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - /** - * @var mixed[] - * @phpstan-var Options - */ - private array $options; - - /** - * @param mixed[] $options - * - * @phpstan-param InputOptions $options - */ - public function __construct(array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->options = array_merge([ - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ], $options); - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $basicAuth = null; - if (null !== $this->options['username'] && null !== $this->options['password']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'content' => $record->formatted, - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ], - ]); - - if (false === @file_get_contents($url, false, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index a76bf408..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Logs to Cube. - * - * @link https://github.com/square/cube/wiki - * @author Wan Chen - * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 - */ -class CubeHandler extends AbstractProcessingHandler -{ - private ?\Socket $udpConnection = null; - private ?\CurlHandle $httpConnection = null; - private string $scheme; - private string $host; - private int $port; - /** @var string[] */ - private array $acceptedSchemes = ['http', 'udp']; - - /** - * Create a Cube handler - * - * @throws \UnexpectedValueException when given url is not a valid url. - * A valid url must consist of three parts : protocol://host:port - * Only valid protocols used by Cube are http and udp - */ - public function __construct(string $url, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $urlInfo = parse_url($url); - - if ($urlInfo === false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!\in_array($urlInfo['scheme'], $this->acceptedSchemes, true)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfo['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes) - ); - } - - $this->scheme = $urlInfo['scheme']; - $this->host = $urlInfo['host']; - $this->port = $urlInfo['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when there is no socket extension - */ - protected function connectUdp(): void - { - if (!\extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); - } - - $udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (false === $udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - $this->udpConnection = $udpConnection; - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to an http server - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when no curl extension - */ - protected function connectHttp(): void - { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); - } - - $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - if (false === $httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - $this->httpConnection = $httpConnection; - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $date = $record->datetime; - - $data = ['time' => $date->format('Y-m-d\TH:i:s.uO')]; - $context = $record->context; - - if (isset($context['type'])) { - $data['type'] = $context['type']; - unset($context['type']); - } else { - $data['type'] = $record->channel; - } - - $data['data'] = $context; - $data['data']['level'] = $record->level; - - if ($this->scheme === 'http') { - $this->writeHttp(Utils::jsonEncode($data)); - } else { - $this->writeUdp(Utils::jsonEncode($data)); - } - } - - private function writeUdp(string $data): void - { - if (null === $this->udpConnection) { - $this->connectUdp(); - } - - if (null === $this->udpConnection) { - throw new \LogicException('No UDP socket could be opened'); - } - - socket_send($this->udpConnection, $data, \strlen($data), 0); - } - - private function writeHttp(string $data): void - { - if (null === $this->httpConnection) { - $this->connectHttp(); - } - - if (null === $this->httpConnection) { - throw new \LogicException('No connection could be established'); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . \strlen('['.$data.']'), - ]); - - Curl\Util::execute($this->httpConnection, 5, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php deleted file mode 100644 index f1028114..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Curl; - -use CurlHandle; - -/** - * This class is marked as internal and it is not under the BC promise of the package. - * - * @internal - */ -final class Util -{ - /** @var array */ - private static array $retriableErrorCodes = [ - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_HTTP_NOT_FOUND, - CURLE_READ_ERROR, - CURLE_OPERATION_TIMEOUTED, - CURLE_HTTP_POST_ERROR, - CURLE_SSL_CONNECT_ERROR, - ]; - - /** - * Executes a CURL request with optional retries and exception on failure - * - * @param CurlHandle $ch curl handler - * @return bool|string @see curl_exec - */ - public static function execute(CurlHandle $ch, int $retries = 5, bool $closeAfterDone = true) - { - while ($retries--) { - $curlResponse = curl_exec($ch); - if ($curlResponse === false) { - $curlErrno = curl_errno($ch); - - if (false === \in_array($curlErrno, self::$retriableErrorCodes, true) || $retries === 0) { - $curlError = curl_error($ch); - - if ($closeAfterDone) { - curl_close($ch); - } - - throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); - } - - continue; - } - - if ($closeAfterDone) { - curl_close($ch); - } - - return $curlResponse; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php deleted file mode 100644 index 873a4b86..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Simple handler wrapper that deduplicates log records across multiple requests - * - * It also includes the BufferHandler functionality and will buffer - * all messages until the end of the request or flush() is called. - * - * This works by storing all log records' messages above $deduplicationLevel - * to the file specified by $deduplicationStore. When further logs come in at the end of the - * request (or when flush() is called), all those above $deduplicationLevel are checked - * against the existing stored logs. If they match and the timestamps in the stored log is - * not older than $time seconds, the new log record is discarded. If no log record is new, the - * whole data set is discarded. - * - * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers - * that send messages to people, to avoid spamming with the same message over and over in case of - * a major component failure like a database server being down which makes all requests fail in the - * same way. - * - * @author Jordi Boggiano - */ -class DeduplicationHandler extends BufferHandler -{ - protected string $deduplicationStore; - - protected Level $deduplicationLevel; - - protected int $time; - protected bool $gc = false; - - /** - * @param HandlerInterface $handler Handler. - * @param string|null $deduplicationStore The file/path where the deduplication log should be kept - * @param int|string|Level|LogLevel::* $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes - * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $deduplicationLevel - */ - public function __construct(HandlerInterface $handler, ?string $deduplicationStore = null, int|string|Level $deduplicationLevel = Level::Error, int $time = 60, bool $bubble = true) - { - parent::__construct($handler, 0, Level::Debug, $bubble, false); - - $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; - $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); - $this->time = $time; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $store = null; - - if (file_exists($this->deduplicationStore)) { - $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - } - - $passthru = null; - - foreach ($this->buffer as $record) { - if ($record->level->value >= $this->deduplicationLevel->value) { - $passthru = $passthru === true || !\is_array($store) || !$this->isDuplicate($store, $record); - if ($passthru) { - $line = $this->buildDeduplicationStoreEntry($record); - file_put_contents($this->deduplicationStore, $line . "\n", FILE_APPEND); - if (!\is_array($store)) { - $store = []; - } - $store[] = $line; - } - } - } - - // default of null is valid as well as if no record matches duplicationLevel we just pass through - if ($passthru === true || $passthru === null) { - $this->handler->handleBatch($this->buffer); - } - - $this->clear(); - - if ($this->gc) { - $this->collectLogs(); - } - } - - /** - * If there is a store entry older than e.g. a day, this method should set `$this->gc` to `true` to trigger garbage collection. - * @param string[] $store The deduplication store - */ - protected function isDuplicate(array $store, LogRecord $record): bool - { - $timestampValidity = $record->datetime->getTimestamp() - $this->time; - $expectedMessage = preg_replace('{[\r\n].*}', '', $record->message); - $yesterday = time() - 86400; - - for ($i = \count($store) - 1; $i >= 0; $i--) { - list($timestamp, $level, $message) = explode(':', $store[$i], 3); - - if ($level === $record->level->getName() && $message === $expectedMessage && $timestamp > $timestampValidity) { - return true; - } - - if ($timestamp < $yesterday) { - $this->gc = true; - } - } - - return false; - } - - /** - * @return string The given record serialized as a single line of text - */ - protected function buildDeduplicationStoreEntry(LogRecord $record): string - { - return $record->datetime->getTimestamp() . ':' . $record->level->getName() . ':' . preg_replace('{[\r\n].*}', '', $record->message); - } - - private function collectLogs(): void - { - if (!file_exists($this->deduplicationStore)) { - return; - } - - $handle = fopen($this->deduplicationStore, 'rw+'); - - if (false === $handle) { - throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); - } - - flock($handle, LOCK_EX); - $validLogs = []; - - $timestampValidity = time() - $this->time; - - while (!feof($handle)) { - $log = fgets($handle); - if (\is_string($log) && '' !== $log && substr($log, 0, 10) >= $timestampValidity) { - $validLogs[] = $log; - } - } - - ftruncate($handle, 0); - rewind($handle); - foreach ($validLogs as $log) { - fwrite($handle, $log); - } - - flock($handle, LOCK_UN); - fclose($handle); - - $this->gc = false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index eab9f108..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Doctrine\CouchDB\CouchDBClient; -use Monolog\LogRecord; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - private CouchDBClient $client; - - public function __construct(CouchDBClient $client, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->client->postDocument($record->formatted); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php deleted file mode 100644 index f1c5a959..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sdk; -use Aws\DynamoDb\DynamoDbClient; -use Monolog\Formatter\FormatterInterface; -use Aws\DynamoDb\Marshaler; -use Monolog\Formatter\ScalarFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) - * - * @link https://github.com/aws/aws-sdk-php/ - * @author Andrew Lawson - */ -class DynamoDbHandler extends AbstractProcessingHandler -{ - public const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; - - protected DynamoDbClient $client; - - protected string $table; - - protected Marshaler $marshaler; - - public function __construct(DynamoDbClient $client, string $table, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->marshaler = new Marshaler; - - $this->client = $client; - $this->table = $table; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $filtered = $this->filterEmptyFields($record->formatted); - $formatted = $this->marshaler->marshalItem($filtered); - - $this->client->putItem([ - 'TableName' => $this->table, - 'Item' => $formatted, - ]); - } - - /** - * @param mixed[] $record - * @return mixed[] - */ - protected function filterEmptyFields(array $record): array - { - return array_filter($record, function ($value) { - return [] !== $value; - }); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ScalarFormatter(self::DATE_FORMAT); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php deleted file mode 100644 index d9b85b4d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastica\Document; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Level; -use Elastica\Client; -use Elastica\Exception\ExceptionInterface; -use Monolog\LogRecord; - -/** - * Elastic Search handler - * - * Usage example: - * - * $client = new \Elastica\Client(); - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 - * ); - * $handler = new ElasticaHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Jelle Vink - * @phpstan-type Options array{ - * index: string, - * type: string, - * ignore_error: bool - * } - * @phpstan-type InputOptions array{ - * index?: string, - * type?: string, - * ignore_error?: bool - * } - */ -class ElasticaHandler extends AbstractProcessingHandler -{ - protected Client $client; - - /** - * @var mixed[] Handler config options - * @phpstan-var Options - */ - protected array $options; - - /** - * @param Client $client Elastica Client object - * @param mixed[] $options Handler configuration - * - * @phpstan-param InputOptions $options - */ - public function __construct(Client $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => 'record', // Elastic document type - 'ignore_error' => false, // Suppress Elastica exceptions - ], - $options - ); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->bulkSend([$record->formatted]); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticaFormatter) { - return parent::setFormatter($formatter); - } - - throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); - } - - /** - * @return mixed[] - * - * @phpstan-return Options - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticaFormatter($this->options['index'], $this->options['type']); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param Document[] $documents - * - * @throws \RuntimeException - */ - protected function bulkSend(array $documents): void - { - try { - $this->client->addDocuments($documents); - } catch (ExceptionInterface $e) { - if (!$this->options['ignore_error']) { - throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php deleted file mode 100644 index 74cc7b6e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php +++ /dev/null @@ -1,230 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastic\Elasticsearch\Response\Elasticsearch; -use Throwable; -use RuntimeException; -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticsearchFormatter; -use InvalidArgumentException; -use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; -use Elasticsearch\Client; -use Monolog\LogRecord; -use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; -use Elastic\Elasticsearch\Client as Client8; - -/** - * Elasticsearch handler - * - * @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html - * - * Simple usage example: - * - * $client = \Elasticsearch\ClientBuilder::create() - * ->setHosts($hosts) - * ->build(); - * - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', - * ); - * $handler = new ElasticsearchHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Avtandil Kikabidze - * @phpstan-type Options array{ - * index: string, - * type: string, - * ignore_error: bool, - * op_type: 'index'|'create' - * } - * @phpstan-type InputOptions array{ - * index?: string, - * type?: string, - * ignore_error?: bool, - * op_type?: 'index'|'create' - * } - */ -class ElasticsearchHandler extends AbstractProcessingHandler -{ - protected Client|Client8 $client; - - /** - * @var mixed[] Handler config options - * @phpstan-var Options - */ - protected array $options; - - /** - * @var bool - */ - private $needsType; - - /** - * @param Client|Client8 $client Elasticsearch Client object - * @param mixed[] $options Handler configuration - * - * @phpstan-param InputOptions $options - */ - public function __construct(Client|Client8 $client, array $options = [], int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => '_doc', // Elastic document type - 'ignore_error' => false, // Suppress Elasticsearch exceptions - 'op_type' => 'index', // Elastic op_type (index or create) (https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#docs-index-api-op_type) - ], - $options - ); - - if ($client instanceof Client8 || $client::VERSION[0] === '7') { - $this->needsType = false; - // force the type to _doc for ES8/ES7 - $this->options['type'] = '_doc'; - } else { - $this->needsType = true; - } - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->bulkSend([$record->formatted]); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticsearchFormatter) { - return parent::setFormatter($formatter); - } - - throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter'); - } - - /** - * Getter options - * - * @return mixed[] - * - * @phpstan-return Options - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticsearchFormatter($this->options['index'], $this->options['type']); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param array> $records Records + _index/_type keys - * @throws \RuntimeException - */ - protected function bulkSend(array $records): void - { - try { - $params = [ - 'body' => [], - ]; - - foreach ($records as $record) { - $params['body'][] = [ - $this->options['op_type'] => $this->needsType ? [ - '_index' => $record['_index'], - '_type' => $record['_type'], - ] : [ - '_index' => $record['_index'], - ], - ]; - unset($record['_index'], $record['_type']); - - $params['body'][] = $record; - } - - /** @var Elasticsearch */ - $responses = $this->client->bulk($params); - - if ($responses['errors'] === true) { - throw $this->createExceptionFromResponses($responses); - } - } catch (Throwable $e) { - if (! $this->options['ignore_error']) { - throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e); - } - } - } - - /** - * Creates elasticsearch exception from responses array - * - * Only the first error is converted into an exception. - * - * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() - */ - protected function createExceptionFromResponses($responses): Throwable - { - foreach ($responses['items'] ?? [] as $item) { - if (isset($item['index']['error'])) { - return $this->createExceptionFromError($item['index']['error']); - } - } - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); - } - - return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); - } - - /** - * Creates elasticsearch exception from error array - * - * @param mixed[] $error - */ - protected function createExceptionFromError(array $error): Throwable - { - $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); - } - - return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php deleted file mode 100644 index aaad9d48..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores to PHP error_log() handler. - * - * @author Elan Ruusamäe - */ -class ErrorLogHandler extends AbstractProcessingHandler -{ - public const OPERATING_SYSTEM = 0; - public const SAPI = 4; - - protected int $messageType; - protected bool $expandNewlines; - - /** - * @param int $messageType Says where the error should go. - * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries - * - * @throws \InvalidArgumentException If an unsupported message type is set - */ - public function __construct(int $messageType = self::OPERATING_SYSTEM, int|string|Level $level = Level::Debug, bool $bubble = true, bool $expandNewlines = false) - { - parent::__construct($level, $bubble); - - if (false === \in_array($messageType, self::getAvailableTypes(), true)) { - $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); - - throw new \InvalidArgumentException($message); - } - - $this->messageType = $messageType; - $this->expandNewlines = $expandNewlines; - } - - /** - * @return int[] With all available types - */ - public static function getAvailableTypes(): array - { - return [ - self::OPERATING_SYSTEM, - self::SAPI, - ]; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->expandNewlines) { - error_log((string) $record->formatted, $this->messageType); - - return; - } - - $lines = preg_split('{[\r\n]+}', (string) $record->formatted); - if ($lines === false) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode)); - } - foreach ($lines as $line) { - error_log($line, $this->messageType); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php deleted file mode 100644 index 58318bee..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Throwable; -use Monolog\LogRecord; - -/** - * Forwards records to at most one handler - * - * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. - * - * As soon as one handler handles a record successfully, the handling stops there. - */ -class FallbackGroupHandler extends GroupHandler -{ - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - foreach ($this->handlers as $handler) { - try { - $handler->handle(clone $record); - break; - } catch (Throwable $e) { - // What throwable? - } - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - break; - } catch (Throwable $e) { - // What throwable? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php deleted file mode 100644 index 6653fa15..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ /dev/null @@ -1,202 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Simple handler wrapper that filters records based on a list of levels - * - * It can be configured with an exact list of levels to allow, or a min/max level. - * - * @author Hennadiy Verkh - * @author Jordi Boggiano - */ -class FilterHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - /** - * Minimum level for logs that are passed to handler - * - * @var bool[] Map of Level value => true - * @phpstan-var array, true> - */ - protected array $acceptedLevels; - - /** - * Whether the messages that are handled can bubble up the stack or not - */ - protected bool $bubble; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $filterHandler). - * @param int|string|Level|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int|string|Level|LogLevel::* $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList - * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel - */ - public function __construct(Closure|HandlerInterface $handler, int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency, bool $bubble = true) - { - $this->handler = $handler; - $this->bubble = $bubble; - $this->setAcceptedLevels($minLevelOrList, $maxLevel); - } - - /** - * @phpstan-return list List of levels - */ - public function getAcceptedLevels(): array - { - return array_map(fn (int $level) => Level::from($level), array_keys($this->acceptedLevels)); - } - - /** - * @param int|string|Level|LogLevel::*|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided - * @param int|string|Level|LogLevel::* $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|array|value-of|Level|LogLevel::*> $minLevelOrList - * @phpstan-param value-of|value-of|Level|LogLevel::* $maxLevel - */ - public function setAcceptedLevels(int|string|Level|array $minLevelOrList = Level::Debug, int|string|Level $maxLevel = Level::Emergency): self - { - if (\is_array($minLevelOrList)) { - $acceptedLevels = array_map(Logger::toMonologLevel(...), $minLevelOrList); - } else { - $minLevelOrList = Logger::toMonologLevel($minLevelOrList); - $maxLevel = Logger::toMonologLevel($maxLevel); - $acceptedLevels = array_values(array_filter(Level::cases(), fn (Level $level) => $level->value >= $minLevelOrList->value && $level->value <= $maxLevel->value)); - } - $this->acceptedLevels = []; - foreach ($acceptedLevels as $level) { - $this->acceptedLevels[$level->value] = true; - } - - return $this; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return isset($this->acceptedLevels[$record->level->value]); - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $filtered = []; - foreach ($records as $record) { - if ($this->isHandling($record)) { - $filtered[] = $record; - } - } - - if (\count($filtered) > 0) { - $this->getHandler($filtered[\count($filtered) - 1])->handleBatch($filtered); - } - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord|null $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } - - public function reset(): void - { - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index e8a1b0b0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\LogRecord; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - */ - public function isHandlerActivated(LogRecord $record): bool; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php deleted file mode 100644 index 383e19af..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Channel and Error level based monolog activation strategy. Allows to trigger activation - * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except - * for records of the 'sql' channel; those should trigger activation on level 'WARN'. - * - * Example: - * - * - * $activationStrategy = new ChannelLevelActivationStrategy( - * Level::Critical, - * array( - * 'request' => Level::Alert, - * 'sensitive' => Level::Error, - * ) - * ); - * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); - * - * - * @author Mike Meessen - */ -class ChannelLevelActivationStrategy implements ActivationStrategyInterface -{ - private Level $defaultActionLevel; - - /** - * @var array - */ - private array $channelToActionLevel; - - /** - * @param int|string|Level|LogLevel::* $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $defaultActionLevel - * @phpstan-param array|value-of|Level|LogLevel::*> $channelToActionLevel - */ - public function __construct(int|string|Level $defaultActionLevel, array $channelToActionLevel = []) - { - $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); - $this->channelToActionLevel = array_map(Logger::toMonologLevel(...), $channelToActionLevel); - } - - public function isHandlerActivated(LogRecord $record): bool - { - if (isset($this->channelToActionLevel[$record->channel])) { - return $record->level->value >= $this->channelToActionLevel[$record->channel]->value; - } - - return $record->level->value >= $this->defaultActionLevel->value; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index c3ca2967..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Level; -use Monolog\LogRecord; -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - private Level $actionLevel; - - /** - * @param int|string|Level $actionLevel Level or name or value - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $actionLevel - */ - public function __construct(int|string|Level $actionLevel) - { - $this->actionLevel = Logger::toMonologLevel($actionLevel); - } - - public function isHandlerActivated(LogRecord $record): bool - { - return $record->level->value >= $this->actionLevel->value; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index 76318307..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Level; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * You can then have a passthruLevel as well which means that at the end of the request, - * even if it did not get activated, it will still send through log records of e.g. at least a - * warning level. - * - * You can find the various activation strategies in the - * Monolog\Handler\FingersCrossed\ namespace. - * - * @author Jordi Boggiano - */ -class FingersCrossedHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - protected ActivationStrategyInterface $activationStrategy; - - protected bool $buffering = true; - - protected int $bufferSize; - - /** @var LogRecord[] */ - protected array $buffer = []; - - protected bool $stopBuffering; - - protected Level|null $passthruLevel = null; - - protected bool $bubble; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $fingersCrossedHandler). - * @param int|string|Level|LogLevel::* $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int|string|Level|LogLevel::*|null $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::*|ActivationStrategyInterface $activationStrategy - * @phpstan-param value-of|value-of|Level|LogLevel::* $passthruLevel - */ - public function __construct(Closure|HandlerInterface $handler, int|string|Level|ActivationStrategyInterface $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, int|string|Level|null $passthruLevel = null) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Level::Warning); - } - - // convert simple int activationStrategy to an object - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - - if ($passthruLevel !== null) { - $this->passthruLevel = Logger::toMonologLevel($passthruLevel); - } - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return true; - } - - /** - * Manually activate this logger regardless of the activation strategy - */ - public function activate(): void - { - if ($this->stopBuffering) { - $this->buffering = false; - } - - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = []; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && \count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - $this->activate(); - } - } else { - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flushBuffer(); - - $this->getHandler()->close(); - } - - public function reset(): void - { - $this->flushBuffer(); - - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - * - * It also resets the handler to its initial buffering state. - */ - public function clear(): void - { - $this->buffer = []; - $this->reset(); - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - private function flushBuffer(): void - { - if (null !== $this->passthruLevel) { - $passthruLevel = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, static function ($record) use ($passthruLevel) { - return $passthruLevel->includes($record->level); - }); - if (\count($this->buffer) > 0) { - $this->getHandler(end($this->buffer))->handleBatch($this->buffer); - } - } - - $this->buffer = []; - $this->buffering = true; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord|null $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 6b9e5103..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * WildFire JSON header message format - */ - protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - protected const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - */ - protected static bool $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - */ - protected static int $messageIndex = 1; - - protected static bool $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * - * @return array Complete header string ready for the client as key and message as value - * - * @phpstan-return non-empty-array - */ - protected function createHeader(array $meta, string $message): array - { - $header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta)); - - return [$header => $message]; - } - - /** - * Creates message header from record - * - * @return array - * - * @phpstan-return non-empty-array - * - * @see createHeader() - */ - protected function createRecordHeader(LogRecord $record): array - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - [1, 1, 1, self::$messageIndex++], - $record->formatted - ); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * - * @return array - */ - protected function getInitHeaders(): array - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(['Protocol', 1], static::PROTOCOL_URI), - $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), - $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - */ - protected function write(LogRecord $record): void - { - if (!self::$sendHeaders || !$this->isWebRequest()) { - return; - } - - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - } - - $header = $this->createRecordHeader($record); - if (trim(current($header)) !== '') { - $this->sendHeader(key($header), current($header)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (isset($_SERVER['HTTP_USER_AGENT']) && 1 === preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { - return true; - } - - return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php deleted file mode 100644 index 46ebfc0b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Sends logs to Fleep.io using Webhook integrations - * - * You'll need a Fleep.io account to use this handler. - * - * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation - * @author Ando Roots - */ -class FleepHookHandler extends SocketHandler -{ - protected const FLEEP_HOST = 'fleep.io'; - - protected const FLEEP_HOOK_URI = '/hook/'; - - /** - * @var string Webhook token (specifies the conversation where logs are sent) - */ - protected string $token; - - /** - * Construct a new Fleep.io Handler. - * - * For instructions on how to create a new web hook in your conversations - * see https://fleep.io/integrations/webhooks/ - * - * @param string $token Webhook token - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $token, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); - } - - $this->token = $token; - - $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - } - - /** - * Returns the default formatter to use with this handler - * - * Overloaded to remove empty context and extra arrays from the end of the log message. - * - * @return LineFormatter - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(null, null, true, true); - } - - /** - * Handles a log record - */ - public function write(LogRecord $record): void - { - parent::write($record); - $this->closeSocket(); - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . static::FLEEP_HOST . "\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . \strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - $dataArray = [ - 'message' => $record->formatted, - ]; - - return http_build_query($dataArray); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php deleted file mode 100644 index 27c6c153..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\FlowdockFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Sends notifications through the Flowdock push API - * - * This must be configured with a FlowdockFormatter instance via setFormatter() - * - * Notes: - * API token - Flowdock API token - * - * @author Dominik Liebler - * @see https://www.flowdock.com/api/push - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockHandler extends SocketHandler -{ - protected string $apiToken; - - /** - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $apiToken, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); - } - - parent::__construct( - 'ssl://api.flowdock.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->apiToken = $apiToken; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if (!$formatter instanceof FlowdockFormatter) { - throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - return parent::setFormatter($formatter); - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - parent::write($record); - - $this->closeSocket(); - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - return Utils::jsonEncode($record->formatted); - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; - $header .= "Host: api.flowdock.com\r\n"; - $header .= "Content-Type: application/json\r\n"; - $header .= "Content-Length: " . \strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php deleted file mode 100644 index 72da59e1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface to describe loggers that have a formatter - * - * @author Jordi Boggiano - */ -interface FormattableHandlerInterface -{ - /** - * Sets the formatter. - * - * @return HandlerInterface self - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface; - - /** - * Gets the formatter. - */ - public function getFormatter(): FormatterInterface; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php deleted file mode 100644 index c044e078..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Helper trait for implementing FormattableInterface - * - * @author Jordi Boggiano - */ -trait FormattableHandlerTrait -{ - protected FormatterInterface|null $formatter = null; - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if (null === $this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Gets the default formatter. - * - * Overwrite this if the LineFormatter is not a good default for your handler. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index ba5bb975..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\PublisherInterface; -use Monolog\Level; -use Monolog\Formatter\GelfMessageFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - * @author Benjamin Zikarsky - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var PublisherInterface the publisher object that sends the message to the server - */ - protected PublisherInterface $publisher; - - /** - * @param PublisherInterface $publisher a gelf publisher object - */ - public function __construct(PublisherInterface $publisher, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->publisher = $publisher; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->publisher->publish($record->formatted); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new GelfMessageFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 0423dc34..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\ResettableInterface; -use Monolog\LogRecord; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - */ -class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface[] */ - protected array $handlers; - protected bool $bubble; - - /** - * @param HandlerInterface[] $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @throws \InvalidArgumentException if an unsupported handler is set - */ - public function __construct(array $handlers, bool $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - $handler->handle(clone $record); - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - } - } - - public function reset(): void - { - $this->resetProcessors(); - - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - } - - public function close(): void - { - parent::close(); - - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - foreach ($this->handlers as $handler) { - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - } - } - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/vendor/monolog/monolog/src/Monolog/Handler/Handler.php deleted file mode 100644 index e89f969b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing basic close() support as well as handleBatch - * - * @author Jordi Boggiano - */ -abstract class Handler implements HandlerInterface -{ - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * @inheritDoc - */ - public function close(): void - { - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Throwable $e) { - // do nothing - } - } - - public function __sleep() - { - $this->close(); - - $reflClass = new \ReflectionClass($this); - - $keys = []; - foreach ($reflClass->getProperties() as $reflProp) { - if (!$reflProp->isStatic()) { - $keys[] = $reflProp->getName(); - } - } - - return $keys; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index 93306d96..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param LogRecord $record Partial log record having only a level initialized - */ - public function isHandling(LogRecord $record): bool; - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param LogRecord $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. - */ - public function handle(LogRecord $record): bool; - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle - */ - public function handleBatch(array $records): void; - - /** - * Closes the handler. - * - * Ends a log cycle and frees all resources used by the handler. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * - * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) - * and ideally handlers should be able to reopen themselves on handle() after they have been closed. - * - * This is useful at the end of a request and will be called automatically when the object - * is destroyed if you extend Monolog\Handler\Handler. - * - * If you are thinking of calling this method yourself, most likely you should be - * calling ResettableInterface::reset instead. Have a look. - */ - public function close(): void; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php deleted file mode 100644 index 541ec254..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * This simple wrapper class can be used to extend handlers functionality. - * - * Example: A custom filtering that can be applied to any handler. - * - * Inherit from this class and override handle() like this: - * - * public function handle(LogRecord $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->handle($record); - * } - * - * @author Alexey Karapetov - */ -class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, FormattableHandlerInterface, ResettableInterface -{ - protected HandlerInterface $handler; - - public function __construct(HandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $this->handler->isHandling($record); - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return $this->handler->handle($record); - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $this->handler->handleBatch($records); - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->handler->close(); - } - - /** - * @inheritDoc - */ - public function pushProcessor(callable $callback): HandlerInterface - { - if ($this->handler instanceof ProcessableHandlerInterface) { - $this->handler->pushProcessor($callback); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function popProcessor(): callable - { - if ($this->handler instanceof ProcessableHandlerInterface) { - return $this->handler->popProcessor(); - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - public function reset(): void - { - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php deleted file mode 100644 index b9c7ba84..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * IFTTTHandler uses cURL to trigger IFTTT Maker actions - * - * Register a secret key and trigger/event name at https://ifttt.com/maker - * - * value1 will be the channel from monolog's Logger constructor, - * value2 will be the level name (ERROR, WARNING, ..) - * value3 will be the log record's message - * - * @author Nehal Patel - */ -class IFTTTHandler extends AbstractProcessingHandler -{ - private string $eventName; - private string $secretKey; - - /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $eventName, string $secretKey, int|string|Level $level = Level::Error, bool $bubble = true) - { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler'); - } - - $this->eventName = $eventName; - $this->secretKey = $secretKey; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - public function write(LogRecord $record): void - { - $postData = [ - "value1" => $record->channel, - "value2" => $record["level_name"], - "value3" => $record->message, - ]; - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); - curl_setopt($ch, CURLOPT_HTTPHEADER, [ - "Content-Type: application/json", - ]); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php deleted file mode 100644 index 4b558bd6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Inspired on LogEntriesHandler. - * - * @author Robert Kaufmann III - * @author Gabriel Machado - */ -class InsightOpsHandler extends SocketHandler -{ - protected string $logToken; - - /** - * @param string $token Log token supplied by InsightOps - * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. - * @param bool $useSSL Whether or not SSL encryption should be used - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $region = 'us', - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); - } - - $endpoint = $useSSL - ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' - : $region . '.data.logs.insight.rapid7.com:80'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php deleted file mode 100644 index 8c12898e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandler extends SocketHandler -{ - protected string $logToken; - - /** - * @param string $token Log token supplied by LogEntries - * @param bool $useSSL Whether or not SSL encryption should be used. - * @param string $host Custom hostname to send the data to if needed - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - string $host = 'data.logentries.com', - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); - } - - $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php deleted file mode 100644 index ff298c66..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogglyFormatter; -use CurlHandle; -use Monolog\LogRecord; - -/** - * Sends errors to Loggly. - * - * @author Przemek Sobstel - * @author Adam Pancutt - * @author Gregory Barchard - */ -class LogglyHandler extends AbstractProcessingHandler -{ - protected const HOST = 'logs-01.loggly.com'; - protected const ENDPOINT_SINGLE = 'inputs'; - protected const ENDPOINT_BATCH = 'bulk'; - - /** - * Caches the curl handlers for every given endpoint. - * - * @var CurlHandle[] - */ - protected array $curlHandlers = []; - - protected string $token; - - /** @var string[] */ - protected array $tag = []; - - /** - * @param string $token API token supplied by Loggly - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $token, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler'); - } - - $this->token = $token; - - parent::__construct($level, $bubble); - } - - /** - * Loads and returns the shared curl handler for the given endpoint. - */ - protected function getCurlHandler(string $endpoint): CurlHandle - { - if (!\array_key_exists($endpoint, $this->curlHandlers)) { - $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); - } - - return $this->curlHandlers[$endpoint]; - } - - /** - * Starts a fresh curl session for the given endpoint and returns its handler. - */ - private function loadCurlHandle(string $endpoint): CurlHandle - { - $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - return $ch; - } - - /** - * @param string[]|string $tag - * @return $this - */ - public function setTag(string|array $tag): self - { - if ('' === $tag || [] === $tag) { - $this->tag = []; - } else { - $this->tag = \is_array($tag) ? $tag : [$tag]; - } - - return $this; - } - - /** - * @param string[]|string $tag - * @return $this - */ - public function addTag(string|array $tag): self - { - if ('' !== $tag) { - $tag = \is_array($tag) ? $tag : [$tag]; - $this->tag = array_unique(array_merge($this->tag, $tag)); - } - - return $this; - } - - protected function write(LogRecord $record): void - { - $this->send($record->formatted, static::ENDPOINT_SINGLE); - } - - public function handleBatch(array $records): void - { - $level = $this->level; - - $records = array_filter($records, function ($record) use ($level) { - return ($record->level->value >= $level->value); - }); - - if (\count($records) > 0) { - $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); - } - } - - protected function send(string $data, string $endpoint): void - { - $ch = $this->getCurlHandler($endpoint); - - $headers = ['Content-Type: application/json']; - - if (\count($this->tag) > 0) { - $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); - } - - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - Curl\Util::execute($ch, 5, false); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new LogglyFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php deleted file mode 100644 index 6aa1b31b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogmaticFormatter; -use Monolog\LogRecord; - -/** - * @author Julien Breux - */ -class LogmaticHandler extends SocketHandler -{ - private string $logToken; - - private string $hostname; - - private string $appName; - - /** - * @param string $token Log token supplied by Logmatic. - * @param string $hostname Host name supplied by Logmatic. - * @param string $appName Application name supplied by Logmatic. - * @param bool $useSSL Whether or not SSL encryption should be used. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $hostname = '', - string $appName = '', - bool $useSSL = true, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); - } - - $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; - $endpoint .= '/v1/'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->logToken = $token; - $this->hostname = $hostname; - $this->appName = $appName; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - return $this->logToken . ' ' . $record->formatted; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - $formatter = new LogmaticFormatter(); - - if ($this->hostname !== '') { - $formatter->setHostname($this->hostname); - } - if ($this->appName !== '') { - $formatter->setAppName($this->appName); - } - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index b6c82277..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\HtmlFormatter; -use Monolog\LogRecord; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if ($record->level->isLowerThan($this->level)) { - continue; - } - - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (\count($messages) > 0) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content formatted email body to be sent - * @param array $records the array of log records that formed this content - * - * @phpstan-param non-empty-array $records - */ - abstract protected function send(string $content, array $records): void; - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->send((string) $record->formatted, [$record]); - } - - /** - * @phpstan-param non-empty-array $records - */ - protected function getHighestRecord(array $records): LogRecord - { - $highestRecord = null; - foreach ($records as $record) { - if ($highestRecord === null || $record->level->isHigherThan($highestRecord->level)) { - $highestRecord = $record; - } - } - - return $highestRecord; - } - - protected function isHtmlBody(string $body): bool - { - return ($body[0] ?? null) === '<'; - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new HtmlFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php deleted file mode 100644 index 64e16c9d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Swift; -use Swift_Message; - -/** - * MandrillHandler uses cURL to send the emails to the Mandrill API - * - * @author Adam Nicholson - */ -class MandrillHandler extends MailHandler -{ - protected Swift_Message $message; - protected string $apiKey; - - /** - * @phpstan-param (Swift_Message|callable(): Swift_Message) $message - * - * @param string $apiKey A valid Mandrill API key - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - * - * @throws \InvalidArgumentException if not a Swift Message is set - */ - public function __construct(string $apiKey, callable|Swift_Message $message, int|string|Level $level = Level::Error, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$message instanceof Swift_Message) { - $message = $message(); - } - if (!$message instanceof Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - $this->apiKey = $apiKey; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message = clone $this->message; - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'key' => $this->apiKey, - 'raw_message' => (string) $message, - 'async' => false, - ])); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 3965aeea..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for a handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 33ab68c6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Manager; -use MongoDB\Client; -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\MongoDBFormatter; -use Monolog\LogRecord; - -/** - * Logs to a MongoDB database. - * - * Usage example: - * - * $log = new \Monolog\Logger('application'); - * $client = new \MongoDB\Client('mongodb://localhost:27017'); - * $mongodb = new \Monolog\Handler\MongoDBHandler($client, 'logs', 'prod'); - * $log->pushHandler($mongodb); - * - * The above examples uses the MongoDB PHP library's client class; however, the - * MongoDB\Driver\Manager class from ext-mongodb is also supported. - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - private \MongoDB\Collection $collection; - - private Client|Manager $manager; - - private string|null $namespace = null; - - /** - * Constructor. - * - * @param Client|Manager $mongodb MongoDB library or driver client - * @param string $database Database name - * @param string $collection Collection name - */ - public function __construct(Client|Manager $mongodb, string $database, string $collection, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if ($mongodb instanceof Client) { - $this->collection = $mongodb->selectCollection($database, $collection); - } else { - $this->manager = $mongodb; - $this->namespace = $database . '.' . $collection; - } - - parent::__construct($level, $bubble); - } - - protected function write(LogRecord $record): void - { - if (isset($this->collection)) { - $this->collection->insertOne($record->formatted); - } - - if (isset($this->manager, $this->namespace)) { - $bulk = new BulkWrite; - $bulk->insert($record->formatted); - $this->manager->executeBulkWrite($this->namespace, $bulk); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new MongoDBFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index c68b1ddd..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,173 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\LineFormatter; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - * @author Mark Garrett - */ -class NativeMailerHandler extends MailHandler -{ - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected array $to; - - /** - * The subject of the email - */ - protected string $subject; - - /** - * Optional headers for the message - * @var string[] - */ - protected array $headers = []; - - /** - * Optional parameters for the message - * @var string[] - */ - protected array $parameters = []; - - /** - * The wordwrap length for the message - */ - protected int $maxColumnWidth; - - /** - * The Content-type for the message - */ - protected string|null $contentType = null; - - /** - * The encoding for the message - */ - protected string $encoding = 'utf-8'; - - /** - * @param string|string[] $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param int $maxColumnWidth The maximum column width that the message lines will have - */ - public function __construct(string|array $to, string $subject, string $from, int|string|Level $level = Level::Error, bool $bubble = true, int $maxColumnWidth = 70) - { - parent::__construct($level, $bubble); - $this->to = (array) $to; - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - $this->maxColumnWidth = $maxColumnWidth; - } - - /** - * Add headers to the message - * - * @param string|string[] $headers Custom added headers - * @return $this - */ - public function addHeader($headers): self - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - - return $this; - } - - /** - * Add parameters to the message - * - * @param string|string[] $parameters Custom added parameters - * @return $this - */ - public function addParameter($parameters): self - { - $this->parameters = array_merge($this->parameters, (array) $parameters); - - return $this; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $contentType = $this->getContentType() ?? ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); - - if ($contentType !== 'text/html') { - $content = wordwrap($content, $this->maxColumnWidth); - } - - $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; - if ($contentType === 'text/html' && false === strpos($headers, 'MIME-Version:')) { - $headers .= 'MIME-Version: 1.0' . "\r\n"; - } - - $subjectFormatter = new LineFormatter($this->subject); - $subject = $subjectFormatter->format($this->getHighestRecord($records)); - - $parameters = implode(' ', $this->parameters); - foreach ($this->to as $to) { - mail($to, $subject, $content, $headers, $parameters); - } - } - - public function getContentType(): ?string - { - return $this->contentType; - } - - public function getEncoding(): string - { - return $this->encoding; - } - - /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. - * @return $this - */ - public function setContentType(string $contentType): self - { - if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { - throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); - } - - $this->contentType = $contentType; - - return $this; - } - - /** - * @return $this - */ - public function setEncoding(string $encoding): self - { - if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { - throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); - } - - $this->encoding = $encoding; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php deleted file mode 100644 index 4f28dd4a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Class to record a log on a NewRelic application. - * Enabling New Relic High Security mode may prevent capture of useful information. - * - * This handler requires a NormalizerFormatter to function and expects an array in $record->formatted - * - * @see https://docs.newrelic.com/docs/agents/php-agent - * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security - */ -class NewRelicHandler extends AbstractProcessingHandler -{ - /** - * @inheritDoc - */ - public function __construct( - int|string|Level $level = Level::Error, - bool $bubble = true, - - /** - * Name of the New Relic application that will receive logs from this handler. - */ - protected string|null $appName = null, - - /** - * Some context and extra data is passed into the handler as arrays of values. Do we send them as is - * (useful if we are using the API), or explode them for display on the NewRelic RPM website? - */ - protected bool $explodeArrays = false, - - /** - * Name of the current transaction - */ - protected string|null $transactionName = null - ) { - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->isNewRelicEnabled()) { - throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); - } - - if (null !== ($appName = $this->getAppName($record->context))) { - $this->setNewRelicAppName($appName); - } - - if (null !== ($transactionName = $this->getTransactionName($record->context))) { - $this->setNewRelicTransactionName($transactionName); - unset($record->formatted['context']['transaction_name']); - } - - if (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { - newrelic_notice_error($record->message, $record->context['exception']); - unset($record->formatted['context']['exception']); - } else { - newrelic_notice_error($record->message); - } - - if (isset($record->formatted['context']) && \is_array($record->formatted['context'])) { - foreach ($record->formatted['context'] as $key => $parameter) { - if (\is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('context_' . $key, $parameter); - } - } - } - - if (isset($record->formatted['extra']) && \is_array($record->formatted['extra'])) { - foreach ($record->formatted['extra'] as $key => $parameter) { - if (\is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('extra_' . $key, $parameter); - } - } - } - } - - /** - * Checks whether the NewRelic extension is enabled in the system. - */ - protected function isNewRelicEnabled(): bool - { - return \extension_loaded('newrelic'); - } - - /** - * Returns the appname where this log should be sent. Each log can override the default appname, set in this - * handler's constructor, by providing the appname in it's context. - * - * @param mixed[] $context - */ - protected function getAppName(array $context): ?string - { - if (isset($context['appname'])) { - return $context['appname']; - } - - return $this->appName; - } - - /** - * Returns the name of the current transaction. Each log can override the default transaction name, set in this - * handler's constructor, by providing the transaction_name in it's context - * - * @param mixed[] $context - */ - protected function getTransactionName(array $context): ?string - { - if (isset($context['transaction_name'])) { - return $context['transaction_name']; - } - - return $this->transactionName; - } - - /** - * Sets the NewRelic application that should receive this log. - */ - protected function setNewRelicAppName(string $appName): void - { - newrelic_set_appname($appName); - } - - /** - * Overwrites the name of the current transaction - */ - protected function setNewRelicTransactionName(string $transactionName): void - { - newrelic_name_transaction($transactionName); - } - - /** - * @param mixed $value - */ - protected function setNewRelicParameter(string $key, $value): void - { - if (null === $value || \is_scalar($value)) { - newrelic_add_custom_parameter($key, $value); - } else { - newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php deleted file mode 100644 index d9fea180..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; - -/** - * No-op - * - * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. - * This can be used for testing, or to disable a handler when overriding a configuration without - * influencing the rest of the stack. - * - * @author Roel Harbers - */ -class NoopHandler extends Handler -{ - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return true; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index 1aa84e4f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Psr\Log\LogLevel; -use Monolog\Logger; -use Monolog\LogRecord; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - */ -class NullHandler extends Handler -{ - private Level $level; - - /** - * @param string|int|Level $level The minimum logging level at which this handler will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(string|int|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function isHandling(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - return $record->level->value >= $this->level->value; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php deleted file mode 100644 index b213a98d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Handler to only pass log messages when a certain threshold of number of messages is reached. - * - * This can be useful in cases of processing a batch of data, but you're for example only interested - * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? - * - * Usage example: - * - * ``` - * $log = new Logger('application'); - * $handler = new SomeHandler(...) - * - * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 - * $overflow = new OverflowHandler($handler, [Level::Warning->value => 10, Level::Error->value => 5]); - * - * $log->pushHandler($overflow); - *``` - * - * @author Kris Buist - */ -class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface -{ - private HandlerInterface $handler; - - /** @var array */ - private array $thresholdMap = []; - - /** - * Buffer of all messages passed to the handler before the threshold was reached - * - * @var mixed[][] - */ - private array $buffer = []; - - /** - * @param array $thresholdMap Dictionary of log level value => threshold - */ - public function __construct( - HandlerInterface $handler, - array $thresholdMap = [], - $level = Level::Debug, - bool $bubble = true - ) { - $this->handler = $handler; - foreach ($thresholdMap as $thresholdLevel => $threshold) { - $this->thresholdMap[$thresholdLevel] = $threshold; - } - parent::__construct($level, $bubble); - } - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if ($record->level->isLowerThan($this->level)) { - return false; - } - - $level = $record->level->value; - - if (!isset($this->thresholdMap[$level])) { - $this->thresholdMap[$level] = 0; - } - - if ($this->thresholdMap[$level] > 0) { - // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 - $this->thresholdMap[$level]--; - $this->buffer[$level][] = $record; - - return false === $this->bubble; - } - - if ($this->thresholdMap[$level] == 0) { - // This current message is breaking the threshold. Flush the buffer and continue handling the current record - foreach ($this->buffer[$level] ?? [] as $buffered) { - $this->handler->handle($buffered); - } - $this->thresholdMap[$level]--; - unset($this->buffer[$level]); - } - - $this->handler->handle($record); - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php deleted file mode 100644 index 8aa78e4c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ /dev/null @@ -1,303 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use PhpConsole\Connector; -use PhpConsole\Handler as VendorPhpConsoleHandler; -use PhpConsole\Helper; -use Monolog\LogRecord; -use PhpConsole\Storage; - -/** - * Monolog handler for Google Chrome extension "PHP Console" - * - * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely - * - * Usage: - * 1. Install Google Chrome extension [now dead and removed from the chrome store] - * 2. See overview https://github.com/barbushin/php-console#overview - * 3. Install PHP Console library https://github.com/barbushin/php-console#installation - * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) - * - * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); - * \Monolog\ErrorHandler::register($logger); - * echo $undefinedVar; - * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); - * PC::debug($_SERVER); // PHP Console debugger for any type of vars - * - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - * @phpstan-type Options array{ - * enabled: bool, - * classesPartialsTraceIgnore: string[], - * debugTagsKeysInContext: array, - * useOwnErrorsHandler: bool, - * useOwnExceptionsHandler: bool, - * sourcesBasePath: string|null, - * registerHelper: bool, - * serverEncoding: string|null, - * headersLimit: int|null, - * password: string|null, - * enableSslOnlyMode: bool, - * ipMasks: string[], - * enableEvalListener: bool, - * dumperDetectCallbacks: bool, - * dumperLevelLimit: int, - * dumperItemsCountLimit: int, - * dumperItemSizeLimit: int, - * dumperDumpSizeLimit: int, - * detectDumpTraceAndSource: bool, - * dataStorage: Storage|null - * } - * @phpstan-type InputOptions array{ - * enabled?: bool, - * classesPartialsTraceIgnore?: string[], - * debugTagsKeysInContext?: array, - * useOwnErrorsHandler?: bool, - * useOwnExceptionsHandler?: bool, - * sourcesBasePath?: string|null, - * registerHelper?: bool, - * serverEncoding?: string|null, - * headersLimit?: int|null, - * password?: string|null, - * enableSslOnlyMode?: bool, - * ipMasks?: string[], - * enableEvalListener?: bool, - * dumperDetectCallbacks?: bool, - * dumperLevelLimit?: int, - * dumperItemsCountLimit?: int, - * dumperItemSizeLimit?: int, - * dumperDumpSizeLimit?: int, - * detectDumpTraceAndSource?: bool, - * dataStorage?: Storage|null - * } - * - * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 - */ -class PHPConsoleHandler extends AbstractProcessingHandler -{ - /** - * @phpstan-var Options - */ - private array $options = [ - 'enabled' => true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => ['Monolog\\'], // array Hide calls of classes started with... - 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled - 'useOwnErrorsHandler' => false, // bool Enable errors handling - 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling - 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths - 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') - 'serverEncoding' => null, // string|null Server internal encoding - 'headersLimit' => null, // int|null Set headers size limit for your web-server - 'password' => null, // string|null Protect PHP Console connection by password - 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') - 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) - 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings - 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level - 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number - 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item - 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON - 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug - 'dataStorage' => null, // \PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) - ]; - - private Connector $connector; - - /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @throws \RuntimeException - * @phpstan-param InputOptions $options - */ - public function __construct(array $options = [], ?Connector $connector = null, int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!class_exists('PhpConsole\Connector')) { - throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - parent::__construct($level, $bubble); - $this->options = $this->initOptions($options); - $this->connector = $this->initConnector($connector); - } - - /** - * @param array $options - * @return array - * - * @phpstan-param InputOptions $options - * @phpstan-return Options - */ - private function initOptions(array $options): array - { - $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); - if (\count($wrongOptions) > 0) { - throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions)); - } - - return array_replace($this->options, $options); - } - - private function initConnector(?Connector $connector = null): Connector - { - if (null === $connector) { - if ($this->options['dataStorage'] instanceof Storage) { - Connector::setPostponeStorage($this->options['dataStorage']); - } - $connector = Connector::getInstance(); - } - - if ($this->options['registerHelper'] && !Helper::isRegistered()) { - Helper::register(); - } - - if ($this->options['enabled'] && $connector->isActiveClient()) { - if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { - $handler = VendorPhpConsoleHandler::getInstance(); - $handler->setHandleErrors($this->options['useOwnErrorsHandler']); - $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); - $handler->start(); - } - if (null !== $this->options['sourcesBasePath']) { - $connector->setSourcesBasePath($this->options['sourcesBasePath']); - } - if (null !== $this->options['serverEncoding']) { - $connector->setServerEncoding($this->options['serverEncoding']); - } - if (null !== $this->options['password']) { - $connector->setPassword($this->options['password']); - } - if ($this->options['enableSslOnlyMode']) { - $connector->enableSslOnlyMode(); - } - if (\count($this->options['ipMasks']) > 0) { - $connector->setAllowedIpMasks($this->options['ipMasks']); - } - if (null !== $this->options['headersLimit'] && $this->options['headersLimit'] > 0) { - $connector->setHeadersLimit($this->options['headersLimit']); - } - if ($this->options['detectDumpTraceAndSource']) { - $connector->getDebugDispatcher()->detectTraceAndSource = true; - } - $dumper = $connector->getDumper(); - $dumper->levelLimit = $this->options['dumperLevelLimit']; - $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; - $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; - $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; - $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; - if ($this->options['enableEvalListener']) { - $connector->startEvalRequestsListener(); - } - } - - return $connector; - } - - public function getConnector(): Connector - { - return $this->connector; - } - - /** - * @return array - */ - public function getOptions(): array - { - return $this->options; - } - - public function handle(LogRecord $record): bool - { - if ($this->options['enabled'] && $this->connector->isActiveClient()) { - return parent::handle($record); - } - - return !$this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - */ - protected function write(LogRecord $record): void - { - if ($record->level->isLowerThan(Level::Notice)) { - $this->handleDebugRecord($record); - } elseif (isset($record->context['exception']) && $record->context['exception'] instanceof \Throwable) { - $this->handleExceptionRecord($record); - } else { - $this->handleErrorRecord($record); - } - } - - private function handleDebugRecord(LogRecord $record): void - { - [$tags, $filteredContext] = $this->getRecordTags($record); - $message = $record->message; - if (\count($filteredContext) > 0) { - $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($filteredContext)), null, true); - } - $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); - } - - private function handleExceptionRecord(LogRecord $record): void - { - $this->connector->getErrorsDispatcher()->dispatchException($record->context['exception']); - } - - private function handleErrorRecord(LogRecord $record): void - { - $context = $record->context; - - $this->connector->getErrorsDispatcher()->dispatchError( - $context['code'] ?? null, - $context['message'] ?? $record->message, - $context['file'] ?? null, - $context['line'] ?? null, - $this->options['classesPartialsTraceIgnore'] - ); - } - - /** - * @return array{string, mixed[]} - */ - private function getRecordTags(LogRecord $record): array - { - $tags = null; - $filteredContext = []; - if ($record->context !== []) { - $filteredContext = $record->context; - foreach ($this->options['debugTagsKeysInContext'] as $key) { - if (isset($filteredContext[$key])) { - $tags = $filteredContext[$key]; - if ($key === 0) { - array_shift($filteredContext); - } else { - unset($filteredContext[$key]); - } - break; - } - } - } - - return [$tags ?? $record->level->toPsrLogLevel(), $filteredContext]; - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%message%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php deleted file mode 100644 index 8b68e646..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Stores to STDIN of any process, specified by a command. - * - * Usage example: - *
      - * $log = new Logger('myLogger');
      - * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
      - * 
      - * - * @author Kolja Zuelsdorf - */ -class ProcessHandler extends AbstractProcessingHandler -{ - /** - * Holds the process to receive data on its STDIN. - * - * @var resource|bool|null - */ - private $process; - - private string $command; - - private ?string $cwd; - - /** - * @var resource[] - */ - private array $pipes = []; - - /** - * @var array - */ - protected const DESCRIPTOR_SPEC = [ - 0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from - 1 => ['pipe', 'w'], // STDOUT is a pipe that the child will write to - 2 => ['pipe', 'w'], // STDERR is a pipe to catch the any errors - ]; - - /** - * @param string $command Command for the process to start. Absolute paths are recommended, - * especially if you do not use the $cwd parameter. - * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. - * @throws \InvalidArgumentException - */ - public function __construct(string $command, int|string|Level $level = Level::Debug, bool $bubble = true, ?string $cwd = null) - { - if ($command === '') { - throw new \InvalidArgumentException('The command argument must be a non-empty string.'); - } - if ($cwd === '') { - throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); - } - - parent::__construct($level, $bubble); - - $this->command = $command; - $this->cwd = $cwd; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @throws \UnexpectedValueException - */ - protected function write(LogRecord $record): void - { - $this->ensureProcessIsStarted(); - - $this->writeProcessInput($record->formatted); - - $errors = $this->readProcessErrors(); - if ($errors !== '') { - throw new \UnexpectedValueException(sprintf('Errors while writing to process: %s', $errors)); - } - } - - /** - * Makes sure that the process is actually started, and if not, starts it, - * assigns the stream pipes, and handles startup errors, if any. - */ - private function ensureProcessIsStarted(): void - { - if (\is_resource($this->process) === false) { - $this->startProcess(); - - $this->handleStartupErrors(); - } - } - - /** - * Starts the actual process and sets all streams to non-blocking. - */ - private function startProcess(): void - { - $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, false); - } - } - - /** - * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. - * - * @throws \UnexpectedValueException - */ - private function handleStartupErrors(): void - { - $selected = $this->selectErrorStream(); - if (false === $selected) { - throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); - } - - $errors = $this->readProcessErrors(); - - if (\is_resource($this->process) === false || $errors !== '') { - throw new \UnexpectedValueException( - sprintf('The process "%s" could not be opened: ' . $errors, $this->command) - ); - } - } - - /** - * Selects the STDERR stream. - * - * @return int|bool - */ - protected function selectErrorStream() - { - $empty = []; - $errorPipes = [$this->pipes[2]]; - - return stream_select($errorPipes, $empty, $empty, 1); - } - - /** - * Reads the errors of the process, if there are any. - * - * @codeCoverageIgnore - * @return string Empty string if there are no errors. - */ - protected function readProcessErrors(): string - { - return (string) stream_get_contents($this->pipes[2]); - } - - /** - * Writes to the input stream of the opened process. - * - * @codeCoverageIgnore - */ - protected function writeProcessInput(string $string): void - { - fwrite($this->pipes[0], $string); - } - - /** - * @inheritDoc - */ - public function close(): void - { - if (\is_resource($this->process)) { - foreach ($this->pipes as $pipe) { - fclose($pipe); - } - proc_close($this->process); - $this->process = null; - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php deleted file mode 100644 index 9fb290fa..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Processor\ProcessorInterface; -use Monolog\LogRecord; - -/** - * Interface to describe loggers that have processors - * - * @author Jordi Boggiano - */ -interface ProcessableHandlerInterface -{ - /** - * Adds a processor in the stack. - * - * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * - * @param ProcessorInterface|callable $callback - * @return HandlerInterface self - */ - public function pushProcessor(callable $callback): HandlerInterface; - - /** - * Removes the processor on top of the stack and returns it. - * - * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * - * @throws \LogicException In case the processor stack is empty - * @return callable|ProcessorInterface - */ - public function popProcessor(): callable; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php deleted file mode 100644 index 74eedddd..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Processor\ProcessorInterface; -use Monolog\LogRecord; - -/** - * Helper trait for implementing ProcessableInterface - * - * @author Jordi Boggiano - */ -trait ProcessableHandlerTrait -{ - /** - * @var callable[] - * @phpstan-var array<(callable(LogRecord): LogRecord)|ProcessorInterface> - */ - protected array $processors = []; - - /** - * @inheritDoc - */ - public function pushProcessor(callable $callback): HandlerInterface - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * @inheritDoc - */ - public function popProcessor(): callable - { - if (\count($this->processors) === 0) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - protected function processRecord(LogRecord $record): LogRecord - { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - - return $record; - } - - protected function resetProcessors(): void - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php deleted file mode 100644 index 100e8e4a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Psr\Log\LoggerInterface; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Proxies log messages to an existing PSR-3 compliant logger. - * - * If a formatter is configured, the formatter's output MUST be a string and the - * formatted message will be fed to the wrapped PSR logger instead of the original - * log record's message. - * - * @author Michael Moussa - */ -class PsrHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** - * PSR-3 compliant logger - */ - protected LoggerInterface $logger; - - protected FormatterInterface|null $formatter = null; - private bool $includeExtra; - - /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - */ - public function __construct(LoggerInterface $logger, int|string|Level $level = Level::Debug, bool $bubble = true, bool $includeExtra = false) - { - parent::__construct($level, $bubble); - - $this->logger = $logger; - $this->includeExtra = $includeExtra; - } - - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - $message = $this->formatter !== null - ? (string) $this->formatter->format($record) - : $record->message; - - $context = $this->includeExtra - ? [...$record->extra, ...$record->context] - : $record->context; - - $this->logger->log($record->level->toPsrLogLevel(), $message, $context); - - return false === $this->bubble; - } - - /** - * Sets the formatter. - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Gets the formatter. - */ - public function getFormatter(): FormatterInterface - { - if ($this->formatter === null) { - throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); - } - - return $this->formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index b2a78955..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\Utils; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandler extends SocketHandler -{ - private string $token; - - /** @var array */ - private array $users; - - private string $title; - - private string|int|null $user = null; - - private int $retry; - - private int $expire; - - private Level $highPriorityLevel; - - private Level $emergencyLevel; - - private bool $useFormattedMessage = false; - - /** - * All parameters that can be sent to Pushover - * @see https://pushover.net/api - * @var array - */ - private array $parameterNames = [ - 'token' => true, - 'user' => true, - 'message' => true, - 'device' => true, - 'title' => true, - 'url' => true, - 'url_title' => true, - 'priority' => true, - 'timestamp' => true, - 'sound' => true, - 'retry' => true, - 'expire' => true, - 'callback' => true, - ]; - - /** - * Sounds the api supports by default - * @see https://pushover.net/api#sounds - * @var string[] - */ - private array $sounds = [ - 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', - 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', - 'persistent', 'echo', 'updown', 'none', - ]; - - /** - * @param string $token Pushover api token - * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string|null $title Title sent to the Pushover API - * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will - * send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue - * to be retried for (every retry seconds). - * - * @param int|string|Level|LogLevel::* $highPriorityLevel The minimum logging level at which this handler will start - * sending "high priority" requests to the Pushover API - * @param int|string|Level|LogLevel::* $emergencyLevel The minimum logging level at which this handler will start - * sending "emergency" requests to the Pushover API - * - * - * @phpstan-param string|array $users - * @phpstan-param value-of|value-of|Level|LogLevel::* $highPriorityLevel - * @phpstan-param value-of|value-of|Level|LogLevel::* $emergencyLevel - */ - public function __construct( - string $token, - $users, - ?string $title = null, - int|string|Level $level = Level::Critical, - bool $bubble = true, - bool $useSSL = true, - int|string|Level $highPriorityLevel = Level::Critical, - int|string|Level $emergencyLevel = Level::Emergency, - int $retry = 30, - int $expire = 25200, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->token = $token; - $this->users = (array) $users; - $this->title = $title ?? (string) gethostname(); - $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); - $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); - $this->retry = $retry; - $this->expire = $expire; - } - - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - private function buildContent(LogRecord $record): string - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - \strlen($this->title); - - $message = ($this->useFormattedMessage) ? $record->formatted : $record->message; - $message = Utils::substr($message, 0, $maxMessageLength); - - $timestamp = $record->datetime->getTimestamp(); - - $dataArray = [ - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp, - ]; - - if ($record->level->value >= $this->emergencyLevel->value) { - $dataArray['priority'] = 2; - $dataArray['retry'] = $this->retry; - $dataArray['expire'] = $this->expire; - } elseif ($record->level->value >= $this->highPriorityLevel->value) { - $dataArray['priority'] = 1; - } - - // First determine the available parameters - $context = array_intersect_key($record->context, $this->parameterNames); - $extra = array_intersect_key($record->extra, $this->parameterNames); - - // Least important info should be merged with subsequent info - $dataArray = array_merge($extra, $context, $dataArray); - - // Only pass sounds that are supported by the API - if (isset($dataArray['sound']) && !\in_array($dataArray['sound'], $this->sounds, true)) { - unset($dataArray['sound']); - } - - return http_build_query($dataArray); - } - - private function buildHeader(string $content): string - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . \strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - protected function write(LogRecord $record): void - { - foreach ($this->users as $user) { - $this->user = $user; - - parent::write($record); - $this->closeSocket(); - } - - $this->user = null; - } - - /** - * @param int|string|Level|LogLevel::* $level - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setHighPriorityLevel(int|string|Level $level): self - { - $this->highPriorityLevel = Logger::toMonologLevel($level); - - return $this; - } - - /** - * @param int|string|Level|LogLevel::* $level - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function setEmergencyLevel(int|string|Level $level): self - { - $this->emergencyLevel = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Use the formatted message? - * - * @return $this - */ - public function useFormattedMessage(bool $useFormattedMessage): self - { - $this->useFormattedMessage = $useFormattedMessage; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 66cb324f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\LogRecord; -use Predis\Client as Predis; -use Redis; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - */ -class RedisHandler extends AbstractProcessingHandler -{ - /** @var Predis|Redis */ - private Predis|Redis $redisClient; - private string $redisKey; - protected int $capSize; - - /** - * @param Predis|Redis $redis The redis instance - * @param string $key The key name to push records to - * @param int $capSize Number of entries to limit list size to, 0 = unlimited - */ - public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true, int $capSize = 0) - { - $this->redisClient = $redis; - $this->redisKey = $key; - $this->capSize = $capSize; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if ($this->capSize > 0) { - $this->writeCapped($record); - } else { - $this->redisClient->rpush($this->redisKey, $record->formatted); - } - } - - /** - * Write and cap the collection - * Writes the record to the redis list and caps its - */ - protected function writeCapped(LogRecord $record): void - { - if ($this->redisClient instanceof Redis) { - $mode = \defined('Redis::MULTI') ? Redis::MULTI : 1; - $this->redisClient->multi($mode) - ->rPush($this->redisKey, $record->formatted) - ->lTrim($this->redisKey, -$this->capSize, -1) - ->exec(); - } else { - $redisKey = $this->redisKey; - $capSize = $this->capSize; - $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { - $tx->rpush($redisKey, $record->formatted); - $tx->ltrim($redisKey, -$capSize, -1); - }); - } - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php deleted file mode 100644 index fa8e9e9f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\LogRecord; -use Predis\Client as Predis; -use Redis; - -/** - * Sends the message to a Redis Pub/Sub channel using PUBLISH - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Level::Warning); - * $log->pushHandler($redis); - * - * @author Gaëtan Faugère - */ -class RedisPubSubHandler extends AbstractProcessingHandler -{ - /** @var Predis|Redis */ - private Predis|Redis $redisClient; - private string $channelKey; - - /** - * @param Predis|Redis $redis The redis instance - * @param string $key The channel key to publish records to - */ - public function __construct(Predis|Redis $redis, string $key, int|string|Level $level = Level::Debug, bool $bubble = true) - { - $this->redisClient = $redis; - $this->channelKey = $key; - - parent::__construct($level, $bubble); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->redisClient->publish($this->channelKey, $record->formatted); - } - - /** - * @inheritDoc - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php deleted file mode 100644 index 1d124723..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Rollbar\RollbarLogger; -use Throwable; -use Monolog\LogRecord; - -/** - * Sends errors to Rollbar - * - * If the context data contains a `payload` key, that is used as an array - * of payload options to RollbarLogger's log method. - * - * Rollbar's context info will contain the context + extra keys from the log record - * merged, and then on top of that a few keys: - * - * - level (rollbar level name) - * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) - * - channel - * - datetime (unix timestamp) - * - * @author Paul Statezny - */ -class RollbarHandler extends AbstractProcessingHandler -{ - protected RollbarLogger $rollbarLogger; - - /** - * Records whether any log records have been added since the last flush of the rollbar notifier - */ - private bool $hasRecords = false; - - protected bool $initialized = false; - - /** - * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token - */ - public function __construct(RollbarLogger $rollbarLogger, int|string|Level $level = Level::Error, bool $bubble = true) - { - $this->rollbarLogger = $rollbarLogger; - - parent::__construct($level, $bubble); - } - - /** - * Translates Monolog log levels to Rollbar levels. - * - * @return 'debug'|'info'|'warning'|'error'|'critical' - */ - protected function toRollbarLevel(Level $level): string - { - return match ($level) { - Level::Debug => 'debug', - Level::Info => 'info', - Level::Notice => 'info', - Level::Warning => 'warning', - Level::Error => 'error', - Level::Critical => 'critical', - Level::Alert => 'critical', - Level::Emergency => 'critical', - }; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - $context = $record->context; - $context = array_merge($context, $record->extra, [ - 'level' => $this->toRollbarLevel($record->level), - 'monolog_level' => $record->level->getName(), - 'channel' => $record->channel, - 'datetime' => $record->datetime->format('U'), - ]); - - if (isset($context['exception']) && $context['exception'] instanceof Throwable) { - $exception = $context['exception']; - unset($context['exception']); - $toLog = $exception; - } else { - $toLog = $record->message; - } - - // @phpstan-ignore-next-line - $this->rollbarLogger->log($context['level'], $toLog, $context); - - $this->hasRecords = true; - } - - public function flush(): void - { - if ($this->hasRecords) { - $this->rollbarLogger->flush(); - $this->hasRecords = false; - } - } - - /** - * @inheritDoc - */ - public function close(): void - { - $this->flush(); - } - - /** - * @inheritDoc - */ - public function reset(): void - { - $this->flush(); - - parent::reset(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index 32a496b3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use InvalidArgumentException; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - public const FILE_PER_DAY = 'Y-m-d'; - public const FILE_PER_MONTH = 'Y-m'; - public const FILE_PER_YEAR = 'Y'; - - protected string $filename; - protected int $maxFiles; - protected bool|null $mustRotate = null; - protected \DateTimeImmutable $nextRotation; - protected string $filenameFormat; - protected string $dateFormat; - - /** - * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - */ - public function __construct(string $filename, int $maxFiles = 0, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false, string $dateFormat = self::FILE_PER_DAY, string $filenameFormat = '{filename}-{date}') - { - $this->filename = Utils::canonicalizePath($filename); - $this->maxFiles = $maxFiles; - $this->setFilenameFormat($filenameFormat, $dateFormat); - $this->nextRotation = $this->getNextRotation(); - - parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); - } - - /** - * @inheritDoc - */ - public function close(): void - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * @inheritDoc - */ - public function reset(): void - { - parent::reset(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * @return $this - */ - public function setFilenameFormat(string $filenameFormat, string $dateFormat): self - { - $this->setDateFormat($dateFormat); - if (substr_count($filenameFormat, '{date}') === 0) { - throw new InvalidArgumentException( - 'Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.' - ); - } - $this->filenameFormat = $filenameFormat; - $this->url = $this->getTimedFilename(); - $this->close(); - - return $this; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = null === $this->url || !file_exists($this->url); - } - - if ($this->nextRotation <= $record->datetime) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate(): void - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = $this->getNextRotation(); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $logFiles = glob($this->getGlobPattern()); - if (false === $logFiles) { - // failed to glob - return; - } - - if ($this->maxFiles >= \count($logFiles)) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - usort($logFiles, function ($a, $b) { - return strcmp($b, $a); - }); - - foreach (\array_slice($logFiles, $this->maxFiles) as $file) { - if (is_writable($file)) { - // suppress errors here as unlink() might fail if two processes - // are cleaning up/rotating at the same time - set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool { - return false; - }); - unlink($file); - restore_error_handler(); - } - } - - $this->mustRotate = false; - } - - protected function getTimedFilename(): string - { - $fileInfo = pathinfo($this->filename); - $timedFilename = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], date($this->dateFormat)], - ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat - ); - - if (isset($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } - - protected function getGlobPattern(): string - { - $fileInfo = pathinfo($this->filename); - $glob = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], str_replace( - ['Y', 'y', 'm', 'd'], - ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], - $this->dateFormat - )], - ($fileInfo['dirname'] ?? '') . '/' . $this->filenameFormat - ); - if (isset($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - - return $glob; - } - - protected function setDateFormat(string $dateFormat): void - { - if (0 === preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - throw new InvalidArgumentException( - 'Invalid date format - format must be one of '. - 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. - 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. - 'date formats using slashes, underscores and/or dots instead of dashes.' - ); - } - $this->dateFormat = $dateFormat; - } - - protected function getNextRotation(): \DateTimeImmutable - { - return match (str_replace(['/','_','.'], '-', $this->dateFormat)) { - self::FILE_PER_MONTH => (new \DateTimeImmutable('first day of next month'))->setTime(0, 0, 0), - self::FILE_PER_YEAR => (new \DateTimeImmutable('first day of January next year'))->setTime(0, 0, 0), - default => (new \DateTimeImmutable('tomorrow'))->setTime(0, 0, 0), - }; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php deleted file mode 100644 index 1b10580f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Sampling handler - * - * A sampled event stream can be useful for logging high frequency events in - * a production environment where you only need an idea of what is happening - * and are not concerned with capturing every occurrence. Since the decision to - * handle or not handle a particular event is determined randomly, the - * resulting sampled log is not guaranteed to contain 1/N of the events that - * occurred in the application, but based on the Law of large numbers, it will - * tend to be close to this ratio with a large number of attempts. - * - * @author Bryan Davis - * @author Kunal Mehta - */ -class SamplingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory Closure($record, $this) - * - * @phpstan-var (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface - */ - protected Closure|HandlerInterface $handler; - - protected int $factor; - - /** - * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler - * - * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $samplingHandler). - * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) - */ - public function __construct(Closure|HandlerInterface $handler, int $factor) - { - parent::__construct(); - $this->handler = $handler; - $this->factor = $factor; - } - - public function isHandling(LogRecord $record): bool - { - return $this->getHandler($record)->isHandling($record); - } - - public function handle(LogRecord $record): bool - { - if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory, this will trigger the handler's instantiation. - */ - public function getHandler(LogRecord|null $record = null): HandlerInterface - { - if (!$this->handler instanceof HandlerInterface) { - $handler = ($this->handler)($record, $this); - if (!$handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory Closure should return a HandlerInterface"); - } - $this->handler = $handler; - } - - return $this->handler; - } - - /** - * @inheritDoc - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } - - /** - * @inheritDoc - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.\get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php deleted file mode 100644 index 0a6fe406..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; - -/** - * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html - * - * @author Ricardo Fontanelli - */ -class SendGridHandler extends MailHandler -{ - /** - * The SendGrid API User - */ - protected string $apiUser; - - /** - * The SendGrid API Key - */ - protected string $apiKey; - - /** - * The email addresses to which the message will be sent - */ - protected string $from; - - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected array $to; - - /** - * The subject of the email - */ - protected string $subject; - - /** - * @param string $apiUser The SendGrid API User - * @param string $apiKey The SendGrid API Key - * @param string $from The sender of the email - * @param string|string[] $to The recipients of the email - * @param string $subject The subject of the mail - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $apiUser, string $apiKey, string $from, string|array $to, string $subject, int|string|Level $level = Level::Error, bool $bubble = true) - { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler'); - } - - parent::__construct($level, $bubble); - $this->apiUser = $apiUser; - $this->apiKey = $apiKey; - $this->from = $from; - $this->to = (array) $to; - $this->subject = $subject; - } - - /** - * @inheritDoc - */ - protected function send(string $content, array $records): void - { - $message = []; - $message['api_user'] = $this->apiUser; - $message['api_key'] = $this->apiKey; - $message['from'] = $this->from; - foreach ($this->to as $recipient) { - $message['to[]'] = $recipient; - } - $message['subject'] = $this->subject; - $message['date'] = date('r'); - - if ($this->isHtmlBody($content)) { - $message['html'] = $content; - } else { - $message['text'] = $content; - } - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($message)); - Curl\Util::execute($ch, 2); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php deleted file mode 100644 index a10d6d6c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ /dev/null @@ -1,381 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\LogRecord; - -/** - * Slack record utility helping to log to Slack webhooks or API. - * - * @author Greg Kedzierski - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @see https://api.slack.com/docs/message-attachments - */ -class SlackRecord -{ - public const COLOR_DANGER = 'danger'; - - public const COLOR_WARNING = 'warning'; - - public const COLOR_GOOD = 'good'; - - public const COLOR_DEFAULT = '#e3e4e6'; - - /** - * Slack channel (encoded ID or name) - */ - private string|null $channel; - - /** - * Name of a bot - */ - private string|null $username; - - /** - * User icon e.g. 'ghost', 'http://example.com/user.png' - */ - private string|null $userIcon; - - /** - * Whether the message should be added to Slack as attachment (plain text otherwise) - */ - private bool $useAttachment; - - /** - * Whether the the context/extra messages added to Slack as attachments are in a short style - */ - private bool $useShortAttachment; - - /** - * Whether the attachment should include context and extra data - */ - private bool $includeContextAndExtra; - - /** - * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var string[] - */ - private array $excludeFields; - - private FormatterInterface|null $formatter; - - private NormalizerFormatter $normalizerFormatter; - - /** - * @param string[] $excludeFields - */ - public function __construct( - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $userIcon = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = [], - FormatterInterface|null $formatter = null - ) { - $this - ->setChannel($channel) - ->setUsername($username) - ->useAttachment($useAttachment) - ->setUserIcon($userIcon) - ->useShortAttachment($useShortAttachment) - ->includeContextAndExtra($includeContextAndExtra) - ->excludeFields($excludeFields) - ->setFormatter($formatter); - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - } - - /** - * Returns required data in format that Slack - * is expecting. - * - * @phpstan-return mixed[] - */ - public function getSlackData(LogRecord $record): array - { - $dataArray = []; - - if ($this->username !== null) { - $dataArray['username'] = $this->username; - } - - if ($this->channel !== null) { - $dataArray['channel'] = $this->channel; - } - - if ($this->formatter !== null && !$this->useAttachment) { - $message = $this->formatter->format($record); - } else { - $message = $record->message; - } - - $recordData = $this->removeExcludedFields($record); - - if ($this->useAttachment) { - $attachment = [ - 'fallback' => $message, - 'text' => $message, - 'color' => $this->getAttachmentColor($record->level), - 'fields' => [], - 'mrkdwn_in' => ['fields'], - 'ts' => $recordData['datetime']->getTimestamp(), - 'footer' => $this->username, - 'footer_icon' => $this->userIcon, - ]; - - if ($this->useShortAttachment) { - $attachment['title'] = $recordData['level_name']; - } else { - $attachment['title'] = 'Message'; - $attachment['fields'][] = $this->generateAttachmentField('Level', $recordData['level_name']); - } - - if ($this->includeContextAndExtra) { - foreach (['extra', 'context'] as $key) { - if (!isset($recordData[$key]) || \count($recordData[$key]) === 0) { - continue; - } - - if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField( - $key, - $recordData[$key] - ); - } else { - // Add all extra fields as individual fields in attachment - $attachment['fields'] = array_merge( - $attachment['fields'], - $this->generateAttachmentFields($recordData[$key]) - ); - } - } - } - - $dataArray['attachments'] = [$attachment]; - } else { - $dataArray['text'] = $message; - } - - if ($this->userIcon !== null) { - if (false !== ($iconUrl = filter_var($this->userIcon, FILTER_VALIDATE_URL))) { - $dataArray['icon_url'] = $iconUrl; - } else { - $dataArray['icon_emoji'] = ":{$this->userIcon}:"; - } - } - - return $dataArray; - } - - /** - * Returns a Slack message attachment color associated with - * provided level. - */ - public function getAttachmentColor(Level $level): string - { - return match ($level) { - Level::Error, Level::Critical, Level::Alert, Level::Emergency => static::COLOR_DANGER, - Level::Warning => static::COLOR_WARNING, - Level::Info, Level::Notice => static::COLOR_GOOD, - Level::Debug => static::COLOR_DEFAULT - }; - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param mixed[] $fields - */ - public function stringify(array $fields): string - { - /** @var array $normalized */ - $normalized = $this->normalizerFormatter->normalizeValue($fields); - - $hasSecondDimension = \count(array_filter($normalized, 'is_array')) > 0; - $hasOnlyNonNumericKeys = \count(array_filter(array_keys($normalized), 'is_numeric')) === 0; - - return $hasSecondDimension || $hasOnlyNonNumericKeys - ? Utils::jsonEncode($normalized, JSON_PRETTY_PRINT|Utils::DEFAULT_JSON_FLAGS) - : Utils::jsonEncode($normalized, Utils::DEFAULT_JSON_FLAGS); - } - - /** - * Channel used by the bot when posting - * - * @param ?string $channel - * @return $this - */ - public function setChannel(?string $channel = null): self - { - $this->channel = $channel; - - return $this; - } - - /** - * Username used by the bot when posting - * - * @param ?string $username - * @return $this - */ - public function setUsername(?string $username = null): self - { - $this->username = $username; - - return $this; - } - - /** - * @return $this - */ - public function useAttachment(bool $useAttachment = true): self - { - $this->useAttachment = $useAttachment; - - return $this; - } - - /** - * @return $this - */ - public function setUserIcon(?string $userIcon = null): self - { - $this->userIcon = $userIcon; - - if (\is_string($userIcon)) { - $this->userIcon = trim($userIcon, ':'); - } - - return $this; - } - - /** - * @return $this - */ - public function useShortAttachment(bool $useShortAttachment = false): self - { - $this->useShortAttachment = $useShortAttachment; - - return $this; - } - - /** - * @return $this - */ - public function includeContextAndExtra(bool $includeContextAndExtra = false): self - { - $this->includeContextAndExtra = $includeContextAndExtra; - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - - return $this; - } - - /** - * @param string[] $excludeFields - * @return $this - */ - public function excludeFields(array $excludeFields = []): self - { - $this->excludeFields = $excludeFields; - - return $this; - } - - /** - * @return $this - */ - public function setFormatter(?FormatterInterface $formatter = null): self - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Generates attachment field - * - * @param string|mixed[] $value - * - * @return array{title: string, value: string, short: false} - */ - private function generateAttachmentField(string $title, $value): array - { - $value = \is_array($value) - ? sprintf('```%s```', substr($this->stringify($value), 0, 1990)) - : $value; - - return [ - 'title' => ucfirst($title), - 'value' => $value, - 'short' => false, - ]; - } - - /** - * Generates a collection of attachment fields from array - * - * @param mixed[] $data - * - * @return array - */ - private function generateAttachmentFields(array $data): array - { - /** @var array $normalized */ - $normalized = $this->normalizerFormatter->normalizeValue($data); - - $fields = []; - foreach ($normalized as $key => $value) { - $fields[] = $this->generateAttachmentField((string) $key, $value); - } - - return $fields; - } - - /** - * Get a copy of record with fields excluded according to $this->excludeFields - * - * @return mixed[] - */ - private function removeExcludedFields(LogRecord $record): array - { - $recordData = $record->toArray(); - foreach ($this->excludeFields as $field) { - $keys = explode('.', $field); - $node = &$recordData; - $lastKey = end($keys); - foreach ($keys as $key) { - if (!isset($node[$key])) { - break; - } - if ($lastKey === $key) { - unset($node[$key]); - break; - } - $node = &$node[$key]; - } - } - - return $recordData; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php deleted file mode 100644 index 2a34dda2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; -use Monolog\LogRecord; - -/** - * Sends notifications through Slack API - * - * @author Greg Kedzierski - * @see https://api.slack.com/ - */ -class SlackHandler extends SocketHandler -{ - /** - * Slack API token - */ - private string $token; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - */ - private SlackRecord $slackRecord; - - /** - * @param string $token Slack API token - * @param string $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @throws MissingExtensionException If no OpenSSL PHP extension configured - */ - public function __construct( - string $token, - string $channel, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - $level = Level::Critical, - bool $bubble = true, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = [], - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!\extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); - } - - parent::__construct( - 'ssl://slack.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - - $this->token = $token; - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getToken(): string - { - return $this->token; - } - - /** - * @inheritDoc - */ - protected function generateDataStream(LogRecord $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - */ - private function buildContent(LogRecord $record): string - { - $dataArray = $this->prepareContentData($record); - - return http_build_query($dataArray); - } - - /** - * @return string[] - */ - protected function prepareContentData(LogRecord $record): array - { - $dataArray = $this->slackRecord->getSlackData($record); - $dataArray['token'] = $this->token; - - if (isset($dataArray['attachments']) && \is_array($dataArray['attachments']) && \count($dataArray['attachments']) > 0) { - $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); - } - - return $dataArray; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; - $header .= "Host: slack.com\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . \strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, slack sometimes - * drops the request entirely. - */ - protected function finalizeWrite(): void - { - $res = $this->getResource(); - if (\is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } - - /** - * Channel used by the bot when posting - * - * @return $this - */ - public function setChannel(string $channel): self - { - $this->slackRecord->setChannel($channel); - - return $this; - } - - /** - * Username used by the bot when posting - * - * @return $this - */ - public function setUsername(string $username): self - { - $this->slackRecord->setUsername($username); - - return $this; - } - - /** - * @return $this - */ - public function useAttachment(bool $useAttachment): self - { - $this->slackRecord->useAttachment($useAttachment); - - return $this; - } - - /** - * @return $this - */ - public function setIconEmoji(string $iconEmoji): self - { - $this->slackRecord->setUserIcon($iconEmoji); - - return $this; - } - - /** - * @return $this - */ - public function useShortAttachment(bool $useShortAttachment): self - { - $this->slackRecord->useShortAttachment($useShortAttachment); - - return $this; - } - - /** - * @return $this - */ - public function includeContextAndExtra(bool $includeContextAndExtra): self - { - $this->slackRecord->includeContextAndExtra($includeContextAndExtra); - - return $this; - } - - /** - * @param string[] $excludeFields - * @return $this - */ - public function excludeFields(array $excludeFields): self - { - $this->slackRecord->excludeFields($excludeFields); - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php deleted file mode 100644 index eac51ccb..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Level; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; -use Monolog\LogRecord; - -/** - * Sends notifications through Slack Webhooks - * - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - */ -class SlackWebhookHandler extends AbstractProcessingHandler -{ - /** - * Slack Webhook token - */ - private string $webhookUrl; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - */ - private SlackRecord $slackRecord; - - /** - * @param string $webhookUrl Slack Webhook URL - * @param string|null $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct( - string $webhookUrl, - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - $level = Level::Critical, - bool $bubble = true, - array $excludeFields = [] - ) { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler'); - } - - parent::__construct($level, $bubble); - - $this->webhookUrl = $webhookUrl; - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getWebhookUrl(): string - { - return $this->webhookUrl; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $postData = $this->slackRecord->getSlackData($record); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - $options = [ - CURLOPT_URL => $this->webhookUrl, - CURLOPT_POST => true, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => ['Content-type: application/json'], - CURLOPT_POSTFIELDS => $postString, - ]; - - curl_setopt_array($ch, $options); - - Curl\Util::execute($ch); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index 69a036f5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,436 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - */ -class SocketHandler extends AbstractProcessingHandler -{ - private string $connectionString; - private float $connectionTimeout; - /** @var resource|null */ - private $resource; - private float $timeout; - private float $writingTimeout; - private int|null $lastSentBytes = null; - private int|null $chunkSize; - private bool $persistent; - private int|null $errno = null; - private string|null $errstr = null; - private float|null $lastWritingAt = null; - - /** - * @param string $connectionString Socket connection string - * @param bool $persistent Flag to enable/disable persistent connections - * @param float $timeout Socket timeout to wait until the request is being aborted - * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written - * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been - * established - * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle - * - * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. - */ - public function __construct( - string $connectionString, - $level = Level::Debug, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - - if ($connectionTimeout !== null) { - $this->validateTimeout($connectionTimeout); - } - - $this->connectionTimeout = $connectionTimeout ?? (float) \ini_get('default_socket_timeout'); - $this->persistent = $persistent; - $this->validateTimeout($timeout); - $this->timeout = $timeout; - $this->validateTimeout($writingTimeout); - $this->writingTimeout = $writingTimeout; - $this->chunkSize = $chunkSize; - } - - /** - * Connect (if necessary) and write to the socket - * - * @inheritDoc - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - protected function write(LogRecord $record): void - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close(): void - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket(): void - { - if (\is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to be persistent. It only has effect before the connection is initiated. - * - * @return $this - */ - public function setPersistent(bool $persistent): self - { - $this->persistent = $persistent; - - return $this; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.fsockopen.php - * @return $this - */ - public function setConnectionTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->connectionTimeout = $seconds; - - return $this; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - * @return $this - */ - public function setTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->timeout = $seconds; - - return $this; - } - - /** - * Set writing timeout. Only has effect during connection in the writing cycle. - * - * @param float $seconds 0 for no timeout - * @return $this - */ - public function setWritingTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->writingTimeout = $seconds; - - return $this; - } - - /** - * Set chunk size. Only has effect during connection in the writing cycle. - * - * @return $this - */ - public function setChunkSize(int $bytes): self - { - $this->chunkSize = $bytes; - - return $this; - } - - /** - * Get current connection string - */ - public function getConnectionString(): string - { - return $this->connectionString; - } - - /** - * Get persistent setting - */ - public function isPersistent(): bool - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - */ - public function getConnectionTimeout(): float - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - */ - public function getTimeout(): float - { - return $this->timeout; - } - - /** - * Get current local writing timeout - */ - public function getWritingTimeout(): float - { - return $this->writingTimeout; - } - - /** - * Get current chunk size - */ - public function getChunkSize(): ?int - { - return $this->chunkSize; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - */ - public function isConnected(): bool - { - return \is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - protected function streamSetTimeout(): bool - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds) * 1e6); - - if (!\is_resource($this->resource)) { - throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); - } - - return stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-chunk-size.php - * - * @return int|false - */ - protected function streamSetChunkSize(): int|bool - { - if (!\is_resource($this->resource)) { - throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); - } - - if (null === $this->chunkSize) { - throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); - } - - return stream_set_chunk_size($this->resource, $this->chunkSize); - } - - /** - * Wrapper to allow mocking - * - * @return int|false - */ - protected function fwrite(string $data): int|bool - { - if (!\is_resource($this->resource)) { - throw new \LogicException('fwrite called but $this->resource is not a resource'); - } - - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - * - * @return mixed[]|bool - */ - protected function streamGetMetadata(): array|bool - { - if (!\is_resource($this->resource)) { - throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); - } - - return stream_get_meta_data($this->resource); - } - - private function validateTimeout(float $value): void - { - if ($value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected(): void - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - protected function generateDataStream(LogRecord $record): string - { - return (string) $record->formatted; - } - - /** - * @return resource|null - */ - protected function getResource() - { - return $this->resource; - } - - private function connect(): void - { - $this->createSocketResource(); - $this->setSocketTimeout(); - $this->setStreamChunkSize(); - } - - private function createSocketResource(): void - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (\is_bool($resource)) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout(): void - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function setStreamChunkSize(): void - { - if (null !== $this->chunkSize && false === $this->streamSetChunkSize()) { - throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); - } - } - - private function writeToSocket(string $data): void - { - $length = \strlen($data); - $sent = 0; - $this->lastSentBytes = $sent; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if (\is_array($socketInfo) && (bool) $socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - - if ($this->writingIsTimedOut($sent)) { - throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - - private function writingIsTimedOut(int $sent): bool - { - // convert to ms - if (0.0 == $this->writingTimeout) { - return false; - } - - if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = microtime(true); - $this->lastSentBytes = $sent; - - return false; - } else { - usleep(100); - } - - if ((microtime(true) - (float) $this->lastWritingAt) >= $this->writingTimeout) { - $this->closeSocket(); - - return true; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php deleted file mode 100644 index 1d28b65d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sqs\SqsClient; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Writes to any sqs queue. - * - * @author Martijn van Calker - */ -class SqsHandler extends AbstractProcessingHandler -{ - /** 256 KB in bytes - maximum message size in SQS */ - protected const MAX_MESSAGE_SIZE = 262144; - /** 100 KB in bytes - head message size for new error log */ - protected const HEAD_MESSAGE_SIZE = 102400; - - private SqsClient $client; - private string $queueUrl; - - public function __construct(SqsClient $sqsClient, string $queueUrl, int|string|Level $level = Level::Debug, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->client = $sqsClient; - $this->queueUrl = $queueUrl; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!isset($record->formatted) || 'string' !== \gettype($record->formatted)) { - throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . Utils::getRecordMessageForException($record)); - } - - $messageBody = $record->formatted; - if (\strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { - $messageBody = Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); - } - - $this->client->sendMessage([ - 'QueueUrl' => $this->queueUrl, - 'MessageBody' => $messageBody, - ]); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index 41690958..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - */ -class StreamHandler extends AbstractProcessingHandler -{ - protected const MAX_CHUNK_SIZE = 2147483647; - /** 10MB */ - protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; - protected int $streamChunkSize; - /** @var resource|null */ - protected $stream; - protected string|null $url = null; - private string|null $errorMessage = null; - protected int|null $filePermission; - protected bool $useLocking; - /** @var true|null */ - private bool|null $dirCreated = null; - - /** - * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - * - * @throws \InvalidArgumentException If stream is not a resource or string - */ - public function __construct($stream, int|string|Level $level = Level::Debug, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - parent::__construct($level, $bubble); - - if (($phpMemoryLimit = Utils::expandIniShorthandBytes(\ini_get('memory_limit'))) !== false) { - if ($phpMemoryLimit > 0) { - // use max 10% of allowed memory for the chunk size, and at least 100KB - $this->streamChunkSize = min(static::MAX_CHUNK_SIZE, max((int) ($phpMemoryLimit / 10), 100 * 1024)); - } else { - // memory is unlimited, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - } else { - // no memory limit information, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - - if (\is_resource($stream)) { - $this->stream = $stream; - - stream_set_chunk_size($this->stream, $this->streamChunkSize); - } elseif (\is_string($stream)) { - $this->url = Utils::canonicalizePath($stream); - } else { - throw new \InvalidArgumentException('A stream must either be a resource or a string.'); - } - - $this->filePermission = $filePermission; - $this->useLocking = $useLocking; - } - - /** - * @inheritDoc - */ - public function close(): void - { - if (null !== $this->url && \is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - $this->dirCreated = null; - } - - /** - * Return the currently active stream if it is open - * - * @return resource|null - */ - public function getStream() - { - return $this->stream; - } - - /** - * Return the stream URL if it was configured with a URL and not an active resource - */ - public function getUrl(): ?string - { - return $this->url; - } - - public function getStreamChunkSize(): int - { - return $this->streamChunkSize; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - if (!\is_resource($this->stream)) { - $url = $this->url; - if (null === $url || '' === $url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . Utils::getRecordMessageForException($record)); - } - $this->createDir($url); - $this->errorMessage = null; - set_error_handler(function (...$args) { - return $this->customErrorHandler(...$args); - }); - - try { - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); - } - } finally { - restore_error_handler(); - } - if (!\is_resource($stream)) { - $this->stream = null; - - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); - } - stream_set_chunk_size($stream, $this->streamChunkSize); - $this->stream = $stream; - } - - $stream = $this->stream; - if ($this->useLocking) { - // ignoring errors here, there's not much we can do about them - flock($stream, LOCK_EX); - } - - $this->streamWrite($stream, $record); - - if ($this->useLocking) { - flock($stream, LOCK_UN); - } - } - - /** - * Write to stream - * @param resource $stream - */ - protected function streamWrite($stream, LogRecord $record): void - { - fwrite($stream, (string) $record->formatted); - } - - private function customErrorHandler(int $code, string $msg): bool - { - $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); - - return true; - } - - private function getDirFromStream(string $stream): ?string - { - $pos = strpos($stream, '://'); - if ($pos === false) { - return \dirname($stream); - } - - if ('file://' === substr($stream, 0, 7)) { - return \dirname(substr($stream, 7)); - } - - return null; - } - - private function createDir(string $url): void - { - // Do not try to create dir if it has already been tried. - if (true === $this->dirCreated) { - return; - } - - $dir = $this->getDirFromStream($url); - if (null !== $dir && !is_dir($dir)) { - $this->errorMessage = null; - set_error_handler(function (...$args) { - return $this->customErrorHandler(...$args); - }); - $status = mkdir($dir, 0777, true); - restore_error_handler(); - if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { - throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); - } - } - $this->dirCreated = true; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php deleted file mode 100644 index 33aa4fd7..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Closure; -use Monolog\Level; -use Monolog\LogRecord; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mailer\Transport\TransportInterface; -use Symfony\Component\Mime\Email; - -/** - * SymfonyMailerHandler uses Symfony's Mailer component to send the emails - * - * @author Jordi Boggiano - */ -class SymfonyMailerHandler extends MailHandler -{ - protected MailerInterface|TransportInterface $mailer; - /** @var Email|Closure(string, LogRecord[]): Email */ - private Email|Closure $emailTemplate; - - /** - * @phpstan-param Email|Closure(string, LogRecord[]): Email $email - * - * @param MailerInterface|TransportInterface $mailer The mailer to use - * @param Closure|Email $email An email template, the subject/body will be replaced - */ - public function __construct($mailer, Email|Closure $email, int|string|Level $level = Level::Error, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->mailer = $mailer; - $this->emailTemplate = $email; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Email to be sent - * - * @param string $content formatted email body to be sent - * @param LogRecord[] $records Log records that formed the content - */ - protected function buildMessage(string $content, array $records): Email - { - $message = null; - if ($this->emailTemplate instanceof Email) { - $message = clone $this->emailTemplate; - } elseif (\is_callable($this->emailTemplate)) { - $message = ($this->emailTemplate)($content, $records); - } - - if (!$message instanceof Email) { - $record = reset($records); - - throw new \InvalidArgumentException('Could not resolve message as instance of Email or a callable returning it' . ($record instanceof LogRecord ? Utils::getRecordMessageForException($record) : '')); - } - - if (\count($records) > 0) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->subject($subjectFormatter->format($this->getHighestRecord($records))); - } - - if ($this->isHtmlBody($content)) { - if (null !== ($charset = $message->getHtmlCharset())) { - $message->html($content, $charset); - } else { - $message->html($content); - } - } else { - if (null !== ($charset = $message->getTextCharset())) { - $message->text($content, $charset); - } else { - $message->text($content); - } - } - - return $message->date(new \DateTimeImmutable()); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index f3d7674c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractSyslogHandler -{ - protected string $ident; - protected int $logopts; - - /** - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct(string $ident, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, int $logopts = LOG_PID) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->logopts = $logopts; - } - - /** - * @inheritDoc - */ - public function close(): void - { - closelog(); - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - openlog($this->ident, $this->logopts, $this->facility); - syslog($this->toSyslogPriority($record->level), (string) $record->formatted); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php deleted file mode 100644 index 3ff0bce5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\SyslogUdp; - -use Monolog\Utils; -use Socket; - -class UdpSocket -{ - protected const DATAGRAM_MAX_LENGTH = 65023; - - protected string $ip; - protected int $port; - protected ?Socket $socket = null; - - public function __construct(string $ip, int $port = 514) - { - $this->ip = $ip; - $this->port = $port; - } - - public function write(string $line, string $header = ""): void - { - $this->send($this->assembleMessage($line, $header)); - } - - public function close(): void - { - if ($this->socket instanceof Socket) { - socket_close($this->socket); - $this->socket = null; - } - } - - protected function getSocket(): Socket - { - if (null !== $this->socket) { - return $this->socket; - } - - $domain = AF_INET; - $protocol = SOL_UDP; - // Check if we are using unix sockets. - if ($this->port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; - } - - $socket = socket_create($domain, SOCK_DGRAM, $protocol); - if ($socket instanceof Socket) { - return $this->socket = $socket; - } - - throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); - } - - protected function send(string $chunk): void - { - socket_sendto($this->getSocket(), $chunk, \strlen($chunk), $flags = 0, $this->ip, $this->port); - } - - protected function assembleMessage(string $line, string $header): string - { - $chunkSize = static::DATAGRAM_MAX_LENGTH - \strlen($header); - - return $header . Utils::substr($line, 0, $chunkSize); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php deleted file mode 100644 index e8db4cde..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use DateTimeInterface; -use Monolog\Handler\SyslogUdp\UdpSocket; -use Monolog\Level; -use Monolog\LogRecord; -use Monolog\Utils; - -/** - * A Handler for logging to a remote syslogd server. - * - * @author Jesper Skovgaard Nielsen - * @author Dominik Kukacka - */ -class SyslogUdpHandler extends AbstractSyslogHandler -{ - const RFC3164 = 0; - const RFC5424 = 1; - const RFC5424e = 2; - - /** @var array */ - private array $dateFormats = [ - self::RFC3164 => 'M d H:i:s', - self::RFC5424 => \DateTime::RFC3339, - self::RFC5424e => \DateTime::RFC3339_EXTENDED, - ]; - - protected UdpSocket $socket; - protected string $ident; - /** @var self::RFC* */ - protected int $rfc; - - /** - * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) - * @param int $port Port number, or 0 if $host is a unix socket - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. - * @throws MissingExtensionException when there is no socket extension - * - * @phpstan-param self::RFC* $rfc - */ - public function __construct(string $host, int $port = 514, string|int $facility = LOG_USER, int|string|Level $level = Level::Debug, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424) - { - if (!\extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); - } - - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->rfc = $rfc; - - $this->socket = new UdpSocket($host, $port); - } - - protected function write(LogRecord $record): void - { - $lines = $this->splitMessageIntoLines($record->formatted); - - $header = $this->makeCommonSyslogHeader($this->toSyslogPriority($record->level), $record->datetime); - - foreach ($lines as $line) { - $this->socket->write($line, $header); - } - } - - public function close(): void - { - $this->socket->close(); - } - - /** - * @param string|string[] $message - * @return string[] - */ - private function splitMessageIntoLines($message): array - { - if (\is_array($message)) { - $message = implode("\n", $message); - } - - $lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY); - if (false === $lines) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $lines; - } - - /** - * Make common syslog header (see rfc5424 or rfc3164) - */ - protected function makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime): string - { - $priority = $severity + $this->facility; - - $pid = getmypid(); - if (false === $pid) { - $pid = '-'; - } - - $hostname = gethostname(); - if (false === $hostname) { - $hostname = '-'; - } - - if ($this->rfc === self::RFC3164) { - // see https://github.com/phpstan/phpstan/issues/5348 - // @phpstan-ignore-next-line - $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); - $date = $dateNew->format($this->dateFormats[$this->rfc]); - - return "<$priority>" . - $date . " " . - $hostname . " " . - $this->ident . "[" . $pid . "]: "; - } - - $date = $datetime->format($this->dateFormats[$this->rfc]); - - return "<$priority>1 " . - $date . " " . - $hostname . " " . - $this->ident . " " . - $pid . " - - "; - } - - /** - * Inject your own socket, mainly used for testing - * - * @return $this - */ - public function setSocket(UdpSocket $socket): self - { - $this->socket = $socket; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php deleted file mode 100644 index e4f69a9f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +++ /dev/null @@ -1,297 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use RuntimeException; -use Monolog\Level; -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Handler sends logs to Telegram using Telegram Bot API. - * - * How to use: - * 1) Create a Telegram bot with https://telegram.me/BotFather; - * 2) Create a Telegram channel or a group where logs will be recorded; - * 3) Add the created bot from step 1 to the created channel/group from step 2. - * - * In order to create an instance of TelegramBotHandler use - * 1. The Telegram bot API key from step 1 - * 2. The channel name with the `@` prefix if you created a public channel (e.g. `@my_public_channel`), - * or the channel ID with the `-100` prefix if you created a private channel (e.g. `-1001234567890`), - * or the group ID from step 2 (e.g. `-1234567890`). - * - * @link https://core.telegram.org/bots/api - * - * @author Mazur Alexandr - */ -class TelegramBotHandler extends AbstractProcessingHandler -{ - private const BOT_API = 'https://api.telegram.org/bot'; - - /** - * The available values of parseMode according to the Telegram api documentation - */ - private const AVAILABLE_PARSE_MODES = [ - 'HTML', - 'MarkdownV2', - 'Markdown', // legacy mode without underline and strikethrough, use MarkdownV2 instead - ]; - - /** - * The maximum number of characters allowed in a message according to the Telegram api documentation - */ - private const MAX_MESSAGE_LENGTH = 4096; - - /** - * Telegram bot access token provided by BotFather. - * Create telegram bot with https://telegram.me/BotFather and use access token from it. - */ - private string $apiKey; - - /** - * Telegram channel name. - * Since to start with '@' symbol as prefix. - */ - private string $channel; - - /** - * The kind of formatting that is used for the message. - * See available options at https://core.telegram.org/bots/api#formatting-options - * or in AVAILABLE_PARSE_MODES - */ - private string|null $parseMode; - - /** - * Disables link previews for links in the message. - */ - private bool|null $disableWebPagePreview; - - /** - * Sends the message silently. Users will receive a notification with no sound. - */ - private bool|null $disableNotification; - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - */ - private bool $splitLongMessages; - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - */ - private bool $delayBetweenMessages; - - /** - * Telegram message thread id, unique identifier for the target message thread (topic) of the forum; for forum supergroups only - * See how to get the `message_thread_id` https://stackoverflow.com/a/75178418 - */ - private int|null $topic; - - /** - * @param string $apiKey Telegram bot access token provided by BotFather - * @param string $channel Telegram channel name - * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages - * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API - * @param int $topic Telegram message thread id, unique identifier for the target message thread (topic) of the forum - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct( - string $apiKey, - string $channel, - $level = Level::Debug, - bool $bubble = true, - ?string $parseMode = null, - ?bool $disableWebPagePreview = null, - ?bool $disableNotification = null, - bool $splitLongMessages = false, - bool $delayBetweenMessages = false, - int $topic = null - ) { - if (!\extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); - } - - parent::__construct($level, $bubble); - - $this->apiKey = $apiKey; - $this->channel = $channel; - $this->setParseMode($parseMode); - $this->disableWebPagePreview($disableWebPagePreview); - $this->disableNotification($disableNotification); - $this->splitLongMessages($splitLongMessages); - $this->delayBetweenMessages($delayBetweenMessages); - $this->setTopic($topic); - } - - /** - * @return $this - */ - public function setParseMode(string|null $parseMode = null): self - { - if ($parseMode !== null && !\in_array($parseMode, self::AVAILABLE_PARSE_MODES, true)) { - throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); - } - - $this->parseMode = $parseMode; - - return $this; - } - - /** - * @return $this - */ - public function disableWebPagePreview(bool|null $disableWebPagePreview = null): self - { - $this->disableWebPagePreview = $disableWebPagePreview; - - return $this; - } - - /** - * @return $this - */ - public function disableNotification(bool|null $disableNotification = null): self - { - $this->disableNotification = $disableNotification; - - return $this; - } - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * - * @return $this - */ - public function splitLongMessages(bool $splitLongMessages = false): self - { - $this->splitLongMessages = $splitLongMessages; - - return $this; - } - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * - * @return $this - */ - public function delayBetweenMessages(bool $delayBetweenMessages = false): self - { - $this->delayBetweenMessages = $delayBetweenMessages; - - return $this; - } - - /** - * @return $this - */ - public function setTopic(int $topic = null): self - { - $this->topic = $topic; - - return $this; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - $messages[] = $record; - } - - if (\count($messages) > 0) { - $this->send((string) $this->getFormatter()->formatBatch($messages)); - } - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->send($record->formatted); - } - - /** - * Send request to @link https://api.telegram.org/bot on SendMessage action. - */ - protected function send(string $message): void - { - $messages = $this->handleMessageLength($message); - - foreach ($messages as $key => $msg) { - if ($this->delayBetweenMessages && $key > 0) { - sleep(1); - } - - $this->sendCurl($msg); - } - } - - protected function sendCurl(string $message): void - { - $ch = curl_init(); - $url = self::BOT_API . $this->apiKey . '/SendMessage'; - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - $params = [ - 'text' => $message, - 'chat_id' => $this->channel, - 'parse_mode' => $this->parseMode, - 'disable_web_page_preview' => $this->disableWebPagePreview, - 'disable_notification' => $this->disableNotification, - ]; - if ($this->topic !== null) { - $params['message_thread_id'] = $this->topic; - } - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); - - $result = Curl\Util::execute($ch); - if (!\is_string($result)) { - throw new RuntimeException('Telegram API error. Description: No response'); - } - $result = json_decode($result, true); - - if ($result['ok'] === false) { - throw new RuntimeException('Telegram API error. Description: ' . $result['description']); - } - } - - /** - * Handle a message that is too long: truncates or splits into several - * @return string[] - */ - private function handleMessageLength(string $message): array - { - $truncatedMarker = ' (...truncated)'; - if (!$this->splitLongMessages && \strlen($message) > self::MAX_MESSAGE_LENGTH) { - return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - \strlen($truncatedMarker)) . $truncatedMarker]; - } - - return str_split($message, self::MAX_MESSAGE_LENGTH); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index a98389b9..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - * - * @method bool hasEmergency(string|array $recordAssertions) - * @method bool hasAlert(string|array $recordAssertions) - * @method bool hasCritical(string|array $recordAssertions) - * @method bool hasError(string|array $recordAssertions) - * @method bool hasWarning(string|array $recordAssertions) - * @method bool hasNotice(string|array $recordAssertions) - * @method bool hasInfo(string|array $recordAssertions) - * @method bool hasDebug(string|array $recordAssertions) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains(string $message) - * @method bool hasAlertThatContains(string $message) - * @method bool hasCriticalThatContains(string $message) - * @method bool hasErrorThatContains(string $message) - * @method bool hasWarningThatContains(string $message) - * @method bool hasNoticeThatContains(string $message) - * @method bool hasInfoThatContains(string $message) - * @method bool hasDebugThatContains(string $message) - * - * @method bool hasEmergencyThatMatches(string $regex) - * @method bool hasAlertThatMatches(string $regex) - * @method bool hasCriticalThatMatches(string $regex) - * @method bool hasErrorThatMatches(string $regex) - * @method bool hasWarningThatMatches(string $regex) - * @method bool hasNoticeThatMatches(string $regex) - * @method bool hasInfoThatMatches(string $regex) - * @method bool hasDebugThatMatches(string $regex) - * - * @method bool hasEmergencyThatPasses(callable $predicate) - * @method bool hasAlertThatPasses(callable $predicate) - * @method bool hasCriticalThatPasses(callable $predicate) - * @method bool hasErrorThatPasses(callable $predicate) - * @method bool hasWarningThatPasses(callable $predicate) - * @method bool hasNoticeThatPasses(callable $predicate) - * @method bool hasInfoThatPasses(callable $predicate) - * @method bool hasDebugThatPasses(callable $predicate) - */ -class TestHandler extends AbstractProcessingHandler -{ - /** @var LogRecord[] */ - protected array $records = []; - /** @phpstan-var array, LogRecord[]> */ - protected array $recordsByLevel = []; - private bool $skipReset = false; - - /** - * @return array - */ - public function getRecords(): array - { - return $this->records; - } - - public function clear(): void - { - $this->records = []; - $this->recordsByLevel = []; - } - - public function reset(): void - { - if (!$this->skipReset) { - $this->clear(); - } - } - - public function setSkipReset(bool $skipReset): void - { - $this->skipReset = $skipReset; - } - - /** - * @param int|string|Level|LogLevel::* $level Logging level value or name - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function hasRecords(int|string|Level $level): bool - { - return isset($this->recordsByLevel[Logger::toMonologLevel($level)->value]); - } - - /** - * @param string|array $recordAssertions Either a message string or an array containing message and optionally context keys that will be checked against all records - * - * @phpstan-param array{message: string, context?: mixed[]}|string $recordAssertions - */ - public function hasRecord(string|array $recordAssertions, Level $level): bool - { - if (\is_string($recordAssertions)) { - $recordAssertions = ['message' => $recordAssertions]; - } - - return $this->hasRecordThatPasses(function (LogRecord $rec) use ($recordAssertions) { - if ($rec->message !== $recordAssertions['message']) { - return false; - } - if (isset($recordAssertions['context']) && $rec->context !== $recordAssertions['context']) { - return false; - } - - return true; - }, $level); - } - - public function hasRecordThatContains(string $message, Level $level): bool - { - return $this->hasRecordThatPasses(fn (LogRecord $rec) => str_contains($rec->message, $message), $level); - } - - public function hasRecordThatMatches(string $regex, Level $level): bool - { - return $this->hasRecordThatPasses(fn (LogRecord $rec) => preg_match($regex, $rec->message) > 0, $level); - } - - /** - * @phpstan-param callable(LogRecord, int): mixed $predicate - */ - public function hasRecordThatPasses(callable $predicate, Level $level): bool - { - $level = Logger::toMonologLevel($level); - - if (!isset($this->recordsByLevel[$level->value])) { - return false; - } - - foreach ($this->recordsByLevel[$level->value] as $i => $rec) { - if ((bool) $predicate($rec, $i)) { - return true; - } - } - - return false; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->recordsByLevel[$record->level->value][] = $record; - $this->records[] = $record; - } - - /** - * @param mixed[] $args - */ - public function __call(string $method, array $args): bool - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = \constant(Level::class.'::' . $matches[2]); - $callback = [$this, $genericMethod]; - if (\is_callable($callback)) { - $args[] = $level; - - return \call_user_func_array($callback, $args); - } - } - - throw new \BadMethodCallException('Call to undefined method ' . \get_class($this) . '::' . $method . '()'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php deleted file mode 100644 index 9c12c3d5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -trait WebRequestRecognizerTrait -{ - /** - * Checks if PHP's serving a web request - */ - protected function isWebRequest(): bool - { - return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php deleted file mode 100644 index 932fa70e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\LogRecord; -use Throwable; - -/** - * Forwards records to multiple handlers suppressing failures of each handler - * and continuing through to give every handler a chance to succeed. - * - * @author Craig D'Amelio - */ -class WhatFailureGroupHandler extends GroupHandler -{ - /** - * @inheritDoc - */ - public function handle(LogRecord $record): bool - { - if (\count($this->processors) > 0) { - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - try { - $handler->handle(clone $record); - } catch (Throwable) { - // What failure? - } - } - - return false === $this->bubble; - } - - /** - * @inheritDoc - */ - public function handleBatch(array $records): void - { - if (\count($this->processors) > 0) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch(array_map(fn ($record) => clone $record, $records)); - } catch (Throwable) { - // What failure? - } - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - try { - $handler->close(); - } catch (\Throwable $e) { - // What failure? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index 8841f2f1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Level; -use Monolog\LogRecord; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - * @author Jason Davis - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * @throws MissingExtensionException - */ - public function __construct(int|string|Level $level = Level::Debug, bool $bubble = true) - { - if (!\function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException( - 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' - ); - } - - parent::__construct($level, $bubble); - } - - /** - * Translates Monolog log levels to ZendMonitor levels. - */ - protected function toZendMonitorLevel(Level $level): int - { - return match ($level) { - Level::Debug => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Info => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Notice => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Level::Warning => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, - Level::Error => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Critical => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Alert => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Level::Emergency => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - }; - } - - /** - * @inheritDoc - */ - protected function write(LogRecord $record): void - { - $this->writeZendMonitorCustomEvent( - $record->level->getName(), - $record->message, - $record->formatted, - $this->toZendMonitorLevel($record->level) - ); - } - - /** - * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param array $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) - */ - protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void - { - zend_monitor_custom_event($type, $message, $formatted, $severity); - } - - /** - * @inheritDoc - */ - public function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Level.php b/vendor/monolog/monolog/src/Monolog/Level.php deleted file mode 100644 index 5620bc4d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Level.php +++ /dev/null @@ -1,209 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LogLevel; - -/** - * Represents the log levels - * - * Monolog supports the logging levels described by RFC 5424 {@see https://datatracker.ietf.org/doc/html/rfc5424} - * but due to BC the severity values used internally are not 0-7. - * - * To get the level name/value out of a Level there are several options: - * - * - Use ->getName() to get the standard Monolog name which is full uppercased (e.g. "DEBUG") - * - Use ->toPsrLogLevel() to get the standard PSR-3 name which is full lowercased (e.g. "debug") - * - Use ->toRFC5424Level() to get the standard RFC 5424 value (e.g. 7 for debug, 0 for emergency) - * - Use ->name to get the enum case's name which is capitalized (e.g. "Debug") - * - * To get the internal value for filtering, if the includes/isLowerThan/isHigherThan methods are - * not enough, you can use ->value to get the enum case's integer value. - */ -enum Level: int -{ - /** - * Detailed debug information - */ - case Debug = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - */ - case Info = 200; - - /** - * Uncommon events - */ - case Notice = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - */ - case Warning = 300; - - /** - * Runtime errors - */ - case Error = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - */ - case Critical = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - */ - case Alert = 550; - - /** - * Urgent alert. - */ - case Emergency = 600; - - /** - * @param value-of|LogLevel::*|'Debug'|'Info'|'Notice'|'Warning'|'Error'|'Critical'|'Alert'|'Emergency' $name - * @return static - */ - public static function fromName(string $name): self - { - return match ($name) { - 'debug', 'Debug', 'DEBUG' => self::Debug, - 'info', 'Info', 'INFO' => self::Info, - 'notice', 'Notice', 'NOTICE' => self::Notice, - 'warning', 'Warning', 'WARNING' => self::Warning, - 'error', 'Error', 'ERROR' => self::Error, - 'critical', 'Critical', 'CRITICAL' => self::Critical, - 'alert', 'Alert', 'ALERT' => self::Alert, - 'emergency', 'Emergency', 'EMERGENCY' => self::Emergency, - }; - } - - /** - * @param value-of $value - * @return static - */ - public static function fromValue(int $value): self - { - return self::from($value); - } - - /** - * Returns true if the passed $level is higher or equal to $this - */ - public function includes(Level $level): bool - { - return $this->value <= $level->value; - } - - public function isHigherThan(Level $level): bool - { - return $this->value > $level->value; - } - - public function isLowerThan(Level $level): bool - { - return $this->value < $level->value; - } - - /** - * Returns the monolog standardized all-capitals name of the level - * - * Use this instead of $level->name which returns the enum case name (e.g. Debug vs DEBUG if you use getName()) - * - * @return value-of - */ - public function getName(): string - { - return match ($this) { - self::Debug => 'DEBUG', - self::Info => 'INFO', - self::Notice => 'NOTICE', - self::Warning => 'WARNING', - self::Error => 'ERROR', - self::Critical => 'CRITICAL', - self::Alert => 'ALERT', - self::Emergency => 'EMERGENCY', - }; - } - - /** - * Returns the PSR-3 level matching this instance - * - * @phpstan-return \Psr\Log\LogLevel::* - */ - public function toPsrLogLevel(): string - { - return match ($this) { - self::Debug => LogLevel::DEBUG, - self::Info => LogLevel::INFO, - self::Notice => LogLevel::NOTICE, - self::Warning => LogLevel::WARNING, - self::Error => LogLevel::ERROR, - self::Critical => LogLevel::CRITICAL, - self::Alert => LogLevel::ALERT, - self::Emergency => LogLevel::EMERGENCY, - }; - } - - /** - * Returns the RFC 5424 level matching this instance - * - * @phpstan-return int<0, 7> - */ - public function toRFC5424Level(): int - { - return match ($this) { - self::Debug => 7, - self::Info => 6, - self::Notice => 5, - self::Warning => 4, - self::Error => 3, - self::Critical => 2, - self::Alert => 1, - self::Emergency => 0, - }; - } - - public const VALUES = [ - 100, - 200, - 250, - 300, - 400, - 500, - 550, - 600, - ]; - - public const NAMES = [ - 'DEBUG', - 'INFO', - 'NOTICE', - 'WARNING', - 'ERROR', - 'CRITICAL', - 'ALERT', - 'EMERGENCY', - ]; -} diff --git a/vendor/monolog/monolog/src/Monolog/LogRecord.php b/vendor/monolog/monolog/src/Monolog/LogRecord.php deleted file mode 100644 index 14c82f30..00000000 --- a/vendor/monolog/monolog/src/Monolog/LogRecord.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use ArrayAccess; - -/** - * Monolog log record - * - * @author Jordi Boggiano - * @template-implements ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra'|'formatted', int|string|\DateTimeImmutable|array> - */ -class LogRecord implements ArrayAccess -{ - private const MODIFIABLE_FIELDS = [ - 'extra' => true, - 'formatted' => true, - ]; - - public function __construct( - public readonly \DateTimeImmutable $datetime, - public readonly string $channel, - public readonly Level $level, - public readonly string $message, - /** @var array */ - public readonly array $context = [], - /** @var array */ - public array $extra = [], - public mixed $formatted = null, - ) { - } - - public function offsetSet(mixed $offset, mixed $value): void - { - if ($offset === 'extra') { - if (!\is_array($value)) { - throw new \InvalidArgumentException('extra must be an array'); - } - - $this->extra = $value; - - return; - } - - if ($offset === 'formatted') { - $this->formatted = $value; - - return; - } - - throw new \LogicException('Unsupported operation: setting '.$offset); - } - - public function offsetExists(mixed $offset): bool - { - if ($offset === 'level_name') { - return true; - } - - return isset($this->{$offset}); - } - - public function offsetUnset(mixed $offset): void - { - throw new \LogicException('Unsupported operation'); - } - - public function &offsetGet(mixed $offset): mixed - { - // handle special cases for the level enum - if ($offset === 'level_name') { - // avoid returning readonly props by ref as this is illegal - $copy = $this->level->getName(); - - return $copy; - } - if ($offset === 'level') { - // avoid returning readonly props by ref as this is illegal - $copy = $this->level->value; - - return $copy; - } - - if (isset(self::MODIFIABLE_FIELDS[$offset])) { - return $this->{$offset}; - } - - // avoid returning readonly props by ref as this is illegal - $copy = $this->{$offset}; - - return $copy; - } - - /** - * @phpstan-return array{message: string, context: mixed[], level: value-of, level_name: value-of, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} - */ - public function toArray(): array - { - return [ - 'message' => $this->message, - 'context' => $this->context, - 'level' => $this->level->value, - 'level_name' => $this->level->getName(), - 'channel' => $this->channel, - 'datetime' => $this->datetime, - 'extra' => $this->extra, - ]; - } - - public function with(mixed ...$args): self - { - foreach (['message', 'context', 'level', 'channel', 'datetime', 'extra'] as $prop) { - $args[$prop] ??= $this->{$prop}; - } - - return new self(...$args); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index edc62f3a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,750 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Closure; -use DateTimeZone; -use Fiber; -use Monolog\Handler\HandlerInterface; -use Monolog\Processor\ProcessorInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Throwable; -use Stringable; -use WeakMap; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - * @final - */ -class Logger implements LoggerInterface, ResettableInterface -{ - /** - * Detailed debug information - * - * @deprecated Use \Monolog\Level::Debug - */ - public const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - * - * @deprecated Use \Monolog\Level::Info - */ - public const INFO = 200; - - /** - * Uncommon events - * - * @deprecated Use \Monolog\Level::Notice - */ - public const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - * - * @deprecated Use \Monolog\Level::Warning - */ - public const WARNING = 300; - - /** - * Runtime errors - * - * @deprecated Use \Monolog\Level::Error - */ - public const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - * - * @deprecated Use \Monolog\Level::Critical - */ - public const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - * - * @deprecated Use \Monolog\Level::Alert - */ - public const ALERT = 550; - - /** - * Urgent alert. - * - * @deprecated Use \Monolog\Level::Emergency - */ - public const EMERGENCY = 600; - - /** - * Monolog API version - * - * This is only bumped when API breaks are done and should - * follow the major version of the library - */ - public const API = 3; - - /** - * Mapping between levels numbers defined in RFC 5424 and Monolog ones - * - * @phpstan-var array $rfc_5424_levels - */ - private const RFC_5424_LEVELS = [ - 7 => Level::Debug, - 6 => Level::Info, - 5 => Level::Notice, - 4 => Level::Warning, - 3 => Level::Error, - 2 => Level::Critical, - 1 => Level::Alert, - 0 => Level::Emergency, - ]; - - protected string $name; - - /** - * The handler stack - * - * @var list - */ - protected array $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var array<(callable(LogRecord): LogRecord)|ProcessorInterface> - */ - protected array $processors; - - protected bool $microsecondTimestamps = true; - - protected DateTimeZone $timezone; - - protected Closure|null $exceptionHandler = null; - - /** - * Keeps track of depth to prevent infinite logging loops - */ - private int $logDepth = 0; - - /** - * @var WeakMap, int> Keeps track of depth inside fibers to prevent infinite logging loops - */ - private WeakMap $fiberLogDepth; - - /** - * Whether to detect infinite logging loops - * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this - */ - private bool $detectCycles = true; - - /** - * @param string $name The logging channel, a simple descriptive name that is attached to all log records - * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param callable[] $processors Optional array of processors - * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used - * - * @phpstan-param array<(callable(LogRecord): LogRecord)|ProcessorInterface> $processors - */ - public function __construct(string $name, array $handlers = [], array $processors = [], DateTimeZone|null $timezone = null) - { - $this->name = $name; - $this->setHandlers($handlers); - $this->processors = $processors; - $this->timezone = $timezone ?? new DateTimeZone(date_default_timezone_get()); - $this->fiberLogDepth = new \WeakMap(); - } - - public function getName(): string - { - return $this->name; - } - - /** - * Return a new cloned instance with the name changed - * - * @return static - */ - public function withName(string $name): self - { - $new = clone $this; - $new->name = $name; - - return $new; - } - - /** - * Pushes a handler on to the stack. - * - * @return $this - */ - public function pushHandler(HandlerInterface $handler): self - { - array_unshift($this->handlers, $handler); - - return $this; - } - - /** - * Pops a handler from the stack - * - * @throws \LogicException If empty handler stack - */ - public function popHandler(): HandlerInterface - { - if (0 === \count($this->handlers)) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Set handlers, replacing all existing ones. - * - * If a map is passed, keys will be ignored. - * - * @param list $handlers - * @return $this - */ - public function setHandlers(array $handlers): self - { - $this->handlers = []; - foreach (array_reverse($handlers) as $handler) { - $this->pushHandler($handler); - } - - return $this; - } - - /** - * @return list - */ - public function getHandlers(): array - { - return $this->handlers; - } - - /** - * Adds a processor on to the stack. - * - * @phpstan-param ProcessorInterface|(callable(LogRecord): LogRecord) $callback - * @return $this - */ - public function pushProcessor(ProcessorInterface|callable $callback): self - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @phpstan-return ProcessorInterface|(callable(LogRecord): LogRecord) - * @throws \LogicException If empty processor stack - */ - public function popProcessor(): callable - { - if (0 === \count($this->processors)) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * @return callable[] - * @phpstan-return array - */ - public function getProcessors(): array - { - return $this->processors; - } - - /** - * Control the use of microsecond resolution timestamps in the 'datetime' - * member of new records. - * - * As of PHP7.1 microseconds are always included by the engine, so - * there is no performance penalty and Monolog 2 enabled microseconds - * by default. This function lets you disable them though in case you want - * to suppress microseconds from the output. - * - * @param bool $micro True to use microtime() to create timestamps - * @return $this - */ - public function useMicrosecondTimestamps(bool $micro): self - { - $this->microsecondTimestamps = $micro; - - return $this; - } - - /** - * @return $this - */ - public function useLoggingLoopDetection(bool $detectCycles): self - { - $this->detectCycles = $detectCycles; - - return $this; - } - - /** - * Adds a log record. - * - * @param int $level The logging level (a Monolog or RFC 5424 level) - * @param string $message The log message - * @param mixed[] $context The log context - * @param DateTimeImmutable|null $datetime Optional log date to log into the past or future - * @return bool Whether the record has been processed - * - * @phpstan-param value-of|Level $level - */ - public function addRecord(int|Level $level, string $message, array $context = [], DateTimeImmutable|null $datetime = null): bool - { - if (\is_int($level) && isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - if ($this->detectCycles) { - if (null !== ($fiber = Fiber::getCurrent())) { - $logDepth = $this->fiberLogDepth[$fiber] = ($this->fiberLogDepth[$fiber] ?? 0) + 1; - } else { - $logDepth = ++$this->logDepth; - } - } else { - $logDepth = 0; - } - - if ($logDepth === 3) { - $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); - - return false; - } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above - return false; - } - - try { - $recordInitialized = \count($this->processors) === 0; - - $record = new LogRecord( - datetime: $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - channel: $this->name, - level: self::toMonologLevel($level), - message: $message, - context: $context, - extra: [], - ); - $handled = false; - - foreach ($this->handlers as $handler) { - if (false === $recordInitialized) { - // skip initializing the record as long as no handler is going to handle it - if (!$handler->isHandling($record)) { - continue; - } - - try { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - $recordInitialized = true; - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - // once the record is initialized, send it to all handlers as long as the bubbling chain is not interrupted - try { - $handled = true; - if (true === $handler->handle(clone $record)) { - break; - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - return $handled; - } finally { - if ($this->detectCycles) { - if (isset($fiber)) { - $this->fiberLogDepth[$fiber]--; - } else { - $this->logDepth--; - } - } - } - } - - /** - * Ends a log cycle and frees all resources used by handlers. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * Handlers that have been closed should be able to accept log records again and re-open - * themselves on demand, but this may not always be possible depending on implementation. - * - * This is useful at the end of a request and will be called automatically on every handler - * when they get destructed. - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * Ends a log cycle and resets all handlers and processors to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - */ - public function reset(): void - { - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Gets the name of the logging level as a string. - * - * This still returns a string instead of a Level for BC, but new code should not rely on this method. - * - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param value-of|Level $level - * @phpstan-return value-of - * - * @deprecated Since 3.0, use {@see toMonologLevel} or {@see \Monolog\Level->getName()} instead - */ - public static function getLevelName(int|Level $level): string - { - return self::toMonologLevel($level)->getName(); - } - - /** - * Converts PSR-3 levels to Monolog ones if necessary - * - * @param int|string|Level|LogLevel::* $level Level number (monolog) or name (PSR-3) - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public static function toMonologLevel(string|int|Level $level): Level - { - if ($level instanceof Level) { - return $level; - } - - if (\is_string($level)) { - if (is_numeric($level)) { - $levelEnum = Level::tryFrom((int) $level); - if ($levelEnum === null) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - return $levelEnum; - } - - // Contains first char of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ" in Turkish locale) - $upper = strtr(substr($level, 0, 1), 'dinweca', 'DINWECA') . strtolower(substr($level, 1)); - if (\defined(Level::class.'::'.$upper)) { - return \constant(Level::class . '::' . $upper); - } - - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - $levelEnum = Level::tryFrom($level); - if ($levelEnum === null) { - throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', Level::NAMES + Level::VALUES)); - } - - return $levelEnum; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function isHandling(int|string|Level $level): bool - { - $record = new LogRecord( - datetime: new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - channel: $this->name, - message: '', - level: self::toMonologLevel($level), - ); - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Set a custom exception handler that will be called if adding a new record fails - * - * The Closure will receive an exception object and the record that failed to be logged - * - * @return $this - */ - public function setExceptionHandler(Closure|null $callback): self - { - $this->exceptionHandler = $callback; - - return $this; - } - - public function getExceptionHandler(): Closure|null - { - return $this->exceptionHandler; - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - * - * @phpstan-param Level|LogLevel::* $level - */ - public function log($level, string|\Stringable $message, array $context = []): void - { - if (!$level instanceof Level) { - if (!\is_string($level) && !\is_int($level)) { - throw new \InvalidArgumentException('$level is expected to be a string, int or '.Level::class.' instance'); - } - - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - $level = static::toMonologLevel($level); - } - - $this->addRecord($level, (string) $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function debug(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Debug, (string) $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function info(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Info, (string) $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function notice(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Notice, (string) $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function warning(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Warning, (string) $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function error(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Error, (string) $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function critical(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Critical, (string) $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function alert(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Alert, (string) $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function emergency(string|\Stringable $message, array $context = []): void - { - $this->addRecord(Level::Emergency, (string) $message, $context); - } - - /** - * Sets the timezone to be used for the timestamp of log records. - * - * @return $this - */ - public function setTimezone(DateTimeZone $tz): self - { - $this->timezone = $tz; - - return $this; - } - - /** - * Returns the timezone to be used for the timestamp of log records. - */ - public function getTimezone(): DateTimeZone - { - return $this->timezone; - } - - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - */ - protected function handleException(Throwable $e, LogRecord $record): void - { - if (null === $this->exceptionHandler) { - throw $e; - } - - ($this->exceptionHandler)($e, $record); - } - - /** - * @return array - */ - public function __serialize(): array - { - return [ - 'name' => $this->name, - 'handlers' => $this->handlers, - 'processors' => $this->processors, - 'microsecondTimestamps' => $this->microsecondTimestamps, - 'timezone' => $this->timezone, - 'exceptionHandler' => $this->exceptionHandler, - 'logDepth' => $this->logDepth, - 'detectCycles' => $this->detectCycles, - ]; - } - - /** - * @param array $data - */ - public function __unserialize(array $data): void - { - foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { - if (isset($data[$property])) { - $this->$property = $data[$property]; - } - } - - $this->fiberLogDepth = new \WeakMap(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php deleted file mode 100644 index 514b3547..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ClosureContextProcessor.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Generates a context from a Closure if the Closure is the only value - * in the context - * - * It helps reduce the performance impact of debug logs if they do - * need to create lots of context information. If this processor is added - * on the correct handler the context data will only be generated - * when the logs are actually logged to that handler, which is useful when - * using FingersCrossedHandler or other filtering handlers to conditionally - * log records. - */ -class ClosureContextProcessor implements ProcessorInterface -{ - public function __invoke(LogRecord $record): LogRecord - { - $context = $record->context; - if (isset($context[0]) && 1 === \count($context) && $context[0] instanceof \Closure) { - try { - $context = $context[0](); - } catch (\Throwable $e) { - $context = [ - 'error_on_context_generation' => $e->getMessage(), - 'exception' => $e, - ]; - } - - if (!\is_array($context)) { - $context = [$context]; - } - - $record = $record->with(context: $context); - } - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php deleted file mode 100644 index 6b25505d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects Git branch and Git commit SHA in all records - * - * @author Nick Otter - * @author Jordi Boggiano - */ -class GitProcessor implements ProcessorInterface -{ - private Level $level; - /** @var array{branch: string, commit: string}|array|null */ - private static $cache = null; - - /** - * @param int|string|Level|LogLevel::* $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $record->extra['git'] = self::getGitInfo(); - - return $record; - } - - /** - * @return array{branch: string, commit: string}|array - */ - private static function getGitInfo(): array - { - if (self::$cache !== null) { - return self::$cache; - } - - $branches = shell_exec('git branch -v --no-abbrev'); - if (\is_string($branches) && 1 === preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { - return self::$cache = [ - 'branch' => $matches[1], - 'commit' => $matches[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php deleted file mode 100644 index cba6e096..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects value of gethostname in all records - */ -class HostnameProcessor implements ProcessorInterface -{ - private static string $host; - - public function __construct() - { - self::$host = (string) gethostname(); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['hostname'] = self::$host; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index efc2f50a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - */ -class IntrospectionProcessor implements ProcessorInterface -{ - private Level $level; - - /** @var string[] */ - private array $skipClassesPartials; - - private int $skipStackFramesCount; - - private const SKIP_FUNCTIONS = [ - 'call_user_func', - 'call_user_func_array', - ]; - - /** - * @param string|int|Level $level The minimum logging level at which this Processor will be triggered - * @param string[] $skipClassesPartials - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug, array $skipClassesPartials = [], int $skipStackFramesCount = 0) - { - $this->level = Logger::toMonologLevel($level); - $this->skipClassesPartials = array_merge(['Monolog\\'], $skipClassesPartials); - $this->skipStackFramesCount = $skipStackFramesCount; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - - while ($this->isTraceClassOrSkippedFunction($trace, $i)) { - if (isset($trace[$i]['class'])) { - foreach ($this->skipClassesPartials as $part) { - if (strpos($trace[$i]['class'], $part) !== false) { - $i++; - - continue 2; - } - } - } elseif (\in_array($trace[$i]['function'], self::SKIP_FUNCTIONS, true)) { - $i++; - - continue; - } - - break; - } - - $i += $this->skipStackFramesCount; - - // we should have the call source now - $record->extra = array_merge( - $record->extra, - [ - 'file' => $trace[$i - 1]['file'] ?? null, - 'line' => $trace[$i - 1]['line'] ?? null, - 'class' => $trace[$i]['class'] ?? null, - 'callType' => $trace[$i]['type'] ?? null, - 'function' => $trace[$i]['function'] ?? null, - ] - ); - - return $record; - } - - /** - * @param array $trace - */ - private function isTraceClassOrSkippedFunction(array $trace, int $index): bool - { - if (!isset($trace[$index])) { - return false; - } - - return isset($trace[$index]['class']) || \in_array($trace[$index]['function'], self::SKIP_FUNCTIONS, true); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php deleted file mode 100644 index 762ed914..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/LoadAverageProcessor.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects sys_getloadavg in all records @see https://www.php.net/manual/en/function.sys-getloadavg.php - * - * @author Johan Vlaar - */ -class LoadAverageProcessor implements ProcessorInterface -{ - public const LOAD_1_MINUTE = 0; - public const LOAD_5_MINUTE = 1; - public const LOAD_15_MINUTE = 2; - - private const AVAILABLE_LOAD = [ - self::LOAD_1_MINUTE, - self::LOAD_5_MINUTE, - self::LOAD_15_MINUTE, - ]; - - /** - * @var int - */ - protected $avgSystemLoad; - - /** - * @param self::LOAD_* $avgSystemLoad - */ - public function __construct(int $avgSystemLoad = self::LOAD_1_MINUTE) - { - if (!\in_array($avgSystemLoad, self::AVAILABLE_LOAD, true)) { - throw new \InvalidArgumentException(sprintf('Invalid average system load: `%s`', $avgSystemLoad)); - } - $this->avgSystemLoad = $avgSystemLoad; - } - - /** - * {@inheritDoc} - */ - public function __invoke(LogRecord $record): LogRecord - { - if (!\function_exists('sys_getloadavg')) { - return $record; - } - $usage = sys_getloadavg(); - if (false === $usage) { - return $record; - } - - $record->extra['load_average'] = $usage[$this->avgSystemLoad]; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index adc32c65..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $usage = memory_get_peak_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record->extra['memory_peak_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index f808e51b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor implements ProcessorInterface -{ - /** - * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. - */ - protected bool $realUsage; - - /** - * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - protected bool $useFormatting; - - /** - * @param bool $realUsage Set this to true to get the real size of memory allocated from system. - * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - public function __construct(bool $realUsage = true, bool $useFormatting = true) - { - $this->realUsage = $realUsage; - $this->useFormatting = $useFormatting; - } - - /** - * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is - * - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int - */ - protected function formatBytes(int $bytes) - { - if (!$this->useFormatting) { - return $bytes; - } - - if ($bytes > 1024 * 1024) { - return round($bytes / 1024 / 1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes / 1024, 2).' KB'; - } - - return $bytes . ' B'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index a814b1df..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $usage = memory_get_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record->extra['memory_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php deleted file mode 100644 index a48a7854..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Level; -use Monolog\Logger; -use Psr\Log\LogLevel; -use Monolog\LogRecord; - -/** - * Injects Hg branch and Hg revision number in all records - * - * @author Jonathan A. Schweder - */ -class MercurialProcessor implements ProcessorInterface -{ - private Level $level; - /** @var array{branch: string, revision: string}|array|null */ - private static $cache = null; - - /** - * @param int|string|Level $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function __construct(int|string|Level $level = Level::Debug) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // return if the level is not high enough - if ($record->level->isLowerThan($this->level)) { - return $record; - } - - $record->extra['hg'] = self::getMercurialInfo(); - - return $record; - } - - /** - * @return array{branch: string, revision: string}|array - */ - private static function getMercurialInfo(): array - { - if (self::$cache !== null) { - return self::$cache; - } - - $result = explode(' ', trim((string) shell_exec('hg id -nb'))); - - if (\count($result) >= 3) { - return self::$cache = [ - 'branch' => $result[1], - 'revision' => $result[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index bb9a5224..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor implements ProcessorInterface -{ - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['process_id'] = getmypid(); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php deleted file mode 100644 index ebe41fc2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * An optional interface to allow labelling Monolog processors. - * - * @author Nicolas Grekas - */ -interface ProcessorInterface -{ - /** - * @return LogRecord The processed record - */ - public function __invoke(LogRecord $record); -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index 76adf258..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Utils; -use Monolog\LogRecord; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor implements ProcessorInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - - private ?string $dateFormat; - - private bool $removeUsedContextFields; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset - */ - public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false) - { - $this->dateFormat = $dateFormat; - $this->removeUsedContextFields = $removeUsedContextFields; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - if (false === strpos($record->message, '{')) { - return $record; - } - - $replacements = []; - $context = $record->context; - - foreach ($context as $key => $val) { - $placeholder = '{' . $key . '}'; - if (strpos($record->message, $placeholder) === false) { - continue; - } - - if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, "__toString"))) { - $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTimeInterface) { - if (null === $this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) { - // handle monolog dates using __toString if no specific dateFormat was asked for - // so that it follows the useMicroseconds flag - $replacements[$placeholder] = (string) $val; - } else { - $replacements[$placeholder] = $val->format($this->dateFormat ?? static::SIMPLE_DATE); - } - } elseif ($val instanceof \UnitEnum) { - $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; - } elseif (\is_object($val)) { - $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (\is_array($val)) { - $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); - } else { - $replacements[$placeholder] = '['.\gettype($val).']'; - } - - if ($this->removeUsedContextFields) { - unset($context[$key]); - } - } - - return $record->with(message: strtr($record->message, $replacements), context: $context); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php deleted file mode 100644 index f4e41ce2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\LogRecord; - -/** - * Adds a tags array into record - * - * @author Martijn Riemers - */ -class TagProcessor implements ProcessorInterface -{ - /** @var string[] */ - private array $tags; - - /** - * @param string[] $tags - */ - public function __construct(array $tags = []) - { - $this->setTags($tags); - } - - /** - * @param string[] $tags - * @return $this - */ - public function addTags(array $tags = []): self - { - $this->tags = array_merge($this->tags, $tags); - - return $this; - } - - /** - * @param string[] $tags - * @return $this - */ - public function setTags(array $tags = []): self - { - $this->tags = $tags; - - return $this; - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['tags'] = $this->tags; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index 261e6538..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\ResettableInterface; -use Monolog\LogRecord; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor implements ProcessorInterface, ResettableInterface -{ - /** @var non-empty-string */ - private string $uid; - - /** - * @param int<1, 32> $length - */ - public function __construct(int $length = 7) - { - if ($length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - $this->uid = $this->generateUid($length); - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - $record->extra['uid'] = $this->uid; - - return $record; - } - - public function getUid(): string - { - return $this->uid; - } - - public function reset(): void - { - $this->uid = $this->generateUid(\strlen($this->uid)); - } - - /** - * @param positive-int $length - * @return non-empty-string - */ - private function generateUid(int $length): string - { - return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index b78385e0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use ArrayAccess; -use Monolog\LogRecord; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor implements ProcessorInterface -{ - /** - * @var array|ArrayAccess - */ - protected array|ArrayAccess $serverData; - - /** - * Default fields - * - * Array is structured as [key in record.extra => key in $serverData] - * - * @var array - */ - protected array $extraFields = [ - 'url' => 'REQUEST_URI', - 'ip' => 'REMOTE_ADDR', - 'http_method' => 'REQUEST_METHOD', - 'server' => 'SERVER_NAME', - 'referrer' => 'HTTP_REFERER', - 'user_agent' => 'HTTP_USER_AGENT', - ]; - - /** - * @param array|ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data - */ - public function __construct(array|ArrayAccess|null $serverData = null, array|null $extraFields = null) - { - if (null === $serverData) { - $this->serverData = &$_SERVER; - } else { - $this->serverData = $serverData; - } - - $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; - if (isset($this->serverData['UNIQUE_ID'])) { - $this->extraFields['unique_id'] = 'UNIQUE_ID'; - $defaultEnabled[] = 'unique_id'; - } - - if (null === $extraFields) { - $extraFields = $defaultEnabled; - } - if (isset($extraFields[0])) { - foreach (array_keys($this->extraFields) as $fieldName) { - if (!\in_array($fieldName, $extraFields, true)) { - unset($this->extraFields[$fieldName]); - } - } - } else { - $this->extraFields = $extraFields; - } - } - - /** - * @inheritDoc - */ - public function __invoke(LogRecord $record): LogRecord - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record->extra = $this->appendExtraFields($record->extra); - - return $record; - } - - /** - * @return $this - */ - public function addExtraField(string $extraName, string $serverName): self - { - $this->extraFields[$extraName] = $serverName; - - return $this; - } - - /** - * @param mixed[] $extra - * @return mixed[] - */ - private function appendExtraFields(array $extra): array - { - foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = $this->serverData[$serverName] ?? null; - } - - return $extra; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php deleted file mode 100644 index 2ef2edce..00000000 --- a/vendor/monolog/monolog/src/Monolog/Registry.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use InvalidArgumentException; - -/** - * Monolog log registry - * - * Allows to get `Logger` instances in the global scope - * via static method calls on this class. - * - * - * $application = new Monolog\Logger('application'); - * $api = new Monolog\Logger('api'); - * - * Monolog\Registry::addLogger($application); - * Monolog\Registry::addLogger($api); - * - * function testLogger() - * { - * Monolog\Registry::api()->error('Sent to $api Logger instance'); - * Monolog\Registry::application()->error('Sent to $application Logger instance'); - * } - * - * - * @author Tomas Tatarko - */ -class Registry -{ - /** - * List of all loggers in the registry (by named indexes) - * - * @var Logger[] - */ - private static array $loggers = []; - - /** - * Adds new logging channel to the registry - * - * @param Logger $logger Instance of the logging channel - * @param string|null $name Name of the logging channel ($logger->getName() by default) - * @param bool $overwrite Overwrite instance in the registry if the given name already exists? - * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists - */ - public static function addLogger(Logger $logger, ?string $name = null, bool $overwrite = false): void - { - $name = $name ?? $logger->getName(); - - if (isset(self::$loggers[$name]) && !$overwrite) { - throw new InvalidArgumentException('Logger with the given name already exists'); - } - - self::$loggers[$name] = $logger; - } - - /** - * Checks if such logging channel exists by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function hasLogger($logger): bool - { - if ($logger instanceof Logger) { - $index = array_search($logger, self::$loggers, true); - - return false !== $index; - } - - return isset(self::$loggers[$logger]); - } - - /** - * Removes instance from registry by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function removeLogger($logger): void - { - if ($logger instanceof Logger) { - if (false !== ($idx = array_search($logger, self::$loggers, true))) { - unset(self::$loggers[$idx]); - } - } else { - unset(self::$loggers[$logger]); - } - } - - /** - * Clears the registry - */ - public static function clear(): void - { - self::$loggers = []; - } - - /** - * Gets Logger instance from the registry - * - * @param string $name Name of the requested Logger instance - * @throws \InvalidArgumentException If named Logger instance is not in the registry - */ - public static function getInstance(string $name): Logger - { - if (!isset(self::$loggers[$name])) { - throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); - } - - return self::$loggers[$name]; - } - - /** - * Gets Logger instance from the registry via static method call - * - * @param string $name Name of the requested Logger instance - * @param mixed[] $arguments Arguments passed to static method call - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function __callStatic(string $name, array $arguments): Logger - { - return self::getInstance($name); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/vendor/monolog/monolog/src/Monolog/ResettableInterface.php deleted file mode 100644 index 4983a6b3..00000000 --- a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -/** - * Handler or Processor implementing this interface will be reset when Logger::reset() is called. - * - * Resetting ends a log cycle gets them back to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - * - * @author Grégoire Pineau - */ -interface ResettableInterface -{ - public function reset(): void; -} diff --git a/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/vendor/monolog/monolog/src/Monolog/SignalHandler.php deleted file mode 100644 index b6a69fca..00000000 --- a/vendor/monolog/monolog/src/Monolog/SignalHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use ReflectionExtension; - -/** - * Monolog POSIX signal handler - * - * @author Robert Gust-Bardon - */ -class SignalHandler -{ - private LoggerInterface $logger; - - /** @var array SIG_DFL, SIG_IGN or previous callable */ - private array $previousSignalHandler = []; - /** @var array */ - private array $signalLevelMap = []; - /** @var array */ - private array $signalRestartSyscalls = []; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * @param int|string|Level $level Level or level name - * @return $this - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - public function registerSignalHandler(int $signo, int|string|Level $level = LogLevel::CRITICAL, bool $callPrevious = true, bool $restartSyscalls = true, ?bool $async = true): self - { - if (!\extension_loaded('pcntl') || !\function_exists('pcntl_signal')) { - return $this; - } - - $level = Logger::toMonologLevel($level)->toPsrLogLevel(); - - if ($callPrevious) { - $handler = pcntl_signal_get_handler($signo); - $this->previousSignalHandler[$signo] = $handler; - } else { - unset($this->previousSignalHandler[$signo]); - } - $this->signalLevelMap[$signo] = $level; - $this->signalRestartSyscalls[$signo] = $restartSyscalls; - - if ($async !== null) { - pcntl_async_signals($async); - } - - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - - return $this; - } - - /** - * @param mixed $siginfo - */ - public function handleSignal(int $signo, $siginfo = null): void - { - /** @var array $signals */ - static $signals = []; - - if (\count($signals) === 0 && \extension_loaded('pcntl')) { - $pcntl = new ReflectionExtension('pcntl'); - foreach ($pcntl->getConstants() as $name => $value) { - if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && \is_int($value)) { - $signals[$value] = $name; - } - } - } - - $level = $this->signalLevelMap[$signo] ?? LogLevel::CRITICAL; - $signal = $signals[$signo] ?? $signo; - $context = $siginfo ?? []; - $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); - - if (!isset($this->previousSignalHandler[$signo])) { - return; - } - - if ($this->previousSignalHandler[$signo] === SIG_DFL) { - if (\extension_loaded('pcntl') && \function_exists('pcntl_signal') && \function_exists('pcntl_sigprocmask') && \function_exists('pcntl_signal_dispatch') - && \extension_loaded('posix') && \function_exists('posix_getpid') && \function_exists('posix_kill') - ) { - $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? true; - pcntl_signal($signo, SIG_DFL, $restartSyscalls); - pcntl_sigprocmask(SIG_UNBLOCK, [$signo], $oldset); - posix_kill(posix_getpid(), $signo); - pcntl_signal_dispatch(); - pcntl_sigprocmask(SIG_SETMASK, $oldset); - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - } - } elseif (\is_callable($this->previousSignalHandler[$signo])) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/vendor/monolog/monolog/src/Monolog/Test/TestCase.php deleted file mode 100644 index 29ec7c96..00000000 --- a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Test; - -use Monolog\Level; -use Monolog\Logger; -use Monolog\LogRecord; -use Monolog\DateTimeImmutable; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Lets you easily generate log records and a dummy formatter for testing purposes - * - * @author Jordi Boggiano - * - * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 - */ -class TestCase extends \PHPUnit\Framework\TestCase -{ - public function tearDown(): void - { - parent::tearDown(); - - if (isset($this->handler)) { - unset($this->handler); - } - } - - /** - * @param array $context - * @param array $extra - * - * @phpstan-param value-of|value-of|Level|LogLevel::* $level - */ - protected function getRecord(int|string|Level $level = Level::Warning, string|\Stringable $message = 'test', array $context = [], string $channel = 'test', \DateTimeImmutable $datetime = new DateTimeImmutable(true), array $extra = []): LogRecord - { - return new LogRecord( - message: (string) $message, - context: $context, - level: Logger::toMonologLevel($level), - channel: $channel, - datetime: $datetime, - extra: $extra, - ); - } - - /** - * @phpstan-return list - */ - protected function getMultipleRecords(): array - { - return [ - $this->getRecord(Level::Debug, 'debug message 1'), - $this->getRecord(Level::Debug, 'debug message 2'), - $this->getRecord(Level::Info, 'information'), - $this->getRecord(Level::Warning, 'warning'), - $this->getRecord(Level::Error, 'error'), - ]; - } - - protected function getIdentityFormatter(): FormatterInterface - { - $formatter = $this->createMock(FormatterInterface::class); - $formatter->expects(self::any()) - ->method('format') - ->willReturnCallback(function ($record) { - return $record->message; - }); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php deleted file mode 100644 index 79ea96ca..00000000 --- a/vendor/monolog/monolog/src/Monolog/Utils.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -final class Utils -{ - const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR; - - public static function getClass(object $object): string - { - $class = \get_class($object); - - if (false === ($pos = strpos($class, "@anonymous\0"))) { - return $class; - } - - if (false === ($parent = get_parent_class($class))) { - return substr($class, 0, $pos + 10); - } - - return $parent . '@anonymous'; - } - - public static function substr(string $string, int $start, ?int $length = null): string - { - if (\extension_loaded('mbstring')) { - return mb_strcut($string, $start, $length); - } - - return substr($string, $start, (null === $length) ? \strlen($string) : $length); - } - - /** - * Makes sure if a relative path is passed in it is turned into an absolute path - * - * @param string $streamUrl stream URL or path without protocol - */ - public static function canonicalizePath(string $streamUrl): string - { - $prefix = ''; - if ('file://' === substr($streamUrl, 0, 7)) { - $streamUrl = substr($streamUrl, 7); - $prefix = 'file://'; - } - - // other type of stream, not supported - if (false !== strpos($streamUrl, '://')) { - return $streamUrl; - } - - // already absolute - if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { - return $prefix.$streamUrl; - } - - $streamUrl = getcwd() . '/' . $streamUrl; - - return $prefix.$streamUrl; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS - * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null - */ - public static function jsonEncode($data, ?int $encodeFlags = null, bool $ignoreErrors = false): string - { - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - if ($ignoreErrors) { - $json = @json_encode($data, $encodeFlags); - if (false === $json) { - return 'null'; - } - - return $json; - } - - $json = json_encode($data, $encodeFlags); - if (false === $json) { - $json = self::handleJsonError(json_last_error(), $data); - } - - return $json; - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * initial error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - public static function handleJsonError(int $code, $data, ?int $encodeFlags = null): string - { - if ($code !== JSON_ERROR_UTF8) { - self::throwEncodeError($code, $data); - } - - if (\is_string($data)) { - self::detectAndCleanUtf8($data); - } elseif (\is_array($data)) { - array_walk_recursive($data, ['Monolog\Utils', 'detectAndCleanUtf8']); - } else { - self::throwEncodeError($code, $data); - } - - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - $json = json_encode($data, $encodeFlags); - - if ($json === false) { - self::throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * @internal - */ - public static function pcreLastErrorMessage(int $code): string - { - if (PHP_VERSION_ID >= 80000) { - return preg_last_error_msg(); - } - - $constants = (get_defined_constants(true))['pcre']; - $constants = array_filter($constants, function ($key) { - return substr($key, -6) == '_ERROR'; - }, ARRAY_FILTER_USE_KEY); - - $constants = array_flip($constants); - - return $constants[$code] ?? 'UNDEFINED_ERROR'; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - */ - private static function throwEncodeError(int $code, $data): never - { - $msg = match ($code) { - JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', - JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', - JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', - default => 'Unknown error', - }; - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed $data Input to check and convert if needed, passed by ref - */ - private static function detectAndCleanUtf8(&$data): void - { - if (\is_string($data) && preg_match('//u', $data) !== 1) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function (array $m): string { - return \function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); - }, - $data - ); - if (!\is_string($data)) { - $pcreErrorCode = preg_last_error(); - - throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); - } - $data = str_replace( - ['¤', '¦', '¨', '´', '¸', '¼', '½', '¾'], - ['€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'], - $data - ); - } - } - - /** - * Converts a string with a valid 'memory_limit' format, to bytes. - * - * @param string|false $val - * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. - */ - public static function expandIniShorthandBytes($val) - { - if (!\is_string($val)) { - return false; - } - - // support -1 - if ((int) $val < 0) { - return (int) $val; - } - - if (preg_match('/^\s*(?\d+)(?:\.\d+)?\s*(?[gmk]?)\s*$/i', $val, $match) !== 1) { - return false; - } - - $val = (int) $match['val']; - switch (strtolower($match['unit'] ?? '')) { - case 'g': - $val *= 1024; - // no break - case 'm': - $val *= 1024; - // no break - case 'k': - $val *= 1024; - } - - return $val; - } - - public static function getRecordMessageForException(LogRecord $record): string - { - $context = ''; - $extra = ''; - - try { - if (\count($record->context) > 0) { - $context = "\nContext: " . json_encode($record->context, JSON_THROW_ON_ERROR); - } - if (\count($record->extra) > 0) { - $extra = "\nExtra: " . json_encode($record->extra, JSON_THROW_ON_ERROR); - } - } catch (\Throwable $e) { - // noop - } - - return "\nThe exception occurred while attempting to log: " . $record->message . $context . $extra; - } -} diff --git a/vendor/myclabs/deep-copy/LICENSE b/vendor/myclabs/deep-copy/LICENSE deleted file mode 100644 index c3e83500..00000000 --- a/vendor/myclabs/deep-copy/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 My C-Sense - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/myclabs/deep-copy/README.md b/vendor/myclabs/deep-copy/README.md deleted file mode 100644 index 88ae14cc..00000000 --- a/vendor/myclabs/deep-copy/README.md +++ /dev/null @@ -1,406 +0,0 @@ -# DeepCopy - -DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. - -[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy) -[![Integrate](https://github.com/myclabs/DeepCopy/actions/workflows/ci.yaml/badge.svg?branch=1.x)](https://github.com/myclabs/DeepCopy/actions/workflows/ci.yaml) - -## Table of Contents - -1. [How](#how) -1. [Why](#why) - 1. [Using simply `clone`](#using-simply-clone) - 1. [Overriding `__clone()`](#overriding-__clone) - 1. [With `DeepCopy`](#with-deepcopy) -1. [How it works](#how-it-works) -1. [Going further](#going-further) - 1. [Matchers](#matchers) - 1. [Property name](#property-name) - 1. [Specific property](#specific-property) - 1. [Type](#type) - 1. [Filters](#filters) - 1. [`SetNullFilter`](#setnullfilter-filter) - 1. [`KeepFilter`](#keepfilter-filter) - 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter) - 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter) - 1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter) - 1. [`ReplaceFilter`](#replacefilter-type-filter) - 1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter) -1. [Edge cases](#edge-cases) -1. [Contributing](#contributing) - 1. [Tests](#tests) - - -## How? - -Install with Composer: - -``` -composer require myclabs/deep-copy -``` - -Use it: - -```php -use DeepCopy\DeepCopy; - -$copier = new DeepCopy(); -$myCopy = $copier->copy($myObject); -``` - - -## Why? - -- How do you create copies of your objects? - -```php -$myCopy = clone $myObject; -``` - -- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)? - -You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior -yourself. - -- But how do you handle **cycles** in the association graph? - -Now you're in for a big mess :( - -![association graph](doc/graph.png) - - -### Using simply `clone` - -![Using clone](doc/clone.png) - - -### Overriding `__clone()` - -![Overriding __clone](doc/deep-clone.png) - - -### With `DeepCopy` - -![With DeepCopy](doc/deep-copy.png) - - -## How it works - -DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it -keeps a hash map of all instances and thus preserves the object graph. - -To use it: - -```php -use function DeepCopy\deep_copy; - -$copy = deep_copy($var); -``` - -Alternatively, you can create your own `DeepCopy` instance to configure it differently for example: - -```php -use DeepCopy\DeepCopy; - -$copier = new DeepCopy(true); - -$copy = $copier->copy($var); -``` - -You may want to roll your own deep copy function: - -```php -namespace Acme; - -use DeepCopy\DeepCopy; - -function deep_copy($var) -{ - static $copier = null; - - if (null === $copier) { - $copier = new DeepCopy(true); - } - - return $copier->copy($var); -} -``` - - -## Going further - -You can add filters to customize the copy process. - -The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`, -with `$filter` implementing `DeepCopy\Filter\Filter` -and `$matcher` implementing `DeepCopy\Matcher\Matcher`. - -We provide some generic filters and matchers. - - -### Matchers - - - `DeepCopy\Matcher` applies on a object attribute. - - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements. - - -#### Property name - -The `PropertyNameMatcher` will match a property by its name: - -```php -use DeepCopy\Matcher\PropertyNameMatcher; - -// Will apply a filter to any property of any objects named "id" -$matcher = new PropertyNameMatcher('id'); -``` - - -#### Specific property - -The `PropertyMatcher` will match a specific property of a specific class: - -```php -use DeepCopy\Matcher\PropertyMatcher; - -// Will apply a filter to the property "id" of any objects of the class "MyClass" -$matcher = new PropertyMatcher('MyClass', 'id'); -``` - - -#### Type - -The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of -[gettype()](http://php.net/manual/en/function.gettype.php) function): - -```php -use DeepCopy\TypeMatcher\TypeMatcher; - -// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection -$matcher = new TypeMatcher('Doctrine\Common\Collections\Collection'); -``` - - -### Filters - -- `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher` -- `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher` - -By design, matching a filter will stop the chain of filters (i.e. the next ones will not be applied). -Using the ([`ChainableFilter`](#chainablefilter-filter)) won't stop the chain of filters. - - -#### `SetNullFilter` (filter) - -Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have -any ID: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\SetNullFilter; -use DeepCopy\Matcher\PropertyNameMatcher; - -$object = MyClass::load(123); -echo $object->id; // 123 - -$copier = new DeepCopy(); -$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); - -$copy = $copier->copy($object); - -echo $copy->id; // null -``` - - -#### `KeepFilter` (filter) - -If you want a property to remain untouched (for example, an association to an object): - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\KeepFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$copier = new DeepCopy(); -$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category')); - -$copy = $copier->copy($object); -// $copy->category has not been touched -``` - - -#### `ChainableFilter` (filter) - -If you use cloning on proxy classes, you might want to apply two filters for: -1. loading the data -2. applying a transformation - -You can use the `ChainableFilter` as a decorator of the proxy loader filter, which won't stop the chain of filters (i.e. -the next ones may be applied). - - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\ChainableFilter; -use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; -use DeepCopy\Filter\SetNullFilter; -use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; -use DeepCopy\Matcher\PropertyNameMatcher; - -$copier = new DeepCopy(); -$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); -$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); - -$copy = $copier->copy($object); - -echo $copy->id; // null -``` - - -#### `DoctrineCollectionFilter` (filter) - -If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; -use DeepCopy\Matcher\PropertyTypeMatcher; - -$copier = new DeepCopy(); -$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); - -$copy = $copier->copy($object); -``` - - -#### `DoctrineEmptyCollectionFilter` (filter) - -If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the -`DoctrineEmptyCollectionFilter` - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$copier = new DeepCopy(); -$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty')); - -$copy = $copier->copy($object); - -// $copy->myProperty will return an empty collection -``` - - -#### `DoctrineProxyFilter` (filter) - -If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a -Doctrine proxy class (...\\\_\_CG\_\_\Proxy). -You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class. -**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded -before other filters are applied!** -We recommend to decorate the `DoctrineProxyFilter` with the `ChainableFilter` to allow applying other filters to the -cloned lazy loaded entities. - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; -use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; - -$copier = new DeepCopy(); -$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); - -$copy = $copier->copy($object); - -// $copy should now contain a clone of all entities, including those that were not yet fully loaded. -``` - - -#### `ReplaceFilter` (type filter) - -1. If you want to replace the value of a property: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\ReplaceFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$copier = new DeepCopy(); -$callback = function ($currentValue) { - return $currentValue . ' (copy)' -}; -$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); - -$copy = $copier->copy($object); - -// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)' -``` - -2. If you want to replace whole element: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\TypeFilter\ReplaceFilter; -use DeepCopy\TypeMatcher\TypeMatcher; - -$copier = new DeepCopy(); -$callback = function (MyClass $myClass) { - return get_class($myClass); -}; -$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass')); - -$copy = $copier->copy([new MyClass, 'some string', new MyClass]); - -// $copy will contain ['MyClass', 'some string', 'MyClass'] -``` - - -The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable. - - -#### `ShallowCopyFilter` (type filter) - -Stop *DeepCopy* from recursively copying element, using standard `clone` instead: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\TypeFilter\ShallowCopyFilter; -use DeepCopy\TypeMatcher\TypeMatcher; -use Mockery as m; - -$this->deepCopy = new DeepCopy(); -$this->deepCopy->addTypeFilter( - new ShallowCopyFilter, - new TypeMatcher(m\MockInterface::class) -); - -$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class)); -// All mocks will be just cloned, not deep copied -``` - - -## Edge cases - -The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are -not applied. There is two ways for you to handle them: - -- Implement your own `__clone()` method -- Use a filter with a type matcher - - -## Contributing - -DeepCopy is distributed under the MIT license. - - -### Tests - -Running the tests is simple: - -```php -vendor/bin/phpunit -``` - -### Support - -Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme). diff --git a/vendor/myclabs/deep-copy/composer.json b/vendor/myclabs/deep-copy/composer.json deleted file mode 100644 index f115fff8..00000000 --- a/vendor/myclabs/deep-copy/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "myclabs/deep-copy", - "description": "Create deep copies (clones) of your objects", - "license": "MIT", - "type": "library", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "autoload-dev": { - "psr-4": { - "DeepCopyTest\\": "tests/DeepCopyTest/", - "DeepCopy\\": "fixtures/" - } - }, - "config": { - "sort-packages": true - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php deleted file mode 100644 index a944697d..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +++ /dev/null @@ -1,328 +0,0 @@ - Filter, 'matcher' => Matcher] pairs. - */ - private $filters = []; - - /** - * Type Filters to apply. - * - * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs. - */ - private $typeFilters = []; - - /** - * @var bool - */ - private $skipUncloneable = false; - - /** - * @var bool - */ - private $useCloneMethod; - - /** - * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used - * instead of the regular deep cloning. - */ - public function __construct($useCloneMethod = false) - { - $this->useCloneMethod = $useCloneMethod; - - $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class)); - $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class)); - $this->addTypeFilter(new DatePeriodFilter(), new TypeMatcher(DatePeriod::class)); - $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class)); - } - - /** - * If enabled, will not throw an exception when coming across an uncloneable property. - * - * @param $skipUncloneable - * - * @return $this - */ - public function skipUncloneable($skipUncloneable = true) - { - $this->skipUncloneable = $skipUncloneable; - - return $this; - } - - /** - * Deep copies the given object. - * - * @template TObject - * - * @param TObject $object - * - * @return TObject - */ - public function copy($object) - { - $this->hashMap = []; - - return $this->recursiveCopy($object); - } - - public function addFilter(Filter $filter, Matcher $matcher) - { - $this->filters[] = [ - 'matcher' => $matcher, - 'filter' => $filter, - ]; - } - - public function prependFilter(Filter $filter, Matcher $matcher) - { - array_unshift($this->filters, [ - 'matcher' => $matcher, - 'filter' => $filter, - ]); - } - - public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) - { - $this->typeFilters[] = [ - 'matcher' => $matcher, - 'filter' => $filter, - ]; - } - - public function prependTypeFilter(TypeFilter $filter, TypeMatcher $matcher) - { - array_unshift($this->typeFilters, [ - 'matcher' => $matcher, - 'filter' => $filter, - ]); - } - - private function recursiveCopy($var) - { - // Matches Type Filter - if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) { - return $filter->apply($var); - } - - // Resource - if (is_resource($var)) { - return $var; - } - - // Array - if (is_array($var)) { - return $this->copyArray($var); - } - - // Scalar - if (! is_object($var)) { - return $var; - } - - // Enum - if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) { - return $var; - } - - // Object - return $this->copyObject($var); - } - - /** - * Copy an array - * @param array $array - * @return array - */ - private function copyArray(array $array) - { - foreach ($array as $key => $value) { - $array[$key] = $this->recursiveCopy($value); - } - - return $array; - } - - /** - * Copies an object. - * - * @param object $object - * - * @throws CloneException - * - * @return object - */ - private function copyObject($object) - { - $objectHash = spl_object_hash($object); - - if (isset($this->hashMap[$objectHash])) { - return $this->hashMap[$objectHash]; - } - - $reflectedObject = new ReflectionObject($object); - $isCloneable = $reflectedObject->isCloneable(); - - if (false === $isCloneable) { - if ($this->skipUncloneable) { - $this->hashMap[$objectHash] = $object; - - return $object; - } - - throw new CloneException( - sprintf( - 'The class "%s" is not cloneable.', - $reflectedObject->getName() - ) - ); - } - - $newObject = clone $object; - $this->hashMap[$objectHash] = $newObject; - - if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) { - return $newObject; - } - - if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) { - return $newObject; - } - - foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { - $this->copyObjectProperty($newObject, $property); - } - - return $newObject; - } - - private function copyObjectProperty($object, ReflectionProperty $property) - { - // Ignore static properties - if ($property->isStatic()) { - return; - } - - // Ignore readonly properties - if (method_exists($property, 'isReadOnly') && $property->isReadOnly()) { - return; - } - - // Apply the filters - foreach ($this->filters as $item) { - /** @var Matcher $matcher */ - $matcher = $item['matcher']; - /** @var Filter $filter */ - $filter = $item['filter']; - - if ($matcher->matches($object, $property->getName())) { - $filter->apply( - $object, - $property->getName(), - function ($object) { - return $this->recursiveCopy($object); - } - ); - - if ($filter instanceof ChainableFilter) { - continue; - } - - // If a filter matches, we stop processing this property - return; - } - } - - if (PHP_VERSION_ID < 80100) { - $property->setAccessible(true); - } - - // Ignore uninitialized properties (for PHP >7.4) - if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) { - return; - } - - $propertyValue = $property->getValue($object); - - // Copy the property - $property->setValue($object, $this->recursiveCopy($propertyValue)); - } - - /** - * Returns first filter that matches variable, `null` if no such filter found. - * - * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and - * 'matcher' with value of type {@see TypeMatcher} - * @param mixed $var - * - * @return TypeFilter|null - */ - private function getFirstMatchedTypeFilter(array $filterRecords, $var) - { - $matched = $this->first( - $filterRecords, - function (array $record) use ($var) { - /* @var TypeMatcher $matcher */ - $matcher = $record['matcher']; - - return $matcher->matches($var); - } - ); - - return isset($matched) ? $matched['filter'] : null; - } - - /** - * Returns first element that matches predicate, `null` if no such element found. - * - * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs. - * @param callable $predicate Predicate arguments are: element. - * - * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher' - * with value of type {@see TypeMatcher} or `null`. - */ - private function first(array $elements, callable $predicate) - { - foreach ($elements as $element) { - if (call_user_func($predicate, $element)) { - return $element; - } - } - - return null; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php deleted file mode 100644 index c046706a..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php +++ /dev/null @@ -1,9 +0,0 @@ -filter = $filter; - } - - public function apply($object, $property, $objectCopier) - { - $this->filter->apply($object, $property, $objectCopier); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php deleted file mode 100644 index 66e91e59..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php +++ /dev/null @@ -1,35 +0,0 @@ -setAccessible(true); - } - $oldCollection = $reflectionProperty->getValue($object); - - $newCollection = $oldCollection->map( - function ($item) use ($objectCopier) { - return $objectCopier($item); - } - ); - - $reflectionProperty->setValue($object, $newCollection); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php deleted file mode 100644 index fa1c0341..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php +++ /dev/null @@ -1,30 +0,0 @@ -setAccessible(true); - } - - $reflectionProperty->setValue($object, new ArrayCollection()); - } -} \ No newline at end of file diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php deleted file mode 100644 index 8bee8f76..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php +++ /dev/null @@ -1,22 +0,0 @@ -__load(); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php deleted file mode 100644 index 85ba18ce..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php +++ /dev/null @@ -1,18 +0,0 @@ -callback = $callable; - } - - /** - * Replaces the object property by the result of the callback called with the object property. - * - * {@inheritdoc} - */ - public function apply($object, $property, $objectCopier) - { - $reflectionProperty = ReflectionHelper::getProperty($object, $property); - if (PHP_VERSION_ID < 80100) { - $reflectionProperty->setAccessible(true); - } - - $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); - - $reflectionProperty->setValue($object, $value); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php deleted file mode 100644 index 67222724..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php +++ /dev/null @@ -1,26 +0,0 @@ -setAccessible(true); - } - $reflectionProperty->setValue($object, null); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php deleted file mode 100644 index c5887b19..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php +++ /dev/null @@ -1,22 +0,0 @@ -class = $class; - $this->property = $property; - } - - /** - * Matches a specific property of a specific class. - * - * {@inheritdoc} - */ - public function matches($object, $property) - { - return ($object instanceof $this->class) && $property == $this->property; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php deleted file mode 100644 index c8ec0d2b..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php +++ /dev/null @@ -1,32 +0,0 @@ -property = $property; - } - - /** - * Matches a property by its name. - * - * {@inheritdoc} - */ - public function matches($object, $property) - { - return $property == $this->property; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php deleted file mode 100644 index 7980bfa2..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php +++ /dev/null @@ -1,54 +0,0 @@ -propertyType = $propertyType; - } - - /** - * {@inheritdoc} - */ - public function matches($object, $property) - { - try { - $reflectionProperty = ReflectionHelper::getProperty($object, $property); - } catch (ReflectionException $exception) { - return false; - } - - if (PHP_VERSION_ID < 80100) { - $reflectionProperty->setAccessible(true); - } - - // Uninitialized properties (for PHP >7.4) - if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) { - // null instanceof $this->propertyType - return false; - } - - return $reflectionProperty->getValue($object) instanceof $this->propertyType; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php deleted file mode 100644 index 742410cb..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php +++ /dev/null @@ -1,78 +0,0 @@ -getProperties() does not return private properties from ancestor classes. - * - * @author muratyaman@gmail.com - * @see http://php.net/manual/en/reflectionclass.getproperties.php - * - * @param ReflectionClass $ref - * - * @return ReflectionProperty[] - */ - public static function getProperties(ReflectionClass $ref) - { - $props = $ref->getProperties(); - $propsArr = array(); - - foreach ($props as $prop) { - $propertyName = $prop->getName(); - $propsArr[$propertyName] = $prop; - } - - if ($parentClass = $ref->getParentClass()) { - $parentPropsArr = self::getProperties($parentClass); - foreach ($propsArr as $key => $property) { - $parentPropsArr[$key] = $property; - } - - return $parentPropsArr; - } - - return $propsArr; - } - - /** - * Retrieves property by name from object and all its ancestors. - * - * @param object|string $object - * @param string $name - * - * @throws PropertyException - * @throws ReflectionException - * - * @return ReflectionProperty - */ - public static function getProperty($object, $name) - { - $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object); - - if ($reflection->hasProperty($name)) { - return $reflection->getProperty($name); - } - - if ($parentClass = $reflection->getParentClass()) { - return self::getProperty($parentClass->getName(), $name); - } - - throw new PropertyException( - sprintf( - 'The class "%s" doesn\'t have a property with the given name: "%s".', - is_object($object) ? get_class($object) : $object, - $name - ) - ); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php deleted file mode 100644 index becd1cff..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php +++ /dev/null @@ -1,33 +0,0 @@ - $propertyValue) { - $copy->{$propertyName} = $propertyValue; - } - - return $copy; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php deleted file mode 100644 index 6bd2f7e5..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php +++ /dev/null @@ -1,42 +0,0 @@ -= 80200 && $element->include_end_date) { - $options |= DatePeriod::INCLUDE_END_DATE; - } - if (!$element->include_start_date) { - $options |= DatePeriod::EXCLUDE_START_DATE; - } - - if ($element->getEndDate()) { - return new DatePeriod($element->getStartDate(), $element->getDateInterval(), $element->getEndDate(), $options); - } - - if (PHP_VERSION_ID >= 70217) { - $recurrences = $element->getRecurrences(); - } else { - $recurrences = $element->recurrences - $element->include_start_date; - } - - return new DatePeriod($element->getStartDate(), $element->getDateInterval(), $recurrences, $options); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php deleted file mode 100644 index 164f8b8e..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php +++ /dev/null @@ -1,30 +0,0 @@ -callback = $callable; - } - - /** - * {@inheritdoc} - */ - public function apply($element) - { - return call_user_func($this->callback, $element); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php deleted file mode 100644 index a5fbd7a2..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php +++ /dev/null @@ -1,17 +0,0 @@ -copier = $copier; - } - - /** - * {@inheritdoc} - */ - public function apply($arrayObject) - { - $clone = clone $arrayObject; - foreach ($arrayObject->getArrayCopy() as $k => $v) { - $clone->offsetSet($k, $this->copier->copy($v)); - } - - return $clone; - } -} - diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php deleted file mode 100644 index c5644cff..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php +++ /dev/null @@ -1,10 +0,0 @@ -copier = $copier; - } - - /** - * {@inheritdoc} - */ - public function apply($element) - { - $newElement = clone $element; - - $copy = $this->createCopyClosure(); - - return $copy($newElement); - } - - private function createCopyClosure() - { - $copier = $this->copier; - - $copy = function (SplDoublyLinkedList $list) use ($copier) { - // Replace each element in the list with a deep copy of itself - for ($i = 1; $i <= $list->count(); $i++) { - $copy = $copier->recursiveCopy($list->shift()); - - $list->push($copy); - } - - return $list; - }; - - return Closure::bind($copy, null, DeepCopy::class); - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php deleted file mode 100644 index 5785a7da..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php +++ /dev/null @@ -1,13 +0,0 @@ -type = $type; - } - - /** - * @param mixed $element - * - * @return boolean - */ - public function matches($element) - { - return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type; - } -} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php deleted file mode 100644 index 55dcc926..00000000 --- a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php +++ /dev/null @@ -1,20 +0,0 @@ -copy($value); - } -} diff --git a/vendor/nikic/fast-route/.gitignore b/vendor/nikic/fast-route/.gitignore new file mode 100644 index 00000000..e378a07d --- /dev/null +++ b/vendor/nikic/fast-route/.gitignore @@ -0,0 +1,5 @@ +/vendor/ +.idea/ + +# ignore lock file since we have no extra dependencies +composer.lock diff --git a/vendor/nikic/fast-route/.hhconfig b/vendor/nikic/fast-route/.hhconfig new file mode 100644 index 00000000..0c2153ce --- /dev/null +++ b/vendor/nikic/fast-route/.hhconfig @@ -0,0 +1 @@ +assume_php=false diff --git a/vendor/nikic/fast-route/.travis.yml b/vendor/nikic/fast-route/.travis.yml new file mode 100644 index 00000000..10f83819 --- /dev/null +++ b/vendor/nikic/fast-route/.travis.yml @@ -0,0 +1,20 @@ +sudo: false +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - hhvm + +script: + - ./vendor/bin/phpunit + +before_install: + - travis_retry composer self-update + +install: + - composer install diff --git a/vendor/nikic/fast-route/FastRoute.hhi b/vendor/nikic/fast-route/FastRoute.hhi new file mode 100644 index 00000000..8d507384 --- /dev/null +++ b/vendor/nikic/fast-route/FastRoute.hhi @@ -0,0 +1,126 @@ +; + } + + class RouteCollector { + public function __construct(RouteParser $routeParser, DataGenerator $dataGenerator); + public function addRoute(mixed $httpMethod, string $route, mixed $handler): void; + public function getData(): array; + } + + class Route { + public function __construct(string $httpMethod, mixed $handler, string $regex, array $variables); + public function matches(string $str): bool; + } + + interface DataGenerator { + public function addRoute(string $httpMethod, array $routeData, mixed $handler); + public function getData(): array; + } + + interface Dispatcher { + const int NOT_FOUND = 0; + const int FOUND = 1; + const int METHOD_NOT_ALLOWED = 2; + public function dispatch(string $httpMethod, string $uri): array; + } + + function simpleDispatcher( + (function(RouteCollector): void) $routeDefinitionCallback, + shape( + ?'routeParser' => classname, + ?'dataGenerator' => classname, + ?'dispatcher' => classname, + ?'routeCollector' => classname, + ) $options = shape()): Dispatcher; + + function cachedDispatcher( + (function(RouteCollector): void) $routeDefinitionCallback, + shape( + ?'routeParser' => classname, + ?'dataGenerator' => classname, + ?'dispatcher' => classname, + ?'routeCollector' => classname, + ?'cacheDisabled' => bool, + ?'cacheFile' => string, + ) $options = shape()): Dispatcher; +} + +namespace FastRoute\DataGenerator { + abstract class RegexBasedAbstract implements \FastRoute\DataGenerator { + protected abstract function getApproxChunkSize(); + protected abstract function processChunk($regexToRoutesMap); + + public function addRoute(string $httpMethod, array $routeData, mixed $handler): void; + public function getData(): array; + } + + class CharCountBased extends RegexBasedAbstract { + protected function getApproxChunkSize(): int; + protected function processChunk(array $regexToRoutesMap): array; + } + + class GroupCountBased extends RegexBasedAbstract { + protected function getApproxChunkSize(): int; + protected function processChunk(array $regexToRoutesMap): array; + } + + class GroupPosBased extends RegexBasedAbstract { + protected function getApproxChunkSize(): int; + protected function processChunk(array $regexToRoutesMap): array; + } + + class MarkBased extends RegexBasedAbstract { + protected function getApproxChunkSize(): int; + protected function processChunk(array $regexToRoutesMap): array; + } +} + +namespace FastRoute\Dispatcher { + abstract class RegexBasedAbstract implements \FastRoute\Dispatcher { + protected abstract function dispatchVariableRoute(array $routeData, string $uri): array; + + public function dispatch(string $httpMethod, string $uri): array; + } + + class GroupPosBased extends RegexBasedAbstract { + public function __construct(array $data); + protected function dispatchVariableRoute(array $routeData, string $uri): array; + } + + class GroupCountBased extends RegexBasedAbstract { + public function __construct(array $data); + protected function dispatchVariableRoute(array $routeData, string $uri): array; + } + + class CharCountBased extends RegexBasedAbstract { + public function __construct(array $data); + protected function dispatchVariableRoute(array $routeData, string $uri): array; + } + + class MarkBased extends RegexBasedAbstract { + public function __construct(array $data); + protected function dispatchVariableRoute(array $routeData, string $uri): array; + } +} + +namespace FastRoute\RouteParser { + class Std implements \FastRoute\RouteParser { + const string VARIABLE_REGEX = <<<'REGEX' +\{ + \s* ([a-zA-Z][a-zA-Z0-9_]*) \s* + (?: + : \s* ([^{}]*(?:\{(?-1)\}[^{}]*)*) + )? +\} +REGEX; + const string DEFAULT_DISPATCH_REGEX = '[^/]+'; + public function parse(string $route): array; + } +} diff --git a/vendor/nikic/fast-route/LICENSE b/vendor/nikic/fast-route/LICENSE new file mode 100644 index 00000000..478e7641 --- /dev/null +++ b/vendor/nikic/fast-route/LICENSE @@ -0,0 +1,31 @@ +Copyright (c) 2013 by Nikita Popov. + +Some rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/nikic/fast-route/README.md b/vendor/nikic/fast-route/README.md new file mode 100644 index 00000000..91bd4664 --- /dev/null +++ b/vendor/nikic/fast-route/README.md @@ -0,0 +1,313 @@ +FastRoute - Fast request router for PHP +======================================= + +This library provides a fast implementation of a regular expression based router. [Blog post explaining how the +implementation works and why it is fast.][blog_post] + +Install +------- + +To install with composer: + +```sh +composer require nikic/fast-route +``` + +Requires PHP 5.4 or newer. + +Usage +----- + +Here's a basic usage example: + +```php +addRoute('GET', '/users', 'get_all_users_handler'); + // {id} must be a number (\d+) + $r->addRoute('GET', '/user/{id:\d+}', 'get_user_handler'); + // The /{title} suffix is optional + $r->addRoute('GET', '/articles/{id:\d+}[/{title}]', 'get_article_handler'); +}); + +// Fetch method and URI from somewhere +$httpMethod = $_SERVER['REQUEST_METHOD']; +$uri = $_SERVER['REQUEST_URI']; + +// Strip query string (?foo=bar) and decode URI +if (false !== $pos = strpos($uri, '?')) { + $uri = substr($uri, 0, $pos); +} +$uri = rawurldecode($uri); + +$routeInfo = $dispatcher->dispatch($httpMethod, $uri); +switch ($routeInfo[0]) { + case FastRoute\Dispatcher::NOT_FOUND: + // ... 404 Not Found + break; + case FastRoute\Dispatcher::METHOD_NOT_ALLOWED: + $allowedMethods = $routeInfo[1]; + // ... 405 Method Not Allowed + break; + case FastRoute\Dispatcher::FOUND: + $handler = $routeInfo[1]; + $vars = $routeInfo[2]; + // ... call $handler with $vars + break; +} +``` + +### Defining routes + +The routes are defined by calling the `FastRoute\simpleDispatcher()` function, which accepts +a callable taking a `FastRoute\RouteCollector` instance. The routes are added by calling +`addRoute()` on the collector instance: + +```php +$r->addRoute($method, $routePattern, $handler); +``` + +The `$method` is an uppercase HTTP method string for which a certain route should match. It +is possible to specify multiple valid methods using an array: + +```php +// These two calls +$r->addRoute('GET', '/test', 'handler'); +$r->addRoute('POST', '/test', 'handler'); +// Are equivalent to this one call +$r->addRoute(['GET', 'POST'], '/test', 'handler'); +``` + +By default the `$routePattern` uses a syntax where `{foo}` specifies a placeholder with name `foo` +and matching the regex `[^/]+`. To adjust the pattern the placeholder matches, you can specify +a custom pattern by writing `{bar:[0-9]+}`. Some examples: + +```php +// Matches /user/42, but not /user/xyz +$r->addRoute('GET', '/user/{id:\d+}', 'handler'); + +// Matches /user/foobar, but not /user/foo/bar +$r->addRoute('GET', '/user/{name}', 'handler'); + +// Matches /user/foo/bar as well +$r->addRoute('GET', '/user/{name:.+}', 'handler'); +``` + +Custom patterns for route placeholders cannot use capturing groups. For example `{lang:(en|de)}` +is not a valid placeholder, because `()` is a capturing group. Instead you can use either +`{lang:en|de}` or `{lang:(?:en|de)}`. + +Furthermore parts of the route enclosed in `[...]` are considered optional, so that `/foo[bar]` +will match both `/foo` and `/foobar`. Optional parts are only supported in a trailing position, +not in the middle of a route. + +```php +// This route +$r->addRoute('GET', '/user/{id:\d+}[/{name}]', 'handler'); +// Is equivalent to these two routes +$r->addRoute('GET', '/user/{id:\d+}', 'handler'); +$r->addRoute('GET', '/user/{id:\d+}/{name}', 'handler'); + +// Multiple nested optional parts are possible as well +$r->addRoute('GET', '/user[/{id:\d+}[/{name}]]', 'handler'); + +// This route is NOT valid, because optional parts can only occur at the end +$r->addRoute('GET', '/user[/{id:\d+}]/{name}', 'handler'); +``` + +The `$handler` parameter does not necessarily have to be a callback, it could also be a controller +class name or any other kind of data you wish to associate with the route. FastRoute only tells you +which handler corresponds to your URI, how you interpret it is up to you. + +#### Shorcut methods for common request methods + +For the `GET`, `POST`, `PUT`, `PATCH`, `DELETE` and `HEAD` request methods shortcut methods are available. For example: + +```php +$r->get('/get-route', 'get_handler'); +$r->post('/post-route', 'post_handler'); +``` + +Is equivalent to: + +```php +$r->addRoute('GET', '/get-route', 'get_handler'); +$r->addRoute('POST', '/post-route', 'post_handler'); +``` + +#### Route Groups + +Additionally, you can specify routes inside of a group. All routes defined inside a group will have a common prefix. + +For example, defining your routes as: + +```php +$r->addGroup('/admin', function (RouteCollector $r) { + $r->addRoute('GET', '/do-something', 'handler'); + $r->addRoute('GET', '/do-another-thing', 'handler'); + $r->addRoute('GET', '/do-something-else', 'handler'); +}); +``` + +Will have the same result as: + + ```php +$r->addRoute('GET', '/admin/do-something', 'handler'); +$r->addRoute('GET', '/admin/do-another-thing', 'handler'); +$r->addRoute('GET', '/admin/do-something-else', 'handler'); + ``` + +Nested groups are also supported, in which case the prefixes of all the nested groups are combined. + +### Caching + +The reason `simpleDispatcher` accepts a callback for defining the routes is to allow seamless +caching. By using `cachedDispatcher` instead of `simpleDispatcher` you can cache the generated +routing data and construct the dispatcher from the cached information: + +```php +addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); + $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler1'); + $r->addRoute('GET', '/user/{name}', 'handler2'); +}, [ + 'cacheFile' => __DIR__ . '/route.cache', /* required */ + 'cacheDisabled' => IS_DEBUG_ENABLED, /* optional, enabled by default */ +]); +``` + +The second parameter to the function is an options array, which can be used to specify the cache +file location, among other things. + +### Dispatching a URI + +A URI is dispatched by calling the `dispatch()` method of the created dispatcher. This method +accepts the HTTP method and a URI. Getting those two bits of information (and normalizing them +appropriately) is your job - this library is not bound to the PHP web SAPIs. + +The `dispatch()` method returns an array whose first element contains a status code. It is one +of `Dispatcher::NOT_FOUND`, `Dispatcher::METHOD_NOT_ALLOWED` and `Dispatcher::FOUND`. For the +method not allowed status the second array element contains a list of HTTP methods allowed for +the supplied URI. For example: + + [FastRoute\Dispatcher::METHOD_NOT_ALLOWED, ['GET', 'POST']] + +> **NOTE:** The HTTP specification requires that a `405 Method Not Allowed` response include the +`Allow:` header to detail available methods for the requested resource. Applications using FastRoute +should use the second array element to add this header when relaying a 405 response. + +For the found status the second array element is the handler that was associated with the route +and the third array element is a dictionary of placeholder names to their values. For example: + + /* Routing against GET /user/nikic/42 */ + + [FastRoute\Dispatcher::FOUND, 'handler0', ['name' => 'nikic', 'id' => '42']] + +### Overriding the route parser and dispatcher + +The routing process makes use of three components: A route parser, a data generator and a +dispatcher. The three components adhere to the following interfaces: + +```php + 'FastRoute\\RouteParser\\Std', + 'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased', + 'dispatcher' => 'FastRoute\\Dispatcher\\GroupCountBased', +]); +``` + +The above options array corresponds to the defaults. By replacing `GroupCountBased` by +`GroupPosBased` you could switch to a different dispatching strategy. + +### A Note on HEAD Requests + +The HTTP spec requires servers to [support both GET and HEAD methods][2616-511]: + +> The methods GET and HEAD MUST be supported by all general-purpose servers + +To avoid forcing users to manually register HEAD routes for each resource we fallback to matching an +available GET route for a given resource. The PHP web SAPI transparently removes the entity body +from HEAD responses so this behavior has no effect on the vast majority of users. + +However, implementers using FastRoute outside the web SAPI environment (e.g. a custom server) MUST +NOT send entity bodies generated in response to HEAD requests. If you are a non-SAPI user this is +*your responsibility*; FastRoute has no purview to prevent you from breaking HTTP in such cases. + +Finally, note that applications MAY always specify their own HEAD method route for a given +resource to bypass this behavior entirely. + +### Credits + +This library is based on a router that [Levi Morrison][levi] implemented for the Aerys server. + +A large number of tests, as well as HTTP compliance considerations, were provided by [Daniel Lowrey][rdlowrey]. + + +[2616-511]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1 "RFC 2616 Section 5.1.1" +[blog_post]: http://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html +[levi]: https://github.com/morrisonlevi +[rdlowrey]: https://github.com/rdlowrey diff --git a/vendor/nikic/fast-route/composer.json b/vendor/nikic/fast-route/composer.json new file mode 100644 index 00000000..fb446a2a --- /dev/null +++ b/vendor/nikic/fast-route/composer.json @@ -0,0 +1,24 @@ +{ + "name": "nikic/fast-route", + "description": "Fast request router for PHP", + "keywords": ["routing", "router"], + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": ["src/functions.php"] + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|~5.7" + } +} diff --git a/vendor/nikic/fast-route/phpunit.xml b/vendor/nikic/fast-route/phpunit.xml new file mode 100644 index 00000000..3c807b6a --- /dev/null +++ b/vendor/nikic/fast-route/phpunit.xml @@ -0,0 +1,24 @@ + + + + + + ./test/ + + + + + + ./src/ + + + diff --git a/vendor/nikic/fast-route/psalm.xml b/vendor/nikic/fast-route/psalm.xml new file mode 100644 index 00000000..0dca5d7e --- /dev/null +++ b/vendor/nikic/fast-route/psalm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/nikic/fast-route/src/BadRouteException.php b/vendor/nikic/fast-route/src/BadRouteException.php new file mode 100644 index 00000000..62262ec6 --- /dev/null +++ b/vendor/nikic/fast-route/src/BadRouteException.php @@ -0,0 +1,7 @@ + $route) { + $suffixLen++; + $suffix .= "\t"; + + $regexes[] = '(?:' . $regex . '/(\t{' . $suffixLen . '})\t{' . ($count - $suffixLen) . '})'; + $routeMap[$suffix] = [$route->handler, $route->variables]; + } + + $regex = '~^(?|' . implode('|', $regexes) . ')$~'; + return ['regex' => $regex, 'suffix' => '/' . $suffix, 'routeMap' => $routeMap]; + } +} diff --git a/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php b/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php new file mode 100644 index 00000000..54d9a05e --- /dev/null +++ b/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php @@ -0,0 +1,30 @@ + $route) { + $numVariables = count($route->variables); + $numGroups = max($numGroups, $numVariables); + + $regexes[] = $regex . str_repeat('()', $numGroups - $numVariables); + $routeMap[$numGroups + 1] = [$route->handler, $route->variables]; + + ++$numGroups; + } + + $regex = '~^(?|' . implode('|', $regexes) . ')$~'; + return ['regex' => $regex, 'routeMap' => $routeMap]; + } +} diff --git a/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php b/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php new file mode 100644 index 00000000..fc4dc0af --- /dev/null +++ b/vendor/nikic/fast-route/src/DataGenerator/GroupPosBased.php @@ -0,0 +1,27 @@ + $route) { + $regexes[] = $regex; + $routeMap[$offset] = [$route->handler, $route->variables]; + + $offset += count($route->variables); + } + + $regex = '~^(?:' . implode('|', $regexes) . ')$~'; + return ['regex' => $regex, 'routeMap' => $routeMap]; + } +} diff --git a/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php b/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php new file mode 100644 index 00000000..0aebed9a --- /dev/null +++ b/vendor/nikic/fast-route/src/DataGenerator/MarkBased.php @@ -0,0 +1,27 @@ + $route) { + $regexes[] = $regex . '(*MARK:' . $markName . ')'; + $routeMap[$markName] = [$route->handler, $route->variables]; + + ++$markName; + } + + $regex = '~^(?|' . implode('|', $regexes) . ')$~'; + return ['regex' => $regex, 'routeMap' => $routeMap]; + } +} diff --git a/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php b/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php new file mode 100644 index 00000000..64572905 --- /dev/null +++ b/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php @@ -0,0 +1,186 @@ +isStaticRoute($routeData)) { + $this->addStaticRoute($httpMethod, $routeData, $handler); + } else { + $this->addVariableRoute($httpMethod, $routeData, $handler); + } + } + + /** + * @return mixed[] + */ + public function getData() + { + if (empty($this->methodToRegexToRoutesMap)) { + return [$this->staticRoutes, []]; + } + + return [$this->staticRoutes, $this->generateVariableRouteData()]; + } + + /** + * @return mixed[] + */ + private function generateVariableRouteData() + { + $data = []; + foreach ($this->methodToRegexToRoutesMap as $method => $regexToRoutesMap) { + $chunkSize = $this->computeChunkSize(count($regexToRoutesMap)); + $chunks = array_chunk($regexToRoutesMap, $chunkSize, true); + $data[$method] = array_map([$this, 'processChunk'], $chunks); + } + return $data; + } + + /** + * @param int + * @return int + */ + private function computeChunkSize($count) + { + $numParts = max(1, round($count / $this->getApproxChunkSize())); + return (int) ceil($count / $numParts); + } + + /** + * @param mixed[] + * @return bool + */ + private function isStaticRoute($routeData) + { + return count($routeData) === 1 && is_string($routeData[0]); + } + + private function addStaticRoute($httpMethod, $routeData, $handler) + { + $routeStr = $routeData[0]; + + if (isset($this->staticRoutes[$httpMethod][$routeStr])) { + throw new BadRouteException(sprintf( + 'Cannot register two routes matching "%s" for method "%s"', + $routeStr, $httpMethod + )); + } + + if (isset($this->methodToRegexToRoutesMap[$httpMethod])) { + foreach ($this->methodToRegexToRoutesMap[$httpMethod] as $route) { + if ($route->matches($routeStr)) { + throw new BadRouteException(sprintf( + 'Static route "%s" is shadowed by previously defined variable route "%s" for method "%s"', + $routeStr, $route->regex, $httpMethod + )); + } + } + } + + $this->staticRoutes[$httpMethod][$routeStr] = $handler; + } + + private function addVariableRoute($httpMethod, $routeData, $handler) + { + list($regex, $variables) = $this->buildRegexForRoute($routeData); + + if (isset($this->methodToRegexToRoutesMap[$httpMethod][$regex])) { + throw new BadRouteException(sprintf( + 'Cannot register two routes matching "%s" for method "%s"', + $regex, $httpMethod + )); + } + + $this->methodToRegexToRoutesMap[$httpMethod][$regex] = new Route( + $httpMethod, $handler, $regex, $variables + ); + } + + /** + * @param mixed[] + * @return mixed[] + */ + private function buildRegexForRoute($routeData) + { + $regex = ''; + $variables = []; + foreach ($routeData as $part) { + if (is_string($part)) { + $regex .= preg_quote($part, '~'); + continue; + } + + list($varName, $regexPart) = $part; + + if (isset($variables[$varName])) { + throw new BadRouteException(sprintf( + 'Cannot use the same placeholder "%s" twice', $varName + )); + } + + if ($this->regexHasCapturingGroups($regexPart)) { + throw new BadRouteException(sprintf( + 'Regex "%s" for parameter "%s" contains a capturing group', + $regexPart, $varName + )); + } + + $variables[$varName] = $varName; + $regex .= '(' . $regexPart . ')'; + } + + return [$regex, $variables]; + } + + /** + * @param string + * @return bool + */ + private function regexHasCapturingGroups($regex) + { + if (false === strpos($regex, '(')) { + // Needs to have at least a ( to contain a capturing group + return false; + } + + // Semi-accurate detection for capturing groups + return (bool) preg_match( + '~ + (?: + \(\?\( + | \[ [^\]\\\\]* (?: \\\\ . [^\]\\\\]* )* \] + | \\\\ . + ) (*SKIP)(*FAIL) | + \( + (?! + \? (?! <(?![!=]) | P< | \' ) + | \* + ) + ~x', + $regex + ); + } +} diff --git a/vendor/nikic/fast-route/src/Dispatcher.php b/vendor/nikic/fast-route/src/Dispatcher.php new file mode 100644 index 00000000..4ae72a35 --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher.php @@ -0,0 +1,26 @@ + 'value', ...]] + * + * @param string $httpMethod + * @param string $uri + * + * @return array + */ + public function dispatch($httpMethod, $uri); +} diff --git a/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php b/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php new file mode 100644 index 00000000..ef1eec13 --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher/CharCountBased.php @@ -0,0 +1,31 @@ +staticRouteMap, $this->variableRouteData) = $data; + } + + protected function dispatchVariableRoute($routeData, $uri) + { + foreach ($routeData as $data) { + if (!preg_match($data['regex'], $uri . $data['suffix'], $matches)) { + continue; + } + + list($handler, $varNames) = $data['routeMap'][end($matches)]; + + $vars = []; + $i = 0; + foreach ($varNames as $varName) { + $vars[$varName] = $matches[++$i]; + } + return [self::FOUND, $handler, $vars]; + } + + return [self::NOT_FOUND]; + } +} diff --git a/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php b/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php new file mode 100644 index 00000000..493e7a94 --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher/GroupCountBased.php @@ -0,0 +1,31 @@ +staticRouteMap, $this->variableRouteData) = $data; + } + + protected function dispatchVariableRoute($routeData, $uri) + { + foreach ($routeData as $data) { + if (!preg_match($data['regex'], $uri, $matches)) { + continue; + } + + list($handler, $varNames) = $data['routeMap'][count($matches)]; + + $vars = []; + $i = 0; + foreach ($varNames as $varName) { + $vars[$varName] = $matches[++$i]; + } + return [self::FOUND, $handler, $vars]; + } + + return [self::NOT_FOUND]; + } +} diff --git a/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php b/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php new file mode 100644 index 00000000..498220ed --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher/GroupPosBased.php @@ -0,0 +1,33 @@ +staticRouteMap, $this->variableRouteData) = $data; + } + + protected function dispatchVariableRoute($routeData, $uri) + { + foreach ($routeData as $data) { + if (!preg_match($data['regex'], $uri, $matches)) { + continue; + } + + // find first non-empty match + for ($i = 1; '' === $matches[$i]; ++$i); + + list($handler, $varNames) = $data['routeMap'][$i]; + + $vars = []; + foreach ($varNames as $varName) { + $vars[$varName] = $matches[$i++]; + } + return [self::FOUND, $handler, $vars]; + } + + return [self::NOT_FOUND]; + } +} diff --git a/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php b/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php new file mode 100644 index 00000000..22eb09ba --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher/MarkBased.php @@ -0,0 +1,31 @@ +staticRouteMap, $this->variableRouteData) = $data; + } + + protected function dispatchVariableRoute($routeData, $uri) + { + foreach ($routeData as $data) { + if (!preg_match($data['regex'], $uri, $matches)) { + continue; + } + + list($handler, $varNames) = $data['routeMap'][$matches['MARK']]; + + $vars = []; + $i = 0; + foreach ($varNames as $varName) { + $vars[$varName] = $matches[++$i]; + } + return [self::FOUND, $handler, $vars]; + } + + return [self::NOT_FOUND]; + } +} diff --git a/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php b/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php new file mode 100644 index 00000000..206e879f --- /dev/null +++ b/vendor/nikic/fast-route/src/Dispatcher/RegexBasedAbstract.php @@ -0,0 +1,88 @@ +staticRouteMap[$httpMethod][$uri])) { + $handler = $this->staticRouteMap[$httpMethod][$uri]; + return [self::FOUND, $handler, []]; + } + + $varRouteData = $this->variableRouteData; + if (isset($varRouteData[$httpMethod])) { + $result = $this->dispatchVariableRoute($varRouteData[$httpMethod], $uri); + if ($result[0] === self::FOUND) { + return $result; + } + } + + // For HEAD requests, attempt fallback to GET + if ($httpMethod === 'HEAD') { + if (isset($this->staticRouteMap['GET'][$uri])) { + $handler = $this->staticRouteMap['GET'][$uri]; + return [self::FOUND, $handler, []]; + } + if (isset($varRouteData['GET'])) { + $result = $this->dispatchVariableRoute($varRouteData['GET'], $uri); + if ($result[0] === self::FOUND) { + return $result; + } + } + } + + // If nothing else matches, try fallback routes + if (isset($this->staticRouteMap['*'][$uri])) { + $handler = $this->staticRouteMap['*'][$uri]; + return [self::FOUND, $handler, []]; + } + if (isset($varRouteData['*'])) { + $result = $this->dispatchVariableRoute($varRouteData['*'], $uri); + if ($result[0] === self::FOUND) { + return $result; + } + } + + // Find allowed methods for this URI by matching against all other HTTP methods as well + $allowedMethods = []; + + foreach ($this->staticRouteMap as $method => $uriMap) { + if ($method !== $httpMethod && isset($uriMap[$uri])) { + $allowedMethods[] = $method; + } + } + + foreach ($varRouteData as $method => $routeData) { + if ($method === $httpMethod) { + continue; + } + + $result = $this->dispatchVariableRoute($routeData, $uri); + if ($result[0] === self::FOUND) { + $allowedMethods[] = $method; + } + } + + // If there are no allowed methods the route simply does not exist + if ($allowedMethods) { + return [self::METHOD_NOT_ALLOWED, $allowedMethods]; + } + + return [self::NOT_FOUND]; + } +} diff --git a/vendor/nikic/fast-route/src/Route.php b/vendor/nikic/fast-route/src/Route.php new file mode 100644 index 00000000..e1bf7dd9 --- /dev/null +++ b/vendor/nikic/fast-route/src/Route.php @@ -0,0 +1,47 @@ +httpMethod = $httpMethod; + $this->handler = $handler; + $this->regex = $regex; + $this->variables = $variables; + } + + /** + * Tests whether this route matches the given string. + * + * @param string $str + * + * @return bool + */ + public function matches($str) + { + $regex = '~^' . $this->regex . '$~'; + return (bool) preg_match($regex, $str); + } +} diff --git a/vendor/nikic/fast-route/src/RouteCollector.php b/vendor/nikic/fast-route/src/RouteCollector.php new file mode 100644 index 00000000..c1c1762d --- /dev/null +++ b/vendor/nikic/fast-route/src/RouteCollector.php @@ -0,0 +1,152 @@ +routeParser = $routeParser; + $this->dataGenerator = $dataGenerator; + $this->currentGroupPrefix = ''; + } + + /** + * Adds a route to the collection. + * + * The syntax used in the $route string depends on the used route parser. + * + * @param string|string[] $httpMethod + * @param string $route + * @param mixed $handler + */ + public function addRoute($httpMethod, $route, $handler) + { + $route = $this->currentGroupPrefix . $route; + $routeDatas = $this->routeParser->parse($route); + foreach ((array) $httpMethod as $method) { + foreach ($routeDatas as $routeData) { + $this->dataGenerator->addRoute($method, $routeData, $handler); + } + } + } + + /** + * Create a route group with a common prefix. + * + * All routes created in the passed callback will have the given group prefix prepended. + * + * @param string $prefix + * @param callable $callback + */ + public function addGroup($prefix, callable $callback) + { + $previousGroupPrefix = $this->currentGroupPrefix; + $this->currentGroupPrefix = $previousGroupPrefix . $prefix; + $callback($this); + $this->currentGroupPrefix = $previousGroupPrefix; + } + + /** + * Adds a GET route to the collection + * + * This is simply an alias of $this->addRoute('GET', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function get($route, $handler) + { + $this->addRoute('GET', $route, $handler); + } + + /** + * Adds a POST route to the collection + * + * This is simply an alias of $this->addRoute('POST', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function post($route, $handler) + { + $this->addRoute('POST', $route, $handler); + } + + /** + * Adds a PUT route to the collection + * + * This is simply an alias of $this->addRoute('PUT', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function put($route, $handler) + { + $this->addRoute('PUT', $route, $handler); + } + + /** + * Adds a DELETE route to the collection + * + * This is simply an alias of $this->addRoute('DELETE', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function delete($route, $handler) + { + $this->addRoute('DELETE', $route, $handler); + } + + /** + * Adds a PATCH route to the collection + * + * This is simply an alias of $this->addRoute('PATCH', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function patch($route, $handler) + { + $this->addRoute('PATCH', $route, $handler); + } + + /** + * Adds a HEAD route to the collection + * + * This is simply an alias of $this->addRoute('HEAD', $route, $handler) + * + * @param string $route + * @param mixed $handler + */ + public function head($route, $handler) + { + $this->addRoute('HEAD', $route, $handler); + } + + /** + * Returns the collected route data, as provided by the data generator. + * + * @return array + */ + public function getData() + { + return $this->dataGenerator->getData(); + } +} diff --git a/vendor/nikic/fast-route/src/RouteParser.php b/vendor/nikic/fast-route/src/RouteParser.php new file mode 100644 index 00000000..6a7685cf --- /dev/null +++ b/vendor/nikic/fast-route/src/RouteParser.php @@ -0,0 +1,37 @@ + $segment) { + if ($segment === '' && $n !== 0) { + throw new BadRouteException('Empty optional part'); + } + + $currentRoute .= $segment; + $routeDatas[] = $this->parsePlaceholders($currentRoute); + } + return $routeDatas; + } + + /** + * Parses a route string that does not contain optional segments. + * + * @param string + * @return mixed[] + */ + private function parsePlaceholders($route) + { + if (!preg_match_all( + '~' . self::VARIABLE_REGEX . '~x', $route, $matches, + PREG_OFFSET_CAPTURE | PREG_SET_ORDER + )) { + return [$route]; + } + + $offset = 0; + $routeData = []; + foreach ($matches as $set) { + if ($set[0][1] > $offset) { + $routeData[] = substr($route, $offset, $set[0][1] - $offset); + } + $routeData[] = [ + $set[1][0], + isset($set[2]) ? trim($set[2][0]) : self::DEFAULT_DISPATCH_REGEX + ]; + $offset = $set[0][1] + strlen($set[0][0]); + } + + if ($offset !== strlen($route)) { + $routeData[] = substr($route, $offset); + } + + return $routeData; + } +} diff --git a/vendor/nikic/fast-route/src/bootstrap.php b/vendor/nikic/fast-route/src/bootstrap.php new file mode 100644 index 00000000..0bce3a42 --- /dev/null +++ b/vendor/nikic/fast-route/src/bootstrap.php @@ -0,0 +1,12 @@ + 'FastRoute\\RouteParser\\Std', + 'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased', + 'dispatcher' => 'FastRoute\\Dispatcher\\GroupCountBased', + 'routeCollector' => 'FastRoute\\RouteCollector', + ]; + + /** @var RouteCollector $routeCollector */ + $routeCollector = new $options['routeCollector']( + new $options['routeParser'], new $options['dataGenerator'] + ); + $routeDefinitionCallback($routeCollector); + + return new $options['dispatcher']($routeCollector->getData()); + } + + /** + * @param callable $routeDefinitionCallback + * @param array $options + * + * @return Dispatcher + */ + function cachedDispatcher(callable $routeDefinitionCallback, array $options = []) + { + $options += [ + 'routeParser' => 'FastRoute\\RouteParser\\Std', + 'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased', + 'dispatcher' => 'FastRoute\\Dispatcher\\GroupCountBased', + 'routeCollector' => 'FastRoute\\RouteCollector', + 'cacheDisabled' => false, + ]; + + if (!isset($options['cacheFile'])) { + throw new \LogicException('Must specify "cacheFile" option'); + } + + if (!$options['cacheDisabled'] && file_exists($options['cacheFile'])) { + $dispatchData = require $options['cacheFile']; + if (!is_array($dispatchData)) { + throw new \RuntimeException('Invalid cache file "' . $options['cacheFile'] . '"'); + } + return new $options['dispatcher']($dispatchData); + } + + $routeCollector = new $options['routeCollector']( + new $options['routeParser'], new $options['dataGenerator'] + ); + $routeDefinitionCallback($routeCollector); + + /** @var RouteCollector $routeCollector */ + $dispatchData = $routeCollector->getData(); + if (!$options['cacheDisabled']) { + file_put_contents( + $options['cacheFile'], + ' $this->getDataGeneratorClass(), + 'dispatcher' => $this->getDispatcherClass() + ]; + } + + /** + * @dataProvider provideFoundDispatchCases + */ + public function testFoundDispatches($method, $uri, $callback, $handler, $argDict) + { + $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); + $info = $dispatcher->dispatch($method, $uri); + $this->assertSame($dispatcher::FOUND, $info[0]); + $this->assertSame($handler, $info[1]); + $this->assertSame($argDict, $info[2]); + } + + /** + * @dataProvider provideNotFoundDispatchCases + */ + public function testNotFoundDispatches($method, $uri, $callback) + { + $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); + $routeInfo = $dispatcher->dispatch($method, $uri); + $this->assertArrayNotHasKey(1, $routeInfo, + 'NOT_FOUND result must only contain a single element in the returned info array' + ); + $this->assertSame($dispatcher::NOT_FOUND, $routeInfo[0]); + } + + /** + * @dataProvider provideMethodNotAllowedDispatchCases + */ + public function testMethodNotAllowedDispatches($method, $uri, $callback, $availableMethods) + { + $dispatcher = \FastRoute\simpleDispatcher($callback, $this->generateDispatcherOptions()); + $routeInfo = $dispatcher->dispatch($method, $uri); + $this->assertArrayHasKey(1, $routeInfo, + 'METHOD_NOT_ALLOWED result must return an array of allowed methods at index 1' + ); + + list($routedStatus, $methodArray) = $dispatcher->dispatch($method, $uri); + $this->assertSame($dispatcher::METHOD_NOT_ALLOWED, $routedStatus); + $this->assertSame($availableMethods, $methodArray); + } + + /** + * @expectedException \FastRoute\BadRouteException + * @expectedExceptionMessage Cannot use the same placeholder "test" twice + */ + public function testDuplicateVariableNameError() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { + $r->addRoute('GET', '/foo/{test}/{test:\d+}', 'handler0'); + }, $this->generateDispatcherOptions()); + } + + /** + * @expectedException \FastRoute\BadRouteException + * @expectedExceptionMessage Cannot register two routes matching "/user/([^/]+)" for method "GET" + */ + public function testDuplicateVariableRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { + $r->addRoute('GET', '/user/{id}', 'handler0'); // oops, forgot \d+ restriction ;) + $r->addRoute('GET', '/user/{name}', 'handler1'); + }, $this->generateDispatcherOptions()); + } + + /** + * @expectedException \FastRoute\BadRouteException + * @expectedExceptionMessage Cannot register two routes matching "/user" for method "GET" + */ + public function testDuplicateStaticRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { + $r->addRoute('GET', '/user', 'handler0'); + $r->addRoute('GET', '/user', 'handler1'); + }, $this->generateDispatcherOptions()); + } + + /** + * @expectedException \FastRoute\BadRouteException + * @expectedExceptionMessage Static route "/user/nikic" is shadowed by previously defined variable route "/user/([^/]+)" for method "GET" + */ + public function testShadowedStaticRoute() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}', 'handler0'); + $r->addRoute('GET', '/user/nikic', 'handler1'); + }, $this->generateDispatcherOptions()); + } + + /** + * @expectedException \FastRoute\BadRouteException + * @expectedExceptionMessage Regex "(en|de)" for parameter "lang" contains a capturing group + */ + public function testCapturing() + { + \FastRoute\simpleDispatcher(function (RouteCollector $r) { + $r->addRoute('GET', '/{lang:(en|de)}', 'handler0'); + }, $this->generateDispatcherOptions()); + } + + public function provideFoundDispatchCases() + { + $cases = []; + + // 0 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/resource/123/456', 'handler0'); + }; + + $method = 'GET'; + $uri = '/resource/123/456'; + $handler = 'handler0'; + $argDict = []; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 1 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/handler0', 'handler0'); + $r->addRoute('GET', '/handler1', 'handler1'); + $r->addRoute('GET', '/handler2', 'handler2'); + }; + + $method = 'GET'; + $uri = '/handler2'; + $handler = 'handler2'; + $argDict = []; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 2 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); + $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler1'); + $r->addRoute('GET', '/user/{name}', 'handler2'); + }; + + $method = 'GET'; + $uri = '/user/rdlowrey'; + $handler = 'handler2'; + $argDict = ['name' => 'rdlowrey']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 3 --------------------------------------------------------------------------------------> + + // reuse $callback from #2 + + $method = 'GET'; + $uri = '/user/12345'; + $handler = 'handler1'; + $argDict = ['id' => '12345']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 4 --------------------------------------------------------------------------------------> + + // reuse $callback from #3 + + $method = 'GET'; + $uri = '/user/NaN'; + $handler = 'handler2'; + $argDict = ['name' => 'NaN']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 5 --------------------------------------------------------------------------------------> + + // reuse $callback from #4 + + $method = 'GET'; + $uri = '/user/rdlowrey/12345'; + $handler = 'handler0'; + $argDict = ['name' => 'rdlowrey', 'id' => '12345']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 6 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler0'); + $r->addRoute('GET', '/user/12345/extension', 'handler1'); + $r->addRoute('GET', '/user/{id:[0-9]+}.{extension}', 'handler2'); + }; + + $method = 'GET'; + $uri = '/user/12345.svg'; + $handler = 'handler2'; + $argDict = ['id' => '12345', 'extension' => 'svg']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 7 ----- Test GET method fallback on HEAD route miss ------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}', 'handler0'); + $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler1'); + $r->addRoute('GET', '/static0', 'handler2'); + $r->addRoute('GET', '/static1', 'handler3'); + $r->addRoute('HEAD', '/static1', 'handler4'); + }; + + $method = 'HEAD'; + $uri = '/user/rdlowrey'; + $handler = 'handler0'; + $argDict = ['name' => 'rdlowrey']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 8 ----- Test GET method fallback on HEAD route miss ------------------------------------> + + // reuse $callback from #7 + + $method = 'HEAD'; + $uri = '/user/rdlowrey/1234'; + $handler = 'handler1'; + $argDict = ['name' => 'rdlowrey', 'id' => '1234']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 9 ----- Test GET method fallback on HEAD route miss ------------------------------------> + + // reuse $callback from #8 + + $method = 'HEAD'; + $uri = '/static0'; + $handler = 'handler2'; + $argDict = []; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 10 ---- Test existing HEAD route used if available (no fallback) -----------------------> + + // reuse $callback from #9 + + $method = 'HEAD'; + $uri = '/static1'; + $handler = 'handler4'; + $argDict = []; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 11 ---- More specified routes are not shadowed by less specific of another method ------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}', 'handler0'); + $r->addRoute('POST', '/user/{name:[a-z]+}', 'handler1'); + }; + + $method = 'POST'; + $uri = '/user/rdlowrey'; + $handler = 'handler1'; + $argDict = ['name' => 'rdlowrey']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 12 ---- Handler of more specific routes is used, if it occurs first --------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}', 'handler0'); + $r->addRoute('POST', '/user/{name:[a-z]+}', 'handler1'); + $r->addRoute('POST', '/user/{name}', 'handler2'); + }; + + $method = 'POST'; + $uri = '/user/rdlowrey'; + $handler = 'handler1'; + $argDict = ['name' => 'rdlowrey']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 13 ---- Route with constant suffix -----------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}', 'handler0'); + $r->addRoute('GET', '/user/{name}/edit', 'handler1'); + }; + + $method = 'GET'; + $uri = '/user/rdlowrey/edit'; + $handler = 'handler1'; + $argDict = ['name' => 'rdlowrey']; + + $cases[] = [$method, $uri, $callback, $handler, $argDict]; + + // 14 ---- Handle multiple methods with the same handler ----------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute(['GET', 'POST'], '/user', 'handlerGetPost'); + $r->addRoute(['DELETE'], '/user', 'handlerDelete'); + $r->addRoute([], '/user', 'handlerNone'); + }; + + $argDict = []; + $cases[] = ['GET', '/user', $callback, 'handlerGetPost', $argDict]; + $cases[] = ['POST', '/user', $callback, 'handlerGetPost', $argDict]; + $cases[] = ['DELETE', '/user', $callback, 'handlerDelete', $argDict]; + + // 17 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('POST', '/user.json', 'handler0'); + $r->addRoute('GET', '/{entity}.json', 'handler1'); + }; + + $cases[] = ['GET', '/user.json', $callback, 'handler1', ['entity' => 'user']]; + + // 18 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '', 'handler0'); + }; + + $cases[] = ['GET', '', $callback, 'handler0', []]; + + // 19 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('HEAD', '/a/{foo}', 'handler0'); + $r->addRoute('GET', '/b/{foo}', 'handler1'); + }; + + $cases[] = ['HEAD', '/b/bar', $callback, 'handler1', ['foo' => 'bar']]; + + // 20 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('HEAD', '/a', 'handler0'); + $r->addRoute('GET', '/b', 'handler1'); + }; + + $cases[] = ['HEAD', '/b', $callback, 'handler1', []]; + + // 21 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/foo', 'handler0'); + $r->addRoute('HEAD', '/{bar}', 'handler1'); + }; + + $cases[] = ['HEAD', '/foo', $callback, 'handler1', ['bar' => 'foo']]; + + // 22 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('*', '/user', 'handler0'); + $r->addRoute('*', '/{user}', 'handler1'); + $r->addRoute('GET', '/user', 'handler2'); + }; + + $cases[] = ['GET', '/user', $callback, 'handler2', []]; + + // 23 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('*', '/user', 'handler0'); + $r->addRoute('GET', '/user', 'handler1'); + }; + + $cases[] = ['POST', '/user', $callback, 'handler0', []]; + + // 24 ---- + + $cases[] = ['HEAD', '/user', $callback, 'handler1', []]; + + // 25 ---- + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/{bar}', 'handler0'); + $r->addRoute('*', '/foo', 'handler1'); + }; + + $cases[] = ['GET', '/foo', $callback, 'handler0', ['bar' => 'foo']]; + + // 26 ---- + + $callback = function(RouteCollector $r) { + $r->addRoute('GET', '/user', 'handler0'); + $r->addRoute('*', '/{foo:.*}', 'handler1'); + }; + + $cases[] = ['POST', '/bar', $callback, 'handler1', ['foo' => 'bar']]; + + // x --------------------------------------------------------------------------------------> + + return $cases; + } + + public function provideNotFoundDispatchCases() + { + $cases = []; + + // 0 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/resource/123/456', 'handler0'); + }; + + $method = 'GET'; + $uri = '/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 1 --------------------------------------------------------------------------------------> + + // reuse callback from #0 + $method = 'POST'; + $uri = '/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 2 --------------------------------------------------------------------------------------> + + // reuse callback from #1 + $method = 'PUT'; + $uri = '/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 3 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/handler0', 'handler0'); + $r->addRoute('GET', '/handler1', 'handler1'); + $r->addRoute('GET', '/handler2', 'handler2'); + }; + + $method = 'GET'; + $uri = '/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 4 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); + $r->addRoute('GET', '/user/{id:[0-9]+}', 'handler1'); + $r->addRoute('GET', '/user/{name}', 'handler2'); + }; + + $method = 'GET'; + $uri = '/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 5 --------------------------------------------------------------------------------------> + + // reuse callback from #4 + $method = 'GET'; + $uri = '/user/rdlowrey/12345/not-found'; + + $cases[] = [$method, $uri, $callback]; + + // 6 --------------------------------------------------------------------------------------> + + // reuse callback from #5 + $method = 'HEAD'; + + $cases[] = [$method, $uri, $callback]; + + // x --------------------------------------------------------------------------------------> + + return $cases; + } + + public function provideMethodNotAllowedDispatchCases() + { + $cases = []; + + // 0 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/resource/123/456', 'handler0'); + }; + + $method = 'POST'; + $uri = '/resource/123/456'; + $allowedMethods = ['GET']; + + $cases[] = [$method, $uri, $callback, $allowedMethods]; + + // 1 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/resource/123/456', 'handler0'); + $r->addRoute('POST', '/resource/123/456', 'handler1'); + $r->addRoute('PUT', '/resource/123/456', 'handler2'); + $r->addRoute('*', '/', 'handler3'); + }; + + $method = 'DELETE'; + $uri = '/resource/123/456'; + $allowedMethods = ['GET', 'POST', 'PUT']; + + $cases[] = [$method, $uri, $callback, $allowedMethods]; + + // 2 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('GET', '/user/{name}/{id:[0-9]+}', 'handler0'); + $r->addRoute('POST', '/user/{name}/{id:[0-9]+}', 'handler1'); + $r->addRoute('PUT', '/user/{name}/{id:[0-9]+}', 'handler2'); + $r->addRoute('PATCH', '/user/{name}/{id:[0-9]+}', 'handler3'); + }; + + $method = 'DELETE'; + $uri = '/user/rdlowrey/42'; + $allowedMethods = ['GET', 'POST', 'PUT', 'PATCH']; + + $cases[] = [$method, $uri, $callback, $allowedMethods]; + + // 3 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute('POST', '/user/{name}', 'handler1'); + $r->addRoute('PUT', '/user/{name:[a-z]+}', 'handler2'); + $r->addRoute('PATCH', '/user/{name:[a-z]+}', 'handler3'); + }; + + $method = 'GET'; + $uri = '/user/rdlowrey'; + $allowedMethods = ['POST', 'PUT', 'PATCH']; + + $cases[] = [$method, $uri, $callback, $allowedMethods]; + + // 4 --------------------------------------------------------------------------------------> + + $callback = function (RouteCollector $r) { + $r->addRoute(['GET', 'POST'], '/user', 'handlerGetPost'); + $r->addRoute(['DELETE'], '/user', 'handlerDelete'); + $r->addRoute([], '/user', 'handlerNone'); + }; + + $cases[] = ['PUT', '/user', $callback, ['GET', 'POST', 'DELETE']]; + + // 5 + + $callback = function (RouteCollector $r) { + $r->addRoute('POST', '/user.json', 'handler0'); + $r->addRoute('GET', '/{entity}.json', 'handler1'); + }; + + $cases[] = ['PUT', '/user.json', $callback, ['POST', 'GET']]; + + // x --------------------------------------------------------------------------------------> + + return $cases; + } +} diff --git a/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php b/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php new file mode 100644 index 00000000..f821ef56 --- /dev/null +++ b/vendor/nikic/fast-route/test/Dispatcher/GroupCountBasedTest.php @@ -0,0 +1,16 @@ +markTestSkipped('PHP 5.6 required for MARK support'); + } + } + + protected function getDispatcherClass() + { + return 'FastRoute\\Dispatcher\\MarkBased'; + } + + protected function getDataGeneratorClass() + { + return 'FastRoute\\DataGenerator\\MarkBased'; + } +} diff --git a/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php b/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php new file mode 100644 index 00000000..b6fc53f7 --- /dev/null +++ b/vendor/nikic/fast-route/test/HackTypechecker/HackTypecheckerTest.php @@ -0,0 +1,44 @@ +markTestSkipped('HHVM only'); + } + if (!version_compare(HHVM_VERSION, '3.9.0', '>=')) { + $this->markTestSkipped('classname requires HHVM 3.9+'); + } + + // The typechecker recurses the whole tree, so it makes sure + // that everything in fixtures/ is valid when this runs. + + $output = []; + $exit_code = null; + exec( + 'hh_server --check ' . escapeshellarg(__DIR__ . '/../../') . ' 2>&1', + $output, + $exit_code + ); + if ($exit_code === self::SERVER_ALREADY_RUNNING_CODE) { + $this->assertTrue( + $recurse, + 'Typechecker still running after running hh_client stop' + ); + // Server already running - 3.10 => 3.11 regression: + // https://github.com/facebook/hhvm/issues/6646 + exec('hh_client stop 2>/dev/null'); + $this->testTypechecks(/* recurse = */ false); + return; + + } + $this->assertSame(0, $exit_code, implode("\n", $output)); + } +} diff --git a/vendor/nikic/fast-route/test/HackTypechecker/fixtures/all_options.php b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/all_options.php new file mode 100644 index 00000000..05a9af23 --- /dev/null +++ b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/all_options.php @@ -0,0 +1,29 @@ + {}, + shape( + 'routeParser' => \FastRoute\RouteParser\Std::class, + 'dataGenerator' => \FastRoute\DataGenerator\GroupCountBased::class, + 'dispatcher' => \FastRoute\Dispatcher\GroupCountBased::class, + 'routeCollector' => \FastRoute\RouteCollector::class, + ), + ); +} + +function all_options_cached(): \FastRoute\Dispatcher { + return \FastRoute\cachedDispatcher( + $collector ==> {}, + shape( + 'routeParser' => \FastRoute\RouteParser\Std::class, + 'dataGenerator' => \FastRoute\DataGenerator\GroupCountBased::class, + 'dispatcher' => \FastRoute\Dispatcher\GroupCountBased::class, + 'routeCollector' => \FastRoute\RouteCollector::class, + 'cacheFile' => '/dev/null', + 'cacheDisabled' => false, + ), + ); +} diff --git a/vendor/nikic/fast-route/test/HackTypechecker/fixtures/empty_options.php b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/empty_options.php new file mode 100644 index 00000000..61eb5419 --- /dev/null +++ b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/empty_options.php @@ -0,0 +1,11 @@ + {}, shape()); +} + +function empty_options_cached(): \FastRoute\Dispatcher { + return \FastRoute\cachedDispatcher($collector ==> {}, shape()); +} diff --git a/vendor/nikic/fast-route/test/HackTypechecker/fixtures/no_options.php b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/no_options.php new file mode 100644 index 00000000..44b5422f --- /dev/null +++ b/vendor/nikic/fast-route/test/HackTypechecker/fixtures/no_options.php @@ -0,0 +1,11 @@ + {}); +} + +function no_options_cached(): \FastRoute\Dispatcher { + return \FastRoute\cachedDispatcher($collector ==> {}); +} diff --git a/vendor/nikic/fast-route/test/RouteCollectorTest.php b/vendor/nikic/fast-route/test/RouteCollectorTest.php new file mode 100644 index 00000000..cc54407d --- /dev/null +++ b/vendor/nikic/fast-route/test/RouteCollectorTest.php @@ -0,0 +1,108 @@ +delete('/delete', 'delete'); + $r->get('/get', 'get'); + $r->head('/head', 'head'); + $r->patch('/patch', 'patch'); + $r->post('/post', 'post'); + $r->put('/put', 'put'); + + $expected = [ + ['DELETE', '/delete', 'delete'], + ['GET', '/get', 'get'], + ['HEAD', '/head', 'head'], + ['PATCH', '/patch', 'patch'], + ['POST', '/post', 'post'], + ['PUT', '/put', 'put'], + ]; + + $this->assertSame($expected, $r->routes); + } + + public function testGroups() + { + $r = new DummyRouteCollector(); + + $r->delete('/delete', 'delete'); + $r->get('/get', 'get'); + $r->head('/head', 'head'); + $r->patch('/patch', 'patch'); + $r->post('/post', 'post'); + $r->put('/put', 'put'); + + $r->addGroup('/group-one', function (DummyRouteCollector $r) { + $r->delete('/delete', 'delete'); + $r->get('/get', 'get'); + $r->head('/head', 'head'); + $r->patch('/patch', 'patch'); + $r->post('/post', 'post'); + $r->put('/put', 'put'); + + $r->addGroup('/group-two', function (DummyRouteCollector $r) { + $r->delete('/delete', 'delete'); + $r->get('/get', 'get'); + $r->head('/head', 'head'); + $r->patch('/patch', 'patch'); + $r->post('/post', 'post'); + $r->put('/put', 'put'); + }); + }); + + $r->addGroup('/admin', function (DummyRouteCollector $r) { + $r->get('-some-info', 'admin-some-info'); + }); + $r->addGroup('/admin-', function (DummyRouteCollector $r) { + $r->get('more-info', 'admin-more-info'); + }); + + $expected = [ + ['DELETE', '/delete', 'delete'], + ['GET', '/get', 'get'], + ['HEAD', '/head', 'head'], + ['PATCH', '/patch', 'patch'], + ['POST', '/post', 'post'], + ['PUT', '/put', 'put'], + ['DELETE', '/group-one/delete', 'delete'], + ['GET', '/group-one/get', 'get'], + ['HEAD', '/group-one/head', 'head'], + ['PATCH', '/group-one/patch', 'patch'], + ['POST', '/group-one/post', 'post'], + ['PUT', '/group-one/put', 'put'], + ['DELETE', '/group-one/group-two/delete', 'delete'], + ['GET', '/group-one/group-two/get', 'get'], + ['HEAD', '/group-one/group-two/head', 'head'], + ['PATCH', '/group-one/group-two/patch', 'patch'], + ['POST', '/group-one/group-two/post', 'post'], + ['PUT', '/group-one/group-two/put', 'put'], + ['GET', '/admin-some-info', 'admin-some-info'], + ['GET', '/admin-more-info', 'admin-more-info'], + ]; + + $this->assertSame($expected, $r->routes); + } +} + +class DummyRouteCollector extends RouteCollector +{ + public $routes = []; + + public function __construct() + { + } + + public function addRoute($method, $route, $handler) + { + $route = $this->currentGroupPrefix . $route; + $this->routes[] = [$method, $route, $handler]; + } +} diff --git a/vendor/nikic/fast-route/test/RouteParser/StdTest.php b/vendor/nikic/fast-route/test/RouteParser/StdTest.php new file mode 100644 index 00000000..e13e4de6 --- /dev/null +++ b/vendor/nikic/fast-route/test/RouteParser/StdTest.php @@ -0,0 +1,154 @@ +parse($routeString); + $this->assertSame($expectedRouteDatas, $routeDatas); + } + + /** @dataProvider provideTestParseError */ + public function testParseError($routeString, $expectedExceptionMessage) + { + $parser = new Std(); + $this->setExpectedException('FastRoute\\BadRouteException', $expectedExceptionMessage); + $parser->parse($routeString); + } + + public function provideTestParse() + { + return [ + [ + '/test', + [ + ['/test'], + ] + ], + [ + '/test/{param}', + [ + ['/test/', ['param', '[^/]+']], + ] + ], + [ + '/te{ param }st', + [ + ['/te', ['param', '[^/]+'], 'st'] + ] + ], + [ + '/test/{param1}/test2/{param2}', + [ + ['/test/', ['param1', '[^/]+'], '/test2/', ['param2', '[^/]+']] + ] + ], + [ + '/test/{param:\d+}', + [ + ['/test/', ['param', '\d+']] + ] + ], + [ + '/test/{ param : \d{1,9} }', + [ + ['/test/', ['param', '\d{1,9}']] + ] + ], + [ + '/test[opt]', + [ + ['/test'], + ['/testopt'], + ] + ], + [ + '/test[/{param}]', + [ + ['/test'], + ['/test/', ['param', '[^/]+']], + ] + ], + [ + '/{param}[opt]', + [ + ['/', ['param', '[^/]+']], + ['/', ['param', '[^/]+'], 'opt'] + ] + ], + [ + '/test[/{name}[/{id:[0-9]+}]]', + [ + ['/test'], + ['/test/', ['name', '[^/]+']], + ['/test/', ['name', '[^/]+'], '/', ['id', '[0-9]+']], + ] + ], + [ + '', + [ + [''], + ] + ], + [ + '[test]', + [ + [''], + ['test'], + ] + ], + [ + '/{foo-bar}', + [ + ['/', ['foo-bar', '[^/]+']] + ] + ], + [ + '/{_foo:.*}', + [ + ['/', ['_foo', '.*']] + ] + ], + ]; + } + + public function provideTestParseError() + { + return [ + [ + '/test[opt', + "Number of opening '[' and closing ']' does not match" + ], + [ + '/test[opt[opt2]', + "Number of opening '[' and closing ']' does not match" + ], + [ + '/testopt]', + "Number of opening '[' and closing ']' does not match" + ], + [ + '/test[]', + 'Empty optional part' + ], + [ + '/test[[opt]]', + 'Empty optional part' + ], + [ + '[[test]]', + 'Empty optional part' + ], + [ + '/test[/opt]/required', + 'Optional segments can only occur at the end of a route' + ], + ]; + } +} diff --git a/vendor/nikic/fast-route/test/bootstrap.php b/vendor/nikic/fast-route/test/bootstrap.php new file mode 100644 index 00000000..3023f41e --- /dev/null +++ b/vendor/nikic/fast-route/test/bootstrap.php @@ -0,0 +1,11 @@ += 7.4; for parsing PHP 7.0 to PHP 8.4, with limited support for parsing PHP 5.x). - -[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). - -Features --------- - -The main features provided by this library are: - - * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). - * Invalid code can be parsed into a partial AST. - * The AST contains accurate location information. - * Dumping the AST in human-readable form. - * Converting an AST back to PHP code. - * Formatting can be preserved for partially changed ASTs. - * Infrastructure to traverse and modify ASTs. - * Resolution of namespaced names. - * Evaluation of constant expressions. - * Builders to simplify AST construction for code generation. - * Converting an AST into JSON and back. - -Quick Start ------------ - -Install the library using [composer](https://getcomposer.org): - - php composer.phar require nikic/php-parser - -Parse some PHP code into an AST and dump the result in human-readable form: - -```php -createForNewestSupportedVersion(); -try { - $ast = $parser->parse($code); -} catch (Error $error) { - echo "Parse error: {$error->getMessage()}\n"; - return; -} - -$dumper = new NodeDumper; -echo $dumper->dump($ast) . "\n"; -``` - -This dumps an AST looking something like this: - -``` -array( - 0: Stmt_Function( - attrGroups: array( - ) - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - attrGroups: array( - ) - flags: 0 - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - 0: Stmt_Expression( - expr: Expr_FuncCall( - name: Name( - name: var_dump - ) - args: array( - 0: Arg( - name: null - value: Expr_Variable( - name: foo - ) - byRef: false - unpack: false - ) - ) - ) - ) - ) - ) -) -``` - -Let's traverse the AST and perform some kind of modification. For example, drop all function bodies: - -```php -use PhpParser\Node; -use PhpParser\Node\Stmt\Function_; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitorAbstract; - -$traverser = new NodeTraverser(); -$traverser->addVisitor(new class extends NodeVisitorAbstract { - public function enterNode(Node $node) { - if ($node instanceof Function_) { - // Clean out the function body - $node->stmts = []; - } - } -}); - -$ast = $traverser->traverse($ast); -echo $dumper->dump($ast) . "\n"; -``` - -This gives us an AST where the `Function_::$stmts` are empty: - -``` -array( - 0: Stmt_Function( - attrGroups: array( - ) - byRef: false - name: Identifier( - name: test - ) - params: array( - 0: Param( - attrGroups: array( - ) - type: null - byRef: false - variadic: false - var: Expr_Variable( - name: foo - ) - default: null - ) - ) - returnType: null - stmts: array( - ) - ) -) -``` - -Finally, we can convert the new AST back to PHP code: - -```php -use PhpParser\PrettyPrinter; - -$prettyPrinter = new PrettyPrinter\Standard; -echo $prettyPrinter->prettyPrintFile($ast); -``` - -This gives us our original code, minus the `var_dump()` call inside the function: - -```php -createForVersion($attributes['version']); -$dumper = new PhpParser\NodeDumper([ - 'dumpComments' => true, - 'dumpPositions' => $attributes['with-positions'], -]); -$prettyPrinter = new PhpParser\PrettyPrinter\Standard; - -$traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); - -foreach ($files as $file) { - if ($file === '-') { - $code = file_get_contents('php://stdin'); - fwrite(STDERR, "====> Stdin:\n"); - } else if (strpos($file, ' Code $code\n"); - } else { - if (!file_exists($file)) { - fwrite(STDERR, "File $file does not exist.\n"); - exit(1); - } - - $code = file_get_contents($file); - fwrite(STDERR, "====> File $file:\n"); - } - - if ($attributes['with-recovery']) { - $errorHandler = new PhpParser\ErrorHandler\Collecting; - $stmts = $parser->parse($code, $errorHandler); - foreach ($errorHandler->getErrors() as $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - } - if (null === $stmts) { - continue; - } - } else { - try { - $stmts = $parser->parse($code); - } catch (PhpParser\Error $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - fwrite(STDERR, $message . "\n"); - exit(1); - } - } - - foreach ($operations as $operation) { - if ('dump' === $operation) { - fwrite(STDERR, "==> Node dump:\n"); - echo $dumper->dump($stmts, $code), "\n"; - } elseif ('pretty-print' === $operation) { - fwrite(STDERR, "==> Pretty print:\n"); - echo $prettyPrinter->prettyPrintFile($stmts), "\n"; - } elseif ('json-dump' === $operation) { - fwrite(STDERR, "==> JSON dump:\n"); - echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; - } elseif ('var-dump' === $operation) { - fwrite(STDERR, "==> var_dump():\n"); - var_dump($stmts); - } elseif ('resolve-names' === $operation) { - fwrite(STDERR, "==> Resolved names.\n"); - $stmts = $traverser->traverse($stmts); - } - } -} - -function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { - if ($withColumnInfo && $e->hasColumnInfo()) { - return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); - } -} - -function showHelp($error = '') { - if ($error) { - fwrite(STDERR, $error . "\n\n"); - } - fwrite($error ? STDERR : STDOUT, <<<'OUTPUT' -Usage: php-parse [operations] file1.php [file2.php ...] - or: php-parse [operations] " false, - 'with-positions' => false, - 'with-recovery' => false, - 'version' => PhpParser\PhpVersion::getNewestSupported(), - ]; - - array_shift($args); - $parseOptions = true; - foreach ($args as $arg) { - if (!$parseOptions) { - $files[] = $arg; - continue; - } - - switch ($arg) { - case '--dump': - case '-d': - $operations[] = 'dump'; - break; - case '--pretty-print': - case '-p': - $operations[] = 'pretty-print'; - break; - case '--json-dump': - case '-j': - $operations[] = 'json-dump'; - break; - case '--var-dump': - $operations[] = 'var-dump'; - break; - case '--resolve-names': - case '-N'; - $operations[] = 'resolve-names'; - break; - case '--with-column-info': - case '-c'; - $attributes['with-column-info'] = true; - break; - case '--with-positions': - case '-P': - $attributes['with-positions'] = true; - break; - case '--with-recovery': - case '-r': - $attributes['with-recovery'] = true; - break; - case '--help': - case '-h'; - showHelp(); - break; - case '--': - $parseOptions = false; - break; - default: - if (preg_match('/^--version=(.*)$/', $arg, $matches)) { - $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); - } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { - showHelp("Invalid operation $arg."); - } else { - $files[] = $arg; - } - } - } - - return [$operations, $files, $attributes]; -} diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json deleted file mode 100644 index 7a8591d4..00000000 --- a/vendor/nikic/php-parser/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "nikic/php-parser", - "type": "library", - "description": "A PHP parser written in PHP", - "keywords": [ - "php", - "parser" - ], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Nikita Popov" - } - ], - "require": { - "php": ">=7.4", - "ext-tokenizer": "*", - "ext-json": "*", - "ext-ctype": "*" - }, - "require-dev": { - "phpunit/phpunit": "^9.0", - "ircmaxell/php-yacc": "^0.0.7" - }, - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "autoload-dev": { - "psr-4": { - "PhpParser\\": "test/PhpParser/" - } - }, - "bin": [ - "bin/php-parse" - ] -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php deleted file mode 100644 index d6aa124c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder.php +++ /dev/null @@ -1,12 +0,0 @@ - */ - protected array $attributes = []; - /** @var list */ - protected array $constants = []; - - /** @var list */ - protected array $attributeGroups = []; - /** @var Identifier|Node\Name|Node\ComplexType|null */ - protected ?Node $type = null; - - /** - * Creates a class constant builder - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value - */ - public function __construct($name, $value) { - $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; - } - - /** - * Add another constant to const group - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value - * - * @return $this The builder instance (for fluid interface) - */ - public function addConst($name, $value) { - $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value)); - - return $this; - } - - /** - * Makes the constant public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the constant protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the constant private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the constant final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Sets the constant type. - * - * @param string|Node\Name|Identifier|Node\ComplexType $type - * - * @return $this - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\ClassConst The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\ClassConst( - $this->constants, - $this->flags, - $this->attributes, - $this->attributeGroups, - $this->type - ); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php deleted file mode 100644 index 6f394315..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ /dev/null @@ -1,151 +0,0 @@ - */ - protected array $implements = []; - protected int $flags = 0; - /** @var list */ - protected array $uses = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $properties = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a class builder. - * - * @param string $name Name of the class - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Extends a class. - * - * @param Name|string $class Name of class to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend($class) { - $this->extends = BuilderHelpers::normalizeName($class); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Makes the class abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); - - return $this; - } - - /** - * Makes the class final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Makes the class readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\Property) { - $this->properties[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Class_ The built class node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Class_($this->name, [ - 'flags' => $this->flags, - 'extends' => $this->extends, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php deleted file mode 100644 index 488b7213..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ /dev/null @@ -1,50 +0,0 @@ - */ - protected array $attributes = []; - - /** - * Adds a statement. - * - * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - abstract public function addStmt($stmt); - - /** - * Adds multiple statements. - * - * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmts(array $stmts) { - foreach ($stmts as $stmt) { - $this->addStmt($stmt); - } - - return $this; - } - - /** - * Sets doc comment for the declaration. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes['comments'] = [ - BuilderHelpers::normalizeDocComment($docComment) - ]; - - return $this; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php deleted file mode 100644 index c766321b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ /dev/null @@ -1,86 +0,0 @@ - */ - protected array $attributes = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an enum case builder. - * - * @param string|Identifier $name Name - */ - public function __construct($name) { - $this->name = $name; - } - - /** - * Sets the value. - * - * @param Node\Expr|string|int $value - * - * @return $this - */ - public function setValue($value) { - $this->value = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the constant. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built enum case node. - * - * @return Stmt\EnumCase The built constant node - */ - public function getNode(): PhpParser\Node { - return new Stmt\EnumCase( - $this->name, - $this->value, - $this->attributeGroups, - $this->attributes - ); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php deleted file mode 100644 index c00df03f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ /dev/null @@ -1,116 +0,0 @@ - */ - protected array $implements = []; - /** @var list */ - protected array $uses = []; - /** @var list */ - protected array $enumCases = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an enum builder. - * - * @param string $name Name of the enum - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Sets the scalar type. - * - * @param string|Identifier $scalarType - * - * @return $this - */ - public function setScalarType($scalarType) { - $this->scalarType = BuilderHelpers::normalizeType($scalarType); - - return $this; - } - - /** - * Implements one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to implement - * - * @return $this The builder instance (for fluid interface) - */ - public function implement(...$interfaces) { - foreach ($interfaces as $interface) { - $this->implements[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\EnumCase) { - $this->enumCases[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Enum_ The built enum node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Enum_($this->name, [ - 'scalarType' => $this->scalarType, - 'implements' => $this->implements, - 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php deleted file mode 100644 index ff79cb6b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ /dev/null @@ -1,73 +0,0 @@ -returnByRef = true; - - return $this; - } - - /** - * Adds a parameter. - * - * @param Node\Param|Param $param The parameter to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParam($param) { - $param = BuilderHelpers::normalizeNode($param); - - if (!$param instanceof Node\Param) { - throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); - } - - $this->params[] = $param; - - return $this; - } - - /** - * Adds multiple parameters. - * - * @param (Node\Param|Param)[] $params The parameters to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addParams(array $params) { - foreach ($params as $param) { - $this->addParam($param); - } - - return $this; - } - - /** - * Sets the return type for PHP 7. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type - * - * @return $this The builder instance (for fluid interface) - */ - public function setReturnType($type) { - $this->returnType = BuilderHelpers::normalizeType($type); - - return $this; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php deleted file mode 100644 index 48f5f693..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ /dev/null @@ -1,67 +0,0 @@ - */ - protected array $stmts = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a function builder. - * - * @param string $name Name of the function - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built function node. - * - * @return Stmt\Function_ The built function node - */ - public function getNode(): Node { - return new Stmt\Function_($this->name, [ - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php deleted file mode 100644 index 13dd3f7f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ /dev/null @@ -1,94 +0,0 @@ - */ - protected array $extends = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Extends one or more interfaces. - * - * @param Name|string ...$interfaces Names of interfaces to extend - * - * @return $this The builder instance (for fluid interface) - */ - public function extend(...$interfaces) { - foreach ($interfaces as $interface) { - $this->extends[] = BuilderHelpers::normalizeName($interface); - } - - return $this; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - // we erase all statements in the body of an interface method - $stmt->stmts = null; - $this->methods[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built interface node. - * - * @return Stmt\Interface_ The built interface node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Interface_($this->name, [ - 'extends' => $this->extends, - 'stmts' => array_merge($this->constants, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php deleted file mode 100644 index 8358dbe3..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ /dev/null @@ -1,147 +0,0 @@ -|null */ - protected ?array $stmts = []; - - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates a method builder. - * - * @param string $name Name of the method - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Makes the method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the method static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - - return $this; - } - - /** - * Makes the method abstract. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - if (!empty($this->stmts)) { - throw new \LogicException('Cannot make method with statements abstract'); - } - - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); - $this->stmts = null; // abstract methods don't have statements - - return $this; - } - - /** - * Makes the method final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - if (null === $this->stmts) { - throw new \LogicException('Cannot add statements to an abstract method'); - } - - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built method node. - * - * @return Stmt\ClassMethod The built method node - */ - public function getNode(): Node { - return new Stmt\ClassMethod($this->name, [ - 'flags' => $this->flags, - 'byRef' => $this->returnByRef, - 'params' => $this->params, - 'returnType' => $this->returnType, - 'stmts' => $this->stmts, - 'attrGroups' => $this->attributeGroups, - ], $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php deleted file mode 100644 index 80fe6f84..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ /dev/null @@ -1,45 +0,0 @@ -name = null !== $name ? BuilderHelpers::normalizeName($name) : null; - } - - /** - * Adds a statement. - * - * @param Node|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); - - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Namespace_ The built node - */ - public function getNode(): Node { - return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php deleted file mode 100644 index 324a32b0..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ /dev/null @@ -1,171 +0,0 @@ - */ - protected array $attributeGroups = []; - - /** - * Creates a parameter builder. - * - * @param string $name Name of the parameter - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Sets default value for the parameter. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - if ($this->type == 'void') { - throw new \LogicException('Parameter type cannot be void'); - } - - return $this; - } - - /** - * Make the parameter accept the value by reference. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeByRef() { - $this->byRef = true; - - return $this; - } - - /** - * Make the parameter variadic - * - * @return $this The builder instance (for fluid interface) - */ - public function makeVariadic() { - $this->variadic = true; - - return $this; - } - - /** - * Makes the (promoted) parameter public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the (promoted) parameter protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the (promoted) parameter private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the (promoted) parameter readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Gives the promoted property private(set) visibility. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivateSet() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); - - return $this; - } - - /** - * Gives the promoted property protected(set) visibility. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtectedSet() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built parameter node. - * - * @return Node\Param The built parameter node - */ - public function getNode(): Node { - return new Node\Param( - new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups - ); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php deleted file mode 100644 index c80fe481..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ /dev/null @@ -1,223 +0,0 @@ - */ - protected array $attributes = []; - /** @var null|Identifier|Name|ComplexType */ - protected ?Node $type = null; - /** @var list */ - protected array $attributeGroups = []; - /** @var list */ - protected array $hooks = []; - - /** - * Creates a property builder. - * - * @param string $name Name of the property - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Makes the property public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); - - return $this; - } - - /** - * Makes the property protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); - - return $this; - } - - /** - * Makes the property private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); - - return $this; - } - - /** - * Makes the property static. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); - - return $this; - } - - /** - * Makes the property readonly. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); - - return $this; - } - - /** - * Makes the property abstract. Requires at least one property hook to be specified as well. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeAbstract() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); - - return $this; - } - - /** - * Makes the property final. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); - - return $this; - } - - /** - * Gives the property private(set) visibility. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivateSet() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); - - return $this; - } - - /** - * Gives the property protected(set) visibility. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtectedSet() { - $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); - - return $this; - } - - /** - * Sets default value for the property. - * - * @param mixed $value Default value to use - * - * @return $this The builder instance (for fluid interface) - */ - public function setDefault($value) { - $this->default = BuilderHelpers::normalizeValue($value); - - return $this; - } - - /** - * Sets doc comment for the property. - * - * @param PhpParser\Comment\Doc|string $docComment Doc comment to set - * - * @return $this The builder instance (for fluid interface) - */ - public function setDocComment($docComment) { - $this->attributes = [ - 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] - ]; - - return $this; - } - - /** - * Sets the property type for PHP 7.4+. - * - * @param string|Name|Identifier|ComplexType $type - * - * @return $this - */ - public function setType($type) { - $this->type = BuilderHelpers::normalizeType($type); - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Adds a property hook. - * - * @return $this The builder instance (for fluid interface) - */ - public function addHook(Node\PropertyHook $hook) { - $this->hooks[] = $hook; - - return $this; - } - - /** - * Returns the built class node. - * - * @return Stmt\Property The built property node - */ - public function getNode(): PhpParser\Node { - if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) { - throw new PhpParser\Error('Only hooked properties may be declared abstract'); - } - - return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, - [ - new Node\PropertyItem($this->name, $this->default) - ], - $this->attributes, - $this->type, - $this->attributeGroups, - $this->hooks - ); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php deleted file mode 100644 index cf21c821..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ /dev/null @@ -1,65 +0,0 @@ -and($trait); - } - } - - /** - * Adds used trait. - * - * @param Node\Name|string $trait Trait name - * - * @return $this The builder instance (for fluid interface) - */ - public function and($trait) { - $this->traits[] = BuilderHelpers::normalizeName($trait); - return $this; - } - - /** - * Adds trait adaptation. - * - * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation - * - * @return $this The builder instance (for fluid interface) - */ - public function with($adaptation) { - $adaptation = BuilderHelpers::normalizeNode($adaptation); - - if (!$adaptation instanceof Stmt\TraitUseAdaptation) { - throw new \LogicException('Adaptation must have type TraitUseAdaptation'); - } - - $this->adaptations[] = $adaptation; - return $this; - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode(): Node { - return new Stmt\TraitUse($this->traits, $this->adaptations); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php deleted file mode 100644 index fee09583..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ /dev/null @@ -1,145 +0,0 @@ -type = self::TYPE_UNDEFINED; - - $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); - $this->method = BuilderHelpers::normalizeIdentifier($method); - } - - /** - * Sets alias of method. - * - * @param Node\Identifier|string $alias Alias for adapted method - * - * @return $this The builder instance (for fluid interface) - */ - public function as($alias) { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set alias for not alias adaptation buider'); - } - - $this->alias = BuilderHelpers::normalizeIdentifier($alias); - return $this; - } - - /** - * Sets adapted method public. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePublic() { - $this->setModifier(Modifiers::PUBLIC); - return $this; - } - - /** - * Sets adapted method protected. - * - * @return $this The builder instance (for fluid interface) - */ - public function makeProtected() { - $this->setModifier(Modifiers::PROTECTED); - return $this; - } - - /** - * Sets adapted method private. - * - * @return $this The builder instance (for fluid interface) - */ - public function makePrivate() { - $this->setModifier(Modifiers::PRIVATE); - return $this; - } - - /** - * Adds overwritten traits. - * - * @param Node\Name|string ...$traits Traits for overwrite - * - * @return $this The builder instance (for fluid interface) - */ - public function insteadof(...$traits) { - if ($this->type === self::TYPE_UNDEFINED) { - if (is_null($this->trait)) { - throw new \LogicException('Precedence adaptation must have trait'); - } - - $this->type = self::TYPE_PRECEDENCE; - } - - if ($this->type !== self::TYPE_PRECEDENCE) { - throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider'); - } - - foreach ($traits as $trait) { - $this->insteadof[] = BuilderHelpers::normalizeName($trait); - } - - return $this; - } - - protected function setModifier(int $modifier): void { - if ($this->type === self::TYPE_UNDEFINED) { - $this->type = self::TYPE_ALIAS; - } - - if ($this->type !== self::TYPE_ALIAS) { - throw new \LogicException('Cannot set access modifier for not alias adaptation buider'); - } - - if (is_null($this->modifier)) { - $this->modifier = $modifier; - } else { - throw new \LogicException('Multiple access type modifiers are not allowed'); - } - } - - /** - * Returns the built node. - * - * @return Node The built node - */ - public function getNode(): Node { - switch ($this->type) { - case self::TYPE_ALIAS: - return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); - case self::TYPE_PRECEDENCE: - return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof); - default: - throw new \LogicException('Type of adaptation is not defined'); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php deleted file mode 100644 index ffa1bd5c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ /dev/null @@ -1,83 +0,0 @@ - */ - protected array $uses = []; - /** @var list */ - protected array $constants = []; - /** @var list */ - protected array $properties = []; - /** @var list */ - protected array $methods = []; - /** @var list */ - protected array $attributeGroups = []; - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - */ - public function __construct(string $name) { - $this->name = $name; - } - - /** - * Adds a statement. - * - * @param Stmt|PhpParser\Builder $stmt The statement to add - * - * @return $this The builder instance (for fluid interface) - */ - public function addStmt($stmt) { - $stmt = BuilderHelpers::normalizeNode($stmt); - - if ($stmt instanceof Stmt\Property) { - $this->properties[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassMethod) { - $this->methods[] = $stmt; - } elseif ($stmt instanceof Stmt\TraitUse) { - $this->uses[] = $stmt; - } elseif ($stmt instanceof Stmt\ClassConst) { - $this->constants[] = $stmt; - } else { - throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); - } - - return $this; - } - - /** - * Adds an attribute group. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return $this The builder instance (for fluid interface) - */ - public function addAttribute($attribute) { - $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); - - return $this; - } - - /** - * Returns the built trait node. - * - * @return Stmt\Trait_ The built interface node - */ - public function getNode(): PhpParser\Node { - return new Stmt\Trait_( - $this->name, [ - 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), - 'attrGroups' => $this->attributeGroups, - ], $this->attributes - ); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php deleted file mode 100644 index b82cf139..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +++ /dev/null @@ -1,49 +0,0 @@ -name = BuilderHelpers::normalizeName($name); - $this->type = $type; - } - - /** - * Sets alias for used name. - * - * @param string $alias Alias to use (last component of full name by default) - * - * @return $this The builder instance (for fluid interface) - */ - public function as(string $alias) { - $this->alias = $alias; - return $this; - } - - /** - * Returns the built node. - * - * @return Stmt\Use_ The built node - */ - public function getNode(): Node { - return new Stmt\Use_([ - new Node\UseItem($this->name, $this->alias) - ], $this->type); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php deleted file mode 100644 index 07642f92..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ /dev/null @@ -1,375 +0,0 @@ -args($args) - ); - } - - /** - * Creates a namespace builder. - * - * @param null|string|Node\Name $name Name of the namespace - * - * @return Builder\Namespace_ The created namespace builder - */ - public function namespace($name): Builder\Namespace_ { - return new Builder\Namespace_($name); - } - - /** - * Creates a class builder. - * - * @param string $name Name of the class - * - * @return Builder\Class_ The created class builder - */ - public function class(string $name): Builder\Class_ { - return new Builder\Class_($name); - } - - /** - * Creates an interface builder. - * - * @param string $name Name of the interface - * - * @return Builder\Interface_ The created interface builder - */ - public function interface(string $name): Builder\Interface_ { - return new Builder\Interface_($name); - } - - /** - * Creates a trait builder. - * - * @param string $name Name of the trait - * - * @return Builder\Trait_ The created trait builder - */ - public function trait(string $name): Builder\Trait_ { - return new Builder\Trait_($name); - } - - /** - * Creates an enum builder. - * - * @param string $name Name of the enum - * - * @return Builder\Enum_ The created enum builder - */ - public function enum(string $name): Builder\Enum_ { - return new Builder\Enum_($name); - } - - /** - * Creates a trait use builder. - * - * @param Node\Name|string ...$traits Trait names - * - * @return Builder\TraitUse The created trait use builder - */ - public function useTrait(...$traits): Builder\TraitUse { - return new Builder\TraitUse(...$traits); - } - - /** - * Creates a trait use adaptation builder. - * - * @param Node\Name|string|null $trait Trait name - * @param Node\Identifier|string $method Method name - * - * @return Builder\TraitUseAdaptation The created trait use adaptation builder - */ - public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { - if ($method === null) { - $method = $trait; - $trait = null; - } - - return new Builder\TraitUseAdaptation($trait, $method); - } - - /** - * Creates a method builder. - * - * @param string $name Name of the method - * - * @return Builder\Method The created method builder - */ - public function method(string $name): Builder\Method { - return new Builder\Method($name); - } - - /** - * Creates a parameter builder. - * - * @param string $name Name of the parameter - * - * @return Builder\Param The created parameter builder - */ - public function param(string $name): Builder\Param { - return new Builder\Param($name); - } - - /** - * Creates a property builder. - * - * @param string $name Name of the property - * - * @return Builder\Property The created property builder - */ - public function property(string $name): Builder\Property { - return new Builder\Property($name); - } - - /** - * Creates a function builder. - * - * @param string $name Name of the function - * - * @return Builder\Function_ The created function builder - */ - public function function(string $name): Builder\Function_ { - return new Builder\Function_($name); - } - - /** - * Creates a namespace/class use builder. - * - * @param Node\Name|string $name Name of the entity (namespace or class) to alias - * - * @return Builder\Use_ The created use builder - */ - public function use($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_NORMAL); - } - - /** - * Creates a function use builder. - * - * @param Node\Name|string $name Name of the function to alias - * - * @return Builder\Use_ The created use function builder - */ - public function useFunction($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_FUNCTION); - } - - /** - * Creates a constant use builder. - * - * @param Node\Name|string $name Name of the const to alias - * - * @return Builder\Use_ The created use const builder - */ - public function useConst($name): Builder\Use_ { - return new Builder\Use_($name, Use_::TYPE_CONSTANT); - } - - /** - * Creates a class constant builder. - * - * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value - * - * @return Builder\ClassConst The created use const builder - */ - public function classConst($name, $value): Builder\ClassConst { - return new Builder\ClassConst($name, $value); - } - - /** - * Creates an enum case builder. - * - * @param string|Identifier $name Name - * - * @return Builder\EnumCase The created use const builder - */ - public function enumCase($name): Builder\EnumCase { - return new Builder\EnumCase($name); - } - - /** - * Creates node a for a literal value. - * - * @param Expr|bool|null|int|float|string|array|\UnitEnum $value $value - */ - public function val($value): Expr { - return BuilderHelpers::normalizeValue($value); - } - - /** - * Creates variable node. - * - * @param string|Expr $name Name - */ - public function var($name): Expr\Variable { - if (!\is_string($name) && !$name instanceof Expr) { - throw new \LogicException('Variable name must be string or Expr'); - } - - return new Expr\Variable($name); - } - - /** - * Normalizes an argument list. - * - * Creates Arg nodes for all arguments and converts literal values to expressions. - * - * @param array $args List of arguments to normalize - * - * @return list - */ - public function args(array $args): array { - $normalizedArgs = []; - foreach ($args as $key => $arg) { - if (!($arg instanceof Arg)) { - $arg = new Arg(BuilderHelpers::normalizeValue($arg)); - } - if (\is_string($key)) { - $arg->name = BuilderHelpers::normalizeIdentifier($key); - } - $normalizedArgs[] = $arg; - } - return $normalizedArgs; - } - - /** - * Creates a function call node. - * - * @param string|Name|Expr $name Function name - * @param array $args Function arguments - */ - public function funcCall($name, array $args = []): Expr\FuncCall { - return new Expr\FuncCall( - BuilderHelpers::normalizeNameOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a method call node. - * - * @param Expr $var Variable the method is called on - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - */ - public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { - return new Expr\MethodCall( - $var, - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates a static method call node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - */ - public function staticCall($class, $name, array $args = []): Expr\StaticCall { - return new Expr\StaticCall( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name), - $this->args($args) - ); - } - - /** - * Creates an object creation node. - * - * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments - */ - public function new($class, array $args = []): Expr\New_ { - return new Expr\New_( - BuilderHelpers::normalizeNameOrExpr($class), - $this->args($args) - ); - } - - /** - * Creates a constant fetch node. - * - * @param string|Name $name Constant name - */ - public function constFetch($name): Expr\ConstFetch { - return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); - } - - /** - * Creates a property fetch node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - */ - public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { - return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); - } - - /** - * Creates a class constant fetch node. - * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Constant name - */ - public function classConstFetch($class, $name): Expr\ClassConstFetch { - return new Expr\ClassConstFetch( - BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifierOrExpr($name) - ); - } - - /** - * Creates nested Concat nodes from a list of expressions. - * - * @param Expr|string ...$exprs Expressions or literal strings - */ - public function concat(...$exprs): Concat { - $numExprs = count($exprs); - if ($numExprs < 2) { - throw new \LogicException('Expected at least two expressions'); - } - - $lastConcat = $this->normalizeStringExpr($exprs[0]); - for ($i = 1; $i < $numExprs; $i++) { - $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); - } - return $lastConcat; - } - - /** - * @param string|Expr $expr - */ - private function normalizeStringExpr($expr): Expr { - if ($expr instanceof Expr) { - return $expr; - } - - if (\is_string($expr)) { - return new String_($expr); - } - - throw new \LogicException('Expected string or Expr'); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php deleted file mode 100644 index f29a6915..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ /dev/null @@ -1,338 +0,0 @@ -getNode(); - } - - if ($node instanceof Node) { - return $node; - } - - throw new \LogicException('Expected node or builder object'); - } - - /** - * Normalizes a node to a statement. - * - * Expressions are wrapped in a Stmt\Expression node. - * - * @param Node|Builder $node The node to normalize - * - * @return Stmt The normalized statement node - */ - public static function normalizeStmt($node): Stmt { - $node = self::normalizeNode($node); - if ($node instanceof Stmt) { - return $node; - } - - if ($node instanceof Expr) { - return new Stmt\Expression($node); - } - - throw new \LogicException('Expected statement or expression node'); - } - - /** - * Normalizes strings to Identifier. - * - * @param string|Identifier $name The identifier to normalize - * - * @return Identifier The normalized identifier - */ - public static function normalizeIdentifier($name): Identifier { - if ($name instanceof Identifier) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier'); - } - - /** - * Normalizes strings to Identifier, also allowing expressions. - * - * @param string|Identifier|Expr $name The identifier to normalize - * - * @return Identifier|Expr The normalized identifier or expression - */ - public static function normalizeIdentifierOrExpr($name) { - if ($name instanceof Identifier || $name instanceof Expr) { - return $name; - } - - if (\is_string($name)) { - return new Identifier($name); - } - - throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr'); - } - - /** - * Normalizes a name: Converts string names to Name nodes. - * - * @param Name|string $name The name to normalize - * - * @return Name The normalized name - */ - public static function normalizeName($name): Name { - if ($name instanceof Name) { - return $name; - } - - if (is_string($name)) { - if (!$name) { - throw new \LogicException('Name cannot be empty'); - } - - if ($name[0] === '\\') { - return new Name\FullyQualified(substr($name, 1)); - } - - if (0 === strpos($name, 'namespace\\')) { - return new Name\Relative(substr($name, strlen('namespace\\'))); - } - - return new Name($name); - } - - throw new \LogicException('Name must be a string or an instance of Node\Name'); - } - - /** - * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * - * @return Name|Expr The normalized name or expression - */ - public static function normalizeNameOrExpr($name) { - if ($name instanceof Expr) { - return $name; - } - - if (!is_string($name) && !($name instanceof Name)) { - throw new \LogicException( - 'Name must be a string or an instance of Node\Name or Node\Expr' - ); - } - - return self::normalizeName($name); - } - - /** - * Normalizes a type: Converts plain-text type names into proper AST representation. - * - * In particular, builtin types become Identifiers, custom types become Names and nullables - * are wrapped in NullableType nodes. - * - * @param string|Name|Identifier|ComplexType $type The type to normalize - * - * @return Name|Identifier|ComplexType The normalized type - */ - public static function normalizeType($type) { - if (!is_string($type)) { - if ( - !$type instanceof Name && !$type instanceof Identifier && - !$type instanceof ComplexType - ) { - throw new \LogicException( - 'Type must be a string, or an instance of Name, Identifier or ComplexType' - ); - } - return $type; - } - - $nullable = false; - if (strlen($type) > 0 && $type[0] === '?') { - $nullable = true; - $type = substr($type, 1); - } - - $builtinTypes = [ - 'array', - 'callable', - 'bool', - 'int', - 'float', - 'string', - 'iterable', - 'void', - 'object', - 'null', - 'false', - 'mixed', - 'never', - 'true', - ]; - - $lowerType = strtolower($type); - if (in_array($lowerType, $builtinTypes)) { - $type = new Identifier($lowerType); - } else { - $type = self::normalizeName($type); - } - - $notNullableTypes = [ - 'void', 'mixed', 'never', - ]; - if ($nullable && in_array((string) $type, $notNullableTypes)) { - throw new \LogicException(sprintf('%s type cannot be nullable', $type)); - } - - return $nullable ? new NullableType($type) : $type; - } - - /** - * Normalizes a value: Converts nulls, booleans, integers, - * floats, strings and arrays into their respective nodes - * - * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value The value to normalize - * - * @return Expr The normalized value - */ - public static function normalizeValue($value): Expr { - if ($value instanceof Node\Expr) { - return $value; - } - - if (is_null($value)) { - return new Expr\ConstFetch( - new Name('null') - ); - } - - if (is_bool($value)) { - return new Expr\ConstFetch( - new Name($value ? 'true' : 'false') - ); - } - - if (is_int($value)) { - return new Scalar\Int_($value); - } - - if (is_float($value)) { - return new Scalar\Float_($value); - } - - if (is_string($value)) { - return new Scalar\String_($value); - } - - if (is_array($value)) { - $items = []; - $lastKey = -1; - foreach ($value as $itemKey => $itemValue) { - // for consecutive, numeric keys don't generate keys - if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue) - ); - } else { - $lastKey = null; - $items[] = new Node\ArrayItem( - self::normalizeValue($itemValue), - self::normalizeValue($itemKey) - ); - } - } - - return new Expr\Array_($items); - } - - if ($value instanceof \UnitEnum) { - return new Expr\ClassConstFetch(new FullyQualified(\get_class($value)), new Identifier($value->name)); - } - - throw new \LogicException('Invalid value'); - } - - /** - * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. - * - * @param Comment\Doc|string $docComment The doc comment to normalize - * - * @return Comment\Doc The normalized doc comment - */ - public static function normalizeDocComment($docComment): Comment\Doc { - if ($docComment instanceof Comment\Doc) { - return $docComment; - } - - if (is_string($docComment)) { - return new Comment\Doc($docComment); - } - - throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); - } - - /** - * Normalizes a attribute: Converts attribute to the Attribute Group if needed. - * - * @param Node\Attribute|Node\AttributeGroup $attribute - * - * @return Node\AttributeGroup The Attribute Group - */ - public static function normalizeAttribute($attribute): Node\AttributeGroup { - if ($attribute instanceof Node\AttributeGroup) { - return $attribute; - } - - if (!($attribute instanceof Node\Attribute)) { - throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); - } - - return new Node\AttributeGroup([$attribute]); - } - - /** - * Adds a modifier and returns new modifier bitmask. - * - * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set - * - * @return int New modifiers - */ - public static function addModifier(int $modifiers, int $modifier): int { - Modifiers::verifyModifier($modifiers, $modifier); - return $modifiers | $modifier; - } - - /** - * Adds a modifier and returns new modifier bitmask. - * @return int New modifiers - */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { - Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); - return $existingModifiers | $modifierToSet; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php deleted file mode 100644 index 01b341e4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment.php +++ /dev/null @@ -1,209 +0,0 @@ -text = $text; - $this->startLine = $startLine; - $this->startFilePos = $startFilePos; - $this->startTokenPos = $startTokenPos; - $this->endLine = $endLine; - $this->endFilePos = $endFilePos; - $this->endTokenPos = $endTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function getText(): string { - return $this->text; - } - - /** - * Gets the line number the comment started on. - * - * @return int Line number (or -1 if not available) - * @phpstan-return -1|positive-int - */ - public function getStartLine(): int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @return int File offset (or -1 if not available) - */ - public function getStartFilePos(): int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @return int Token offset (or -1 if not available) - */ - public function getStartTokenPos(): int { - return $this->startTokenPos; - } - - /** - * Gets the line number the comment ends on. - * - * @return int Line number (or -1 if not available) - * @phpstan-return -1|positive-int - */ - public function getEndLine(): int { - return $this->endLine; - } - - /** - * Gets the file offset the comment ends on. - * - * @return int File offset (or -1 if not available) - */ - public function getEndFilePos(): int { - return $this->endFilePos; - } - - /** - * Gets the token offset the comment ends on. - * - * @return int Token offset (or -1 if not available) - */ - public function getEndTokenPos(): int { - return $this->endTokenPos; - } - - /** - * Gets the comment text. - * - * @return string The comment text (including comment delimiters like /*) - */ - public function __toString(): string { - return $this->text; - } - - /** - * Gets the reformatted comment text. - * - * "Reformatted" here means that we try to clean up the whitespace at the - * starts of the lines. This is necessary because we receive the comments - * without leading whitespace on the first line, but with leading whitespace - * on all subsequent lines. - * - * Additionally, this normalizes CRLF newlines to LF newlines. - */ - public function getReformattedText(): string { - $text = str_replace("\r\n", "\n", $this->text); - $newlinePos = strpos($text, "\n"); - if (false === $newlinePos) { - // Single line comments don't need further processing - return $text; - } - if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { - // Multi line comment of the type - // - // /* - // * Some text. - // * Some more text. - // */ - // - // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $text); - } - if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { - // Multi line comment of the type - // - // /* - // Some text. - // Some more text. - // */ - // - // is handled by removing the whitespace sequence on the line before the closing - // */ on all lines. So if the last line is " */", then " " is removed at the - // start of all lines. - return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); - } - if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { - // Multi line comment of the type - // - // /* Some text. - // Some more text. - // Indented text. - // Even more text. */ - // - // is handled by removing the difference between the shortest whitespace prefix on all - // lines and the length of the "/* " opening sequence. - $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); - $removeLen = $prefixLen - strlen($matches[0]); - return preg_replace('(^\s{' . $removeLen . '})m', '', $text); - } - - // No idea how to format this comment, so simply return as is - return $text; - } - - /** - * Get length of shortest whitespace prefix (at the start of a line). - * - * If there is a line with no prefix whitespace, 0 is a valid return value. - * - * @param string $str String to check - * @return int Length in characters. Tabs count as single characters. - */ - private function getShortestWhitespacePrefixLen(string $str): int { - $lines = explode("\n", $str); - $shortestPrefixLen = \PHP_INT_MAX; - foreach ($lines as $line) { - preg_match('(^\s*)', $line, $matches); - $prefixLen = strlen($matches[0]); - if ($prefixLen < $shortestPrefixLen) { - $shortestPrefixLen = $prefixLen; - } - } - return $shortestPrefixLen; - } - - /** - * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} - */ - public function jsonSerialize(): array { - // Technically not a node, but we make it look like one anyway - $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; - return [ - 'nodeType' => $type, - 'text' => $this->text, - // TODO: Rename these to include "start". - 'line' => $this->startLine, - 'filePos' => $this->startFilePos, - 'tokenPos' => $this->startTokenPos, - 'endLine' => $this->endLine, - 'endFilePos' => $this->endFilePos, - 'endTokenPos' => $this->endTokenPos, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php deleted file mode 100644 index bb3e9146..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ /dev/null @@ -1,6 +0,0 @@ -fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { - throw new ConstExprEvaluationException( - "Expression of type {$expr->getType()} cannot be evaluated" - ); - }; - } - - /** - * Silently evaluates a constant expression into a PHP value. - * - * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException. - * The original source of the exception is available through getPrevious(). - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred - */ - public function evaluateSilently(Expr $expr) { - set_error_handler(function ($num, $str, $file, $line) { - throw new \ErrorException($str, 0, $num, $file, $line); - }); - - try { - return $this->evaluate($expr); - } catch (\Throwable $e) { - if (!$e instanceof ConstExprEvaluationException) { - $e = new ConstExprEvaluationException( - "An error occurred during constant expression evaluation", 0, $e); - } - throw $e; - } finally { - restore_error_handler(); - } - } - - /** - * Directly evaluates a constant expression into a PHP value. - * - * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these - * into a ConstExprEvaluationException. - * - * If some part of the expression cannot be evaluated, the fallback evaluator passed to the - * constructor will be invoked. By default, if no fallback is provided, an exception of type - * ConstExprEvaluationException is thrown. - * - * See class doc comment for caveats and limitations. - * - * @param Expr $expr Constant expression to evaluate - * @return mixed Result of evaluation - * - * @throws ConstExprEvaluationException if the expression cannot be evaluated - */ - public function evaluateDirectly(Expr $expr) { - return $this->evaluate($expr); - } - - /** @return mixed */ - private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\Int_ - || $expr instanceof Scalar\Float_ - || $expr instanceof Scalar\String_ - ) { - return $expr->value; - } - - if ($expr instanceof Expr\Array_) { - return $this->evaluateArray($expr); - } - - // Unary operators - if ($expr instanceof Expr\UnaryPlus) { - return +$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\UnaryMinus) { - return -$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BooleanNot) { - return !$this->evaluate($expr->expr); - } - if ($expr instanceof Expr\BitwiseNot) { - return ~$this->evaluate($expr->expr); - } - - if ($expr instanceof Expr\BinaryOp) { - return $this->evaluateBinaryOp($expr); - } - - if ($expr instanceof Expr\Ternary) { - return $this->evaluateTernary($expr); - } - - if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) { - return $this->evaluate($expr->var)[$this->evaluate($expr->dim)]; - } - - if ($expr instanceof Expr\ConstFetch) { - return $this->evaluateConstFetch($expr); - } - - return ($this->fallbackEvaluator)($expr); - } - - private function evaluateArray(Expr\Array_ $expr): array { - $array = []; - foreach ($expr->items as $item) { - if (null !== $item->key) { - $array[$this->evaluate($item->key)] = $this->evaluate($item->value); - } elseif ($item->unpack) { - $array = array_merge($array, $this->evaluate($item->value)); - } else { - $array[] = $this->evaluate($item->value); - } - } - return $array; - } - - /** @return mixed */ - private function evaluateTernary(Expr\Ternary $expr) { - if (null === $expr->if) { - return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); - } - - return $this->evaluate($expr->cond) - ? $this->evaluate($expr->if) - : $this->evaluate($expr->else); - } - - /** @return mixed */ - private function evaluateBinaryOp(Expr\BinaryOp $expr) { - if ($expr instanceof Expr\BinaryOp\Coalesce - && $expr->left instanceof Expr\ArrayDimFetch - ) { - // This needs to be special cased to respect BP_VAR_IS fetch semantics - return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] - ?? $this->evaluate($expr->right); - } - - // The evaluate() calls are repeated in each branch, because some of the operators are - // short-circuiting and evaluating the RHS in advance may be illegal in that case - $l = $expr->left; - $r = $expr->right; - switch ($expr->getOperatorSigil()) { - case '&': return $this->evaluate($l) & $this->evaluate($r); - case '|': return $this->evaluate($l) | $this->evaluate($r); - case '^': return $this->evaluate($l) ^ $this->evaluate($r); - case '&&': return $this->evaluate($l) && $this->evaluate($r); - case '||': return $this->evaluate($l) || $this->evaluate($r); - case '??': return $this->evaluate($l) ?? $this->evaluate($r); - case '.': return $this->evaluate($l) . $this->evaluate($r); - case '/': return $this->evaluate($l) / $this->evaluate($r); - case '==': return $this->evaluate($l) == $this->evaluate($r); - case '>': return $this->evaluate($l) > $this->evaluate($r); - case '>=': return $this->evaluate($l) >= $this->evaluate($r); - case '===': return $this->evaluate($l) === $this->evaluate($r); - case 'and': return $this->evaluate($l) and $this->evaluate($r); - case 'or': return $this->evaluate($l) or $this->evaluate($r); - case 'xor': return $this->evaluate($l) xor $this->evaluate($r); - case '-': return $this->evaluate($l) - $this->evaluate($r); - case '%': return $this->evaluate($l) % $this->evaluate($r); - case '*': return $this->evaluate($l) * $this->evaluate($r); - case '!=': return $this->evaluate($l) != $this->evaluate($r); - case '!==': return $this->evaluate($l) !== $this->evaluate($r); - case '+': return $this->evaluate($l) + $this->evaluate($r); - case '**': return $this->evaluate($l) ** $this->evaluate($r); - case '<<': return $this->evaluate($l) << $this->evaluate($r); - case '>>': return $this->evaluate($l) >> $this->evaluate($r); - case '<': return $this->evaluate($l) < $this->evaluate($r); - case '<=': return $this->evaluate($l) <= $this->evaluate($r); - case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); - case '|>': - $lval = $this->evaluate($l); - return $this->evaluate($r)($lval); - } - - throw new \Exception('Should not happen'); - } - - /** @return mixed */ - private function evaluateConstFetch(Expr\ConstFetch $expr) { - $name = $expr->name->toLowerString(); - switch ($name) { - case 'null': return null; - case 'false': return false; - case 'true': return true; - } - - return ($this->fallbackEvaluator)($expr); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php deleted file mode 100644 index f81f0c42..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Error.php +++ /dev/null @@ -1,173 +0,0 @@ - */ - protected array $attributes; - - /** - * Creates an Exception signifying a parse error. - * - * @param string $message Error message - * @param array $attributes Attributes of node/token where error occurred - */ - public function __construct(string $message, array $attributes = []) { - $this->rawMessage = $message; - $this->attributes = $attributes; - $this->updateMessage(); - } - - /** - * Gets the error message - * - * @return string Error message - */ - public function getRawMessage(): string { - return $this->rawMessage; - } - - /** - * Gets the line the error starts in. - * - * @return int Error start line - * @phpstan-return -1|positive-int - */ - public function getStartLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the error ends in. - * - * @return int Error end line - * @phpstan-return -1|positive-int - */ - public function getEndLine(): int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the attributes of the node/token the error occurred at. - * - * @return array - */ - public function getAttributes(): array { - return $this->attributes; - } - - /** - * Sets the attributes of the node/token the error occurred at. - * - * @param array $attributes - */ - public function setAttributes(array $attributes): void { - $this->attributes = $attributes; - $this->updateMessage(); - } - - /** - * Sets the line of the PHP file the error occurred in. - * - * @param string $message Error message - */ - public function setRawMessage(string $message): void { - $this->rawMessage = $message; - $this->updateMessage(); - } - - /** - * Sets the line the error starts in. - * - * @param int $line Error start line - */ - public function setStartLine(int $line): void { - $this->attributes['startLine'] = $line; - $this->updateMessage(); - } - - /** - * Returns whether the error has start and end column information. - * - * For column information enable the startFilePos and endFilePos in the lexer options. - */ - public function hasColumnInfo(): bool { - return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); - } - - /** - * Gets the start column (1-based) into the line where the error started. - * - * @param string $code Source code of the file - */ - public function getStartColumn(string $code): int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['startFilePos']); - } - - /** - * Gets the end column (1-based) into the line where the error ended. - * - * @param string $code Source code of the file - */ - public function getEndColumn(string $code): int { - if (!$this->hasColumnInfo()) { - throw new \RuntimeException('Error does not have column information'); - } - - return $this->toColumn($code, $this->attributes['endFilePos']); - } - - /** - * Formats message including line and column information. - * - * @param string $code Source code associated with the error, for calculation of the columns - * - * @return string Formatted message - */ - public function getMessageWithColumnInfo(string $code): string { - return sprintf( - '%s from %d:%d to %d:%d', $this->getRawMessage(), - $this->getStartLine(), $this->getStartColumn($code), - $this->getEndLine(), $this->getEndColumn($code) - ); - } - - /** - * Converts a file offset into a column. - * - * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code - * - * @return int 1-based column (relative to start of line) - */ - private function toColumn(string $code, int $pos): int { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } - - /** - * Updates the exception message after a change to rawMessage or rawLine. - */ - protected function updateMessage(): void { - $this->message = $this->rawMessage; - - if (-1 === $this->getStartLine()) { - $this->message .= ' on unknown line'; - } else { - $this->message .= ' on line ' . $this->getStartLine(); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php deleted file mode 100644 index 51ad730c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ /dev/null @@ -1,12 +0,0 @@ -errors[] = $error; - } - - /** - * Get collected errors. - * - * @return Error[] - */ - public function getErrors(): array { - return $this->errors; - } - - /** - * Check whether there are any errors. - */ - public function hasErrors(): bool { - return !empty($this->errors); - } - - /** - * Reset/clear collected errors. - */ - public function clearErrors(): void { - $this->errors = []; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php deleted file mode 100644 index dff33dd0..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +++ /dev/null @@ -1,17 +0,0 @@ -type = $type; - $this->old = $old; - $this->new = $new; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php deleted file mode 100644 index 253e1757..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ /dev/null @@ -1,178 +0,0 @@ -isEqual = $isEqual; - } - - /** - * Calculate diff (edit script) from $old to $new. - * - * @param T[] $old Original array - * @param T[] $new New array - * - * @return DiffElem[] Diff (edit script) - */ - public function diff(array $old, array $new): array { - $old = \array_values($old); - $new = \array_values($new); - list($trace, $x, $y) = $this->calculateTrace($old, $new); - return $this->extractDiff($trace, $x, $y, $old, $new); - } - - /** - * Calculate diff, including "replace" operations. - * - * If a sequence of remove operations is followed by the same number of add operations, these - * will be coalesced into replace operations. - * - * @param T[] $old Original array - * @param T[] $new New array - * - * @return DiffElem[] Diff (edit script), including replace operations - */ - public function diffWithReplacements(array $old, array $new): array { - return $this->coalesceReplacements($this->diff($old, $new)); - } - - /** - * @param T[] $old - * @param T[] $new - * @return array{array>, int, int} - */ - private function calculateTrace(array $old, array $new): array { - $n = \count($old); - $m = \count($new); - $max = $n + $m; - $v = [1 => 0]; - $trace = []; - for ($d = 0; $d <= $max; $d++) { - $trace[] = $v; - for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { - $x = $v[$k + 1]; - } else { - $x = $v[$k - 1] + 1; - } - - $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { - $x++; - $y++; - } - - $v[$k] = $x; - if ($x >= $n && $y >= $m) { - return [$trace, $x, $y]; - } - } - } - throw new \Exception('Should not happen'); - } - - /** - * @param array> $trace - * @param T[] $old - * @param T[] $new - * @return DiffElem[] - */ - private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { - $result = []; - for ($d = \count($trace) - 1; $d >= 0; $d--) { - $v = $trace[$d]; - $k = $x - $y; - - if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { - $prevK = $k + 1; - } else { - $prevK = $k - 1; - } - - $prevX = $v[$prevK]; - $prevY = $prevX - $prevK; - - while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); - $x--; - $y--; - } - - if ($d === 0) { - break; - } - - while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); - $x--; - } - - while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); - $y--; - } - } - return array_reverse($result); - } - - /** - * Coalesce equal-length sequences of remove+add into a replace operation. - * - * @param DiffElem[] $diff - * @return DiffElem[] - */ - private function coalesceReplacements(array $diff): array { - $newDiff = []; - $c = \count($diff); - for ($i = 0; $i < $c; $i++) { - $diffType = $diff[$i]->type; - if ($diffType !== DiffElem::TYPE_REMOVE) { - $newDiff[] = $diff[$i]; - continue; - } - - $j = $i; - while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { - $j++; - } - - $k = $j; - while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { - $k++; - } - - if ($j - $i === $k - $j) { - $len = $j - $i; - for ($n = 0; $n < $len; $n++) { - $newDiff[] = new DiffElem( - DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new - ); - } - } else { - for (; $i < $k; $i++) { - $newDiff[] = $diff[$i]; - } - } - $i = $k - 1; - } - return $newDiff; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php deleted file mode 100644 index b30a99a1..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ /dev/null @@ -1,71 +0,0 @@ - $attributes Attributes - */ - public function __construct( - array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, - array $stmts, array $attributes - ) { - parent::__construct($attributes); - $this->attrGroups = $attrGroups; - $this->flags = $flags; - $this->args = $args; - $this->extends = $extends; - $this->implements = $implements; - $this->stmts = $stmts; - } - - public static function fromNewNode(Expr\New_ $newNode): self { - $class = $newNode->class; - assert($class instanceof Node\Stmt\Class_); - // We don't assert that $class->name is null here, to allow consumers to assign unique names - // to anonymous classes for their own purposes. We simplify ignore the name here. - return new self( - $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, - $class->stmts, $newNode->getAttributes() - ); - } - - public function getType(): string { - return 'Expr_PrintableNewAnonClass'; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php deleted file mode 100644 index 36022d09..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +++ /dev/null @@ -1,237 +0,0 @@ -= 80000) { - class TokenPolyfill extends \PhpToken { - } - return; -} - -/** - * This is a polyfill for the PhpToken class introduced in PHP 8.0. We do not actually polyfill - * PhpToken, because composer might end up picking a different polyfill implementation, which does - * not meet our requirements. - * - * @internal - */ -class TokenPolyfill { - /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ - public int $id; - /** @var string The textual content of the token. */ - public string $text; - /** @var int The 1-based starting line of the token (or -1 if unknown). */ - public int $line; - /** @var int The 0-based starting position of the token (or -1 if unknown). */ - public int $pos; - - /** @var array Tokens ignored by the PHP parser. */ - private const IGNORABLE_TOKENS = [ - \T_WHITESPACE => true, - \T_COMMENT => true, - \T_DOC_COMMENT => true, - \T_OPEN_TAG => true, - ]; - - /** @var array Tokens that may be part of a T_NAME_* identifier. */ - private static array $identifierTokens; - - /** - * Create a Token with the given ID and text, as well optional line and position information. - */ - final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) { - $this->id = $id; - $this->text = $text; - $this->line = $line; - $this->pos = $pos; - } - - /** - * Get the name of the token. For single-char tokens this will be the token character. - * Otherwise it will be a T_* style name, or null if the token ID is unknown. - */ - public function getTokenName(): ?string { - if ($this->id < 256) { - return \chr($this->id); - } - - $name = token_name($this->id); - return $name === 'UNKNOWN' ? null : $name; - } - - /** - * Check whether the token is of the given kind. The kind may be either an integer that matches - * the token ID, a string that matches the token text, or an array of integers/strings. In the - * latter case, the function returns true if any of the kinds in the array match. - * - * @param int|string|(int|string)[] $kind - */ - public function is($kind): bool { - if (\is_int($kind)) { - return $this->id === $kind; - } - if (\is_string($kind)) { - return $this->text === $kind; - } - if (\is_array($kind)) { - foreach ($kind as $entry) { - if (\is_int($entry)) { - if ($this->id === $entry) { - return true; - } - } elseif (\is_string($entry)) { - if ($this->text === $entry) { - return true; - } - } else { - throw new \TypeError( - 'Argument #1 ($kind) must only have elements of type string|int, ' . - gettype($entry) . ' given'); - } - } - return false; - } - throw new \TypeError( - 'Argument #1 ($kind) must be of type string|int|array, ' .gettype($kind) . ' given'); - } - - /** - * Check whether this token would be ignored by the PHP parser. Returns true for T_WHITESPACE, - * T_COMMENT, T_DOC_COMMENT and T_OPEN_TAG, and false for everything else. - */ - public function isIgnorable(): bool { - return isset(self::IGNORABLE_TOKENS[$this->id]); - } - - /** - * Return the textual content of the token. - */ - public function __toString(): string { - return $this->text; - } - - /** - * Tokenize the given source code and return an array of tokens. - * - * This performs certain canonicalizations to match the PHP 8.0 token format: - * * Bad characters are represented using T_BAD_CHARACTER rather than omitted. - * * T_COMMENT does not include trailing newlines, instead the newline is part of a following - * T_WHITESPACE token. - * * Namespaced names are represented using T_NAME_* tokens. - * - * @return static[] - */ - public static function tokenize(string $code, int $flags = 0): array { - self::init(); - - $tokens = []; - $line = 1; - $pos = 0; - $origTokens = \token_get_all($code, $flags); - - $numTokens = \count($origTokens); - for ($i = 0; $i < $numTokens; $i++) { - $token = $origTokens[$i]; - if (\is_string($token)) { - if (\strlen($token) === 2) { - // b" and B" are tokenized as single-char tokens, even though they aren't. - $tokens[] = new static(\ord('"'), $token, $line, $pos); - $pos += 2; - } else { - $tokens[] = new static(\ord($token), $token, $line, $pos); - $pos++; - } - } else { - $id = $token[0]; - $text = $token[1]; - - // Emulate PHP 8.0 comment format, which does not include trailing whitespace anymore. - if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && - \preg_match('/(\r\n|\n|\r)$/D', $text, $matches) - ) { - $trailingNewline = $matches[0]; - $text = \substr($text, 0, -\strlen($trailingNewline)); - $tokens[] = new static($id, $text, $line, $pos); - $pos += \strlen($text); - - if ($i + 1 < $numTokens && $origTokens[$i + 1][0] === \T_WHITESPACE) { - // Move trailing newline into following T_WHITESPACE token, if it already exists. - $origTokens[$i + 1][1] = $trailingNewline . $origTokens[$i + 1][1]; - $origTokens[$i + 1][2]--; - } else { - // Otherwise, we need to create a new T_WHITESPACE token. - $tokens[] = new static(\T_WHITESPACE, $trailingNewline, $line, $pos); - $line++; - $pos += \strlen($trailingNewline); - } - continue; - } - - // Emulate PHP 8.0 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and - // T_STRING into a single token. - if (($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id]))) { - $newText = $text; - $lastWasSeparator = $id === \T_NS_SEPARATOR; - for ($j = $i + 1; $j < $numTokens; $j++) { - if ($lastWasSeparator) { - if (!isset(self::$identifierTokens[$origTokens[$j][0]])) { - break; - } - $lastWasSeparator = false; - } else { - if ($origTokens[$j][0] !== \T_NS_SEPARATOR) { - break; - } - $lastWasSeparator = true; - } - $newText .= $origTokens[$j][1]; - } - if ($lastWasSeparator) { - // Trailing separator is not part of the name. - $j--; - $newText = \substr($newText, 0, -1); - } - if ($j > $i + 1) { - if ($id === \T_NS_SEPARATOR) { - $id = \T_NAME_FULLY_QUALIFIED; - } elseif ($id === \T_NAMESPACE) { - $id = \T_NAME_RELATIVE; - } else { - $id = \T_NAME_QUALIFIED; - } - $tokens[] = new static($id, $newText, $line, $pos); - $pos += \strlen($newText); - $i = $j - 1; - continue; - } - } - - $tokens[] = new static($id, $text, $line, $pos); - $line += \substr_count($text, "\n"); - $pos += \strlen($text); - } - } - return $tokens; - } - - /** Initialize private static state needed by tokenize(). */ - private static function init(): void { - if (isset(self::$identifierTokens)) { - return; - } - - // Based on semi_reserved production. - self::$identifierTokens = \array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, - \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, - \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, - \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, - \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, - \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, - \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, - \T_MATCH, - ], true); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php deleted file mode 100644 index cdbe2bdc..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ /dev/null @@ -1,282 +0,0 @@ -tokens = $tokens; - $this->indentMap = $this->calcIndentMap($tabWidth); - } - - /** - * Whether the given position is immediately surrounded by parenthesis. - * - * @param int $startPos Start position - * @param int $endPos End position - */ - public function haveParens(int $startPos, int $endPos): bool { - return $this->haveTokenImmediatelyBefore($startPos, '(') - && $this->haveTokenImmediatelyAfter($endPos, ')'); - } - - /** - * Whether the given position is immediately surrounded by braces. - * - * @param int $startPos Start position - * @param int $endPos End position - */ - public function haveBraces(int $startPos, int $endPos): bool { - return ($this->haveTokenImmediatelyBefore($startPos, '{') - || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) - && $this->haveTokenImmediatelyAfter($endPos, '}'); - } - - /** - * Check whether the position is directly preceded by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position before which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { - $tokens = $this->tokens; - $pos--; - for (; $pos >= 0; $pos--) { - $token = $tokens[$pos]; - if ($token->is($expectedTokenType)) { - return true; - } - if (!$token->isIgnorable()) { - break; - } - } - return false; - } - - /** - * Check whether the position is directly followed by a certain token type. - * - * During this check whitespace and comments are skipped. - * - * @param int $pos Position after which the token should occur - * @param int|string $expectedTokenType Token to check for - * - * @return bool Whether the expected token was found - */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { - $tokens = $this->tokens; - $pos++; - for ($c = \count($tokens); $pos < $c; $pos++) { - $token = $tokens[$pos]; - if ($token->is($expectedTokenType)) { - return true; - } - if (!$token->isIgnorable()) { - break; - } - } - return false; - } - - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipLeft(int $pos, $skipTokenType): int { - $tokens = $this->tokens; - - $pos = $this->skipLeftWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if (!$tokens[$pos]->is($skipTokenType)) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos--; - - return $this->skipLeftWhitespace($pos); - } - - /** @param int|string|(int|string)[] $skipTokenType */ - public function skipRight(int $pos, $skipTokenType): int { - $tokens = $this->tokens; - - $pos = $this->skipRightWhitespace($pos); - if ($skipTokenType === \T_WHITESPACE) { - return $pos; - } - - if (!$tokens[$pos]->is($skipTokenType)) { - // Shouldn't happen. The skip token MUST be there - throw new \Exception('Encountered unexpected token'); - } - $pos++; - - return $this->skipRightWhitespace($pos); - } - - /** - * Return first non-whitespace token position smaller or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipLeftWhitespace(int $pos): int { - $tokens = $this->tokens; - for (; $pos >= 0; $pos--) { - if (!$tokens[$pos]->isIgnorable()) { - break; - } - } - return $pos; - } - - /** - * Return first non-whitespace position greater or equal to passed position. - * - * @param int $pos Token position - * @return int Non-whitespace token position - */ - public function skipRightWhitespace(int $pos): int { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - if (!$tokens[$pos]->isIgnorable()) { - break; - } - } - return $pos; - } - - /** @param int|string|(int|string)[] $findTokenType */ - public function findRight(int $pos, $findTokenType): int { - $tokens = $this->tokens; - for ($count = \count($tokens); $pos < $count; $pos++) { - if ($tokens[$pos]->is($findTokenType)) { - return $pos; - } - } - return -1; - } - - /** - * Whether the given position range contains a certain token type. - * - * @param int $startPos Starting position (inclusive) - * @param int $endPos Ending position (exclusive) - * @param int|string $tokenType Token type to look for - * @return bool Whether the token occurs in the given range - */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { - $tokens = $this->tokens; - for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos]->is($tokenType)) { - return true; - } - } - return false; - } - - public function haveTagInRange(int $startPos, int $endPos): bool { - return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) - || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); - } - - /** - * Get indentation before token position. - * - * @param int $pos Token position - * - * @return int Indentation depth (in spaces) - */ - public function getIndentationBefore(int $pos): int { - return $this->indentMap[$pos]; - } - - /** - * Get the code corresponding to a token offset range, optionally adjusted for indentation. - * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) - * @param int $indent By how much the code should be indented (can be negative as well) - * - * @return string Code corresponding to token range, adjusted for indentation - */ - public function getTokenCode(int $from, int $to, int $indent): string { - $tokens = $this->tokens; - $result = ''; - for ($pos = $from; $pos < $to; $pos++) { - $token = $tokens[$pos]; - $id = $token->id; - $text = $token->text; - if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $text; - } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); - } else { - $result .= $text; - } - } - } - return $result; - } - - /** - * Precalculate the indentation at every token position. - * - * @return int[] Token position to indentation map - */ - private function calcIndentMap(int $tabWidth): array { - $indentMap = []; - $indent = 0; - foreach ($this->tokens as $i => $token) { - $indentMap[] = $indent; - - if ($token->id === \T_WHITESPACE) { - $content = $token->text; - $newlinePos = \strrpos($content, "\n"); - if (false !== $newlinePos) { - $indent = $this->getIndent(\substr($content, $newlinePos + 1), $tabWidth); - } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && - $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { - // Special case: Newline at the end of opening tag followed by whitespace. - $indent = $this->getIndent($content, $tabWidth); - } - } - } - - // Add a sentinel for one past end of the file - $indentMap[] = $indent; - - return $indentMap; - } - - private function getIndent(string $ws, int $tabWidth): int { - $spaces = \substr_count($ws, " "); - $tabs = \substr_count($ws, "\t"); - assert(\strlen($ws) === $spaces + $tabs); - return $spaces + $tabs * $tabWidth; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php deleted file mode 100644 index 7be41426..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ /dev/null @@ -1,108 +0,0 @@ -[] Node type to reflection class map */ - private array $reflectionClassCache; - - /** @return mixed */ - public function decode(string $json) { - $value = json_decode($json, true); - if (json_last_error()) { - throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg()); - } - - return $this->decodeRecursive($value); - } - - /** - * @param mixed $value - * @return mixed - */ - private function decodeRecursive($value) { - if (\is_array($value)) { - if (isset($value['nodeType'])) { - if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { - return $this->decodeComment($value); - } - return $this->decodeNode($value); - } - return $this->decodeArray($value); - } - return $value; - } - - private function decodeArray(array $array): array { - $decodedArray = []; - foreach ($array as $key => $value) { - $decodedArray[$key] = $this->decodeRecursive($value); - } - return $decodedArray; - } - - private function decodeNode(array $value): Node { - $nodeType = $value['nodeType']; - if (!\is_string($nodeType)) { - throw new \RuntimeException('Node type must be a string'); - } - - $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - $node = $reflectionClass->newInstanceWithoutConstructor(); - - if (isset($value['attributes'])) { - if (!\is_array($value['attributes'])) { - throw new \RuntimeException('Attributes must be an array'); - } - - $node->setAttributes($this->decodeArray($value['attributes'])); - } - - foreach ($value as $name => $subNode) { - if ($name === 'nodeType' || $name === 'attributes') { - continue; - } - - $node->$name = $this->decodeRecursive($subNode); - } - - return $node; - } - - private function decodeComment(array $value): Comment { - $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; - if (!isset($value['text'])) { - throw new \RuntimeException('Comment must have text'); - } - - return new $className( - $value['text'], - $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, - $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 - ); - } - - /** @return \ReflectionClass */ - private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { - if (!isset($this->reflectionClassCache[$nodeType])) { - $className = $this->classNameFromNodeType($nodeType); - $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); - } - return $this->reflectionClassCache[$nodeType]; - } - - /** @return class-string */ - private function classNameFromNodeType(string $nodeType): string { - $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); - if (class_exists($className)) { - return $className; - } - - $className .= '_'; - if (class_exists($className)) { - return $className; - } - - throw new \RuntimeException("Unknown node type \"$nodeType\""); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php deleted file mode 100644 index 5e2ece96..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ /dev/null @@ -1,116 +0,0 @@ -postprocessTokens($tokens, $errorHandler); - - if (false !== $scream) { - ini_set('xdebug.scream', $scream); - } - - return $tokens; - } - - private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { - $chr = $token->text; - if ($chr === "\0") { - // PHP cuts error message after null byte, so need special case - $errorMsg = 'Unexpected null byte'; - } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); - } - - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $token->line, - 'endLine' => $token->line, - 'startFilePos' => $token->pos, - 'endFilePos' => $token->pos, - ])); - } - - private function isUnterminatedComment(Token $token): bool { - return $token->is([\T_COMMENT, \T_DOC_COMMENT]) - && substr($token->text, 0, 2) === '/*' - && substr($token->text, -2) !== '*/'; - } - - /** - * @param list $tokens - */ - protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { - // This function reports errors (bad characters and unterminated comments) in the token - // array, and performs certain canonicalizations: - // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and - // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. - // * Add a sentinel token with ID 0. - - $numTokens = \count($tokens); - if ($numTokens === 0) { - // Empty input edge case: Just add the sentinel token. - $tokens[] = new Token(0, "\0", 1, 0); - return; - } - - for ($i = 0; $i < $numTokens; $i++) { - $token = $tokens[$i]; - if ($token->id === \T_BAD_CHARACTER) { - $this->handleInvalidCharacter($token, $errorHandler); - } - - if ($token->id === \ord('&')) { - $next = $i + 1; - while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { - $next++; - } - $followedByVarOrVarArg = isset($tokens[$next]) && - $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); - $token->id = $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - } - } - - // Check for unterminated comment - $lastToken = $tokens[$numTokens - 1]; - if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $lastToken->line, - 'endLine' => $lastToken->getEndLine(), - 'startFilePos' => $lastToken->pos, - 'endFilePos' => $lastToken->getEndPos(), - ])); - } - - // Add sentinel token. - $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php deleted file mode 100644 index 3185e808..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ /dev/null @@ -1,230 +0,0 @@ - */ - private array $emulators = []; - - private PhpVersion $targetPhpVersion; - - private PhpVersion $hostPhpVersion; - - /** - * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. - */ - public function __construct(?PhpVersion $phpVersion = null) { - $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); - $this->hostPhpVersion = PhpVersion::getHostVersion(); - - $emulators = [ - new MatchTokenEmulator(), - new NullsafeTokenEmulator(), - new AttributeEmulator(), - new EnumTokenEmulator(), - new ReadonlyTokenEmulator(), - new ExplicitOctalEmulator(), - new ReadonlyFunctionTokenEmulator(), - new PropertyTokenEmulator(), - new AsymmetricVisibilityTokenEmulator(), - new PipeOperatorEmulator(), - new VoidCastEmulator(), - ]; - - // Collect emulators that are relevant for the PHP version we're running - // and the PHP version we're targeting for emulation. - foreach ($emulators as $emulator) { - $emulatorPhpVersion = $emulator->getPhpVersion(); - if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = $emulator; - } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { - $this->emulators[] = new ReverseEmulator($emulator); - } - } - } - - public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { - $emulators = array_filter($this->emulators, function ($emulator) use ($code) { - return $emulator->isEmulationNeeded($code); - }); - - if (empty($emulators)) { - // Nothing to emulate, yay - return parent::tokenize($code, $errorHandler); - } - - if ($errorHandler === null) { - $errorHandler = new ErrorHandler\Throwing(); - } - - $this->patches = []; - foreach ($emulators as $emulator) { - $code = $emulator->preprocessCode($code, $this->patches); - } - - $collector = new ErrorHandler\Collecting(); - $tokens = parent::tokenize($code, $collector); - $this->sortPatches(); - $tokens = $this->fixupTokens($tokens); - - $errors = $collector->getErrors(); - if (!empty($errors)) { - $this->fixupErrors($errors); - foreach ($errors as $error) { - $errorHandler->handleError($error); - } - } - - foreach ($emulators as $emulator) { - $tokens = $emulator->emulate($code, $tokens); - } - - return $tokens; - } - - private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->older($emulatorPhpVersion) - && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); - } - - private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { - return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) - && $this->targetPhpVersion->older($emulatorPhpVersion); - } - - private function sortPatches(): void { - // Patches may be contributed by different emulators. - // Make sure they are sorted by increasing patch position. - usort($this->patches, function ($p1, $p2) { - return $p1[0] <=> $p2[0]; - }); - } - - /** - * @param list $tokens - * @return list - */ - private function fixupTokens(array $tokens): array { - if (\count($this->patches) === 0) { - return $tokens; - } - - // Load first patch - $patchIdx = 0; - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // We use a manual loop over the tokens, because we modify the array on the fly - $posDelta = 0; - $lineDelta = 0; - for ($i = 0, $c = \count($tokens); $i < $c; $i++) { - $token = $tokens[$i]; - $pos = $token->pos; - $token->pos += $posDelta; - $token->line += $lineDelta; - $localPosDelta = 0; - $len = \strlen($token->text); - while ($patchPos >= $pos && $patchPos < $pos + $len) { - $patchTextLen = \strlen($patchText); - if ($patchType === 'remove') { - if ($patchPos === $pos && $patchTextLen === $len) { - // Remove token entirely - array_splice($tokens, $i, 1, []); - $i--; - $c--; - } else { - // Remove from token string - $token->text = substr_replace( - $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen - ); - $localPosDelta -= $patchTextLen; - } - $lineDelta -= \substr_count($patchText, "\n"); - } elseif ($patchType === 'add') { - // Insert into the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 - ); - $localPosDelta += $patchTextLen; - $lineDelta += \substr_count($patchText, "\n"); - } elseif ($patchType === 'replace') { - // Replace inside the token string - $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen - ); - } else { - assert(false); - } - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches. However, we still need to adjust position. - $patchPos = \PHP_INT_MAX; - break; - } - - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $posDelta += $localPosDelta; - } - return $tokens; - } - - /** - * Fixup line and position information in errors. - * - * @param Error[] $errors - */ - private function fixupErrors(array $errors): void { - foreach ($errors as $error) { - $attrs = $error->getAttributes(); - - $posDelta = 0; - $lineDelta = 0; - foreach ($this->patches as $patch) { - list($patchPos, $patchType, $patchText) = $patch; - if ($patchPos >= $attrs['startFilePos']) { - // No longer relevant - break; - } - - if ($patchType === 'add') { - $posDelta += strlen($patchText); - $lineDelta += substr_count($patchText, "\n"); - } elseif ($patchType === 'remove') { - $posDelta -= strlen($patchText); - $lineDelta -= substr_count($patchText, "\n"); - } - } - - $attrs['startFilePos'] += $posDelta; - $attrs['endFilePos'] += $posDelta; - $attrs['startLine'] += $lineDelta; - $attrs['endLine'] += $lineDelta; - $error->setAttributes($attrs); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php deleted file mode 100644 index 084bb75d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php +++ /dev/null @@ -1,93 +0,0 @@ - \T_PUBLIC_SET, - \T_PROTECTED => \T_PROTECTED_SET, - \T_PRIVATE => \T_PRIVATE_SET, - ]; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && - $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && - $tokens[$i + 3]->text === ')' && - $this->isKeywordContext($tokens, $i) - ) { - array_splice($tokens, $i, 4, [ - new Token( - $map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', - $token->line, $token->pos), - ]); - $c -= 3; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - $reverseMap = [ - \T_PUBLIC_SET => \T_PUBLIC, - \T_PROTECTED_SET => \T_PROTECTED, - \T_PRIVATE_SET => \T_PRIVATE, - ]; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if (isset($reverseMap[$token->id]) && - \preg_match('/(public|protected|private)\((set)\)/i', $token->text, $matches) - ) { - [, $modifier, $set] = $matches; - $modifierLen = \strlen($modifier); - array_splice($tokens, $i, 1, [ - new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), - new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), - new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), - new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4), - ]); - $i += 3; - $c += 3; - } - } - - return $tokens; - } - - /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool { - $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); - if ($prevToken === null) { - return false; - } - return $prevToken->id !== \T_OBJECT_OPERATOR - && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; - } - - /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { - for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i]->id === T_WHITESPACE) { - continue; - } - - return $tokens[$i]; - } - - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php deleted file mode 100644 index 2c12f33a..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ /dev/null @@ -1,49 +0,0 @@ -text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { - array_splice($tokens, $i, 2, [ - new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), - ]); - $c--; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // TODO - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - $pos = 0; - while (false !== $pos = strpos($code, '#[', $pos)) { - // Replace #[ with %[ - $code[$pos] = '%'; - $patches[] = [$pos, 'replace', '#']; - $pos += 2; - } - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php deleted file mode 100644 index 5418f52c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ /dev/null @@ -1,26 +0,0 @@ -id === \T_WHITESPACE - && $tokens[$pos + 2]->id === \T_STRING; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php deleted file mode 100644 index 9cadf420..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ /dev/null @@ -1,45 +0,0 @@ -id == \T_LNUMBER && $token->text === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) - ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); - array_splice($tokens, $i, 2, [ - new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), - ]); - $c--; - } - } - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int { - $str = substr($str, 1); - $str = str_replace('_', '', $str); - $num = octdec($str); - return is_float($num) ? \T_DNUMBER : \T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Explicit octals were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php deleted file mode 100644 index 066e7cd8..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ /dev/null @@ -1,60 +0,0 @@ -getKeywordString()) !== false; - } - - /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool { - $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); - if ($prevToken === null) { - return false; - } - return $prevToken->id !== \T_OBJECT_OPERATOR - && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; - } - - public function emulate(string $code, array $tokens): array { - $keywordString = $this->getKeywordString(); - foreach ($tokens as $i => $token) { - if ($token->id === T_STRING && strtolower($token->text) === $keywordString - && $this->isKeywordContext($tokens, $i)) { - $token->id = $this->getKeywordToken(); - } - } - - return $tokens; - } - - /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { - for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i]->id === T_WHITESPACE) { - continue; - } - - return $tokens[$i]; - } - - return null; - } - - public function reverseEmulate(string $code, array $tokens): array { - $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $token) { - if ($token->id === $keywordToken) { - $token->id = \T_STRING; - } - } - - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php deleted file mode 100644 index 0fa5fbc2..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { - array_splice($tokens, $i, 2, [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - ]); - $c--; - continue; - } - - // Handle ?-> inside encapsed string. - if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1]->id === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) - ) { - $replacement = [ - new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), - new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), - ]; - $matchLen = \strlen($matches[0]); - if ($matchLen !== \strlen($token->text)) { - $replacement[] = new Token( - \T_ENCAPSED_AND_WHITESPACE, - \substr($token->text, $matchLen), - $token->line, $token->pos + $matchLen - ); - } - array_splice($tokens, $i, 1, $replacement); - $c += \count($replacement) - 1; - continue; - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // ?-> was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php deleted file mode 100644 index b5616923..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php +++ /dev/null @@ -1,45 +0,0 @@ -') !== false; - } - - public function emulate(string $code, array $tokens): array { - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { - array_splice($tokens, $i, 2, [ - new Token(\T_PIPE, '|>', $token->line, $token->pos), - ]); - $c--; - } - } - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->id === \T_PIPE) { - array_splice($tokens, $i, 1, [ - new Token(\ord('|'), '|', $token->line, $token->pos), - new Token(\ord('>'), '>', $token->line, $token->pos + 1), - ]); - $i++; - $c++; - } - } - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php deleted file mode 100644 index 71b7fc23..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -text === '(' || - ($tokens[$pos + 1]->id === \T_WHITESPACE && - isset($tokens[$pos + 2]) && - $tokens[$pos + 2]->text === '('))); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php deleted file mode 100644 index 851b5c4a..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ /dev/null @@ -1,37 +0,0 @@ -emulator = $emulator; - } - - public function getPhpVersion(): PhpVersion { - return $this->emulator->getPhpVersion(); - } - - public function isEmulationNeeded(string $code): bool { - return $this->emulator->isEmulationNeeded($code); - } - - public function emulate(string $code, array $tokens): array { - return $this->emulator->reverseEmulate($code, $tokens); - } - - public function reverseEmulate(string $code, array $tokens): array { - return $this->emulator->emulate($code, $tokens); - } - - public function preprocessCode(string $code, array &$patches): string { - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php deleted file mode 100644 index fec2f19f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ /dev/null @@ -1,30 +0,0 @@ -text !== '(') { - continue; - } - - $numTokens = 1; - $text = '('; - $j = $i + 1; - if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$j]->text)) { - $text .= $tokens[$j]->text; - $numTokens++; - $j++; - } - - if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower($tokens[$j]->text) !== 'void') { - continue; - } - - $text .= $tokens[$j]->text; - $numTokens++; - $k = $j + 1; - if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$k]->text)) { - $text .= $tokens[$k]->text; - $numTokens++; - $k++; - } - - if ($k >= $c || $tokens[$k]->text !== ')') { - continue; - } - - $text .= ')'; - $numTokens++; - array_splice($tokens, $i, $numTokens, [ - new Token(\T_VOID_CAST, $text, $token->line, $token->pos), - ]); - $c -= $numTokens - 1; - } - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - if ($token->id !== \T_VOID_CAST) { - continue; - } - - if (!preg_match('/^\(([ \t]*)(void)([ \t]*)\)$/i', $token->text, $match)) { - throw new \LogicException('Unexpected T_VOID_CAST contents'); - } - - $newTokens = []; - $pos = $token->pos; - - $newTokens[] = new Token(\ord('('), '(', $token->line, $pos); - $pos++; - - if ($match[1] !== '') { - $newTokens[] = new Token(\T_WHITESPACE, $match[1], $token->line, $pos); - $pos += \strlen($match[1]); - } - - $newTokens[] = new Token(\T_STRING, $match[2], $token->line, $pos); - $pos += \strlen($match[2]); - - if ($match[3] !== '') { - $newTokens[] = new Token(\T_WHITESPACE, $match[3], $token->line, $pos); - $pos += \strlen($match[3]); - } - - $newTokens[] = new Token(\ord(')'), ')', $token->line, $pos); - - array_splice($tokens, $i, 1, $newTokens); - $i += \count($newTokens) - 1; - $c += \count($newTokens) - 1; - } - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php b/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php deleted file mode 100644 index 0f0f22d6..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php +++ /dev/null @@ -1,85 +0,0 @@ - 'public', - self::PROTECTED => 'protected', - self::PRIVATE => 'private', - self::STATIC => 'static', - self::ABSTRACT => 'abstract', - self::FINAL => 'final', - self::READONLY => 'readonly', - self::PUBLIC_SET => 'public(set)', - self::PROTECTED_SET => 'protected(set)', - self::PRIVATE_SET => 'private(set)', - ]; - - public static function toString(int $modifier): string { - if (!isset(self::TO_STRING_MAP[$modifier])) { - throw new \InvalidArgumentException("Unknown modifier $modifier"); - } - return self::TO_STRING_MAP[$modifier]; - } - - private static function isValidModifier(int $modifier): bool { - $isPow2 = ($modifier & ($modifier - 1)) == 0 && $modifier != 0; - return $isPow2 && $modifier <= self::PRIVATE_SET; - } - - /** - * @internal - */ - public static function verifyClassModifier(int $a, int $b): void { - assert(self::isValidModifier($b)); - if (($a & $b) != 0) { - throw new Error( - 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class'); - } - } - - /** - * @internal - */ - public static function verifyModifier(int $a, int $b): void { - assert(self::isValidModifier($b)); - if (($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) || - ($a & Modifiers::VISIBILITY_SET_MASK && $b & Modifiers::VISIBILITY_SET_MASK) - ) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if (($a & $b) != 0) { - throw new Error( - 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php deleted file mode 100644 index 2265ecce..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +++ /dev/null @@ -1,284 +0,0 @@ - [aliasName => originalName]] */ - protected array $aliases = []; - - /** @var Name[][] Same as $aliases but preserving original case */ - protected array $origAliases = []; - - /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; - - /** - * Create a name context. - * - * @param ErrorHandler $errorHandler Error handling used to report errors - */ - public function __construct(ErrorHandler $errorHandler) { - $this->errorHandler = $errorHandler; - } - - /** - * Start a new namespace. - * - * This also resets the alias table. - * - * @param Name|null $namespace Null is the global namespace - */ - public function startNamespace(?Name $namespace = null): void { - $this->namespace = $namespace; - $this->origAliases = $this->aliases = [ - Stmt\Use_::TYPE_NORMAL => [], - Stmt\Use_::TYPE_FUNCTION => [], - Stmt\Use_::TYPE_CONSTANT => [], - ]; - } - - /** - * Add an alias / import. - * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error - */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { - // Constant names are case sensitive, everything else case insensitive - if ($type === Stmt\Use_::TYPE_CONSTANT) { - $aliasLookupName = $aliasName; - } else { - $aliasLookupName = strtolower($aliasName); - } - - if (isset($this->aliases[$type][$aliasLookupName])) { - $typeStringMap = [ - Stmt\Use_::TYPE_NORMAL => '', - Stmt\Use_::TYPE_FUNCTION => 'function ', - Stmt\Use_::TYPE_CONSTANT => 'const ', - ]; - - $this->errorHandler->handleError(new Error( - sprintf( - 'Cannot use %s%s as %s because the name is already in use', - $typeStringMap[$type], $name, $aliasName - ), - $errorAttrs - )); - return; - } - - $this->aliases[$type][$aliasLookupName] = $name; - $this->origAliases[$type][$aliasName] = $name; - } - - /** - * Get current namespace. - * - * @return null|Name Namespace (or null if global namespace) - */ - public function getNamespace(): ?Name { - return $this->namespace; - } - - /** - * Get resolved name. - * - * @param Name $name Name to resolve - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} - * - * @return null|Name Resolved name, or null if static resolution is not possible - */ - public function getResolvedName(Name $name, int $type): ?Name { - // don't resolve special class names - if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { - if (!$name->isUnqualified()) { - $this->errorHandler->handleError(new Error( - sprintf("'\\%s' is an invalid class name", $name->toString()), - $name->getAttributes() - )); - } - return $name; - } - - // fully qualified names are already resolved - if ($name->isFullyQualified()) { - return $name; - } - - // Try to resolve aliases - if (null !== $resolvedName = $this->resolveAlias($name, $type)) { - return $resolvedName; - } - - if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) { - if (null === $this->namespace) { - // outside of a namespace unaliased unqualified is same as fully qualified - return new FullyQualified($name, $name->getAttributes()); - } - - // Cannot resolve statically - return null; - } - - // if no alias exists prepend current namespace - return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); - } - - /** - * Get resolved class name. - * - * @param Name $name Class ame to resolve - * - * @return Name Resolved name - */ - public function getResolvedClassName(Name $name): Name { - return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); - } - - /** - * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name[] Possible representations of the name - */ - public function getPossibleNames(string $name, int $type): array { - $lcName = strtolower($name); - - if ($type === Stmt\Use_::TYPE_NORMAL) { - // self, parent and static must always be unqualified - if ($lcName === "self" || $lcName === "parent" || $lcName === "static") { - return [new Name($name)]; - } - } - - // Collect possible ways to write this name, starting with the fully-qualified name - $possibleNames = [new FullyQualified($name)]; - - if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) { - // Make sure there is no alias that makes the normally namespace-relative name - // into something else - if (null === $this->resolveAlias($nsRelativeName, $type)) { - $possibleNames[] = $nsRelativeName; - } - } - - // Check for relevant namespace use statements - foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) { - $lcOrig = $orig->toLowerString(); - if (0 === strpos($lcName, $lcOrig . '\\')) { - $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig))); - } - } - - // Check for relevant type-specific use statements - foreach ($this->origAliases[$type] as $alias => $orig) { - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // Constants are complicated-sensitive - $normalizedOrig = $this->normalizeConstName($orig->toString()); - if ($normalizedOrig === $this->normalizeConstName($name)) { - $possibleNames[] = new Name($alias); - } - } else { - // Everything else is case-insensitive - if ($orig->toLowerString() === $lcName) { - $possibleNames[] = new Name($alias); - } - } - } - - return $possibleNames; - } - - /** - * Get shortest representation of this fully-qualified name. - * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name Shortest representation - */ - public function getShortName(string $name, int $type): Name { - $possibleNames = $this->getPossibleNames($name, $type); - - // Find shortest name - $shortestName = null; - $shortestLength = \INF; - foreach ($possibleNames as $possibleName) { - $length = strlen($possibleName->toCodeString()); - if ($length < $shortestLength) { - $shortestName = $possibleName; - $shortestLength = $length; - } - } - - return $shortestName; - } - - private function resolveAlias(Name $name, int $type): ?FullyQualified { - $firstPart = $name->getFirst(); - - if ($name->isQualified()) { - // resolve aliases for qualified names, always against class alias table - $checkName = strtolower($firstPart); - if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) { - $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName]; - return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); - } - } elseif ($name->isUnqualified()) { - // constant aliases are case-sensitive, function aliases case-insensitive - $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart); - if (isset($this->aliases[$type][$checkName])) { - // resolve unqualified aliases - return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes()); - } - } - - // No applicable aliases - return null; - } - - private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { - if (null === $this->namespace) { - return new Name($name); - } - - if ($type === Stmt\Use_::TYPE_CONSTANT) { - // The constants true/false/null always resolve to the global symbols, even inside a - // namespace, so they may be used without qualification - if ($lcName === "true" || $lcName === "false" || $lcName === "null") { - return new Name($name); - } - } - - $namespacePrefix = strtolower($this->namespace . '\\'); - if (0 === strpos($lcName, $namespacePrefix)) { - return new Name(substr($name, strlen($namespacePrefix))); - } - - return null; - } - - private function normalizeConstName(string $name): string { - $nsSep = strrpos($name, '\\'); - if (false === $nsSep) { - return $name; - } - - // Constants have case-insensitive namespace and case-sensitive short-name - $ns = substr($name, 0, $nsSep); - $shortName = substr($name, $nsSep + 1); - return strtolower($ns) . '\\' . $shortName; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php deleted file mode 100644 index fd2a9b72..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node.php +++ /dev/null @@ -1,150 +0,0 @@ - - */ - public function getAttributes(): array; - - /** - * Replaces all the attributes of this node. - * - * @param array $attributes - */ - public function setAttributes(array $attributes): void; -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php deleted file mode 100644 index 6680efac..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ /dev/null @@ -1,44 +0,0 @@ - $attributes Additional attributes - * @param Identifier|null $name Parameter name (for named parameters) - */ - public function __construct( - Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - ?Identifier $name = null - ) { - $this->attributes = $attributes; - $this->name = $name; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames(): array { - return ['name', 'value', 'byRef', 'unpack']; - } - - public function getType(): string { - return 'Arg'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php deleted file mode 100644 index fa1cff52..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +++ /dev/null @@ -1,43 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { - $this->attributes = $attributes; - $this->key = $key; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames(): array { - return ['key', 'value', 'byRef', 'unpack']; - } - - public function getType(): string { - return 'ArrayItem'; - } -} - -// @deprecated compatibility alias -class_alias(ArrayItem::class, Expr\ArrayItem::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php deleted file mode 100644 index 9d892436..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ /dev/null @@ -1,33 +0,0 @@ - Attribute arguments */ - public array $args; - - /** - * @param Node\Name $name Attribute name - * @param list $args Attribute arguments - * @param array $attributes Additional node attributes - */ - public function __construct(Name $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['name', 'args']; - } - - public function getType(): string { - return 'Attribute'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php deleted file mode 100644 index b9eb588d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional node attributes - */ - public function __construct(array $attrs, array $attributes = []) { - $this->attributes = $attributes; - $this->attrs = $attrs; - } - - public function getSubNodeNames(): array { - return ['attrs']; - } - - public function getType(): string { - return 'AttributeGroup'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php deleted file mode 100644 index e313280b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +++ /dev/null @@ -1,36 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->byRef = $byRef; - } - - public function getSubNodeNames(): array { - return ['var', 'byRef']; - } - - public function getType(): string { - return 'ClosureUse'; - } -} - -// @deprecated compatibility alias -class_alias(ClosureUse::class, Expr\ClosureUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php deleted file mode 100644 index 05a5e5ee..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['name', 'value']; - } - - public function getType(): string { - return 'Const'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php deleted file mode 100644 index 55c1fe4f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +++ /dev/null @@ -1,37 +0,0 @@ -value pair node. - * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value - * @param array $attributes Additional attributes - */ - public function __construct($key, Node\Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->key = \is_string($key) ? new Node\Identifier($key) : $key; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['key', 'value']; - } - - public function getType(): string { - return 'DeclareItem'; - } -} - -// @deprecated compatibility alias -class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php deleted file mode 100644 index 8b7dbb6c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +++ /dev/null @@ -1,8 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->dim = $dim; - } - - public function getSubNodeNames(): array { - return ['var', 'dim']; - } - - public function getType(): string { - return 'Expr_ArrayDimFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php deleted file mode 100644 index be9d0708..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $items = [], array $attributes = []) { - $this->attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames(): array { - return ['items']; - } - - public function getType(): string { - return 'Expr_Array'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php deleted file mode 100644 index 0e98ce9f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ /dev/null @@ -1,84 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes, array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->expr = $subNodes['expr']; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** - * @return Node\Stmt\Return_[] - */ - public function getStmts(): array { - return [new Node\Stmt\Return_($this->expr)]; - } - - public function getType(): string { - return 'Expr_ArrowFunction'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php deleted file mode 100644 index dcbf84dd..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } - - public function getType(): string { - return 'Expr_Assign'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php deleted file mode 100644 index 5209a64b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php deleted file mode 100644 index 4f3623fb..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['var', 'expr']; - } - - public function getType(): string { - return 'Expr_AssignRef'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php deleted file mode 100644 index 1b92bd4f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $left, Expr $right, array $attributes = []) { - $this->attributes = $attributes; - $this->left = $left; - $this->right = $right; - } - - public function getSubNodeNames(): array { - return ['left', 'right']; - } - - /** - * Get the operator sigil for this binary operation. - * - * In the case there are multiple possible sigils for an operator, this method does not - * necessarily return the one used in the parsed code. - */ - abstract public function getOperatorSigil(): string; -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php deleted file mode 100644 index 5930c541..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Greater'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php deleted file mode 100644 index 4d440b10..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ /dev/null @@ -1,15 +0,0 @@ -='; - } - - public function getType(): string { - return 'Expr_BinaryOp_GreaterOrEqual'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php deleted file mode 100644 index e25d17cd..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Pipe'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php deleted file mode 100644 index fe34b84c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +++ /dev/null @@ -1,15 +0,0 @@ ->'; - } - - public function getType(): string { - return 'Expr_BinaryOp_ShiftRight'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php deleted file mode 100644 index 01e9b231..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ /dev/null @@ -1,15 +0,0 @@ -'; - } - - public function getType(): string { - return 'Expr_BinaryOp_Spaceship'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php deleted file mode 100644 index b7175a7a..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_BitwiseNot'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php deleted file mode 100644 index c66d2332..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_BooleanNot'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php deleted file mode 100644 index 86e781c1..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ - abstract public function getRawArgs(): array; - - /** - * Returns whether this call expression is actually a first class callable. - */ - public function isFirstClassCallable(): bool { - $rawArgs = $this->getRawArgs(); - return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; - } - - /** - * Assert that this is not a first-class callable and return only ordinary Args. - * - * @return Arg[] - */ - public function getArgs(): array { - assert(!$this->isFirstClassCallable()); - return $this->getRawArgs(); - } - - /** - * Retrieves a specific argument from the raw arguments. - * - * Returns the named argument that matches the given `$name`, or the - * positional (unnamed) argument that exists at the given `$position`, - * otherwise, returns `null` for first-class callables or if no match is found. - */ - public function getArg(string $name, int $position): ?Arg { - if ($this->isFirstClassCallable()) { - return null; - } - foreach ($this->getRawArgs() as $i => $arg) { - if ($arg->unpack) { - continue; - } - if ( - ($arg->name !== null && $arg->name->toString() === $name) - || ($arg->name === null && $i === $position) - ) { - return $arg; - } - } - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php deleted file mode 100644 index c2751de4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ /dev/null @@ -1,25 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php deleted file mode 100644 index 471cb824..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['class', 'name']; - } - - public function getType(): string { - return 'Expr_ClassConstFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php deleted file mode 100644 index d85bc9ab..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Clone'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php deleted file mode 100644 index 0680446f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ /dev/null @@ -1,86 +0,0 @@ - false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'uses' => array(): use()s - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->static = $subNodes['static'] ?? false; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->uses = $subNodes['uses'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - /** @return Node\Stmt[] */ - public function getStmts(): array { - return $this->stmts; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - public function getType(): string { - return 'Expr_Closure'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php deleted file mode 100644 index b3956172..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Name $name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Expr_ConstFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php deleted file mode 100644 index d2f30506..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Empty'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php deleted file mode 100644 index 43010ac4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return []; - } - - public function getType(): string { - return 'Expr_Error'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php deleted file mode 100644 index 32625a23..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_ErrorSuppress'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php deleted file mode 100644 index 5120b1b4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Eval'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php deleted file mode 100644 index cf002466..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Expr $expr = null, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Exit'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php deleted file mode 100644 index 0b85840d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ /dev/null @@ -1,38 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr $name Function name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['name', 'args']; - } - - public function getType(): string { - return 'Expr_FuncCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php deleted file mode 100644 index e1187b19..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ /dev/null @@ -1,38 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, int $type, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['expr', 'type']; - } - - public function getType(): string { - return 'Expr_Include'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php deleted file mode 100644 index a2783cb3..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, Node $class, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->class = $class; - } - - public function getSubNodeNames(): array { - return ['expr', 'class']; - } - - public function getType(): string { - return 'Expr_Instanceof'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php deleted file mode 100644 index 4f80fff7..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Expr_Isset'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php deleted file mode 100644 index 496b7b38..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ /dev/null @@ -1,34 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $items, array $attributes = []) { - $this->attributes = $attributes; - $this->items = $items; - } - - public function getSubNodeNames(): array { - return ['items']; - } - - public function getType(): string { - return 'Expr_List'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php deleted file mode 100644 index cd028a2d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ /dev/null @@ -1,32 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->arms = $arms; - } - - public function getSubNodeNames(): array { - return ['cond', 'arms']; - } - - public function getType(): string { - return 'Expr_Match'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php deleted file mode 100644 index 2703c75d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['var', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_MethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php deleted file mode 100644 index eedaaa1e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ /dev/null @@ -1,40 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a function call node. - * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $class, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['class', 'args']; - } - - public function getType(): string { - return 'Expr_New'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php deleted file mode 100644 index a151f715..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a nullsafe method call node. - * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['var', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_NullsafeMethodCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php deleted file mode 100644 index 6f73a16d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['var', 'name']; - } - - public function getType(): string { - return 'Expr_NullsafePropertyFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php deleted file mode 100644 index 3dca8fdc..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PostDec'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php deleted file mode 100644 index bc990c30..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PostInc'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php deleted file mode 100644 index 2f168730..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PreDec'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php deleted file mode 100644 index fd455f55..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - } - - public function getSubNodeNames(): array { - return ['var']; - } - - public function getType(): string { - return 'Expr_PreInc'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php deleted file mode 100644 index 60574760..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Print'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php deleted file mode 100644 index 8c416a8c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ /dev/null @@ -1,35 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $var, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['var', 'name']; - } - - public function getType(): string { - return 'Expr_PropertyFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php deleted file mode 100644 index e4003512..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $parts, array $attributes = []) { - $this->attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames(): array { - return ['parts']; - } - - public function getType(): string { - return 'Expr_ShellExec'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php deleted file mode 100644 index 707f34b6..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ /dev/null @@ -1,45 +0,0 @@ - Arguments */ - public array $args; - - /** - * Constructs a static method call node. - * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $args = [], array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->args = $args; - } - - public function getSubNodeNames(): array { - return ['class', 'name', 'args']; - } - - public function getType(): string { - return 'Expr_StaticCall'; - } - - public function getRawArgs(): array { - return $this->args; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php deleted file mode 100644 index 4836a65b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ /dev/null @@ -1,36 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $class, $name, array $attributes = []) { - $this->attributes = $attributes; - $this->class = $class; - $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['class', 'name']; - } - - public function getType(): string { - return 'Expr_StaticPropertyFetch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php deleted file mode 100644 index d4837e64..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->if = $if; - $this->else = $else; - } - - public function getSubNodeNames(): array { - return ['cond', 'if', 'else']; - } - - public function getType(): string { - return 'Expr_Ternary'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php deleted file mode 100644 index ee49f835..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_Throw'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php deleted file mode 100644 index cd06f74b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_UnaryMinus'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php deleted file mode 100644 index 1b44f7b3..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_UnaryPlus'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php deleted file mode 100644 index bab74920..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Expr_Variable'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php deleted file mode 100644 index 5cff88f8..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Expr_YieldFrom'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php deleted file mode 100644 index bd81e69b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { - $this->attributes = $attributes; - $this->key = $key; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['key', 'value']; - } - - public function getType(): string { - return 'Expr_Yield'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php deleted file mode 100644 index 58f653a8..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ /dev/null @@ -1,40 +0,0 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs an identifier node. - * - * @param string $name Identifier as string - * @param array $attributes Additional attributes - */ - public function __construct(string $name, array $attributes = []) { - if ($name === '') { - throw new \InvalidArgumentException('Identifier name cannot be empty'); - } - - $this->attributes = $attributes; - $this->name = $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - /** - * Get identifier as string. - * - * @psalm-return non-empty-string - * @return string Identifier as string. - */ - public function toString(): string { - return $this->name; - } - - /** - * Get lowercased identifier as string. - * - * @psalm-return non-empty-string&lowercase-string - * @return string Lowercased identifier as string - */ - public function toLowerString(): string { - return strtolower($this->name); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName(): bool { - return isset(self::$specialClassNames[strtolower($this->name)]); - } - - /** - * Get identifier as string. - * - * @psalm-return non-empty-string - * @return string Identifier as string - */ - public function __toString(): string { - return $this->name; - } - - public function getType(): string { - return 'Identifier'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php deleted file mode 100644 index 576dac46..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +++ /dev/null @@ -1,32 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - public function getType(): string { - return 'InterpolatedStringPart'; - } -} - -// @deprecated compatibility alias -class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php deleted file mode 100644 index 3b39cf10..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $types, array $attributes = []) { - $this->attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames(): array { - return ['types']; - } - - public function getType(): string { - return 'IntersectionType'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php deleted file mode 100644 index 192216df..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +++ /dev/null @@ -1,29 +0,0 @@ - */ - public ?array $conds; - public Expr $body; - - /** - * @param null|list $conds - */ - public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { - $this->conds = $conds; - $this->body = $body; - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return ['conds', 'body']; - } - - public function getType(): string { - return 'MatchArm'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php deleted file mode 100644 index 932080b5..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ /dev/null @@ -1,278 +0,0 @@ - */ - private static array $specialClassNames = [ - 'self' => true, - 'parent' => true, - 'static' => true, - ]; - - /** - * Constructs a name node. - * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes - */ - final public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = self::prepareName($name); - } - - public function getSubNodeNames(): array { - return ['name']; - } - - /** - * Get parts of name (split by the namespace separator). - * - * @psalm-return non-empty-list - * @return string[] Parts of name - */ - public function getParts(): array { - return \explode('\\', $this->name); - } - - /** - * Gets the first part of the name, i.e. everything before the first namespace separator. - * - * @return string First part of the name - */ - public function getFirst(): string { - if (false !== $pos = \strpos($this->name, '\\')) { - return \substr($this->name, 0, $pos); - } - return $this->name; - } - - /** - * Gets the last part of the name, i.e. everything after the last namespace separator. - * - * @return string Last part of the name - */ - public function getLast(): string { - if (false !== $pos = \strrpos($this->name, '\\')) { - return \substr($this->name, $pos + 1); - } - return $this->name; - } - - /** - * Checks whether the name is unqualified. (E.g. Name) - * - * @return bool Whether the name is unqualified - */ - public function isUnqualified(): bool { - return false === \strpos($this->name, '\\'); - } - - /** - * Checks whether the name is qualified. (E.g. Name\Name) - * - * @return bool Whether the name is qualified - */ - public function isQualified(): bool { - return false !== \strpos($this->name, '\\'); - } - - /** - * Checks whether the name is fully qualified. (E.g. \Name) - * - * @return bool Whether the name is fully qualified - */ - public function isFullyQualified(): bool { - return false; - } - - /** - * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) - * - * @return bool Whether the name is relative - */ - public function isRelative(): bool { - return false; - } - - /** - * Returns a string representation of the name itself, without taking the name type into - * account (e.g., not including a leading backslash for fully qualified names). - * - * @psalm-return non-empty-string - * @return string String representation - */ - public function toString(): string { - return $this->name; - } - - /** - * Returns a string representation of the name as it would occur in code (e.g., including - * leading backslash for fully qualified names. - * - * @psalm-return non-empty-string - * @return string String representation - */ - public function toCodeString(): string { - return $this->toString(); - } - - /** - * Returns lowercased string representation of the name, without taking the name type into - * account (e.g., no leading backslash for fully qualified names). - * - * @psalm-return non-empty-string&lowercase-string - * @return string Lowercased string representation - */ - public function toLowerString(): string { - return strtolower($this->name); - } - - /** - * Checks whether the identifier is a special class name (self, parent or static). - * - * @return bool Whether identifier is a special class name - */ - public function isSpecialClassName(): bool { - return isset(self::$specialClassNames[strtolower($this->name)]); - } - - /** - * Returns a string representation of the name by imploding the namespace parts with the - * namespace separator. - * - * @psalm-return non-empty-string - * @return string String representation - */ - public function __toString(): string { - return $this->name; - } - - /** - * Gets a slice of a name (similar to array_slice). - * - * This method returns a new instance of the same type as the original and with the same - * attributes. - * - * If the slice is empty, null is returned. The null value will be correctly handled in - * concatenations using concat(). - * - * Offset and length have the same meaning as in array_slice(). - * - * @param int $offset Offset to start the slice at (may be negative) - * @param int|null $length Length of the slice (may be negative) - * - * @return static|null Sliced name - */ - public function slice(int $offset, ?int $length = null) { - if ($offset === 1 && $length === null) { - // Short-circuit the common case. - if (false !== $pos = \strpos($this->name, '\\')) { - return new static(\substr($this->name, $pos + 1)); - } - return null; - } - - $parts = \explode('\\', $this->name); - $numParts = \count($parts); - - $realOffset = $offset < 0 ? $offset + $numParts : $offset; - if ($realOffset < 0 || $realOffset > $numParts) { - throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); - } - - if (null === $length) { - $realLength = $numParts - $realOffset; - } else { - $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts - $realOffset) { - throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); - } - } - - if ($realLength === 0) { - // Empty slice is represented as null - return null; - } - - return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); - } - - /** - * Concatenate two names, yielding a new Name instance. - * - * The type of the generated instance depends on which class this method is called on, for - * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. - * - * If one of the arguments is null, a new instance of the other name will be returned. If both - * arguments are null, null will be returned. As such, writing - * Name::concat($namespace, $shortName) - * where $namespace is a Name node or null will work as expected. - * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name - * - * @return static|null Concatenated name - */ - public static function concat($name1, $name2, array $attributes = []) { - if (null === $name1 && null === $name2) { - return null; - } - if (null === $name1) { - return new static($name2, $attributes); - } - if (null === $name2) { - return new static($name1, $attributes); - } else { - return new static( - self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes - ); - } - } - - /** - * Prepares a (string, array or Name node) name for use in name changing methods by converting - * it to a string. - * - * @param string|string[]|self $name Name to prepare - * - * @psalm-return non-empty-string - * @return string Prepared name - */ - private static function prepareName($name): string { - if (\is_string($name)) { - if ('' === $name) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return $name; - } - if (\is_array($name)) { - if (empty($name)) { - throw new \InvalidArgumentException('Name cannot be empty'); - } - - return implode('\\', $name); - } - if ($name instanceof self) { - return $name->name; - } - - throw new \InvalidArgumentException( - 'Expected string, array of parts or Name instance' - ); - } - - public function getType(): string { - return 'Name'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php deleted file mode 100644 index 21183786..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ /dev/null @@ -1,49 +0,0 @@ -toString(); - } - - public function getType(): string { - return 'Name_FullyQualified'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php deleted file mode 100644 index 0226a4e4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ /dev/null @@ -1,49 +0,0 @@ -toString(); - } - - public function getType(): string { - return 'Name_Relative'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php deleted file mode 100644 index b99acd13..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node $type, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['type']; - } - - public function getType(): string { - return 'NullableType'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php deleted file mode 100644 index 6634930b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ /dev/null @@ -1,119 +0,0 @@ - $attributes Additional attributes - * @param int $flags Optional visibility flags - * @param list $attrGroups PHP attribute groups - * @param PropertyHook[] $hooks Property hooks for promoted properties - */ - public function __construct( - Expr $var, ?Expr $default = null, ?Node $type = null, - bool $byRef = false, bool $variadic = false, - array $attributes = [], - int $flags = 0, - array $attrGroups = [], - array $hooks = [] - ) { - $this->attributes = $attributes; - $this->type = $type; - $this->byRef = $byRef; - $this->variadic = $variadic; - $this->var = $var; - $this->default = $default; - $this->flags = $flags; - $this->attrGroups = $attrGroups; - $this->hooks = $hooks; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default', 'hooks']; - } - - public function getType(): string { - return 'Param'; - } - - /** - * Whether this parameter uses constructor property promotion. - */ - public function isPromoted(): bool { - return $this->flags !== 0 || $this->hooks !== []; - } - - public function isPublic(): bool { - $public = (bool) ($this->flags & Modifiers::PUBLIC); - if ($public) { - return true; - } - - if (!$this->isPromoted()) { - return false; - } - - return ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } - - /** - * Whether the promoted property has explicit public(set) visibility. - */ - public function isPublicSet(): bool { - return (bool) ($this->flags & Modifiers::PUBLIC_SET); - } - - /** - * Whether the promoted property has explicit protected(set) visibility. - */ - public function isProtectedSet(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED_SET); - } - - /** - * Whether the promoted property has explicit private(set) visibility. - */ - public function isPrivateSet(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE_SET); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php deleted file mode 100644 index 349b9cef..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php +++ /dev/null @@ -1,105 +0,0 @@ - 0 : Flags - * 'byRef' => false : Whether hook returns by reference - * 'params' => array(): Parameters - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, $body, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - $this->body = $body; - $this->flags = $subNodes['flags'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; - $this->params = $subNodes['params'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return null; - } - - /** - * Whether the property hook is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - public function getStmts(): ?array { - if ($this->body instanceof Expr) { - $name = $this->name->toLowerString(); - if ($name === 'get') { - return [new Return_($this->body)]; - } - if ($name === 'set') { - if (!$this->hasAttribute('propertyName')) { - throw new \LogicException( - 'Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); - } - - $propName = $this->getAttribute('propertyName'); - $prop = new PropertyFetch(new Variable('this'), (string) $propName); - return [new Expression(new Assign($prop, $this->body))]; - } - throw new \LogicException('Unknown property hook "' . $name . '"'); - } - return $this->body; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - public function getType(): string { - return 'PropertyHook'; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body']; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php deleted file mode 100644 index 101611e6..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; - $this->default = $default; - } - - public function getSubNodeNames(): array { - return ['name', 'default']; - } - - public function getType(): string { - return 'PropertyItem'; - } -} - -// @deprecated compatibility alias -class_alias(PropertyItem::class, Stmt\PropertyProperty::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php deleted file mode 100644 index 3df25721..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ /dev/null @@ -1,6 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(float $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * @param mixed[] $attributes - */ - public static function fromString(string $str, array $attributes = []): Float_ { - $attributes['rawValue'] = $str; - $float = self::parse($str); - - return new Float_($float, $attributes); - } - - /** - * @internal - * - * Parses a DNUMBER token like PHP would. - * - * @param string $str A string number - * - * @return float The parsed number - */ - public static function parse(string $str): float { - $str = str_replace('_', '', $str); - - // Check whether this is one of the special integer notations. - if ('0' === $str[0]) { - // hex - if ('x' === $str[1] || 'X' === $str[1]) { - return hexdec($str); - } - - // bin - if ('b' === $str[1] || 'B' === $str[1]) { - return bindec($str); - } - - // oct, but only if the string does not contain any of '.eE'. - if (false === strpbrk($str, '.eE')) { - // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit - // (8 or 9) so that only the digits before that are used. - return octdec(substr($str, 0, strcspn($str, '89'))); - } - } - - // dec - return (float) $str; - } - - public function getType(): string { - return 'Scalar_Float'; - } -} - -// @deprecated compatibility alias -class_alias(Float_::class, DNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php deleted file mode 100644 index bcc257a6..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +++ /dev/null @@ -1,82 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(int $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * Constructs an Int node from a string number literal. - * - * @param string $str String number literal (decimal, octal, hex or binary) - * @param array $attributes Additional attributes - * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) - * - * @return Int_ The constructed LNumber, including kind attribute - */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { - $attributes['rawValue'] = $str; - - $str = str_replace('_', '', $str); - - if ('0' !== $str[0] || '0' === $str) { - $attributes['kind'] = Int_::KIND_DEC; - return new Int_((int) $str, $attributes); - } - - if ('x' === $str[1] || 'X' === $str[1]) { - $attributes['kind'] = Int_::KIND_HEX; - return new Int_(hexdec($str), $attributes); - } - - if ('b' === $str[1] || 'B' === $str[1]) { - $attributes['kind'] = Int_::KIND_BIN; - return new Int_(bindec($str), $attributes); - } - - if (!$allowInvalidOctal && strpbrk($str, '89')) { - throw new Error('Invalid numeric literal', $attributes); - } - - // Strip optional explicit octal prefix. - if ('o' === $str[1] || 'O' === $str[1]) { - $str = substr($str, 2); - } - - // use intval instead of octdec to get proper cutting behavior with malformed numbers - $attributes['kind'] = Int_::KIND_OCT; - return new Int_(intval($str, 8), $attributes); - } - - public function getType(): string { - return 'Scalar_Int'; - } -} - -// @deprecated compatibility alias -class_alias(Int_::class, LNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php deleted file mode 100644 index 9336dfe4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +++ /dev/null @@ -1,34 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $parts, array $attributes = []) { - $this->attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames(): array { - return ['parts']; - } - - public function getType(): string { - return 'Scalar_InterpolatedString'; - } -} - -// @deprecated compatibility alias -class_alias(InterpolatedString::class, Encapsed::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php deleted file mode 100644 index 0d128710..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getSubNodeNames(): array { - return []; - } - - /** - * Get name of magic constant. - * - * @return string Name of magic constant - */ - abstract public function getName(): string; -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php deleted file mode 100644 index 732ed140..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ /dev/null @@ -1,15 +0,0 @@ - Escaped character to its decoded value */ - protected static array $replacements = [ - '\\' => '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", - ]; - - /** - * Constructs a string scalar node. - * - * @param string $value Value of the string - * @param array $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * @param array $attributes - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { - $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) - ? Scalar\String_::KIND_SINGLE_QUOTED - : Scalar\String_::KIND_DOUBLE_QUOTED; - - $attributes['rawValue'] = $str; - - $string = self::parse($str, $parseUnicodeEscape); - - return new self($string, $attributes); - } - - /** - * @internal - * - * Parses a string token. - * - * @param string $str String token content - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string The parsed string - */ - public static function parse(string $str, bool $parseUnicodeEscape = true): string { - $bLength = 0; - if ('b' === $str[0] || 'B' === $str[0]) { - $bLength = 1; - } - - if ('\'' === $str[$bLength]) { - return str_replace( - ['\\\\', '\\\''], - ['\\', '\''], - substr($str, $bLength + 1, -1) - ); - } else { - return self::parseEscapeSequences( - substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape - ); - } - } - - /** - * @internal - * - * Parses escape sequences in strings (all string types apart from single quoted). - * - * @param string $str String without quotes - * @param null|string $quote Quote type - * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes - * - * @return string String with escape sequences parsed - */ - public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { - if (null !== $quote) { - $str = str_replace('\\' . $quote, $quote, $str); - } - - $extra = ''; - if ($parseUnicodeEscape) { - $extra = '|u\{([0-9a-fA-F]+)\}'; - } - - return preg_replace_callback( - '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function ($matches) { - $str = $matches[1]; - - if (isset(self::$replacements[$str])) { - return self::$replacements[$str]; - } - if ('x' === $str[0] || 'X' === $str[0]) { - return chr(hexdec(substr($str, 1))); - } - if ('u' === $str[0]) { - $dec = hexdec($matches[2]); - // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. - return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); - } else { - return chr(octdec($str)); - } - }, - $str - ); - } - - /** - * Converts a Unicode code point to its UTF-8 encoded representation. - * - * @param int $num Code point - * - * @return string UTF-8 representation of code point - */ - private static function codePointToUtf8(int $num): string { - if ($num <= 0x7F) { - return chr($num); - } - if ($num <= 0x7FF) { - return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0xFFFF) { - return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - if ($num <= 0x1FFFFF) { - return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) - . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); - } - throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); - } - - public function getType(): string { - return 'Scalar_String'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php deleted file mode 100644 index 517c0edd..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +++ /dev/null @@ -1,39 +0,0 @@ - $attributes Additional attributes - */ - public function __construct( - Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] - ) { - $this->attributes = $attributes; - $this->var = $var; - $this->default = $default; - } - - public function getSubNodeNames(): array { - return ['var', 'default']; - } - - public function getType(): string { - return 'StaticVar'; - } -} - -// @deprecated compatibility alias -class_alias(StaticVar::class, Stmt\StaticVar::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php deleted file mode 100644 index 481d31a9..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ /dev/null @@ -1,8 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts, array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - } - - public function getType(): string { - return 'Stmt_Block'; - } - - public function getSubNodeNames(): array { - return ['stmts']; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php deleted file mode 100644 index d2bcc5eb..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { - $this->attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames(): array { - return ['num']; - } - - public function getType(): string { - return 'Stmt_Break'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php deleted file mode 100644 index a06ca183..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Case'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php deleted file mode 100644 index e8d39c9c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ /dev/null @@ -1,40 +0,0 @@ - $attributes Additional attributes - */ - public function __construct( - array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] - ) { - $this->attributes = $attributes; - $this->types = $types; - $this->var = $var; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['types', 'var', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Catch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php deleted file mode 100644 index 9bdce1f1..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ /dev/null @@ -1,77 +0,0 @@ - $attributes Additional attributes - * @param list $attrGroups PHP attribute groups - * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration - */ - public function __construct( - array $consts, - int $flags = 0, - array $attributes = [], - array $attrGroups = [], - ?Node $type = null - ) { - $this->attributes = $attributes; - $this->flags = $flags; - $this->consts = $consts; - $this->attrGroups = $attrGroups; - $this->type = $type; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'consts']; - } - - /** - * Whether constant is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether constant is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether constant is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether constant is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - public function getType(): string { - return 'Stmt_ClassConst'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php deleted file mode 100644 index e652177c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ /dev/null @@ -1,109 +0,0 @@ - - */ - public function getTraitUses(): array { - $traitUses = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof TraitUse) { - $traitUses[] = $stmt; - } - } - return $traitUses; - } - - /** - * @return list - */ - public function getConstants(): array { - $constants = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassConst) { - $constants[] = $stmt; - } - } - return $constants; - } - - /** - * @return list - */ - public function getProperties(): array { - $properties = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - $properties[] = $stmt; - } - } - return $properties; - } - - /** - * Gets property with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the property - * - * @return Property|null Property node or null if the property does not exist - */ - public function getProperty(string $name): ?Property { - foreach ($this->stmts as $stmt) { - if ($stmt instanceof Property) { - foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { - return $stmt; - } - } - } - } - return null; - } - - /** - * Gets all methods defined directly in this class/interface/trait - * - * @return list - */ - public function getMethods(): array { - $methods = []; - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod) { - $methods[] = $stmt; - } - } - return $methods; - } - - /** - * Gets method with the given name defined directly in this class/interface/trait. - * - * @param string $name Name of the method (compared case-insensitively) - * - * @return ClassMethod|null Method node or null if the method does not exist - */ - public function getMethod(string $name): ?ClassMethod { - $lowerName = strtolower($name); - foreach ($this->stmts as $stmt) { - if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { - return $stmt; - } - } - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php deleted file mode 100644 index 59c0519e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ /dev/null @@ -1,154 +0,0 @@ - */ - private static array $magicNames = [ - '__construct' => true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, - '__serialize' => true, - '__unserialize' => true, - ]; - - /** - * Constructs a class method node. - * - * @param string|Node\Identifier $name Name - * @param array{ - * flags?: int, - * byRef?: bool, - * params?: Node\Param[], - * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, - * stmts?: Node\Stmt[]|null, - * attrGroups?: Node\AttributeGroup[], - * } $subNodes Array of the following optional subnodes: - * 'flags => 0 : Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getStmts(): ?array { - return $this->stmts; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** - * Whether the method is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether the method is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether the method is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether the method is abstract. - */ - public function isAbstract(): bool { - return (bool) ($this->flags & Modifiers::ABSTRACT); - } - - /** - * Whether the method is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - /** - * Whether the method is static. - */ - public function isStatic(): bool { - return (bool) ($this->flags & Modifiers::STATIC); - } - - /** - * Whether the method is magic. - */ - public function isMagic(): bool { - return isset(self::$magicNames[$this->name->toLowerString()]); - } - - public function getType(): string { - return 'Stmt_ClassMethod'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php deleted file mode 100644 index 3f492b7b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ /dev/null @@ -1,94 +0,0 @@ - 0 : Flags - * 'extends' => null : Name of extended class - * 'implements' => array(): Names of implemented interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; - } - - /** - * Whether the class is explicitly abstract. - */ - public function isAbstract(): bool { - return (bool) ($this->flags & Modifiers::ABSTRACT); - } - - /** - * Whether the class is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } - - /** - * Whether the class is anonymous. - */ - public function isAnonymous(): bool { - return null === $this->name; - } - - public function getType(): string { - return 'Stmt_Class'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php deleted file mode 100644 index c54d6780..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - * @param list $attrGroups PHP attribute groups - */ - public function __construct( - array $consts, - array $attributes = [], - array $attrGroups = [] - ) { - $this->attributes = $attributes; - $this->attrGroups = $attrGroups; - $this->consts = $consts; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'consts']; - } - - public function getType(): string { - return 'Stmt_Const'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php deleted file mode 100644 index 54e979dd..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $num = null, array $attributes = []) { - $this->attributes = $attributes; - $this->num = $num; - } - - public function getSubNodeNames(): array { - return ['num']; - } - - public function getType(): string { - return 'Stmt_Continue'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php deleted file mode 100644 index 1a3c3616..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { - $this->attributes = $attributes; - $this->declares = $declares; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['declares', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Declare'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php deleted file mode 100644 index 61244428..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts', 'cond']; - } - - public function getType(): string { - return 'Stmt_Do'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php deleted file mode 100644 index 4d424523..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $exprs, array $attributes = []) { - $this->attributes = $attributes; - $this->exprs = $exprs; - } - - public function getSubNodeNames(): array { - return ['exprs']; - } - - public function getType(): string { - return 'Stmt_Echo'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php deleted file mode 100644 index b26d59ce..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_ElseIf'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php deleted file mode 100644 index 3d2b066e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts']; - } - - public function getType(): string { - return 'Stmt_Else'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php deleted file mode 100644 index c071a0af..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ /dev/null @@ -1,36 +0,0 @@ - $attrGroups PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { - parent::__construct($attributes); - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->expr = $expr; - $this->attrGroups = $attrGroups; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'expr']; - } - - public function getType(): string { - return 'Stmt_EnumCase'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php deleted file mode 100644 index 7eea6a69..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ /dev/null @@ -1,44 +0,0 @@ - null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->scalarType = $subNodes['scalarType'] ?? null; - $this->implements = $subNodes['implements'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - - parent::__construct($attributes); - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Enum'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php deleted file mode 100644 index 89751fa2..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ /dev/null @@ -1,32 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Stmt_Expression'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php deleted file mode 100644 index 69ecf253..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['stmts']; - } - - public function getType(): string { - return 'Stmt_Finally'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php deleted file mode 100644 index 6f2fbb9e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ /dev/null @@ -1,47 +0,0 @@ - array(): Init expressions - * 'cond' => array(): Loop conditions - * 'loop' => array(): Loop expressions - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->init = $subNodes['init'] ?? []; - $this->cond = $subNodes['cond'] ?? []; - $this->loop = $subNodes['loop'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames(): array { - return ['init', 'cond', 'loop', 'stmts']; - } - - public function getType(): string { - return 'Stmt_For'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php deleted file mode 100644 index c5d9a8b1..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ /dev/null @@ -1,50 +0,0 @@ - null : Variable to assign key to - * 'byRef' => false : Whether to assign value by reference - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - $this->keyVar = $subNodes['keyVar'] ?? null; - $this->byRef = $subNodes['byRef'] ?? false; - $this->valueVar = $valueVar; - $this->stmts = $subNodes['stmts'] ?? []; - } - - public function getSubNodeNames(): array { - return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Foreach'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php deleted file mode 100644 index 2111bab7..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ /dev/null @@ -1,81 +0,0 @@ - false : Whether to return by reference - * 'params' => array(): Parameters - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->byRef = $subNodes['byRef'] ?? false; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->params = $subNodes['params'] ?? []; - $this->returnType = $subNodes['returnType'] ?? null; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; - } - - public function returnsByRef(): bool { - return $this->byRef; - } - - public function getParams(): array { - return $this->params; - } - - public function getReturnType() { - return $this->returnType; - } - - public function getAttrGroups(): array { - return $this->attrGroups; - } - - /** @return Node\Stmt[] */ - public function getStmts(): array { - return $this->stmts; - } - - public function getType(): string { - return 'Stmt_Function'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php deleted file mode 100644 index d3ab12fc..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Global'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php deleted file mode 100644 index 26a0d01e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Stmt_Goto'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php deleted file mode 100644 index 0ec8e9d4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ /dev/null @@ -1,41 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->prefix = $prefix; - $this->uses = $uses; - } - - public function getSubNodeNames(): array { - return ['type', 'prefix', 'uses']; - } - - public function getType(): string { - return 'Stmt_GroupUse'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php deleted file mode 100644 index 665bacde..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(string $remaining, array $attributes = []) { - $this->attributes = $attributes; - $this->remaining = $remaining; - } - - public function getSubNodeNames(): array { - return ['remaining']; - } - - public function getType(): string { - return 'Stmt_HaltCompiler'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php deleted file mode 100644 index 544390ff..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ /dev/null @@ -1,46 +0,0 @@ - array(): Statements - * 'elseifs' => array(): Elseif clauses - * 'else' => null : Else clause - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $subNodes['stmts'] ?? []; - $this->elseifs = $subNodes['elseifs'] ?? []; - $this->else = $subNodes['else'] ?? null; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts', 'elseifs', 'else']; - } - - public function getType(): string { - return 'Stmt_If'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php deleted file mode 100644 index 0515d020..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - public function getType(): string { - return 'Stmt_InlineHTML'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php deleted file mode 100644 index 9359064f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ /dev/null @@ -1,40 +0,0 @@ - array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->extends = $subNodes['extends'] ?? []; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'extends', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Interface'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php deleted file mode 100644 index 658468d2..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ /dev/null @@ -1,30 +0,0 @@ - $attributes Additional attributes - */ - public function __construct($name, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Identifier($name) : $name; - } - - public function getSubNodeNames(): array { - return ['name']; - } - - public function getType(): string { - return 'Stmt_Label'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php deleted file mode 100644 index f5b59ad6..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = $name; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['name', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Namespace'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php deleted file mode 100644 index 3acfa46f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ /dev/null @@ -1,16 +0,0 @@ - $attributes Additional attributes - * @param null|Identifier|Name|ComplexType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups - * @param Node\PropertyHook[] $hooks Property hooks - */ - public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = [], array $hooks = []) { - $this->attributes = $attributes; - $this->flags = $flags; - $this->props = $props; - $this->type = $type; - $this->attrGroups = $attrGroups; - $this->hooks = $hooks; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'props', 'hooks']; - } - - /** - * Whether the property is explicitly or implicitly public. - */ - public function isPublic(): bool { - return ($this->flags & Modifiers::PUBLIC) !== 0 - || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; - } - - /** - * Whether the property is protected. - */ - public function isProtected(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED); - } - - /** - * Whether the property is private. - */ - public function isPrivate(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE); - } - - /** - * Whether the property is static. - */ - public function isStatic(): bool { - return (bool) ($this->flags & Modifiers::STATIC); - } - - /** - * Whether the property is readonly. - */ - public function isReadonly(): bool { - return (bool) ($this->flags & Modifiers::READONLY); - } - - /** - * Whether the property is abstract. - */ - public function isAbstract(): bool { - return (bool) ($this->flags & Modifiers::ABSTRACT); - } - - /** - * Whether the property is final. - */ - public function isFinal(): bool { - return (bool) ($this->flags & Modifiers::FINAL); - } - - /** - * Whether the property has explicit public(set) visibility. - */ - public function isPublicSet(): bool { - return (bool) ($this->flags & Modifiers::PUBLIC_SET); - } - - /** - * Whether the property has explicit protected(set) visibility. - */ - public function isProtectedSet(): bool { - return (bool) ($this->flags & Modifiers::PROTECTED_SET); - } - - /** - * Whether the property has explicit private(set) visibility. - */ - public function isPrivateSet(): bool { - return (bool) ($this->flags & Modifiers::PRIVATE_SET); - } - - public function getType(): string { - return 'Stmt_Property'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php deleted file mode 100644 index fe7c9973..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Expr $expr = null, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Stmt_Return'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php deleted file mode 100644 index 6775b959..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ /dev/null @@ -1,11 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Static'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php deleted file mode 100644 index 21e5efa5..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->cases = $cases; - } - - public function getSubNodeNames(): array { - return ['cond', 'cases']; - } - - public function getType(): string { - return 'Stmt_Switch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php deleted file mode 100644 index 7705a570..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $traits, array $adaptations = [], array $attributes = []) { - $this->attributes = $attributes; - $this->traits = $traits; - $this->adaptations = $adaptations; - } - - public function getSubNodeNames(): array { - return ['traits', 'adaptations']; - } - - public function getType(): string { - return 'Stmt_TraitUse'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php deleted file mode 100644 index 987bc88e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ /dev/null @@ -1,12 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { - $this->attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->newModifier = $newModifier; - $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; - } - - public function getSubNodeNames(): array { - return ['trait', 'method', 'newModifier', 'newName']; - } - - public function getType(): string { - return 'Stmt_TraitUseAdaptation_Alias'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php deleted file mode 100644 index 7bc40837..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { - $this->attributes = $attributes; - $this->trait = $trait; - $this->method = \is_string($method) ? new Node\Identifier($method) : $method; - $this->insteadof = $insteadof; - } - - public function getSubNodeNames(): array { - return ['trait', 'method', 'insteadof']; - } - - public function getType(): string { - return 'Stmt_TraitUseAdaptation_Precedence'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php deleted file mode 100644 index 5f2b3307..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ /dev/null @@ -1,34 +0,0 @@ - array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes - */ - public function __construct($name, array $subNodes = [], array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\Identifier($name) : $name; - $this->stmts = $subNodes['stmts'] ?? []; - $this->attrGroups = $subNodes['attrGroups'] ?? []; - } - - public function getSubNodeNames(): array { - return ['attrGroups', 'name', 'stmts']; - } - - public function getType(): string { - return 'Stmt_Trait'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php deleted file mode 100644 index 6414c46c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ /dev/null @@ -1,37 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { - $this->attributes = $attributes; - $this->stmts = $stmts; - $this->catches = $catches; - $this->finally = $finally; - } - - public function getSubNodeNames(): array { - return ['stmts', 'catches', 'finally']; - } - - public function getType(): string { - return 'Stmt_TryCatch'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php deleted file mode 100644 index c211beb0..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $vars, array $attributes = []) { - $this->attributes = $attributes; - $this->vars = $vars; - } - - public function getSubNodeNames(): array { - return ['vars']; - } - - public function getType(): string { - return 'Stmt_Unset'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php deleted file mode 100644 index b14fbd6e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ /dev/null @@ -1,13 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->uses = $uses; - } - - public function getSubNodeNames(): array { - return ['type', 'uses']; - } - - public function getType(): string { - return 'Stmt_Use'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php deleted file mode 100644 index 2f7aed23..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ /dev/null @@ -1,33 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - $this->attributes = $attributes; - $this->cond = $cond; - $this->stmts = $stmts; - } - - public function getSubNodeNames(): array { - return ['cond', 'stmts']; - } - - public function getType(): string { - return 'Stmt_While'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php deleted file mode 100644 index bad88d2b..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ /dev/null @@ -1,27 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $types, array $attributes = []) { - $this->attributes = $attributes; - $this->types = $types; - } - - public function getSubNodeNames(): array { - return ['types']; - } - - public function getType(): string { - return 'UnionType'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php deleted file mode 100644 index a7d9fc44..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php +++ /dev/null @@ -1,55 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->name = $name; - $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; - } - - public function getSubNodeNames(): array { - return ['type', 'name', 'alias']; - } - - /** - * Get alias. If not explicitly given this is the last component of the used name. - */ - public function getAlias(): Identifier { - if (null !== $this->alias) { - return $this->alias; - } - - return new Identifier($this->name->getLast()); - } - - public function getType(): string { - return 'UseItem'; - } -} - -// @deprecated compatibility alias -class_alias(UseItem::class, Stmt\UseUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php deleted file mode 100644 index 9baa6fe0..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ /dev/null @@ -1,16 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - public function getType(): string { - return 'VariadicPlaceholder'; - } - - public function getSubNodeNames(): array { - return []; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php deleted file mode 100644 index a6a50aea..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ /dev/null @@ -1,181 +0,0 @@ - Attributes */ - protected array $attributes; - - /** - * Creates a Node. - * - * @param array $attributes Array of attributes - */ - public function __construct(array $attributes = []) { - $this->attributes = $attributes; - } - - /** - * Gets line the node started in (alias of getStartLine). - * - * @return int Start line (or -1 if not available) - * @phpstan-return -1|positive-int - */ - public function getLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets line the node started in. - * - * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int Start line (or -1 if not available) - * @phpstan-return -1|positive-int - */ - public function getStartLine(): int { - return $this->attributes['startLine'] ?? -1; - } - - /** - * Gets the line the node ended in. - * - * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). - * - * @return int End line (or -1 if not available) - * @phpstan-return -1|positive-int - */ - public function getEndLine(): int { - return $this->attributes['endLine'] ?? -1; - } - - /** - * Gets the token offset of the first token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token start position (or -1 if not available) - */ - public function getStartTokenPos(): int { - return $this->attributes['startTokenPos'] ?? -1; - } - - /** - * Gets the token offset of the last token that is part of this node. - * - * The offset is an index into the array returned by Lexer::getTokens(). - * - * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int Token end position (or -1 if not available) - */ - public function getEndTokenPos(): int { - return $this->attributes['endTokenPos'] ?? -1; - } - - /** - * Gets the file offset of the first character that is part of this node. - * - * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File start position (or -1 if not available) - */ - public function getStartFilePos(): int { - return $this->attributes['startFilePos'] ?? -1; - } - - /** - * Gets the file offset of the last character that is part of this node. - * - * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default). - * - * @return int File end position (or -1 if not available) - */ - public function getEndFilePos(): int { - return $this->attributes['endFilePos'] ?? -1; - } - - /** - * Gets all comments directly preceding this node. - * - * The comments are also available through the "comments" attribute. - * - * @return Comment[] - */ - public function getComments(): array { - return $this->attributes['comments'] ?? []; - } - - /** - * Gets the doc comment of the node. - * - * @return null|Comment\Doc Doc comment object or null - */ - public function getDocComment(): ?Comment\Doc { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - $comment = $comments[$i]; - if ($comment instanceof Comment\Doc) { - return $comment; - } - } - - return null; - } - - /** - * Sets the doc comment of the node. - * - * This will either replace an existing doc comment or add it to the comments array. - * - * @param Comment\Doc $docComment Doc comment to set - */ - public function setDocComment(Comment\Doc $docComment): void { - $comments = $this->getComments(); - for ($i = count($comments) - 1; $i >= 0; $i--) { - if ($comments[$i] instanceof Comment\Doc) { - // Replace existing doc comment. - $comments[$i] = $docComment; - $this->setAttribute('comments', $comments); - return; - } - } - - // Append new doc comment. - $comments[] = $docComment; - $this->setAttribute('comments', $comments); - } - - public function setAttribute(string $key, $value): void { - $this->attributes[$key] = $value; - } - - public function hasAttribute(string $key): bool { - return array_key_exists($key, $this->attributes); - } - - public function getAttribute(string $key, $default = null) { - if (array_key_exists($key, $this->attributes)) { - return $this->attributes[$key]; - } - - return $default; - } - - public function getAttributes(): array { - return $this->attributes; - } - - public function setAttributes(array $attributes): void { - $this->attributes = $attributes; - } - - /** - * @return array - */ - public function jsonSerialize(): array { - return ['nodeType' => $this->getType()] + get_object_vars($this); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php deleted file mode 100644 index 7d62d038..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ /dev/null @@ -1,299 +0,0 @@ - true, - 'startLine' => true, - 'endLine' => true, - 'startFilePos' => true, - 'endFilePos' => true, - 'startTokenPos' => true, - 'endTokenPos' => true, - ]; - - /** - * Constructs a NodeDumper. - * - * Supported options: - * * bool dumpComments: Whether comments should be dumped. - * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset - * information, the code needs to be passed to dump(). - * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. - * - * @param array $options Options (see description) - */ - public function __construct(array $options = []) { - $this->dumpComments = !empty($options['dumpComments']); - $this->dumpPositions = !empty($options['dumpPositions']); - $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); - } - - /** - * Dumps a node or array. - * - * @param array|Node $node Node or array to dump - * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if - * the dumpPositions option is enabled and the dumping of node offsets - * is desired. - * - * @return string Dumped value - */ - public function dump($node, ?string $code = null): string { - $this->code = $code; - $this->res = ''; - $this->nl = "\n"; - $this->dumpRecursive($node, false); - return $this->res; - } - - /** @param mixed $node */ - protected function dumpRecursive($node, bool $indent = true): void { - if ($indent) { - $this->nl .= " "; - } - if ($node instanceof Node) { - $this->res .= $node->getType(); - if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $this->res .= $p; - } - $this->res .= '('; - - foreach ($node->getSubNodeNames() as $key) { - $this->res .= "$this->nl " . $key . ': '; - - $value = $node->$key; - if (\is_int($value)) { - if ('flags' === $key || 'newModifier' === $key) { - $this->res .= $this->dumpFlags($value); - continue; - } - if ('type' === $key && $node instanceof Include_) { - $this->res .= $this->dumpIncludeType($value); - continue; - } - if ('type' === $key - && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { - $this->res .= $this->dumpUseType($value); - continue; - } - } - $this->dumpRecursive($value); - } - - if ($this->dumpComments && $comments = $node->getComments()) { - $this->res .= "$this->nl comments: "; - $this->dumpRecursive($comments); - } - - if ($this->dumpOtherAttributes) { - foreach ($node->getAttributes() as $key => $value) { - if (isset(self::IGNORE_ATTRIBUTES[$key])) { - continue; - } - - $this->res .= "$this->nl $key: "; - if (\is_int($value)) { - if ('kind' === $key) { - if ($node instanceof Int_) { - $this->res .= $this->dumpIntKind($value); - continue; - } - if ($node instanceof String_ || $node instanceof InterpolatedString) { - $this->res .= $this->dumpStringKind($value); - continue; - } - if ($node instanceof Array_) { - $this->res .= $this->dumpArrayKind($value); - continue; - } - if ($node instanceof List_) { - $this->res .= $this->dumpListKind($value); - continue; - } - } - } - $this->dumpRecursive($value); - } - } - $this->res .= "$this->nl)"; - } elseif (\is_array($node)) { - $this->res .= 'array('; - foreach ($node as $key => $value) { - $this->res .= "$this->nl " . $key . ': '; - $this->dumpRecursive($value); - } - $this->res .= "$this->nl)"; - } elseif ($node instanceof Comment) { - $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); - } elseif (\is_string($node)) { - $this->res .= \str_replace("\n", $this->nl, $node); - } elseif (\is_int($node) || \is_float($node)) { - $this->res .= $node; - } elseif (null === $node) { - $this->res .= 'null'; - } elseif (false === $node) { - $this->res .= 'false'; - } elseif (true === $node) { - $this->res .= 'true'; - } else { - throw new \InvalidArgumentException('Can only dump nodes and arrays.'); - } - if ($indent) { - $this->nl = \substr($this->nl, 0, -4); - } - } - - protected function dumpFlags(int $flags): string { - $strs = []; - if ($flags & Modifiers::PUBLIC) { - $strs[] = 'PUBLIC'; - } - if ($flags & Modifiers::PROTECTED) { - $strs[] = 'PROTECTED'; - } - if ($flags & Modifiers::PRIVATE) { - $strs[] = 'PRIVATE'; - } - if ($flags & Modifiers::ABSTRACT) { - $strs[] = 'ABSTRACT'; - } - if ($flags & Modifiers::STATIC) { - $strs[] = 'STATIC'; - } - if ($flags & Modifiers::FINAL) { - $strs[] = 'FINAL'; - } - if ($flags & Modifiers::READONLY) { - $strs[] = 'READONLY'; - } - if ($flags & Modifiers::PUBLIC_SET) { - $strs[] = 'PUBLIC_SET'; - } - if ($flags & Modifiers::PROTECTED_SET) { - $strs[] = 'PROTECTED_SET'; - } - if ($flags & Modifiers::PRIVATE_SET) { - $strs[] = 'PRIVATE_SET'; - } - - if ($strs) { - return implode(' | ', $strs) . ' (' . $flags . ')'; - } else { - return (string) $flags; - } - } - - /** @param array $map */ - private function dumpEnum(int $value, array $map): string { - if (!isset($map[$value])) { - return (string) $value; - } - return $map[$value] . ' (' . $value . ')'; - } - - private function dumpIncludeType(int $type): string { - return $this->dumpEnum($type, [ - Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', - Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', - Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', - Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]); - } - - private function dumpUseType(int $type): string { - return $this->dumpEnum($type, [ - Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - Use_::TYPE_NORMAL => 'TYPE_NORMAL', - Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', - Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]); - } - - private function dumpIntKind(int $kind): string { - return $this->dumpEnum($kind, [ - Int_::KIND_BIN => 'KIND_BIN', - Int_::KIND_OCT => 'KIND_OCT', - Int_::KIND_DEC => 'KIND_DEC', - Int_::KIND_HEX => 'KIND_HEX', - ]); - } - - private function dumpStringKind(int $kind): string { - return $this->dumpEnum($kind, [ - String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', - String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', - String_::KIND_HEREDOC => 'KIND_HEREDOC', - String_::KIND_NOWDOC => 'KIND_NOWDOC', - ]); - } - - private function dumpArrayKind(int $kind): string { - return $this->dumpEnum($kind, [ - Array_::KIND_LONG => 'KIND_LONG', - Array_::KIND_SHORT => 'KIND_SHORT', - ]); - } - - private function dumpListKind(int $kind): string { - return $this->dumpEnum($kind, [ - List_::KIND_LIST => 'KIND_LIST', - List_::KIND_ARRAY => 'KIND_ARRAY', - ]); - } - - /** - * Dump node position, if possible. - * - * @param Node $node Node for which to dump position - * - * @return string|null Dump of position, or null if position information not available - */ - protected function dumpPosition(Node $node): ?string { - if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { - return null; - } - - $start = $node->getStartLine(); - $end = $node->getEndLine(); - if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') - && null !== $this->code - ) { - $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos()); - $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos()); - } - return "[$start - $end]"; - } - - // Copied from Error class - private function toColumn(string $code, int $pos): int { - if ($pos > strlen($code)) { - throw new \RuntimeException('Invalid position information'); - } - - $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); - if (false === $lineStartPos) { - $lineStartPos = -1; - } - - return $pos - $lineStartPos; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php deleted file mode 100644 index 96c84526..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ /dev/null @@ -1,90 +0,0 @@ -traverse($nodes); - - return $visitor->getFoundNodes(); - } - - /** - * Find all nodes that are instances of a certain class. - - * @template TNode as Node - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param class-string $class Class name - * - * @return TNode[] Found nodes (all instances of $class) - */ - public function findInstanceOf($nodes, string $class): array { - return $this->find($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } - - /** - * Find first node satisfying a filter callback. - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool - * - * @return null|Node Found node (or null if none found) - */ - public function findFirst($nodes, callable $filter): ?Node { - if ($nodes === []) { - return null; - } - - if (!is_array($nodes)) { - $nodes = [$nodes]; - } - - $visitor = new FirstFindingVisitor($filter); - - $traverser = new NodeTraverser($visitor); - $traverser->traverse($nodes); - - return $visitor->getFoundNode(); - } - - /** - * Find first node that is an instance of a certain class. - * - * @template TNode as Node - * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param class-string $class Class name - * - * @return null|TNode Found node, which is an instance of $class (or null if none found) - */ - public function findFirstInstanceOf($nodes, string $class): ?Node { - return $this->findFirst($nodes, function ($node) use ($class) { - return $node instanceof $class; - }); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php deleted file mode 100644 index bb3d6ddb..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ /dev/null @@ -1,287 +0,0 @@ - Visitors */ - protected array $visitors = []; - - /** @var bool Whether traversal should be stopped */ - protected bool $stopTraversal; - - /** - * Create a traverser with the given visitors. - * - * @param NodeVisitor ...$visitors Node visitors - */ - public function __construct(NodeVisitor ...$visitors) { - $this->visitors = $visitors; - } - - /** - * Adds a visitor. - * - * @param NodeVisitor $visitor Visitor to add - */ - public function addVisitor(NodeVisitor $visitor): void { - $this->visitors[] = $visitor; - } - - /** - * Removes an added visitor. - */ - public function removeVisitor(NodeVisitor $visitor): void { - $index = array_search($visitor, $this->visitors); - if ($index !== false) { - array_splice($this->visitors, $index, 1, []); - } - } - - /** - * Traverses an array of nodes using the registered visitors. - * - * @param Node[] $nodes Array of nodes - * - * @return Node[] Traversed array of nodes - */ - public function traverse(array $nodes): array { - $this->stopTraversal = false; - - foreach ($this->visitors as $visitor) { - if (null !== $return = $visitor->beforeTraverse($nodes)) { - $nodes = $return; - } - } - - $nodes = $this->traverseArray($nodes); - - for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { - $visitor = $this->visitors[$i]; - if (null !== $return = $visitor->afterTraverse($nodes)) { - $nodes = $return; - } - } - - return $nodes; - } - - /** - * Recursively traverse a node. - * - * @param Node $node Node to traverse. - */ - protected function traverseNode(Node $node): void { - foreach ($node->getSubNodeNames() as $name) { - $subNode = $node->$name; - - if (\is_array($subNode)) { - $node->$name = $this->traverseArray($subNode); - if ($this->stopTraversal) { - break; - } - - continue; - } - - if (!$subNode instanceof Node) { - continue; - } - - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($subNode); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - continue 2; - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $this->traverseNode($subNode); - if ($this->stopTraversal) { - break; - } - } - - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($subNode); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - break; - } elseif (\is_array($return)) { - throw new \LogicException( - 'leaveNode() may only return an array ' . - 'if the parent structure is an array' - ); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - } - } - - /** - * Recursively traverse array (usually of nodes). - * - * @param array $nodes Array to traverse - * - * @return array Result of traversal (may be original array or changed one) - */ - protected function traverseArray(array $nodes): array { - $doNodes = []; - - foreach ($nodes as $i => $node) { - if (!$node instanceof Node) { - if (\is_array($node)) { - throw new \LogicException('Invalid node structure: Contains nested arrays'); - } - continue; - } - - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($node); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - continue 2; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - continue 2; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - - if ($traverseChildren) { - $this->traverseNode($node); - if ($this->stopTraversal) { - break; - } - } - - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($node); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - break; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - } - - if (!empty($doNodes)) { - while (list($i, $replace) = array_pop($doNodes)) { - array_splice($nodes, $i, 1, $replace); - } - } - - return $nodes; - } - - private function ensureReplacementReasonable(Node $old, Node $new): void { - if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { - throw new \LogicException( - "Trying to replace statement ({$old->getType()}) " . - "with expression ({$new->getType()}). Are you missing a " . - "Stmt_Expression wrapper?" - ); - } - - if ($old instanceof Node\Expr && $new instanceof Node\Stmt) { - throw new \LogicException( - "Trying to replace expression ({$old->getType()}) " . - "with statement ({$new->getType()})" - ); - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php deleted file mode 100644 index c3992b3d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - $node stays as-is - * * array (of Nodes) - * => The return value is merged into the parent array (at the position of the $node) - * * NodeVisitor::REMOVE_NODE - * => $node is removed from the parent array - * * NodeVisitor::REPLACE_WITH_NULL - * => $node is replaced with null - * * NodeVisitor::DONT_TRAVERSE_CHILDREN - * => Children of $node are not traversed. $node stays as-is - * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN - * => Further visitors for the current node are skipped, and its children are not - * traversed. $node stays as-is. - * * NodeVisitor::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node|Node[] Replacement node (or special return value) - */ - public function enterNode(Node $node); - - /** - * Called when leaving a node. - * - * Return value semantics: - * * null - * => $node stays as-is - * * NodeVisitor::REMOVE_NODE - * => $node is removed from the parent array - * * NodeVisitor::REPLACE_WITH_NULL - * => $node is replaced with null - * * NodeVisitor::STOP_TRAVERSAL - * => Traversal is aborted. $node stays as-is - * * array (of Nodes) - * => The return value is merged into the parent array (at the position of the $node) - * * otherwise - * => $node is set to the return value - * - * @param Node $node Node - * - * @return null|int|Node|Node[] Replacement node (or special return value) - */ - public function leaveNode(Node $node); - - /** - * Called once after traversal. - * - * Return value semantics: - * * null: $nodes stays as-is - * * otherwise: $nodes is set to the return value - * - * @param Node[] $nodes Array of nodes - * - * @return null|Node[] Array of nodes - */ - public function afterTraverse(array $nodes); -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php deleted file mode 100644 index cba92499..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ /dev/null @@ -1,19 +0,0 @@ -setAttribute('origNode', $origNode); - return $node; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php deleted file mode 100644 index 5e2aed31..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +++ /dev/null @@ -1,82 +0,0 @@ - Token positions of comments */ - private array $commentPositions = []; - - /** - * Create a comment annotation visitor. - * - * @param Token[] $tokens Token array - */ - public function __construct(array $tokens) { - $this->tokens = $tokens; - - // Collect positions of comments. We use this to avoid traversing parts of the AST where - // there are no comments. - foreach ($tokens as $i => $token) { - if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { - $this->commentPositions[] = $i; - } - } - } - - public function enterNode(Node $node) { - $nextCommentPos = current($this->commentPositions); - if ($nextCommentPos === false) { - // No more comments. - return self::STOP_TRAVERSAL; - } - - $oldPos = $this->pos; - $this->pos = $pos = $node->getStartTokenPos(); - if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { - $comments = []; - while (--$pos >= $oldPos) { - $token = $this->tokens[$pos]; - if ($token->id === \T_DOC_COMMENT) { - $comments[] = new Comment\Doc( - $token->text, $token->line, $token->pos, $pos, - $token->getEndLine(), $token->getEndPos() - 1, $pos); - continue; - } - if ($token->id === \T_COMMENT) { - $comments[] = new Comment( - $token->text, $token->line, $token->pos, $pos, - $token->getEndLine(), $token->getEndPos() - 1, $pos); - continue; - } - if ($token->id !== \T_WHITESPACE) { - break; - } - } - if (!empty($comments)) { - $node->setAttribute('comments', array_reverse($comments)); - } - - do { - $nextCommentPos = next($this->commentPositions); - } while ($nextCommentPos !== false && $nextCommentPos < $this->pos); - } - - $endPos = $node->getEndTokenPos(); - if ($nextCommentPos > $endPos) { - // Skip children if there are no comments located inside this node. - $this->pos = $endPos; - return self::DONT_TRAVERSE_CHILDREN; - } - - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php deleted file mode 100644 index 65a1bd3f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ /dev/null @@ -1,47 +0,0 @@ - Found nodes */ - protected array $foundNodes; - - public function __construct(callable $filterCallback) { - $this->filterCallback = $filterCallback; - } - - /** - * Get found nodes satisfying the filter callback. - * - * Nodes are returned in pre-order. - * - * @return list Found nodes - */ - public function getFoundNodes(): array { - return $this->foundNodes; - } - - public function beforeTraverse(array $nodes): ?array { - $this->foundNodes = []; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNodes[] = $node; - } - - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php deleted file mode 100644 index 05deed59..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ /dev/null @@ -1,49 +0,0 @@ -filterCallback = $filterCallback; - } - - /** - * Get found node satisfying the filter callback. - * - * Returns null if no node satisfies the filter callback. - * - * @return null|Node Found node (or null if not found) - */ - public function getFoundNode(): ?Node { - return $this->foundNode; - } - - public function beforeTraverse(array $nodes): ?array { - $this->foundNode = null; - - return null; - } - - public function enterNode(Node $node) { - $filterCallback = $this->filterCallback; - if ($filterCallback($node)) { - $this->foundNode = $node; - return NodeVisitor::STOP_TRAVERSAL; - } - - return null; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php deleted file mode 100644 index e0066f2d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ /dev/null @@ -1,269 +0,0 @@ -nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); - $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; - $this->replaceNodes = $options['replaceNodes'] ?? true; - } - - /** - * Get name resolution context. - */ - public function getNameContext(): NameContext { - return $this->nameContext; - } - - public function beforeTraverse(array $nodes): ?array { - $this->nameContext->startNamespace(); - return null; - } - - public function enterNode(Node $node) { - if ($node instanceof Stmt\Namespace_) { - $this->nameContext->startNamespace($node->name); - } elseif ($node instanceof Stmt\Use_) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, null); - } - } elseif ($node instanceof Stmt\GroupUse) { - foreach ($node->uses as $use) { - $this->addAlias($use, $node->type, $node->prefix); - } - } elseif ($node instanceof Stmt\Class_) { - if (null !== $node->extends) { - $node->extends = $this->resolveClassName($node->extends); - } - - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } else { - $node->namespacedName = null; - } - } elseif ($node instanceof Stmt\Interface_) { - foreach ($node->extends as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { - foreach ($node->implements as &$interface) { - $interface = $this->resolveClassName($interface); - } - - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Trait_) { - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Function_) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\ClassMethod - || $node instanceof Expr\Closure - || $node instanceof Expr\ArrowFunction - ) { - $this->resolveSignature($node); - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Property) { - if (null !== $node->type) { - $node->type = $this->resolveType($node->type); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Node\PropertyHook) { - foreach ($node->params as $param) { - $param->type = $this->resolveType($param->type); - $this->resolveAttrGroups($param); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\Const_) { - foreach ($node->consts as $const) { - $this->addNamespacedName($const); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\ClassConst) { - if (null !== $node->type) { - $node->type = $this->resolveType($node->type); - } - $this->resolveAttrGroups($node); - } elseif ($node instanceof Stmt\EnumCase) { - $this->resolveAttrGroups($node); - } elseif ($node instanceof Expr\StaticCall - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\ClassConstFetch - || $node instanceof Expr\New_ - || $node instanceof Expr\Instanceof_ - ) { - if ($node->class instanceof Name) { - $node->class = $this->resolveClassName($node->class); - } - } elseif ($node instanceof Stmt\Catch_) { - foreach ($node->types as &$type) { - $type = $this->resolveClassName($type); - } - } elseif ($node instanceof Expr\FuncCall) { - if ($node->name instanceof Name) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION); - } - } elseif ($node instanceof Expr\ConstFetch) { - $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT); - } elseif ($node instanceof Stmt\TraitUse) { - foreach ($node->traits as &$trait) { - $trait = $this->resolveClassName($trait); - } - - foreach ($node->adaptations as $adaptation) { - if (null !== $adaptation->trait) { - $adaptation->trait = $this->resolveClassName($adaptation->trait); - } - - if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { - foreach ($adaptation->insteadof as &$insteadof) { - $insteadof = $this->resolveClassName($insteadof); - } - } - } - } - - return null; - } - - /** @param Stmt\Use_::TYPE_* $type */ - private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { - // Add prefix for group uses - $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; - // Type is determined either by individual element or whole use declaration - $type |= $use->type; - - $this->nameContext->addAlias( - $name, (string) $use->getAlias(), $type, $use->getAttributes() - ); - } - - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ - private function resolveSignature($node): void { - foreach ($node->params as $param) { - $param->type = $this->resolveType($param->type); - $this->resolveAttrGroups($param); - } - $node->returnType = $this->resolveType($node->returnType); - } - - /** - * @template T of Node\Identifier|Name|Node\ComplexType|null - * @param T $node - * @return T - */ - private function resolveType(?Node $node): ?Node { - if ($node instanceof Name) { - return $this->resolveClassName($node); - } - if ($node instanceof Node\NullableType) { - $node->type = $this->resolveType($node->type); - return $node; - } - if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) { - foreach ($node->types as &$type) { - $type = $this->resolveType($type); - } - return $node; - } - return $node; - } - - /** - * Resolve name, according to name resolver options. - * - * @param Name $name Function or constant name to resolve - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* - * - * @return Name Resolved name, or original name with attribute - */ - protected function resolveName(Name $name, int $type): Name { - if (!$this->replaceNodes) { - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - $name->setAttribute('resolvedName', $resolvedName); - } else { - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - } - return $name; - } - - if ($this->preserveOriginalNames) { - // Save the original name - $originalName = $name; - $name = clone $originalName; - $name->setAttribute('originalName', $originalName); - } - - $resolvedName = $this->nameContext->getResolvedName($name, $type); - if (null !== $resolvedName) { - return $resolvedName; - } - - // unqualified names inside a namespace cannot be resolved at compile-time - // add the namespaced version of the name as an attribute - $name->setAttribute('namespacedName', FullyQualified::concat( - $this->nameContext->getNamespace(), $name, $name->getAttributes())); - return $name; - } - - protected function resolveClassName(Name $name): Name { - return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); - } - - protected function addNamespacedName(Node $node): void { - $node->namespacedName = Name::concat( - $this->nameContext->getNamespace(), (string) $node->name); - } - - protected function resolveAttrGroups(Node $node): void { - foreach ($node->attrGroups as $attrGroup) { - foreach ($attrGroup->attrs as $attr) { - $attr->name = $this->resolveClassName($attr->name); - } - } - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php deleted file mode 100644 index 70e051e2..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ /dev/null @@ -1,73 +0,0 @@ -$weakReferences=false on the child node, the parent node can be accessed through - * $node->getAttribute('parent'), the previous - * node can be accessed through $node->getAttribute('previous'), - * and the next node can be accessed through $node->getAttribute('next'). - * - * With $weakReferences=true attribute names are prefixed by "weak_", e.g. "weak_parent". - */ -final class NodeConnectingVisitor extends NodeVisitorAbstract { - /** - * @var Node[] - */ - private array $stack = []; - - /** - * @var ?Node - */ - private $previous; - - private bool $weakReferences; - - public function __construct(bool $weakReferences = false) { - $this->weakReferences = $weakReferences; - } - - public function beforeTraverse(array $nodes) { - $this->stack = []; - $this->previous = null; - } - - public function enterNode(Node $node) { - if (!empty($this->stack)) { - $parent = $this->stack[count($this->stack) - 1]; - if ($this->weakReferences) { - $node->setAttribute('weak_parent', \WeakReference::create($parent)); - } else { - $node->setAttribute('parent', $parent); - } - } - - if ($this->previous !== null) { - if ( - $this->weakReferences - ) { - if ($this->previous->getAttribute('weak_parent') === $node->getAttribute('weak_parent')) { - $node->setAttribute('weak_previous', \WeakReference::create($this->previous)); - $this->previous->setAttribute('weak_next', \WeakReference::create($node)); - } - } elseif ($this->previous->getAttribute('parent') === $node->getAttribute('parent')) { - $node->setAttribute('previous', $this->previous); - $this->previous->setAttribute('next', $node); - } - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) { - $this->previous = $node; - - array_pop($this->stack); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php deleted file mode 100644 index abf6e37d..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ /dev/null @@ -1,51 +0,0 @@ -$weakReferences=false on the child node, the parent node can be accessed through - * $node->getAttribute('parent'). - * - * With $weakReferences=true the attribute name is "weak_parent" instead. - */ -final class ParentConnectingVisitor extends NodeVisitorAbstract { - /** - * @var Node[] - */ - private array $stack = []; - - private bool $weakReferences; - - public function __construct(bool $weakReferences = false) { - $this->weakReferences = $weakReferences; - } - - public function beforeTraverse(array $nodes) { - $this->stack = []; - } - - public function enterNode(Node $node) { - if (!empty($this->stack)) { - $parent = $this->stack[count($this->stack) - 1]; - if ($this->weakReferences) { - $node->setAttribute('weak_parent', \WeakReference::create($parent)); - } else { - $node->setAttribute('parent', $parent); - } - } - - $this->stack[] = $node; - } - - public function leaveNode(Node $node) { - array_pop($this->stack); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php deleted file mode 100644 index 6fb15cca..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ /dev/null @@ -1,24 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_READONLY", - "T_PUBLIC_SET", - "T_PROTECTED_SET", - "T_PRIVATE_SET", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_ENUM", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_PROPERTY_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "T_ATTRIBUTE", - "';'", - "']'", - "'('", - "')'", - "'{'", - "'}'", - "'`'", - "'\"'", - "'$'" - ); - - protected array $tokenToSymbol = array( - 0, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, - 166, 167, 54, 51, 9, 52, 53, 55, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 32, 164, - 45, 17, 47, 31, 69, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 71, 173, 165, 37, 173, 170, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 168, 36, 169, 59, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, - 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, - 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, - 41, 42, 43, 44, 46, 48, 49, 50, 58, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163 - ); - - protected array $action = array( - 133, 134, 135, 575, 136, 137, 1049, 766, 767, 768, - 138, 41, 850, -341, 495, 1390,-32766,-32766,-32766, 1008, - 841, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, - 1144,-32766,-32766,-32766, -195, 760, 759,-32766, -194,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 0,-32766, 3, 4, 769, 1145, 1146, 1147, 1141, - 1140, 1139, 1148, 1142, 1143, 1144, 388, 389, 448, 272, - 53, 391, 773, 774, 775, 776, 433, 5, 434, 571, - 337, 39, 254, 29, 298, 830, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, - 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, - 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, - 577, -382, 306, -382, 794, 795, 578, 579, 244, 818, - 816, 817, 829, 813, 814, 1313, 38, 580, 581, 812, - 582, 583, 584, 585, 1325, 586, 587, 481, 482, -628, - 496, 1009, 815, 588, 589, 140, 139, -628, 133, 134, - 135, 575, 136, 137, 1085, 766, 767, 768, 138, 41, - -32766, -341, 1046, 1041, 1040, 1039, 1045, 1042, 1043, 1044, - -32766,-32766,-32766,-32767,-32767,-32767,-32767, 106, 107, 108, - 109, 110, -195, 760, 759, 1058, -194,-32766,-32766,-32766, - 149,-32766, 852,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 936, 303, 257, 769,-32766,-32766,-32766, 850,-32766, 297, - -32766,-32766,-32766,-32766,-32766, 1371, 1355, 272, 53, 391, - 773, 774, 775, 776, -625,-32766, 434,-32766,-32766,-32766, - -32766, 730, -625, 830, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, - 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, - 792, 793, 364, 833, 834, 835, 836, 837, 577, -579, - -275, 317, 794, 795, 578, 579, -577, 818, 816, 817, - 829, 813, 814, 957, 926, 580, 581, 812, 582, 583, - 584, 585, 144, 586, 587, 841, 336,-32766,-32766,-32766, - 815, 588, 589, -628, 139, -628, 133, 134, 135, 575, - 136, 137, 1082, 766, 767, 768, 138, 41,-32766, 1375, - -32766,-32766,-32766,-32766,-32766,-32766,-32766, 1374, 629, 388, - 389,-32766,-32766,-32766,-32766,-32766, -579, -579, 1081, 433, - 321, 760, 759, -577, -577,-32766, 1293,-32766,-32766, 111, - 112, 113, -579, 282, 843, 851, 623, 1400, 936, -577, - 1401, 769, 333, 938, -585, 114, -579, 725, 294, 298, - 1119, -584, 349, -577, 752, 272, 53, 391, 773, 774, - 775, 776, 145, 86, 434, 306, 336, 336, -625, 731, - -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, - 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, - 364, 833, 834, 835, 836, 837, 577, -576, 850, -578, - 794, 795, 578, 579, 845, 818, 816, 817, 829, 813, - 814, 727, 926, 580, 581, 812, 582, 583, 584, 585, - 740, 586, 587, 243, 1055,-32766,-32766, -85, 815, 588, - 589, 878, 152, 879, 133, 134, 135, 575, 136, 137, - 1087, 766, 767, 768, 138, 41, 350, 961, 960, 1058, - 1058, 1058,-32766,-32766,-32766, 841,-32766, 131, 977, 978, - 400, 1055, 10, 979, -576, -576, -578, -578, 378, 760, - 759, 936, 973, 290, 297, 297,-32766, 846, 936, 154, - -576, 79, -578, 382, 849, 936, 1058, 336, 878, 769, - 879, 938, -583, -85, -576, 725, -578, 959, 108, 109, - 110, 1058, 732, 272, 53, 391, 773, 774, 775, 776, - 290, 155, 434, 470, 471, 472, 735, 760, 759, 830, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, - 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, - 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, - 834, 835, 836, 837, 577, 926, 434, 847, 794, 795, - 578, 579, 926, 818, 816, 817, 829, 813, 814, 926, - 398, 580, 581, 812, 582, 583, 584, 585, 452, 586, - 587, 157, 87, 88, 89, 453, 815, 588, 589, 454, - 152, 790, 761, 762, 763, 764, 765, 158, 766, 767, - 768, 803, 804, 40, 27, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 1134, - 282, 1055, 455,-32766, 994, 1288, 1287, 1289, 725, 390, - 389, 938, 114, 856, 1120, 725, 769, 159, 938, 433, - 672, 23, 725, 1118, 691, 692, 1058,-32766, 153, 416, - 770, 771, 772, 773, 774, 775, 776, -78, -619, 839, - -619, -581, 386, 387, 392, 393, 830, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 786, 806, 828, 807, - 808, 809, 810, 798, 799, 800, 827, 801, 802, 787, - 788, 789, 791, 792, 793, 832, 833, 834, 835, 836, - 837, 838, 161, 663, 664, 794, 795, 796, 797, 36, - 818, 816, 817, 829, 813, 814, -58, -57, 805, 811, - 812, 819, 820, 822, 821, -87, 823, 824, -581, -581, - 128, 129, 141, 815, 826, 825, 54, 55, 56, 57, - 527, 58, 59, 142, -110, 148, 162, 60, 61, -110, - 62, -110, 936, 163, 164, 165, 313, 166, -581, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - 1293, -84, 953, -78, -73, -72, -71, -70, -69, -68, - -67, -66, -65, 742, -46, 63, 64, -18, -575, 1286, - 146, 65, 51, 66, 251, 252, 67, 68, 69, 70, - 71, 72, 73, 74, 281, 31, 273, 47, 450, 528, - 291, -357, 741, 1319, 1320, 529, 744, 850, 935, 151, - 295, 1317, 45, 22, 530, 1284, 531, -309, 532, -305, - 533, 286, 936, 534, 535, 287, 926, 292, 48, 49, - 456, 385, 384, 293, 50, 536, 342, 296, 282, 1057, - 376, 348, 850, 299, 300, -575, -575, 1279, 114, 307, - 308, 701, 538, 539, 540, 150, 841,-32766, 1288, 1287, - 1289, -575, 850, 294, 542, 543, 1402, 1305, 1306, 1307, - 1308, 1310, 1302, 1303, 305, -575, 716, -110, -110, 130, - 1309, 1304, -110, 593, 1288, 1287, 1289, 306, 13, 673, - 75, -110, 1152, 678, 331, 332, 336, -154, -154, -154, - -32766, 718, 694, -4, 936, 938, 926, 314, 478, 725, - 506, 1324, -154, 705, -154, 679, -154, 695, -154, 974, - 1326, -541, 306, 312, 311, 79, 849, 661, 383, 43, - 320, 336, 37, 1252, 0, 0, 52, 0, 0, 977, - 978, 0, 760, 759, 537,-32766, 0, 0, 0, 706, - 0, 0, 912, 973, -110, -110, -110, 35, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, -531, 11, 707, 708, 31, 274, 30, 380, 955, - 599, -613, 306, 627, 0, 938, 0, 850, 926, 725, - -154, 1317, 1288, 1287, 1289, 44, -612, 749, 290, 750, - 1194, 1196, 869, 309, 310, 917, 1018, 995, 1002, 992, - 383, -575, 446, 1003, 915, 990, 1123, 304, 1126, 381, - 1127, 977, 978, 1124, 1125, 1131, 537, 1279, 1314, 861, - 330, 760, 759, 132, 541, 973, -110, -110, -110, 1341, - 1359, 1393, 1293, 666, 542, 543, -611, 1305, 1306, 1307, - 1308, 1310, 1302, 1303, -585, -584, -583, -582, 21, -525, - 1309, 1304, 1, 32, 760, 759, 33, 938,-32766, -278, - 77, 725, -4, -16, 1286, 332, 336, 42, -575, -575, - 46,-32766,-32766,-32766, 76,-32766, 80,-32766, 81,-32766, - 82, 83,-32766, 84, -575, 85, 147,-32766,-32766,-32766, - 156,-32766, 160,-32766,-32766, 249, 379, 1286, -575,-32766, - 430, 31, 273, 338,-32766,-32766,-32766, 365,-32766, 366, - -32766,-32766,-32766, 850, 850,-32766, 367, 1317, 368, 369, - -32766,-32766,-32766, 370, 371, 372,-32766,-32766, 373, 374, - 375, 377,-32766, 430, 447, 570, 31, 274, -276, -275, - 15, 16, 78, 17,-32766, 18, 20, 414, 850, -110, - -110, 497, 1317, 1279, -110, 498, 505, 508, 509, 510, - 511, 515, 516, -110, 517, 525, 604, 711, 1088, 1084, - 1234, 543,-32766, 1305, 1306, 1307, 1308, 1310, 1302, 1303, - 1315, 1086, 1083, -50, 1064, 1274, 1309, 1304, 1279, 1060, - -280, -102, 14, 19, 306, 24, 77, 79, 415, 303, - 413, 332, 336, 336, 618, 624, 543, 652, 1305, 1306, - 1307, 1308, 1310, 1302, 1303, 717, 143, 1238, 1292, 1235, - 1372, 1309, 1304, 726, 729, 733,-32766, 734, 736, 737, - 738, 77, 1286, 419, 739, 743, 332, 336, 728,-32766, - -32766,-32766, 746,-32766, 913,-32766, 1397,-32766, 1399, 872, - -32766, 871, 967, 1010, 1398,-32766,-32766,-32766, 966,-32766, - 964,-32766,-32766, 965, 968, 1286, 1267,-32766, 430, 946, - 956, 944,-32766,-32766,-32766, 1000,-32766, 1001,-32766,-32766, - -32766, 650, 1396,-32766, 1353, 1342, 1360, 1369,-32766,-32766, - -32766, 1318,-32766, 336,-32766,-32766, 936, 0, 1286, 0, - -32766, 430, 0, 0, 0,-32766,-32766,-32766, 0,-32766, - 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 936, - 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766, 0, - 0, 1286, 0,-32766, 430, 0, 0, 0,-32766,-32766, - -32766, 0,-32766, 0,-32766,-32766,-32766, 0, 0,-32766, - 0, 0, 0, 501,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0, 0, 1286, 606,-32766, 430, 0, 0, - 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, - 926, 0,-32766, 2, 0, 0, 0,-32766,-32766,-32766, - 0, 0, 0,-32766,-32766, 0, -253, -253, -253,-32766, - 430, 0, 383, 926, 0, 0, 0, 0, 0, 0, - 0,-32766, 0, 977, 978, 0, 0, 0, 537, -252, - -252, -252, 0, 0, 0, 383, 912, 973, -110, -110, - -110, 0, 0, 0, 0, 0, 977, 978, 0, 0, - 0, 537, 0, 0, 0, 0, 0, 0, 0, 912, - 973, -110, -110, -110,-32766, 0, 0, 0, 0, 938, - 1286, 0, 0, 725, -253, 0, 0,-32766,-32766,-32766, - 0,-32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, - 0, 0, 938,-32766,-32766,-32766, 725, -252, 0,-32766, - -32766, 0, 0, 0, 0,-32766, 430, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,-32766 - ); - - protected array $actionCheck = array( - 3, 4, 5, 6, 7, 8, 1, 10, 11, 12, - 13, 14, 83, 9, 32, 86, 10, 11, 12, 32, - 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 10, 11, 12, 9, 38, 39, 31, 9, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 0, 31, 9, 9, 58, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 107, 108, 109, 72, - 73, 74, 75, 76, 77, 78, 117, 9, 81, 86, - 71, 152, 153, 9, 31, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 107, 163, 109, 127, 128, 129, 130, 15, 132, - 133, 134, 135, 136, 137, 1, 9, 140, 141, 142, - 143, 144, 145, 146, 151, 148, 149, 138, 139, 1, - 168, 164, 155, 156, 157, 9, 159, 9, 3, 4, - 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, - 117, 167, 119, 120, 121, 122, 123, 124, 125, 126, - 10, 11, 12, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 167, 38, 39, 142, 167, 10, 11, 12, - 9, 31, 1, 33, 34, 35, 36, 37, 38, 39, - 1, 167, 9, 58, 10, 11, 12, 83, 31, 166, - 33, 34, 35, 36, 37, 1, 1, 72, 73, 74, - 75, 76, 77, 78, 1, 31, 81, 33, 34, 35, - 36, 32, 9, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 71, - 167, 9, 127, 128, 129, 130, 71, 132, 133, 134, - 135, 136, 137, 1, 85, 140, 141, 142, 143, 144, - 145, 146, 168, 148, 149, 81, 172, 10, 11, 12, - 155, 156, 157, 165, 159, 167, 3, 4, 5, 6, - 7, 8, 167, 10, 11, 12, 13, 14, 31, 1, - 33, 34, 35, 10, 10, 11, 12, 9, 52, 107, - 108, 10, 11, 12, 10, 11, 138, 139, 1, 117, - 9, 38, 39, 138, 139, 31, 1, 33, 34, 54, - 55, 56, 154, 58, 81, 164, 1, 81, 1, 154, - 84, 58, 9, 164, 166, 70, 168, 168, 31, 31, - 164, 166, 9, 168, 168, 72, 73, 74, 75, 76, - 77, 78, 168, 168, 81, 163, 172, 172, 165, 32, - 167, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 71, 83, 71, - 127, 128, 129, 130, 161, 132, 133, 134, 135, 136, - 137, 168, 85, 140, 141, 142, 143, 144, 145, 146, - 168, 148, 149, 98, 117, 117, 117, 32, 155, 156, - 157, 107, 159, 109, 3, 4, 5, 6, 7, 8, - 167, 10, 11, 12, 13, 14, 9, 73, 74, 142, - 142, 142, 10, 11, 12, 81, 141, 15, 118, 119, - 107, 117, 109, 123, 138, 139, 138, 139, 9, 38, - 39, 1, 132, 166, 166, 166, 117, 81, 1, 15, - 154, 166, 154, 9, 160, 1, 142, 172, 107, 58, - 109, 164, 166, 98, 168, 168, 168, 123, 51, 52, - 53, 142, 32, 72, 73, 74, 75, 76, 77, 78, - 166, 15, 81, 133, 134, 135, 32, 38, 39, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 85, 81, 161, 127, 128, - 129, 130, 85, 132, 133, 134, 135, 136, 137, 85, - 9, 140, 141, 142, 143, 144, 145, 146, 9, 148, - 149, 15, 10, 11, 12, 9, 155, 156, 157, 9, - 159, 3, 4, 5, 6, 7, 8, 15, 10, 11, - 12, 13, 14, 31, 102, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 127, - 58, 117, 9, 117, 164, 160, 161, 162, 168, 107, - 108, 164, 70, 9, 169, 168, 58, 15, 164, 117, - 76, 77, 168, 1, 76, 77, 142, 141, 102, 103, - 72, 73, 74, 75, 76, 77, 78, 17, 165, 81, - 167, 71, 107, 108, 107, 108, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 15, 112, 113, 127, 128, 129, 130, 15, - 132, 133, 134, 135, 136, 137, 17, 17, 140, 141, - 142, 143, 144, 145, 146, 32, 148, 149, 138, 139, - 17, 17, 17, 155, 156, 157, 2, 3, 4, 5, - 6, 7, 8, 17, 102, 17, 17, 13, 14, 107, - 16, 109, 1, 17, 17, 17, 114, 17, 168, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 1, 32, 39, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 51, 52, 32, 71, 81, - 32, 57, 71, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 32, 71, 72, 73, 74, 75, - 32, 169, 32, 79, 80, 81, 32, 83, 32, 32, - 38, 87, 88, 89, 90, 117, 92, 36, 94, 36, - 96, 36, 1, 99, 100, 36, 85, 36, 104, 105, - 106, 107, 108, 36, 110, 111, 36, 38, 58, 141, - 116, 117, 83, 38, 38, 138, 139, 123, 70, 138, - 139, 78, 128, 129, 130, 71, 81, 86, 160, 161, - 162, 154, 83, 31, 140, 141, 84, 143, 144, 145, - 146, 147, 148, 149, 150, 168, 81, 118, 119, 168, - 156, 157, 123, 90, 160, 161, 162, 163, 98, 91, - 166, 132, 83, 97, 170, 171, 172, 76, 77, 78, - 141, 93, 95, 0, 1, 164, 85, 115, 98, 168, - 98, 151, 91, 81, 93, 101, 95, 101, 97, 132, - 151, 154, 163, 137, 136, 166, 160, 114, 107, 164, - 136, 172, 168, 170, -1, -1, 71, -1, -1, 118, - 119, -1, 38, 39, 123, 141, -1, -1, -1, 117, - -1, -1, 131, 132, 133, 134, 135, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 154, 154, 141, 142, 71, 72, 154, 154, 159, - 158, 166, 163, 158, -1, 164, -1, 83, 85, 168, - 169, 87, 160, 161, 162, 164, 166, 164, 166, 164, - 60, 61, 164, 138, 139, 164, 164, 164, 164, 164, - 107, 71, 109, 164, 164, 164, 164, 114, 164, 154, - 164, 118, 119, 164, 164, 164, 123, 123, 165, 165, - 168, 38, 39, 168, 131, 132, 133, 134, 135, 165, - 165, 165, 1, 165, 140, 141, 166, 143, 144, 145, - 146, 147, 148, 149, 166, 166, 166, 166, 155, 166, - 156, 157, 166, 166, 38, 39, 166, 164, 75, 167, - 166, 168, 169, 32, 81, 171, 172, 166, 138, 139, - 166, 88, 89, 90, 166, 92, 166, 94, 166, 96, - 166, 166, 99, 166, 154, 166, 166, 104, 105, 106, - 166, 75, 166, 110, 111, 166, 168, 81, 168, 116, - 117, 71, 72, 166, 88, 89, 90, 166, 92, 166, - 94, 128, 96, 83, 83, 99, 166, 87, 166, 166, - 104, 105, 106, 166, 166, 166, 110, 111, 166, 166, - 166, 166, 116, 117, 166, 166, 71, 72, 167, 167, - 167, 167, 159, 167, 128, 167, 167, 167, 83, 118, - 119, 167, 87, 123, 123, 167, 167, 167, 167, 167, - 167, 167, 167, 132, 167, 167, 167, 167, 167, 167, - 167, 141, 141, 143, 144, 145, 146, 147, 148, 149, - 167, 167, 167, 32, 167, 167, 156, 157, 123, 167, - 167, 167, 167, 167, 163, 167, 166, 166, 169, 167, - 167, 171, 172, 172, 167, 167, 141, 167, 143, 144, - 145, 146, 147, 148, 149, 167, 32, 167, 167, 167, - 167, 156, 157, 168, 168, 168, 75, 168, 168, 168, - 168, 166, 81, 169, 168, 168, 171, 172, 168, 88, - 89, 90, 169, 92, 169, 94, 169, 96, 169, 169, - 99, 169, 169, 169, 169, 104, 105, 106, 169, 75, - 169, 110, 111, 169, 169, 81, 169, 116, 117, 169, - 169, 169, 88, 89, 90, 169, 92, 169, 94, 128, - 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, - 106, 171, 75, 172, 110, 111, 1, -1, 81, -1, - 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, - -1, 94, 128, 96, -1, -1, 99, -1, -1, 1, - -1, 104, 105, 106, -1, 75, -1, 110, 111, -1, - -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, - 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, - -1, -1, -1, 103, 104, 105, 106, -1, 75, -1, - 110, 111, -1, -1, 81, 82, 116, 117, -1, -1, - -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, - 85, -1, 99, 166, -1, -1, -1, 104, 105, 106, - -1, -1, -1, 110, 111, -1, 101, 102, 103, 116, - 117, -1, 107, 85, -1, -1, -1, -1, -1, -1, - -1, 128, -1, 118, 119, -1, -1, -1, 123, 101, - 102, 103, -1, -1, -1, 107, 131, 132, 133, 134, - 135, -1, -1, -1, -1, -1, 118, 119, -1, -1, - -1, 123, -1, -1, -1, -1, -1, -1, -1, 131, - 132, 133, 134, 135, 75, -1, -1, -1, -1, 164, - 81, -1, -1, 168, 169, -1, -1, 88, 89, 90, - -1, 92, -1, 94, -1, 96, -1, -1, 99, -1, - -1, -1, 164, 104, 105, 106, 168, 169, -1, 110, - 111, -1, -1, -1, -1, 116, 117, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 128 - ); - - protected array $actionBase = array( - 0, 155, -3, 313, 471, 471, 881, 963, 1365, 1388, - 892, 134, 515, -61, 367, 524, 524, 801, 524, 209, - 510, 283, 517, 517, 517, 920, 855, 628, 628, 855, - 628, 1053, 1053, 1053, 1053, 1086, 1086, 1320, 1320, 1353, - 1254, 1221, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, - 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, -13, 44, - 365, 744, 1102, 1120, 1107, 1121, 1096, 1095, 1103, 1108, - 1122, 1183, 1185, 837, 1186, 1187, 1182, 1188, 1110, 938, - 1098, 1118, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 323, 482, 334, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 964, 964, 21, 21, 21, 324, 1135, - 1100, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 297, - 204, 1000, 187, 170, 170, 6, 6, 6, 6, 6, - 692, 53, 1101, 819, 819, 138, 138, 138, 138, 542, - 14, 347, 355, -41, 348, 232, 384, 384, 487, 487, - 554, 554, 349, 349, 554, 554, 554, 399, 399, 399, - 399, 208, 215, 366, 364, -7, 864, 224, 224, 224, - 224, 864, 864, 864, 864, 829, 1190, 864, 1011, 1027, - 864, 864, 368, 767, 767, 925, 305, 305, 305, 767, - 421, -71, -71, 421, 380, -71, 225, 286, 556, 847, - 572, 543, 556, 640, 771, 233, 148, 826, 605, 826, - 1094, 831, 831, 802, 792, 921, 1140, 1123, 874, 1176, - 876, 1178, 420, 9, 791, 1093, 1093, 1093, 1093, 1093, - 1093, 1093, 1093, 1093, 1093, 1093, 1191, 519, 1094, 436, - 1191, 1191, 1191, 519, 519, 519, 519, 519, 519, 519, - 519, 805, 519, 519, 641, 436, 614, 618, 436, 860, - 519, 877, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, -18, 201, 201, -13, 292, 292, 201, - 216, 5, 292, 292, 292, 292, 201, 201, 201, 201, - 605, 840, 882, 607, 435, 885, 29, 840, 840, 840, - 4, 113, 25, 841, 843, 393, 835, 835, 835, 869, - 956, 956, 835, 839, 835, 869, 835, 835, 956, 956, - 879, 956, 146, 609, 373, 514, 616, 956, 272, 835, - 835, 835, 835, 854, 956, 45, 68, 620, 835, 203, - 191, 835, 835, 854, 848, 828, 846, 956, 956, 956, - 854, 499, 846, 846, 846, 893, 895, 873, 822, 363, - 341, 674, 127, 783, 822, 822, 835, 601, 873, 822, - 873, 822, 880, 822, 822, 822, 873, 822, 839, 477, - 822, 779, 786, 663, 74, 822, 51, 978, 980, 743, - 982, 971, 984, 1038, 985, 987, 1125, 953, 999, 974, - 989, 1039, 960, 957, 836, 763, 764, 878, 827, 951, - 838, 838, 838, 948, 949, 838, 838, 838, 838, 838, - 838, 838, 838, 763, 923, 884, 853, 1013, 765, 776, - 1069, 820, 1145, 823, 1011, 978, 987, 789, 974, 989, - 960, 957, 800, 799, 797, 798, 796, 795, 793, 794, - 808, 1071, 1072, 990, 825, 778, 1049, 1020, 1143, 922, - 1022, 1023, 1050, 1073, 898, 1083, 1147, 844, 1149, 1150, - 924, 1028, 1126, 838, 940, 875, 934, 1027, 950, 763, - 935, 1084, 1085, 1043, 824, 1054, 1058, 998, 870, 842, - 936, 1152, 1029, 1032, 1033, 1127, 1129, 891, 1044, 962, - 1059, 872, 1099, 1060, 1061, 1062, 1063, 1130, 1153, 1131, - 890, 1132, 901, 858, 1041, 856, 1154, 504, 851, 857, - 866, 1035, 536, 1007, 1136, 1134, 1155, 1064, 1065, 1067, - 1159, 1161, 994, 902, 1046, 867, 1048, 1042, 903, 904, - 606, 865, 1087, 845, 849, 859, 622, 672, 1164, 1165, - 1167, 996, 830, 833, 905, 909, 1088, 832, 1092, 1170, - 737, 910, 1171, 1070, 787, 788, 690, 750, 749, 790, - 868, 1137, 883, 852, 850, 1034, 788, 834, 911, 1172, - 912, 914, 916, 1068, 919, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 628, 628, 628, 628, 784, 784, - 784, 784, 784, 784, 784, 628, 784, 784, 784, 628, - 628, 0, 0, 628, 0, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 758, 758, 612, - 612, 612, 612, 758, 758, 758, 758, 758, 758, 758, - 758, 758, 758, 612, 612, 0, 612, 612, 612, 612, - 612, 612, 612, 612, 879, 758, 758, 758, 758, 305, - 305, 305, 305, -96, -96, 758, 758, 380, 758, 380, - 758, 758, 305, 305, 758, 758, 758, 758, 758, 758, - 758, 758, 758, 758, 758, 0, 0, 0, 436, -71, - 758, 839, 839, 839, 839, 758, 758, 758, 758, -71, - -71, 758, 414, 414, 758, 758, 0, 0, 0, 0, - 0, 0, 0, 0, 436, 0, 0, 436, 0, 0, - 839, 839, 758, 380, 879, 328, 758, 0, 0, 0, - 0, 436, 839, 436, 519, -71, -71, 519, 519, 292, - 201, 328, 596, 596, 596, 596, 0, 0, 605, 879, - 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, - 839, 0, 879, 0, 839, 839, 839, 0, 0, 0, - 0, 0, 0, 0, 0, 956, 0, 0, 0, 0, - 0, 0, 0, 839, 0, 956, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 839, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 838, 870, 0, 0, 870, - 0, 838, 838, 838, 0, 0, 0, 865, 832 - ); - - protected array $actionDefault = array( - 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, - 32767, 500, 415, 415, 415,32767,32767,32767, 573, 573, - 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, - 32767, 500,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 36, 7, 8, 10, 11, 49, 338, - 100,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 624,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 403, 494, 504, 482, 483, 485, 486, 414, - 574, 630, 344, 627, 342, 413, 146, 354, 343, 245, - 261, 505, 262, 506, 509, 510, 218, 400, 150, 151, - 446, 501, 448, 499, 503, 447, 420, 427, 428, 429, - 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 418, 419, 502,32767,32767, 479, 478, 477, 444,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 445, - 449, 417, 452, 450, 451, 468, 469, 466, 467, 470, - 32767, 323,32767,32767,32767, 471, 472, 473, 474, 381, - 379,32767,32767, 111, 323, 111,32767,32767, 459, 460, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 517, 567, 476,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, - 32767, 100, 569, 441, 443, 537, 454, 455, 453, 421, - 32767, 542,32767, 102,32767, 544,32767,32767,32767,32767, - 32767,32767,32767, 568,32767, 575, 575,32767, 530, 100, - 196,32767, 543, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767, 638, 530, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, - 32767,32767, 100, 196, 196, 196, 196, 196, 196, 196, - 196, 545, 196, 196, 191,32767, 271, 273, 102, 592, - 196, 547,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 530, 464, 139,32767, 532, 139, 575, 456, 457, 458, - 575, 575, 575, 319, 296,32767,32767,32767,32767,32767, - 545, 545, 100, 100, 100, 100,32767,32767,32767,32767, - 111, 516, 99, 99, 99, 99, 99, 103, 101,32767, - 32767,32767,32767, 226,32767, 101, 101, 99,32767, 101, - 101,32767,32767, 226, 228, 215, 230,32767, 596, 597, - 226, 101, 230, 230, 230, 250, 250, 519, 325, 101, - 99, 101, 101, 198, 325, 325,32767, 101, 519, 325, - 519, 325, 200, 325, 325, 325, 519, 325,32767, 101, - 325, 217, 403, 99, 99, 325,32767,32767,32767, 532, - 32767,32767,32767,32767,32767,32767,32767, 225,32767,32767, - 32767,32767,32767,32767,32767,32767, 562,32767, 580, 594, - 462, 463, 465, 579, 577, 487, 488, 489, 490, 491, - 492, 493, 496, 626,32767, 536,32767,32767,32767, 353, - 32767, 636,32767,32767,32767, 9, 74, 525, 42, 43, - 51, 57, 551, 552, 553, 554, 548, 549, 555, 550, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 637,32767, 575,32767, - 32767,32767,32767, 461, 557, 602,32767,32767, 576, 629, - 32767,32767,32767,32767,32767,32767,32767,32767, 139,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 562, - 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 558,32767,32767,32767, 575,32767,32767,32767,32767, 321, - 318,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 575,32767,32767, - 32767,32767,32767, 298,32767, 315,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 399, 532, 301, 303, 304,32767, - 32767,32767,32767, 375,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 153, 153, 3, 3, 356, - 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, - 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 367, 153 - ); - - protected array $goto = array( - 202, 169, 202, 202, 202, 1056, 842, 712, 359, 670, - 671, 598, 688, 689, 690, 748, 653, 655, 591, 929, - 675, 930, 1090, 721, 699, 702, 1028, 710, 719, 1024, - 171, 171, 171, 171, 226, 203, 199, 199, 181, 183, - 221, 199, 199, 199, 199, 199, 1180, 200, 200, 200, - 200, 200, 1180, 193, 194, 195, 196, 197, 198, 223, - 221, 224, 550, 551, 431, 552, 555, 556, 557, 558, - 559, 560, 561, 562, 172, 173, 174, 201, 175, 176, - 177, 170, 178, 179, 180, 182, 220, 222, 225, 245, - 248, 259, 260, 262, 263, 264, 265, 266, 267, 268, - 269, 275, 276, 277, 278, 288, 289, 326, 327, 328, - 437, 438, 439, 613, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 184, - 242, 185, 194, 195, 196, 197, 198, 223, 204, 205, - 206, 207, 246, 186, 187, 208, 188, 209, 205, 189, - 247, 204, 168, 210, 211, 190, 212, 213, 214, 191, - 215, 216, 192, 217, 218, 219, 285, 283, 285, 285, - 870, 1089, 1091, 1094, 615, 255, 255, 255, 255, 255, - 441, 677, 614, 1130, 884, 867, 436, 329, 323, 324, - 345, 608, 440, 346, 442, 654, 724, 492, 521, 715, - 896, 1128, 993, 883, 494, 253, 253, 253, 253, 250, - 256, 489, 1361, 1362, 1386, 1386, 925, 920, 921, 934, - 876, 922, 873, 923, 924, 874, 877, 363, 928, 881, - 480, 480, 868, 880, 1386, 848, 474, 363, 363, 480, - 1117, 1112, 1113, 1114, 1229, 351, 362, 362, 362, 362, - 1389, 1389, 429, 363, 363, 1017, 902, 363, 989, 1403, - 747, 360, 361, 566, 1026, 1021, 1056, 1285, 1285, 1285, - 569, 352, 351, 363, 363, 605, 1056, 1285, 848, 1056, - 848, 1056, 1056, 1137, 1138, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 357, 1261, 962, 637, - 674, 1285, 1262, 1265, 963, 1266, 1285, 1285, 1285, 1285, - 1376, 435, 1285, 628, 402, 1285, 1285, 1368, 1368, 1368, - 1368, 1347, 574, 567, 1062, 1061, 1059, 1059, 958, 958, - 697, 970, 1014, 942, 1051, 1067, 1068, 943, 565, 565, - 565, 603, 513, 522, 514, 863, 676, 863, 565, 709, - 520, 1176, 318, 567, 574, 600, 601, 319, 611, 617, - 844, 633, 634, 1080, 8, 709, 9, 449, 709, 28, - 1065, 1066, 467, 335, 316, 569, 698, 987, 987, 987, - 987, 1363, 1364, 467, 639, 639, 981, 988, 609, 631, - 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, - 1335, 1335, 863, 469, 682, 469, 1335, 1335, 1335, 1335, - 1335, 1335, 1335, 1335, 1335, 1335, 347, 258, 258, 626, - 640, 643, 644, 645, 646, 667, 668, 669, 723, 632, - 460, 860, 460, 460, 460, 1358, 1358, 1358, 553, 553, - 1278, 985, 420, 720, 553, 1358, 553, 553, 553, 553, - 553, 553, 553, 553, 451, 889, 568, 595, 568, 647, - 649, 651, 568, 976, 595, 411, 405, 473, 886, 1276, - 1370, 1370, 1370, 1370, 909, 866, 909, 909, 1036, 483, - 612, 484, 485, 751, 563, 563, 563, 563, 894, 619, - 1101, 1394, 1395, 412, 1332, 1332, 898, 490, 1151, 1354, - 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, - 279, 1105, 334, 334, 334, 998, 892, 0, 1280, 1047, - 0, 0, 863, 0, 0, 460, 460, 460, 460, 460, - 460, 460, 460, 460, 460, 460, 0, 0, 460, 1103, - 554, 554, 0, 1356, 1356, 1103, 554, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 621, 622, 417, 418, - 947, 1166, 0, 686, 0, 687, 0, 422, 423, 424, - 0, 700, 1033, 0, 425, 1281, 1282, 0, 1268, 355, - 888, 0, 680, 1012, 858, 0, 0, 0, 882, 443, - 0, 1268, 0, 897, 885, 1100, 1104, 0, 0, 0, - 1275, 0, 443, 0, 1283, 1344, 1345, 996, 0, 0, - 1063, 1063, 0, 0, 0, 681, 1074, 1070, 1071, 404, - 407, 616, 620, 0, 0, 0, 0, 0, 0, 0, - 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1149, 901, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1031, 1031 - ); - - protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 6, 73, 97, 86, - 86, 48, 86, 86, 86, 48, 48, 48, 127, 65, - 48, 65, 131, 9, 48, 48, 48, 48, 48, 48, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, - 15, 130, 130, 130, 134, 5, 5, 5, 5, 5, - 66, 66, 8, 8, 35, 26, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 8, 84, 8, 8, - 35, 8, 49, 35, 84, 5, 5, 5, 5, 5, - 5, 185, 185, 185, 191, 191, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, - 157, 157, 27, 15, 191, 12, 159, 14, 14, 157, - 15, 15, 15, 15, 159, 177, 24, 24, 24, 24, - 191, 191, 43, 14, 14, 50, 45, 14, 50, 14, - 50, 97, 97, 50, 50, 50, 73, 73, 73, 73, - 14, 177, 177, 14, 14, 181, 73, 73, 12, 73, - 12, 73, 73, 148, 148, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 188, 79, 79, 56, - 56, 73, 79, 79, 79, 79, 73, 73, 73, 73, - 190, 13, 73, 13, 62, 73, 73, 9, 9, 9, - 9, 14, 76, 76, 119, 119, 89, 89, 9, 9, - 89, 89, 103, 73, 89, 89, 89, 73, 19, 19, - 19, 104, 163, 14, 163, 22, 64, 22, 19, 7, - 163, 158, 76, 76, 76, 76, 76, 76, 76, 76, - 7, 76, 76, 115, 46, 7, 46, 113, 7, 76, - 120, 120, 19, 178, 178, 14, 117, 19, 19, 19, - 19, 187, 187, 19, 108, 108, 19, 19, 2, 2, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 179, 179, 22, 83, 121, 83, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 29, 5, 5, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, - 23, 18, 23, 23, 23, 134, 134, 134, 165, 165, - 14, 93, 93, 93, 165, 134, 165, 165, 165, 165, - 165, 165, 165, 165, 83, 39, 9, 9, 9, 85, - 85, 85, 9, 92, 9, 28, 9, 9, 37, 169, - 134, 134, 134, 134, 25, 25, 25, 25, 110, 9, - 9, 9, 9, 99, 107, 107, 107, 107, 9, 107, - 133, 9, 9, 31, 180, 180, 41, 160, 151, 134, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 24, 136, 24, 24, 24, 96, 9, -1, 20, 114, - -1, -1, 22, -1, -1, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, -1, -1, 23, 134, - 182, 182, -1, 134, 134, 134, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 17, 17, 82, 82, - 17, 17, -1, 82, -1, 82, -1, 82, 82, 82, - -1, 82, 17, -1, 82, 20, 20, -1, 20, 82, - 17, -1, 17, 17, 20, -1, -1, -1, 17, 118, - -1, 20, -1, 16, 16, 16, 16, -1, -1, -1, - 17, -1, 118, -1, 20, 20, 20, 16, -1, -1, - 118, 118, -1, -1, -1, 118, 118, 118, 118, 59, - 59, 59, 59, -1, -1, -1, -1, -1, -1, -1, - 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 16, 16, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 107, 107 - ); - - protected array $gotoBase = array( - 0, 0, -339, 0, 0, 174, -7, 339, 171, 10, - 0, 0, -69, -36, -78, -186, 130, 81, 114, 66, - 117, 0, 62, 160, 240, 468, 178, 225, 118, 112, - 0, 45, 0, 0, 0, -195, 0, 119, 0, 122, - 0, 44, -1, 226, 0, 227, -387, 0, -715, 182, - 241, 0, 0, 0, 0, 0, 256, 0, 0, 570, - 0, 0, 269, 0, 102, 3, -63, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -31, 0, 0, -120, - 110, 53, 54, 120, -286, -33, -724, 0, 0, 40, - 0, 0, 124, 129, 0, 0, 61, -488, 0, 67, - 0, 0, 0, 294, 295, 0, 0, 453, 141, 0, - 100, 0, 0, 83, -3, 82, 0, 86, 318, 38, - 78, 107, 0, 0, 0, 0, 0, 16, 0, 0, - 168, 20, 0, 108, 163, 0, 58, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, - 0, 43, 0, 0, 0, 0, 0, 193, 101, -38, - 46, 0, 0, -166, 0, 195, 0, 0, 0, 92, - 0, 0, 0, 0, 0, 0, 0, -60, 42, 157, - 251, 243, 297, 0, 0, -97, 0, 1, 263, 0, - 276, -101, 0, 0 - ); - - protected array $gotoDefault = array( - -32768, 526, 755, 7, 756, 951, 831, 840, 590, 544, - 722, 356, 641, 432, 1352, 927, 1165, 610, 859, 1294, - 1300, 468, 862, 340, 745, 939, 910, 911, 408, 395, - 875, 406, 665, 642, 507, 895, 464, 887, 499, 890, - 463, 899, 167, 428, 524, 903, 6, 906, 572, 937, - 991, 396, 914, 397, 693, 916, 594, 918, 919, 403, - 409, 410, 1170, 602, 638, 931, 261, 596, 932, 394, - 933, 941, 399, 401, 703, 479, 518, 512, 421, 1132, - 597, 625, 662, 457, 486, 636, 648, 635, 493, 444, - 426, 339, 975, 983, 500, 477, 997, 358, 1005, 753, - 1178, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, - 1035, 271, 1038, 503, 1048, 26, 683, 1053, 1054, 684, - 658, 1076, 659, 685, 660, 1078, 476, 592, 1179, 475, - 1093, 1099, 465, 1102, 1340, 466, 1106, 270, 1109, 284, - 427, 445, 1115, 1116, 12, 1122, 713, 714, 25, 280, - 523, 1150, 704,-32768,-32768,-32768,-32768, 462, 1177, 461, - 1249, 1251, 573, 504, 1269, 301, 1272, 696, 519, 1277, - 458, 1343, 459, 547, 487, 325, 548, 1387, 315, 343, - 322, 564, 302, 344, 549, 488, 1349, 1357, 341, 34, - 1377, 1388, 607, 630 - ); - - protected array $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, - 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, - 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, - 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, - 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, - 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, - 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, - 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, - 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, - 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, - 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, - 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, - 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, - 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, - 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, - 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, - 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, - 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, - 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, - 138, 138, 138, 138, 138, 143, 143, 144, 144, 145, - 145, 145, 145, 145, 146, 147, 147, 142, 142, 139, - 139, 141, 141, 149, 149, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 140, 150, 150, 152, 151, - 151, 153, 153, 114, 154, 154, 156, 156, 156, 155, - 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, - 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, - 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, - 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, - 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, - 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, - 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, - 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, - 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, - 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, - 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, - 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, - 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 - ); - - protected array $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, - 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, - 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, - 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, - 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, - 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, - 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, - 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, - 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, - 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, - 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, - 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, - 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, - 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, - 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, - 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, - 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, - 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 5, 4, 3, - 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, - 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 4, 1, - 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, - 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 - ); - - protected function initReduceCallbacks(): void { - $this->reduceCallbacks = [ - 0 => null, - 1 => static function ($self, $stackPos) { - $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); - }, - 2 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 3 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 4 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 5 => null, - 6 => null, - 7 => null, - 8 => null, - 9 => null, - 10 => null, - 11 => null, - 12 => null, - 13 => null, - 14 => null, - 15 => null, - 16 => null, - 17 => null, - 18 => null, - 19 => null, - 20 => null, - 21 => null, - 22 => null, - 23 => null, - 24 => null, - 25 => null, - 26 => null, - 27 => null, - 28 => null, - 29 => null, - 30 => null, - 31 => null, - 32 => null, - 33 => null, - 34 => null, - 35 => null, - 36 => null, - 37 => null, - 38 => null, - 39 => null, - 40 => null, - 41 => null, - 42 => null, - 43 => null, - 44 => null, - 45 => null, - 46 => null, - 47 => null, - 48 => null, - 49 => null, - 50 => null, - 51 => null, - 52 => null, - 53 => null, - 54 => null, - 55 => null, - 56 => null, - 57 => null, - 58 => null, - 59 => null, - 60 => null, - 61 => null, - 62 => null, - 63 => null, - 64 => null, - 65 => null, - 66 => null, - 67 => null, - 68 => null, - 69 => null, - 70 => null, - 71 => null, - 72 => null, - 73 => null, - 74 => null, - 75 => null, - 76 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 77 => null, - 78 => null, - 79 => null, - 80 => null, - 81 => null, - 82 => null, - 83 => null, - 84 => null, - 85 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 86 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 87 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 88 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 89 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 90 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 91 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 92 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 93 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 94 => null, - 95 => static function ($self, $stackPos) { - $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 96 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 97 => static function ($self, $stackPos) { - /* nothing */ - }, - 98 => static function ($self, $stackPos) { - /* nothing */ - }, - 99 => static function ($self, $stackPos) { - /* nothing */ - }, - 100 => static function ($self, $stackPos) { - $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 101 => null, - 102 => null, - 103 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 104 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 105 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 106 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 107 => static function ($self, $stackPos) { - $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 108 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 109 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 110 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 111 => null, - 112 => null, - 113 => null, - 114 => null, - 115 => static function ($self, $stackPos) { - $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 116 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $self->checkNamespace($self->semValue); - }, - 117 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 118 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 119 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 120 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 121 => null, - 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); - }, - 123 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); - $self->checkConstantAttributes($self->semValue); - }, - 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 125 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 127 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 128 => null, - 129 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 130 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 131 => null, - 132 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 133 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 134 => null, - 135 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 136 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 137 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 138 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 139 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 140 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 141 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 142 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; - }, - 143 => null, - 144 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 145 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 146 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 147 => null, - 148 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 149 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 150 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 151 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 152 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 153 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 154 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 155 => null, - 156 => null, - 157 => null, - 158 => static function ($self, $stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 159 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 160 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 161 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 162 => static function ($self, $stackPos) { - $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 163 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 164 => static function ($self, $stackPos) { - $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 165 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 166 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 167 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 168 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 169 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 170 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 171 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 172 => static function ($self, $stackPos) { - - $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); - - }, - 173 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 174 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 175 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 176 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 177 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 178 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 179 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); - }, - 180 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 181 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 182 => static function ($self, $stackPos) { - $self->semValue = null; /* means: no statement */ - }, - 183 => null, - 184 => static function ($self, $stackPos) { - $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); - }, - 185 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 186 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 187 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 188 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 189 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 190 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 191 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 192 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 193 => null, - 194 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 195 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 196 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 197 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 198 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 199 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 200 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 201 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 202 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 203 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 204 => null, - 205 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 206 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 207 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 209 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 210 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(7-2)); - }, - 211 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(8-3)); - }, - 212 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkInterface($self->semValue, $stackPos-(7-3)); - }, - 213 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 214 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkEnum($self->semValue, $stackPos-(8-3)); - }, - 215 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 216 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 217 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 218 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 219 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 220 => null, - 221 => null, - 222 => static function ($self, $stackPos) { - $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 223 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 224 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 225 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 226 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 227 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 228 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 229 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 230 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 231 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 232 => null, - 233 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 234 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 235 => null, - 236 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 237 => null, - 238 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 239 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 240 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 241 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 242 => null, - 243 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 244 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 245 => static function ($self, $stackPos) { - $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 246 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 247 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 248 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 249 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(5-3)]; - }, - 250 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 251 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 252 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 253 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 254 => null, - 255 => null, - 256 => static function ($self, $stackPos) { - $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 257 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 258 => null, - 259 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 260 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 261 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 262 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 263 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 264 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 265 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 266 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 267 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 268 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 269 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 270 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 271 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 272 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 273 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 274 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 275 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 276 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-2)], true); - }, - 277 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 278 => static function ($self, $stackPos) { - $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); - }, - 279 => null, - 280 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 281 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 282 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 283 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 284 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 286 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 287 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 288 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 289 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 290 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 291 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 292 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 293 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 294 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 295 => static function ($self, $stackPos) { - $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); - }, - 296 => null, - 297 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 298 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 299 => null, - 300 => null, - 301 => static function ($self, $stackPos) { - $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 302 => static function ($self, $stackPos) { - $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); - }, - 303 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 304 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 305 => null, - 306 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 307 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 308 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 309 => null, - 310 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 311 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 312 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 313 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 314 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 315 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 316 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 317 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 318 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 319 => null, - 320 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 321 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 322 => null, - 323 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 324 => null, - 325 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 326 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 327 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 328 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 329 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 330 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 331 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 332 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 333 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - }, - 334 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 335 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); - }, - 336 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 337 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 338 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 340 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 341 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 342 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 343 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); - }, - 344 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 345 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 346 => null, - 347 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 348 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 349 => null, - 350 => null, - 351 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 352 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 353 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 354 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 355 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } - }, - 356 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 357 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - }, - 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); - $self->checkClassConst($self->semValue, $stackPos-(5-2)); - }, - 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); - $self->checkClassConst($self->semValue, $stackPos-(6-2)); - }, - 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - $self->checkClassMethod($self->semValue, $stackPos-(10-2)); - }, - 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 364 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ - }, - 365 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 366 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 367 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 368 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 369 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 372 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 373 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 374 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 375 => null, - 376 => static function ($self, $stackPos) { - $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); - }, - 377 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 378 => null, - 379 => null, - 380 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 381 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 382 => null, - 383 => null, - 384 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 385 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 386 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 387 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 388 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 389 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 390 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 391 => static function ($self, $stackPos) { - $self->semValue = Modifiers::STATIC; - }, - 392 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 393 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 394 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 395 => null, - 396 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 397 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 398 => static function ($self, $stackPos) { - $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 399 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 400 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 401 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 402 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 403 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 404 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, null); - }, - 405 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); - }, - 406 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 407 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 408 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 409 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 410 => static function ($self, $stackPos) { - $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 411 => null, - 412 => null, - 413 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 414 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 415 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 416 => null, - 417 => null, - 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - if (!$self->phpVersion->allowsAssignNewByReference()) { - $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - } - - }, - 423 => null, - 424 => null, - 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 476 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 479 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 487 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 488 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); - }, - 489 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 490 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 491 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 492 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 493 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 494 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 495 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 496 => static function ($self, $stackPos) { - $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 497 => null, - 498 => static function ($self, $stackPos) { - $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 499 => static function ($self, $stackPos) { - $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 500 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 501 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 502 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 503 => static function ($self, $stackPos) { - $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 504 => static function ($self, $stackPos) { - $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 505 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 506 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 507 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 508 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 509 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 510 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 511 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 512 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 513 => static function ($self, $stackPos) { - $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); - $self->checkClass($self->semValue[0], -1); - }, - 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 515 => static function ($self, $stackPos) { - list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 516 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 517 => null, - 518 => null, - 519 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 520 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 521 => null, - 522 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 523 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 524 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 525 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 526 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 527 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 530 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 531 => null, - 532 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 533 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 534 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 535 => static function ($self, $stackPos) { - $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 536 => null, - 537 => null, - 538 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 539 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 540 => null, - 541 => null, - 542 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 543 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; - }, - 544 => static function ($self, $stackPos) { - foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 545 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 546 => null, - 547 => static function ($self, $stackPos) { - $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 548 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 549 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 550 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 551 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 552 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 553 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 554 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 555 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 556 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 557 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 558 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 559 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 560 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); - }, - 561 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->offsetSet($self->semValue); - }, - 562 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); - }, - 563 => static function ($self, $stackPos) { - $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); - }, - 564 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); - }, - 565 => static function ($self, $stackPos) { - $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); - }, - 566 => static function ($self, $stackPos) { - $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 567 => null, - 568 => null, - 569 => null, - 570 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 571 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); - }, - 572 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 573 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 574 => null, - 575 => null, - 576 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 577 => null, - 578 => null, - 579 => null, - 580 => null, - 581 => null, - 582 => null, - 583 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 584 => null, - 585 => null, - 586 => null, - 587 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 588 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 589 => null, - 590 => static function ($self, $stackPos) { - $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 591 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 592 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 593 => null, - 594 => null, - 595 => null, - 596 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 597 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 598 => null, - 599 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 600 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 601 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 602 => static function ($self, $stackPos) { - $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; - }, - 603 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 604 => null, - 605 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 606 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 609 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 611 => null, - 612 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 613 => null, - 614 => null, - 615 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 616 => null, - 617 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 618 => static function ($self, $stackPos) { - $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $self->postprocessList($self->semValue); - }, - 619 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); - }, - 620 => null, - 621 => static function ($self, $stackPos) { - /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ - }, - 622 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 623 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 624 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 625 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 626 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 627 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 628 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 629 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 630 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); - }, - 631 => static function ($self, $stackPos) { - /* Create an Error node now to remember the position. We'll later either report an error, - or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $self->createEmptyElemAttributes($self->tokenPos); - $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); - }, - 632 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 633 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 634 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 635 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); - }, - 636 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); - }, - 637 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 638 => null, - 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 644 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 645 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 646 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 647 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 648 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 649 => null, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php deleted file mode 100644 index 7a15cef5..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php +++ /dev/null @@ -1,2909 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_PIPE", - "'.'", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_READONLY", - "T_PUBLIC_SET", - "T_PROTECTED_SET", - "T_PRIVATE_SET", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_ENUM", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_PROPERTY_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "T_ATTRIBUTE", - "';'", - "']'", - "'('", - "')'", - "'{'", - "'}'", - "'`'", - "'\"'", - "'$'" - ); - - protected array $tokenToSymbol = array( - 0, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 58, 172, 174, 173, 57, 174, 174, - 167, 168, 55, 53, 9, 54, 50, 56, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 32, 165, - 45, 17, 47, 31, 70, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 72, 174, 166, 37, 174, 171, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 169, 36, 170, 60, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 1, 2, 3, 4, - 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, - 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, - 41, 42, 43, 44, 46, 48, 49, 51, 52, 59, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164 - ); - - protected array $action = array( - 132, 133, 134, 582, 135, 136, 162, 779, 780, 781, - 137, 41, 863,-32766, 970, 1404, -584, 974, 973, 1302, - 0, 395, 396, 455, 246, 854,-32766,-32766,-32766,-32766, - -32766, 440,-32766, 27,-32766, 773, 772,-32766,-32766,-32766, - -32766, 508,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1148,-32766, - 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1385, 300, - 271, 53, 398, 786, 787, 788, 789, 305, 865, 441, - -341, 39, 254, -584, -584, -195, 843, 790, 791, 792, - 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, - 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, - 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, - 850, 584, 1062, -194, 856, 807, 808, 585, 586, 3, - 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, - 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, - -32766,-32766,-32766, 828, 595, 596,-32766, 138, 764, 132, - 133, 134, 582, 135, 136, 1098, 779, 780, 781, 137, - 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1302, 613, - 153, 1071, 749, 990, 991,-32766,-32766,-32766, 992,-32766, - 891,-32766, 892,-32766, 773, 772,-32766, 986, 1309, 397, - 396,-32766,-32766,-32766, 858, 299, 630,-32766,-32766, 440, - 502, 736,-32766,-32766, 437, 782,-32767,-32767,-32767,-32767, - 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 271, - 53, 398, 786, 787, 788, 789, 144, 1071, 441, -341, - 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, - 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, - 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, - 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, - 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, - 829, 830, 842, 826, 827, 1370, 148, 587, 588, 825, - 589, 590, 591, 592, 245, 593, 594, 395, 396,-32766, - -32766,-32766, 828, 595, 596, -85, 138, 440, 132, 133, - 134, 582, 135, 136, 1095, 779, 780, 781, 137, 41, - -32766,-32766,-32766,-32766,-32766, 51, 578, 1302, 257,-32766, - 636, 107, 108, 109,-32766,-32766,-32766, 503,-32766, 316, - -32766,-32766,-32766, 773, 772,-32766, -383, 166, -383, 1022, - -32766,-32766,-32766, 305, 79, 1133,-32766,-32766, 1414, 762, - 332, 1415,-32766, 437, 782,-32766, 1071, 110, 111, 112, - 113, 114, -85, 283,-32766, 477, 478, 479, 271, 53, - 398, 786, 787, 788, 789, 115, 407, 441, 10,-32766, - 299, 1341, 306, 307, 843, 790, 791, 792, 793, 794, - 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, - 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, - 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, - 320, 1068, -582, 807, 808, 585, 586, 1389, 831, 829, - 830, 842, 826, 827, 329, 1388, 587, 588, 825, 589, - 590, 591, 592, 86, 593, 594, 1071, 332,-32766,-32766, - -32766, 828, 595, 596, 349, 151, -581, 132, 133, 134, - 582, 135, 136, 1100, 779, 780, 781, 137, 41,-32766, - 290,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 891, 1175, 892, -582, - -582, 754, 773, 772, 1159, 1160, 1161, 1155, 1154, 1153, - 1162, 1156, 1157, 1158,-32766, -582,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 782,-32766,-32766,-32766, -588, -78,-32766, - -32766,-32766, 350, -581, -581,-32766,-32766, 271, 53, 398, - 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -581, - -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, - 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, - 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, - 805, 806, 368, 846, 847, 848, 849, 850, 584, -620, - 1068, -620, 807, 808, 585, 586, 389, 831, 829, 830, - 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, - 591, 592, 333, 593, 594, 1071, 87, 88, 89, 459, - 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, - 778, 854, 779, 780, 781, 816, 817, 40, 461, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 462, 283, 1329, 1159, 1160, 1161, - 1155, 1154, 1153, 1162, 1156, 1157, 1158, 115, 869, 488, - 489, 782, 1304, 1303, 1305, 108, 109, 1132, 154,-32766, - -32766, 1134, 679, 23, 156, 783, 784, 785, 786, 787, - 788, 789, 698, 699, 852, 152, 423, -580, 393, 394, - 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, - 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, - 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, - 845, 846, 847, 848, 849, 850, 851, 1094, -578, 863, - 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, - 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, - 294, 836, 837, 158, -580, -580, 160, 294, 828, 839, - 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, - -580, -57, 60, 61, -110, 62, -110, 670, 671, 129, - 130, 312, -587, 140, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -578, -578, 141, 147, 949, - 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, - -72, -578, 63, 64, 143, -309, -71, 65, 332, 66, - 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, - 739, 31, 276, 47, 457, 535, -357, 713, 740, 1335, - 1336, 536, -70, 863, 1068, -69, -68, 1333, 45, 22, - 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, - 542, 714, 715, -46, 48, 49, 463, 392, 391, 1071, - 50, 543, -18, 145, 281, 1302, 381, 348, 291, 750, - 1304, 1303, 1305, 1295, 939, 753, 290, 948, 545, 546, - 547, 150, 939, 290, -305, 295, 288, 289, 292, 293, - 549, 550, 338, 1321, 1322, 1323, 1324, 1326, 1318, 1319, - 304, 1300, 296, 301, 302, 283, 1325, 1320, 773, 772, - 1304, 1303, 1305, 305, 308, 309, 75, -154, -154, -154, - 327, 328, 332, 966, 854, 1070, 939, 149, 115, 1416, - 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, - 723, 313, 31, 277, 1304, 1303, 1305, 863, 390,-32766, - 600, 1166, 987, 951, 863, 310, 701, 734, 1333, 990, - 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1340, - 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 702, 949, 634, 1295, 773, 772, 741, -579, 305, - -614, 1334, 0, 0, 0, 951, 311, 949, 0, 734, - -154, 549, 550, 319, 1321, 1322, 1323, 1324, 1326, 1318, - 1319, 1209, 1211, 744, 0, 1342, 0, 1325, 1320, -544, - -534, 0, -578,-32766, -4, 949, 11, 77, 751, 1302, - 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -613, - -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1330, 773, - 772, 760,-32766,-32766,-32766, -579, -579, 882,-32766,-32766, - 930, 1031, 1008, 1015,-32766, 437, 1005, 939, 1016, 928, - 1003, -579, 1137, 1140, 1141, 1138,-32766, 1177, 1139, 1145, - 37, 874, 939, -586, 1357, 1374, 1407,-32766, 673, -578, - -578, -612, -588, 1302, -587, -586, -585, 31, 276, -528, - -32766,-32766,-32766, 1,-32766, -578,-32766, 78,-32766, 863, - 939,-32766, 32, 1333, -278, 33,-32766,-32766,-32766, 42, - 1007, 46,-32766,-32766, 734, 76, 80, 81,-32766, 437, - 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, - -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1295, - 734, 1333, 334, 369, 370, 371, 548, 986, -110, -110, - -110, 951, 372, 326, 373, 734, 374, 550, 375, 1321, - 1322, 1323, 1324, 1326, 1318, 1319, 376, 377, 422, 378, - 21, -50, 1325, 1320, 379, 382, 454, 1295, 577, 951, - 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, - 16, 17, 18, 20, 363, 550, 421, 1321, 1322, 1323, - 1324, 1326, 1318, 1319, 142, 504, 505, 512, 515, 516, - 1325, 1320, 949, 517, 518,-32766, 522, 523, 524, 531, - 77, 1302, 611, 718, 1101, 328, 332, 1097,-32766,-32766, - -32766, 1250,-32766, 1331,-32766, 949,-32766, 1099, 1096,-32766, - 1077, 1290, 1309, 1073,-32766,-32766,-32766, -280,-32766, -102, - -32766,-32766, 14, 19, 1302, 24,-32766, 437, 323, 420, - 625,-32766,-32766,-32766, 631,-32766, 659,-32766,-32766,-32766, - 724, 1254,-32766, -16, 1308, 1251, 1386,-32766,-32766,-32766, - 735,-32766, 738,-32766,-32766, 742, 743, 1302, 745,-32766, - 437, 746, 747, 748,-32766,-32766,-32766, 939,-32766, 300, - -32766,-32766,-32766, 752, 1309,-32766, 764, 737, 332, 765, - -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 426, 390, - 939, 756,-32766, 437, 926, 863, 1411, 1413, 885, 884, - 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1412, - 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, - 1283, 959, 969, 990, 991, 957, 1176, 1172, 544, 1126, - -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, - -110, 1410, 2, 1368, -110, 1268, 951, 1383, 0, 0, - 734, -253, 0,-32766, 0, 0,-32766, 863, 1059, 1054, - 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, - 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, - 0, 1071, 0, 0, 332, 0, 0, 0, 0, 0, - 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, - 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, - 0, 0, 0, 0, 0,-32766, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, - 79, 0, 0, 0, 0, 0, 332 - ); - - protected array $actionCheck = array( - 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, - 13, 14, 84, 76, 1, 87, 72, 74, 75, 82, - 0, 108, 109, 110, 15, 82, 89, 90, 91, 10, - 93, 118, 95, 103, 97, 38, 39, 100, 10, 11, - 12, 104, 105, 106, 107, 10, 11, 12, 111, 112, - 15, 10, 11, 12, 117, 118, 59, 82, 128, 31, - 1, 33, 34, 35, 36, 37, 129, 124, 1, 31, - 73, 74, 75, 76, 77, 78, 79, 164, 1, 82, - 9, 153, 154, 139, 140, 9, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 1, 9, 82, 128, 129, 130, 131, 9, - 133, 134, 135, 136, 137, 138, 9, 162, 141, 142, - 143, 144, 145, 146, 147, 86, 149, 150, 9, 82, - 10, 11, 12, 156, 157, 158, 118, 160, 169, 3, - 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, - 14, 31, 76, 33, 34, 35, 36, 168, 82, 83, - 15, 143, 169, 119, 120, 89, 90, 91, 124, 93, - 108, 95, 110, 97, 38, 39, 100, 133, 1, 108, - 109, 105, 106, 107, 162, 167, 1, 111, 112, 118, - 32, 169, 118, 117, 118, 59, 45, 46, 47, 48, - 49, 50, 51, 52, 165, 129, 32, 9, 169, 73, - 74, 75, 76, 77, 78, 79, 169, 143, 82, 168, - 173, 9, 165, 161, 168, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 84, 168, 9, 128, 129, 130, 131, 168, 133, - 134, 135, 136, 137, 138, 1, 9, 141, 142, 143, - 144, 145, 146, 147, 99, 149, 150, 108, 109, 10, - 11, 12, 156, 157, 158, 32, 160, 118, 3, 4, - 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, - 31, 76, 33, 34, 35, 72, 87, 82, 9, 142, - 54, 50, 51, 52, 89, 90, 91, 169, 93, 9, - 95, 118, 97, 38, 39, 100, 108, 15, 110, 165, - 105, 106, 107, 164, 167, 165, 111, 112, 82, 169, - 173, 85, 117, 118, 59, 118, 143, 53, 54, 55, - 56, 57, 99, 59, 129, 134, 135, 136, 73, 74, - 75, 76, 77, 78, 79, 71, 108, 82, 110, 142, - 167, 152, 139, 140, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 9, 118, 72, 128, 129, 130, 131, 1, 133, 134, - 135, 136, 137, 138, 9, 9, 141, 142, 143, 144, - 145, 146, 147, 169, 149, 150, 143, 173, 10, 11, - 12, 156, 157, 158, 9, 160, 72, 3, 4, 5, - 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, - 167, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 10, 11, 12, 108, 165, 110, 139, - 140, 169, 38, 39, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 31, 155, 33, 34, 35, 36, - 37, 38, 39, 59, 10, 11, 12, 167, 17, 10, - 11, 12, 9, 139, 140, 10, 11, 73, 74, 75, - 76, 77, 78, 79, 9, 31, 82, 33, 34, 155, - 31, 38, 39, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 166, - 118, 168, 128, 129, 130, 131, 9, 133, 134, 135, - 136, 137, 138, 82, 9, 141, 142, 143, 144, 145, - 146, 147, 72, 149, 150, 143, 10, 11, 12, 9, - 156, 157, 158, 9, 160, 3, 4, 5, 6, 7, - 8, 82, 10, 11, 12, 13, 14, 31, 9, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 9, 59, 1, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 71, 9, 139, - 140, 59, 161, 162, 163, 51, 52, 1, 15, 53, - 54, 170, 77, 78, 15, 73, 74, 75, 76, 77, - 78, 79, 77, 78, 82, 103, 104, 72, 108, 109, - 15, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 1, 72, 84, - 128, 129, 130, 131, 17, 133, 134, 135, 136, 137, - 138, 108, 109, 141, 142, 143, 144, 145, 146, 147, - 31, 149, 150, 15, 139, 140, 15, 31, 156, 157, - 158, 2, 3, 4, 5, 6, 7, 8, 15, 103, - 155, 17, 13, 14, 108, 16, 110, 113, 114, 17, - 17, 115, 167, 17, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 139, 140, 17, 17, 1, - 17, 82, 32, 17, 17, 17, 32, 1, 32, 32, - 32, 155, 53, 54, 169, 36, 32, 58, 173, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 32, 72, 73, 74, 75, 76, 170, 118, 32, 80, - 81, 82, 32, 84, 118, 32, 32, 88, 89, 90, - 91, 1, 93, 32, 95, 32, 97, 72, 32, 100, - 101, 142, 143, 32, 105, 106, 107, 108, 109, 143, - 111, 112, 32, 32, 32, 82, 117, 118, 32, 32, - 161, 162, 163, 124, 86, 32, 167, 32, 129, 130, - 131, 32, 86, 167, 36, 38, 36, 36, 36, 36, - 141, 142, 36, 144, 145, 146, 147, 148, 149, 150, - 151, 118, 38, 38, 38, 59, 157, 158, 38, 39, - 161, 162, 163, 164, 139, 140, 167, 77, 78, 79, - 171, 172, 173, 39, 82, 142, 86, 72, 71, 85, - 155, 92, 92, 79, 94, 94, 96, 99, 98, 115, - 82, 116, 72, 73, 161, 162, 163, 84, 108, 87, - 91, 84, 133, 165, 84, 137, 96, 169, 88, 119, - 120, 165, 142, 102, 124, 169, 1, 98, 159, 152, - 99, 99, 132, 133, 134, 135, 136, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 102, 1, 159, 124, 38, 39, 32, 72, 164, - 167, 172, -1, -1, -1, 165, 138, 1, -1, 169, - 170, 141, 142, 137, 144, 145, 146, 147, 148, 149, - 150, 61, 62, 32, -1, 152, -1, 157, 158, 155, - 155, -1, 72, 76, 0, 1, 155, 167, 32, 82, - 155, 155, 172, 173, 161, 165, 89, 90, 91, 167, - 93, 86, 95, 160, 97, 165, 165, 100, 166, 38, - 39, 165, 105, 106, 107, 139, 140, 165, 111, 112, - 165, 165, 165, 165, 117, 118, 165, 86, 165, 165, - 165, 155, 165, 165, 165, 165, 129, 165, 165, 165, - 169, 166, 86, 167, 166, 166, 166, 76, 166, 139, - 140, 167, 167, 82, 167, 167, 167, 72, 73, 167, - 89, 90, 91, 167, 93, 155, 95, 160, 97, 84, - 86, 100, 167, 88, 168, 167, 105, 106, 107, 167, - 165, 167, 111, 112, 169, 167, 167, 167, 117, 118, - 167, 167, 108, 167, 110, 72, 73, 167, 167, 115, - 129, 167, 167, 119, 120, 167, 165, 84, 124, 124, - 169, 88, 167, 167, 167, 167, 132, 133, 134, 135, - 136, 165, 167, 169, 167, 169, 167, 142, 167, 144, - 145, 146, 147, 148, 149, 150, 167, 167, 170, 167, - 156, 32, 157, 158, 167, 167, 167, 124, 167, 165, - 167, 169, 167, 169, 170, 168, 168, 172, 173, 168, - 168, 168, 168, 168, 168, 142, 168, 144, 145, 146, - 147, 148, 149, 150, 32, 168, 168, 168, 168, 168, - 157, 158, 1, 168, 168, 76, 168, 168, 168, 168, - 167, 82, 168, 168, 168, 172, 173, 168, 89, 90, - 91, 168, 93, 168, 95, 1, 97, 168, 168, 100, - 168, 168, 1, 168, 105, 106, 107, 168, 76, 168, - 111, 112, 168, 168, 82, 168, 117, 118, 168, 168, - 168, 89, 90, 91, 168, 93, 168, 95, 129, 97, - 168, 168, 100, 32, 168, 168, 168, 105, 106, 107, - 169, 76, 169, 111, 112, 169, 169, 82, 169, 117, - 118, 169, 169, 169, 89, 90, 91, 86, 93, 31, - 95, 129, 97, 169, 1, 100, 169, 169, 173, 169, - 105, 106, 107, 102, 103, 104, 111, 112, 170, 108, - 86, 170, 117, 118, 170, 84, 170, 170, 170, 170, - 119, 120, 170, 170, 129, 124, 102, 103, 104, 170, - 170, 170, 108, 132, 133, 134, 135, 136, 170, 170, - 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, - 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, - 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, - 169, 170, -1, 142, -1, -1, 118, 84, 120, 121, - 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, - -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, - -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, - -1, -1, 119, 120, -1, -1, -1, 124, -1, -1, - -1, -1, -1, -1, -1, 167, 133, -1, -1, -1, - -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 164, -1, -1, - 167, -1, -1, -1, -1, -1, 173 - ); - - protected array $actionBase = array( - 0, 156, -3, 315, 474, 474, 880, 1074, 1271, 1294, - 749, 675, 531, 559, 836, 1031, 1031, 1046, 1031, 828, - 1005, 42, 59, 59, 59, 963, 898, 632, 632, 898, - 632, 997, 997, 997, 997, 1061, 1061, -63, -63, 96, - 1232, 1199, 255, 255, 255, 255, 255, 1265, 255, 255, - 255, 255, 255, 1265, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 77, 194, 120, - 205, 1197, 783, 1150, 1163, 1152, 1166, 1145, 1144, 1151, - 1156, 1167, 1261, 1263, 889, 1254, 1267, 1158, 972, 1147, - 1162, 962, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 19, - 35, 535, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, - 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, - 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, - 1328, 1301, 171, 171, 171, 171, 1363, 1363, -70, 523, - 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, - 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, - 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, - 860, 860, 860, 860, 913, 869, 860, 1036, 1049, 860, - 860, 370, 645, 966, 646, 646, 398, -72, -72, 398, - 64, -72, 294, 286, 257, 859, 91, 433, 257, 1073, - 404, 686, 686, 815, 686, 686, 686, 923, 610, 923, - 1141, 902, 902, 861, 807, 964, 1198, 1168, 901, 1252, - 929, 1253, 1200, 342, 251, -56, 263, 550, 806, 1139, - 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, - 1139, 1195, 523, 1141, -25, 1247, 1249, 1195, 1195, 1195, - 523, 523, 523, 523, 523, 523, 523, 523, 870, 523, - 523, 694, -25, 625, 635, -25, 896, 523, 915, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 178, 77, 77, 194, 13, 13, 77, 200, 121, 13, - 13, 13, -11, 13, 77, 77, 77, 610, 886, 849, - 663, 283, 874, 114, 886, 886, 886, 71, 9, 76, - 809, 888, 288, 882, 882, 882, 907, 986, 986, 882, - 903, 882, 907, 882, 882, 986, 986, 875, 986, 274, - 620, 465, 597, 624, 986, 340, 882, 882, 882, 882, - 916, 986, 127, 139, 639, 882, 329, 287, 882, 882, - 916, 858, 876, 908, 986, 986, 986, 916, 545, 908, - 908, 908, 931, 936, 864, 872, 445, 431, 679, 232, - 924, 872, 872, 882, 605, 864, 872, 864, 872, 933, - 872, 872, 872, 864, 872, 903, 533, 872, 813, 665, - 218, 872, 882, 20, 1008, 1009, 800, 1010, 1002, 1013, - 1069, 1014, 1016, 1171, 982, 1028, 1004, 1020, 1071, 998, - 995, 885, 792, 793, 921, 914, 979, 897, 897, 897, - 975, 977, 897, 897, 897, 897, 897, 897, 897, 897, - 792, 932, 926, 899, 1037, 796, 810, 1114, 857, 1214, - 1264, 1036, 1008, 1016, 804, 1004, 1020, 998, 995, 856, - 853, 844, 851, 843, 840, 808, 814, 871, 1116, 1119, - 1021, 920, 811, 1085, 1038, 1211, 1044, 1045, 1047, 1088, - 1123, 942, 1125, 1216, 895, 1217, 1218, 965, 1051, 1173, - 897, 974, 873, 968, 1049, 978, 792, 969, 1129, 1130, - 1081, 961, 1097, 1098, 1072, 911, 884, 970, 1219, 1059, - 1060, 1062, 1176, 1177, 930, 1082, 996, 1099, 912, 1058, - 1100, 1101, 1105, 1106, 1179, 1222, 1182, 922, 1183, 945, - 879, 1077, 909, 1223, 165, 892, 893, 906, 1068, 683, - 1035, 1184, 1208, 1229, 1108, 1109, 1110, 1230, 1231, 1024, - 946, 1083, 900, 1084, 1078, 947, 948, 689, 905, 1132, - 890, 891, 904, 705, 768, 1238, 1239, 1240, 1025, 877, - 894, 951, 953, 1133, 887, 1135, 1241, 771, 954, 1242, - 1115, 816, 817, 521, 784, 747, 818, 881, 1194, 925, - 865, 878, 1067, 817, 883, 955, 1245, 957, 958, 959, - 1111, 960, 1086, 1246, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 632, 632, 632, - 632, 789, 789, 789, 789, 789, 789, 789, 632, 789, - 789, 789, 632, 632, 0, 0, 632, 0, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 789, 789, 789, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, - 616, 616, 823, 823, 616, 616, 823, 823, 823, 823, - 823, 823, 823, 823, 823, 823, 616, 616, 0, 616, - 616, 616, 616, 616, 616, 616, 875, 823, 823, 324, - 324, 324, 324, 823, 823, 396, 396, 396, 823, 324, - 823, 64, 324, 823, 64, 823, 823, 823, 823, 823, - 823, 823, 823, 823, 0, 0, 823, 823, 823, 823, - -25, -72, 823, 903, 903, 903, 903, 823, 823, 823, - 823, -72, -72, 823, -57, -57, 823, 823, 0, 0, - 0, 324, 324, -25, 0, 0, -25, 0, 0, 903, - 903, 823, 64, 875, 446, 823, 342, 0, 0, 0, - 0, 0, 0, 0, -25, 903, -25, 523, -72, -72, - 523, 523, 13, 77, 446, 612, 612, 612, 612, 77, - 0, 0, 0, 0, 0, 610, 875, 875, 875, 875, - 875, 875, 875, 875, 875, 875, 875, 875, 903, 0, - 875, 0, 875, 875, 903, 903, 903, 0, 0, 0, - 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, - 0, 0, 0, 903, 0, 986, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 897, 911, 0, 0, 911, - 0, 897, 897, 897, 0, 0, 0, 905, 887 - ); - - protected array $actionDefault = array( - 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 632, 632, 632, 632,32767,32767, 257, 102,32767, - 32767, 503, 417, 417, 417,32767,32767,32767, 576, 576, - 576, 576, 576, 17,32767,32767,32767,32767,32767,32767, - 32767, 503,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 36, 7, 8, 10, 11, 49, 338, 100, - 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 404, 625,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 497, 507, 485, 486, 488, 489, 416, 577, - 631, 344, 628, 342, 415, 146, 354, 343, 245, 261, - 508, 262, 509, 512, 513, 218, 401, 150, 151, 448, - 504, 450, 502, 506, 449, 422, 429, 430, 431, 432, - 433, 434, 435, 436, 437, 438, 439, 440, 441, 420, - 421, 505, 482, 481, 480,32767,32767, 446, 447,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 451, - 454, 419, 452, 453, 470, 471, 468, 469, 472,32767, - 323,32767, 473, 474, 475, 476,32767,32767, 382, 196, - 380,32767, 477,32767, 111, 455, 323, 111,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 461, 462,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, - 100, 520, 570, 479, 456, 457,32767, 545,32767, 102, - 32767, 547,32767,32767,32767,32767,32767,32767,32767,32767, - 572, 443, 445, 540, 626, 423, 629,32767, 533, 100, - 196,32767, 546, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 571,32767, 639, 533, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110,32767, 196, 110,32767, 110, 110,32767,32767, 100, - 196, 196, 196, 196, 196, 196, 196, 196, 548, 196, - 196, 191,32767, 271, 273, 102, 594, 196, 550,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 404,32767,32767,32767,32767, 533, 466, 139, - 32767, 535, 139, 578, 458, 459, 460, 578, 578, 578, - 319, 296,32767,32767,32767,32767,32767, 548, 548, 100, - 100, 100, 100,32767,32767,32767,32767, 111, 519, 99, - 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, - 226,32767, 101, 101, 99,32767, 101, 101,32767,32767, - 226, 228, 215, 230,32767, 598, 599, 226, 101, 230, - 230, 230, 250, 250, 522, 325, 101, 99, 101, 101, - 198, 325, 325,32767, 101, 522, 325, 522, 325, 200, - 325, 325, 325, 522, 325,32767, 101, 325, 217, 99, - 99, 325,32767,32767,32767,32767, 535,32767,32767,32767, - 32767,32767,32767,32767, 225,32767,32767,32767,32767,32767, - 32767,32767,32767, 565,32767, 583, 596, 464, 465, 467, - 582, 580, 490, 491, 492, 493, 494, 495, 496, 499, - 627,32767, 539,32767,32767,32767, 353,32767, 637,32767, - 32767,32767, 9, 74, 528, 42, 43, 51, 57, 554, - 555, 556, 557, 551, 552, 558, 553,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 638,32767, 578,32767,32767,32767,32767, - 463, 560, 604,32767,32767, 579, 630,32767,32767,32767, - 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 565,32767, 137,32767, - 32767,32767,32767,32767,32767,32767,32767, 561,32767,32767, - 32767, 578,32767,32767,32767,32767, 321, 318,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 578,32767,32767,32767,32767,32767, - 298,32767, 315,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 400, 535, 301, 303, 304,32767,32767,32767,32767, - 376,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 153, 153, 3, 3, 356, 153, - 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, - 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 368, 153, 402, 402, 411 - ); - - protected array $goto = array( - 201, 169, 201, 201, 201, 1069, 598, 719, 448, 684, - 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, - 449, 661, 481, 728, 570, 570, 570, 570, 1245, 626, - 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, - 220, 198, 198, 198, 198, 198, 1195, 199, 199, 199, - 199, 199, 1195, 192, 193, 194, 195, 196, 197, 222, - 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, - 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, - 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, - 247, 248, 259, 260, 262, 263, 264, 265, 266, 267, - 268, 272, 273, 274, 275, 282, 285, 297, 298, 324, - 325, 444, 445, 446, 620, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 193, 194, 195, 196, 197, 222, 203, 204, 205, - 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, - 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, - 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, - 883, 255, 255, 255, 255, 255, 1125, 605, 487, 487, - 622, 758, 660, 662, 1103, 359, 682, 487, 1075, 1074, - 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, - 922, 253, 253, 253, 253, 250, 256, 646, 646, 1078, - 1079, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, - 1332, 880, 351, 938, 933, 934, 947, 889, 935, 886, - 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, - 893, 364, 364, 364, 364, 352, 351, 532, 1131, 1127, - 1128, 1351, 1351, 331, 315, 1351, 1351, 1351, 1351, 1351, - 1351, 1351, 1351, 1351, 1351, 1069, 1301, 1072, 1072, 704, - 983, 1301, 1301, 1064, 1080, 1081, 1069, 942, 1301, 943, - 458, 1069, 881, 1069, 1069, 1069, 1069, 1069, 1069, 1069, - 1069, 1069, 897, 855, 1069, 1069, 1069, 1069, 677, 678, - 1301, 695, 696, 697, 1006, 1301, 1301, 1301, 1301, 450, - 909, 1301, 436, 896, 1301, 1301, 1382, 1382, 1382, 1382, - 915, 581, 574, 499, 612, 450, 367, 971, 971, 955, - 501, 1076, 1076, 956, 1400, 1400, 367, 367, 688, 1087, - 1083, 1084, 572, 411, 414, 623, 627, 572, 572, 367, - 367, 1400, 357, 367, 572, 1417, 1377, 1378, 317, 574, - 581, 607, 608, 318, 618, 624, 1390, 640, 641, 1027, - 576, 1403, 1403, 367, 367, 28, 474, 520, 442, 521, - 635, 1000, 1000, 1000, 1000, 527, 409, 474, 1348, 1348, - 994, 1001, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, - 1348, 1348, 633, 647, 650, 651, 652, 653, 674, 675, - 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 610, 1362, 467, - 683, 467, 876, 616, 638, 876, 467, 467, 1191, 861, - 1373, 360, 361, 1093, 456, 1373, 1373, 560, 560, 705, - 432, 560, 1373, 560, 560, 560, 560, 560, 560, 560, - 560, 1277, 975, 575, 602, 575, 1278, 1281, 976, 575, - 1282, 602, 689, 412, 480, 1384, 1384, 1384, 1384, 347, - 873, 716, 576, 861, 876, 861, 490, 619, 491, 492, - 639, 8, 857, 9, 902, 907, 989, 716, 1408, 1409, - 716, 1369, 418, 1296, 278, 899, 330, 1174, 424, 425, - 1292, 330, 330, 693, 1049, 694, 1114, 429, 430, 431, - 761, 707, 1060, 905, 433, 1102, 1104, 1107, 355, 467, - 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - 467, 419, 339, 467, 911, 467, 467, 1294, 628, 629, - 1116, 497, 960, 1181, 621, 1144, 1371, 1371, 1116, 1118, - 1297, 1298, 1011, 1284, 1046, 1151, 1179, 1152, 731, 871, - 528, 722, 901, 1142, 687, 1025, 1284, 496, 1375, 1376, - 895, 910, 898, 1113, 1117, 998, 427, 727, 1165, 1299, - 1359, 1360, 1291, 1030, 386, 1009, 1002, 0, 757, 0, - 0, 573, 1039, 1034, 654, 656, 658, 0, 0, 0, - 0, 0, 0, 0, 0, 876, 0, 0, 999, 0, - 766, 766, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1163, 914 - ); - - protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 127, 73, 66, 66, - 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, - 15, 5, 5, 5, 5, 5, 15, 48, 157, 157, - 134, 48, 48, 48, 131, 97, 48, 157, 119, 119, - 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, - 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, - 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 26, 177, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, - 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, - 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, - 89, 73, 73, 89, 89, 89, 73, 65, 73, 65, - 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 35, 6, 73, 73, 73, 73, 86, 86, - 73, 86, 86, 86, 49, 73, 73, 73, 73, 118, - 35, 73, 43, 35, 73, 73, 9, 9, 9, 9, - 45, 76, 76, 84, 181, 118, 14, 9, 9, 73, - 84, 118, 118, 73, 191, 191, 14, 14, 118, 118, - 118, 118, 19, 59, 59, 59, 59, 19, 19, 14, - 14, 191, 188, 14, 19, 14, 187, 187, 76, 76, - 76, 76, 76, 76, 76, 76, 190, 76, 76, 103, - 14, 191, 191, 14, 14, 76, 19, 163, 13, 163, - 13, 19, 19, 19, 19, 163, 62, 19, 180, 180, - 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, - 64, 23, 22, 2, 2, 22, 23, 23, 158, 12, - 134, 97, 97, 115, 113, 134, 134, 165, 165, 117, - 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, - 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, - 79, 9, 121, 9, 9, 134, 134, 134, 134, 29, - 18, 7, 14, 12, 22, 12, 9, 9, 9, 9, - 80, 46, 7, 46, 39, 9, 92, 7, 9, 9, - 7, 134, 28, 20, 24, 37, 24, 156, 82, 82, - 169, 24, 24, 82, 110, 82, 133, 82, 82, 82, - 99, 82, 114, 9, 82, 130, 130, 130, 82, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 31, 9, 23, 41, 23, 23, 14, 17, 17, - 134, 160, 17, 17, 8, 8, 134, 134, 134, 136, - 20, 20, 96, 20, 17, 149, 149, 149, 8, 20, - 8, 8, 17, 8, 17, 17, 20, 185, 185, 185, - 17, 16, 16, 16, 16, 93, 93, 93, 152, 20, - 20, 20, 17, 50, 141, 16, 50, -1, 50, -1, - -1, 50, 50, 50, 85, 85, 85, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, 16, -1, - 24, 24, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 16, 16 - ); - - protected array $gotoBase = array( - 0, 0, -303, 0, 0, 170, 280, 471, 543, 10, - 0, 0, 136, 31, 22, -186, 111, 66, 164, 71, - 95, 0, 148, 160, 235, 191, 214, 275, 155, 176, - 0, 86, 0, 0, 0, -92, 0, 156, 0, 165, - 0, 85, -1, 286, 0, 291, -270, 0, -558, 284, - 579, 0, 0, 0, 0, 0, -33, 0, 0, 294, - 0, 0, 341, 0, 184, 261, -237, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, - 172, 32, -3, -50, -167, 105, -444, 0, 0, -21, - 0, 0, 161, 274, 0, 0, 101, -318, 0, 97, - 0, 0, 0, 331, 381, 0, 0, -7, -38, 0, - 131, 0, 0, 158, 90, 162, 0, 159, 39, -100, - -83, 173, 0, 0, 0, 0, 0, 4, 0, 0, - 522, 182, 0, 127, 169, 0, 99, 0, 0, 0, - 0, -171, 0, 0, 0, 0, 0, 0, 0, 287, - 0, 0, 126, 0, 0, 0, 144, 141, 188, -255, - 93, 0, 0, -138, 0, 202, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, - 143, 292, 168, 0, 0, 270, 0, -31, 319, 0, - 332, 20, 0, 0 - ); - - protected array $gotoDefault = array( - -32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, - 729, 356, 648, 439, 1367, 940, 1180, 617, 872, 1310, - 1316, 475, 875, 336, 755, 952, 923, 924, 415, 402, - 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, - 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, - 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, - 416, 417, 1185, 609, 645, 944, 261, 603, 945, 401, - 946, 954, 406, 408, 710, 486, 525, 519, 428, 1146, - 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, - 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, - 1193, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, - 1048, 270, 1051, 510, 1061, 26, 690, 1066, 1067, 691, - 665, 1089, 666, 692, 667, 1091, 483, 599, 1194, 482, - 1106, 1112, 472, 1115, 1356, 473, 1119, 269, 1122, 286, - 362, 385, 452, 1129, 1130, 12, 1136, 720, 721, 25, - 280, 529, 1164, 711, 1170, 279, 1173, 469, 1192, 468, - 1265, 1267, 580, 511, 1285, 321, 1288, 703, 526, 1293, - 465, 1358, 466, 554, 494, 343, 555, 1401, 314, 365, - 340, 571, 322, 366, 556, 495, 1364, 1372, 337, 34, - 1391, 1402, 614, 637 - ); - - protected array $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, - 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, - 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, - 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, - 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, - 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, - 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, - 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, - 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, - 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, - 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, - 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, - 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, - 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, - 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, - 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, - 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, - 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, - 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, - 138, 138, 138, 138, 138, 138, 144, 144, 145, 145, - 146, 146, 146, 146, 146, 147, 148, 148, 143, 143, - 139, 139, 142, 142, 150, 150, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 140, 151, 151, 153, - 152, 152, 141, 141, 114, 114, 154, 154, 156, 156, - 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, - 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, - 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, - 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, - 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, - 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, - 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, - 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, - 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, - 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, - 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, - 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, - 193 - ); - - protected array $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, - 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, - 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, - 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, - 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, - 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, - 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, - 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, - 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, - 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, - 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, - 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, - 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, - 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, - 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, - 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, - 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, - 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, - 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, - 8, 9, 9, 10, 9, 10, 8, 3, 2, 2, - 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 4, 3, 3, - 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, - 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, - 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, - 1 - ); - - protected function initReduceCallbacks(): void { - $this->reduceCallbacks = [ - 0 => null, - 1 => static function ($self, $stackPos) { - $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); - }, - 2 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 3 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 4 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 5 => null, - 6 => null, - 7 => null, - 8 => null, - 9 => null, - 10 => null, - 11 => null, - 12 => null, - 13 => null, - 14 => null, - 15 => null, - 16 => null, - 17 => null, - 18 => null, - 19 => null, - 20 => null, - 21 => null, - 22 => null, - 23 => null, - 24 => null, - 25 => null, - 26 => null, - 27 => null, - 28 => null, - 29 => null, - 30 => null, - 31 => null, - 32 => null, - 33 => null, - 34 => null, - 35 => null, - 36 => null, - 37 => null, - 38 => null, - 39 => null, - 40 => null, - 41 => null, - 42 => null, - 43 => null, - 44 => null, - 45 => null, - 46 => null, - 47 => null, - 48 => null, - 49 => null, - 50 => null, - 51 => null, - 52 => null, - 53 => null, - 54 => null, - 55 => null, - 56 => null, - 57 => null, - 58 => null, - 59 => null, - 60 => null, - 61 => null, - 62 => null, - 63 => null, - 64 => null, - 65 => null, - 66 => null, - 67 => null, - 68 => null, - 69 => null, - 70 => null, - 71 => null, - 72 => null, - 73 => null, - 74 => null, - 75 => null, - 76 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 77 => null, - 78 => null, - 79 => null, - 80 => null, - 81 => null, - 82 => null, - 83 => null, - 84 => null, - 85 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 86 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 87 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 88 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 89 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 90 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 91 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 92 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 93 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 94 => null, - 95 => static function ($self, $stackPos) { - $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 96 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 97 => static function ($self, $stackPos) { - /* nothing */ - }, - 98 => static function ($self, $stackPos) { - /* nothing */ - }, - 99 => static function ($self, $stackPos) { - /* nothing */ - }, - 100 => static function ($self, $stackPos) { - $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); - }, - 101 => null, - 102 => null, - 103 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 104 => static function ($self, $stackPos) { - $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 105 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 106 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 107 => static function ($self, $stackPos) { - $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 108 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 109 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 110 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 111 => null, - 112 => null, - 113 => null, - 114 => null, - 115 => static function ($self, $stackPos) { - $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 116 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $self->checkNamespace($self->semValue); - }, - 117 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 118 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $self->checkNamespace($self->semValue); - }, - 119 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 120 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 121 => null, - 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); - }, - 123 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); - $self->checkConstantAttributes($self->semValue); - }, - 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 125 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 127 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 128 => null, - 129 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 130 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 131 => null, - 132 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 133 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 134 => null, - 135 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 136 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 137 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 138 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 139 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); - }, - 140 => static function ($self, $stackPos) { - $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); - }, - 141 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 142 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; - }, - 143 => null, - 144 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 145 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 146 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 147 => null, - 148 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 149 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 150 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 151 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 152 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; - }, - 153 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 154 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 155 => null, - 156 => null, - 157 => null, - 158 => static function ($self, $stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 159 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 160 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 161 => static function ($self, $stackPos) { - $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 162 => static function ($self, $stackPos) { - $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 163 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 164 => static function ($self, $stackPos) { - $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 165 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 166 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 167 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 168 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 169 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 170 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 171 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 172 => static function ($self, $stackPos) { - - $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); - - }, - 173 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 174 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 175 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 176 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 177 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 178 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 179 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); - }, - 180 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 181 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 182 => static function ($self, $stackPos) { - $self->semValue = null; /* means: no statement */ - }, - 183 => null, - 184 => static function ($self, $stackPos) { - $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); - }, - 185 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 186 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 187 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 188 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 189 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 190 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 191 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 192 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 193 => null, - 194 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 195 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 196 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 197 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 198 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 199 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 200 => static function ($self, $stackPos) { - $self->semValue = false; - }, - 201 => static function ($self, $stackPos) { - $self->semValue = true; - }, - 202 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 203 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 204 => null, - 205 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 206 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 207 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 209 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 210 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(7-2)); - }, - 211 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkClass($self->semValue, $stackPos-(8-3)); - }, - 212 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - $self->checkInterface($self->semValue, $stackPos-(7-3)); - }, - 213 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 214 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkEnum($self->semValue, $stackPos-(8-3)); - }, - 215 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 216 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 217 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 218 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 219 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 220 => null, - 221 => null, - 222 => static function ($self, $stackPos) { - $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 223 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 224 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 225 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 226 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 227 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 228 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 229 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 230 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 231 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 232 => null, - 233 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 234 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 235 => null, - 236 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 237 => null, - 238 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 239 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; - }, - 240 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 241 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 242 => null, - 243 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 244 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 245 => static function ($self, $stackPos) { - $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 246 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 247 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 248 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 249 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(5-3)]; - }, - 250 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 251 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 252 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 253 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 254 => null, - 255 => null, - 256 => static function ($self, $stackPos) { - $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); - }, - 257 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 258 => null, - 259 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 260 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 261 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 262 => static function ($self, $stackPos) { - $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 263 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 264 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 265 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 266 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 267 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 268 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 269 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 270 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 271 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 272 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 273 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 274 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); - }, - 275 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 276 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-2)], true); - }, - 277 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)], false); - }, - 278 => static function ($self, $stackPos) { - $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); - }, - 279 => null, - 280 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 281 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 282 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 283 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 284 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 286 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 287 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 288 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 289 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 290 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 291 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 292 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 293 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 294 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); - $self->checkParam($self->semValue); - $self->addPropertyNameToHooks($self->semValue); - }, - 295 => static function ($self, $stackPos) { - $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); - }, - 296 => null, - 297 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 298 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 299 => null, - 300 => null, - 301 => static function ($self, $stackPos) { - $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 302 => static function ($self, $stackPos) { - $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); - }, - 303 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 304 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 305 => null, - 306 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 307 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 308 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 309 => null, - 310 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 311 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 312 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 313 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 314 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 315 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 316 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 317 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 318 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 319 => null, - 320 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 321 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 322 => null, - 323 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 324 => null, - 325 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 326 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(2-2)]; - }, - 327 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 328 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 329 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 330 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 331 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 332 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-2)]; - }, - 333 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - }, - 334 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-2)]); - }, - 335 => static function ($self, $stackPos) { - $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); - }, - 336 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 337 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 338 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 340 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 341 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 342 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 343 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); - }, - 344 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 345 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 346 => null, - 347 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 348 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 349 => null, - 350 => null, - 351 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 352 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 353 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 354 => static function ($self, $stackPos) { - $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 355 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } - }, - 356 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 357 => static function ($self, $stackPos) { - $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; - if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - }, - 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); - $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); - $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); - $self->addPropertyNameToHooks($self->semValue); - }, - 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); - $self->checkClassConst($self->semValue, $stackPos-(5-2)); - }, - 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); - $self->checkClassConst($self->semValue, $stackPos-(6-2)); - }, - 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - $self->checkClassMethod($self->semValue, $stackPos-(10-2)); - }, - 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 364 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 365 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ - }, - 366 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 367 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 368 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 369 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 372 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 373 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 374 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 375 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 376 => null, - 377 => static function ($self, $stackPos) { - $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); - }, - 378 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 379 => null, - 380 => null, - 381 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 382 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 383 => null, - 384 => null, - 385 => static function ($self, $stackPos) { - $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 386 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC; - }, - 387 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED; - }, - 388 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE; - }, - 389 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PUBLIC_SET; - }, - 390 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PROTECTED_SET; - }, - 391 => static function ($self, $stackPos) { - $self->semValue = Modifiers::PRIVATE_SET; - }, - 392 => static function ($self, $stackPos) { - $self->semValue = Modifiers::STATIC; - }, - 393 => static function ($self, $stackPos) { - $self->semValue = Modifiers::ABSTRACT; - }, - 394 => static function ($self, $stackPos) { - $self->semValue = Modifiers::FINAL; - }, - 395 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; - }, - 396 => null, - 397 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 398 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 399 => static function ($self, $stackPos) { - $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 400 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 401 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 402 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 403 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 404 => static function ($self, $stackPos) { - $self->semValue = []; - }, - 405 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); - }, - 406 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, null); - }, - 407 => static function ($self, $stackPos) { - $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); - }, - 408 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 409 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 410 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 411 => static function ($self, $stackPos) { - $self->semValue = 0; - }, - 412 => static function ($self, $stackPos) { - $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; - }, - 413 => null, - 414 => null, - 415 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 416 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 417 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 418 => null, - 419 => null, - 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - if (!$self->phpVersion->allowsAssignNewByReference()) { - $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); - } - - }, - 425 => null, - 426 => null, - 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 479 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 488 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 489 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 490 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 491 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); - }, - 492 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 493 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 494 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 495 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); - }, - 496 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 497 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 498 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 499 => static function ($self, $stackPos) { - $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 500 => null, - 501 => static function ($self, $stackPos) { - $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 502 => static function ($self, $stackPos) { - $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 503 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 504 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 505 => static function ($self, $stackPos) { - $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 506 => static function ($self, $stackPos) { - $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 507 => static function ($self, $stackPos) { - $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 508 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 509 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 510 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); - }, - 511 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 512 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 513 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); - }, - 515 => static function ($self, $stackPos) { - $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); - }, - 516 => static function ($self, $stackPos) { - $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); - $self->checkClass($self->semValue[0], -1); - }, - 517 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 518 => static function ($self, $stackPos) { - list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 519 => static function ($self, $stackPos) { - $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 520 => null, - 521 => null, - 522 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 523 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(4-3)]; - }, - 524 => null, - 525 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 526 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 527 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 528 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 530 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 531 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 532 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 533 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 534 => null, - 535 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 536 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 537 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 538 => static function ($self, $stackPos) { - $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 539 => null, - 540 => null, - 541 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 542 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 543 => null, - 544 => null, - 545 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 546 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; - }, - 547 => static function ($self, $stackPos) { - foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; - }, - 548 => static function ($self, $stackPos) { - $self->semValue = array(); - }, - 549 => null, - 550 => static function ($self, $stackPos) { - $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 551 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 552 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 553 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 554 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 555 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 556 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 557 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 558 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 559 => static function ($self, $stackPos) { - $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 560 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 561 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); - }, - 562 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 563 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); - }, - 564 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->offsetSet($self->semValue); - }, - 565 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); - }, - 566 => static function ($self, $stackPos) { - $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); - }, - 567 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); - }, - 568 => static function ($self, $stackPos) { - $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); - }, - 569 => static function ($self, $stackPos) { - $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 570 => null, - 571 => null, - 572 => null, - 573 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 574 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); - }, - 575 => static function ($self, $stackPos) { - $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); - }, - 576 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 577 => null, - 578 => null, - 579 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 580 => null, - 581 => null, - 582 => null, - 583 => null, - 584 => null, - 585 => null, - 586 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 587 => null, - 588 => null, - 589 => null, - 590 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 591 => null, - 592 => static function ($self, $stackPos) { - $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 593 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 594 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 595 => null, - 596 => null, - 597 => null, - 598 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 599 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 600 => null, - 601 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 602 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 603 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 604 => static function ($self, $stackPos) { - $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; - }, - 605 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 606 => null, - 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 609 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 611 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 612 => null, - 613 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 614 => null, - 615 => null, - 616 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 617 => null, - 618 => static function ($self, $stackPos) { - $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; - }, - 619 => static function ($self, $stackPos) { - $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $self->postprocessList($self->semValue); - }, - 620 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); - }, - 621 => null, - 622 => static function ($self, $stackPos) { - /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ - }, - 623 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 624 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 625 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 626 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 627 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 628 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 629 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 630 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 631 => static function ($self, $stackPos) { - $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); - }, - 632 => static function ($self, $stackPos) { - /* Create an Error node now to remember the position. We'll later either report an error, - or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $self->createEmptyElemAttributes($self->tokenPos); - $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); - }, - 633 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 634 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, - 635 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, - 636 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); - }, - 637 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); - }, - 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 639 => null, - 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 644 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 645 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); - }, - 646 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 647 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 648 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, - 649 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, - 650 => null, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php deleted file mode 100644 index c10a0c97..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ /dev/null @@ -1,1321 +0,0 @@ - Map of PHP token IDs to drop */ - protected array $dropTokens; - /** @var int[] Map of external symbols (static::T_*) to internal symbols */ - protected array $tokenToSymbol; - /** @var string[] Map of symbols to their names */ - protected array $symbolToName; - /** @var array Names of the production rules (only necessary for debugging) */ - protected array $productions; - - /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this - * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the - * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionBase; - /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected array $action; - /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol - * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected array $actionCheck; - /** @var int[] Map of states to their default action */ - protected array $actionDefault; - /** @var callable[] Semantic action callbacks */ - protected array $reduceCallbacks; - - /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this - * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ - protected array $gotoBase; - /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected array $goto; - /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal - * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ - protected array $gotoCheck; - /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected array $gotoDefault; - - /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for - * determining the state to goto after reduction. */ - protected array $ruleToNonTerminal; - /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to - * be popped from the stack(s) on reduction. */ - protected array $ruleToLength; - - /* - * The following members are part of the parser state: - */ - - /** @var mixed Temporary value containing the result of last semantic action (reduction) */ - protected $semValue; - /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ - protected array $semStack; - /** @var int[] Token start position stack */ - protected array $tokenStartStack; - /** @var int[] Token end position stack */ - protected array $tokenEndStack; - - /** @var ErrorHandler Error handler */ - protected ErrorHandler $errorHandler; - /** @var int Error state, used to avoid error floods */ - protected int $errorState; - - /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ - protected ?\SplObjectStorage $createdArrays; - - /** @var Token[] Tokens for the current parse */ - protected array $tokens; - /** @var int Current position in token array */ - protected int $tokenPos; - - /** - * Initialize $reduceCallbacks map. - */ - abstract protected function initReduceCallbacks(): void; - - /** - * Creates a parser instance. - * - * Options: - * * phpVersion: ?PhpVersion, - * - * @param Lexer $lexer A lexer - * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This - * option is best-effort: Even if specified, parsing will generally assume the latest - * supported version and only adjust behavior in minor ways, for example by omitting - * errors in older versions and interpreting type hints as a name or identifier depending - * on version. - */ - public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { - $this->lexer = $lexer; - $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); - - $this->initReduceCallbacks(); - $this->phpTokenToSymbol = $this->createTokenMap(); - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true - ); - } - - /** - * Parses PHP code into a node tree. - * - * If a non-throwing error handler is used, the parser will continue parsing after an error - * occurred and attempt to build a partial AST. - * - * @param string $code The source code to parse - * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults - * to ErrorHandler\Throwing. - * - * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and - * the parser was unable to recover from an error). - */ - public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); - $this->createdArrays = new \SplObjectStorage(); - - $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); - $result = $this->doParse(); - - // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, - // because we don't know a priori whether a given array expression will be used in a destructuring context - // or not. - foreach ($this->createdArrays as $node) { - foreach ($node->items as $item) { - if ($item->value instanceof Expr\Error) { - $this->errorHandler->handleError( - new Error('Cannot use empty array elements in arrays', $item->getAttributes())); - } - } - } - - // Clear out some of the interior state, so we don't hold onto unnecessary - // memory between uses of the parser - $this->tokenStartStack = []; - $this->tokenEndStack = []; - $this->semStack = []; - $this->semValue = null; - $this->createdArrays = null; - - if ($result !== null) { - $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); - $traverser->traverse($result); - } - - return $result; - } - - public function getTokens(): array { - return $this->tokens; - } - - /** @return Stmt[]|null */ - protected function doParse(): ?array { - // We start off with no lookahead-token - $symbol = self::SYMBOL_NONE; - $tokenValue = null; - $this->tokenPos = -1; - - // Keep stack of start and end attributes - $this->tokenStartStack = []; - $this->tokenEndStack = [0]; - - // Start off in the initial state and keep a stack of previous states - $state = 0; - $stateStack = [$state]; - - // Semantic value stack (contains values of tokens and semantic action results) - $this->semStack = []; - - // Current position in the stack(s) - $stackPos = 0; - - $this->errorState = 0; - - for (;;) { - //$this->traceNewState($state, $symbol); - - if ($this->actionBase[$state] === 0) { - $rule = $this->actionDefault[$state]; - } else { - if ($symbol === self::SYMBOL_NONE) { - do { - $token = $this->tokens[++$this->tokenPos]; - $tokenId = $token->id; - } while (isset($this->dropTokens[$tokenId])); - - // Map the lexer token id to the internally used symbols. - $tokenValue = $token->text; - if (!isset($this->phpTokenToSymbol[$tokenId])) { - throw new \RangeException(sprintf( - 'The lexer returned an invalid token (id=%d, value=%s)', - $tokenId, $tokenValue - )); - } - $symbol = $this->phpTokenToSymbol[$tokenId]; - - //$this->traceRead($symbol); - } - - $idx = $this->actionBase[$state] + $symbol; - if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) - && ($action = $this->action[$idx]) !== $this->defaultAction) { - /* - * >= numNonLeafStates: shift and reduce - * > 0: shift - * = 0: accept - * < 0: reduce - * = -YYUNEXPECTED: error - */ - if ($action > 0) { - /* shift */ - //$this->traceShift($symbol); - - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - $this->semStack[$stackPos] = $tokenValue; - $this->tokenStartStack[$stackPos] = $this->tokenPos; - $this->tokenEndStack[$stackPos] = $this->tokenPos; - $symbol = self::SYMBOL_NONE; - - if ($this->errorState) { - --$this->errorState; - } - - if ($action < $this->numNonLeafStates) { - continue; - } - - /* $yyn >= numNonLeafStates means shift-and-reduce */ - $rule = $action - $this->numNonLeafStates; - } else { - $rule = -$action; - } - } else { - $rule = $this->actionDefault[$state]; - } - } - - for (;;) { - if ($rule === 0) { - /* accept */ - //$this->traceAccept(); - return $this->semValue; - } - if ($rule !== $this->unexpectedTokenRule) { - /* reduce */ - //$this->traceReduce($rule); - - $ruleLength = $this->ruleToLength[$rule]; - try { - $callback = $this->reduceCallbacks[$rule]; - if ($callback !== null) { - $callback($this, $stackPos); - } elseif ($ruleLength > 0) { - $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; - } - } catch (Error $e) { - if (-1 === $e->getStartLine()) { - $e->setStartLine($this->tokens[$this->tokenPos]->line); - } - - $this->emitError($e); - // Can't recover from this type of error - return null; - } - - /* Goto - shift nonterminal */ - $lastTokenEnd = $this->tokenEndStack[$stackPos]; - $stackPos -= $ruleLength; - $nonTerminal = $this->ruleToNonTerminal[$rule]; - $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; - if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { - $state = $this->goto[$idx]; - } else { - $state = $this->gotoDefault[$nonTerminal]; - } - - ++$stackPos; - $stateStack[$stackPos] = $state; - $this->semStack[$stackPos] = $this->semValue; - $this->tokenEndStack[$stackPos] = $lastTokenEnd; - if ($ruleLength === 0) { - // Empty productions use the start attributes of the lookahead token. - $this->tokenStartStack[$stackPos] = $this->tokenPos; - } - } else { - /* error */ - switch ($this->errorState) { - case 0: - $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); - // Break missing intentionally - // no break - case 1: - case 2: - $this->errorState = 3; - - // Pop until error-expecting state uncovered - while (!( - (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - || ($state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) - ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this - if ($stackPos <= 0) { - // Could not recover from error - return null; - } - $state = $stateStack[--$stackPos]; - //$this->tracePop($state); - } - - //$this->traceShift($this->errorSymbol); - ++$stackPos; - $stateStack[$stackPos] = $state = $action; - - // We treat the error symbol as being empty, so we reset the end attributes - // to the end attributes of the last non-error symbol - $this->tokenStartStack[$stackPos] = $this->tokenPos; - $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; - break; - - case 3: - if ($symbol === 0) { - // Reached EOF without recovering from error - return null; - } - - //$this->traceDiscard($symbol); - $symbol = self::SYMBOL_NONE; - break 2; - } - } - - if ($state < $this->numNonLeafStates) { - break; - } - - /* >= numNonLeafStates means shift-and-reduce */ - $rule = $state - $this->numNonLeafStates; - } - } - } - - protected function emitError(Error $error): void { - $this->errorHandler->handleError($error); - } - - /** - * Format error message including expected tokens. - * - * @param int $symbol Unexpected symbol - * @param int $state State at time of error - * - * @return string Formatted error message - */ - protected function getErrorMessage(int $symbol, int $state): string { - $expectedString = ''; - if ($expected = $this->getExpectedTokens($state)) { - $expectedString = ', expecting ' . implode(' or ', $expected); - } - - return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; - } - - /** - * Get limited number of expected tokens in given state. - * - * @param int $state State - * - * @return string[] Expected tokens. If too many, an empty array is returned. - */ - protected function getExpectedTokens(int $state): array { - $expected = []; - - $base = $this->actionBase[$state]; - foreach ($this->symbolToName as $symbol => $name) { - $idx = $base + $symbol; - if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - || $state < $this->YY2TBLSTATE - && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 - && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol - ) { - if ($this->action[$idx] !== $this->unexpectedTokenRule - && $this->action[$idx] !== $this->defaultAction - && $symbol !== $this->errorSymbol - ) { - if (count($expected) === 4) { - /* Too many expected tokens */ - return []; - } - - $expected[] = $name; - } - } - } - - return $expected; - } - - /** - * Get attributes for a node with the given start and end token positions. - * - * @param int $tokenStartPos Token position the node starts at - * @param int $tokenEndPos Token position the node ends at - * @return array Attributes - */ - protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { - $startToken = $this->tokens[$tokenStartPos]; - $afterEndToken = $this->tokens[$tokenEndPos + 1]; - return [ - 'startLine' => $startToken->line, - 'startTokenPos' => $tokenStartPos, - 'startFilePos' => $startToken->pos, - 'endLine' => $afterEndToken->line, - 'endTokenPos' => $tokenEndPos, - 'endFilePos' => $afterEndToken->pos - 1, - ]; - } - - /** - * Get attributes for a single token at the given token position. - * - * @return array Attributes - */ - protected function getAttributesForToken(int $tokenPos): array { - if ($tokenPos < \count($this->tokens) - 1) { - return $this->getAttributes($tokenPos, $tokenPos); - } - - // Get attributes for the sentinel token. - $token = $this->tokens[$tokenPos]; - return [ - 'startLine' => $token->line, - 'startTokenPos' => $tokenPos, - 'startFilePos' => $token->pos, - 'endLine' => $token->line, - 'endTokenPos' => $tokenPos, - 'endFilePos' => $token->pos, - ]; - } - - /* - * Tracing functions used for debugging the parser. - */ - - /* - protected function traceNewState($state, $symbol): void { - echo '% State ' . $state - . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; - } - - protected function traceRead($symbol): void { - echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceShift($symbol): void { - echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; - } - - protected function traceAccept(): void { - echo "% Accepted.\n"; - } - - protected function traceReduce($n): void { - echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; - } - - protected function tracePop($state): void { - echo '% Recovering, uncovered state ' . $state . "\n"; - } - - protected function traceDiscard($symbol): void { - echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; - } - */ - - /* - * Helper functions invoked by semantic actions - */ - - /** - * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. - * - * @param Node\Stmt[] $stmts - * @return Node\Stmt[] - */ - protected function handleNamespaces(array $stmts): array { - $hasErrored = false; - $style = $this->getNamespacingStyle($stmts); - if (null === $style) { - // not namespaced, nothing to do - return $stmts; - } - if ('brace' === $style) { - // For braced namespaces we only have to check that there are no invalid statements between the namespaces - $afterFirstNamespace = false; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $afterFirstNamespace = true; - } elseif (!$stmt instanceof Node\Stmt\HaltCompiler - && !$stmt instanceof Node\Stmt\Nop - && $afterFirstNamespace && !$hasErrored) { - $this->emitError(new Error( - 'No code may exist outside of namespace {}', $stmt->getAttributes())); - $hasErrored = true; // Avoid one error for every statement - } - } - return $stmts; - } else { - // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts - $resultStmts = []; - $targetStmts = &$resultStmts; - $lastNs = null; - foreach ($stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - if ($stmt->stmts === null) { - $stmt->stmts = []; - $targetStmts = &$stmt->stmts; - $resultStmts[] = $stmt; - } else { - // This handles the invalid case of mixed style namespaces - $resultStmts[] = $stmt; - $targetStmts = &$resultStmts; - } - $lastNs = $stmt; - } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { - // __halt_compiler() is not moved into the namespace - $resultStmts[] = $stmt; - } else { - $targetStmts[] = $stmt; - } - } - if ($lastNs !== null) { - $this->fixupNamespaceAttributes($lastNs); - } - return $resultStmts; - } - } - - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { - // We moved the statements into the namespace node, as such the end of the namespace node - // needs to be extended to the end of the statements. - if (empty($stmt->stmts)) { - return; - } - - // We only move the builtin end attributes here. This is the best we can do with the - // knowledge we have. - $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; - $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; - foreach ($endAttributes as $endAttribute) { - if ($lastStmt->hasAttribute($endAttribute)) { - $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); - } - } - } - - /** @return array */ - private function getNamespaceErrorAttributes(Namespace_ $node): array { - $attrs = $node->getAttributes(); - // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. - if (isset($attrs['startLine'])) { - $attrs['endLine'] = $attrs['startLine']; - } - if (isset($attrs['startTokenPos'])) { - $attrs['endTokenPos'] = $attrs['startTokenPos']; - } - if (isset($attrs['startFilePos'])) { - $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; - } - return $attrs; - } - - /** - * Determine namespacing style (semicolon or brace) - * - * @param Node[] $stmts Top-level statements. - * - * @return null|string One of "semicolon", "brace" or null (no namespaces) - */ - private function getNamespacingStyle(array $stmts): ?string { - $style = null; - $hasNotAllowedStmts = false; - foreach ($stmts as $i => $stmt) { - if ($stmt instanceof Node\Stmt\Namespace_) { - $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; - if (null === $style) { - $style = $currentStyle; - if ($hasNotAllowedStmts) { - $this->emitError(new Error( - 'Namespace declaration statement has to be the very first statement in the script', - $this->getNamespaceErrorAttributes($stmt) - )); - } - } elseif ($style !== $currentStyle) { - $this->emitError(new Error( - 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $this->getNamespaceErrorAttributes($stmt) - )); - // Treat like semicolon style for namespace normalization - return 'semicolon'; - } - continue; - } - - /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ - if ($stmt instanceof Node\Stmt\Declare_ - || $stmt instanceof Node\Stmt\HaltCompiler - || $stmt instanceof Node\Stmt\Nop) { - continue; - } - - /* There may be a hashbang line at the very start of the file */ - if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { - continue; - } - - /* Everything else if forbidden before namespace declarations */ - $hasNotAllowedStmts = true; - } - return $style; - } - - /** @return Name|Identifier */ - protected function handleBuiltinTypes(Name $name) { - if (!$name->isUnqualified()) { - return $name; - } - - $lowerName = $name->toLowerString(); - if (!$this->phpVersion->supportsBuiltinType($lowerName)) { - return $name; - } - - return new Node\Identifier($lowerName, $name->getAttributes()); - } - - /** - * Get combined start and end attributes at a stack location - * - * @param int $stackPos Stack location - * - * @return array Combined start and end attributes - */ - protected function getAttributesAt(int $stackPos): array { - return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); - } - - protected function getFloatCastKind(string $cast): int { - $cast = strtolower($cast); - if (strpos($cast, 'float') !== false) { - return Double::KIND_FLOAT; - } - - if (strpos($cast, 'real') !== false) { - return Double::KIND_REAL; - } - - return Double::KIND_DOUBLE; - } - - protected function getIntCastKind(string $cast): int { - $cast = strtolower($cast); - if (strpos($cast, 'integer') !== false) { - return Expr\Cast\Int_::KIND_INTEGER; - } - - return Expr\Cast\Int_::KIND_INT; - } - - protected function getBoolCastKind(string $cast): int { - $cast = strtolower($cast); - if (strpos($cast, 'boolean') !== false) { - return Expr\Cast\Bool_::KIND_BOOLEAN; - } - - return Expr\Cast\Bool_::KIND_BOOL; - } - - protected function getStringCastKind(string $cast): int { - $cast = strtolower($cast); - if (strpos($cast, 'binary') !== false) { - return Expr\Cast\String_::KIND_BINARY; - } - - return Expr\Cast\String_::KIND_STRING; - } - - /** @param array $attributes */ - protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { - try { - return Int_::fromString($str, $attributes, $allowInvalidOctal); - } catch (Error $error) { - $this->emitError($error); - // Use dummy value - return new Int_(0, $attributes); - } - } - - /** - * Parse a T_NUM_STRING token into either an integer or string node. - * - * @param string $str Number string - * @param array $attributes Attributes - * - * @return Int_|String_ Integer or string node. - */ - protected function parseNumString(string $str, array $attributes) { - if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { - return new String_($str, $attributes); - } - - $num = +$str; - if (!is_int($num)) { - return new String_($str, $attributes); - } - - return new Int_($num, $attributes); - } - - /** @param array $attributes */ - protected function stripIndentation( - string $string, int $indentLen, string $indentChar, - bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ): string { - if ($indentLen === 0) { - return $string; - } - - $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; - $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; - $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; - return preg_replace_callback( - $regex, - function ($matches) use ($indentLen, $indentChar, $attributes) { - $prefix = substr($matches[1], 0, $indentLen); - if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', $attributes - )); - } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { - $this->emitError(new Error( - 'Invalid body indentation level ' . - '(expecting an indentation level of at least ' . $indentLen . ')', - $attributes - )); - } - return substr($matches[0], strlen($prefix)); - }, - $string - ); - } - - /** - * @param string|(Expr|InterpolatedStringPart)[] $contents - * @param array $attributes - * @param array $endTokenAttributes - */ - protected function parseDocString( - string $startToken, $contents, string $endToken, - array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ): Expr { - $kind = strpos($startToken, "'") === false - ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; - - $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; - $result = preg_match($regex, $startToken, $matches); - assert($result === 1); - $label = $matches[1]; - - $result = preg_match('/\A[ \t]*/', $endToken, $matches); - assert($result === 1); - $indentation = $matches[0]; - - $attributes['kind'] = $kind; - $attributes['docLabel'] = $label; - $attributes['docIndentation'] = $indentation; - - $indentHasSpaces = false !== strpos($indentation, " "); - $indentHasTabs = false !== strpos($indentation, "\t"); - if ($indentHasSpaces && $indentHasTabs) { - $this->emitError(new Error( - 'Invalid indentation - tabs and spaces cannot be mixed', - $endTokenAttributes - )); - - // Proceed processing as if this doc string is not indented - $indentation = ''; - } - - $indentLen = \strlen($indentation); - $indentChar = $indentHasSpaces ? " " : "\t"; - - if (\is_string($contents)) { - if ($contents === '') { - $attributes['rawValue'] = $contents; - return new String_('', $attributes); - } - - $contents = $this->stripIndentation( - $contents, $indentLen, $indentChar, true, true, $attributes - ); - $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); - $attributes['rawValue'] = $contents; - - if ($kind === String_::KIND_HEREDOC) { - $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); - } - - return new String_($contents, $attributes); - } else { - assert(count($contents) > 0); - if (!$contents[0] instanceof Node\InterpolatedStringPart) { - // If there is no leading encapsed string part, pretend there is an empty one - $this->stripIndentation( - '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() - ); - } - - $newContents = []; - foreach ($contents as $i => $part) { - if ($part instanceof Node\InterpolatedStringPart) { - $isLast = $i === \count($contents) - 1; - $part->value = $this->stripIndentation( - $part->value, $indentLen, $indentChar, - $i === 0, $isLast, $part->getAttributes() - ); - if ($isLast) { - $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); - } - $part->setAttribute('rawValue', $part->value); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); - if ('' === $part->value) { - continue; - } - } - $newContents[] = $part; - } - return new InterpolatedString($newContents, $attributes); - } - } - - protected function createCommentFromToken(Token $token, int $tokenPos): Comment { - assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); - return \T_DOC_COMMENT === $token->id - ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) - : new Comment($token->text, $token->line, $token->pos, $tokenPos, - $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); - } - - /** - * Get last comment before the given token position, if any - */ - protected function getCommentBeforeToken(int $tokenPos): ?Comment { - while (--$tokenPos >= 0) { - $token = $this->tokens[$tokenPos]; - if (!isset($this->dropTokens[$token->id])) { - break; - } - - if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { - return $this->createCommentFromToken($token, $tokenPos); - } - } - return null; - } - - /** - * Create a zero-length nop to capture preceding comments, if any. - */ - protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { - $comment = $this->getCommentBeforeToken($tokenPos); - if ($comment === null) { - return null; - } - - $commentEndLine = $comment->getEndLine(); - $commentEndFilePos = $comment->getEndFilePos(); - $commentEndTokenPos = $comment->getEndTokenPos(); - $attributes = [ - 'startLine' => $commentEndLine, - 'endLine' => $commentEndLine, - 'startFilePos' => $commentEndFilePos + 1, - 'endFilePos' => $commentEndFilePos, - 'startTokenPos' => $commentEndTokenPos + 1, - 'endTokenPos' => $commentEndTokenPos, - ]; - return new Nop($attributes); - } - - protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { - if ($this->getCommentBeforeToken($tokenStartPos) === null) { - return null; - } - return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); - } - - protected function handleHaltCompiler(): string { - // Prevent the lexer from returning any further tokens. - $nextToken = $this->tokens[$this->tokenPos + 1]; - $this->tokenPos = \count($this->tokens) - 2; - - // Return text after __halt_compiler. - return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; - } - - protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { - $tokenPos = $this->tokenStartStack[$stackPos]; - $token = $this->tokens[$tokenPos]; - assert($token->id == \T_INLINE_HTML); - if ($tokenPos > 0) { - $prevToken = $this->tokens[$tokenPos - 1]; - assert($prevToken->id == \T_CLOSE_TAG); - return false !== strpos($prevToken->text, "\n") - || false !== strpos($prevToken->text, "\r"); - } - return true; - } - - /** - * @return array - */ - protected function createEmptyElemAttributes(int $tokenPos): array { - return $this->getAttributesForToken($tokenPos); - } - - protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { - $this->createdArrays->offsetUnset($node); - return new Expr\List_(array_map(function (Node\ArrayItem $item) { - if ($item->value instanceof Expr\Error) { - // We used Error as a placeholder for empty elements, which are legal for destructuring. - return null; - } - if ($item->value instanceof Array_) { - return new Node\ArrayItem( - $this->fixupArrayDestructuring($item->value), - $item->key, $item->byRef, $item->getAttributes()); - } - return $item; - }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); - } - - protected function postprocessList(Expr\List_ $node): void { - foreach ($node->items as $i => $item) { - if ($item->value instanceof Expr\Error) { - // We used Error as a placeholder for empty elements, which are legal for destructuring. - $node->items[$i] = null; - } - } - } - - /** @param ElseIf_|Else_ $node */ - protected function fixupAlternativeElse($node): void { - // Make sure a trailing nop statement carrying comments is part of the node. - $numStmts = \count($node->stmts); - if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { - $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); - if (isset($nopAttrs['endLine'])) { - $node->setAttribute('endLine', $nopAttrs['endLine']); - } - if (isset($nopAttrs['endFilePos'])) { - $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); - } - if (isset($nopAttrs['endTokenPos'])) { - $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); - } - } - } - - protected function checkClassModifier(int $a, int $b, int $modifierPos): void { - try { - Modifiers::verifyClassModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkModifier(int $a, int $b, int $modifierPos): void { - // Jumping through some hoops here because verifyModifier() is also used elsewhere - try { - Modifiers::verifyModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - } - - protected function checkParam(Param $node): void { - if ($node->variadic && null !== $node->default) { - $this->emitError(new Error( - 'Variadic parameter cannot have a default value', - $node->default->getAttributes() - )); - } - } - - protected function checkTryCatch(TryCatch $node): void { - if (empty($node->catches) && null === $node->finally) { - $this->emitError(new Error( - 'Cannot use try without catch or finally', $node->getAttributes() - )); - } - } - - protected function checkNamespace(Namespace_ $node): void { - if (null !== $node->stmts) { - foreach ($node->stmts as $stmt) { - if ($stmt instanceof Namespace_) { - $this->emitError(new Error( - 'Namespace declarations cannot be nested', $stmt->getAttributes() - )); - } - } - } - } - - private function checkClassName(?Identifier $name, int $namePos): void { - if (null !== $name && $name->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $name), - $this->getAttributesAt($namePos) - )); - } - } - - /** @param Name[] $interfaces */ - private function checkImplementedInterfaces(array $interfaces): void { - foreach ($interfaces as $interface) { - if ($interface->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), - $interface->getAttributes() - )); - } - } - } - - protected function checkClass(Class_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - - if ($node->extends && $node->extends->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), - $node->extends->getAttributes() - )); - } - - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkInterface(Interface_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->extends); - } - - protected function checkEnum(Enum_ $node, int $namePos): void { - $this->checkClassName($node->name, $namePos); - $this->checkImplementedInterfaces($node->implements); - } - - protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { - if ($node->flags & Modifiers::STATIC) { - switch ($node->name->toLowerString()) { - case '__construct': - $this->emitError(new Error( - sprintf('Constructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__destruct': - $this->emitError(new Error( - sprintf('Destructor %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - case '__clone': - $this->emitError(new Error( - sprintf('Clone method %s() cannot be static', $node->name), - $this->getAttributesAt($modifierPos))); - break; - } - } - - if ($node->flags & Modifiers::READONLY) { - $this->emitError(new Error( - sprintf('Method %s() cannot be readonly', $node->name), - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkClassConst(ClassConst $node, int $modifierPos): void { - foreach ([Modifiers::STATIC, Modifiers::ABSTRACT, Modifiers::READONLY] as $modifier) { - if ($node->flags & $modifier) { - $this->emitError(new Error( - "Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - } - } - - protected function checkUseUse(UseItem $node, int $namePos): void { - if ($node->alias && $node->alias->isSpecialClassName()) { - $this->emitError(new Error( - sprintf( - 'Cannot use %s as %s because \'%2$s\' is a special class name', - $node->name, $node->alias - ), - $this->getAttributesAt($namePos) - )); - } - } - - protected function checkPropertyHooksForMultiProperty(Property $property, int $hookPos): void { - if (count($property->props) > 1) { - $this->emitError(new Error( - 'Cannot use hooks when declaring multiple properties', $this->getAttributesAt($hookPos))); - } - } - - /** @param PropertyHook[] $hooks */ - protected function checkEmptyPropertyHookList(array $hooks, int $hookPos): void { - if (empty($hooks)) { - $this->emitError(new Error( - 'Property hook list cannot be empty', $this->getAttributesAt($hookPos))); - } - } - - protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos): void { - $name = $hook->name->toLowerString(); - if ($name !== 'get' && $name !== 'set') { - $this->emitError(new Error( - 'Unknown hook "' . $hook->name . '", expected "get" or "set"', - $hook->name->getAttributes())); - } - if ($name === 'get' && $paramListPos !== null) { - $this->emitError(new Error( - 'get hook must not have a parameter list', $this->getAttributesAt($paramListPos))); - } - } - - protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): void { - try { - Modifiers::verifyModifier($a, $b); - } catch (Error $error) { - $error->setAttributes($this->getAttributesAt($modifierPos)); - $this->emitError($error); - } - - if ($b != Modifiers::FINAL) { - $this->emitError(new Error( - 'Cannot use the ' . Modifiers::toString($b) . ' modifier on a property hook', - $this->getAttributesAt($modifierPos))); - } - } - - protected function checkConstantAttributes(Const_ $node): void { - if ($node->attrGroups !== [] && count($node->consts) > 1) { - $this->emitError(new Error( - 'Cannot use attributes on multiple constants at once', $node->getAttributes())); - } - } - - /** - * @param Property|Param $node - */ - protected function addPropertyNameToHooks(Node $node): void { - if ($node instanceof Property) { - $name = $node->props[0]->name->toString(); - } else { - $name = $node->var->name; - } - foreach ($node->hooks as $hook) { - $hook->setAttribute('propertyName', $name); - } - } - - /** @param array $args */ - private function isSimpleExit(array $args): bool { - if (\count($args) === 0) { - return true; - } - if (\count($args) === 1) { - $arg = $args[0]; - return $arg instanceof Arg && $arg->name === null && - $arg->byRef === false && $arg->unpack === false; - } - return false; - } - - /** - * @param array $args - * @param array $attrs - */ - protected function createExitExpr(string $name, int $namePos, array $args, array $attrs): Expr { - if ($this->isSimpleExit($args)) { - // Create Exit node for backwards compatibility. - $attrs['kind'] = strtolower($name) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - return new Expr\Exit_(\count($args) === 1 ? $args[0]->value : null, $attrs); - } - return new Expr\FuncCall(new Name($name, $this->getAttributesAt($namePos)), $args, $attrs); - } - - /** - * Creates the token map. - * - * The token map maps the PHP internal token identifiers - * to the identifiers used by the Parser. Additionally it - * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. - * - * @return array The token map - */ - protected function createTokenMap(): array { - $tokenMap = []; - - // Single-char tokens use an identity mapping. - for ($i = 0; $i < 256; ++$i) { - $tokenMap[$i] = $i; - } - - foreach ($this->symbolToName as $name) { - if ($name[0] === 'T') { - $tokenMap[\constant($name)] = constant(static::class . '::' . $name); - } - } - - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO - $tokenMap[\T_OPEN_TAG_WITH_ECHO] = static::T_ECHO; - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[\T_CLOSE_TAG] = ord(';'); - - // We have created a map from PHP token IDs to external symbol IDs. - // Now map them to the internal symbol ID. - $fullTokenMap = []; - foreach ($tokenMap as $phpToken => $extSymbol) { - $intSymbol = $this->tokenToSymbol[$extSymbol]; - if ($intSymbol === $this->invalidSymbol) { - continue; - } - $fullTokenMap[$phpToken] = $intSymbol; - } - - return $fullTokenMap; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php deleted file mode 100644 index 3a7586ea..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ /dev/null @@ -1,42 +0,0 @@ -isHostVersion()) { - $lexer = new Lexer(); - } else { - $lexer = new Lexer\Emulative($version); - } - if ($version->id >= 80000) { - return new Php8($lexer, $version); - } - return new Php7($lexer, $version); - } - - /** - * Create a parser targeting the newest version supported by this library. Code for older - * versions will be accepted if there have been no relevant backwards-compatibility breaks in - * PHP. - */ - public function createForNewestSupportedVersion(): Parser { - return $this->createForVersion(PhpVersion::getNewestSupported()); - } - - /** - * Create a parser targeting the host PHP version, that is the PHP version we're currently - * running on. This parser will not use any token emulation. - */ - public function createForHostVersion(): Parser { - return $this->createForVersion(PhpVersion::getHostVersion()); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php b/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php deleted file mode 100644 index 077d7cdc..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php +++ /dev/null @@ -1,171 +0,0 @@ - 50100, - 'callable' => 50400, - 'bool' => 70000, - 'int' => 70000, - 'float' => 70000, - 'string' => 70000, - 'iterable' => 70100, - 'void' => 70100, - 'object' => 70200, - 'null' => 80000, - 'false' => 80000, - 'mixed' => 80000, - 'never' => 80100, - 'true' => 80200, - ]; - - private function __construct(int $id) { - $this->id = $id; - } - - /** - * Create a PhpVersion object from major and minor version components. - */ - public static function fromComponents(int $major, int $minor): self { - return new self($major * 10000 + $minor * 100); - } - - /** - * Get the newest PHP version supported by this library. Support for this version may be partial, - * if it is still under development. - */ - public static function getNewestSupported(): self { - return self::fromComponents(8, 5); - } - - /** - * Get the host PHP version, that is the PHP version we're currently running on. - */ - public static function getHostVersion(): self { - return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION); - } - - /** - * Parse the version from a string like "8.1". - */ - public static function fromString(string $version): self { - if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { - throw new \LogicException("Invalid PHP version \"$version\""); - } - return self::fromComponents((int) $matches[1], (int) $matches[2]); - } - - /** - * Check whether two versions are the same. - */ - public function equals(PhpVersion $other): bool { - return $this->id === $other->id; - } - - /** - * Check whether this version is greater than or equal to the argument. - */ - public function newerOrEqual(PhpVersion $other): bool { - return $this->id >= $other->id; - } - - /** - * Check whether this version is older than the argument. - */ - public function older(PhpVersion $other): bool { - return $this->id < $other->id; - } - - /** - * Check whether this is the host PHP version. - */ - public function isHostVersion(): bool { - return $this->equals(self::getHostVersion()); - } - - /** - * Check whether this PHP version supports the given builtin type. Type name must be lowercase. - */ - public function supportsBuiltinType(string $type): bool { - $minVersion = self::BUILTIN_TYPE_VERSIONS[$type] ?? null; - return $minVersion !== null && $this->id >= $minVersion; - } - - /** - * Whether this version supports [] array literals. - */ - public function supportsShortArraySyntax(): bool { - return $this->id >= 50400; - } - - /** - * Whether this version supports [] for destructuring. - */ - public function supportsShortArrayDestructuring(): bool { - return $this->id >= 70100; - } - - /** - * Whether this version supports flexible heredoc/nowdoc. - */ - public function supportsFlexibleHeredoc(): bool { - return $this->id >= 70300; - } - - /** - * Whether this version supports trailing commas in parameter lists. - */ - public function supportsTrailingCommaInParamList(): bool { - return $this->id >= 80000; - } - - /** - * Whether this version allows "$var =& new Obj". - */ - public function allowsAssignNewByReference(): bool { - return $this->id < 70000; - } - - /** - * Whether this version allows invalid octals like "08". - */ - public function allowsInvalidOctals(): bool { - return $this->id < 70000; - } - - /** - * Whether this version allows DEL (\x7f) to occur in identifiers. - */ - public function allowsDelInIdentifiers(): bool { - return $this->id < 70100; - } - - /** - * Whether this version supports yield in expression context without parentheses. - */ - public function supportsYieldWithoutParentheses(): bool { - return $this->id >= 70000; - } - - /** - * Whether this version supports unicode escape sequences in strings. - */ - public function supportsUnicodeEscapes(): bool { - return $this->id >= 70000; - } - - /* - * Whether this version supports attributes. - */ - public function supportsAttributes(): bool { - return $this->id >= 80000; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php deleted file mode 100644 index 892c686e..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +++ /dev/null @@ -1,51 +0,0 @@ -pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes()) - . $this->pModifiers($node->flags) - . ($node->type ? $this->p($node->type) . ' ' : '') - . ($node->byRef ? '&' : '') - . ($node->variadic ? '...' : '') - . $this->p($node->var) - . ($node->default ? ' = ' . $this->p($node->default) : '') - . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ''); - } - - protected function pArg(Node\Arg $node): string { - return ($node->name ? $node->name->toString() . ': ' : '') - . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { - return '...'; - } - - protected function pConst(Node\Const_ $node): string { - return $node->name . ' = ' . $this->p($node->value); - } - - protected function pNullableType(Node\NullableType $node): string { - return '?' . $this->p($node->type); - } - - protected function pUnionType(Node\UnionType $node): string { - $types = []; - foreach ($node->types as $typeNode) { - if ($typeNode instanceof Node\IntersectionType) { - $types[] = '('. $this->p($typeNode) . ')'; - continue; - } - $types[] = $this->p($typeNode); - } - return implode('|', $types); - } - - protected function pIntersectionType(Node\IntersectionType $node): string { - return $this->pImplode($node->types, '&'); - } - - protected function pIdentifier(Node\Identifier $node): string { - return $node->name; - } - - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { - return '$' . $node->name; - } - - protected function pAttribute(Node\Attribute $node): string { - return $this->p($node->name) - . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); - } - - protected function pAttributeGroup(Node\AttributeGroup $node): string { - return '#[' . $this->pCommaSeparated($node->attrs) . ']'; - } - - // Names - - protected function pName(Name $node): string { - return $node->name; - } - - protected function pName_FullyQualified(Name\FullyQualified $node): string { - return '\\' . $node->name; - } - - protected function pName_Relative(Name\Relative $node): string { - return 'namespace\\' . $node->name; - } - - // Magic Constants - - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { - return '__CLASS__'; - } - - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { - return '__DIR__'; - } - - protected function pScalar_MagicConst_File(MagicConst\File $node): string { - return '__FILE__'; - } - - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { - return '__FUNCTION__'; - } - - protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { - return '__LINE__'; - } - - protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { - return '__METHOD__'; - } - - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { - return '__NAMESPACE__'; - } - - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { - return '__TRAIT__'; - } - - protected function pScalar_MagicConst_Property(MagicConst\Property $node): string { - return '__PROPERTY__'; - } - - // Scalars - - private function indentString(string $str): string { - return str_replace("\n", $this->nl, $str); - } - - protected function pScalar_String(Scalar\String_ $node): string { - $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); - switch ($kind) { - case Scalar\String_::KIND_NOWDOC: - $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); - $nl = $shouldIdent ? $this->nl : $this->newline; - if ($node->value === '') { - return "<<<'$label'$nl$label{$this->docStringEndToken}"; - } - - // Make sure trailing \r is not combined with following \n into CRLF. - if ($node->value[strlen($node->value) - 1] !== "\r") { - $value = $shouldIdent ? $this->indentString($node->value) : $node->value; - return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; - } - } - /* break missing intentionally */ - // no break - case Scalar\String_::KIND_SINGLE_QUOTED: - return $this->pSingleQuotedString($node->value); - case Scalar\String_::KIND_HEREDOC: - $label = $node->getAttribute('docLabel'); - $escaped = $this->escapeString($node->value, null); - if ($label && !$this->containsEndLabel($escaped, $label)) { - $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; - if ($escaped === '') { - return "<<<$label$nl$label{$this->docStringEndToken}"; - } - - return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; - } - /* break missing intentionally */ - // no break - case Scalar\String_::KIND_DOUBLE_QUOTED: - return '"' . $this->escapeString($node->value, '"') . '"'; - } - throw new \Exception('Invalid string kind'); - } - - protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { - if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { - $label = $node->getAttribute('docLabel'); - if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { - $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; - if (count($node->parts) === 1 - && $node->parts[0] instanceof Node\InterpolatedStringPart - && $node->parts[0]->value === '' - ) { - return "<<<$label$nl$label{$this->docStringEndToken}"; - } - - return "<<<$label$nl" . $this->pEncapsList($node->parts, null) - . "$nl$label{$this->docStringEndToken}"; - } - } - return '"' . $this->pEncapsList($node->parts, '"') . '"'; - } - - protected function pScalar_Int(Scalar\Int_ $node): string { - if ($node->value === -\PHP_INT_MAX - 1) { - // PHP_INT_MIN cannot be represented as a literal, - // because the sign is not part of the literal - return '(-' . \PHP_INT_MAX . '-1)'; - } - - $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); - if (Scalar\Int_::KIND_DEC === $kind) { - return (string) $node->value; - } - - if ($node->value < 0) { - $sign = '-'; - $str = (string) -$node->value; - } else { - $sign = ''; - $str = (string) $node->value; - } - switch ($kind) { - case Scalar\Int_::KIND_BIN: - return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\Int_::KIND_OCT: - return $sign . '0' . base_convert($str, 10, 8); - case Scalar\Int_::KIND_HEX: - return $sign . '0x' . base_convert($str, 10, 16); - } - throw new \Exception('Invalid number kind'); - } - - protected function pScalar_Float(Scalar\Float_ $node): string { - if (!is_finite($node->value)) { - if ($node->value === \INF) { - return '1.0E+1000'; - } - if ($node->value === -\INF) { - return '-1.0E+1000'; - } else { - return '\NAN'; - } - } - - // Try to find a short full-precision representation - $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (float) $stringValue) { - $stringValue = sprintf('%.17G', $node->value); - } - - // %G is locale dependent and there exists no locale-independent alternative. We don't want - // mess with switching locales here, so let's assume that a comma is the only non-standard - // decimal separator we may encounter... - $stringValue = str_replace(',', '.', $stringValue); - - // ensure that number is really printed as float - return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; - } - - // Assignments - - protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); - } - - // Binary expressions - - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $precedence, int $lhsPrecedence): string { - return $this->pInfixOp(BinaryOp\Pipe::class, $node->left, ' |> ', $node->right, $precedence, $lhsPrecedence); - } - - protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPostfixOp( - Expr\Instanceof_::class, $node->expr, - ' instanceof ' . $this->pNewOperand($node->class), - $precedence, $lhsPrecedence); - } - - // Unary expressions - - protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_PreInc(Expr\PreInc $node): string { - return '++' . $this->p($node->var); - } - - protected function pExpr_PreDec(Expr\PreDec $node): string { - return '--' . $this->p($node->var); - } - - protected function pExpr_PostInc(Expr\PostInc $node): string { - return $this->p($node->var) . '++'; - } - - protected function pExpr_PostDec(Expr\PostDec $node): string { - return $this->p($node->var) . '--'; - } - - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); - } - - // Casts - - protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { - $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); - if ($kind === Cast\Double::KIND_DOUBLE) { - $cast = '(double)'; - } elseif ($kind === Cast\Double::KIND_FLOAT) { - $cast = '(float)'; - } else { - assert($kind === Cast\Double::KIND_REAL); - $cast = '(real)'; - } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Cast\Void_::class, '(void) ', $node->expr, $precedence, $lhsPrecedence); - } - - // Function calls and similar constructs - - protected function pExpr_FuncCall(Expr\FuncCall $node): string { - return $this->pCallLhs($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_MethodCall(Expr\MethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_StaticCall(Expr\StaticCall $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::' - . ($node->name instanceof Expr - ? ($node->name instanceof Expr\Variable - ? $this->p($node->name) - : '{' . $this->p($node->name) . '}') - : $node->name) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Empty(Expr\Empty_ $node): string { - return 'empty(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Isset(Expr\Isset_ $node): string { - return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; - } - - protected function pExpr_Eval(Expr\Eval_ $node): string { - return 'eval(' . $this->p($node->expr) . ')'; - } - - protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { - static $map = [ - Expr\Include_::TYPE_INCLUDE => 'include', - Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', - Expr\Include_::TYPE_REQUIRE => 'require', - Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', - ]; - - return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_List(Expr\List_ $node): string { - $syntax = $node->getAttribute('kind', - $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); - if ($syntax === Expr\List_::KIND_ARRAY) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; - } else { - return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; - } - } - - // Other - - protected function pExpr_Error(Expr\Error $node): string { - throw new \LogicException('Cannot pretty-print AST with Error nodes'); - } - - protected function pExpr_Variable(Expr\Variable $node): string { - if ($node->name instanceof Expr) { - return '${' . $this->p($node->name) . '}'; - } else { - return '$' . $node->name; - } - } - - protected function pExpr_Array(Expr\Array_ $node): string { - $syntax = $node->getAttribute('kind', - $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); - if ($syntax === Expr\Array_::KIND_SHORT) { - return '[' . $this->pMaybeMultiline($node->items, true) . ']'; - } else { - return 'array(' . $this->pMaybeMultiline($node->items, true) . ')'; - } - } - - protected function pKey(?Node $node): string { - if ($node === null) { - return ''; - } - - // => is not really an operator and does not typically participate in precedence resolution. - // However, there is an exception if yield expressions with keys are involved: - // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that - // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS - // precedence to that of yield (which will also print unnecessary parentheses for rare low - // precedence unary operators like include). - $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; - return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; - } - - protected function pArrayItem(Node\ArrayItem $node): string { - return $this->pKey($node->key) - . ($node->byRef ? '&' : '') - . ($node->unpack ? '...' : '') - . $this->p($node->value); - } - - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { - return $this->pDereferenceLhs($node->var) - . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; - } - - protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { - return $this->p($node->name); - } - - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); - } - - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { - return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { - return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); - } - - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { - return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); - } - - protected function pExpr_ShellExec(Expr\ShellExec $node): string { - return '`' . $this->pEncapsList($node->parts, '`') . '`'; - } - - protected function pExpr_Closure(Expr\Closure $node): string { - return $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pParams($node->params) . ')' - . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pExpr_Match(Expr\Match_ $node): string { - return 'match (' . $this->p($node->cond) . ') {' - . $this->pCommaSeparatedMultiline($node->arms, true) - . $this->nl - . '}'; - } - - protected function pMatchArm(Node\MatchArm $node): string { - $result = ''; - if ($node->conds) { - for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { - $result .= $this->p($node->conds[$i]) . ', '; - } - $result .= $this->pKey($node->conds[$i]); - } else { - $result = 'default => '; - } - return $result . $this->p($node->body); - } - - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp( - Expr\ArrowFunction::class, - $this->pAttrGroups($node->attrGroups, true) - . $this->pStatic($node->static) - . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ', - $node->expr, $precedence, $lhsPrecedence); - } - - protected function pClosureUse(Node\ClosureUse $node): string { - return ($node->byRef ? '&' : '') . $this->p($node->var); - } - - protected function pExpr_New(Expr\New_ $node): string { - if ($node->class instanceof Stmt\Class_) { - $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; - return 'new ' . $this->pClassCommon($node->class, $args); - } - return 'new ' . $this->pNewOperand($node->class) - . '(' . $this->pMaybeMultiline($node->args) . ')'; - } - - protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { - // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. - // this is okay because the part between ? and : never needs parentheses. - return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, - $precedence, $lhsPrecedence - ); - } - - protected function pExpr_Exit(Expr\Exit_ $node): string { - $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); - return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') - . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); - } - - protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { - return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); - } - - protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { - if ($node->value === null) { - $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; - return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; - } else { - if (!$this->phpVersion->supportsYieldWithoutParentheses()) { - return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; - } - return $this->pPrefixOp( - Expr\Yield_::class, 'yield ' . $this->pKey($node->key), - $node->value, $precedence, $lhsPrecedence); - } - } - - // Declarations - - protected function pStmt_Namespace(Stmt\Namespace_ $node): string { - if ($this->canUseSemicolonNamespaces) { - return 'namespace ' . $this->p($node->name) . ';' - . $this->nl . $this->pStmts($node->stmts, false); - } else { - return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') - . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - } - - protected function pStmt_Use(Stmt\Use_ $node): string { - return 'use ' . $this->pUseType($node->type) - . $this->pCommaSeparated($node->uses) . ';'; - } - - protected function pStmt_GroupUse(Stmt\GroupUse $node): string { - return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) - . '\{' . $this->pCommaSeparated($node->uses) . '};'; - } - - protected function pUseItem(Node\UseItem $node): string { - return $this->pUseType($node->type) . $this->p($node->name) - . (null !== $node->alias ? ' as ' . $node->alias : ''); - } - - protected function pUseType(int $type): string { - return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' - : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); - } - - protected function pStmt_Interface(Stmt\Interface_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'interface ' . $node->name - . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Enum(Stmt\Enum_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'enum ' . $node->name - . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Class(Stmt\Class_ $node): string { - return $this->pClassCommon($node, ' ' . $node->name); - } - - protected function pStmt_Trait(Stmt\Trait_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'trait ' . $node->name - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_EnumCase(Stmt\EnumCase $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'case ' . $node->name - . ($node->expr ? ' = ' . $this->p($node->expr) : '') - . ';'; - } - - protected function pStmt_TraitUse(Stmt\TraitUse $node): string { - return 'use ' . $this->pCommaSeparated($node->traits) - . (empty($node->adaptations) - ? ';' - : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); - } - - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { - return $this->p($node->trait) . '::' . $node->method - . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; - } - - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { - return (null !== $node->trait ? $this->p($node->trait) . '::' : '') - . $node->method . ' as' - . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') - . ';'; - } - - protected function pStmt_Property(Stmt\Property $node): string { - return $this->pAttrGroups($node->attrGroups) - . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) - . ($node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->props) - . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';'); - } - - protected function pPropertyItem(Node\PropertyItem $node): string { - return '$' . $node->name - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pPropertyHook(Node\PropertyHook $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . ($node->byRef ? '&' : '') . $node->name - . ($node->params ? '(' . $this->pParams($node->params) . ')' : '') - . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' - : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); - } - - protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . (null !== $node->stmts - ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' - : ';'); - } - - protected function pStmt_ClassConst(Stmt\ClassConst $node): string { - return $this->pAttrGroups($node->attrGroups) - . $this->pModifiers($node->flags) - . 'const ' - . (null !== $node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Function(Stmt\Function_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pParams($node->params) . ')' - . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Const(Stmt\Const_ $node): string { - return $this->pAttrGroups($node->attrGroups) - . 'const ' - . $this->pCommaSeparated($node->consts) . ';'; - } - - protected function pStmt_Declare(Stmt\Declare_ $node): string { - return 'declare (' . $this->pCommaSeparated($node->declares) . ')' - . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); - } - - protected function pDeclareItem(Node\DeclareItem $node): string { - return $node->key . '=' . $this->p($node->value); - } - - // Control flow - - protected function pStmt_If(Stmt\If_ $node): string { - return 'if (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') - . (null !== $node->else ? ' ' . $this->p($node->else) : ''); - } - - protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { - return 'elseif (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Else(Stmt\Else_ $node): string { - if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { - // Print as "else if" rather than "else { if }" - return 'else ' . $this->p($node->stmts[0]); - } - return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_For(Stmt\For_ $node): string { - return 'for (' - . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') - . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') - . $this->pCommaSeparated($node->loop) - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Foreach(Stmt\Foreach_ $node): string { - return 'foreach (' . $this->p($node->expr) . ' as ' - . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') - . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_While(Stmt\While_ $node): string { - return 'while (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Do(Stmt\Do_ $node): string { - return 'do {' . $this->pStmts($node->stmts) . $this->nl - . '} while (' . $this->p($node->cond) . ');'; - } - - protected function pStmt_Switch(Stmt\Switch_ $node): string { - return 'switch (' . $this->p($node->cond) . ') {' - . $this->pStmts($node->cases) . $this->nl . '}'; - } - - protected function pStmt_Case(Stmt\Case_ $node): string { - return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' - . $this->pStmts($node->stmts); - } - - protected function pStmt_TryCatch(Stmt\TryCatch $node): string { - return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' - . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') - . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); - } - - protected function pStmt_Catch(Stmt\Catch_ $node): string { - return 'catch (' . $this->pImplode($node->types, '|') - . ($node->var !== null ? ' ' . $this->p($node->var) : '') - . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Finally(Stmt\Finally_ $node): string { - return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pStmt_Break(Stmt\Break_ $node): string { - return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Continue(Stmt\Continue_ $node): string { - return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; - } - - protected function pStmt_Return(Stmt\Return_ $node): string { - return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; - } - - protected function pStmt_Label(Stmt\Label $node): string { - return $node->name . ':'; - } - - protected function pStmt_Goto(Stmt\Goto_ $node): string { - return 'goto ' . $node->name . ';'; - } - - // Other - - protected function pStmt_Expression(Stmt\Expression $node): string { - return $this->p($node->expr) . ';'; - } - - protected function pStmt_Echo(Stmt\Echo_ $node): string { - return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; - } - - protected function pStmt_Static(Stmt\Static_ $node): string { - return 'static ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStmt_Global(Stmt\Global_ $node): string { - return 'global ' . $this->pCommaSeparated($node->vars) . ';'; - } - - protected function pStaticVar(Node\StaticVar $node): string { - return $this->p($node->var) - . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); - } - - protected function pStmt_Unset(Stmt\Unset_ $node): string { - return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; - } - - protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { - $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; - return '?>' . $newline . $node->value . 'remaining; - } - - protected function pStmt_Nop(Stmt\Nop $node): string { - return ''; - } - - protected function pStmt_Block(Stmt\Block $node): string { - return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - // Helpers - - protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { - return $this->pAttrGroups($node->attrGroups, $node->name === null) - . $this->pModifiers($node->flags) - . 'class' . $afterClassToken - . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') - . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') - . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; - } - - protected function pObjectProperty(Node $node): string { - if ($node instanceof Expr) { - return '{' . $this->p($node) . '}'; - } else { - assert($node instanceof Node\Identifier); - return $node->name; - } - } - - /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ - protected function pEncapsList(array $encapsList, ?string $quote): string { - $return = ''; - foreach ($encapsList as $element) { - if ($element instanceof Node\InterpolatedStringPart) { - $return .= $this->escapeString($element->value, $quote); - } else { - $return .= '{' . $this->p($element) . '}'; - } - } - - return $return; - } - - protected function pSingleQuotedString(string $string): string { - // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or - // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to - // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even - // though that would be legal. - $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; - return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; - } - - protected function escapeString(string $string, ?string $quote): string { - if (null === $quote) { - // For doc strings, don't escape newlines - $escaped = addcslashes($string, "\t\f\v$\\"); - // But do escape isolated \r. Combined with the terminating newline, it might get - // interpreted as \r\n and dropped from the string contents. - $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); - if ($this->phpVersion->supportsFlexibleHeredoc()) { - $escaped = $this->indentString($escaped); - } - } else { - $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); - } - - // Escape control characters and non-UTF-8 characters. - // Regex based on https://stackoverflow.com/a/11709412/385378. - $regex = '/( - [\x00-\x08\x0E-\x1F] # Control characters - | [\xC0-\xC1] # Invalid UTF-8 Bytes - | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point - | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point - | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start - | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start - | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start - | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle - | (? $part) { - if ($part instanceof Node\InterpolatedStringPart - && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) - ) { - return true; - } - } - return false; - } - - protected function pDereferenceLhs(Node $node): string { - if (!$this->dereferenceLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pStaticDereferenceLhs(Node $node): string { - if (!$this->staticDereferenceLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pCallLhs(Node $node): string { - if (!$this->callLhsRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - protected function pNewOperand(Node $node): string { - if (!$this->newOperandRequiresParens($node)) { - return $this->p($node); - } else { - return '(' . $this->p($node) . ')'; - } - } - - /** - * @param Node[] $nodes - */ - protected function hasNodeWithComments(array $nodes): bool { - foreach ($nodes as $node) { - if ($node && $node->getComments()) { - return true; - } - } - return false; - } - - /** @param Node[] $nodes */ - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { - if (!$this->hasNodeWithComments($nodes)) { - return $this->pCommaSeparated($nodes); - } else { - return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; - } - } - - /** @param Node\Param[] $params - */ - private function hasParamWithAttributes(array $params): bool { - foreach ($params as $param) { - if ($param->attrGroups) { - return true; - } - } - return false; - } - - /** @param Node\Param[] $params */ - protected function pParams(array $params): string { - if ($this->hasNodeWithComments($params) || - ($this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes()) - ) { - return $this->pCommaSeparatedMultiline($params, $this->phpVersion->supportsTrailingCommaInParamList()) . $this->nl; - } - return $this->pCommaSeparated($params); - } - - /** @param Node\AttributeGroup[] $nodes */ - protected function pAttrGroups(array $nodes, bool $inline = false): string { - $result = ''; - $sep = $inline ? ' ' : $this->nl; - foreach ($nodes as $node) { - $result .= $this->p($node) . $sep; - } - - return $result; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php deleted file mode 100644 index ac8bda29..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ /dev/null @@ -1,1697 +0,0 @@ - */ - protected array $precedenceMap = [ - // [precedence, precedenceLHS, precedenceRHS] - // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, - // where 1 is added to one of the sides depending on associativity. This information is not - // used for unary operators and set to -1. - Expr\Clone_::class => [-10, 0, 1], - BinaryOp\Pow::class => [ 0, 0, 1], - Expr\BitwiseNot::class => [ 10, -1, -1], - Expr\UnaryPlus::class => [ 10, -1, -1], - Expr\UnaryMinus::class => [ 10, -1, -1], - Cast\Int_::class => [ 10, -1, -1], - Cast\Double::class => [ 10, -1, -1], - Cast\String_::class => [ 10, -1, -1], - Cast\Array_::class => [ 10, -1, -1], - Cast\Object_::class => [ 10, -1, -1], - Cast\Bool_::class => [ 10, -1, -1], - Cast\Unset_::class => [ 10, -1, -1], - Expr\ErrorSuppress::class => [ 10, -1, -1], - Expr\Instanceof_::class => [ 20, -1, -1], - Expr\BooleanNot::class => [ 30, -1, -1], - BinaryOp\Mul::class => [ 40, 41, 40], - BinaryOp\Div::class => [ 40, 41, 40], - BinaryOp\Mod::class => [ 40, 41, 40], - BinaryOp\Plus::class => [ 50, 51, 50], - BinaryOp\Minus::class => [ 50, 51, 50], - // FIXME: This precedence is incorrect for PHP 8. - BinaryOp\Concat::class => [ 50, 51, 50], - BinaryOp\ShiftLeft::class => [ 60, 61, 60], - BinaryOp\ShiftRight::class => [ 60, 61, 60], - BinaryOp\Pipe::class => [ 65, 66, 65], - BinaryOp\Smaller::class => [ 70, 70, 70], - BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], - BinaryOp\Greater::class => [ 70, 70, 70], - BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], - BinaryOp\Equal::class => [ 80, 80, 80], - BinaryOp\NotEqual::class => [ 80, 80, 80], - BinaryOp\Identical::class => [ 80, 80, 80], - BinaryOp\NotIdentical::class => [ 80, 80, 80], - BinaryOp\Spaceship::class => [ 80, 80, 80], - BinaryOp\BitwiseAnd::class => [ 90, 91, 90], - BinaryOp\BitwiseXor::class => [100, 101, 100], - BinaryOp\BitwiseOr::class => [110, 111, 110], - BinaryOp\BooleanAnd::class => [120, 121, 120], - BinaryOp\BooleanOr::class => [130, 131, 130], - BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, 150, 150], - Expr\Assign::class => [160, -1, -1], - Expr\AssignRef::class => [160, -1, -1], - AssignOp\Plus::class => [160, -1, -1], - AssignOp\Minus::class => [160, -1, -1], - AssignOp\Mul::class => [160, -1, -1], - AssignOp\Div::class => [160, -1, -1], - AssignOp\Concat::class => [160, -1, -1], - AssignOp\Mod::class => [160, -1, -1], - AssignOp\BitwiseAnd::class => [160, -1, -1], - AssignOp\BitwiseOr::class => [160, -1, -1], - AssignOp\BitwiseXor::class => [160, -1, -1], - AssignOp\ShiftLeft::class => [160, -1, -1], - AssignOp\ShiftRight::class => [160, -1, -1], - AssignOp\Pow::class => [160, -1, -1], - AssignOp\Coalesce::class => [160, -1, -1], - Expr\YieldFrom::class => [170, -1, -1], - Expr\Yield_::class => [175, -1, -1], - Expr\Print_::class => [180, -1, -1], - BinaryOp\LogicalAnd::class => [190, 191, 190], - BinaryOp\LogicalXor::class => [200, 201, 200], - BinaryOp\LogicalOr::class => [210, 211, 210], - Expr\Include_::class => [220, -1, -1], - Expr\ArrowFunction::class => [230, -1, -1], - Expr\Throw_::class => [240, -1, -1], - Expr\Cast\Void_::class => [250, -1, -1], - ]; - - /** @var int Current indentation level. */ - protected int $indentLevel; - /** @var string String for single level of indentation */ - private string $indent; - /** @var int Width in spaces to indent by. */ - private int $indentWidth; - /** @var bool Whether to use tab indentation. */ - private bool $useTabs; - /** @var int Width in spaces of one tab. */ - private int $tabWidth = 4; - - /** @var string Newline style. Does not include current indentation. */ - protected string $newline; - /** @var string Newline including current indentation. */ - protected string $nl; - /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. - * Null if flexible doc strings are used. */ - protected ?string $docStringEndToken; - /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected bool $canUseSemicolonNamespaces; - /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected bool $shortArraySyntax; - /** @var PhpVersion PHP version to target */ - protected PhpVersion $phpVersion; - - /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected ?TokenStream $origTokens; - /** @var Internal\Differ Differ for node lists */ - protected Differ $nodeListDiffer; - /** @var array Map determining whether a certain character is a label character */ - protected array $labelCharMap; - /** - * @var array> Map from token classes and subnode names to FIXUP_* constants. - * This is used during format-preserving prints to place additional parens/braces if necessary. - */ - protected array $fixupMap; - /** - * @var array Map from "{$node->getType()}->{$subNode}" - * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped - * when removing this node. - */ - protected array $removalMap; - /** - * @var array Map from - * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. - */ - protected array $insertionMap; - /** - * @var array Map From "{$class}->{$subNode}" to string that should be inserted - * between elements of this list subnode. - */ - protected array $listInsertionMap; - - /** - * @var array - */ - protected array $emptyListInsertionMap; - /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] - * where $printFn is the function to print the modifiers and $token is the token before which - * the modifiers should be reprinted. */ - protected array $modifierChangeMap; - - /** - * Creates a pretty printer instance using the given options. - * - * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option - * controls compatibility of the generated code with older PHP - * versions in cases where a simple stylistic choice exists (e.g. - * array() vs []). It is safe to pretty-print an AST for a newer - * PHP version while specifying an older target (but the result will - * of course not be compatible with the older version in that case). - * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". - * * string $indent: The indentation to use. Should either be all spaces or a single - * tab. Defaults to four spaces (" "). - * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. Defaults to whether - * the phpVersion support short array syntax. - * - * @param array{ - * phpVersion?: PhpVersion, newline?: string, indent?: string, shortArraySyntax?: bool - * } $options Dictionary of formatting options - */ - public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); - - $this->newline = $options['newline'] ?? "\n"; - if ($this->newline !== "\n" && $this->newline != "\r\n") { - throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); - } - - $this->shortArraySyntax = - $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); - $this->docStringEndToken = - $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); - - $this->indent = $indent = $options['indent'] ?? ' '; - if ($indent === "\t") { - $this->useTabs = true; - $this->indentWidth = $this->tabWidth; - } elseif ($indent === \str_repeat(' ', \strlen($indent))) { - $this->useTabs = false; - $this->indentWidth = \strlen($indent); - } else { - throw new \LogicException('Option "indent" must either be all spaces or a single tab'); - } - } - - /** - * Reset pretty printing state. - */ - protected function resetState(): void { - $this->indentLevel = 0; - $this->nl = $this->newline; - $this->origTokens = null; - } - - /** - * Set indentation level - * - * @param int $level Level in number of spaces - */ - protected function setIndentLevel(int $level): void { - $this->indentLevel = $level; - if ($this->useTabs) { - $tabs = \intdiv($level, $this->tabWidth); - $spaces = $level % $this->tabWidth; - $this->nl = $this->newline . \str_repeat("\t", $tabs) . \str_repeat(' ', $spaces); - } else { - $this->nl = $this->newline . \str_repeat(' ', $level); - } - } - - /** - * Increase indentation level. - */ - protected function indent(): void { - $this->indentLevel += $this->indentWidth; - $this->nl .= $this->indent; - } - - /** - * Decrease indentation level. - */ - protected function outdent(): void { - assert($this->indentLevel >= $this->indentWidth); - $this->setIndentLevel($this->indentLevel - $this->indentWidth); - } - - /** - * Pretty prints an array of statements. - * - * @param Node[] $stmts Array of statements - * - * @return string Pretty printed statements - */ - public function prettyPrint(array $stmts): string { - $this->resetState(); - $this->preprocessNodes($stmts); - - return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); - } - - /** - * Pretty prints an expression. - * - * @param Expr $node Expression node - * - * @return string Pretty printed node - */ - public function prettyPrintExpr(Expr $node): string { - $this->resetState(); - return $this->handleMagicTokens($this->p($node)); - } - - /** - * Pretty prints a file of statements (includes the opening newline . $this->newline; - } - - $p = "newline . $this->newline . $this->prettyPrint($stmts); - - if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); - } - if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { - $p = preg_replace('/<\?php$/', '', rtrim($p)); - } - - return $p; - } - - /** - * Preprocesses the top-level nodes to initialize pretty printer state. - * - * @param Node[] $nodes Array of nodes - */ - protected function preprocessNodes(array $nodes): void { - /* We can use semicolon-namespaces unless there is a global namespace declaration */ - $this->canUseSemicolonNamespaces = true; - foreach ($nodes as $node) { - if ($node instanceof Stmt\Namespace_ && null === $node->name) { - $this->canUseSemicolonNamespaces = false; - break; - } - } - } - - /** - * Handles (and removes) doc-string-end tokens. - */ - protected function handleMagicTokens(string $str): string { - if ($this->docStringEndToken !== null) { - // Replace doc-string-end tokens with nothing or a newline - $str = str_replace( - $this->docStringEndToken . ';' . $this->newline, - ';' . $this->newline, - $str); - $str = str_replace($this->docStringEndToken, $this->newline, $str); - } - - return $str; - } - - /** - * Pretty prints an array of nodes (statements) and indents them optionally. - * - * @param Node[] $nodes Array of nodes - * @param bool $indent Whether to indent the printed nodes - * - * @return string Pretty printed statements - */ - protected function pStmts(array $nodes, bool $indent = true): string { - if ($indent) { - $this->indent(); - } - - $result = ''; - foreach ($nodes as $node) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - if ($node instanceof Stmt\Nop) { - continue; - } - } - - $result .= $this->nl . $this->p($node); - } - - if ($indent) { - $this->outdent(); - } - - return $result; - } - - /** - * Pretty-print an infix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node - * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed infix operation - */ - protected function pInfixOp( - string $class, Node $leftNode, string $operatorString, Node $rightNode, - int $precedence, int $lhsPrecedence - ): string { - list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) - . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; - } - - /** - * Pretty-print a prefix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed prefix operation - */ - protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $lhsPrecedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); - if (($operatorString === '+' && $printedArg[0] === '+') || - ($operatorString === '-' && $printedArg[0] === '-') - ) { - // Avoid printing +(+$a) as ++$a and similar. - $printedArg = '(' . $printedArg . ')'; - } - return $prefix . $operatorString . $printedArg . $suffix; - } - - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - if ($opPrecedence < $lhsPrecedence) { - $lhsPrecedence = $opPrecedence; - } - return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; - } - - /** - * Pretty prints an array of nodes and implodes the printed values. - * - * @param Node[] $nodes Array of Nodes to be printed - * @param string $glue Character to implode with - * - * @return string Imploded pretty printed nodes> $pre - */ - protected function pImplode(array $nodes, string $glue = ''): string { - $pNodes = []; - foreach ($nodes as $node) { - if (null === $node) { - $pNodes[] = ''; - } else { - $pNodes[] = $this->p($node); - } - } - - return implode($glue, $pNodes); - } - - /** - * Pretty prints an array of nodes and implodes the printed values with commas. - * - * @param Node[] $nodes Array of Nodes to be printed - * - * @return string Comma separated pretty printed nodes - */ - protected function pCommaSeparated(array $nodes): string { - return $this->pImplode($nodes, ', '); - } - - /** - * Pretty prints a comma-separated list of nodes in multiline style, including comments. - * - * The result includes a leading newline and one level of indentation (same as pStmts). - * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma - * - * @return string Comma separated pretty printed nodes in multiline style - */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { - $this->indent(); - - $result = ''; - $lastIdx = count($nodes) - 1; - foreach ($nodes as $idx => $node) { - if ($node !== null) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - } - - $result .= $this->nl . $this->p($node); - } else { - $result .= $this->nl; - } - if ($trailingComma || $idx !== $lastIdx) { - $result .= ','; - } - } - - $this->outdent(); - return $result; - } - - /** - * Prints reformatted text of the passed comments. - * - * @param Comment[] $comments List of comments - * - * @return string Reformatted text of comments - */ - protected function pComments(array $comments): string { - $formattedComments = []; - - foreach ($comments as $comment) { - $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); - } - - return implode($this->nl, $formattedComments); - } - - /** - * Perform a format-preserving pretty print of an AST. - * - * The format preservation is best effort. For some changes to the AST the formatting will not - * be preserved (at least not locally). - * - * In order to use this method a number of prerequisites must be satisfied: - * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. - * * The CloningVisitor must be run on the AST prior to modification. - * * The original tokens must be provided, using the getTokens() method on the lexer. - * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param Token[] $origTokens Tokens of the original code - */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { - $this->initializeNodeListDiffer(); - $this->initializeLabelCharMap(); - $this->initializeFixupMap(); - $this->initializeRemovalMap(); - $this->initializeInsertionMap(); - $this->initializeListInsertionMap(); - $this->initializeEmptyListInsertionMap(); - $this->initializeModifierChangeMap(); - - $this->resetState(); - $this->origTokens = new TokenStream($origTokens, $this->tabWidth); - - $this->preprocessNodes($stmts); - - $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); - if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); - } else { - // Fallback - // TODO Add newline . $this->pStmts($stmts, false); - } - - return $this->handleMagicTokens($result); - } - - protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** - * Pretty prints a node. - * - * This method also handles formatting preservation for nodes. - * - * @param Node $node Node to be pretty printed - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * @param bool $parentFormatPreserved Whether parent node has preserved formatting - * - * @return string Pretty printed node - */ - protected function p( - Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, - bool $parentFormatPreserved = false - ): string { - // No orig tokens means this is a normal pretty print without preservation of formatting - if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** @var Node|null $origNode */ - $origNode = $node->getAttribute('origNode'); - if (null === $origNode) { - return $this->pFallback($node, $precedence, $lhsPrecedence); - } - - $class = \get_class($node); - \assert($class === \get_class($origNode)); - - $startPos = $origNode->getStartTokenPos(); - $endPos = $origNode->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - - $fallbackNode = $node; - if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { - // Normalize node structure of anonymous classes - assert($origNode instanceof Expr\New_); - $node = PrintableNewAnonClassNode::fromNewNode($node); - $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); - $class = PrintableNewAnonClassNode::class; - } - - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting - // is not preserved, then we need to use the fallback code to make sure the tags are - // printed. - if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - - $type = $node->getType(); - $fixupInfo = $this->fixupMap[$class] ?? null; - - $result = ''; - $pos = $startPos; - foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { - if ($subNode === $origSubNode) { - // Unchanged, can reuse old code - continue; - } - - if (is_array($subNode) && is_array($origSubNode)) { - // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); - if (null === $listResult) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $result .= $listResult; - continue; - } - - // Check if this is a modifier change - $key = $class . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - [$printFn, $findToken] = $this->modifierChangeMap[$key]; - $result .= $this->$printFn($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; - } - - $extraLeft = ''; - $extraRight = ''; - if ($origSubNode !== null) { - $subStartPos = $origSubNode->getStartTokenPos(); - $subEndPos = $origSubNode->getEndTokenPos(); - \assert($subStartPos >= 0 && $subEndPos >= 0); - } else { - if ($subNode === null) { - // Both null, nothing to do - continue; - } - - // A node has been inserted, check if we have insertion information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; - if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; - } else { - $subStartPos = $pos; - } - - if (null === $extraLeft && null !== $extraRight) { - // If inserting on the right only, skipping whitespace looks better - $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); - } - $subEndPos = $subStartPos - 1; - } - - if (null === $subNode) { - // A node has been removed, check if we have removal information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - // Adjust positions to account for additional tokens that must be skipped - $removalInfo = $this->removalMap[$key]; - if (isset($removalInfo['left'])) { - $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; - } - if (isset($removalInfo['right'])) { - $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; - } - } - - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - - if (null !== $subNode) { - $result .= $extraLeft; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel(max($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment, 0)); - - // If it's the same node that was previously in this position, it certainly doesn't - // need fixup. It's important to check this here, because our fixup checks are more - // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { - $fixup = $fixupInfo[$subNodeName]; - $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); - } else { - $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - - $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); - - $result .= $extraRight; - } - - $pos = $subEndPos + 1; - } - - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); - return $result; - } - - /** - * Perform a format-preserving pretty print of an array. - * - * @param Node[] $nodes New nodes - * @param Node[] $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeClass Class of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes - * - * @return null|string Result of pretty print or null if cannot preserve formatting - */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeClass, string $subNodeName, ?int $fixup - ): ?string { - $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - - $mapKey = $parentNodeClass . '->' . $subNodeName; - $insertStr = $this->listInsertionMap[$mapKey] ?? null; - $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; - $delayedAdd = []; - $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; - if ($insertStr === "\n") { - $insertStr = ''; - $insertNewline = true; - } - - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { - $startPos = $origNodes[0]->getStartTokenPos(); - $endPos = $origNodes[0]->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - if (!$this->origTokens->haveBraces($startPos, $endPos)) { - // This was a single statement without braces, but either additional statements - // have been added, or the single statement has been removed. This requires the - // addition of braces. For now fall back. - // TODO: Try to preserve formatting - return null; - } - } - - $result = ''; - foreach ($diff as $i => $diffElem) { - $diffType = $diffElem->type; - /** @var Node|string|null $arrItem */ - $arrItem = $diffElem->new; - /** @var Node|string|null $origArrItem */ - $origArrItem = $diffElem->old; - - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - - if ($origArrItem === null || $arrItem === null) { - // We can only handle the case where both are null - if ($origArrItem === $arrItem) { - continue; - } - return null; - } - - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { - // We can only deal with nodes. This can occur for Names, which use string arrays. - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - - $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = max($this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment, 0); - $this->setIndentLevel($lastElemIndentLevel); - - $comments = $arrItem->getComments(); - $origComments = $origArrItem->getComments(); - $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; - \assert($commentStartPos >= 0); - - if ($commentStartPos < $pos) { - // Comments may be assigned to multiple nodes if they start at the same position. - // Make sure we don't try to print them multiple times. - $commentStartPos = $itemStartPos; - } - - if ($skipRemovedNode) { - if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { - // We'd remove an opening/closing PHP tag. - // TODO: Preserve formatting. - $this->setIndentLevel($origIndentLevel); - return null; - } - } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); - } - - if (!empty($delayedAdd)) { - /** @var Node $delayedAddNode */ - foreach ($delayedAdd as $delayedAddNode) { - if ($insertNewline) { - $delayedAddComments = $delayedAddNode->getComments(); - if ($delayedAddComments) { - $result .= $this->pComments($delayedAddComments) . $this->nl; - } - } - - $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - } else { - $result .= $insertStr; - } - } - - $delayedAdd = []; - } - - if ($comments !== $origComments) { - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); - } - - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; - } elseif ($diffType === DiffElem::TYPE_ADD) { - if (null === $insertStr) { - // We don't have insertion information for this list type - return null; - } - - if (!$arrItem instanceof Node) { - // We only support list insertion of nodes. - return null; - } - - // We go multiline if the original code was multiline, - // or if it's an array item with a comment above it. - // Match always uses multiline formatting. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments() || - $parentNodeClass === Expr\Match_::class) - ) { - $insertStr = ','; - $insertNewline = true; - } - - if ($beforeFirstKeepOrReplace) { - // Will be inserted at the next "replace" or "keep" element - $delayedAdd[] = $arrItem; - continue; - } - - $itemStartPos = $pos; - $itemEndPos = $pos - 1; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($lastElemIndentLevel); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - $comments = $arrItem->getComments(); - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $insertStr; - } - } elseif ($diffType === DiffElem::TYPE_REMOVE) { - if (!$origArrItem instanceof Node) { - // We only support removal for nodes - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0); - - // Consider comments part of the node. - $origComments = $origArrItem->getComments(); - if ($origComments) { - $itemStartPos = $origComments[0]->getStartTokenPos(); - } - - if ($i === 0) { - // If we're removing from the start, keep the tokens before the node and drop those after it, - // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; - } else { - if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { - // We'd remove an opening/closing PHP tag. - // TODO: Preserve formatting. - return null; - } - } - - $pos = $itemEndPos + 1; - continue; - } else { - throw new \Exception("Shouldn't happen"); - } - - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { - $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); - } else { - $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - $this->safeAppend($result, $res); - - $this->setIndentLevel($origIndentLevel); - $pos = $itemEndPos + 1; - } - - if ($skipRemovedNode) { - // TODO: Support removing single node. - return null; - } - - if (!empty($delayedAdd)) { - if (!isset($this->emptyListInsertionMap[$mapKey])) { - return null; - } - - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; - if (null !== $findToken) { - $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; - $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); - $pos = $insertPos; - } - - $first = true; - $result .= $extraLeft; - foreach ($delayedAdd as $delayedAddNode) { - if (!$first) { - $result .= $insertStr; - if ($insertNewline) { - $result .= $this->nl; - } - } - $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - $first = false; - } - $result .= $extraRight === "\n" ? $this->nl : $extraRight; - } - - return $result; - } - - /** - * Print node with fixups. - * - * Fixups here refer to the addition of extra parentheses, braces or other characters, that - * are required to preserve program semantics in a certain context (e.g. to maintain precedence - * or because only certain expressions are allowed in certain places). - * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print - * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode - * - * @return string Result of fixed-up print of subnode - */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { - switch ($fixup) { - case self::FIXUP_PREC_LEFT: - // We use a conservative approximation where lhsPrecedence == precedence. - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][1]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_RIGHT: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][2]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_UNARY: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][0]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_STATIC_DEREF_LHS: - if ($this->staticDereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_NEW: - if ($this->newOperandRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_BRACED_NAME: - case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; - } - break; - case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Node\InterpolatedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return '{' . $this->p($subNode) . '}'; - } - break; - default: - throw new \Exception('Cannot happen'); - } - - // Nothing special to do - return $this->p($subNode); - } - - /** - * Appends to a string, ensuring whitespace between label characters. - * - * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". - * Without safeAppend the result would be "echox", which does not preserve semantics. - */ - protected function safeAppend(string &$str, string $append): void { - if ($str === "") { - $str = $append; - return; - } - - if ($append === "") { - return; - } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { - $str .= $append; - } else { - $str .= " " . $append; - } - } - - /** - * Determines whether the LHS of a call must be wrapped in parenthesis. - * - * @param Node $node LHS of a call - * - * @return bool Whether parentheses are required - */ - protected function callLhsRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); - } - - /** - * Determines whether the LHS of an array/object operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function dereferenceLhsRequiresParens(Node $node): bool { - // A constant can occur on the LHS of an array/object deref, but not a static deref. - return $this->staticDereferenceLhsRequiresParens($node) - && !$node instanceof Expr\ConstFetch; - } - - /** - * Determines whether the LHS of a static operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function staticDereferenceLhsRequiresParens(Node $node): bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ClassConstFetch); - } - - /** - * Determines whether an expression used in "new" or "instanceof" requires parentheses. - * - * @param Node $node New or instanceof operand - * - * @return bool Whether parentheses are required - */ - protected function newOperandRequiresParens(Node $node): bool { - if ($node instanceof Node\Name || $node instanceof Expr\Variable) { - return false; - } - if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || - $node instanceof Expr\NullsafePropertyFetch - ) { - return $this->newOperandRequiresParens($node->var); - } - if ($node instanceof Expr\StaticPropertyFetch) { - return $this->newOperandRequiresParens($node->class); - } - return true; - } - - /** - * Print modifiers, including trailing whitespace. - * - * @param int $modifiers Modifier mask to print - * - * @return string Printed modifiers - */ - protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') - . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '') - . ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '') - . ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); - } - - protected function pStatic(bool $static): string { - return $static ? 'static ' : ''; - } - - /** - * Determine whether a list of nodes uses multiline formatting. - * - * @param (Node|null)[] $nodes Node list - * - * @return bool Whether multiline formatting is used - */ - protected function isMultiline(array $nodes): bool { - if (\count($nodes) < 2) { - return false; - } - - $pos = -1; - foreach ($nodes as $node) { - if (null === $node) { - continue; - } - - $endPos = $node->getEndTokenPos() + 1; - if ($pos >= 0) { - $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { - // We require that a newline is present between *every* item. If the formatting - // is inconsistent, with only some items having newlines, we don't consider it - // as multiline - return false; - } - } - $pos = $endPos; - } - - return true; - } - - /** - * Lazily initializes label char map. - * - * The label char map determines whether a certain character may occur in a label. - */ - protected function initializeLabelCharMap(): void { - if (isset($this->labelCharMap)) { - return; - } - - $this->labelCharMap = []; - for ($i = 0; $i < 256; $i++) { - $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); - } - - if ($this->phpVersion->allowsDelInIdentifiers()) { - $this->labelCharMap["\x7f"] = true; - } - } - - /** - * Lazily initializes node list differ. - * - * The node list differ is used to determine differences between two array subnodes. - */ - protected function initializeNodeListDiffer(): void { - if (isset($this->nodeListDiffer)) { - return; - } - - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { - if ($a instanceof Node && $b instanceof Node) { - return $a === $b->getAttribute('origNode'); - } - // Can happen for array destructuring - return $a === null && $b === null; - }); - } - - /** - * Lazily initializes fixup map. - * - * The fixup map is used to determine whether a certain subnode of a certain node may require - * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. - */ - protected function initializeFixupMap(): void { - if (isset($this->fixupMap)) { - return; - } - - $this->fixupMap = [ - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_UNARY, - 'class' => self::FIXUP_NEW, - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\New_::class => ['class' => self::FIXUP_NEW], - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\InterpolatedString::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, BinaryOp\Pipe::class, - ]; - foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; - } - - $prefixOps = [ - Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, Expr\Throw_::class, - ]; - foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; - } - } - - /** - * Lazily initializes the removal map. - * - * The removal map is used to determine which additional tokens should be removed when a - * certain node is replaced by null. - */ - protected function initializeRemovalMap(): void { - if (isset($this->removalMap)) { - return; - } - - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; - $stripLeft = ['left' => \T_WHITESPACE]; - $stripRight = ['right' => \T_WHITESPACE]; - $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; - $stripColon = ['left' => ':']; - $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassConst->type' => $stripRight, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'PropertyItem->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; - } - - protected function initializeInsertionMap(): void { - if (isset($this->insertionMap)) { - return; - } - - // TODO: "yield" where both key and value are inserted doesn't work - // [$find, $beforeToken, $extraLeft, $extraRight] - $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], - 'Expr_Closure->returnType' => [')', false, ': ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], - 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ': ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'PropertyItem->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node - ]; - } - - protected function initializeListInsertionMap(): void { - if (isset($this->listInsertionMap)) { - return; - } - - $this->listInsertionMap = [ - // special - //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_InterpolatedString->parts' => '', - Stmt\Catch_::class . '->types' => '|', - UnionType::class . '->types' => '|', - IntersectionType::class . '->types' => '&', - Stmt\If_::class . '->elseifs' => ' ', - Stmt\TryCatch::class . '->catches' => ' ', - - // comma-separated lists - Expr\Array_::class . '->items' => ', ', - Expr\ArrowFunction::class . '->params' => ', ', - Expr\Closure::class . '->params' => ', ', - Expr\Closure::class . '->uses' => ', ', - Expr\FuncCall::class . '->args' => ', ', - Expr\Isset_::class . '->vars' => ', ', - Expr\List_::class . '->items' => ', ', - Expr\MethodCall::class . '->args' => ', ', - Expr\NullsafeMethodCall::class . '->args' => ', ', - Expr\New_::class . '->args' => ', ', - PrintableNewAnonClassNode::class . '->args' => ', ', - Expr\StaticCall::class . '->args' => ', ', - Stmt\ClassConst::class . '->consts' => ', ', - Stmt\ClassMethod::class . '->params' => ', ', - Stmt\Class_::class . '->implements' => ', ', - Stmt\Enum_::class . '->implements' => ', ', - PrintableNewAnonClassNode::class . '->implements' => ', ', - Stmt\Const_::class . '->consts' => ', ', - Stmt\Declare_::class . '->declares' => ', ', - Stmt\Echo_::class . '->exprs' => ', ', - Stmt\For_::class . '->init' => ', ', - Stmt\For_::class . '->cond' => ', ', - Stmt\For_::class . '->loop' => ', ', - Stmt\Function_::class . '->params' => ', ', - Stmt\Global_::class . '->vars' => ', ', - Stmt\GroupUse::class . '->uses' => ', ', - Stmt\Interface_::class . '->extends' => ', ', - Expr\Match_::class . '->arms' => ', ', - Stmt\Property::class . '->props' => ', ', - Stmt\StaticVar::class . '->vars' => ', ', - Stmt\TraitUse::class . '->traits' => ', ', - Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', - Stmt\Unset_::class . '->vars' => ', ', - Stmt\UseUse::class . '->uses' => ', ', - MatchArm::class . '->conds' => ', ', - AttributeGroup::class . '->attrs' => ', ', - PropertyHook::class . '->params' => ', ', - - // statement lists - Expr\Closure::class . '->stmts' => "\n", - Stmt\Case_::class . '->stmts' => "\n", - Stmt\Catch_::class . '->stmts' => "\n", - Stmt\Class_::class . '->stmts' => "\n", - Stmt\Enum_::class . '->stmts' => "\n", - PrintableNewAnonClassNode::class . '->stmts' => "\n", - Stmt\Interface_::class . '->stmts' => "\n", - Stmt\Trait_::class . '->stmts' => "\n", - Stmt\ClassMethod::class . '->stmts' => "\n", - Stmt\Declare_::class . '->stmts' => "\n", - Stmt\Do_::class . '->stmts' => "\n", - Stmt\ElseIf_::class . '->stmts' => "\n", - Stmt\Else_::class . '->stmts' => "\n", - Stmt\Finally_::class . '->stmts' => "\n", - Stmt\Foreach_::class . '->stmts' => "\n", - Stmt\For_::class . '->stmts' => "\n", - Stmt\Function_::class . '->stmts' => "\n", - Stmt\If_::class . '->stmts' => "\n", - Stmt\Namespace_::class . '->stmts' => "\n", - Stmt\Block::class . '->stmts' => "\n", - - // Attribute groups - Stmt\Class_::class . '->attrGroups' => "\n", - Stmt\Enum_::class . '->attrGroups' => "\n", - Stmt\EnumCase::class . '->attrGroups' => "\n", - Stmt\Interface_::class . '->attrGroups' => "\n", - Stmt\Trait_::class . '->attrGroups' => "\n", - Stmt\Function_::class . '->attrGroups' => "\n", - Stmt\ClassMethod::class . '->attrGroups' => "\n", - Stmt\ClassConst::class . '->attrGroups' => "\n", - Stmt\Property::class . '->attrGroups' => "\n", - PrintableNewAnonClassNode::class . '->attrGroups' => ' ', - Expr\Closure::class . '->attrGroups' => ' ', - Expr\ArrowFunction::class . '->attrGroups' => ' ', - Param::class . '->attrGroups' => ' ', - PropertyHook::class . '->attrGroups' => ' ', - - Stmt\Switch_::class . '->cases' => "\n", - Stmt\TraitUse::class . '->adaptations' => "\n", - Stmt\TryCatch::class . '->stmts' => "\n", - Stmt\While_::class . '->stmts' => "\n", - PropertyHook::class . '->body' => "\n", - Stmt\Property::class . '->hooks' => "\n", - Param::class . '->hooks' => "\n", - - // dummy for top-level context - 'File->stmts' => "\n", - ]; - } - - protected function initializeEmptyListInsertionMap(): void { - if (isset($this->emptyListInsertionMap)) { - return; - } - - // TODO Insertion into empty statement lists. - - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - Expr\ArrowFunction::class . '->params' => ['(', '', ''], - Expr\Closure::class . '->uses' => [')', ' use (', ')'], - Expr\Closure::class . '->params' => ['(', '', ''], - Expr\FuncCall::class . '->args' => ['(', '', ''], - Expr\MethodCall::class . '->args' => ['(', '', ''], - Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], - Expr\New_::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], - Expr\StaticCall::class . '->args' => ['(', '', ''], - Stmt\Class_::class . '->implements' => [null, ' implements ', ''], - Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], - Stmt\ClassMethod::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], - Stmt\Function_::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], - Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Property::class . '->attrGroups' => [null, '', "\n"], - Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], - Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], - Expr\Closure::class . '->attrGroups' => [null, '', ' '], - Stmt\Const_::class . '->attrGroups' => [null, '', "\n"], - PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; - } - - protected function initializeModifierChangeMap(): void { - if (isset($this->modifierChangeMap)) { - return; - } - - $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], - Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], - Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], - Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], - PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], - Param::class . '->flags' => ['pModifiers', \T_VARIABLE], - PropertyHook::class . '->flags' => ['pModifiers', \T_STRING], - Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], - Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], - //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO - ]; - - // List of integer subnodes that are not modifiers: - // Expr_Include->type - // Stmt_GroupUse->type - // Stmt_Use->type - // UseItem->type - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Token.php b/vendor/nikic/php-parser/lib/PhpParser/Token.php deleted file mode 100644 index 6683310f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Token.php +++ /dev/null @@ -1,18 +0,0 @@ -pos + \strlen($this->text); - } - - /** Get 1-based end line number of the token. */ - public function getEndLine(): int { - return $this->line + \substr_count($this->text, "\n"); - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php b/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php deleted file mode 100644 index ced038d4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +++ /dev/null @@ -1,71 +0,0 @@ -registerCustomFixers([ - new \PharIo\CSFixer\PhpdocSingleLineVarFixer() - ]) - ->setRiskyAllowed(true) - ->setRules( - [ - 'PharIo/phpdoc_single_line_var_fixer' => true, - - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'operators' => [ - '=' => 'align', - '=>' => 'align', - ], - ], - 'blank_line_after_namespace' => true, - 'blank_line_after_opening_tag' => false, - 'blank_line_before_statement' => [ - 'statements' => [ - 'break', - 'continue', - 'declare', - 'do', - 'for', - 'foreach', - 'if', - 'include', - 'include_once', - 'require', - 'require_once', - 'return', - 'switch', - 'throw', - 'try', - 'while', - 'yield', - ], - ], - 'braces' => [ - 'allow_single_line_closure' => false, - 'position_after_anonymous_constructs' => 'same', - 'position_after_control_structures' => 'same', - 'position_after_functions_and_oop_constructs' => 'same' - ], - 'cast_spaces' => ['space' => 'none'], - - // This fixer removes the blank line at class start, no way to disable that, so we disable the fixer :( - //'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], - - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'date_time_immutable' => true, - 'declare_equal_normalize' => ['space' => 'single'], - 'declare_strict_types' => true, - 'dir_constant' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'fully_qualified_strict_types' => true, - 'function_declaration' => [ - 'closure_function_spacing' => 'one' - ], - 'global_namespace_import' => [ - 'import_classes' => true, - 'import_constants' => true, - 'import_functions' => true, - ], - 'header_comment' => ['header' => $header, 'separate' => 'none'], - 'indentation_type' => true, - 'is_null' => true, - 'line_ending' => true, - 'list_syntax' => ['syntax' => 'short'], - 'logical_operators' => true, - 'lowercase_cast' => true, - 'constant_case' => ['case' => 'lower'], - 'lowercase_keywords' => true, - 'lowercase_static_reference' => true, - 'magic_constant_casing' => true, - 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - 'multiline_whitespace_before_semicolons' => true, - 'new_with_braces' => false, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_class_opening' => false, - 'no_blank_lines_after_phpdoc' => true, - 'no_blank_lines_before_namespace' => true, - 'no_closing_tag' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_homoglyph_names' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'print'], - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_null_property_initialization' => true, - 'no_php4_constructor' => true, - 'no_short_bool_cast' => true, - 'echo_tag_syntax' => ['format' => 'long'], - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'no_unneeded_control_parentheses' => false, - 'no_unneeded_curly_braces' => false, - 'no_unneeded_final_method' => true, - 'no_unreachable_default_argument_value' => true, - 'no_unset_on_property' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, - 'ordered_class_elements' => [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public_static', - 'property_protected_static', - 'property_private_static', - 'property_public', - 'property_protected', - 'property_private', - 'method_public_static', - 'construct', - 'destruct', - 'magic', - 'phpunit', - 'method_public', - 'method_protected', - 'method_private', - 'method_protected_static', - 'method_private_static', - ], - ], - 'ordered_imports' => [ - 'imports_order' => [ - PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CLASS, - PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CONST, - PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_FUNCTION, - ] - ], - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => ['groups' => ['simple', 'meta']], - 'phpdoc_types_order' => true, - 'phpdoc_to_return_type' => true, - 'phpdoc_var_without_name' => true, - 'pow_to_exponentiation' => true, - 'protected_to_private' => true, - 'return_assignment' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'self_accessor' => false, - 'semicolon_after_instruction' => true, - 'set_type_to_cast' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => true, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_to_null_coalescing' => true, - 'trailing_comma_in_multiline' => false, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'visibility_required' => [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - 'void_return' => true, - 'whitespace_after_comma_in_array' => true, - 'yoda_style' => false - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/build') - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') - ->notName('autoload.php') - ); diff --git a/vendor/phar-io/manifest/CHANGELOG.md b/vendor/phar-io/manifest/CHANGELOG.md deleted file mode 100644 index f363b169..00000000 --- a/vendor/phar-io/manifest/CHANGELOG.md +++ /dev/null @@ -1,45 +0,0 @@ -# Changelog - -All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [2.0.4] - 03-03-2024 - -### Changed - -- Make `EMail` an optional attribute for author -- Stick with PHP 7.2 compatibilty -- Do not use implict nullable type (thanks @sebastianbergmann), this should make things work on PHP 8.4 - -## [2.0.3] - 20.07.2021 - -- Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release - -## [2.0.2] - 20.07.2021 - -- Fixed PHP 8.1 deprecation notice - -## [2.0.1] - 27.06.2020 - -This release now supports the use of PHP 7.2+ and ^8.0 - -## [2.0.0] - 10.05.2020 - -This release now requires PHP 7.2+ - -### Changed - -- Upgraded to phar-io/version 3.0 - - Version strings `v1.2.3` will now be converted to valid semantic version strings `1.2.3` - - Abreviated strings like `1.0` will get expaneded to `1.0.0` - -### Unreleased - -[Unreleased]: https://github.com/phar-io/manifest/compare/2.1.0...HEAD -[2.1.0]: https://github.com/phar-io/manifest/compare/2.0.3...2.1.0 -[2.0.3]: https://github.com/phar-io/manifest/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/phar-io/manifest/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/phar-io/manifest/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/phar-io/manifest/compare/1.0.1...2.0.0 -[1.0.3]: https://github.com/phar-io/manifest/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/phar-io/manifest/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/phar-io/manifest/compare/1.0.0...1.0.1 diff --git a/vendor/phar-io/manifest/LICENSE b/vendor/phar-io/manifest/LICENSE deleted file mode 100644 index 64690cf2..00000000 --- a/vendor/phar-io/manifest/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Phar.io - Manifest - -Copyright (c) 2016-2019 Arne Blankerts , Sebastian Heuer , Sebastian Bergmann , and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of Arne Blankerts nor the names of contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/phar-io/manifest/README.md b/vendor/phar-io/manifest/README.md deleted file mode 100644 index fae2c9a7..00000000 --- a/vendor/phar-io/manifest/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# Manifest - -Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar). - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phar-io/manifest - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phar-io/manifest - -## Usage Examples - -### Read from `manifest.xml` -```php -use PharIo\Manifest\ManifestLoader; -use PharIo\Manifest\ManifestSerializer; - -$manifest = ManifestLoader::fromFile('manifest.xml'); - -var_dump($manifest); - -echo (new ManifestSerializer)->serializeToString($manifest); -``` - -
      - Output - -```shell -object(PharIo\Manifest\Manifest)#14 (6) { - ["name":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Manifest\ApplicationName)#10 (1) { - ["name":"PharIo\Manifest\ApplicationName":private]=> - string(12) "some/library" - } - ["version":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Version\Version)#12 (5) { - ["originalVersionString":"PharIo\Version\Version":private]=> - string(5) "1.0.0" - ["major":"PharIo\Version\Version":private]=> - object(PharIo\Version\VersionNumber)#13 (1) { - ["value":"PharIo\Version\VersionNumber":private]=> - int(1) - } - ["minor":"PharIo\Version\Version":private]=> - object(PharIo\Version\VersionNumber)#23 (1) { - ["value":"PharIo\Version\VersionNumber":private]=> - int(0) - } - ["patch":"PharIo\Version\Version":private]=> - object(PharIo\Version\VersionNumber)#22 (1) { - ["value":"PharIo\Version\VersionNumber":private]=> - int(0) - } - ["preReleaseSuffix":"PharIo\Version\Version":private]=> - NULL - } - ["type":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Manifest\Library)#6 (0) { - } - ["copyrightInformation":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Manifest\CopyrightInformation)#19 (2) { - ["authors":"PharIo\Manifest\CopyrightInformation":private]=> - object(PharIo\Manifest\AuthorCollection)#9 (1) { - ["authors":"PharIo\Manifest\AuthorCollection":private]=> - array(1) { - [0]=> - object(PharIo\Manifest\Author)#15 (2) { - ["name":"PharIo\Manifest\Author":private]=> - string(13) "Reiner Zufall" - ["email":"PharIo\Manifest\Author":private]=> - object(PharIo\Manifest\Email)#16 (1) { - ["email":"PharIo\Manifest\Email":private]=> - string(16) "reiner@zufall.de" - } - } - } - } - ["license":"PharIo\Manifest\CopyrightInformation":private]=> - object(PharIo\Manifest\License)#11 (2) { - ["name":"PharIo\Manifest\License":private]=> - string(12) "BSD-3-Clause" - ["url":"PharIo\Manifest\License":private]=> - object(PharIo\Manifest\Url)#18 (1) { - ["url":"PharIo\Manifest\Url":private]=> - string(26) "https://domain.tld/LICENSE" - } - } - } - ["requirements":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Manifest\RequirementCollection)#17 (1) { - ["requirements":"PharIo\Manifest\RequirementCollection":private]=> - array(1) { - [0]=> - object(PharIo\Manifest\PhpVersionRequirement)#20 (1) { - ["versionConstraint":"PharIo\Manifest\PhpVersionRequirement":private]=> - object(PharIo\Version\SpecificMajorAndMinorVersionConstraint)#24 (3) { - ["originalValue":"PharIo\Version\AbstractVersionConstraint":private]=> - string(3) "7.0" - ["major":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> - int(7) - ["minor":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> - int(0) - } - } - } - } - ["bundledComponents":"PharIo\Manifest\Manifest":private]=> - object(PharIo\Manifest\BundledComponentCollection)#8 (1) { - ["bundledComponents":"PharIo\Manifest\BundledComponentCollection":private]=> - array(0) { - } - } -} - - - - - - - - - - - -``` -
      - -### Create via API -```php -$bundled = new \PharIo\Manifest\BundledComponentCollection(); -$bundled->add( - new \PharIo\Manifest\BundledComponent('vendor/packageA', new \PharIo\Version\Version('1.2.3-dev') - ) -); - -$manifest = new PharIo\Manifest\Manifest( - new \PharIo\Manifest\ApplicationName('vendor/package'), - new \PharIo\Version\Version('1.0.0'), - new \PharIo\Manifest\Library(), - new \PharIo\Manifest\CopyrightInformation( - new \PharIo\Manifest\AuthorCollection(), - new \PharIo\Manifest\License( - 'BSD-3-Clause', - new \PharIo\Manifest\Url('https://spdx.org/licenses/BSD-3-Clause.html') - ) - ), - new \PharIo\Manifest\RequirementCollection(), - $bundled -); - -echo (new ManifestSerializer)->serializeToString($manifest); -``` - -
      - Output - -```xml - - - - - - - - - - - - - -``` - -
      - diff --git a/vendor/phar-io/manifest/composer.json b/vendor/phar-io/manifest/composer.json deleted file mode 100644 index dc5fa458..00000000 --- a/vendor/phar-io/manifest/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "phar-io/manifest", - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "support": { - "issues": "https://github.com/phar-io/manifest/issues" - }, - "require": { - "php": "^7.2 || ^8.0", - "ext-dom": "*", - "ext-phar": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/vendor/phar-io/manifest/composer.lock b/vendor/phar-io/manifest/composer.lock deleted file mode 100644 index fe18e08b..00000000 --- a/vendor/phar-io/manifest/composer.lock +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "279b3c4fe44357abd924fdcc0cfa5664", - "packages": [ - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^7.2 || ^8.0", - "ext-dom": "*", - "ext-phar": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/vendor/phar-io/manifest/manifest.xsd b/vendor/phar-io/manifest/manifest.xsd deleted file mode 100644 index 63e3f1cb..00000000 --- a/vendor/phar-io/manifest/manifest.xsd +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php deleted file mode 100644 index 3da6403f..00000000 --- a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php +++ /dev/null @@ -1,151 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\Exception as VersionException; -use PharIo\Version\Version; -use PharIo\Version\VersionConstraintParser; -use Throwable; -use function sprintf; - -class ManifestDocumentMapper { - public function map(ManifestDocument $document): Manifest { - try { - $contains = $document->getContainsElement(); - $type = $this->mapType($contains); - $copyright = $this->mapCopyright($document->getCopyrightElement()); - $requirements = $this->mapRequirements($document->getRequiresElement()); - $bundledComponents = $this->mapBundledComponents($document); - - return new Manifest( - new ApplicationName($contains->getName()), - new Version($contains->getVersion()), - $type, - $copyright, - $requirements, - $bundledComponents - ); - } catch (Throwable $e) { - throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); - } - } - - private function mapType(ContainsElement $contains): Type { - switch ($contains->getType()) { - case 'application': - return Type::application(); - case 'library': - return Type::library(); - case 'extension': - return $this->mapExtension($contains->getExtensionElement()); - } - - throw new ManifestDocumentMapperException( - sprintf('Unsupported type %s', $contains->getType()) - ); - } - - private function mapCopyright(CopyrightElement $copyright): CopyrightInformation { - $authors = new AuthorCollection(); - - foreach ($copyright->getAuthorElements() as $authorElement) { - $authors->add( - new Author( - $authorElement->getName(), - $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null - ) - ); - } - - $licenseElement = $copyright->getLicenseElement(); - $license = new License( - $licenseElement->getType(), - new Url($licenseElement->getUrl()) - ); - - return new CopyrightInformation( - $authors, - $license - ); - } - - private function mapRequirements(RequiresElement $requires): RequirementCollection { - $collection = new RequirementCollection(); - $phpElement = $requires->getPHPElement(); - $parser = new VersionConstraintParser; - - try { - $versionConstraint = $parser->parse($phpElement->getVersion()); - } catch (VersionException $e) { - throw new ManifestDocumentMapperException( - sprintf('Unsupported version constraint - %s', $e->getMessage()), - (int)$e->getCode(), - $e - ); - } - - $collection->add( - new PhpVersionRequirement( - $versionConstraint - ) - ); - - if (!$phpElement->hasExtElements()) { - return $collection; - } - - foreach ($phpElement->getExtElements() as $extElement) { - $collection->add( - new PhpExtensionRequirement($extElement->getName()) - ); - } - - return $collection; - } - - private function mapBundledComponents(ManifestDocument $document): BundledComponentCollection { - $collection = new BundledComponentCollection(); - - if (!$document->hasBundlesElement()) { - return $collection; - } - - foreach ($document->getBundlesElement()->getComponentElements() as $componentElement) { - $collection->add( - new BundledComponent( - $componentElement->getName(), - new Version( - $componentElement->getVersion() - ) - ) - ); - } - - return $collection; - } - - private function mapExtension(ExtensionElement $extension): Extension { - try { - $versionConstraint = (new VersionConstraintParser)->parse($extension->getCompatible()); - - return Type::extension( - new ApplicationName($extension->getFor()), - $versionConstraint - ); - } catch (VersionException $e) { - throw new ManifestDocumentMapperException( - sprintf('Unsupported version constraint - %s', $e->getMessage()), - (int)$e->getCode(), - $e - ); - } - } -} diff --git a/vendor/phar-io/manifest/src/ManifestLoader.php b/vendor/phar-io/manifest/src/ManifestLoader.php deleted file mode 100644 index f467d2d3..00000000 --- a/vendor/phar-io/manifest/src/ManifestLoader.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use function sprintf; - -class ManifestLoader { - public static function fromFile(string $filename): Manifest { - try { - return (new ManifestDocumentMapper())->map( - ManifestDocument::fromFile($filename) - ); - } catch (Exception $e) { - throw new ManifestLoaderException( - sprintf('Loading %s failed.', $filename), - (int)$e->getCode(), - $e - ); - } - } - - public static function fromPhar(string $filename): Manifest { - return self::fromFile('phar://' . $filename . '/manifest.xml'); - } - - public static function fromString(string $manifest): Manifest { - try { - return (new ManifestDocumentMapper())->map( - ManifestDocument::fromString($manifest) - ); - } catch (Exception $e) { - throw new ManifestLoaderException( - 'Processing string failed', - (int)$e->getCode(), - $e - ); - } - } -} diff --git a/vendor/phar-io/manifest/src/ManifestSerializer.php b/vendor/phar-io/manifest/src/ManifestSerializer.php deleted file mode 100644 index 48b8efdd..00000000 --- a/vendor/phar-io/manifest/src/ManifestSerializer.php +++ /dev/null @@ -1,172 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\AnyVersionConstraint; -use PharIo\Version\Version; -use PharIo\Version\VersionConstraint; -use XMLWriter; -use function count; -use function file_put_contents; -use function str_repeat; - -/** @psalm-suppress MissingConstructor */ -class ManifestSerializer { - /** @var XMLWriter */ - private $xmlWriter; - - public function serializeToFile(Manifest $manifest, string $filename): void { - file_put_contents( - $filename, - $this->serializeToString($manifest) - ); - } - - public function serializeToString(Manifest $manifest): string { - $this->startDocument(); - - $this->addContains($manifest->getName(), $manifest->getVersion(), $manifest->getType()); - $this->addCopyright($manifest->getCopyrightInformation()); - $this->addRequirements($manifest->getRequirements()); - $this->addBundles($manifest->getBundledComponents()); - - return $this->finishDocument(); - } - - private function startDocument(): void { - $xmlWriter = new XMLWriter(); - $xmlWriter->openMemory(); - $xmlWriter->setIndent(true); - $xmlWriter->setIndentString(str_repeat(' ', 4)); - $xmlWriter->startDocument('1.0', 'UTF-8'); - $xmlWriter->startElement('phar'); - $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0'); - - $this->xmlWriter = $xmlWriter; - } - - private function finishDocument(): string { - $this->xmlWriter->endElement(); - $this->xmlWriter->endDocument(); - - return $this->xmlWriter->outputMemory(); - } - - private function addContains(ApplicationName $name, Version $version, Type $type): void { - $this->xmlWriter->startElement('contains'); - $this->xmlWriter->writeAttribute('name', $name->asString()); - $this->xmlWriter->writeAttribute('version', $version->getVersionString()); - - switch (true) { - case $type->isApplication(): { - $this->xmlWriter->writeAttribute('type', 'application'); - - break; - } - - case $type->isLibrary(): { - $this->xmlWriter->writeAttribute('type', 'library'); - - break; - } - - case $type->isExtension(): { - $this->xmlWriter->writeAttribute('type', 'extension'); - /* @var $type Extension */ - $this->addExtension( - $type->getApplicationName(), - $type->getVersionConstraint() - ); - - break; - } - - default: { - $this->xmlWriter->writeAttribute('type', 'custom'); - } - } - - $this->xmlWriter->endElement(); - } - - private function addCopyright(CopyrightInformation $copyrightInformation): void { - $this->xmlWriter->startElement('copyright'); - - foreach ($copyrightInformation->getAuthors() as $author) { - $this->xmlWriter->startElement('author'); - $this->xmlWriter->writeAttribute('name', $author->getName()); - $this->xmlWriter->writeAttribute('email', $author->getEmail()->asString()); - $this->xmlWriter->endElement(); - } - - $license = $copyrightInformation->getLicense(); - - $this->xmlWriter->startElement('license'); - $this->xmlWriter->writeAttribute('type', $license->getName()); - $this->xmlWriter->writeAttribute('url', $license->getUrl()->asString()); - $this->xmlWriter->endElement(); - - $this->xmlWriter->endElement(); - } - - private function addRequirements(RequirementCollection $requirementCollection): void { - $phpRequirement = new AnyVersionConstraint(); - $extensions = []; - - foreach ($requirementCollection as $requirement) { - if ($requirement instanceof PhpVersionRequirement) { - $phpRequirement = $requirement->getVersionConstraint(); - - continue; - } - - if ($requirement instanceof PhpExtensionRequirement) { - $extensions[] = $requirement->asString(); - } - } - - $this->xmlWriter->startElement('requires'); - $this->xmlWriter->startElement('php'); - $this->xmlWriter->writeAttribute('version', $phpRequirement->asString()); - - foreach ($extensions as $extension) { - $this->xmlWriter->startElement('ext'); - $this->xmlWriter->writeAttribute('name', $extension); - $this->xmlWriter->endElement(); - } - - $this->xmlWriter->endElement(); - $this->xmlWriter->endElement(); - } - - private function addBundles(BundledComponentCollection $bundledComponentCollection): void { - if (count($bundledComponentCollection) === 0) { - return; - } - $this->xmlWriter->startElement('bundles'); - - foreach ($bundledComponentCollection as $bundledComponent) { - $this->xmlWriter->startElement('component'); - $this->xmlWriter->writeAttribute('name', $bundledComponent->getName()); - $this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString()); - $this->xmlWriter->endElement(); - } - - $this->xmlWriter->endElement(); - } - - private function addExtension(ApplicationName $applicationName, VersionConstraint $versionConstraint): void { - $this->xmlWriter->startElement('extension'); - $this->xmlWriter->writeAttribute('for', $applicationName->asString()); - $this->xmlWriter->writeAttribute('compatible', $versionConstraint->asString()); - $this->xmlWriter->endElement(); - } -} diff --git a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php deleted file mode 100644 index 7528afc8..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use InvalidArgumentException; - -class ElementCollectionException extends InvalidArgumentException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/Exception.php b/vendor/phar-io/manifest/src/exceptions/Exception.php deleted file mode 100644 index 0c135d3c..00000000 --- a/vendor/phar-io/manifest/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Throwable; - -interface Exception extends Throwable { -} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php deleted file mode 100644 index ecfe5142..00000000 --- a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php +++ /dev/null @@ -1,17 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use InvalidArgumentException; - -class InvalidApplicationNameException extends InvalidArgumentException implements Exception { - public const InvalidFormat = 2; -} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php deleted file mode 100644 index 24240551..00000000 --- a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use InvalidArgumentException; - -class InvalidEmailException extends InvalidArgumentException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php deleted file mode 100644 index c8b192b1..00000000 --- a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use InvalidArgumentException; - -class InvalidUrlException extends InvalidArgumentException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php deleted file mode 100644 index 0a158e6e..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use RuntimeException; - -class ManifestDocumentException extends RuntimeException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php deleted file mode 100644 index 816af120..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use LibXMLError; -use function sprintf; - -class ManifestDocumentLoadingException extends \Exception implements Exception { - /** @var LibXMLError[] */ - private $libxmlErrors; - - /** - * ManifestDocumentLoadingException constructor. - * - * @param LibXMLError[] $libxmlErrors - */ - public function __construct(array $libxmlErrors) { - $this->libxmlErrors = $libxmlErrors; - $first = $this->libxmlErrors[0]; - - parent::__construct( - sprintf( - '%s (Line: %d / Column: %d / File: %s)', - $first->message, - $first->line, - $first->column, - $first->file - ), - $first->code - ); - } - - /** - * @return LibXMLError[] - */ - public function getLibxmlErrors(): array { - return $this->libxmlErrors; - } -} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php deleted file mode 100644 index 0d1a5f5a..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use RuntimeException; - -class ManifestDocumentMapperException extends RuntimeException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php deleted file mode 100644 index 46f82e32..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use RuntimeException; - -class ManifestElementException extends RuntimeException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php deleted file mode 100644 index d00ed190..00000000 --- a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php +++ /dev/null @@ -1,14 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ManifestLoaderException extends \Exception implements Exception { -} diff --git a/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php b/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php deleted file mode 100644 index 27913126..00000000 --- a/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use InvalidArgumentException; - -class NoEmailAddressException extends InvalidArgumentException implements Exception { -} diff --git a/vendor/phar-io/manifest/src/values/Application.php b/vendor/phar-io/manifest/src/values/Application.php deleted file mode 100644 index 11a44d9c..00000000 --- a/vendor/phar-io/manifest/src/values/Application.php +++ /dev/null @@ -1,17 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class Application extends Type { - public function isApplication(): bool { - return true; - } -} diff --git a/vendor/phar-io/manifest/src/values/ApplicationName.php b/vendor/phar-io/manifest/src/values/ApplicationName.php deleted file mode 100644 index 1a0ad1e2..00000000 --- a/vendor/phar-io/manifest/src/values/ApplicationName.php +++ /dev/null @@ -1,41 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use function preg_match; -use function sprintf; - -class ApplicationName { - /** @var string */ - private $name; - - public function __construct(string $name) { - $this->ensureValidFormat($name); - $this->name = $name; - } - - public function asString(): string { - return $this->name; - } - - public function isEqual(ApplicationName $name): bool { - return $this->name === $name->name; - } - - private function ensureValidFormat(string $name): void { - if (!preg_match('#\w/\w#', $name)) { - throw new InvalidApplicationNameException( - sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name), - InvalidApplicationNameException::InvalidFormat - ); - } - } -} diff --git a/vendor/phar-io/manifest/src/values/Author.php b/vendor/phar-io/manifest/src/values/Author.php deleted file mode 100644 index 7b243aac..00000000 --- a/vendor/phar-io/manifest/src/values/Author.php +++ /dev/null @@ -1,57 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use function sprintf; - -class Author { - /** @var string */ - private $name; - - /** @var null|Email */ - private $email; - - public function __construct(string $name, ?Email $email = null) { - $this->name = $name; - $this->email = $email; - } - - public function asString(): string { - if (!$this->hasEmail()) { - return $this->name; - } - - return sprintf( - '%s <%s>', - $this->name, - $this->email->asString() - ); - } - - public function getName(): string { - return $this->name; - } - - /** - * @psalm-assert-if-true Email $this->email - */ - public function hasEmail(): bool { - return $this->email !== null; - } - - public function getEmail(): Email { - if (!$this->hasEmail()) { - throw new NoEmailAddressException(); - } - - return $this->email; - } -} diff --git a/vendor/phar-io/manifest/src/values/AuthorCollection.php b/vendor/phar-io/manifest/src/values/AuthorCollection.php deleted file mode 100644 index 549876da..00000000 --- a/vendor/phar-io/manifest/src/values/AuthorCollection.php +++ /dev/null @@ -1,40 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Countable; -use IteratorAggregate; -use function count; - -/** @template-implements IteratorAggregate */ -class AuthorCollection implements Countable, IteratorAggregate { - /** @var Author[] */ - private $authors = []; - - public function add(Author $author): void { - $this->authors[] = $author; - } - - /** - * @return Author[] - */ - public function getAuthors(): array { - return $this->authors; - } - - public function count(): int { - return count($this->authors); - } - - public function getIterator(): AuthorCollectionIterator { - return new AuthorCollectionIterator($this); - } -} diff --git a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php deleted file mode 100644 index 36fee9f7..00000000 --- a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Iterator; -use function count; - -/** @template-implements Iterator */ -class AuthorCollectionIterator implements Iterator { - /** @var Author[] */ - private $authors; - - /** @var int */ - private $position = 0; - - public function __construct(AuthorCollection $authors) { - $this->authors = $authors->getAuthors(); - } - - public function rewind(): void { - $this->position = 0; - } - - public function valid(): bool { - return $this->position < count($this->authors); - } - - public function key(): int { - return $this->position; - } - - public function current(): Author { - return $this->authors[$this->position]; - } - - public function next(): void { - $this->position++; - } -} diff --git a/vendor/phar-io/manifest/src/values/BundledComponent.php b/vendor/phar-io/manifest/src/values/BundledComponent.php deleted file mode 100644 index 58170368..00000000 --- a/vendor/phar-io/manifest/src/values/BundledComponent.php +++ /dev/null @@ -1,34 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\Version; - -class BundledComponent { - /** @var string */ - private $name; - - /** @var Version */ - private $version; - - public function __construct(string $name, Version $version) { - $this->name = $name; - $this->version = $version; - } - - public function getName(): string { - return $this->name; - } - - public function getVersion(): Version { - return $this->version; - } -} diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php deleted file mode 100644 index 28aaa06c..00000000 --- a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php +++ /dev/null @@ -1,40 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Countable; -use IteratorAggregate; -use function count; - -/** @template-implements IteratorAggregate */ -class BundledComponentCollection implements Countable, IteratorAggregate { - /** @var BundledComponent[] */ - private $bundledComponents = []; - - public function add(BundledComponent $bundledComponent): void { - $this->bundledComponents[] = $bundledComponent; - } - - /** - * @return BundledComponent[] - */ - public function getBundledComponents(): array { - return $this->bundledComponents; - } - - public function count(): int { - return count($this->bundledComponents); - } - - public function getIterator(): BundledComponentCollectionIterator { - return new BundledComponentCollectionIterator($this); - } -} diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php deleted file mode 100644 index 5c72817d..00000000 --- a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Iterator; -use function count; - -/** @template-implements Iterator */ -class BundledComponentCollectionIterator implements Iterator { - /** @var BundledComponent[] */ - private $bundledComponents; - - /** @var int */ - private $position = 0; - - public function __construct(BundledComponentCollection $bundledComponents) { - $this->bundledComponents = $bundledComponents->getBundledComponents(); - } - - public function rewind(): void { - $this->position = 0; - } - - public function valid(): bool { - return $this->position < count($this->bundledComponents); - } - - public function key(): int { - return $this->position; - } - - public function current(): BundledComponent { - return $this->bundledComponents[$this->position]; - } - - public function next(): void { - $this->position++; - } -} diff --git a/vendor/phar-io/manifest/src/values/CopyrightInformation.php b/vendor/phar-io/manifest/src/values/CopyrightInformation.php deleted file mode 100644 index b4468ed7..00000000 --- a/vendor/phar-io/manifest/src/values/CopyrightInformation.php +++ /dev/null @@ -1,32 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class CopyrightInformation { - /** @var AuthorCollection */ - private $authors; - - /** @var License */ - private $license; - - public function __construct(AuthorCollection $authors, License $license) { - $this->authors = $authors; - $this->license = $license; - } - - public function getAuthors(): AuthorCollection { - return $this->authors; - } - - public function getLicense(): License { - return $this->license; - } -} diff --git a/vendor/phar-io/manifest/src/values/Email.php b/vendor/phar-io/manifest/src/values/Email.php deleted file mode 100644 index dbaff84a..00000000 --- a/vendor/phar-io/manifest/src/values/Email.php +++ /dev/null @@ -1,35 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use const FILTER_VALIDATE_EMAIL; -use function filter_var; - -class Email { - /** @var string */ - private $email; - - public function __construct(string $email) { - $this->ensureEmailIsValid($email); - - $this->email = $email; - } - - public function asString(): string { - return $this->email; - } - - private function ensureEmailIsValid(string $url): void { - if (filter_var($url, FILTER_VALIDATE_EMAIL) === false) { - throw new InvalidEmailException; - } - } -} diff --git a/vendor/phar-io/manifest/src/values/Extension.php b/vendor/phar-io/manifest/src/values/Extension.php deleted file mode 100644 index abcd2f89..00000000 --- a/vendor/phar-io/manifest/src/values/Extension.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\Version; -use PharIo\Version\VersionConstraint; - -class Extension extends Type { - /** @var ApplicationName */ - private $application; - - /** @var VersionConstraint */ - private $versionConstraint; - - public function __construct(ApplicationName $application, VersionConstraint $versionConstraint) { - $this->application = $application; - $this->versionConstraint = $versionConstraint; - } - - public function getApplicationName(): ApplicationName { - return $this->application; - } - - public function getVersionConstraint(): VersionConstraint { - return $this->versionConstraint; - } - - public function isExtension(): bool { - return true; - } - - public function isExtensionFor(ApplicationName $name): bool { - return $this->application->isEqual($name); - } - - public function isCompatibleWith(ApplicationName $name, Version $version): bool { - return $this->isExtensionFor($name) && $this->versionConstraint->complies($version); - } -} diff --git a/vendor/phar-io/manifest/src/values/Library.php b/vendor/phar-io/manifest/src/values/Library.php deleted file mode 100644 index 97c292dc..00000000 --- a/vendor/phar-io/manifest/src/values/Library.php +++ /dev/null @@ -1,17 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class Library extends Type { - public function isLibrary(): bool { - return true; - } -} diff --git a/vendor/phar-io/manifest/src/values/License.php b/vendor/phar-io/manifest/src/values/License.php deleted file mode 100644 index c2d94299..00000000 --- a/vendor/phar-io/manifest/src/values/License.php +++ /dev/null @@ -1,32 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class License { - /** @var string */ - private $name; - - /** @var Url */ - private $url; - - public function __construct(string $name, Url $url) { - $this->name = $name; - $this->url = $url; - } - - public function getName(): string { - return $this->name; - } - - public function getUrl(): Url { - return $this->url; - } -} diff --git a/vendor/phar-io/manifest/src/values/Manifest.php b/vendor/phar-io/manifest/src/values/Manifest.php deleted file mode 100644 index 36466820..00000000 --- a/vendor/phar-io/manifest/src/values/Manifest.php +++ /dev/null @@ -1,93 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\Version; - -class Manifest { - /** @var ApplicationName */ - private $name; - - /** @var Version */ - private $version; - - /** @var Type */ - private $type; - - /** @var CopyrightInformation */ - private $copyrightInformation; - - /** @var RequirementCollection */ - private $requirements; - - /** @var BundledComponentCollection */ - private $bundledComponents; - - public function __construct(ApplicationName $name, Version $version, Type $type, CopyrightInformation $copyrightInformation, RequirementCollection $requirements, BundledComponentCollection $bundledComponents) { - $this->name = $name; - $this->version = $version; - $this->type = $type; - $this->copyrightInformation = $copyrightInformation; - $this->requirements = $requirements; - $this->bundledComponents = $bundledComponents; - } - - public function getName(): ApplicationName { - return $this->name; - } - - public function getVersion(): Version { - return $this->version; - } - - public function getType(): Type { - return $this->type; - } - - public function getCopyrightInformation(): CopyrightInformation { - return $this->copyrightInformation; - } - - public function getRequirements(): RequirementCollection { - return $this->requirements; - } - - public function getBundledComponents(): BundledComponentCollection { - return $this->bundledComponents; - } - - public function isApplication(): bool { - return $this->type->isApplication(); - } - - public function isLibrary(): bool { - return $this->type->isLibrary(); - } - - public function isExtension(): bool { - return $this->type->isExtension(); - } - - public function isExtensionFor(ApplicationName $application, ?Version $version = null): bool { - if (!$this->isExtension()) { - return false; - } - - /** @var Extension $type */ - $type = $this->type; - - if ($version !== null) { - return $type->isCompatibleWith($application, $version); - } - - return $type->isExtensionFor($application); - } -} diff --git a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php deleted file mode 100644 index f81bd259..00000000 --- a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php +++ /dev/null @@ -1,24 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class PhpExtensionRequirement implements Requirement { - /** @var string */ - private $extension; - - public function __construct(string $extension) { - $this->extension = $extension; - } - - public function asString(): string { - return $this->extension; - } -} diff --git a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php deleted file mode 100644 index fb30c3b8..00000000 --- a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php +++ /dev/null @@ -1,26 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\VersionConstraint; - -class PhpVersionRequirement implements Requirement { - /** @var VersionConstraint */ - private $versionConstraint; - - public function __construct(VersionConstraint $versionConstraint) { - $this->versionConstraint = $versionConstraint; - } - - public function getVersionConstraint(): VersionConstraint { - return $this->versionConstraint; - } -} diff --git a/vendor/phar-io/manifest/src/values/Requirement.php b/vendor/phar-io/manifest/src/values/Requirement.php deleted file mode 100644 index d4b46401..00000000 --- a/vendor/phar-io/manifest/src/values/Requirement.php +++ /dev/null @@ -1,14 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -interface Requirement { -} diff --git a/vendor/phar-io/manifest/src/values/RequirementCollection.php b/vendor/phar-io/manifest/src/values/RequirementCollection.php deleted file mode 100644 index e4fe2a11..00000000 --- a/vendor/phar-io/manifest/src/values/RequirementCollection.php +++ /dev/null @@ -1,40 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Countable; -use IteratorAggregate; -use function count; - -/** @template-implements IteratorAggregate */ -class RequirementCollection implements Countable, IteratorAggregate { - /** @var Requirement[] */ - private $requirements = []; - - public function add(Requirement $requirement): void { - $this->requirements[] = $requirement; - } - - /** - * @return Requirement[] - */ - public function getRequirements(): array { - return $this->requirements; - } - - public function count(): int { - return count($this->requirements); - } - - public function getIterator(): RequirementCollectionIterator { - return new RequirementCollectionIterator($this); - } -} diff --git a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php deleted file mode 100644 index a587468c..00000000 --- a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php +++ /dev/null @@ -1,47 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use Iterator; -use function count; - -/** @template-implements Iterator */ -class RequirementCollectionIterator implements Iterator { - /** @var Requirement[] */ - private $requirements; - - /** @var int */ - private $position = 0; - - public function __construct(RequirementCollection $requirements) { - $this->requirements = $requirements->getRequirements(); - } - - public function rewind(): void { - $this->position = 0; - } - - public function valid(): bool { - return $this->position < count($this->requirements); - } - - public function key(): int { - return $this->position; - } - - public function current(): Requirement { - return $this->requirements[$this->position]; - } - - public function next(): void { - $this->position++; - } -} diff --git a/vendor/phar-io/manifest/src/values/Type.php b/vendor/phar-io/manifest/src/values/Type.php deleted file mode 100644 index 231e7fd9..00000000 --- a/vendor/phar-io/manifest/src/values/Type.php +++ /dev/null @@ -1,42 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use PharIo\Version\VersionConstraint; - -abstract class Type { - public static function application(): Application { - return new Application; - } - - public static function library(): Library { - return new Library; - } - - public static function extension(ApplicationName $application, VersionConstraint $versionConstraint): Extension { - return new Extension($application, $versionConstraint); - } - - /** @psalm-assert-if-true Application $this */ - public function isApplication(): bool { - return false; - } - - /** @psalm-assert-if-true Library $this */ - public function isLibrary(): bool { - return false; - } - - /** @psalm-assert-if-true Extension $this */ - public function isExtension(): bool { - return false; - } -} diff --git a/vendor/phar-io/manifest/src/values/Url.php b/vendor/phar-io/manifest/src/values/Url.php deleted file mode 100644 index 98061554..00000000 --- a/vendor/phar-io/manifest/src/values/Url.php +++ /dev/null @@ -1,38 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use const FILTER_VALIDATE_URL; -use function filter_var; - -class Url { - /** @var string */ - private $url; - - public function __construct(string $url) { - $this->ensureUrlIsValid($url); - - $this->url = $url; - } - - public function asString(): string { - return $this->url; - } - - /** - * @throws InvalidUrlException - */ - private function ensureUrlIsValid(string $url): void { - if (filter_var($url, FILTER_VALIDATE_URL) === false) { - throw new InvalidUrlException; - } - } -} diff --git a/vendor/phar-io/manifest/src/xml/AuthorElement.php b/vendor/phar-io/manifest/src/xml/AuthorElement.php deleted file mode 100644 index b33eb3ca..00000000 --- a/vendor/phar-io/manifest/src/xml/AuthorElement.php +++ /dev/null @@ -1,25 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class AuthorElement extends ManifestElement { - public function getName(): string { - return $this->getAttributeValue('name'); - } - - public function getEmail(): string { - return $this->getAttributeValue('email'); - } - - public function hasEMail(): bool { - return $this->hasAttribute('email'); - } -} diff --git a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php deleted file mode 100644 index 0a2a2a38..00000000 --- a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php +++ /dev/null @@ -1,19 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class AuthorElementCollection extends ElementCollection { - public function current(): AuthorElement { - return new AuthorElement( - $this->getCurrentElement() - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/BundlesElement.php b/vendor/phar-io/manifest/src/xml/BundlesElement.php deleted file mode 100644 index ef721a66..00000000 --- a/vendor/phar-io/manifest/src/xml/BundlesElement.php +++ /dev/null @@ -1,19 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class BundlesElement extends ManifestElement { - public function getComponentElements(): ComponentElementCollection { - return new ComponentElementCollection( - $this->getChildrenByName('component') - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ComponentElement.php b/vendor/phar-io/manifest/src/xml/ComponentElement.php deleted file mode 100644 index 84373c47..00000000 --- a/vendor/phar-io/manifest/src/xml/ComponentElement.php +++ /dev/null @@ -1,21 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ComponentElement extends ManifestElement { - public function getName(): string { - return $this->getAttributeValue('name'); - } - - public function getVersion(): string { - return $this->getAttributeValue('version'); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php deleted file mode 100644 index cd9ad5dd..00000000 --- a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php +++ /dev/null @@ -1,19 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ComponentElementCollection extends ElementCollection { - public function current(): ComponentElement { - return new ComponentElement( - $this->getCurrentElement() - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ContainsElement.php b/vendor/phar-io/manifest/src/xml/ContainsElement.php deleted file mode 100644 index 55a9c605..00000000 --- a/vendor/phar-io/manifest/src/xml/ContainsElement.php +++ /dev/null @@ -1,31 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ContainsElement extends ManifestElement { - public function getName(): string { - return $this->getAttributeValue('name'); - } - - public function getVersion(): string { - return $this->getAttributeValue('version'); - } - - public function getType(): string { - return $this->getAttributeValue('type'); - } - - public function getExtensionElement(): ExtensionElement { - return new ExtensionElement( - $this->getChildByName('extension') - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/CopyrightElement.php b/vendor/phar-io/manifest/src/xml/CopyrightElement.php deleted file mode 100644 index c11415a5..00000000 --- a/vendor/phar-io/manifest/src/xml/CopyrightElement.php +++ /dev/null @@ -1,25 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class CopyrightElement extends ManifestElement { - public function getAuthorElements(): AuthorElementCollection { - return new AuthorElementCollection( - $this->getChildrenByName('author') - ); - } - - public function getLicenseElement(): LicenseElement { - return new LicenseElement( - $this->getChildByName('license') - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ElementCollection.php b/vendor/phar-io/manifest/src/xml/ElementCollection.php deleted file mode 100644 index 9e1de569..00000000 --- a/vendor/phar-io/manifest/src/xml/ElementCollection.php +++ /dev/null @@ -1,68 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use DOMElement; -use DOMNodeList; -use Iterator; -use ReturnTypeWillChange; -use function count; -use function get_class; -use function sprintf; - -/** @template-implements Iterator */ -abstract class ElementCollection implements Iterator { - /** @var DOMElement[] */ - private $nodes = []; - - /** @var int */ - private $position; - - public function __construct(DOMNodeList $nodeList) { - $this->position = 0; - $this->importNodes($nodeList); - } - - #[ReturnTypeWillChange] - abstract public function current(); - - public function next(): void { - $this->position++; - } - - public function key(): int { - return $this->position; - } - - public function valid(): bool { - return $this->position < count($this->nodes); - } - - public function rewind(): void { - $this->position = 0; - } - - protected function getCurrentElement(): DOMElement { - return $this->nodes[$this->position]; - } - - private function importNodes(DOMNodeList $nodeList): void { - foreach ($nodeList as $node) { - if (!$node instanceof DOMElement) { - throw new ElementCollectionException( - sprintf('\DOMElement expected, got \%s', get_class($node)) - ); - } - - $this->nodes[] = $node; - } - } -} diff --git a/vendor/phar-io/manifest/src/xml/ExtElement.php b/vendor/phar-io/manifest/src/xml/ExtElement.php deleted file mode 100644 index 6a88a05d..00000000 --- a/vendor/phar-io/manifest/src/xml/ExtElement.php +++ /dev/null @@ -1,17 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ExtElement extends ManifestElement { - public function getName(): string { - return $this->getAttributeValue('name'); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php deleted file mode 100644 index 3eec9463..00000000 --- a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php +++ /dev/null @@ -1,19 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ExtElementCollection extends ElementCollection { - public function current(): ExtElement { - return new ExtElement( - $this->getCurrentElement() - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ExtensionElement.php b/vendor/phar-io/manifest/src/xml/ExtensionElement.php deleted file mode 100644 index 22016a01..00000000 --- a/vendor/phar-io/manifest/src/xml/ExtensionElement.php +++ /dev/null @@ -1,21 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class ExtensionElement extends ManifestElement { - public function getFor(): string { - return $this->getAttributeValue('for'); - } - - public function getCompatible(): string { - return $this->getAttributeValue('compatible'); - } -} diff --git a/vendor/phar-io/manifest/src/xml/LicenseElement.php b/vendor/phar-io/manifest/src/xml/LicenseElement.php deleted file mode 100644 index d9f4cb26..00000000 --- a/vendor/phar-io/manifest/src/xml/LicenseElement.php +++ /dev/null @@ -1,21 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class LicenseElement extends ManifestElement { - public function getType(): string { - return $this->getAttributeValue('type'); - } - - public function getUrl(): string { - return $this->getAttributeValue('url'); - } -} diff --git a/vendor/phar-io/manifest/src/xml/ManifestDocument.php b/vendor/phar-io/manifest/src/xml/ManifestDocument.php deleted file mode 100644 index 87458686..00000000 --- a/vendor/phar-io/manifest/src/xml/ManifestDocument.php +++ /dev/null @@ -1,115 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use DOMDocument; -use DOMElement; -use Throwable; -use function count; -use function file_get_contents; -use function is_file; -use function libxml_clear_errors; -use function libxml_get_errors; -use function libxml_use_internal_errors; -use function sprintf; - -class ManifestDocument { - public const XMLNS = 'https://phar.io/xml/manifest/1.0'; - - /** @var DOMDocument */ - private $dom; - - public static function fromFile(string $filename): ManifestDocument { - if (!is_file($filename)) { - throw new ManifestDocumentException( - sprintf('File "%s" not found', $filename) - ); - } - - return self::fromString( - file_get_contents($filename) - ); - } - - public static function fromString(string $xmlString): ManifestDocument { - $prev = libxml_use_internal_errors(true); - libxml_clear_errors(); - - try { - $dom = new DOMDocument(); - $dom->loadXML($xmlString); - $errors = libxml_get_errors(); - libxml_use_internal_errors($prev); - } catch (Throwable $t) { - throw new ManifestDocumentException($t->getMessage(), 0, $t); - } - - if (count($errors) !== 0) { - throw new ManifestDocumentLoadingException($errors); - } - - return new self($dom); - } - - private function __construct(DOMDocument $dom) { - $this->ensureCorrectDocumentType($dom); - - $this->dom = $dom; - } - - public function getContainsElement(): ContainsElement { - return new ContainsElement( - $this->fetchElementByName('contains') - ); - } - - public function getCopyrightElement(): CopyrightElement { - return new CopyrightElement( - $this->fetchElementByName('copyright') - ); - } - - public function getRequiresElement(): RequiresElement { - return new RequiresElement( - $this->fetchElementByName('requires') - ); - } - - public function hasBundlesElement(): bool { - return $this->dom->getElementsByTagNameNS(self::XMLNS, 'bundles')->length === 1; - } - - public function getBundlesElement(): BundlesElement { - return new BundlesElement( - $this->fetchElementByName('bundles') - ); - } - - private function ensureCorrectDocumentType(DOMDocument $dom): void { - $root = $dom->documentElement; - - if ($root->localName !== 'phar' || $root->namespaceURI !== self::XMLNS) { - throw new ManifestDocumentException('Not a phar.io manifest document'); - } - } - - private function fetchElementByName(string $elementName): DOMElement { - $element = $this->dom->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); - - if (!$element instanceof DOMElement) { - throw new ManifestDocumentException( - sprintf('Element %s missing', $elementName) - ); - } - - return $element; - } -} diff --git a/vendor/phar-io/manifest/src/xml/ManifestElement.php b/vendor/phar-io/manifest/src/xml/ManifestElement.php deleted file mode 100644 index 461ba0c9..00000000 --- a/vendor/phar-io/manifest/src/xml/ManifestElement.php +++ /dev/null @@ -1,72 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -use DOMElement; -use DOMNodeList; -use function sprintf; - -class ManifestElement { - public const XMLNS = 'https://phar.io/xml/manifest/1.0'; - - /** @var DOMElement */ - private $element; - - public function __construct(DOMElement $element) { - $this->element = $element; - } - - protected function getAttributeValue(string $name): string { - if (!$this->element->hasAttribute($name)) { - throw new ManifestElementException( - sprintf( - 'Attribute %s not set on element %s', - $name, - $this->element->localName - ) - ); - } - - return $this->element->getAttribute($name); - } - - protected function hasAttribute(string $name): bool { - return $this->element->hasAttribute($name); - } - - protected function getChildByName(string $elementName): DOMElement { - $element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); - - if (!$element instanceof DOMElement) { - throw new ManifestElementException( - sprintf('Element %s missing', $elementName) - ); - } - - return $element; - } - - protected function getChildrenByName(string $elementName): DOMNodeList { - $elementList = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName); - - if ($elementList->length === 0) { - throw new ManifestElementException( - sprintf('Element(s) %s missing', $elementName) - ); - } - - return $elementList; - } - - protected function hasChild(string $elementName): bool { - return $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->length !== 0; - } -} diff --git a/vendor/phar-io/manifest/src/xml/PhpElement.php b/vendor/phar-io/manifest/src/xml/PhpElement.php deleted file mode 100644 index 9340c2e6..00000000 --- a/vendor/phar-io/manifest/src/xml/PhpElement.php +++ /dev/null @@ -1,27 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class PhpElement extends ManifestElement { - public function getVersion(): string { - return $this->getAttributeValue('version'); - } - - public function hasExtElements(): bool { - return $this->hasChild('ext'); - } - - public function getExtElements(): ExtElementCollection { - return new ExtElementCollection( - $this->getChildrenByName('ext') - ); - } -} diff --git a/vendor/phar-io/manifest/src/xml/RequiresElement.php b/vendor/phar-io/manifest/src/xml/RequiresElement.php deleted file mode 100644 index 73ba54ca..00000000 --- a/vendor/phar-io/manifest/src/xml/RequiresElement.php +++ /dev/null @@ -1,19 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann and contributors - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ -namespace PharIo\Manifest; - -class RequiresElement extends ManifestElement { - public function getPHPElement(): PhpElement { - return new PhpElement( - $this->getChildByName('php') - ); - } -} diff --git a/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php b/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php deleted file mode 100644 index ea5414e4..00000000 --- a/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php +++ /dev/null @@ -1,72 +0,0 @@ -isTokenKindFound(T_DOC_COMMENT); - } - - public function isRisky(): bool { - return false; - } - - public function fix(\SplFileInfo $file, Tokens $tokens): void { - foreach($tokens as $index => $token) { - if (!$token->isGivenKind(T_DOC_COMMENT)) { - continue; - } - if (\stripos($token->getContent(), '@var') === false) { - continue; - } - - if (preg_match('#^/\*\*[\s\*]+(@var[^\r\n]+)[\s\*]*\*\/$#u', $token->getContent(), $matches) !== 1) { - continue; - } - $newContent = '/** ' . \rtrim($matches[1]) . ' */'; - if ($newContent === $token->getContent()) { - continue; - } - $tokens[$index] = new Token([T_DOC_COMMENT, $newContent]); - } - } - - public function getPriority(): int { - return 0; - } - - public function getName(): string { - return 'PharIo/phpdoc_single_line_var_fixer'; - } - - public function supports(\SplFileInfo $file): bool { - return true; - } - -} diff --git a/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt b/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt deleted file mode 100644 index dc8c4ffc..00000000 --- a/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt +++ /dev/null @@ -1,6 +0,0 @@ -This file is part of PharIo\Manifest. - -Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. diff --git a/vendor/phar-io/version/CHANGELOG.md b/vendor/phar-io/version/CHANGELOG.md deleted file mode 100644 index 4c0edfa7..00000000 --- a/vendor/phar-io/version/CHANGELOG.md +++ /dev/null @@ -1,142 +0,0 @@ -# Changelog - -All notable changes to phar-io/version are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [3.2.1] - 2022-02-21 - -### Fixed - -- Have ExactVersionConstraint honor build metadata (added in 3.2.0) - - -## [3.2.0] - 2022-02-21 - -### Added - -- Build metadata is now supported and considered for equality checks only - - -## [3.1.1] - 2022-02-07 - -### Fixed - -- [#28](https://github.com/phar-io/version/issues/28): `VersionConstraintParser` does not support logical OR represented by single pipe (|) (Thanks @llaville) - - -## [3.1.0] - 2021-02-23 - -### Changed - -- Internal Refactoring -- More scalar types - -### Added - -- [#24](https://github.com/phar-io/version/issues/24): `Version::getOriginalString()` added (Thanks @addshore) -- Version constraints using the caret operator (`^`) now honor pre-1.0 releases, e.g. `^0.3` translates to `0.3.*`) -- Various integration tests for version constraint processing - -### Fixed - -- [#23](https://github.com/phar-io/version/pull/23): Tilde operator without patch level - - - -## [3.0.4] - 14.12.2020 - -### Fixed - -- [#22](https://github.com/phar-io/version/pull/22): make dev suffix rank works for uppercase too - -## [3.0.3] - 30.11.2020 - -### Added - -- Comparator method `Version::equals()` added - - -## [3.0.2] - 27.06.2020 - -This release now supports PHP 7.2+ and PHP ^8.0. No other changes included. - - -## [3.0.1] - 09.05.2020 - -__Potential BC Break Notice:__ -`Version::getVersionString()` no longer returns `v` prefixes in case the "input" -string contained one. These are not part of the semver specs -(see https://semver.org/#is-v123-a-semantic-version) and get stripped out. -As of Version 3.1.0 `Version::getOriginalString()` can be used to still -retrieve it as given. - -### Changed - -- Internal Refactoring -- More scalar types - -### Fixed - -- Fixed Constraint processing Regression for ^1.2 and ~1.2 - - -## [3.0.0] - 05.05.2020 - -### Changed - -- Require PHP 7.2+ -- All code now uses strict mode -- Scalar types have been added as needed - -### Added - -- The technically invalid format using 'v' prefix ("v1.2.3") is now properly supported - - -## [2.0.1] - 08.07.2018 - -### Fixed - -- Versions without a pre-release suffix are now always considered greater -than versions with a pre-release suffix. Example: `3.0.0 > 3.0.0-alpha.1` - - -## [2.0.0] - 23.06.2018 - -Changes to public API: - -- `PreReleaseSuffix::construct()`: optional parameter `$number` removed -- `PreReleaseSuffix::isGreaterThan()`: introduced -- `Version::hasPreReleaseSuffix()`: introduced - -### Added - -- [#11](https://github.com/phar-io/version/issues/11): Added support for pre-release version suffixes. Supported values are: - - `dev` - - `beta` (also abbreviated form `b`) - - `rc` - - `alpha` (also abbreviated form `a`) - - `patch` (also abbreviated form `p`) - - All values can be followed by a number, e.g. `beta3`. - - When comparing versions, the pre-release suffix is taken into account. Example: -`1.5.0 > 1.5.0-beta1 > 1.5.0-alpha3 > 1.5.0-alpha2 > 1.5.0-dev11` - -### Changed - -- reorganized the source directories - -### Fixed - -- [#10](https://github.com/phar-io/version/issues/10): Version numbers containing -a numeric suffix as seen in Debian packages are now supported. - - -[3.1.0]: https://github.com/phar-io/version/compare/3.0.4...3.1.0 -[3.0.4]: https://github.com/phar-io/version/compare/3.0.3...3.0.4 -[3.0.3]: https://github.com/phar-io/version/compare/3.0.2...3.0.3 -[3.0.2]: https://github.com/phar-io/version/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/phar-io/version/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/phar-io/version/compare/2.0.1...3.0.0 -[2.0.1]: https://github.com/phar-io/version/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/phar-io/version/compare/1.0.1...2.0.0 diff --git a/vendor/phar-io/version/LICENSE b/vendor/phar-io/version/LICENSE deleted file mode 100644 index ce32758a..00000000 --- a/vendor/phar-io/version/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2016-2017 Arne Blankerts , Sebastian Heuer and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/phar-io/version/README.md b/vendor/phar-io/version/README.md deleted file mode 100644 index 76e6e985..00000000 --- a/vendor/phar-io/version/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Version - -Library for handling version information and constraints - -[![Build Status](https://travis-ci.org/phar-io/version.svg?branch=master)](https://travis-ci.org/phar-io/version) - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phar-io/version - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phar-io/version - -## Version constraints - -A Version constraint describes a range of versions or a discrete version number. The format of version numbers follows the schema of [semantic versioning](http://semver.org): `..`. A constraint might contain an operator that describes the range. - -Beside the typical mathematical operators like `<=`, `>=`, there are two special operators: - -*Caret operator*: `^1.0` -can be written as `>=1.0.0 <2.0.0` and read as »every Version within major version `1`«. - -*Tilde operator*: `~1.0.0` -can be written as `>=1.0.0 <1.1.0` and read as »every version within minor version `1.1`. The behavior of tilde operator depends on whether a patch level version is provided or not. If no patch level is provided, tilde operator behaves like the caret operator: `~1.0` is identical to `^1.0`. - -## Usage examples - -Parsing version constraints and check discrete versions for compliance: - -```php - -use PharIo\Version\Version; -use PharIo\Version\VersionConstraintParser; - -$parser = new VersionConstraintParser(); -$caret_constraint = $parser->parse( '^7.0' ); - -$caret_constraint->complies( new Version( '7.0.17' ) ); // true -$caret_constraint->complies( new Version( '7.1.0' ) ); // true -$caret_constraint->complies( new Version( '6.4.34' ) ); // false - -$tilde_constraint = $parser->parse( '~1.1.0' ); - -$tilde_constraint->complies( new Version( '1.1.4' ) ); // true -$tilde_constraint->complies( new Version( '1.2.0' ) ); // false -``` - -As of version 2.0.0, pre-release labels are supported and taken into account when comparing versions: - -```php - -$leftVersion = new PharIo\Version\Version('3.0.0-alpha.1'); -$rightVersion = new PharIo\Version\Version('3.0.0-alpha.2'); - -$leftVersion->isGreaterThan($rightVersion); // false -$rightVersion->isGreaterThan($leftVersion); // true - -``` diff --git a/vendor/phar-io/version/composer.json b/vendor/phar-io/version/composer.json deleted file mode 100644 index 22687dcd..00000000 --- a/vendor/phar-io/version/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "phar-io/version", - "description": "Library for handling version information and constraints", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "support": { - "issues": "https://github.com/phar-io/version/issues" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - } -} - diff --git a/vendor/phar-io/version/src/BuildMetaData.php b/vendor/phar-io/version/src/BuildMetaData.php deleted file mode 100644 index d42f0363..00000000 --- a/vendor/phar-io/version/src/BuildMetaData.php +++ /dev/null @@ -1,28 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class BuildMetaData { - - /** @var string */ - private $value; - - public function __construct(string $value) { - $this->value = $value; - } - - public function asString(): string { - return $this->value; - } - - public function equals(BuildMetaData $other): bool { - return $this->asString() === $other->asString(); - } -} diff --git a/vendor/phar-io/version/src/PreReleaseSuffix.php b/vendor/phar-io/version/src/PreReleaseSuffix.php deleted file mode 100644 index 00563008..00000000 --- a/vendor/phar-io/version/src/PreReleaseSuffix.php +++ /dev/null @@ -1,82 +0,0 @@ - 0, - 'a' => 1, - 'alpha' => 1, - 'b' => 2, - 'beta' => 2, - 'rc' => 3, - 'p' => 4, - 'pl' => 4, - 'patch' => 4, - ]; - - /** @var string */ - private $value; - - /** @var int */ - private $valueScore; - - /** @var int */ - private $number = 0; - - /** @var string */ - private $full; - - /** - * @throws InvalidPreReleaseSuffixException - */ - public function __construct(string $value) { - $this->parseValue($value); - } - - public function asString(): string { - return $this->full; - } - - public function getValue(): string { - return $this->value; - } - - public function getNumber(): ?int { - return $this->number; - } - - public function isGreaterThan(PreReleaseSuffix $suffix): bool { - if ($this->valueScore > $suffix->valueScore) { - return true; - } - - if ($this->valueScore < $suffix->valueScore) { - return false; - } - - return $this->getNumber() > $suffix->getNumber(); - } - - private function mapValueToScore(string $value): int { - $value = \strtolower($value); - - return self::valueScoreMap[$value]; - } - - private function parseValue(string $value): void { - $regex = '/-?((dev|beta|b|rc|alpha|a|patch|p|pl)\.?(\d*)).*$/i'; - - if (\preg_match($regex, $value, $matches) !== 1) { - throw new InvalidPreReleaseSuffixException(\sprintf('Invalid label %s', $value)); - } - - $this->full = $matches[1]; - $this->value = $matches[2]; - - if ($matches[3] !== '') { - $this->number = (int)$matches[3]; - } - - $this->valueScore = $this->mapValueToScore($matches[2]); - } -} diff --git a/vendor/phar-io/version/src/Version.php b/vendor/phar-io/version/src/Version.php deleted file mode 100644 index 644af5ca..00000000 --- a/vendor/phar-io/version/src/Version.php +++ /dev/null @@ -1,208 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class Version { - /** @var string */ - private $originalVersionString; - - /** @var VersionNumber */ - private $major; - - /** @var VersionNumber */ - private $minor; - - /** @var VersionNumber */ - private $patch; - - /** @var null|PreReleaseSuffix */ - private $preReleaseSuffix; - - /** @var null|BuildMetaData */ - private $buildMetadata; - - public function __construct(string $versionString) { - $this->ensureVersionStringIsValid($versionString); - $this->originalVersionString = $versionString; - } - - /** - * @throws NoPreReleaseSuffixException - */ - public function getPreReleaseSuffix(): PreReleaseSuffix { - if ($this->preReleaseSuffix === null) { - throw new NoPreReleaseSuffixException('No pre-release suffix set'); - } - - return $this->preReleaseSuffix; - } - - public function getOriginalString(): string { - return $this->originalVersionString; - } - - public function getVersionString(): string { - $str = \sprintf( - '%d.%d.%d', - $this->getMajor()->getValue() ?? 0, - $this->getMinor()->getValue() ?? 0, - $this->getPatch()->getValue() ?? 0 - ); - - if (!$this->hasPreReleaseSuffix()) { - return $str; - } - - return $str . '-' . $this->getPreReleaseSuffix()->asString(); - } - - public function hasPreReleaseSuffix(): bool { - return $this->preReleaseSuffix !== null; - } - - public function equals(Version $other): bool { - if ($this->getVersionString() !== $other->getVersionString()) { - return false; - } - - if ($this->hasBuildMetaData() !== $other->hasBuildMetaData()) { - return false; - } - - if ($this->hasBuildMetaData() && $other->hasBuildMetaData() && - !$this->getBuildMetaData()->equals($other->getBuildMetaData())) { - return false; - } - - return true; - } - - public function isGreaterThan(Version $version): bool { - if ($version->getMajor()->getValue() > $this->getMajor()->getValue()) { - return false; - } - - if ($version->getMajor()->getValue() < $this->getMajor()->getValue()) { - return true; - } - - if ($version->getMinor()->getValue() > $this->getMinor()->getValue()) { - return false; - } - - if ($version->getMinor()->getValue() < $this->getMinor()->getValue()) { - return true; - } - - if ($version->getPatch()->getValue() > $this->getPatch()->getValue()) { - return false; - } - - if ($version->getPatch()->getValue() < $this->getPatch()->getValue()) { - return true; - } - - if (!$version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) { - return false; - } - - if ($version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) { - return true; - } - - if (!$version->hasPreReleaseSuffix() && $this->hasPreReleaseSuffix()) { - return false; - } - - return $this->getPreReleaseSuffix()->isGreaterThan($version->getPreReleaseSuffix()); - } - - public function getMajor(): VersionNumber { - return $this->major; - } - - public function getMinor(): VersionNumber { - return $this->minor; - } - - public function getPatch(): VersionNumber { - return $this->patch; - } - - /** - * @psalm-assert-if-true BuildMetaData $this->buildMetadata - * @psalm-assert-if-true BuildMetaData $this->getBuildMetaData() - */ - public function hasBuildMetaData(): bool { - return $this->buildMetadata !== null; - } - - /** - * @throws NoBuildMetaDataException - */ - public function getBuildMetaData(): BuildMetaData { - if (!$this->hasBuildMetaData()) { - throw new NoBuildMetaDataException('No build metadata set'); - } - - return $this->buildMetadata; - } - - /** - * @param string[] $matches - * - * @throws InvalidPreReleaseSuffixException - */ - private function parseVersion(array $matches): void { - $this->major = new VersionNumber((int)$matches['Major']); - $this->minor = new VersionNumber((int)$matches['Minor']); - $this->patch = isset($matches['Patch']) ? new VersionNumber((int)$matches['Patch']) : new VersionNumber(0); - - if (isset($matches['PreReleaseSuffix']) && $matches['PreReleaseSuffix'] !== '') { - $this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']); - } - - if (isset($matches['BuildMetadata'])) { - $this->buildMetadata = new BuildMetaData($matches['BuildMetadata']); - } - } - - /** - * @param string $version - * - * @throws InvalidVersionException - */ - private function ensureVersionStringIsValid($version): void { - $regex = '/^v? - (?P0|[1-9]\d*) - \\. - (?P0|[1-9]\d*) - (\\. - (?P0|[1-9]\d*) - )? - (?: - - - (?(?:(dev|beta|b|rc|alpha|a|patch|p|pl)\.?\d*)) - )? - (?: - \\+ - (?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-@]+)*) - )? - $/xi'; - - if (\preg_match($regex, $version, $matches) !== 1) { - throw new InvalidVersionException( - \sprintf("Version string '%s' does not follow SemVer semantics", $version) - ); - } - - $this->parseVersion($matches); - } -} diff --git a/vendor/phar-io/version/src/VersionConstraintParser.php b/vendor/phar-io/version/src/VersionConstraintParser.php deleted file mode 100644 index 03d6a095..00000000 --- a/vendor/phar-io/version/src/VersionConstraintParser.php +++ /dev/null @@ -1,115 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class VersionConstraintParser { - /** - * @throws UnsupportedVersionConstraintException - */ - public function parse(string $value): VersionConstraint { - if (\strpos($value, '|') !== false) { - return $this->handleOrGroup($value); - } - - if (!\preg_match('/^[\^~*]?v?[\d.*]+(?:-.*)?$/i', $value)) { - throw new UnsupportedVersionConstraintException( - \sprintf('Version constraint %s is not supported.', $value) - ); - } - - switch ($value[0]) { - case '~': - return $this->handleTildeOperator($value); - case '^': - return $this->handleCaretOperator($value); - } - - $constraint = new VersionConstraintValue($value); - - if ($constraint->getMajor()->isAny()) { - return new AnyVersionConstraint(); - } - - if ($constraint->getMinor()->isAny()) { - return new SpecificMajorVersionConstraint( - $constraint->getVersionString(), - $constraint->getMajor()->getValue() ?? 0 - ); - } - - if ($constraint->getPatch()->isAny()) { - return new SpecificMajorAndMinorVersionConstraint( - $constraint->getVersionString(), - $constraint->getMajor()->getValue() ?? 0, - $constraint->getMinor()->getValue() ?? 0 - ); - } - - return new ExactVersionConstraint($constraint->getVersionString()); - } - - private function handleOrGroup(string $value): OrVersionConstraintGroup { - $constraints = []; - - foreach (\preg_split('{\s*\|\|?\s*}', \trim($value)) as $groupSegment) { - $constraints[] = $this->parse(\trim($groupSegment)); - } - - return new OrVersionConstraintGroup($value, $constraints); - } - - private function handleTildeOperator(string $value): AndVersionConstraintGroup { - $constraintValue = new VersionConstraintValue(\substr($value, 1)); - - if ($constraintValue->getPatch()->isAny()) { - return $this->handleCaretOperator($value); - } - - $constraints = [ - new GreaterThanOrEqualToVersionConstraint( - $value, - new Version(\substr($value, 1)) - ), - new SpecificMajorAndMinorVersionConstraint( - $value, - $constraintValue->getMajor()->getValue() ?? 0, - $constraintValue->getMinor()->getValue() ?? 0 - ) - ]; - - return new AndVersionConstraintGroup($value, $constraints); - } - - private function handleCaretOperator(string $value): AndVersionConstraintGroup { - $constraintValue = new VersionConstraintValue(\substr($value, 1)); - - $constraints = [ - new GreaterThanOrEqualToVersionConstraint($value, new Version(\substr($value, 1))) - ]; - - if ($constraintValue->getMajor()->getValue() === 0) { - $constraints[] = new SpecificMajorAndMinorVersionConstraint( - $value, - $constraintValue->getMajor()->getValue() ?? 0, - $constraintValue->getMinor()->getValue() ?? 0 - ); - } else { - $constraints[] = new SpecificMajorVersionConstraint( - $value, - $constraintValue->getMajor()->getValue() ?? 0 - ); - } - - return new AndVersionConstraintGroup( - $value, - $constraints - ); - } -} diff --git a/vendor/phar-io/version/src/VersionConstraintValue.php b/vendor/phar-io/version/src/VersionConstraintValue.php deleted file mode 100644 index 0762e7c0..00000000 --- a/vendor/phar-io/version/src/VersionConstraintValue.php +++ /dev/null @@ -1,88 +0,0 @@ -versionString = $versionString; - - $this->parseVersion($versionString); - } - - public function getLabel(): string { - return $this->label; - } - - public function getBuildMetaData(): string { - return $this->buildMetaData; - } - - public function getVersionString(): string { - return $this->versionString; - } - - public function getMajor(): VersionNumber { - return $this->major; - } - - public function getMinor(): VersionNumber { - return $this->minor; - } - - public function getPatch(): VersionNumber { - return $this->patch; - } - - private function parseVersion(string $versionString): void { - $this->extractBuildMetaData($versionString); - $this->extractLabel($versionString); - $this->stripPotentialVPrefix($versionString); - - $versionSegments = \explode('.', $versionString); - $this->major = new VersionNumber(\is_numeric($versionSegments[0]) ? (int)$versionSegments[0] : null); - - $minorValue = isset($versionSegments[1]) && \is_numeric($versionSegments[1]) ? (int)$versionSegments[1] : null; - $patchValue = isset($versionSegments[2]) && \is_numeric($versionSegments[2]) ? (int)$versionSegments[2] : null; - - $this->minor = new VersionNumber($minorValue); - $this->patch = new VersionNumber($patchValue); - } - - private function extractBuildMetaData(string &$versionString): void { - if (\preg_match('/\+(.*)/', $versionString, $matches) === 1) { - $this->buildMetaData = $matches[1]; - $versionString = \str_replace($matches[0], '', $versionString); - } - } - - private function extractLabel(string &$versionString): void { - if (\preg_match('/-(.*)/', $versionString, $matches) === 1) { - $this->label = $matches[1]; - $versionString = \str_replace($matches[0], '', $versionString); - } - } - - private function stripPotentialVPrefix(string &$versionString): void { - if ($versionString[0] !== 'v') { - return; - } - $versionString = \substr($versionString, 1); - } -} diff --git a/vendor/phar-io/version/src/VersionNumber.php b/vendor/phar-io/version/src/VersionNumber.php deleted file mode 100644 index 4833a9b0..00000000 --- a/vendor/phar-io/version/src/VersionNumber.php +++ /dev/null @@ -1,28 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class VersionNumber { - - /** @var ?int */ - private $value; - - public function __construct(?int $value) { - $this->value = $value; - } - - public function isAny(): bool { - return $this->value === null; - } - - public function getValue(): ?int { - return $this->value; - } -} diff --git a/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php b/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php deleted file mode 100644 index 66201a14..00000000 --- a/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php +++ /dev/null @@ -1,23 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -abstract class AbstractVersionConstraint implements VersionConstraint { - /** @var string */ - private $originalValue; - - public function __construct(string $originalValue) { - $this->originalValue = $originalValue; - } - - public function asString(): string { - return $this->originalValue; - } -} diff --git a/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php deleted file mode 100644 index 5096f2fb..00000000 --- a/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php +++ /dev/null @@ -1,34 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class AndVersionConstraintGroup extends AbstractVersionConstraint { - /** @var VersionConstraint[] */ - private $constraints = []; - - /** - * @param VersionConstraint[] $constraints - */ - public function __construct(string $originalValue, array $constraints) { - parent::__construct($originalValue); - - $this->constraints = $constraints; - } - - public function complies(Version $version): bool { - foreach ($this->constraints as $constraint) { - if (!$constraint->complies($version)) { - return false; - } - } - - return true; - } -} diff --git a/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php b/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php deleted file mode 100644 index 1499f071..00000000 --- a/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php +++ /dev/null @@ -1,20 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class AnyVersionConstraint implements VersionConstraint { - public function complies(Version $version): bool { - return true; - } - - public function asString(): string { - return '*'; - } -} diff --git a/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php b/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php deleted file mode 100644 index 1d675c9c..00000000 --- a/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php +++ /dev/null @@ -1,22 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class ExactVersionConstraint extends AbstractVersionConstraint { - public function complies(Version $version): bool { - $other = $version->getVersionString(); - - if ($version->hasBuildMetaData()) { - $other .= '+' . $version->getBuildMetaData()->asString(); - } - - return $this->asString() === $other; - } -} diff --git a/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php b/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php deleted file mode 100644 index ec371723..00000000 --- a/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php +++ /dev/null @@ -1,26 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class GreaterThanOrEqualToVersionConstraint extends AbstractVersionConstraint { - /** @var Version */ - private $minimalVersion; - - public function __construct(string $originalValue, Version $minimalVersion) { - parent::__construct($originalValue); - - $this->minimalVersion = $minimalVersion; - } - - public function complies(Version $version): bool { - return $version->getVersionString() === $this->minimalVersion->getVersionString() - || $version->isGreaterThan($this->minimalVersion); - } -} diff --git a/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php deleted file mode 100644 index 59fd382f..00000000 --- a/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php +++ /dev/null @@ -1,35 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class OrVersionConstraintGroup extends AbstractVersionConstraint { - /** @var VersionConstraint[] */ - private $constraints = []; - - /** - * @param string $originalValue - * @param VersionConstraint[] $constraints - */ - public function __construct($originalValue, array $constraints) { - parent::__construct($originalValue); - - $this->constraints = $constraints; - } - - public function complies(Version $version): bool { - foreach ($this->constraints as $constraint) { - if ($constraint->complies($version)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php deleted file mode 100644 index 302aa311..00000000 --- a/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php +++ /dev/null @@ -1,33 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class SpecificMajorAndMinorVersionConstraint extends AbstractVersionConstraint { - /** @var int */ - private $major; - - /** @var int */ - private $minor; - - public function __construct(string $originalValue, int $major, int $minor) { - parent::__construct($originalValue); - - $this->major = $major; - $this->minor = $minor; - } - - public function complies(Version $version): bool { - if ($version->getMajor()->getValue() !== $this->major) { - return false; - } - - return $version->getMinor()->getValue() === $this->minor; - } -} diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php deleted file mode 100644 index 968b809c..00000000 --- a/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php +++ /dev/null @@ -1,25 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -class SpecificMajorVersionConstraint extends AbstractVersionConstraint { - /** @var int */ - private $major; - - public function __construct(string $originalValue, int $major) { - parent::__construct($originalValue); - - $this->major = $major; - } - - public function complies(Version $version): bool { - return $version->getMajor()->getValue() === $this->major; - } -} diff --git a/vendor/phar-io/version/src/constraints/VersionConstraint.php b/vendor/phar-io/version/src/constraints/VersionConstraint.php deleted file mode 100644 index e94f9e00..00000000 --- a/vendor/phar-io/version/src/constraints/VersionConstraint.php +++ /dev/null @@ -1,16 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -interface VersionConstraint { - public function complies(Version $version): bool; - - public function asString(): string; -} diff --git a/vendor/phar-io/version/src/exceptions/Exception.php b/vendor/phar-io/version/src/exceptions/Exception.php deleted file mode 100644 index 3ea458f3..00000000 --- a/vendor/phar-io/version/src/exceptions/Exception.php +++ /dev/null @@ -1,15 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -use Throwable; - -interface Exception extends Throwable { -} diff --git a/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php b/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php deleted file mode 100644 index bc0b0c3e..00000000 --- a/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php +++ /dev/null @@ -1,5 +0,0 @@ -, Sebastian Heuer , Sebastian Bergmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PharIo\Version; - -final class UnsupportedVersionConstraintException extends \RuntimeException implements Exception { -} diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-12.4.md b/vendor/phpunit/php-code-coverage/ChangeLog-12.4.md deleted file mode 100644 index 8ff3a6e1..00000000 --- a/vendor/phpunit/php-code-coverage/ChangeLog-12.4.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [12.4.0] - 2025-09-24 - -### Added - -* [#1095](https://github.com/sebastianbergmann/php-code-coverage/pull/1095): Support for light/dark mode in HTML report - -[12.4.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.8...main diff --git a/vendor/phpunit/php-code-coverage/LICENSE b/vendor/phpunit/php-code-coverage/LICENSE deleted file mode 100644 index 017eb48b..00000000 --- a/vendor/phpunit/php-code-coverage/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2009-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-code-coverage/README.md b/vendor/phpunit/php-code-coverage/README.md deleted file mode 100644 index f5d45272..00000000 --- a/vendor/phpunit/php-code-coverage/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# phpunit/php-code-coverage - -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-code-coverage/v)](https://packagist.org/packages/phpunit/php-code-coverage) -[![CI Status](https://github.com/sebastianbergmann/php-code-coverage/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-code-coverage/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/php-code-coverage/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-code-coverage) - -Provides collection, processing, and rendering functionality for PHP code coverage information. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require phpunit/php-code-coverage -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev phpunit/php-code-coverage -``` - -## Usage - -```php -includeFiles( - [ - '/path/to/file.php', - '/path/to/another_file.php', - ] -); - -$coverage = new CodeCoverage( - (new Selector)->forLineCoverage($filter), - $filter -); - -$coverage->start(''); - -// ... - -$coverage->stop(); - - -(new HtmlReport)->process($coverage, '/tmp/code-coverage-report'); -``` diff --git a/vendor/phpunit/php-code-coverage/SECURITY.md b/vendor/phpunit/php-code-coverage/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/phpunit/php-code-coverage/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json deleted file mode 100644 index 744507de..00000000 --- a/vendor/phpunit/php-code-coverage/composer.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "phpunit/php-code-coverage", - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "type": "library", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "prefer-stable": true, - "require": { - "php": ">=8.3", - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^5.6.1", - "phpunit/php-file-iterator": "^6.0", - "phpunit/php-text-template": "^5.0", - "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.0.3", - "sebastian/lines-of-code": "^4.0", - "sebastian/version": "^6.0", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.3.7" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "12.4.x-dev" - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php deleted file mode 100644 index ab9936ce..00000000 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ /dev/null @@ -1,672 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use function array_diff; -use function array_diff_key; -use function array_flip; -use function array_keys; -use function array_merge; -use function array_unique; -use function count; -use function explode; -use function is_file; -use function sort; -use ReflectionClass; -use SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData; -use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Node\Builder; -use SebastianBergmann\CodeCoverage\Node\Directory; -use SebastianBergmann\CodeCoverage\StaticAnalysis\CachingSourceAnalyser; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; -use SebastianBergmann\CodeCoverage\StaticAnalysis\ParsingSourceAnalyser; -use SebastianBergmann\CodeCoverage\Test\Target\MapBuilder; -use SebastianBergmann\CodeCoverage\Test\Target\Mapper; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollectionValidator; -use SebastianBergmann\CodeCoverage\Test\Target\ValidationResult; -use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize; -use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus; - -/** - * Provides collection functionality for PHP code coverage information. - * - * @phpstan-type TestType array{size: string, status: string} - * @phpstan-type TargetedLines array> - */ -final class CodeCoverage -{ - private const string UNCOVERED_FILES = 'UNCOVERED_FILES'; - private readonly Driver $driver; - private readonly Filter $filter; - private ?FileAnalyser $analyser = null; - private ?Mapper $targetMapper = null; - private ?string $cacheDirectory = null; - private bool $checkForUnintentionallyCoveredCode = false; - private bool $collectBranchAndPathCoverage = false; - private bool $includeUncoveredFiles = true; - private bool $ignoreDeprecatedCode = false; - private bool $useAnnotationsForIgnoringCode = true; - - /** - * @var list - */ - private array $parentClassesExcludedFromUnintentionallyCoveredCodeCheck = []; - private ?string $currentId = null; - private ?TestSize $currentSize = null; - private ProcessedCodeCoverageData $data; - - /** - * @var array - */ - private array $tests = []; - private ?Directory $cachedReport = null; - - public function __construct(Driver $driver, Filter $filter) - { - $this->driver = $driver; - $this->filter = $filter; - $this->data = new ProcessedCodeCoverageData; - } - - public function __serialize(): array - { - $prefix = "\x00" . self::class . "\x00"; - - return [ - // Configuration - $prefix . 'cacheDirectory' => $this->cacheDirectory, - $prefix . 'checkForUnintentionallyCoveredCode' => $this->checkForUnintentionallyCoveredCode, - $prefix . 'includeUncoveredFiles' => $this->includeUncoveredFiles, - $prefix . 'ignoreDeprecatedCode' => $this->ignoreDeprecatedCode, - $prefix . 'parentClassesExcludedFromUnintentionallyCoveredCodeCheck' => $this->parentClassesExcludedFromUnintentionallyCoveredCodeCheck, - $prefix . 'useAnnotationsForIgnoringCode' => $this->useAnnotationsForIgnoringCode, - $prefix . 'filter' => $this->filter, - - // Data - $prefix . 'data' => $this->data, - $prefix . 'tests' => $this->tests, - ]; - } - - /** - * Returns the code coverage information as a graph of node objects. - */ - public function getReport(): Directory - { - if ($this->cachedReport === null) { - $this->cachedReport = (new Builder($this->analyser()))->build($this); - } - - return $this->cachedReport; - } - - /** - * Clears collected code coverage data. - */ - public function clear(): void - { - $this->currentId = null; - $this->currentSize = null; - $this->data = new ProcessedCodeCoverageData; - $this->tests = []; - $this->cachedReport = null; - } - - /** - * @internal - */ - public function clearCache(): void - { - $this->cachedReport = null; - } - - /** - * Returns the filter object used. - */ - public function filter(): Filter - { - return $this->filter; - } - - /** - * Returns the collected code coverage data. - */ - public function getData(bool $raw = false): ProcessedCodeCoverageData - { - if (!$raw) { - if ($this->includeUncoveredFiles) { - $this->addUncoveredFilesFromFilter(); - } - } - - return $this->data; - } - - /** - * Sets the coverage data. - */ - public function setData(ProcessedCodeCoverageData $data): void - { - $this->data = $data; - } - - /** - * @return array - */ - public function getTests(): array - { - return $this->tests; - } - - /** - * @param array $tests - */ - public function setTests(array $tests): void - { - $this->tests = $tests; - } - - public function start(string $id, ?TestSize $size = null, bool $clear = false): void - { - if ($clear) { - $this->clear(); - } - - $this->currentId = $id; - $this->currentSize = $size; - - $this->driver->start(); - - $this->cachedReport = null; - } - - public function stop(bool $append = true, ?TestStatus $status = null, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): RawCodeCoverageData - { - $data = $this->driver->stop(); - - $this->append($data, null, $append, $status, $covers, $uses); - - $this->currentId = null; - $this->currentSize = null; - $this->cachedReport = null; - - return $data; - } - - /** - * @throws ReflectionException - * @throws TestIdMissingException - * @throws UnintentionallyCoveredCodeException - */ - public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): void - { - if ($id === null) { - $id = $this->currentId; - } - - if ($id === null) { - throw new TestIdMissingException; - } - - if ($status === null) { - $status = TestStatus::unknown(); - } - - if ($covers === null) { - $covers = TargetCollection::fromArray([]); - } - - if ($uses === null) { - $uses = TargetCollection::fromArray([]); - } - - $size = $this->currentSize; - - if ($size === null) { - $size = TestSize::unknown(); - } - - $this->cachedReport = null; - - $this->applyFilter($rawData); - - $this->applyExecutableLinesFilter($rawData); - - if ($this->useAnnotationsForIgnoringCode) { - $this->applyIgnoredLinesFilter($rawData); - } - - $this->data->initializeUnseenData($rawData); - - if (!$append) { - return; - } - - if ($id === self::UNCOVERED_FILES) { - return; - } - - $linesToBeCovered = false; - $linesToBeUsed = []; - - if ($covers !== false) { - $linesToBeCovered = $this->targetMapper()->mapTargets($covers); - } - - if ($linesToBeCovered !== false) { - $linesToBeUsed = $this->targetMapper()->mapTargets($uses); - } - - $this->applyCoversAndUsesFilter( - $rawData, - $linesToBeCovered, - $linesToBeUsed, - $size, - ); - - if ($rawData->lineCoverage() === []) { - return; - } - - $this->tests[$id] = [ - 'size' => $size->asString(), - 'status' => $status->asString(), - ]; - - $this->data->markCodeAsExecutedByTestCase($id, $rawData); - } - - /** - * Merges the data from another instance. - */ - public function merge(self $that): void - { - $this->filter->includeFiles( - $that->filter()->files(), - ); - - $this->data->merge($that->data); - - $this->tests = array_merge($this->tests, $that->getTests()); - - $this->cachedReport = null; - } - - public function enableCheckForUnintentionallyCoveredCode(): void - { - $this->checkForUnintentionallyCoveredCode = true; - } - - public function disableCheckForUnintentionallyCoveredCode(): void - { - $this->checkForUnintentionallyCoveredCode = false; - } - - public function includeUncoveredFiles(): void - { - $this->includeUncoveredFiles = true; - } - - public function excludeUncoveredFiles(): void - { - $this->includeUncoveredFiles = false; - } - - public function enableAnnotationsForIgnoringCode(): void - { - $this->useAnnotationsForIgnoringCode = true; - } - - public function disableAnnotationsForIgnoringCode(): void - { - $this->useAnnotationsForIgnoringCode = false; - } - - public function ignoreDeprecatedCode(): void - { - $this->ignoreDeprecatedCode = true; - } - - public function doNotIgnoreDeprecatedCode(): void - { - $this->ignoreDeprecatedCode = false; - } - - /** - * @phpstan-assert-if-true !null $this->cacheDirectory - */ - public function cachesStaticAnalysis(): bool - { - return $this->cacheDirectory !== null; - } - - public function cacheStaticAnalysis(string $directory): void - { - $this->cacheDirectory = $directory; - } - - public function doNotCacheStaticAnalysis(): void - { - $this->cacheDirectory = null; - } - - /** - * @throws StaticAnalysisCacheNotConfiguredException - */ - public function cacheDirectory(): string - { - if (!$this->cachesStaticAnalysis()) { - throw new StaticAnalysisCacheNotConfiguredException( - 'The static analysis cache is not configured', - ); - } - - return $this->cacheDirectory; - } - - /** - * @param class-string $className - */ - public function excludeSubclassesOfThisClassFromUnintentionallyCoveredCodeCheck(string $className): void - { - $this->parentClassesExcludedFromUnintentionallyCoveredCodeCheck[] = $className; - } - - public function enableBranchAndPathCoverage(): void - { - $this->driver->enableBranchAndPathCoverage(); - - $this->collectBranchAndPathCoverage = true; - } - - public function disableBranchAndPathCoverage(): void - { - $this->driver->disableBranchAndPathCoverage(); - - $this->collectBranchAndPathCoverage = false; - } - - public function collectsBranchAndPathCoverage(): bool - { - return $this->collectBranchAndPathCoverage; - } - - public function validate(TargetCollection $targets): ValidationResult - { - return (new TargetCollectionValidator)->validate($this->targetMapper(), $targets); - } - - /** - * @param false|TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * - * @throws ReflectionException - * @throws UnintentionallyCoveredCodeException - */ - private function applyCoversAndUsesFilter(RawCodeCoverageData $rawData, array|false $linesToBeCovered, array $linesToBeUsed, TestSize $size): void - { - if ($linesToBeCovered === false) { - $rawData->clear(); - - return; - } - - if ($linesToBeCovered === []) { - return; - } - - if ($this->checkForUnintentionallyCoveredCode && !$size->isMedium() && !$size->isLarge()) { - $this->performUnintentionallyCoveredCodeCheck($rawData, $linesToBeCovered, $linesToBeUsed); - } - - $rawLineData = $rawData->lineCoverage(); - $filesWithNoCoverage = array_diff_key($rawLineData, $linesToBeCovered); - - foreach (array_keys($filesWithNoCoverage) as $fileWithNoCoverage) { - $rawData->removeCoverageDataForFile($fileWithNoCoverage); - } - - foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) { - $rawData->keepLineCoverageDataOnlyForLines($fileToBeCovered, $includedLines); - $rawData->keepFunctionCoverageDataOnlyForLines($fileToBeCovered, $includedLines); - } - } - - private function applyFilter(RawCodeCoverageData $data): void - { - if (!$this->filter->isEmpty()) { - foreach (array_keys($data->lineCoverage()) as $filename) { - if ($this->filter->isExcluded($filename)) { - $data->removeCoverageDataForFile($filename); - } - } - } - - $data->skipEmptyLines(); - } - - private function applyExecutableLinesFilter(RawCodeCoverageData $data): void - { - foreach (array_keys($data->lineCoverage()) as $filename) { - if (!$this->filter->isFile($filename)) { - continue; - } - - $linesToBranchMap = $this->analyser()->analyse($filename)->executableLines(); - - $data->keepLineCoverageDataOnlyForLines( - $filename, - array_keys($linesToBranchMap), - ); - - $data->markExecutableLineByBranch( - $filename, - $linesToBranchMap, - ); - } - } - - private function applyIgnoredLinesFilter(RawCodeCoverageData $data): void - { - foreach (array_keys($data->lineCoverage()) as $filename) { - if (!$this->filter->isFile($filename)) { - continue; - } - - $data->removeCoverageDataForLines( - $filename, - $this->analyser()->analyse($filename)->ignoredLines(), - ); - } - } - - /** - * @throws UnintentionallyCoveredCodeException - */ - private function addUncoveredFilesFromFilter(): void - { - $uncoveredFiles = array_diff( - $this->filter->files(), - $this->data->coveredFiles(), - ); - - foreach ($uncoveredFiles as $uncoveredFile) { - if (is_file($uncoveredFile)) { - $this->append( - RawCodeCoverageData::fromUncoveredFile( - $uncoveredFile, - $this->analyser(), - ), - self::UNCOVERED_FILES, - ); - } - } - } - - /** - * @param TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * - * @throws ReflectionException - * @throws UnintentionallyCoveredCodeException - */ - private function performUnintentionallyCoveredCodeCheck(RawCodeCoverageData $data, array $linesToBeCovered, array $linesToBeUsed): void - { - $allowedLines = $this->getAllowedLines( - $linesToBeCovered, - $linesToBeUsed, - ); - - $unintentionallyCoveredUnits = []; - - foreach ($data->lineCoverage() as $file => $_data) { - foreach ($_data as $line => $flag) { - if ($flag === 1 && !isset($allowedLines[$file][$line])) { - $unintentionallyCoveredUnits[] = $this->targetMapper->lookup($file, $line); - } - } - } - - $unintentionallyCoveredUnits = $this->processUnintentionallyCoveredUnits($unintentionallyCoveredUnits); - - if ($unintentionallyCoveredUnits !== []) { - throw new UnintentionallyCoveredCodeException( - $unintentionallyCoveredUnits, - ); - } - } - - /** - * @param TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * - * @return TargetedLines - */ - private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed): array - { - $allowedLines = []; - - foreach (array_keys($linesToBeCovered) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = []; - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeCovered[$file], - ); - } - - foreach (array_keys($linesToBeUsed) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = []; - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeUsed[$file], - ); - } - - foreach (array_keys($allowedLines) as $file) { - $allowedLines[$file] = array_flip( - array_unique($allowedLines[$file]), - ); - } - - return $allowedLines; - } - - /** - * @param list $unintentionallyCoveredUnits - * - * @throws ReflectionException - * - * @return list - */ - private function processUnintentionallyCoveredUnits(array $unintentionallyCoveredUnits): array - { - $unintentionallyCoveredUnits = array_unique($unintentionallyCoveredUnits); - $processed = []; - - foreach ($unintentionallyCoveredUnits as $unintentionallyCoveredUnit) { - $tmp = explode('::', $unintentionallyCoveredUnit); - - if (count($tmp) !== 2) { - $processed[] = $unintentionallyCoveredUnit; - - continue; - } - - try { - $class = new ReflectionClass($tmp[0]); - - foreach ($this->parentClassesExcludedFromUnintentionallyCoveredCodeCheck as $parentClass) { - if ($class->isSubclassOf($parentClass)) { - continue 2; - } - } - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - $processed[] = $tmp[0]; - } - - $processed = array_unique($processed); - - sort($processed); - - return $processed; - } - - private function targetMapper(): Mapper - { - if ($this->targetMapper !== null) { - return $this->targetMapper; - } - - $this->targetMapper = new Mapper( - (new MapBuilder)->build($this->filter, $this->analyser()), - ); - - return $this->targetMapper; - } - - private function analyser(): FileAnalyser - { - if ($this->analyser !== null) { - return $this->analyser; - } - - $sourceAnalyser = new ParsingSourceAnalyser; - - if ($this->cachesStaticAnalysis()) { - $sourceAnalyser = new CachingSourceAnalyser( - $this->cacheDirectory, - $sourceAnalyser, - ); - } - - $this->analyser = new FileAnalyser( - $sourceAnalyser, - $this->useAnnotationsForIgnoringCode, - $this->ignoreDeprecatedCode, - ); - - return $this->analyser; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php b/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php deleted file mode 100644 index 57ccbb16..00000000 --- a/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Data; - -use function array_key_exists; -use function array_keys; -use function array_merge; -use function array_unique; -use function count; -use function is_array; -use function ksort; -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Driver\XdebugDriver; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type XdebugFunctionCoverageType from XdebugDriver - * - * @phpstan-type TestIdType string - * @phpstan-type FunctionCoverageDataType array{ - * branches: array, - * out: array, - * out_hit: array, - * }>, - * paths: array, - * hit: list, - * }>, - * hit: list - * } - * @phpstan-type FunctionCoverageType array> - */ -final class ProcessedCodeCoverageData -{ - /** - * Line coverage data. - * An array of filenames, each having an array of linenumbers, each executable line having an array of testcase ids. - * - * @var array>> - */ - private array $lineCoverage = []; - - /** - * Function coverage data. - * Maintains base format of raw data (@see https://xdebug.org/docs/code_coverage), but each 'hit' entry is an array - * of testcase ids. - * - * @var FunctionCoverageType - */ - private array $functionCoverage = []; - - public function initializeUnseenData(RawCodeCoverageData $rawData): void - { - foreach ($rawData->lineCoverage() as $file => $lines) { - if (!isset($this->lineCoverage[$file])) { - $this->lineCoverage[$file] = []; - - foreach ($lines as $k => $v) { - $this->lineCoverage[$file][$k] = $v === Driver::LINE_NOT_EXECUTABLE ? null : []; - } - } - } - - foreach ($rawData->functionCoverage() as $file => $functions) { - foreach ($functions as $functionName => $functionData) { - if (isset($this->functionCoverage[$file][$functionName])) { - $this->initPreviouslySeenFunction($file, $functionName, $functionData); - } else { - $this->initPreviouslyUnseenFunction($file, $functionName, $functionData); - } - } - } - } - - public function markCodeAsExecutedByTestCase(string $testCaseId, RawCodeCoverageData $executedCode): void - { - foreach ($executedCode->lineCoverage() as $file => $lines) { - foreach ($lines as $k => $v) { - if ($v === Driver::LINE_EXECUTED) { - $this->lineCoverage[$file][$k][] = $testCaseId; - } - } - } - - foreach ($executedCode->functionCoverage() as $file => $functions) { - foreach ($functions as $functionName => $functionData) { - foreach ($functionData['branches'] as $branchId => $branchData) { - if ($branchData['hit'] === Driver::BRANCH_HIT) { - $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'][] = $testCaseId; - } - } - - foreach ($functionData['paths'] as $pathId => $pathData) { - if ($pathData['hit'] === Driver::BRANCH_HIT) { - $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'][] = $testCaseId; - } - } - } - } - } - - public function setLineCoverage(array $lineCoverage): void - { - $this->lineCoverage = $lineCoverage; - } - - public function lineCoverage(): array - { - ksort($this->lineCoverage); - - return $this->lineCoverage; - } - - public function setFunctionCoverage(array $functionCoverage): void - { - $this->functionCoverage = $functionCoverage; - } - - public function functionCoverage(): array - { - ksort($this->functionCoverage); - - return $this->functionCoverage; - } - - public function coveredFiles(): array - { - ksort($this->lineCoverage); - - return array_keys($this->lineCoverage); - } - - public function renameFile(string $oldFile, string $newFile): void - { - $this->lineCoverage[$newFile] = $this->lineCoverage[$oldFile]; - - if (isset($this->functionCoverage[$oldFile])) { - $this->functionCoverage[$newFile] = $this->functionCoverage[$oldFile]; - } - - unset($this->lineCoverage[$oldFile], $this->functionCoverage[$oldFile]); - } - - public function merge(self $newData): void - { - foreach ($newData->lineCoverage as $file => $lines) { - if (!isset($this->lineCoverage[$file])) { - $this->lineCoverage[$file] = $lines; - - continue; - } - - // we should compare the lines if any of two contains data - $compareLineNumbers = array_unique( - array_merge( - array_keys($this->lineCoverage[$file]), - array_keys($newData->lineCoverage[$file]), - ), - ); - - foreach ($compareLineNumbers as $line) { - $thatPriority = $this->priorityForLine($newData->lineCoverage[$file], $line); - $thisPriority = $this->priorityForLine($this->lineCoverage[$file], $line); - - if ($thatPriority > $thisPriority) { - $this->lineCoverage[$file][$line] = $newData->lineCoverage[$file][$line]; - } elseif ($thatPriority === $thisPriority && is_array($this->lineCoverage[$file][$line])) { - $this->lineCoverage[$file][$line] = array_unique( - array_merge($this->lineCoverage[$file][$line], $newData->lineCoverage[$file][$line]), - ); - } - } - } - - foreach ($newData->functionCoverage as $file => $functions) { - if (!isset($this->functionCoverage[$file])) { - $this->functionCoverage[$file] = $functions; - - continue; - } - - foreach ($functions as $functionName => $functionData) { - if (isset($this->functionCoverage[$file][$functionName])) { - $this->initPreviouslySeenFunction($file, $functionName, $functionData); - } else { - $this->initPreviouslyUnseenFunction($file, $functionName, $functionData); - } - - foreach ($functionData['branches'] as $branchId => $branchData) { - $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = array_unique(array_merge($this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'], $branchData['hit'])); - } - - foreach ($functionData['paths'] as $pathId => $pathData) { - $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = array_unique(array_merge($this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'], $pathData['hit'])); - } - } - } - } - - /** - * Determine the priority for a line. - * - * 1 = the line is not set - * 2 = the line has not been tested - * 3 = the line is dead code - * 4 = the line has been tested - * - * During a merge, a higher number is better. - * - * @return 1|2|3|4 - */ - private function priorityForLine(array $data, int $line): int - { - if (!array_key_exists($line, $data)) { - return 1; - } - - if (is_array($data[$line]) && count($data[$line]) === 0) { - return 2; - } - - if ($data[$line] === null) { - return 3; - } - - return 4; - } - - /** - * For a function we have never seen before, copy all data over and simply init the 'hit' array. - * - * @param FunctionCoverageDataType|XdebugFunctionCoverageType $functionData - */ - private function initPreviouslyUnseenFunction(string $file, string $functionName, array $functionData): void - { - $this->functionCoverage[$file][$functionName] = $functionData; - - foreach (array_keys($functionData['branches']) as $branchId) { - $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = []; - } - - foreach (array_keys($functionData['paths']) as $pathId) { - $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = []; - } - } - - /** - * For a function we have seen before, only copy over and init the 'hit' array for any unseen branches and paths. - * Techniques such as mocking and where the contents of a file are different vary during tests (e.g. compiling - * containers) mean that the functions inside a file cannot be relied upon to be static. - * - * @param FunctionCoverageDataType|XdebugFunctionCoverageType $functionData - */ - private function initPreviouslySeenFunction(string $file, string $functionName, array $functionData): void - { - foreach ($functionData['branches'] as $branchId => $branchData) { - if (!isset($this->functionCoverage[$file][$functionName]['branches'][$branchId])) { - $this->functionCoverage[$file][$functionName]['branches'][$branchId] = $branchData; - $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = []; - } - } - - foreach ($functionData['paths'] as $pathId => $pathData) { - if (!isset($this->functionCoverage[$file][$functionName]['paths'][$pathId])) { - $this->functionCoverage[$file][$functionName]['paths'][$pathId] = $pathData; - $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = []; - } - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php b/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php deleted file mode 100644 index cbe7a9a3..00000000 --- a/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Data; - -use function array_diff; -use function array_diff_key; -use function array_flip; -use function array_intersect; -use function array_intersect_key; -use function array_map; -use function count; -use function explode; -use function file_get_contents; -use function in_array; -use function is_file; -use function preg_replace; -use function range; -use function str_ends_with; -use function str_starts_with; -use function trim; -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Driver\XdebugDriver; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type XdebugFunctionsCoverageType from XdebugDriver - * @phpstan-import-type XdebugCodeCoverageWithoutPathCoverageType from XdebugDriver - * @phpstan-import-type XdebugCodeCoverageWithPathCoverageType from XdebugDriver - */ -final class RawCodeCoverageData -{ - /** - * @var array> - */ - private static array $emptyLineCache = []; - - /** - * @var XdebugCodeCoverageWithoutPathCoverageType - */ - private array $lineCoverage; - - /** - * @var array - */ - private array $functionCoverage; - - /** - * @param XdebugCodeCoverageWithoutPathCoverageType $rawCoverage - */ - public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self - { - return new self($rawCoverage, []); - } - - /** - * @param XdebugCodeCoverageWithPathCoverageType $rawCoverage - */ - public static function fromXdebugWithPathCoverage(array $rawCoverage): self - { - $lineCoverage = []; - $functionCoverage = []; - - foreach ($rawCoverage as $file => $fileCoverageData) { - // Xdebug annotates the function name of traits, strip that off - foreach ($fileCoverageData['functions'] as $existingKey => $data) { - if (str_ends_with($existingKey, '}') && !str_starts_with($existingKey, '{')) { // don't want to catch {main} - $newKey = preg_replace('/\{.*}$/', '', $existingKey); - $fileCoverageData['functions'][$newKey] = $data; - unset($fileCoverageData['functions'][$existingKey]); - } - } - - $lineCoverage[$file] = $fileCoverageData['lines']; - $functionCoverage[$file] = $fileCoverageData['functions']; - } - - return new self($lineCoverage, $functionCoverage); - } - - public static function fromUncoveredFile(string $filename, FileAnalyser $analyser): self - { - $lineCoverage = array_map( - static fn (): int => Driver::LINE_NOT_EXECUTED, - $analyser->analyse($filename)->executableLines(), - ); - - return new self([$filename => $lineCoverage], []); - } - - /** - * @param XdebugCodeCoverageWithoutPathCoverageType $lineCoverage - * @param array $functionCoverage - */ - private function __construct(array $lineCoverage, array $functionCoverage) - { - $this->lineCoverage = $lineCoverage; - $this->functionCoverage = $functionCoverage; - } - - public function clear(): void - { - $this->lineCoverage = $this->functionCoverage = []; - } - - /** - * @return XdebugCodeCoverageWithoutPathCoverageType - */ - public function lineCoverage(): array - { - return $this->lineCoverage; - } - - /** - * @return array - */ - public function functionCoverage(): array - { - return $this->functionCoverage; - } - - public function removeCoverageDataForFile(string $filename): void - { - unset($this->lineCoverage[$filename], $this->functionCoverage[$filename]); - } - - /** - * @param int[] $lines - */ - public function keepLineCoverageDataOnlyForLines(string $filename, array $lines): void - { - if (!isset($this->lineCoverage[$filename])) { - return; - } - - $this->lineCoverage[$filename] = array_intersect_key( - $this->lineCoverage[$filename], - array_flip($lines), - ); - } - - /** - * @param int[] $linesToBranchMap - */ - public function markExecutableLineByBranch(string $filename, array $linesToBranchMap): void - { - if (!isset($this->lineCoverage[$filename])) { - return; - } - - $linesByBranch = []; - - foreach ($linesToBranchMap as $line => $branch) { - $linesByBranch[$branch][] = $line; - } - - foreach ($this->lineCoverage[$filename] as $line => $lineStatus) { - if (!isset($linesToBranchMap[$line])) { - continue; - } - - $branch = $linesToBranchMap[$line]; - - if (!isset($linesByBranch[$branch])) { - continue; - } - - foreach ($linesByBranch[$branch] as $lineInBranch) { - $this->lineCoverage[$filename][$lineInBranch] = $lineStatus; - } - - if (Driver::LINE_EXECUTED === $lineStatus) { - unset($linesByBranch[$branch]); - } - } - } - - /** - * @param int[] $lines - */ - public function keepFunctionCoverageDataOnlyForLines(string $filename, array $lines): void - { - if (!isset($this->functionCoverage[$filename])) { - return; - } - - foreach ($this->functionCoverage[$filename] as $functionName => $functionData) { - foreach ($functionData['branches'] as $branchId => $branch) { - if (count(array_diff(range($branch['line_start'], $branch['line_end']), $lines)) > 0) { - unset($this->functionCoverage[$filename][$functionName]['branches'][$branchId]); - - foreach ($functionData['paths'] as $pathId => $path) { - if (in_array($branchId, $path['path'], true)) { - unset($this->functionCoverage[$filename][$functionName]['paths'][$pathId]); - } - } - } - } - } - } - - /** - * @param int[] $lines - */ - public function removeCoverageDataForLines(string $filename, array $lines): void - { - if ($lines === []) { - return; - } - - if (!isset($this->lineCoverage[$filename])) { - return; - } - - $this->lineCoverage[$filename] = array_diff_key( - $this->lineCoverage[$filename], - array_flip($lines), - ); - - if (isset($this->functionCoverage[$filename])) { - foreach ($this->functionCoverage[$filename] as $functionName => $functionData) { - foreach ($functionData['branches'] as $branchId => $branch) { - if (count(array_intersect($lines, range($branch['line_start'], $branch['line_end']))) > 0) { - unset($this->functionCoverage[$filename][$functionName]['branches'][$branchId]); - - foreach ($functionData['paths'] as $pathId => $path) { - if (in_array($branchId, $path['path'], true)) { - unset($this->functionCoverage[$filename][$functionName]['paths'][$pathId]); - } - } - } - } - } - } - } - - /** - * At the end of a file, the PHP interpreter always sees an implicit return. Where this occurs in a file that has - * e.g. a class definition, that line cannot be invoked from a test and results in confusing coverage. This engine - * implementation detail therefore needs to be masked which is done here by simply ensuring that all empty lines - * are skipped over for coverage purposes. - * - * @see https://github.com/sebastianbergmann/php-code-coverage/issues/799 - */ - public function skipEmptyLines(): void - { - foreach ($this->lineCoverage as $filename => $coverage) { - foreach ($this->getEmptyLinesForFile($filename) as $emptyLine) { - unset($this->lineCoverage[$filename][$emptyLine]); - } - } - } - - /** - * @return array - */ - private function getEmptyLinesForFile(string $filename): array - { - if (!isset(self::$emptyLineCache[$filename])) { - self::$emptyLineCache[$filename] = []; - - if (is_file($filename)) { - $sourceLines = explode("\n", file_get_contents($filename)); - - foreach ($sourceLines as $line => $source) { - if (trim($source) === '') { - self::$emptyLineCache[$filename][] = ($line + 1); - } - } - } - } - - return self::$emptyLineCache[$filename]; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Driver.php b/vendor/phpunit/php-code-coverage/src/Driver/Driver.php deleted file mode 100644 index b839cca5..00000000 --- a/vendor/phpunit/php-code-coverage/src/Driver/Driver.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use function sprintf; -use SebastianBergmann\CodeCoverage\BranchAndPathCoverageNotSupportedException; -use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class Driver -{ - /** - * @see http://xdebug.org/docs/code_coverage - */ - public const int LINE_NOT_EXECUTABLE = -2; - - /** - * @see http://xdebug.org/docs/code_coverage - */ - public const int LINE_NOT_EXECUTED = -1; - - /** - * @see http://xdebug.org/docs/code_coverage - */ - public const int LINE_EXECUTED = 1; - - /** - * @see http://xdebug.org/docs/code_coverage - */ - public const int BRANCH_NOT_HIT = 0; - - /** - * @see http://xdebug.org/docs/code_coverage - */ - public const int BRANCH_HIT = 1; - private bool $collectBranchAndPathCoverage = false; - - public function canCollectBranchAndPathCoverage(): bool - { - return false; - } - - public function collectsBranchAndPathCoverage(): bool - { - return $this->collectBranchAndPathCoverage; - } - - /** - * @throws BranchAndPathCoverageNotSupportedException - */ - public function enableBranchAndPathCoverage(): void - { - if (!$this->canCollectBranchAndPathCoverage()) { - throw new BranchAndPathCoverageNotSupportedException( - sprintf( - '%s does not support branch and path coverage', - $this->nameAndVersion(), - ), - ); - } - - $this->collectBranchAndPathCoverage = true; - } - - public function disableBranchAndPathCoverage(): void - { - $this->collectBranchAndPathCoverage = false; - } - - abstract public function nameAndVersion(): string; - - abstract public function start(): void; - - abstract public function stop(): RawCodeCoverageData; -} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php b/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php deleted file mode 100644 index d7975efe..00000000 --- a/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use const pcov\inclusive; -use function array_intersect; -use function extension_loaded; -use function pcov\clear; -use function pcov\collect; -use function pcov\start; -use function pcov\stop; -use function pcov\waiting; -use function phpversion; -use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; -use SebastianBergmann\CodeCoverage\Filter; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class PcovDriver extends Driver -{ - private readonly Filter $filter; - - /** - * @throws PcovNotAvailableException - */ - public function __construct(Filter $filter) - { - $this->ensurePcovIsAvailable(); - - $this->filter = $filter; - } - - /** - * @codeCoverageIgnore - */ - public function start(): void - { - start(); - } - - public function stop(): RawCodeCoverageData - { - stop(); - - // @codeCoverageIgnoreStart - $filesToCollectCoverageFor = waiting(); - $collected = []; - - if ($filesToCollectCoverageFor !== []) { - if (!$this->filter->isEmpty()) { - $filesToCollectCoverageFor = array_intersect($filesToCollectCoverageFor, $this->filter->files()); - } - - $collected = collect(inclusive, $filesToCollectCoverageFor); - - clear(); - } - - return RawCodeCoverageData::fromXdebugWithoutPathCoverage($collected); - // @codeCoverageIgnoreEnd - } - - public function nameAndVersion(): string - { - return 'PCOV ' . phpversion('pcov'); - } - - /** - * @throws PcovNotAvailableException - */ - private function ensurePcovIsAvailable(): void - { - if (!extension_loaded('pcov')) { - throw new PcovNotAvailableException; - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Selector.php b/vendor/phpunit/php-code-coverage/src/Driver/Selector.php deleted file mode 100644 index 56ffbf80..00000000 --- a/vendor/phpunit/php-code-coverage/src/Driver/Selector.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use SebastianBergmann\CodeCoverage\Filter; -use SebastianBergmann\CodeCoverage\NoCodeCoverageDriverAvailableException; -use SebastianBergmann\CodeCoverage\NoCodeCoverageDriverWithPathCoverageSupportAvailableException; -use SebastianBergmann\Environment\Runtime; - -final class Selector -{ - /** - * @throws NoCodeCoverageDriverAvailableException - * @throws PcovNotAvailableException - * @throws XdebugNotAvailableException - * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException - */ - public function forLineCoverage(Filter $filter): Driver - { - $runtime = new Runtime; - - if ($runtime->hasPCOV()) { - return new PcovDriver($filter); - } - - if ($runtime->hasXdebug()) { - return new XdebugDriver($filter); - } - - throw new NoCodeCoverageDriverAvailableException; - } - - /** - * @throws NoCodeCoverageDriverWithPathCoverageSupportAvailableException - * @throws XdebugNotAvailableException - * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException - */ - public function forLineAndPathCoverage(Filter $filter): Driver - { - if ((new Runtime)->hasXdebug()) { - $driver = new XdebugDriver($filter); - - $driver->enableBranchAndPathCoverage(); - - return $driver; - } - - throw new NoCodeCoverageDriverWithPathCoverageSupportAvailableException; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php b/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php deleted file mode 100644 index 039df00d..00000000 --- a/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use const XDEBUG_CC_BRANCH_CHECK; -use const XDEBUG_CC_DEAD_CODE; -use const XDEBUG_CC_UNUSED; -use const XDEBUG_FILTER_CODE_COVERAGE; -use const XDEBUG_PATH_INCLUDE; -use function extension_loaded; -use function in_array; -use function phpversion; -use function version_compare; -use function xdebug_get_code_coverage; -use function xdebug_info; -use function xdebug_set_filter; -use function xdebug_start_code_coverage; -use function xdebug_stop_code_coverage; -use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; -use SebastianBergmann\CodeCoverage\Filter; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @see https://xdebug.org/docs/code_coverage#xdebug_get_code_coverage - * - * @phpstan-type XdebugLinesCoverageType array - * @phpstan-type XdebugBranchCoverageType array{ - * op_start: int, - * op_end: int, - * line_start: int, - * line_end: int, - * hit: int, - * out: array, - * out_hit: array, - * } - * @phpstan-type XdebugPathCoverageType array{ - * path: array, - * hit: int, - * } - * @phpstan-type XdebugFunctionCoverageType array{ - * branches: array, - * paths: array, - * } - * @phpstan-type XdebugFunctionsCoverageType array - * @phpstan-type XdebugPathAndBranchesCoverageType array{ - * lines: XdebugLinesCoverageType, - * functions: XdebugFunctionsCoverageType, - * } - * @phpstan-type XdebugCodeCoverageWithoutPathCoverageType array - * @phpstan-type XdebugCodeCoverageWithPathCoverageType array - */ -final class XdebugDriver extends Driver -{ - /** - * @throws XdebugNotAvailableException - * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException - */ - public function __construct(Filter $filter) - { - $this->ensureXdebugIsAvailable(); - - if (!$filter->isEmpty()) { - xdebug_set_filter( - XDEBUG_FILTER_CODE_COVERAGE, - XDEBUG_PATH_INCLUDE, - $filter->files(), - ); - } - } - - public function canCollectBranchAndPathCoverage(): bool - { - return true; - } - - public function start(): void - { - $flags = XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE; - - if ($this->collectsBranchAndPathCoverage()) { - $flags |= XDEBUG_CC_BRANCH_CHECK; - } - - xdebug_start_code_coverage($flags); - } - - public function stop(): RawCodeCoverageData - { - $data = xdebug_get_code_coverage(); - - xdebug_stop_code_coverage(); - - if ($this->collectsBranchAndPathCoverage()) { - /* @var XdebugCodeCoverageWithPathCoverageType $data */ - return RawCodeCoverageData::fromXdebugWithPathCoverage($data); - } - - /* @var XdebugCodeCoverageWithoutPathCoverageType $data */ - return RawCodeCoverageData::fromXdebugWithoutPathCoverage($data); - } - - public function nameAndVersion(): string - { - return 'Xdebug ' . phpversion('xdebug'); - } - - /** - * @throws XdebugNotAvailableException - * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException - */ - private function ensureXdebugIsAvailable(): void - { - if (!extension_loaded('xdebug')) { - throw new XdebugNotAvailableException; - } - - if (!version_compare(phpversion('xdebug'), '3.1', '>=')) { - throw new XdebugVersionNotSupportedException(phpversion('xdebug')); - } - - if (!in_array('coverage', xdebug_info('mode'), true)) { - throw new XdebugNotEnabledException; - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php b/vendor/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php deleted file mode 100644 index ab208919..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class BranchAndPathCoverageNotSupportedException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php b/vendor/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php deleted file mode 100644 index fdd9bfdf..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Util; - -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class DirectoryCouldNotBeCreatedException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/Exception.php b/vendor/phpunit/php-code-coverage/src/Exception/Exception.php deleted file mode 100644 index 28dc48b8..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php b/vendor/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php deleted file mode 100644 index db9cdac3..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class FileCouldNotBeWrittenException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php b/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 17e4b707..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -final class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php b/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php deleted file mode 100644 index 09139585..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function sprintf; -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class InvalidCodeCoverageTargetException extends RuntimeException implements Exception -{ - public function __construct(Target $target) - { - parent::__construct( - sprintf( - '%s is not a valid target for code coverage', - $target->description(), - ), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php b/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php deleted file mode 100644 index b1494e26..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class NoCodeCoverageDriverAvailableException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('No code coverage driver available'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php b/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php deleted file mode 100644 index 0065b740..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class NoCodeCoverageDriverWithPathCoverageSupportAvailableException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('No code coverage driver with path coverage support available'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/ParserException.php b/vendor/phpunit/php-code-coverage/src/Exception/ParserException.php deleted file mode 100644 index a907e34e..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/ParserException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class ParserException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php b/vendor/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php deleted file mode 100644 index fd6f80a7..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use function sprintf; -use RuntimeException; - -final class PathExistsButIsNotDirectoryException extends RuntimeException implements Exception -{ - public function __construct(string $path) - { - parent::__construct(sprintf('"%s" exists but is not a directory', $path)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php b/vendor/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php deleted file mode 100644 index 2f0a66e5..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class PcovNotAvailableException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('The PCOV extension is not available'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/ReflectionException.php b/vendor/phpunit/php-code-coverage/src/Exception/ReflectionException.php deleted file mode 100644 index 78db430b..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/ReflectionException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class ReflectionException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php b/vendor/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php deleted file mode 100644 index 0481f161..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class ReportAlreadyFinalizedException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('The code coverage report has already been finalized'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php b/vendor/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php deleted file mode 100644 index fd58fd6b..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class StaticAnalysisCacheNotConfiguredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php b/vendor/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php deleted file mode 100644 index 4cc3e0c2..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class TestIdMissingException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('Test ID is missing'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php b/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php deleted file mode 100644 index bb7d88c9..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class UnintentionallyCoveredCodeException extends RuntimeException implements Exception -{ - /** - * @var list - */ - private readonly array $unintentionallyCoveredUnits; - - /** - * @param list $unintentionallyCoveredUnits - */ - public function __construct(array $unintentionallyCoveredUnits) - { - $this->unintentionallyCoveredUnits = $unintentionallyCoveredUnits; - - parent::__construct($this->toString()); - } - - /** - * @return list - */ - public function getUnintentionallyCoveredUnits(): array - { - return $this->unintentionallyCoveredUnits; - } - - private function toString(): string - { - $message = ''; - - foreach ($this->unintentionallyCoveredUnits as $unit) { - $message .= '- ' . $unit . "\n"; - } - - return $message; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php b/vendor/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php deleted file mode 100644 index c6b5e516..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use function sprintf; -use RuntimeException; - -final class WriteOperationFailedException extends RuntimeException implements Exception -{ - public function __construct(string $path) - { - parent::__construct(sprintf('Cannot write to "%s"', $path)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php b/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php deleted file mode 100644 index 1622c5a6..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class XdebugNotAvailableException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('The Xdebug extension is not available'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php b/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php deleted file mode 100644 index a8df4645..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class XdebugNotEnabledException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('XDEBUG_MODE=coverage (environment variable) or xdebug.mode=coverage (PHP configuration setting) has to be set'); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php b/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php deleted file mode 100644 index c785af14..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use function sprintf; -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class XdebugVersionNotSupportedException extends RuntimeException implements Exception -{ - /** - * @param non-empty-string $version - */ - public function __construct(string $version) - { - parent::__construct( - sprintf( - 'Version %s of the Xdebug extension is not supported', - $version, - ), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/XmlException.php b/vendor/phpunit/php-code-coverage/src/Exception/XmlException.php deleted file mode 100644 index 31e4623d..00000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/XmlException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use RuntimeException; - -final class XmlException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Filter.php b/vendor/phpunit/php-code-coverage/src/Filter.php deleted file mode 100644 index f9086542..00000000 --- a/vendor/phpunit/php-code-coverage/src/Filter.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use function array_keys; -use function is_file; -use function realpath; -use function str_contains; -use function str_starts_with; - -final class Filter -{ - /** - * @var array - */ - private array $files = []; - - /** - * @var array - */ - private array $isFileCache = []; - - /** - * @param list $filenames - */ - public function includeFiles(array $filenames): void - { - foreach ($filenames as $filename) { - $this->includeFile($filename); - } - } - - public function includeFile(string $filename): void - { - $filename = realpath($filename); - - if (!$filename) { - return; - } - - $this->files[$filename] = true; - } - - public function isFile(string $filename): bool - { - if (isset($this->isFileCache[$filename])) { - return $this->isFileCache[$filename]; - } - - if ($filename === '-' || - str_starts_with($filename, 'vfs://') || - str_contains($filename, 'xdebug://debug-eval') || - str_contains($filename, 'eval()\'d code') || - str_contains($filename, 'runtime-created function') || - str_contains($filename, 'runkit created function') || - str_contains($filename, 'assert code') || - str_contains($filename, 'regexp code') || - str_contains($filename, 'Standard input code')) { - $isFile = false; - } else { - $isFile = is_file($filename); - } - - $this->isFileCache[$filename] = $isFile; - - return $isFile; - } - - public function isExcluded(string $filename): bool - { - return !isset($this->files[$filename]) || !$this->isFile($filename); - } - - /** - * @return list - */ - public function files(): array - { - return array_keys($this->files); - } - - public function isEmpty(): bool - { - return $this->files === []; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php deleted file mode 100644 index 7e82a3da..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php +++ /dev/null @@ -1,275 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use const DIRECTORY_SEPARATOR; -use function array_merge; -use function str_ends_with; -use function str_replace; -use function substr; -use Countable; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; -use SebastianBergmann\CodeCoverage\Util\Percentage; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File - */ -abstract class AbstractNode implements Countable -{ - private readonly string $name; - private string $pathAsString; - - /** - * @var non-empty-list - */ - private array $pathAsArray; - private readonly ?AbstractNode $parent; - private string $id; - - public function __construct(string $name, ?self $parent = null) - { - if (str_ends_with($name, DIRECTORY_SEPARATOR)) { - $name = substr($name, 0, -1); - } - - $this->name = $name; - $this->parent = $parent; - - $this->processId(); - $this->processPath(); - } - - public function name(): string - { - return $this->name; - } - - public function id(): string - { - return $this->id; - } - - public function pathAsString(): string - { - return $this->pathAsString; - } - - /** - * @return non-empty-list - */ - public function pathAsArray(): array - { - return $this->pathAsArray; - } - - public function parent(): ?self - { - return $this->parent; - } - - public function percentageOfTestedClasses(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedClasses(), - $this->numberOfClasses(), - ); - } - - public function percentageOfTestedTraits(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedTraits(), - $this->numberOfTraits(), - ); - } - - public function percentageOfTestedClassesAndTraits(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedClassesAndTraits(), - $this->numberOfClassesAndTraits(), - ); - } - - public function percentageOfTestedFunctions(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedFunctions(), - $this->numberOfFunctions(), - ); - } - - public function percentageOfTestedMethods(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedMethods(), - $this->numberOfMethods(), - ); - } - - public function percentageOfTestedFunctionsAndMethods(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfTestedFunctionsAndMethods(), - $this->numberOfFunctionsAndMethods(), - ); - } - - public function percentageOfExecutedLines(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfExecutedLines(), - $this->numberOfExecutableLines(), - ); - } - - public function percentageOfExecutedBranches(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfExecutedBranches(), - $this->numberOfExecutableBranches(), - ); - } - - public function percentageOfExecutedPaths(): Percentage - { - return Percentage::fromFractionAndTotal( - $this->numberOfExecutedPaths(), - $this->numberOfExecutablePaths(), - ); - } - - public function numberOfClassesAndTraits(): int - { - return $this->numberOfClasses() + $this->numberOfTraits(); - } - - public function numberOfTestedClassesAndTraits(): int - { - return $this->numberOfTestedClasses() + $this->numberOfTestedTraits(); - } - - /** - * @return array - */ - public function classesAndTraits(): array - { - return array_merge($this->classes(), $this->traits()); - } - - public function numberOfFunctionsAndMethods(): int - { - return $this->numberOfFunctions() + $this->numberOfMethods(); - } - - public function numberOfTestedFunctionsAndMethods(): int - { - return $this->numberOfTestedFunctions() + $this->numberOfTestedMethods(); - } - - /** - * @return non-negative-int - */ - public function cyclomaticComplexity(): int - { - $ccn = 0; - - foreach ($this->classesAndTraits() as $classLike) { - $ccn += $classLike['ccn']; - } - - foreach ($this->functions() as $function) { - $ccn += $function['ccn']; - } - - return $ccn; - } - - /** - * @return array - */ - abstract public function classes(): array; - - /** - * @return array - */ - abstract public function traits(): array; - - /** - * @return array - */ - abstract public function functions(): array; - - abstract public function linesOfCode(): LinesOfCode; - - abstract public function numberOfExecutableLines(): int; - - abstract public function numberOfExecutedLines(): int; - - abstract public function numberOfExecutableBranches(): int; - - abstract public function numberOfExecutedBranches(): int; - - abstract public function numberOfExecutablePaths(): int; - - abstract public function numberOfExecutedPaths(): int; - - abstract public function numberOfClasses(): int; - - abstract public function numberOfTestedClasses(): int; - - abstract public function numberOfTraits(): int; - - abstract public function numberOfTestedTraits(): int; - - abstract public function numberOfMethods(): int; - - abstract public function numberOfTestedMethods(): int; - - abstract public function numberOfFunctions(): int; - - abstract public function numberOfTestedFunctions(): int; - - private function processId(): void - { - if ($this->parent === null) { - $this->id = 'index'; - - return; - } - - $parentId = $this->parent->id(); - - if ($parentId === 'index') { - $this->id = str_replace(':', '_', $this->name); - } else { - $this->id = $parentId . '/' . $this->name; - } - } - - private function processPath(): void - { - if ($this->parent === null) { - $this->pathAsArray = [$this]; - $this->pathAsString = $this->name; - - return; - } - - $this->pathAsArray = $this->parent->pathAsArray(); - $this->pathAsString = $this->parent->pathAsString() . DIRECTORY_SEPARATOR . $this->name; - - $this->pathAsArray[] = $this; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Builder.php b/vendor/phpunit/php-code-coverage/src/Node/Builder.php deleted file mode 100644 index 19fc3a24..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/Builder.php +++ /dev/null @@ -1,272 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use const DIRECTORY_SEPARATOR; -use function array_shift; -use function basename; -use function count; -use function dirname; -use function explode; -use function implode; -use function is_file; -use function str_ends_with; -use function str_replace; -use function str_starts_with; -use function substr; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type TestType from CodeCoverage - */ -final readonly class Builder -{ - private FileAnalyser $analyser; - - public function __construct(FileAnalyser $analyser) - { - $this->analyser = $analyser; - } - - public function build(CodeCoverage $coverage): Directory - { - $data = clone $coverage->getData(); // clone because path munging is destructive to the original data - $commonPath = $this->reducePaths($data); - $root = new Directory( - $commonPath, - null, - ); - - $this->addItems( - $root, - $this->buildDirectoryStructure($data), - $coverage->getTests(), - ); - - return $root; - } - - /** - * @param array $tests - */ - private function addItems(Directory $root, array $items, array $tests): void - { - foreach ($items as $key => $value) { - $key = (string) $key; - - if (str_ends_with($key, '/f')) { - $key = substr($key, 0, -2); - $filename = $root->pathAsString() . DIRECTORY_SEPARATOR . $key; - - if (is_file($filename)) { - $analysisResult = $this->analyser->analyse($filename); - - $root->addFile( - new File( - $key, - $root, - $value['lineCoverage'], - $value['functionCoverage'], - $tests, - $analysisResult->classes(), - $analysisResult->traits(), - $analysisResult->functions(), - $analysisResult->linesOfCode(), - ), - ); - } - } else { - $child = $root->addDirectory($key); - - $this->addItems($child, $value, $tests); - } - } - } - - /** - * Builds an array representation of the directory structure. - * - * For instance, - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is transformed into - * - * - * Array - * ( - * [.] => Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * ) - * - * - * @return array, functionCoverage: array>}>> - */ - private function buildDirectoryStructure(ProcessedCodeCoverageData $data): array - { - $result = []; - - foreach ($data->coveredFiles() as $originalPath) { - $path = explode(DIRECTORY_SEPARATOR, $originalPath); - $pointer = &$result; - $max = count($path); - - for ($i = 0; $i < $max; $i++) { - $type = ''; - - if ($i === ($max - 1)) { - $type = '/f'; - } - - $pointer = &$pointer[$path[$i] . $type]; - } - - $pointer = [ - 'lineCoverage' => $data->lineCoverage()[$originalPath] ?? [], - 'functionCoverage' => $data->functionCoverage()[$originalPath] ?? [], - ]; - } - - return $result; - } - - /** - * Reduces the paths by cutting the longest common start path. - * - * For instance, - * - * - * Array - * ( - * [/home/sb/Money/Money.php] => Array - * ( - * ... - * ) - * - * [/home/sb/Money/MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is reduced to - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - */ - private function reducePaths(ProcessedCodeCoverageData $coverage): string - { - if ($coverage->coveredFiles() === []) { - return '.'; - } - - $commonPath = ''; - $paths = $coverage->coveredFiles(); - - if (count($paths) === 1) { - $commonPath = dirname($paths[0]) . DIRECTORY_SEPARATOR; - $coverage->renameFile($paths[0], basename($paths[0])); - - return $commonPath; - } - - $max = count($paths); - - for ($i = 0; $i < $max; $i++) { - // strip phar:// prefixes - if (str_starts_with($paths[$i], 'phar://')) { - $paths[$i] = substr($paths[$i], 7); - $paths[$i] = str_replace('/', DIRECTORY_SEPARATOR, $paths[$i]); - } - - $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); - - if ($paths[$i][0] === '') { - $paths[$i][0] = DIRECTORY_SEPARATOR; - } - } - - $done = false; - $max = count($paths); - - while (!$done) { - for ($i = 0; $i < $max - 1; $i++) { - if (!isset($paths[$i][0]) || - !isset($paths[$i + 1][0]) || - $paths[$i][0] !== $paths[$i + 1][0]) { - $done = true; - - break; - } - } - - if (!$done) { - $commonPath .= $paths[0][0]; - - if ($paths[0][0] !== DIRECTORY_SEPARATOR) { - $commonPath .= DIRECTORY_SEPARATOR; - } - - for ($i = 0; $i < $max; $i++) { - array_shift($paths[$i]); - } - } - } - - $original = $coverage->coveredFiles(); - $max = count($original); - - for ($i = 0; $i < $max; $i++) { - $coverage->renameFile($original[$i], implode(DIRECTORY_SEPARATOR, $paths[$i])); - } - - return substr($commonPath, 0, -1); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php b/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php deleted file mode 100644 index a07a5504..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use function sprintf; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class CrapIndex -{ - private int $cyclomaticComplexity; - private float $codeCoverage; - - public function __construct(int $cyclomaticComplexity, float $codeCoverage) - { - $this->cyclomaticComplexity = $cyclomaticComplexity; - $this->codeCoverage = $codeCoverage; - } - - public function asString(): string - { - if ($this->codeCoverage === 0.0) { - return (string) ($this->cyclomaticComplexity ** 2 + $this->cyclomaticComplexity); - } - - if ($this->codeCoverage >= 95) { - return (string) $this->cyclomaticComplexity; - } - - return sprintf( - '%01.2F', - $this->cyclomaticComplexity ** 2 * (1 - $this->codeCoverage / 100) ** 3 + $this->cyclomaticComplexity, - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Directory.php b/vendor/phpunit/php-code-coverage/src/Node/Directory.php deleted file mode 100644 index 2802f93a..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/Directory.php +++ /dev/null @@ -1,404 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use function array_merge; -use function assert; -use function count; -use IteratorAggregate; -use RecursiveIteratorIterator; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; - -/** - * @template-implements IteratorAggregate - * - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends AbstractNode implements IteratorAggregate -{ - /** - * @var list - */ - private array $children = []; - - /** - * @var list - */ - private array $directories = []; - - /** - * @var list - */ - private array $files = []; - - /** - * @var ?array - */ - private ?array $classes = null; - - /** - * @var ?array - */ - private ?array $traits = null; - - /** - * @var ?array - */ - private ?array $functions = null; - private ?LinesOfCode $linesOfCode = null; - private int $numFiles = -1; - private int $numExecutableLines = -1; - private int $numExecutedLines = -1; - private int $numExecutableBranches = -1; - private int $numExecutedBranches = -1; - private int $numExecutablePaths = -1; - private int $numExecutedPaths = -1; - private int $numClasses = -1; - private int $numTestedClasses = -1; - private int $numTraits = -1; - private int $numTestedTraits = -1; - private int $numMethods = -1; - private int $numTestedMethods = -1; - private int $numFunctions = -1; - private int $numTestedFunctions = -1; - - public function count(): int - { - if ($this->numFiles === -1) { - $this->numFiles = 0; - - foreach ($this->children as $child) { - $this->numFiles += count($child); - } - } - - return $this->numFiles; - } - - /** - * @return RecursiveIteratorIterator> - */ - public function getIterator(): RecursiveIteratorIterator - { - return new RecursiveIteratorIterator( - new Iterator($this), - RecursiveIteratorIterator::SELF_FIRST, - ); - } - - public function addDirectory(string $name): self - { - $directory = new self($name, $this); - - assert($directory instanceof self); - - $this->children[] = $directory; - $this->directories[] = &$this->children[count($this->children) - 1]; - - return $directory; - } - - public function addFile(File $file): void - { - $this->children[] = $file; - $this->files[] = &$this->children[count($this->children) - 1]; - - $this->numExecutableLines = -1; - $this->numExecutedLines = -1; - } - - /** - * @return list - */ - public function directories(): array - { - return $this->directories; - } - - /** - * @return list - */ - public function files(): array - { - return $this->files; - } - - /** - * @return list - */ - public function children(): array - { - return $this->children; - } - - /** - * @return array - */ - public function classes(): array - { - if ($this->classes === null) { - $this->classes = []; - - foreach ($this->children as $child) { - $this->classes = array_merge( - $this->classes, - $child->classes(), - ); - } - } - - return $this->classes; - } - - /** - * @return array - */ - public function traits(): array - { - if ($this->traits === null) { - $this->traits = []; - - foreach ($this->children as $child) { - $this->traits = array_merge( - $this->traits, - $child->traits(), - ); - } - } - - return $this->traits; - } - - /** - * @return array - */ - public function functions(): array - { - if ($this->functions === null) { - $this->functions = []; - - foreach ($this->children as $child) { - $this->functions = array_merge( - $this->functions, - $child->functions(), - ); - } - } - - return $this->functions; - } - - public function linesOfCode(): LinesOfCode - { - if ($this->linesOfCode === null) { - $linesOfCode = 0; - $commentLinesOfCode = 0; - $nonCommentLinesOfCode = 0; - - foreach ($this->children as $child) { - $childLinesOfCode = $child->linesOfCode(); - - $linesOfCode += $childLinesOfCode->linesOfCode(); - $commentLinesOfCode += $childLinesOfCode->commentLinesOfCode(); - $nonCommentLinesOfCode += $childLinesOfCode->nonCommentLinesOfCode(); - } - - $this->linesOfCode = new LinesOfCode($linesOfCode, $commentLinesOfCode, $nonCommentLinesOfCode); - } - - return $this->linesOfCode; - } - - public function numberOfExecutableLines(): int - { - if ($this->numExecutableLines === -1) { - $this->numExecutableLines = 0; - - foreach ($this->children as $child) { - $this->numExecutableLines += $child->numberOfExecutableLines(); - } - } - - return $this->numExecutableLines; - } - - public function numberOfExecutedLines(): int - { - if ($this->numExecutedLines === -1) { - $this->numExecutedLines = 0; - - foreach ($this->children as $child) { - $this->numExecutedLines += $child->numberOfExecutedLines(); - } - } - - return $this->numExecutedLines; - } - - public function numberOfExecutableBranches(): int - { - if ($this->numExecutableBranches === -1) { - $this->numExecutableBranches = 0; - - foreach ($this->children as $child) { - $this->numExecutableBranches += $child->numberOfExecutableBranches(); - } - } - - return $this->numExecutableBranches; - } - - public function numberOfExecutedBranches(): int - { - if ($this->numExecutedBranches === -1) { - $this->numExecutedBranches = 0; - - foreach ($this->children as $child) { - $this->numExecutedBranches += $child->numberOfExecutedBranches(); - } - } - - return $this->numExecutedBranches; - } - - public function numberOfExecutablePaths(): int - { - if ($this->numExecutablePaths === -1) { - $this->numExecutablePaths = 0; - - foreach ($this->children as $child) { - $this->numExecutablePaths += $child->numberOfExecutablePaths(); - } - } - - return $this->numExecutablePaths; - } - - public function numberOfExecutedPaths(): int - { - if ($this->numExecutedPaths === -1) { - $this->numExecutedPaths = 0; - - foreach ($this->children as $child) { - $this->numExecutedPaths += $child->numberOfExecutedPaths(); - } - } - - return $this->numExecutedPaths; - } - - public function numberOfClasses(): int - { - if ($this->numClasses === -1) { - $this->numClasses = 0; - - foreach ($this->children as $child) { - $this->numClasses += $child->numberOfClasses(); - } - } - - return $this->numClasses; - } - - public function numberOfTestedClasses(): int - { - if ($this->numTestedClasses === -1) { - $this->numTestedClasses = 0; - - foreach ($this->children as $child) { - $this->numTestedClasses += $child->numberOfTestedClasses(); - } - } - - return $this->numTestedClasses; - } - - public function numberOfTraits(): int - { - if ($this->numTraits === -1) { - $this->numTraits = 0; - - foreach ($this->children as $child) { - $this->numTraits += $child->numberOfTraits(); - } - } - - return $this->numTraits; - } - - public function numberOfTestedTraits(): int - { - if ($this->numTestedTraits === -1) { - $this->numTestedTraits = 0; - - foreach ($this->children as $child) { - $this->numTestedTraits += $child->numberOfTestedTraits(); - } - } - - return $this->numTestedTraits; - } - - public function numberOfMethods(): int - { - if ($this->numMethods === -1) { - $this->numMethods = 0; - - foreach ($this->children as $child) { - $this->numMethods += $child->numberOfMethods(); - } - } - - return $this->numMethods; - } - - public function numberOfTestedMethods(): int - { - if ($this->numTestedMethods === -1) { - $this->numTestedMethods = 0; - - foreach ($this->children as $child) { - $this->numTestedMethods += $child->numberOfTestedMethods(); - } - } - - return $this->numTestedMethods; - } - - public function numberOfFunctions(): int - { - if ($this->numFunctions === -1) { - $this->numFunctions = 0; - - foreach ($this->children as $child) { - $this->numFunctions += $child->numberOfFunctions(); - } - } - - return $this->numFunctions; - } - - public function numberOfTestedFunctions(): int - { - if ($this->numTestedFunctions === -1) { - $this->numTestedFunctions = 0; - - foreach ($this->children as $child) { - $this->numTestedFunctions += $child->numberOfTestedFunctions(); - } - } - - return $this->numTestedFunctions; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/File.php b/vendor/phpunit/php-code-coverage/src/Node/File.php deleted file mode 100644 index 54ee70b4..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/File.php +++ /dev/null @@ -1,701 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use function array_filter; -use function count; -use function range; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\StaticAnalysis\AnalysisResult; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Class_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Function_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Method; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type TestType from CodeCoverage - * @phpstan-import-type LinesType from AnalysisResult - * - * @phpstan-type ProcessedFunctionType array{ - * functionName: string, - * namespace: string, - * signature: string, - * startLine: int, - * endLine: int, - * executableLines: int, - * executedLines: int, - * executableBranches: int, - * executedBranches: int, - * executablePaths: int, - * executedPaths: int, - * ccn: int, - * coverage: int|float, - * crap: int|string, - * link: string - * } - * @phpstan-type ProcessedMethodType array{ - * methodName: string, - * visibility: string, - * signature: string, - * startLine: int, - * endLine: int, - * executableLines: int, - * executedLines: int, - * executableBranches: int, - * executedBranches: int, - * executablePaths: int, - * executedPaths: int, - * ccn: int, - * coverage: float|int, - * crap: int|string, - * link: string - * } - * @phpstan-type ProcessedClassType array{ - * className: string, - * namespace: string, - * methods: array, - * startLine: int, - * executableLines: int, - * executedLines: int, - * executableBranches: int, - * executedBranches: int, - * executablePaths: int, - * executedPaths: int, - * ccn: int, - * coverage: int|float, - * crap: int|string, - * link: string - * } - * @phpstan-type ProcessedTraitType array{ - * traitName: string, - * namespace: string, - * methods: array, - * startLine: int, - * executableLines: int, - * executedLines: int, - * executableBranches: int, - * executedBranches: int, - * executablePaths: int, - * executedPaths: int, - * ccn: int, - * coverage: float|int, - * crap: int|string, - * link: string - * } - */ -final class File extends AbstractNode -{ - /** - * @var array> - */ - private array $lineCoverageData; - private array $functionCoverageData; - - /** - * @var array - */ - private readonly array $testData; - private int $numExecutableLines = 0; - private int $numExecutedLines = 0; - private int $numExecutableBranches = 0; - private int $numExecutedBranches = 0; - private int $numExecutablePaths = 0; - private int $numExecutedPaths = 0; - - /** - * @var array - */ - private array $classes = []; - - /** - * @var array - */ - private array $traits = []; - - /** - * @var array - */ - private array $functions = []; - private readonly LinesOfCode $linesOfCode; - private ?int $numClasses = null; - private int $numTestedClasses = 0; - private ?int $numTraits = null; - private int $numTestedTraits = 0; - private ?int $numMethods = null; - private ?int $numTestedMethods = null; - private ?int $numTestedFunctions = null; - - /** - * @var array - */ - private array $codeUnitsByLine = []; - - /** - * @param array> $lineCoverageData - * @param array $testData - * @param array $classes - * @param array $traits - * @param array $functions - */ - public function __construct(string $name, AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, LinesOfCode $linesOfCode) - { - parent::__construct($name, $parent); - - $this->lineCoverageData = $lineCoverageData; - $this->functionCoverageData = $functionCoverageData; - $this->testData = $testData; - $this->linesOfCode = $linesOfCode; - - $this->calculateStatistics($classes, $traits, $functions); - } - - public function count(): int - { - return 1; - } - - /** - * @return array> - */ - public function lineCoverageData(): array - { - return $this->lineCoverageData; - } - - public function functionCoverageData(): array - { - return $this->functionCoverageData; - } - - /** - * @return array - */ - public function testData(): array - { - return $this->testData; - } - - /** - * @return array - */ - public function classes(): array - { - return $this->classes; - } - - /** - * @return array - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function functions(): array - { - return $this->functions; - } - - public function linesOfCode(): LinesOfCode - { - return $this->linesOfCode; - } - - public function numberOfExecutableLines(): int - { - return $this->numExecutableLines; - } - - public function numberOfExecutedLines(): int - { - return $this->numExecutedLines; - } - - public function numberOfExecutableBranches(): int - { - return $this->numExecutableBranches; - } - - public function numberOfExecutedBranches(): int - { - return $this->numExecutedBranches; - } - - public function numberOfExecutablePaths(): int - { - return $this->numExecutablePaths; - } - - public function numberOfExecutedPaths(): int - { - return $this->numExecutedPaths; - } - - public function numberOfClasses(): int - { - if ($this->numClasses === null) { - $this->numClasses = 0; - - foreach ($this->classes as $class) { - foreach ($class['methods'] as $method) { - if ($method['executableLines'] > 0) { - $this->numClasses++; - - continue 2; - } - } - } - } - - return $this->numClasses; - } - - public function numberOfTestedClasses(): int - { - return $this->numTestedClasses; - } - - public function numberOfTraits(): int - { - if ($this->numTraits === null) { - $this->numTraits = 0; - - foreach ($this->traits as $trait) { - foreach ($trait['methods'] as $method) { - if ($method['executableLines'] > 0) { - $this->numTraits++; - - continue 2; - } - } - } - } - - return $this->numTraits; - } - - public function numberOfTestedTraits(): int - { - return $this->numTestedTraits; - } - - public function numberOfMethods(): int - { - if ($this->numMethods === null) { - $this->numMethods = 0; - - foreach ($this->classes as $class) { - foreach ($class['methods'] as $method) { - if ($method['executableLines'] > 0) { - $this->numMethods++; - } - } - } - - foreach ($this->traits as $trait) { - foreach ($trait['methods'] as $method) { - if ($method['executableLines'] > 0) { - $this->numMethods++; - } - } - } - } - - return $this->numMethods; - } - - public function numberOfTestedMethods(): int - { - if ($this->numTestedMethods === null) { - $this->numTestedMethods = 0; - - foreach ($this->classes as $class) { - foreach ($class['methods'] as $method) { - if ($method['executableLines'] > 0 && - $method['coverage'] === 100) { - $this->numTestedMethods++; - } - } - } - - foreach ($this->traits as $trait) { - foreach ($trait['methods'] as $method) { - if ($method['executableLines'] > 0 && - $method['coverage'] === 100) { - $this->numTestedMethods++; - } - } - } - } - - return $this->numTestedMethods; - } - - public function numberOfFunctions(): int - { - return count($this->functions); - } - - public function numberOfTestedFunctions(): int - { - if ($this->numTestedFunctions === null) { - $this->numTestedFunctions = 0; - - foreach ($this->functions as $function) { - if ($function['executableLines'] > 0 && - $function['coverage'] === 100) { - $this->numTestedFunctions++; - } - } - } - - return $this->numTestedFunctions; - } - - /** - * @param array $classes - * @param array $traits - * @param array $functions - */ - private function calculateStatistics(array $classes, array $traits, array $functions): void - { - foreach (range(1, $this->linesOfCode->linesOfCode()) as $lineNumber) { - $this->codeUnitsByLine[$lineNumber] = []; - } - - $this->processClasses($classes); - $this->processTraits($traits); - $this->processFunctions($functions); - - foreach (range(1, $this->linesOfCode->linesOfCode()) as $lineNumber) { - if (isset($this->lineCoverageData[$lineNumber])) { - foreach ($this->codeUnitsByLine[$lineNumber] as &$codeUnit) { - $codeUnit['executableLines']++; - } - - unset($codeUnit); - - $this->numExecutableLines++; - - if (count($this->lineCoverageData[$lineNumber]) > 0) { - foreach ($this->codeUnitsByLine[$lineNumber] as &$codeUnit) { - $codeUnit['executedLines']++; - } - - unset($codeUnit); - - $this->numExecutedLines++; - } - } - } - - foreach ($this->traits as &$trait) { - foreach ($trait['methods'] as &$method) { - $methodLineCoverage = $method['executableLines'] > 0 ? ($method['executedLines'] / $method['executableLines']) * 100 : 100; - $methodBranchCoverage = $method['executableBranches'] > 0 ? ($method['executedBranches'] / $method['executableBranches']) * 100 : 0; - $methodPathCoverage = $method['executablePaths'] > 0 ? ($method['executedPaths'] / $method['executablePaths']) * 100 : 0; - - $method['coverage'] = $methodBranchCoverage > 0 ? $methodBranchCoverage : $methodLineCoverage; - $method['crap'] = (new CrapIndex($method['ccn'], $methodPathCoverage > 0 ? $methodPathCoverage : $methodLineCoverage))->asString(); - - $trait['ccn'] += $method['ccn']; - } - - unset($method); - - $traitLineCoverage = $trait['executableLines'] > 0 ? ($trait['executedLines'] / $trait['executableLines']) * 100 : 100; - $traitBranchCoverage = $trait['executableBranches'] > 0 ? ($trait['executedBranches'] / $trait['executableBranches']) * 100 : 0; - $traitPathCoverage = $trait['executablePaths'] > 0 ? ($trait['executedPaths'] / $trait['executablePaths']) * 100 : 0; - - $trait['coverage'] = $traitBranchCoverage > 0 ? $traitBranchCoverage : $traitLineCoverage; - $trait['crap'] = (new CrapIndex($trait['ccn'], $traitPathCoverage > 0 ? $traitPathCoverage : $traitLineCoverage))->asString(); - - if ($trait['executableLines'] > 0 && $trait['coverage'] === 100) { - $this->numTestedClasses++; - } - } - - unset($trait); - - foreach ($this->classes as &$class) { - foreach ($class['methods'] as &$method) { - $methodLineCoverage = $method['executableLines'] > 0 ? ($method['executedLines'] / $method['executableLines']) * 100 : 100; - $methodBranchCoverage = $method['executableBranches'] > 0 ? ($method['executedBranches'] / $method['executableBranches']) * 100 : 0; - $methodPathCoverage = $method['executablePaths'] > 0 ? ($method['executedPaths'] / $method['executablePaths']) * 100 : 0; - - $method['coverage'] = $methodBranchCoverage > 0 ? $methodBranchCoverage : $methodLineCoverage; - $method['crap'] = (new CrapIndex($method['ccn'], $methodPathCoverage > 0 ? $methodPathCoverage : $methodLineCoverage))->asString(); - - $class['ccn'] += $method['ccn']; - } - - unset($method); - - $classLineCoverage = $class['executableLines'] > 0 ? ($class['executedLines'] / $class['executableLines']) * 100 : 100; - $classBranchCoverage = $class['executableBranches'] > 0 ? ($class['executedBranches'] / $class['executableBranches']) * 100 : 0; - $classPathCoverage = $class['executablePaths'] > 0 ? ($class['executedPaths'] / $class['executablePaths']) * 100 : 0; - - $class['coverage'] = $classBranchCoverage > 0 ? $classBranchCoverage : $classLineCoverage; - $class['crap'] = (new CrapIndex($class['ccn'], $classPathCoverage > 0 ? $classPathCoverage : $classLineCoverage))->asString(); - - if ($class['executableLines'] > 0 && $class['coverage'] === 100) { - $this->numTestedClasses++; - } - } - - unset($class); - - foreach ($this->functions as &$function) { - $functionLineCoverage = $function['executableLines'] > 0 ? ($function['executedLines'] / $function['executableLines']) * 100 : 100; - $functionBranchCoverage = $function['executableBranches'] > 0 ? ($function['executedBranches'] / $function['executableBranches']) * 100 : 0; - $functionPathCoverage = $function['executablePaths'] > 0 ? ($function['executedPaths'] / $function['executablePaths']) * 100 : 0; - - $function['coverage'] = $functionBranchCoverage > 0 ? $functionBranchCoverage : $functionLineCoverage; - $function['crap'] = (new CrapIndex($function['ccn'], $functionPathCoverage > 0 ? $functionPathCoverage : $functionLineCoverage))->asString(); - - if ($function['coverage'] === 100) { - $this->numTestedFunctions++; - } - } - } - - /** - * @param array $classes - */ - private function processClasses(array $classes): void - { - $link = $this->id() . '.html#'; - - foreach ($classes as $className => $class) { - $this->classes[$className] = [ - 'className' => $className, - 'namespace' => $class->namespace(), - 'methods' => [], - 'startLine' => $class->startLine(), - 'executableLines' => 0, - 'executedLines' => 0, - 'executableBranches' => 0, - 'executedBranches' => 0, - 'executablePaths' => 0, - 'executedPaths' => 0, - 'ccn' => 0, - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $class->startLine(), - ]; - - foreach ($class->methods() as $methodName => $method) { - $methodData = $this->newMethod($className, $method, $link); - $this->classes[$className]['methods'][$methodName] = $methodData; - - $this->classes[$className]['executableBranches'] += $methodData['executableBranches']; - $this->classes[$className]['executedBranches'] += $methodData['executedBranches']; - $this->classes[$className]['executablePaths'] += $methodData['executablePaths']; - $this->classes[$className]['executedPaths'] += $methodData['executedPaths']; - - $this->numExecutableBranches += $methodData['executableBranches']; - $this->numExecutedBranches += $methodData['executedBranches']; - $this->numExecutablePaths += $methodData['executablePaths']; - $this->numExecutedPaths += $methodData['executedPaths']; - - foreach (range($method->startLine(), $method->endLine()) as $lineNumber) { - $this->codeUnitsByLine[$lineNumber] = [ - &$this->classes[$className], - &$this->classes[$className]['methods'][$methodName], - ]; - } - } - } - } - - /** - * @param array $traits - */ - private function processTraits(array $traits): void - { - $link = $this->id() . '.html#'; - - foreach ($traits as $traitName => $trait) { - $this->traits[$traitName] = [ - 'traitName' => $traitName, - 'namespace' => $trait->namespace(), - 'methods' => [], - 'startLine' => $trait->startLine(), - 'executableLines' => 0, - 'executedLines' => 0, - 'executableBranches' => 0, - 'executedBranches' => 0, - 'executablePaths' => 0, - 'executedPaths' => 0, - 'ccn' => 0, - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $trait->startLine(), - ]; - - foreach ($trait->methods() as $methodName => $method) { - $methodData = $this->newMethod($traitName, $method, $link); - $this->traits[$traitName]['methods'][$methodName] = $methodData; - - $this->traits[$traitName]['executableBranches'] += $methodData['executableBranches']; - $this->traits[$traitName]['executedBranches'] += $methodData['executedBranches']; - $this->traits[$traitName]['executablePaths'] += $methodData['executablePaths']; - $this->traits[$traitName]['executedPaths'] += $methodData['executedPaths']; - - $this->numExecutableBranches += $methodData['executableBranches']; - $this->numExecutedBranches += $methodData['executedBranches']; - $this->numExecutablePaths += $methodData['executablePaths']; - $this->numExecutedPaths += $methodData['executedPaths']; - - foreach (range($method->startLine(), $method->endLine()) as $lineNumber) { - $this->codeUnitsByLine[$lineNumber] = [ - &$this->traits[$traitName], - &$this->traits[$traitName]['methods'][$methodName], - ]; - } - } - } - } - - /** - * @param array $functions - */ - private function processFunctions(array $functions): void - { - $link = $this->id() . '.html#'; - - foreach ($functions as $functionName => $function) { - $this->functions[$functionName] = [ - 'functionName' => $functionName, - 'namespace' => $function->namespace(), - 'signature' => $function->signature(), - 'startLine' => $function->startLine(), - 'endLine' => $function->endLine(), - 'executableLines' => 0, - 'executedLines' => 0, - 'executableBranches' => 0, - 'executedBranches' => 0, - 'executablePaths' => 0, - 'executedPaths' => 0, - 'ccn' => $function->cyclomaticComplexity(), - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $function->startLine(), - ]; - - foreach (range($function->startLine(), $function->endLine()) as $lineNumber) { - $this->codeUnitsByLine[$lineNumber] = [&$this->functions[$functionName]]; - } - - if (isset($this->functionCoverageData[$functionName]['branches'])) { - $this->functions[$functionName]['executableBranches'] = count( - $this->functionCoverageData[$functionName]['branches'], - ); - - $this->functions[$functionName]['executedBranches'] = count( - array_filter( - $this->functionCoverageData[$functionName]['branches'], - static function (array $branch) - { - return (bool) $branch['hit']; - }, - ), - ); - } - - if (isset($this->functionCoverageData[$functionName]['paths'])) { - $this->functions[$functionName]['executablePaths'] = count( - $this->functionCoverageData[$functionName]['paths'], - ); - - $this->functions[$functionName]['executedPaths'] = count( - array_filter( - $this->functionCoverageData[$functionName]['paths'], - static function (array $path) - { - return (bool) $path['hit']; - }, - ), - ); - } - - $this->numExecutableBranches += $this->functions[$functionName]['executableBranches']; - $this->numExecutedBranches += $this->functions[$functionName]['executedBranches']; - $this->numExecutablePaths += $this->functions[$functionName]['executablePaths']; - $this->numExecutedPaths += $this->functions[$functionName]['executedPaths']; - } - } - - /** - * @return ProcessedMethodType - */ - private function newMethod(string $className, Method $method, string $link): array - { - $methodData = [ - 'methodName' => $method->name(), - 'visibility' => $method->visibility()->value, - 'signature' => $method->signature(), - 'startLine' => $method->startLine(), - 'endLine' => $method->endLine(), - 'executableLines' => 0, - 'executedLines' => 0, - 'executableBranches' => 0, - 'executedBranches' => 0, - 'executablePaths' => 0, - 'executedPaths' => 0, - 'ccn' => $method->cyclomaticComplexity(), - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $method->startLine(), - ]; - - $key = $className . '->' . $method->name(); - - if (isset($this->functionCoverageData[$key]['branches'])) { - $methodData['executableBranches'] = count( - $this->functionCoverageData[$key]['branches'], - ); - - $methodData['executedBranches'] = count( - array_filter( - $this->functionCoverageData[$key]['branches'], - static function (array $branch) - { - return (bool) $branch['hit']; - }, - ), - ); - } - - if (isset($this->functionCoverageData[$key]['paths'])) { - $methodData['executablePaths'] = count( - $this->functionCoverageData[$key]['paths'], - ); - - $methodData['executedPaths'] = count( - array_filter( - $this->functionCoverageData[$key]['paths'], - static function (array $path) - { - return (bool) $path['hit']; - }, - ), - ); - } - - return $methodData; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php deleted file mode 100644 index ab3c8eb9..00000000 --- a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Node; - -use function assert; -use function count; -use RecursiveIterator; - -/** - * @template-implements RecursiveIterator - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Iterator implements RecursiveIterator -{ - private int $position; - - /** - * @var list - */ - private readonly array $nodes; - - public function __construct(Directory $node) - { - $this->nodes = $node->children(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->nodes); - } - - public function key(): int - { - return $this->position; - } - - public function current(): ?AbstractNode - { - return $this->valid() ? $this->nodes[$this->position] : null; - } - - public function next(): void - { - $this->position++; - } - - public function getChildren(): self - { - assert($this->nodes[$this->position] instanceof Directory); - - return new self($this->nodes[$this->position]); - } - - public function hasChildren(): bool - { - return $this->nodes[$this->position] instanceof Directory; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/Report/Clover.php deleted file mode 100644 index 641cd0bb..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Clover.php +++ /dev/null @@ -1,227 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use function count; -use function is_string; -use function ksort; -use function max; -use function range; -use function time; -use DOMDocument; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Util\Xml; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -final class Clover -{ - /** - * @param null|non-empty-string $target - * @param null|non-empty-string $name - * - * @throws WriteOperationFailedException - */ - public function process(CodeCoverage $coverage, ?string $target = null, ?string $name = null): string - { - $time = (string) time(); - - $xmlDocument = new DOMDocument('1.0', 'UTF-8'); - - $xmlCoverage = $xmlDocument->createElement('coverage'); - $xmlCoverage->setAttribute('generated', $time); - $xmlDocument->appendChild($xmlCoverage); - - $xmlProject = $xmlDocument->createElement('project'); - $xmlProject->setAttribute('timestamp', $time); - - if (is_string($name)) { - $xmlProject->setAttribute('name', $name); - } - - $xmlCoverage->appendChild($xmlProject); - - $packages = []; - $report = $coverage->getReport(); - - foreach ($report as $item) { - if (!$item instanceof File) { - continue; - } - - /* @var File $item */ - - $xmlFile = $xmlDocument->createElement('file'); - $xmlFile->setAttribute('name', $item->pathAsString()); - - $classes = $item->classesAndTraits(); - $coverageData = $item->lineCoverageData(); - $lines = []; - $namespace = 'global'; - - foreach ($classes as $className => $class) { - $classStatements = 0; - $coveredClassStatements = 0; - $coveredMethods = 0; - $classMethods = 0; - - // Assumption: one namespace per file - if ($class['namespace'] !== '') { - $namespace = $class['namespace']; - } - - foreach ($class['methods'] as $methodName => $method) { - /** @phpstan-ignore equal.notAllowed */ - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classStatements += $method['executableLines']; - $coveredClassStatements += $method['executedLines']; - - /** @phpstan-ignore equal.notAllowed */ - if ($method['coverage'] == 100) { - $coveredMethods++; - } - - $methodCount = 0; - - foreach (range($method['startLine'], $method['endLine']) as $line) { - if (isset($coverageData[$line])) { - $methodCount = max($methodCount, count($coverageData[$line])); - } - } - - $lines[$method['startLine']] = [ - 'ccn' => $method['ccn'], - 'count' => $methodCount, - 'crap' => $method['crap'], - 'type' => 'method', - 'visibility' => $method['visibility'], - 'name' => $methodName, - ]; - } - - $xmlClass = $xmlDocument->createElement('class'); - $xmlClass->setAttribute('name', $className); - $xmlClass->setAttribute('namespace', $namespace); - - $xmlFile->appendChild($xmlClass); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('complexity', (string) $class['ccn']); - $xmlMetrics->setAttribute('methods', (string) $classMethods); - $xmlMetrics->setAttribute('coveredmethods', (string) $coveredMethods); - $xmlMetrics->setAttribute('conditionals', (string) $class['executableBranches']); - $xmlMetrics->setAttribute('coveredconditionals', (string) $class['executedBranches']); - $xmlMetrics->setAttribute('statements', (string) $classStatements); - $xmlMetrics->setAttribute('coveredstatements', (string) $coveredClassStatements); - $xmlMetrics->setAttribute('elements', (string) ($classMethods + $classStatements + $class['executableBranches'])); - $xmlMetrics->setAttribute('coveredelements', (string) ($coveredMethods + $coveredClassStatements + $class['executedBranches'])); - $xmlClass->appendChild($xmlMetrics); - } - - foreach ($coverageData as $line => $data) { - if ($data === null || isset($lines[$line])) { - continue; - } - - $lines[$line] = [ - 'count' => count($data), 'type' => 'stmt', - ]; - } - - ksort($lines); - - foreach ($lines as $line => $data) { - $xmlLine = $xmlDocument->createElement('line'); - $xmlLine->setAttribute('num', (string) $line); - $xmlLine->setAttribute('type', $data['type']); - - if (isset($data['name'])) { - $xmlLine->setAttribute('name', $data['name']); - } - - if (isset($data['visibility'])) { - $xmlLine->setAttribute('visibility', $data['visibility']); - } - - if (isset($data['ccn'])) { - $xmlLine->setAttribute('complexity', (string) $data['ccn']); - } - - if (isset($data['crap'])) { - $xmlLine->setAttribute('crap', (string) $data['crap']); - } - - $xmlLine->setAttribute('count', (string) $data['count']); - $xmlFile->appendChild($xmlLine); - } - - $linesOfCode = $item->linesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); - $xmlMetrics->setAttribute('classes', (string) $item->numberOfClassesAndTraits()); - $xmlMetrics->setAttribute('methods', (string) $item->numberOfMethods()); - $xmlMetrics->setAttribute('coveredmethods', (string) $item->numberOfTestedMethods()); - $xmlMetrics->setAttribute('conditionals', (string) $item->numberOfExecutableBranches()); - $xmlMetrics->setAttribute('coveredconditionals', (string) $item->numberOfExecutedBranches()); - $xmlMetrics->setAttribute('statements', (string) $item->numberOfExecutableLines()); - $xmlMetrics->setAttribute('coveredstatements', (string) $item->numberOfExecutedLines()); - $xmlMetrics->setAttribute('elements', (string) ($item->numberOfMethods() + $item->numberOfExecutableLines() + $item->numberOfExecutableBranches())); - $xmlMetrics->setAttribute('coveredelements', (string) ($item->numberOfTestedMethods() + $item->numberOfExecutedLines() + $item->numberOfExecutedBranches())); - $xmlFile->appendChild($xmlMetrics); - - if ($namespace === 'global') { - $xmlProject->appendChild($xmlFile); - } else { - if (!isset($packages[$namespace])) { - $packages[$namespace] = $xmlDocument->createElement( - 'package', - ); - - $packages[$namespace]->setAttribute('name', $namespace); - $xmlProject->appendChild($packages[$namespace]); - } - - $packages[$namespace]->appendChild($xmlFile); - } - } - - $linesOfCode = $report->linesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('files', (string) count($report)); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); - $xmlMetrics->setAttribute('classes', (string) $report->numberOfClassesAndTraits()); - $xmlMetrics->setAttribute('methods', (string) $report->numberOfMethods()); - $xmlMetrics->setAttribute('coveredmethods', (string) $report->numberOfTestedMethods()); - $xmlMetrics->setAttribute('conditionals', (string) $report->numberOfExecutableBranches()); - $xmlMetrics->setAttribute('coveredconditionals', (string) $report->numberOfExecutedBranches()); - $xmlMetrics->setAttribute('statements', (string) $report->numberOfExecutableLines()); - $xmlMetrics->setAttribute('coveredstatements', (string) $report->numberOfExecutedLines()); - $xmlMetrics->setAttribute('elements', (string) ($report->numberOfMethods() + $report->numberOfExecutableLines() + $report->numberOfExecutableBranches())); - $xmlMetrics->setAttribute('coveredelements', (string) ($report->numberOfTestedMethods() + $report->numberOfExecutedLines() + $report->numberOfExecutedBranches())); - $xmlProject->appendChild($xmlMetrics); - - $buffer = Xml::asString($xmlDocument); - - if ($target !== null) { - Filesystem::write($target, $buffer); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php b/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php deleted file mode 100644 index 38653f75..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php +++ /dev/null @@ -1,299 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use const DIRECTORY_SEPARATOR; -use function basename; -use function count; -use function preg_match; -use function range; -use function str_replace; -use function time; -use DOMImplementation; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Util\Xml; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -final class Cobertura -{ - /** - * @param null|non-empty-string $target - * - * @throws WriteOperationFailedException - */ - public function process(CodeCoverage $coverage, ?string $target = null): string - { - $time = (string) time(); - - $report = $coverage->getReport(); - - $implementation = new DOMImplementation; - - $documentType = $implementation->createDocumentType( - 'coverage', - '', - 'http://cobertura.sourceforge.net/xml/coverage-04.dtd', - ); - - $document = $implementation->createDocument('', '', $documentType); - $document->xmlVersion = '1.0'; - $document->encoding = 'UTF-8'; - - $coverageElement = $document->createElement('coverage'); - - $linesValid = $report->numberOfExecutableLines(); - $linesCovered = $report->numberOfExecutedLines(); - $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); - $coverageElement->setAttribute('line-rate', (string) $lineRate); - - $branchesValid = $report->numberOfExecutableBranches(); - $branchesCovered = $report->numberOfExecutedBranches(); - $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); - $coverageElement->setAttribute('branch-rate', (string) $branchRate); - - $coverageElement->setAttribute('lines-covered', (string) $report->numberOfExecutedLines()); - $coverageElement->setAttribute('lines-valid', (string) $report->numberOfExecutableLines()); - $coverageElement->setAttribute('branches-covered', (string) $report->numberOfExecutedBranches()); - $coverageElement->setAttribute('branches-valid', (string) $report->numberOfExecutableBranches()); - $coverageElement->setAttribute('complexity', ''); - $coverageElement->setAttribute('version', '0.4'); - $coverageElement->setAttribute('timestamp', $time); - - $document->appendChild($coverageElement); - - $sourcesElement = $document->createElement('sources'); - $coverageElement->appendChild($sourcesElement); - - $sourceElement = $document->createElement('source', $report->pathAsString()); - $sourcesElement->appendChild($sourceElement); - - $packagesElement = $document->createElement('packages'); - $coverageElement->appendChild($packagesElement); - - $complexity = 0; - - foreach ($report as $item) { - if (!$item instanceof File) { - continue; - } - - $packageElement = $document->createElement('package'); - $packageComplexity = 0; - - $packageElement->setAttribute('name', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); - - $linesValid = $item->numberOfExecutableLines(); - $linesCovered = $item->numberOfExecutedLines(); - $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); - - $packageElement->setAttribute('line-rate', (string) $lineRate); - - $branchesValid = $item->numberOfExecutableBranches(); - $branchesCovered = $item->numberOfExecutedBranches(); - $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); - - $packageElement->setAttribute('branch-rate', (string) $branchRate); - - $packageElement->setAttribute('complexity', ''); - $packagesElement->appendChild($packageElement); - - $classesElement = $document->createElement('classes'); - - $packageElement->appendChild($classesElement); - - $classes = $item->classesAndTraits(); - $coverageData = $item->lineCoverageData(); - - foreach ($classes as $className => $class) { - $complexity += $class['ccn']; - $packageComplexity += $class['ccn']; - - $linesValid = $class['executableLines']; - $linesCovered = $class['executedLines']; - $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); - - $branchesValid = $class['executableBranches']; - $branchesCovered = $class['executedBranches']; - $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); - - $classElement = $document->createElement('class'); - - $classElement->setAttribute('name', $className); - $classElement->setAttribute('filename', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); - $classElement->setAttribute('line-rate', (string) $lineRate); - $classElement->setAttribute('branch-rate', (string) $branchRate); - $classElement->setAttribute('complexity', (string) $class['ccn']); - - $classesElement->appendChild($classElement); - - $methodsElement = $document->createElement('methods'); - - $classElement->appendChild($methodsElement); - - $classLinesElement = $document->createElement('lines'); - - $classElement->appendChild($classLinesElement); - - foreach ($class['methods'] as $methodName => $method) { - if ($method['executableLines'] === 0) { - continue; - } - - preg_match("/\((.*?)\)/", $method['signature'], $signature); - - $linesValid = $method['executableLines']; - $linesCovered = $method['executedLines']; - $lineRate = $linesCovered / $linesValid; - - $branchesValid = $method['executableBranches']; - $branchesCovered = $method['executedBranches']; - $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); - - $methodElement = $document->createElement('method'); - - $methodElement->setAttribute('name', $methodName); - $methodElement->setAttribute('signature', $signature[1]); - $methodElement->setAttribute('line-rate', (string) $lineRate); - $methodElement->setAttribute('branch-rate', (string) $branchRate); - $methodElement->setAttribute('complexity', (string) $method['ccn']); - - $methodLinesElement = $document->createElement('lines'); - - $methodElement->appendChild($methodLinesElement); - - foreach (range($method['startLine'], $method['endLine']) as $line) { - if (!isset($coverageData[$line])) { - continue; - } - $methodLineElement = $document->createElement('line'); - - $methodLineElement->setAttribute('number', (string) $line); - $methodLineElement->setAttribute('hits', (string) count($coverageData[$line])); - - $methodLinesElement->appendChild($methodLineElement); - - $classLineElement = $methodLineElement->cloneNode(); - - $classLinesElement->appendChild($classLineElement); - } - - $methodsElement->appendChild($methodElement); - } - } - - if ($item->numberOfFunctions() === 0) { - $packageElement->setAttribute('complexity', (string) $packageComplexity); - - continue; - } - - $functionsComplexity = 0; - $functionsLinesValid = 0; - $functionsLinesCovered = 0; - $functionsBranchesValid = 0; - $functionsBranchesCovered = 0; - - $classElement = $document->createElement('class'); - $classElement->setAttribute('name', basename($item->pathAsString())); - $classElement->setAttribute('filename', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); - - $methodsElement = $document->createElement('methods'); - - $classElement->appendChild($methodsElement); - - $classLinesElement = $document->createElement('lines'); - - $classElement->appendChild($classLinesElement); - - $functions = $item->functions(); - - foreach ($functions as $functionName => $function) { - if ($function['executableLines'] === 0) { - continue; - } - - $complexity += $function['ccn']; - $packageComplexity += $function['ccn']; - $functionsComplexity += $function['ccn']; - - $linesValid = $function['executableLines']; - $linesCovered = $function['executedLines']; - $lineRate = $linesCovered / $linesValid; - - $functionsLinesValid += $linesValid; - $functionsLinesCovered += $linesCovered; - - $branchesValid = $function['executableBranches']; - $branchesCovered = $function['executedBranches']; - $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); - - $functionsBranchesValid += $branchesValid; - $functionsBranchesCovered += $branchesValid; - - $methodElement = $document->createElement('method'); - - $methodElement->setAttribute('name', $functionName); - $methodElement->setAttribute('signature', $function['signature']); - $methodElement->setAttribute('line-rate', (string) $lineRate); - $methodElement->setAttribute('branch-rate', (string) $branchRate); - $methodElement->setAttribute('complexity', (string) $function['ccn']); - - $methodLinesElement = $document->createElement('lines'); - - $methodElement->appendChild($methodLinesElement); - - foreach (range($function['startLine'], $function['endLine']) as $line) { - if (!isset($coverageData[$line])) { - continue; - } - $methodLineElement = $document->createElement('line'); - - $methodLineElement->setAttribute('number', (string) $line); - $methodLineElement->setAttribute('hits', (string) count($coverageData[$line])); - - $methodLinesElement->appendChild($methodLineElement); - - $classLineElement = $methodLineElement->cloneNode(); - - $classLinesElement->appendChild($classLineElement); - } - - $methodsElement->appendChild($methodElement); - } - - $packageElement->setAttribute('complexity', (string) $packageComplexity); - - if ($functionsLinesValid === 0) { - continue; - } - - $lineRate = $functionsLinesCovered / $functionsLinesValid; - $branchRate = $functionsBranchesValid === 0 ? 0 : ($functionsBranchesCovered / $functionsBranchesValid); - - $classElement->setAttribute('line-rate', (string) $lineRate); - $classElement->setAttribute('branch-rate', (string) $branchRate); - $classElement->setAttribute('complexity', (string) $functionsComplexity); - - $classesElement->appendChild($classElement); - } - - $coverageElement->setAttribute('complexity', (string) $complexity); - - $buffer = Xml::asString($document); - - if ($target !== null) { - Filesystem::write($target, $buffer); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php deleted file mode 100644 index a79d0a68..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use function date; -use function htmlspecialchars; -use function is_string; -use function round; -use DOMDocument; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Util\Xml; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -final readonly class Crap4j -{ - private int $threshold; - - public function __construct(int $threshold = 30) - { - $this->threshold = $threshold; - } - - /** - * @param null|non-empty-string $target - * @param null|non-empty-string $name - * - * @throws WriteOperationFailedException - */ - public function process(CodeCoverage $coverage, ?string $target = null, ?string $name = null): string - { - $document = new DOMDocument('1.0', 'UTF-8'); - - $root = $document->createElement('crap_result'); - $document->appendChild($root); - - $project = $document->createElement('project', is_string($name) ? $name : ''); - $root->appendChild($project); - $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s'))); - - $stats = $document->createElement('stats'); - $methodsNode = $document->createElement('methods'); - - $report = $coverage->getReport(); - unset($coverage); - - $fullMethodCount = 0; - $fullCrapMethodCount = 0; - $fullCrapLoad = 0; - $fullCrap = 0; - - foreach ($report as $item) { - $namespace = 'global'; - - if (!$item instanceof File) { - continue; - } - - $file = $document->createElement('file'); - $file->setAttribute('name', $item->pathAsString()); - - $classes = $item->classesAndTraits(); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - $crapLoad = $this->crapLoad((float) $method['crap'], $method['ccn'], $method['coverage']); - - $fullCrap += $method['crap']; - $fullCrapLoad += $crapLoad; - $fullMethodCount++; - - if ($method['crap'] >= $this->threshold) { - $fullCrapMethodCount++; - } - - $methodNode = $document->createElement('method'); - - if ($class['namespace'] !== '') { - $namespace = $class['namespace']; - } - - $methodNode->appendChild($document->createElement('package', $namespace)); - $methodNode->appendChild($document->createElement('className', $className)); - $methodNode->appendChild($document->createElement('methodName', $methodName)); - $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('crap', (string) $this->roundValue((float) $method['crap']))); - $methodNode->appendChild($document->createElement('complexity', (string) $method['ccn'])); - $methodNode->appendChild($document->createElement('coverage', (string) $this->roundValue($method['coverage']))); - $methodNode->appendChild($document->createElement('crapLoad', (string) round($crapLoad))); - - $methodsNode->appendChild($methodNode); - } - } - } - - $stats->appendChild($document->createElement('name', 'Method Crap Stats')); - $stats->appendChild($document->createElement('methodCount', (string) $fullMethodCount)); - $stats->appendChild($document->createElement('crapMethodCount', (string) $fullCrapMethodCount)); - $stats->appendChild($document->createElement('crapLoad', (string) round($fullCrapLoad))); - $stats->appendChild($document->createElement('totalCrap', (string) $fullCrap)); - - $crapMethodPercent = 0; - - if ($fullMethodCount > 0) { - $crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount); - } - - $stats->appendChild($document->createElement('crapMethodPercent', (string) $crapMethodPercent)); - - $root->appendChild($stats); - $root->appendChild($methodsNode); - - $buffer = Xml::asString($document); - - if ($target !== null) { - Filesystem::write($target, $buffer); - } - - return $buffer; - } - - private function crapLoad(float $crapValue, int $cyclomaticComplexity, float $coveragePercent): float - { - $crapLoad = 0; - - if ($crapValue >= $this->threshold) { - $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); - $crapLoad += $cyclomaticComplexity / $this->threshold; - } - - return $crapLoad; - } - - private function roundValue(float $value): float - { - return round($value, 2); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php deleted file mode 100644 index c79bf9ee..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -/** - * @immutable - */ -final readonly class Colors -{ - private string $successLow; - private string $successMedium; - private string $successHigh; - private string $warning; - private string $danger; - - public static function default(): self - { - return new self('#dff0d8', '#c3e3b5', '#99cb84', '#fcf8e3', '#f2dede'); - } - - public static function from(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger): self - { - return new self($successLow, $successMedium, $successHigh, $warning, $danger); - } - - private function __construct(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger) - { - $this->successLow = $successLow; - $this->successMedium = $successMedium; - $this->successHigh = $successHigh; - $this->warning = $warning; - $this->danger = $danger; - } - - public function successLow(): string - { - return $this->successLow; - } - - public function successMedium(): string - { - return $this->successMedium; - } - - public function successHigh(): string - { - return $this->successHigh; - } - - public function warning(): string - { - return $this->warning; - } - - public function danger(): string - { - return $this->danger; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php b/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php deleted file mode 100644 index 5c272a0b..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use function is_file; -use SebastianBergmann\CodeCoverage\InvalidArgumentException; - -/** - * @immutable - */ -final readonly class CustomCssFile -{ - private string $path; - - public static function default(): self - { - return new self(__DIR__ . '/Renderer/Template/css/custom.css'); - } - - /** - * @throws InvalidArgumentException - */ - public static function from(string $path): self - { - if (!is_file($path)) { - throw new InvalidArgumentException( - '$path does not exist', - ); - } - - return new self($path); - } - - private function __construct(string $path) - { - $this->path = $path; - } - - public function path(): string - { - return $this->path; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php deleted file mode 100644 index 44c63c92..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use const DIRECTORY_SEPARATOR; -use function copy; -use function date; -use function dirname; -use function str_ends_with; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Report\Thresholds; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\Template\Exception; -use SebastianBergmann\Template\Template; - -final readonly class Facade -{ - private string $templatePath; - private string $generator; - private Colors $colors; - private Thresholds $thresholds; - private CustomCssFile $customCssFile; - - public function __construct(string $generator = '', ?Colors $colors = null, ?Thresholds $thresholds = null, ?CustomCssFile $customCssFile = null) - { - $this->generator = $generator; - $this->colors = $colors ?? Colors::default(); - $this->thresholds = $thresholds ?? Thresholds::default(); - $this->customCssFile = $customCssFile ?? CustomCssFile::default(); - $this->templatePath = __DIR__ . '/Renderer/Template/'; - } - - public function process(CodeCoverage $coverage, string $target): void - { - $target = $this->directory($target); - $report = $coverage->getReport(); - $date = date('D M j G:i:s T Y'); - $hasBranchCoverage = $coverage->getData(true)->functionCoverage() !== []; - - $dashboard = new Dashboard( - $this->templatePath, - $this->generator, - $date, - $this->thresholds, - $hasBranchCoverage, - ); - - $directory = new Directory( - $this->templatePath, - $this->generator, - $date, - $this->thresholds, - $hasBranchCoverage, - ); - - $file = new File( - $this->templatePath, - $this->generator, - $date, - $this->thresholds, - $hasBranchCoverage, - ); - - $directory->render($report, $target . 'index.html'); - $dashboard->render($report, $target . 'dashboard.html'); - - foreach ($report as $node) { - $id = $node->id(); - - if ($node instanceof DirectoryNode) { - Filesystem::createDirectory($target . $id); - - $directory->render($node, $target . $id . '/index.html'); - $dashboard->render($node, $target . $id . '/dashboard.html'); - } else { - $dir = dirname($target . $id); - - Filesystem::createDirectory($dir); - - $file->render($node, $target . $id); - } - } - - $this->copyFiles($target); - $this->renderCss($target); - } - - private function copyFiles(string $target): void - { - $dir = $this->directory($target . '_css'); - - copy($this->templatePath . 'css/billboard.min.css', $dir . 'billboard.min.css'); - copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css'); - copy($this->customCssFile->path(), $dir . 'custom.css'); - copy($this->templatePath . 'css/octicons.css', $dir . 'octicons.css'); - - $dir = $this->directory($target . '_icons'); - copy($this->templatePath . 'icons/file-code.svg', $dir . 'file-code.svg'); - copy($this->templatePath . 'icons/file-directory.svg', $dir . 'file-directory.svg'); - - $dir = $this->directory($target . '_js'); - copy($this->templatePath . 'js/billboard.pkgd.min.js', $dir . 'billboard.pkgd.min.js'); - copy($this->templatePath . 'js/bootstrap.bundle.min.js', $dir . 'bootstrap.bundle.min.js'); - copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); - copy($this->templatePath . 'js/file.js', $dir . 'file.js'); - } - - private function renderCss(string $target): void - { - $template = new Template($this->templatePath . 'css/style.css', '{{', '}}'); - - $template->setVar( - [ - 'success-low' => $this->colors->successLow(), - 'success-medium' => $this->colors->successMedium(), - 'success-high' => $this->colors->successHigh(), - 'warning' => $this->colors->warning(), - 'danger' => $this->colors->danger(), - ], - ); - - try { - $template->renderTo($this->directory($target . '_css') . 'style.css'); - // @codeCoverageIgnoreStart - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - // @codeCoverageIgnoreEnd - } - } - - private function directory(string $directory): string - { - if (!str_ends_with($directory, DIRECTORY_SEPARATOR)) { - $directory .= DIRECTORY_SEPARATOR; - } - - Filesystem::createDirectory($directory); - - return $directory; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php deleted file mode 100644 index 49a03e5c..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php +++ /dev/null @@ -1,289 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use function array_pop; -use function count; -use function sprintf; -use function str_repeat; -use function substr_count; -use SebastianBergmann\CodeCoverage\Node\AbstractNode; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; -use SebastianBergmann\CodeCoverage\Report\Thresholds; -use SebastianBergmann\CodeCoverage\Version; -use SebastianBergmann\Environment\Runtime; -use SebastianBergmann\Template\Template; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class Renderer -{ - protected string $templatePath; - protected string $generator; - protected string $date; - protected Thresholds $thresholds; - protected bool $hasBranchCoverage; - protected string $version; - - public function __construct(string $templatePath, string $generator, string $date, Thresholds $thresholds, bool $hasBranchCoverage) - { - $this->templatePath = $templatePath; - $this->generator = $generator; - $this->date = $date; - $this->thresholds = $thresholds; - $this->version = Version::id(); - $this->hasBranchCoverage = $hasBranchCoverage; - } - - /** - * @param array $data - */ - protected function renderItemTemplate(Template $template, array $data): string - { - $numSeparator = ' / '; - - if (isset($data['numClasses']) && $data['numClasses'] > 0) { - $classesLevel = $this->colorLevel($data['testedClassesPercent']); - - $classesNumber = $data['numTestedClasses'] . $numSeparator . - $data['numClasses']; - - $classesBar = $this->coverageBar( - $data['testedClassesPercent'], - ); - } else { - $classesLevel = ''; - $classesNumber = '0' . $numSeparator . '0'; - $classesBar = ''; - $data['testedClassesPercentAsString'] = 'n/a'; - } - - if ($data['numMethods'] > 0) { - $methodsLevel = $this->colorLevel($data['testedMethodsPercent']); - - $methodsNumber = $data['numTestedMethods'] . $numSeparator . - $data['numMethods']; - - $methodsBar = $this->coverageBar( - $data['testedMethodsPercent'], - ); - } else { - $methodsLevel = ''; - $methodsNumber = '0' . $numSeparator . '0'; - $methodsBar = ''; - $data['testedMethodsPercentAsString'] = 'n/a'; - } - - if ($data['numExecutableLines'] > 0) { - $linesLevel = $this->colorLevel($data['linesExecutedPercent']); - - $linesNumber = $data['numExecutedLines'] . $numSeparator . - $data['numExecutableLines']; - - $linesBar = $this->coverageBar( - $data['linesExecutedPercent'], - ); - } else { - $linesLevel = ''; - $linesNumber = '0' . $numSeparator . '0'; - $linesBar = ''; - $data['linesExecutedPercentAsString'] = 'n/a'; - } - - if ($data['numExecutablePaths'] > 0) { - $pathsLevel = $this->colorLevel($data['pathsExecutedPercent']); - - $pathsNumber = $data['numExecutedPaths'] . $numSeparator . - $data['numExecutablePaths']; - - $pathsBar = $this->coverageBar( - $data['pathsExecutedPercent'], - ); - } else { - $pathsLevel = ''; - $pathsNumber = '0' . $numSeparator . '0'; - $pathsBar = ''; - $data['pathsExecutedPercentAsString'] = 'n/a'; - } - - if ($data['numExecutableBranches'] > 0) { - $branchesLevel = $this->colorLevel($data['branchesExecutedPercent']); - - $branchesNumber = $data['numExecutedBranches'] . $numSeparator . - $data['numExecutableBranches']; - - $branchesBar = $this->coverageBar( - $data['branchesExecutedPercent'], - ); - } else { - $branchesLevel = ''; - $branchesNumber = '0' . $numSeparator . '0'; - $branchesBar = ''; - $data['branchesExecutedPercentAsString'] = 'n/a'; - } - - $template->setVar( - [ - 'icon' => $data['icon'] ?? '', - 'crap' => $data['crap'] ?? '', - 'name' => $data['name'], - 'lines_bar' => $linesBar, - 'lines_executed_percent' => $data['linesExecutedPercentAsString'], - 'lines_level' => $linesLevel, - 'lines_number' => $linesNumber, - 'paths_bar' => $pathsBar, - 'paths_executed_percent' => $data['pathsExecutedPercentAsString'], - 'paths_level' => $pathsLevel, - 'paths_number' => $pathsNumber, - 'branches_bar' => $branchesBar, - 'branches_executed_percent' => $data['branchesExecutedPercentAsString'], - 'branches_level' => $branchesLevel, - 'branches_number' => $branchesNumber, - 'methods_bar' => $methodsBar, - 'methods_tested_percent' => $data['testedMethodsPercentAsString'], - 'methods_level' => $methodsLevel, - 'methods_number' => $methodsNumber, - 'classes_bar' => $classesBar, - 'classes_tested_percent' => $data['testedClassesPercentAsString'] ?? '', - 'classes_level' => $classesLevel, - 'classes_number' => $classesNumber, - ], - ); - - return $template->render(); - } - - protected function setCommonTemplateVariables(Template $template, AbstractNode $node): void - { - $template->setVar( - [ - 'id' => $node->id(), - 'full_path' => $node->pathAsString(), - 'path_to_root' => $this->pathToRoot($node), - 'breadcrumbs' => $this->breadcrumbs($node), - 'date' => $this->date, - 'version' => $this->version, - 'runtime' => $this->runtimeString(), - 'generator' => $this->generator, - 'low_upper_bound' => (string) $this->thresholds->lowUpperBound(), - 'high_lower_bound' => (string) $this->thresholds->highLowerBound(), - ], - ); - } - - protected function breadcrumbs(AbstractNode $node): string - { - $breadcrumbs = ''; - $path = $node->pathAsArray(); - $pathToRoot = []; - $max = count($path); - - if ($node instanceof FileNode) { - $max--; - } - - for ($i = 0; $i < $max; $i++) { - $pathToRoot[] = str_repeat('../', $i); - } - - foreach ($path as $step) { - if ($step !== $node) { - $breadcrumbs .= $this->inactiveBreadcrumb( - $step, - array_pop($pathToRoot), - ); - } else { - $breadcrumbs .= $this->activeBreadcrumb($step); - } - } - - return $breadcrumbs; - } - - protected function activeBreadcrumb(AbstractNode $node): string - { - $buffer = sprintf( - '
    • ' . "\n", - $node->name(), - ); - - if ($node instanceof DirectoryNode) { - $buffer .= ' ' . "\n"; - } - - return $buffer; - } - - protected function inactiveBreadcrumb(AbstractNode $node, string $pathToRoot): string - { - return sprintf( - ' ' . "\n", - $pathToRoot, - $node->name(), - ); - } - - protected function pathToRoot(AbstractNode $node): string - { - $id = $node->id(); - $depth = substr_count($id, '/'); - - if ($id !== 'index' && - $node instanceof DirectoryNode) { - $depth++; - } - - return str_repeat('../', $depth); - } - - protected function coverageBar(float $percent): string - { - $level = $this->colorLevel($percent); - - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'coverage_bar_branch.html' : 'coverage_bar.html'); - $template = new Template( - $templateName, - '{{', - '}}', - ); - - $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); - - return $template->render(); - } - - protected function colorLevel(float $percent): string - { - if ($percent <= $this->thresholds->lowUpperBound()) { - return 'danger'; - } - - if ($percent > $this->thresholds->lowUpperBound() && - $percent < $this->thresholds->highLowerBound()) { - return 'warning'; - } - - return 'success'; - } - - private function runtimeString(): string - { - $runtime = new Runtime; - - return sprintf( - '%s %s', - $runtime->getVendorUrl(), - $runtime->getName(), - $runtime->getVersion(), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php deleted file mode 100644 index 305c7fa1..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use function array_values; -use function asort; -use function assert; -use function count; -use function explode; -use function floor; -use function json_encode; -use function sprintf; -use function str_replace; -use function uasort; -use function usort; -use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; -use SebastianBergmann\CodeCoverage\Node\AbstractNode; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; -use SebastianBergmann\Template\Exception; -use SebastianBergmann\Template\Template; - -/** - * @phpstan-import-type ProcessedClassType from FileNode - * @phpstan-import-type ProcessedTraitType from FileNode - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Dashboard extends Renderer -{ - public function render(DirectoryNode $node, string $file): void - { - $classes = $node->classesAndTraits(); - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'dashboard_branch.html' : 'dashboard.html'); - $template = new Template( - $templateName, - '{{', - '}}', - ); - - $this->setCommonTemplateVariables($template, $node); - - $baseLink = $node->id() . '/'; - $complexity = $this->complexity($classes, $baseLink); - $coverageDistribution = $this->coverageDistribution($classes); - $insufficientCoverage = $this->insufficientCoverage($classes, $baseLink); - $projectRisks = $this->projectRisks($classes, $baseLink); - - $template->setVar( - [ - 'insufficient_coverage_classes' => $insufficientCoverage['class'], - 'insufficient_coverage_methods' => $insufficientCoverage['method'], - 'project_risks_classes' => $projectRisks['class'], - 'project_risks_methods' => $projectRisks['method'], - 'complexity_class' => $complexity['class'], - 'complexity_method' => $complexity['method'], - 'class_coverage_distribution' => $coverageDistribution['class'], - 'method_coverage_distribution' => $coverageDistribution['method'], - ], - ); - - try { - $template->renderTo($file); - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } - - protected function activeBreadcrumb(AbstractNode $node): string - { - return sprintf( - ' ' . "\n" . - ' ' . "\n", - $node->name(), - ); - } - - /** - * @param array $classes - * - * @return array{class: non-empty-string, method: non-empty-string} - */ - private function complexity(array $classes, string $baseLink): array - { - $result = ['class' => [], 'method' => []]; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($className !== '*') { - $methodName = $className . '::' . $methodName; - } - - $result['method'][] = [ - $method['coverage'], - $method['ccn'], - str_replace($baseLink, '', $method['link']), - $methodName, - $method['crap'], - ]; - } - - $result['class'][] = [ - $class['coverage'], - $class['ccn'], - str_replace($baseLink, '', $class['link']), - $className, - $class['crap'], - ]; - } - - usort($result['class'], static fn (mixed $a, mixed $b) => ($a[0] <=> $b[0])); - usort($result['method'], static fn (mixed $a, mixed $b) => ($a[0] <=> $b[0])); - - $class = json_encode($result['class']); - - assert($class !== false); - - $method = json_encode($result['method']); - - assert($method !== false); - - return ['class' => $class, 'method' => $method]; - } - - /** - * @param array $classes - * - * @return array{class: non-empty-string, method: non-empty-string} - */ - private function coverageDistribution(array $classes): array - { - $result = [ - 'class' => [ - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0, - ], - 'method' => [ - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0, - ], - ]; - - foreach ($classes as $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] === 0) { - $result['method']['0%']++; - } elseif ($method['coverage'] === 100) { - $result['method']['100%']++; - } else { - $key = floor($method['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['method'][$key]++; - } - } - - if ($class['coverage'] === 0) { - $result['class']['0%']++; - } elseif ($class['coverage'] === 100) { - $result['class']['100%']++; - } else { - $key = floor($class['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['class'][$key]++; - } - } - - $class = json_encode(array_values($result['class'])); - - assert($class !== false); - - $method = json_encode(array_values($result['method'])); - - assert($method !== false); - - return ['class' => $class, 'method' => $method]; - } - - /** - * @param array $classes - * - * @return array{class: string, method: string} - */ - private function insufficientCoverage(array $classes, string $baseLink): array - { - $leastTestedClasses = []; - $leastTestedMethods = []; - $result = ['class' => '', 'method' => '']; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->thresholds->highLowerBound()) { - $key = $methodName; - - if ($className !== '*') { - $key = $className . '::' . $methodName; - } - - $leastTestedMethods[$key] = $method['coverage']; - } - } - - if ($class['coverage'] < $this->thresholds->highLowerBound()) { - $leastTestedClasses[$className] = $class['coverage']; - } - } - - asort($leastTestedClasses); - asort($leastTestedMethods); - - foreach ($leastTestedClasses as $className => $coverage) { - $result['class'] .= sprintf( - ' %s%d%%' . "\n", - str_replace($baseLink, '', $classes[$className]['link']), - $className, - $coverage, - ); - } - - foreach ($leastTestedMethods as $methodName => $coverage) { - [$class, $method] = explode('::', $methodName); - - $result['method'] .= sprintf( - ' %s%d%%' . "\n", - str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), - $methodName, - $method, - $coverage, - ); - } - - return $result; - } - - /** - * @param array $classes - * - * @return array{class: string, method: string} - */ - private function projectRisks(array $classes, string $baseLink): array - { - $classRisks = []; - $methodRisks = []; - $result = ['class' => '', 'method' => '']; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->thresholds->highLowerBound() && $method['ccn'] > 1) { - $key = $methodName; - - if ($className !== '*') { - $key = $className . '::' . $methodName; - } - - $methodRisks[$key] = $method; - } - } - - if ($class['coverage'] < $this->thresholds->highLowerBound() && - $class['ccn'] > count($class['methods'])) { - $classRisks[$className] = $class; - } - } - - uasort($classRisks, static function (array $a, array $b) - { - return ((int) ($a['crap']) <=> (int) ($b['crap'])) * -1; - }); - uasort($methodRisks, static function (array $a, array $b) - { - return ((int) ($a['crap']) <=> (int) ($b['crap'])) * -1; - }); - - foreach ($classRisks as $className => $class) { - $result['class'] .= sprintf( - ' %s%.1f%%%d%d' . "\n", - str_replace($baseLink, '', $classes[$className]['link']), - $className, - $class['coverage'], - $class['ccn'], - $class['crap'], - ); - } - - foreach ($methodRisks as $methodName => $methodVals) { - [$class, $method] = explode('::', $methodName); - - $result['method'] .= sprintf( - ' %s%.1f%%%d%d' . "\n", - str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), - $methodName, - $method, - $methodVals['coverage'], - $methodVals['ccn'], - $methodVals['crap'], - ); - } - - return $result; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php deleted file mode 100644 index 1d7334b3..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use function count; -use function sprintf; -use function str_repeat; -use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; -use SebastianBergmann\CodeCoverage\Node\AbstractNode as Node; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\Template\Exception; -use SebastianBergmann\Template\Template; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends Renderer -{ - public function render(DirectoryNode $node, string $file): void - { - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'directory_branch.html' : 'directory.html'); - $template = new Template($templateName, '{{', '}}'); - - $this->setCommonTemplateVariables($template, $node); - - $items = $this->renderItem($node, true); - - foreach ($node->directories() as $item) { - $items .= $this->renderItem($item); - } - - foreach ($node->files() as $item) { - $items .= $this->renderItem($item); - } - - $template->setVar( - [ - 'id' => $node->id(), - 'items' => $items, - ], - ); - - try { - $template->renderTo($file); - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } - - private function renderItem(Node $node, bool $total = false): string - { - $data = [ - 'numClasses' => $node->numberOfClassesAndTraits(), - 'numTestedClasses' => $node->numberOfTestedClassesAndTraits(), - 'numMethods' => $node->numberOfFunctionsAndMethods(), - 'numTestedMethods' => $node->numberOfTestedFunctionsAndMethods(), - 'linesExecutedPercent' => $node->percentageOfExecutedLines()->asFloat(), - 'linesExecutedPercentAsString' => $node->percentageOfExecutedLines()->asString(), - 'numExecutedLines' => $node->numberOfExecutedLines(), - 'numExecutableLines' => $node->numberOfExecutableLines(), - 'branchesExecutedPercent' => $node->percentageOfExecutedBranches()->asFloat(), - 'branchesExecutedPercentAsString' => $node->percentageOfExecutedBranches()->asString(), - 'numExecutedBranches' => $node->numberOfExecutedBranches(), - 'numExecutableBranches' => $node->numberOfExecutableBranches(), - 'pathsExecutedPercent' => $node->percentageOfExecutedPaths()->asFloat(), - 'pathsExecutedPercentAsString' => $node->percentageOfExecutedPaths()->asString(), - 'numExecutedPaths' => $node->numberOfExecutedPaths(), - 'numExecutablePaths' => $node->numberOfExecutablePaths(), - 'testedMethodsPercent' => $node->percentageOfTestedFunctionsAndMethods()->asFloat(), - 'testedMethodsPercentAsString' => $node->percentageOfTestedFunctionsAndMethods()->asString(), - 'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(), - 'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(), - ]; - - if ($total) { - $data['name'] = 'Total'; - } else { - $up = str_repeat('../', count($node->pathAsArray()) - 2); - $data['icon'] = sprintf('', $up); - - if ($node instanceof DirectoryNode) { - $data['name'] = sprintf( - '%s', - $node->name(), - $node->name(), - ); - $data['icon'] = sprintf('', $up); - } elseif ($this->hasBranchCoverage) { - $data['name'] = sprintf( - '%s [line] [branch] [path]', - $node->name(), - $node->name(), - $node->name(), - $node->name(), - ); - } else { - $data['name'] = sprintf( - '%s', - $node->name(), - $node->name(), - ); - } - } - - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'directory_item_branch.html' : 'directory_item.html'); - - return $this->renderItemTemplate( - new Template($templateName, '{{', '}}'), - $data, - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php deleted file mode 100644 index 09dbe31f..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php +++ /dev/null @@ -1,1163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Html; - -use const ENT_COMPAT; -use const ENT_HTML401; -use const ENT_SUBSTITUTE; -use const T_ABSTRACT; -use const T_ARRAY; -use const T_AS; -use const T_BREAK; -use const T_CALLABLE; -use const T_CASE; -use const T_CATCH; -use const T_CLASS; -use const T_CLONE; -use const T_COMMENT; -use const T_CONST; -use const T_CONTINUE; -use const T_DECLARE; -use const T_DEFAULT; -use const T_DO; -use const T_DOC_COMMENT; -use const T_ECHO; -use const T_ELSE; -use const T_ELSEIF; -use const T_EMPTY; -use const T_ENDDECLARE; -use const T_ENDFOR; -use const T_ENDFOREACH; -use const T_ENDIF; -use const T_ENDSWITCH; -use const T_ENDWHILE; -use const T_ENUM; -use const T_EVAL; -use const T_EXIT; -use const T_EXTENDS; -use const T_FINAL; -use const T_FINALLY; -use const T_FN; -use const T_FOR; -use const T_FOREACH; -use const T_FUNCTION; -use const T_GLOBAL; -use const T_GOTO; -use const T_HALT_COMPILER; -use const T_IF; -use const T_IMPLEMENTS; -use const T_INCLUDE; -use const T_INCLUDE_ONCE; -use const T_INLINE_HTML; -use const T_INSTANCEOF; -use const T_INSTEADOF; -use const T_INTERFACE; -use const T_ISSET; -use const T_LIST; -use const T_MATCH; -use const T_NAMESPACE; -use const T_NEW; -use const T_PRINT; -use const T_PRIVATE; -use const T_PROTECTED; -use const T_PUBLIC; -use const T_READONLY; -use const T_REQUIRE; -use const T_REQUIRE_ONCE; -use const T_RETURN; -use const T_STATIC; -use const T_SWITCH; -use const T_THROW; -use const T_TRAIT; -use const T_TRY; -use const T_UNSET; -use const T_USE; -use const T_VAR; -use const T_WHILE; -use const T_YIELD; -use const T_YIELD_FROM; -use const TOKEN_PARSE; -use function array_key_exists; -use function array_keys; -use function array_merge; -use function array_pop; -use function array_unique; -use function count; -use function explode; -use function file_get_contents; -use function htmlspecialchars; -use function is_string; -use function ksort; -use function range; -use function sort; -use function sprintf; -use function str_ends_with; -use function str_replace; -use function token_get_all; -use function trim; -use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; -use SebastianBergmann\CodeCoverage\Util\Percentage; -use SebastianBergmann\Template\Exception; -use SebastianBergmann\Template\Template; - -/** - * @phpstan-import-type ProcessedClassType from FileNode - * @phpstan-import-type ProcessedTraitType from FileNode - * @phpstan-import-type ProcessedMethodType from FileNode - * @phpstan-import-type ProcessedFunctionType from FileNode - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class File extends Renderer -{ - /** - * @var array - */ - private const array KEYWORD_TOKENS = [ - T_ABSTRACT => true, - T_ARRAY => true, - T_AS => true, - T_BREAK => true, - T_CALLABLE => true, - T_CASE => true, - T_CATCH => true, - T_CLASS => true, - T_CLONE => true, - T_CONST => true, - T_CONTINUE => true, - T_DECLARE => true, - T_DEFAULT => true, - T_DO => true, - T_ECHO => true, - T_ELSE => true, - T_ELSEIF => true, - T_EMPTY => true, - T_ENDDECLARE => true, - T_ENDFOR => true, - T_ENDFOREACH => true, - T_ENDIF => true, - T_ENDSWITCH => true, - T_ENDWHILE => true, - T_ENUM => true, - T_EVAL => true, - T_EXIT => true, - T_EXTENDS => true, - T_FINAL => true, - T_FINALLY => true, - T_FN => true, - T_FOR => true, - T_FOREACH => true, - T_FUNCTION => true, - T_GLOBAL => true, - T_GOTO => true, - T_HALT_COMPILER => true, - T_IF => true, - T_IMPLEMENTS => true, - T_INCLUDE => true, - T_INCLUDE_ONCE => true, - T_INSTANCEOF => true, - T_INSTEADOF => true, - T_INTERFACE => true, - T_ISSET => true, - T_LIST => true, - T_MATCH => true, - T_NAMESPACE => true, - T_NEW => true, - T_PRINT => true, - T_PRIVATE => true, - T_PROTECTED => true, - T_PUBLIC => true, - T_READONLY => true, - T_REQUIRE => true, - T_REQUIRE_ONCE => true, - T_RETURN => true, - T_STATIC => true, - T_SWITCH => true, - T_THROW => true, - T_TRAIT => true, - T_TRY => true, - T_UNSET => true, - T_USE => true, - T_VAR => true, - T_WHILE => true, - T_YIELD => true, - T_YIELD_FROM => true, - ]; - - private const int HTML_SPECIAL_CHARS_FLAGS = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE; - - /** - * @var array> - */ - private static array $formattedSourceCache = []; - - public function render(FileNode $node, string $file): void - { - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'file_branch.html' : 'file.html'); - $template = new Template($templateName, '{{', '}}'); - $this->setCommonTemplateVariables($template, $node); - - $template->setVar( - [ - 'items' => $this->renderItems($node), - 'lines' => $this->renderSourceWithLineCoverage($node), - 'legend' => '

      Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

      ', - 'structure' => '', - ], - ); - - try { - $template->renderTo($file . '.html'); - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - if ($this->hasBranchCoverage) { - $template->setVar( - [ - 'items' => $this->renderItems($node), - 'lines' => $this->renderSourceWithBranchCoverage($node), - 'legend' => '

      Fully coveredPartially coveredNot covered

      ', - 'structure' => $this->renderBranchStructure($node), - ], - ); - - try { - $template->renderTo($file . '_branch.html'); - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - $template->setVar( - [ - 'items' => $this->renderItems($node), - 'lines' => $this->renderSourceWithPathCoverage($node), - 'legend' => '

      Fully coveredPartially coveredNot covered

      ', - 'structure' => $this->renderPathStructure($node), - ], - ); - - try { - $template->renderTo($file . '_path.html'); - } catch (Exception $e) { - throw new FileCouldNotBeWrittenException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } - } - - private function renderItems(FileNode $node): string - { - $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'file_item_branch.html' : 'file_item.html'); - $template = new Template($templateName, '{{', '}}'); - - $methodTemplateName = $this->templatePath . ($this->hasBranchCoverage ? 'method_item_branch.html' : 'method_item.html'); - $methodItemTemplate = new Template( - $methodTemplateName, - '{{', - '}}', - ); - - $items = $this->renderItemTemplate( - $template, - [ - 'name' => 'Total', - 'numClasses' => $node->numberOfClassesAndTraits(), - 'numTestedClasses' => $node->numberOfTestedClassesAndTraits(), - 'numMethods' => $node->numberOfFunctionsAndMethods(), - 'numTestedMethods' => $node->numberOfTestedFunctionsAndMethods(), - 'linesExecutedPercent' => $node->percentageOfExecutedLines()->asFloat(), - 'linesExecutedPercentAsString' => $node->percentageOfExecutedLines()->asString(), - 'numExecutedLines' => $node->numberOfExecutedLines(), - 'numExecutableLines' => $node->numberOfExecutableLines(), - 'branchesExecutedPercent' => $node->percentageOfExecutedBranches()->asFloat(), - 'branchesExecutedPercentAsString' => $node->percentageOfExecutedBranches()->asString(), - 'numExecutedBranches' => $node->numberOfExecutedBranches(), - 'numExecutableBranches' => $node->numberOfExecutableBranches(), - 'pathsExecutedPercent' => $node->percentageOfExecutedPaths()->asFloat(), - 'pathsExecutedPercentAsString' => $node->percentageOfExecutedPaths()->asString(), - 'numExecutedPaths' => $node->numberOfExecutedPaths(), - 'numExecutablePaths' => $node->numberOfExecutablePaths(), - 'testedMethodsPercent' => $node->percentageOfTestedFunctionsAndMethods()->asFloat(), - 'testedMethodsPercentAsString' => $node->percentageOfTestedFunctionsAndMethods()->asString(), - 'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(), - 'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(), - 'crap' => 'CRAP', - ], - ); - - $items .= $this->renderFunctionItems( - $node->functions(), - $methodItemTemplate, - ); - - $items .= $this->renderTraitOrClassItems( - $node->traits(), - $template, - $methodItemTemplate, - ); - - $items .= $this->renderTraitOrClassItems( - $node->classes(), - $template, - $methodItemTemplate, - ); - - return $items; - } - - /** - * @param array $items - */ - private function renderTraitOrClassItems(array $items, Template $template, Template $methodItemTemplate): string - { - $buffer = ''; - - if ($items === []) { - return $buffer; - } - - foreach ($items as $name => $item) { - $numMethods = 0; - $numTestedMethods = 0; - - foreach ($item['methods'] as $method) { - if ($method['executableLines'] > 0) { - $numMethods++; - - if ($method['executedLines'] === $method['executableLines']) { - $numTestedMethods++; - } - } - } - - if ($item['executableLines'] > 0) { - $numClasses = 1; - $numTestedClasses = $numTestedMethods === $numMethods ? 1 : 0; - $linesExecutedPercentAsString = Percentage::fromFractionAndTotal( - $item['executedLines'], - $item['executableLines'], - )->asString(); - $branchesExecutedPercentAsString = Percentage::fromFractionAndTotal( - $item['executedBranches'], - $item['executableBranches'], - )->asString(); - $pathsExecutedPercentAsString = Percentage::fromFractionAndTotal( - $item['executedPaths'], - $item['executablePaths'], - )->asString(); - } else { - $numClasses = 0; - $numTestedClasses = 0; - $linesExecutedPercentAsString = 'n/a'; - $branchesExecutedPercentAsString = 'n/a'; - $pathsExecutedPercentAsString = 'n/a'; - } - - $testedMethodsPercentage = Percentage::fromFractionAndTotal( - $numTestedMethods, - $numMethods, - ); - - $testedClassesPercentage = Percentage::fromFractionAndTotal( - $numTestedMethods === $numMethods ? 1 : 0, - 1, - ); - - $buffer .= $this->renderItemTemplate( - $template, - [ - 'name' => $this->abbreviateClassName($name), - 'numClasses' => $numClasses, - 'numTestedClasses' => $numTestedClasses, - 'numMethods' => $numMethods, - 'numTestedMethods' => $numTestedMethods, - 'linesExecutedPercent' => Percentage::fromFractionAndTotal( - $item['executedLines'], - $item['executableLines'], - )->asFloat(), - 'linesExecutedPercentAsString' => $linesExecutedPercentAsString, - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'branchesExecutedPercent' => Percentage::fromFractionAndTotal( - $item['executedBranches'], - $item['executableBranches'], - )->asFloat(), - 'branchesExecutedPercentAsString' => $branchesExecutedPercentAsString, - 'numExecutedBranches' => $item['executedBranches'], - 'numExecutableBranches' => $item['executableBranches'], - 'pathsExecutedPercent' => Percentage::fromFractionAndTotal( - $item['executedPaths'], - $item['executablePaths'], - )->asFloat(), - 'pathsExecutedPercentAsString' => $pathsExecutedPercentAsString, - 'numExecutedPaths' => $item['executedPaths'], - 'numExecutablePaths' => $item['executablePaths'], - 'testedMethodsPercent' => $testedMethodsPercentage->asFloat(), - 'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(), - 'testedClassesPercent' => $testedClassesPercentage->asFloat(), - 'testedClassesPercentAsString' => $testedClassesPercentage->asString(), - 'crap' => $item['crap'], - ], - ); - - foreach ($item['methods'] as $method) { - $buffer .= $this->renderFunctionOrMethodItem( - $methodItemTemplate, - $method, - ' ', - ); - } - } - - return $buffer; - } - - /** - * @param array $functions - */ - private function renderFunctionItems(array $functions, Template $template): string - { - if ($functions === []) { - return ''; - } - - $buffer = ''; - - foreach ($functions as $function) { - $buffer .= $this->renderFunctionOrMethodItem( - $template, - $function, - ); - } - - return $buffer; - } - - /** - * @param ProcessedFunctionType|ProcessedMethodType $item - */ - private function renderFunctionOrMethodItem(Template $template, array $item, string $indent = ''): string - { - $numMethods = 0; - $numTestedMethods = 0; - - if ($item['executableLines'] > 0) { - $numMethods = 1; - - if ($item['executedLines'] === $item['executableLines']) { - $numTestedMethods = 1; - } - } - - $executedLinesPercentage = Percentage::fromFractionAndTotal( - $item['executedLines'], - $item['executableLines'], - ); - - $executedBranchesPercentage = Percentage::fromFractionAndTotal( - $item['executedBranches'], - $item['executableBranches'], - ); - - $executedPathsPercentage = Percentage::fromFractionAndTotal( - $item['executedPaths'], - $item['executablePaths'], - ); - - $testedMethodsPercentage = Percentage::fromFractionAndTotal( - $numTestedMethods, - 1, - ); - - return $this->renderItemTemplate( - $template, - [ - 'name' => sprintf( - '%s%s', - $indent, - $item['startLine'], - htmlspecialchars($item['signature'], self::HTML_SPECIAL_CHARS_FLAGS), - $item['functionName'] ?? $item['methodName'], - ), - 'numMethods' => $numMethods, - 'numTestedMethods' => $numTestedMethods, - 'linesExecutedPercent' => $executedLinesPercentage->asFloat(), - 'linesExecutedPercentAsString' => $executedLinesPercentage->asString(), - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'branchesExecutedPercent' => $executedBranchesPercentage->asFloat(), - 'branchesExecutedPercentAsString' => $executedBranchesPercentage->asString(), - 'numExecutedBranches' => $item['executedBranches'], - 'numExecutableBranches' => $item['executableBranches'], - 'pathsExecutedPercent' => $executedPathsPercentage->asFloat(), - 'pathsExecutedPercentAsString' => $executedPathsPercentage->asString(), - 'numExecutedPaths' => $item['executedPaths'], - 'numExecutablePaths' => $item['executablePaths'], - 'testedMethodsPercent' => $testedMethodsPercentage->asFloat(), - 'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(), - 'crap' => $item['crap'], - ], - ); - } - - private function renderSourceWithLineCoverage(FileNode $node): string - { - $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); - $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); - - $coverageData = $node->lineCoverageData(); - $testData = $node->testData(); - $codeLines = $this->loadFile($node->pathAsString()); - $lines = ''; - $i = 1; - - foreach ($codeLines as $line) { - $trClass = ''; - $popoverContent = ''; - $popoverTitle = ''; - - if (array_key_exists($i, $coverageData)) { - $numTests = ($coverageData[$i] !== null ? count($coverageData[$i]) : 0); - - if ($coverageData[$i] === null) { - $trClass = 'warning'; - } elseif ($numTests === 0) { - $trClass = 'danger'; - } else { - if ($numTests > 1) { - $popoverTitle = $numTests . ' tests cover line ' . $i; - } else { - $popoverTitle = '1 test covers line ' . $i; - } - - $lineCss = 'covered-by-large-tests'; - $popoverContent = '
        '; - - foreach ($coverageData[$i] as $test) { - if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { - $lineCss = 'covered-by-medium-tests'; - } elseif ($testData[$test]['size'] === 'small') { - $lineCss = 'covered-by-small-tests'; - } - - $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); - } - - $popoverContent .= '
      '; - $trClass = $lineCss . ' popin'; - } - } - - $popover = ''; - - if ($popoverTitle !== '') { - $popover = sprintf( - ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); - - $i++; - } - - $linesTemplate->setVar(['lines' => $lines]); - - return $linesTemplate->render(); - } - - private function renderSourceWithBranchCoverage(FileNode $node): string - { - $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); - $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); - - $functionCoverageData = $node->functionCoverageData(); - $testData = $node->testData(); - $codeLines = $this->loadFile($node->pathAsString()); - - $lineData = []; - - foreach (array_keys($codeLines) as $line) { - $lineData[$line + 1] = [ - 'includedInBranches' => 0, - 'includedInHitBranches' => 0, - 'tests' => [], - ]; - } - - foreach ($functionCoverageData as $method) { - foreach ($method['branches'] as $branch) { - foreach (range($branch['line_start'], $branch['line_end']) as $line) { - if (!isset($lineData[$line])) { // blank line at end of file is sometimes included here - continue; - } - - $lineData[$line]['includedInBranches']++; - - if ($branch['hit']) { - $lineData[$line]['includedInHitBranches']++; - $lineData[$line]['tests'] = array_unique(array_merge($lineData[$line]['tests'], $branch['hit'])); - } - } - } - } - - $lines = ''; - $i = 1; - - /** @var string $line */ - foreach ($codeLines as $line) { - $trClass = ''; - $popover = ''; - - if ($lineData[$i]['includedInBranches'] > 0) { - $lineCss = 'success'; - - if ($lineData[$i]['includedInHitBranches'] === 0) { - $lineCss = 'danger'; - } elseif ($lineData[$i]['includedInHitBranches'] !== $lineData[$i]['includedInBranches']) { - $lineCss = 'warning'; - } - - $popoverContent = '
        '; - - if (count($lineData[$i]['tests']) === 1) { - $popoverTitle = '1 test covers line ' . $i; - } else { - $popoverTitle = count($lineData[$i]['tests']) . ' tests cover line ' . $i; - } - $popoverTitle .= '. These are covering ' . $lineData[$i]['includedInHitBranches'] . ' out of the ' . $lineData[$i]['includedInBranches'] . ' code branches.'; - - foreach ($lineData[$i]['tests'] as $test) { - $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); - } - - $popoverContent .= '
      '; - $trClass = $lineCss . ' popin'; - - $popover = sprintf( - ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); - - $i++; - } - - $linesTemplate->setVar(['lines' => $lines]); - - return $linesTemplate->render(); - } - - private function renderSourceWithPathCoverage(FileNode $node): string - { - $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); - $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); - - $functionCoverageData = $node->functionCoverageData(); - $testData = $node->testData(); - $codeLines = $this->loadFile($node->pathAsString()); - - $lineData = []; - - foreach (array_keys($codeLines) as $line) { - $lineData[$line + 1] = [ - 'includedInPaths' => [], - 'includedInHitPaths' => [], - 'tests' => [], - ]; - } - - foreach ($functionCoverageData as $method) { - foreach ($method['paths'] as $pathId => $path) { - foreach ($path['path'] as $branchTaken) { - foreach (range($method['branches'][$branchTaken]['line_start'], $method['branches'][$branchTaken]['line_end']) as $line) { - if (!isset($lineData[$line])) { - continue; - } - $lineData[$line]['includedInPaths'][] = $pathId; - - if ($path['hit']) { - $lineData[$line]['includedInHitPaths'][] = $pathId; - $lineData[$line]['tests'] = array_unique(array_merge($lineData[$line]['tests'], $path['hit'])); - } - } - } - } - } - - $lines = ''; - $i = 1; - - /** @var string $line */ - foreach ($codeLines as $line) { - $trClass = ''; - $popover = ''; - $includedInPathsCount = count(array_unique($lineData[$i]['includedInPaths'])); - $includedInHitPathsCount = count(array_unique($lineData[$i]['includedInHitPaths'])); - - if ($includedInPathsCount > 0) { - $lineCss = 'success'; - - if ($includedInHitPathsCount === 0) { - $lineCss = 'danger'; - } elseif ($includedInHitPathsCount !== $includedInPathsCount) { - $lineCss = 'warning'; - } - - $popoverContent = '
        '; - - if (count($lineData[$i]['tests']) === 1) { - $popoverTitle = '1 test covers line ' . $i; - } else { - $popoverTitle = count($lineData[$i]['tests']) . ' tests cover line ' . $i; - } - $popoverTitle .= '. These are covering ' . $includedInHitPathsCount . ' out of the ' . $includedInPathsCount . ' code paths.'; - - foreach ($lineData[$i]['tests'] as $test) { - $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); - } - - $popoverContent .= '
      '; - $trClass = $lineCss . ' popin'; - - $popover = sprintf( - ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); - - $i++; - } - - $linesTemplate->setVar(['lines' => $lines]); - - return $linesTemplate->render(); - } - - private function renderBranchStructure(FileNode $node): string - { - $branchesTemplate = new Template($this->templatePath . 'branches.html.dist', '{{', '}}'); - - $coverageData = $node->functionCoverageData(); - $testData = $node->testData(); - $codeLines = $this->loadFile($node->pathAsString()); - $branches = ''; - - ksort($coverageData); - - foreach ($coverageData as $methodName => $methodData) { - if (!$methodData['branches']) { - continue; - } - - $branchStructure = ''; - - foreach ($methodData['branches'] as $branch) { - $branchStructure .= $this->renderBranchLines($branch, $codeLines, $testData); - } - - if ($branchStructure !== '') { // don't show empty branches - $branches .= '
      ' . $this->abbreviateMethodName($methodName) . '
      ' . "\n"; - $branches .= $branchStructure; - } - } - - $branchesTemplate->setVar(['branches' => $branches]); - - return $branchesTemplate->render(); - } - - /** - * @param list $codeLines - */ - private function renderBranchLines(array $branch, array $codeLines, array $testData): string - { - $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); - $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); - - $lines = ''; - - $branchLines = range($branch['line_start'], $branch['line_end']); - sort($branchLines); // sometimes end_line < start_line - - /** @var int $line */ - foreach ($branchLines as $line) { - if (!isset($codeLines[$line])) { // blank line at end of file is sometimes included here - continue; - } - - $popoverContent = ''; - $popoverTitle = ''; - - $numTests = count($branch['hit']); - - if ($numTests === 0) { - $trClass = 'danger'; - } else { - $lineCss = 'covered-by-large-tests'; - $popoverContent = '
        '; - - if ($numTests > 1) { - $popoverTitle = $numTests . ' tests cover this branch'; - } else { - $popoverTitle = '1 test covers this branch'; - } - - foreach ($branch['hit'] as $test) { - if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { - $lineCss = 'covered-by-medium-tests'; - } elseif ($testData[$test]['size'] === 'small') { - $lineCss = 'covered-by-small-tests'; - } - - $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); - } - $trClass = $lineCss . ' popin'; - } - - $popover = ''; - - if ($popoverTitle !== '') { - $popover = sprintf( - ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - $lines .= $this->renderLine($singleLineTemplate, $line, $codeLines[$line - 1], $trClass, $popover); - } - - if ($lines === '') { - return ''; - } - - $linesTemplate->setVar(['lines' => $lines]); - - return $linesTemplate->render(); - } - - private function renderPathStructure(FileNode $node): string - { - $pathsTemplate = new Template($this->templatePath . 'paths.html.dist', '{{', '}}'); - - $coverageData = $node->functionCoverageData(); - $testData = $node->testData(); - $codeLines = $this->loadFile($node->pathAsString()); - $paths = ''; - - ksort($coverageData); - - foreach ($coverageData as $methodName => $methodData) { - if (!$methodData['paths']) { - continue; - } - - $pathStructure = ''; - - if (count($methodData['paths']) > 100) { - $pathStructure .= '

        ' . count($methodData['paths']) . ' is too many paths to sensibly render, consider refactoring your code to bring this number down.

        '; - - continue; - } - - foreach ($methodData['paths'] as $path) { - $pathStructure .= $this->renderPathLines($path, $methodData['branches'], $codeLines, $testData); - } - - if ($pathStructure !== '') { - $paths .= '
        ' . $this->abbreviateMethodName($methodName) . '
        ' . "\n"; - $paths .= $pathStructure; - } - } - - $pathsTemplate->setVar(['paths' => $paths]); - - return $pathsTemplate->render(); - } - - /** - * @param list $codeLines - */ - private function renderPathLines(array $path, array $branches, array $codeLines, array $testData): string - { - $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); - $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); - - $lines = ''; - $first = true; - - foreach ($path['path'] as $branchId) { - if ($first) { - $first = false; - } else { - $lines .= '  ' . "\n"; - } - - $branchLines = range($branches[$branchId]['line_start'], $branches[$branchId]['line_end']); - sort($branchLines); // sometimes end_line < start_line - - /** @var int $line */ - foreach ($branchLines as $line) { - if (!isset($codeLines[$line])) { // blank line at end of file is sometimes included here - continue; - } - - $popoverContent = ''; - $popoverTitle = ''; - - $numTests = count($path['hit']); - - if ($numTests === 0) { - $trClass = 'danger'; - } else { - $lineCss = 'covered-by-large-tests'; - $popoverContent = '
          '; - - if ($numTests > 1) { - $popoverTitle = $numTests . ' tests cover this path'; - } else { - $popoverTitle = '1 test covers this path'; - } - - foreach ($path['hit'] as $test) { - if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { - $lineCss = 'covered-by-medium-tests'; - } elseif ($testData[$test]['size'] === 'small') { - $lineCss = 'covered-by-small-tests'; - } - - $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); - } - - $trClass = $lineCss . ' popin'; - } - - $popover = ''; - - if ($popoverTitle !== '') { - $popover = sprintf( - ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - $lines .= $this->renderLine($singleLineTemplate, $line, $codeLines[$line - 1], $trClass, $popover); - } - } - - if ($lines === '') { - return ''; - } - - $linesTemplate->setVar(['lines' => $lines]); - - return $linesTemplate->render(); - } - - private function renderLine(Template $template, int $lineNumber, string $lineContent, string $class, string $popover): string - { - $template->setVar( - [ - 'lineNumber' => (string) $lineNumber, - 'lineContent' => $lineContent, - 'class' => $class, - 'popover' => $popover, - ], - ); - - return $template->render(); - } - - /** - * @param non-empty-string $file - * - * @return list - */ - private function loadFile(string $file): array - { - if (isset(self::$formattedSourceCache[$file])) { - return self::$formattedSourceCache[$file]; - } - - $buffer = file_get_contents($file); - $tokens = token_get_all($buffer, TOKEN_PARSE); - $result = ['']; - $i = 0; - $stringFlag = false; - $fileEndsWithNewLine = str_ends_with($buffer, "\n"); - - unset($buffer); - - foreach ($tokens as $j => $token) { - if (is_string($token)) { - if ($token === '"' && $tokens[$j - 1] !== '\\') { - $result[$i] .= sprintf( - '%s', - htmlspecialchars($token, self::HTML_SPECIAL_CHARS_FLAGS), - ); - - $stringFlag = !$stringFlag; - } else { - $result[$i] .= sprintf( - '%s', - htmlspecialchars($token, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - continue; - } - - [$token, $value] = $token; - - $value = str_replace( - ["\t", ' '], - ['    ', ' '], - htmlspecialchars($value, self::HTML_SPECIAL_CHARS_FLAGS), - ); - - if ($value === "\n") { - $result[++$i] = ''; - } else { - $lines = explode("\n", $value); - - foreach ($lines as $jj => $line) { - $line = trim($line); - - if ($line !== '') { - if ($stringFlag) { - $colour = 'string'; - } else { - $colour = 'default'; - - if ($this->isInlineHtml($token)) { - $colour = 'html'; - } elseif ($this->isComment($token)) { - $colour = 'comment'; - } elseif ($this->isKeyword($token)) { - $colour = 'keyword'; - } - } - - $result[$i] .= sprintf( - '%s', - $colour, - $line, - ); - } - - if (isset($lines[$jj + 1])) { - $result[++$i] = ''; - } - } - } - } - - if ($fileEndsWithNewLine) { - unset($result[count($result) - 1]); - } - - self::$formattedSourceCache[$file] = $result; - - return $result; - } - - private function abbreviateClassName(string $className): string - { - $tmp = explode('\\', $className); - - if (count($tmp) > 1) { - $className = sprintf( - '%s', - $className, - array_pop($tmp), - ); - } - - return $className; - } - - private function abbreviateMethodName(string $methodName): string - { - $parts = explode('->', $methodName); - - if (count($parts) === 2) { - return $this->abbreviateClassName($parts[0]) . '->' . $parts[1]; - } - - return $methodName; - } - - private function createPopoverContentForTest(string $test, array $testData): string - { - $testCSS = ''; - - switch ($testData['status']) { - case 'success': - $testCSS = match ($testData['size']) { - 'small' => ' class="covered-by-small-tests"', - 'medium' => ' class="covered-by-medium-tests"', - // no break - default => ' class="covered-by-large-tests"', - }; - - break; - - case 'failure': - $testCSS = ' class="danger"'; - - break; - } - - return sprintf( - '%s', - $testCSS, - htmlspecialchars($test, self::HTML_SPECIAL_CHARS_FLAGS), - ); - } - - private function isComment(int $token): bool - { - return $token === T_COMMENT || $token === T_DOC_COMMENT; - } - - private function isInlineHtml(int $token): bool - { - return $token === T_INLINE_HTML; - } - - private function isKeyword(int $token): bool - { - return isset(self::KEYWORD_TOKENS[$token]); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/branches.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/branches.html.dist deleted file mode 100644 index 54770262..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/branches.html.dist +++ /dev/null @@ -1,9 +0,0 @@ -
          -

          Branches

          -

          - Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not - necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once. - Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement - always has an else as part of its logical flow even if you didn't write one. -

          -{{branches}} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist deleted file mode 100644 index 65ccf849..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist +++ /dev/null @@ -1,5 +0,0 @@ -
          -
          - {{percent}}% covered ({{level}}) -
          -
          diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar_branch.html.dist deleted file mode 100644 index 65ccf849..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar_branch.html.dist +++ /dev/null @@ -1,5 +0,0 @@ -
          -
          - {{percent}}% covered ({{level}}) -
          -
          diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/billboard.min.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/billboard.min.css deleted file mode 100644 index 16f2baf4..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/billboard.min.css +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * Copyright (c) 2017 ~ present NAVER Corp. - * billboard.js project is licensed under the MIT license - * - * billboard.js, JavaScript chart library - * https://naver.github.io/billboard.js/ - * - * @version 3.15.1 - */ -.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle,.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{font-size:13px;fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:1em;fill:#fff;white-space:nowrap}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:gray;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;user-select:none}.bb-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;opacity:.9;box-shadow:7px 7px 12px -9px #777;white-space:nowrap}.bb-tooltip tr{border:1px solid #CCC}.bb-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.bb-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{font-size:11px;border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css deleted file mode 100644 index 27d4921c..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css +++ /dev/null @@ -1,6 +0,0 @@ -@charset "UTF-8";/*! - * Bootstrap v5.3.6 (https://getbootstrap.com/) - * Copyright 2011-2025 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--bs-link-color:#6ea8fe;--bs-link-hover-color:#8bb9fe;--bs-link-color-rgb:110,168,254;--bs-link-hover-color-rgb:139,185,254;--bs-code-color:#e685b5;--bs-highlight-color:#dee2e6;--bs-highlight-bg:#664d03;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255, 255, 255, 0.15);--bs-form-valid-color:#75b798;--bs-form-valid-border-color:#75b798;--bs-form-invalid-color:#ea868f;--bs-form-invalid-border-color:#ea868f}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-weight:300;line-height:1.2;font-size:calc(1.625rem + 4.5vw)}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-weight:300;line-height:1.2;font-size:calc(1.575rem + 3.9vw)}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-weight:300;line-height:1.2;font-size:calc(1.525rem + 3.3vw)}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-weight:300;line-height:1.2;font-size:calc(1.475rem + 2.7vw)}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-weight:300;line-height:1.2;font-size:calc(1.425rem + 2.1vw)}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-weight:300;line-height:1.2;font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:var(--bs-secondary-color)}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.66666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.66666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.66666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.66666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.66666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.66666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color-type:initial;--bs-table-bg-type:initial;--bs-table-color-state:initial;--bs-table-bg-state:initial;--bs-table-color:var(--bs-emphasis-color);--bs-table-bg:var(--bs-body-bg);--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-emphasis-color);--bs-table-striped-bg:rgba(var(--bs-emphasis-color-rgb), 0.05);--bs-table-active-color:var(--bs-emphasis-color);--bs-table-active-bg:rgba(var(--bs-emphasis-color-rgb), 0.1);--bs-table-hover-color:var(--bs-emphasis-color);--bs-table-hover-bg:rgba(var(--bs-emphasis-color-rgb), 0.075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;color:var(--bs-table-color-state,var(--bs-table-color-type,var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state,var(--bs-table-bg-type,var(--bs-table-accent-bg)))}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}.table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type:var(--bs-table-striped-color);--bs-table-bg-type:var(--bs-table-striped-bg)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type:var(--bs-table-striped-color);--bs-table-bg-type:var(--bs-table-striped-bg)}.table-active{--bs-table-color-state:var(--bs-table-active-color);--bs-table-bg-state:var(--bs-table-active-bg)}.table-hover>tbody>tr:hover>*{--bs-table-color-state:var(--bs-table-hover-color);--bs-table-bg-state:var(--bs-table-hover-bg)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#a6b5cc;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#b5b6b7;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#a7b9b1;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#a6c3ca;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#ccc2a4;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#c6acae;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#c6c7c8;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#4d5154;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + var(--bs-border-width));padding-bottom:calc(.375rem + var(--bs-border-width));margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + var(--bs-border-width));padding-bottom:calc(.5rem + var(--bs-border-width));font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + var(--bs-border-width));padding-bottom:calc(.25rem + var(--bs-border-width));font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:var(--bs-secondary-color)}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:var(--bs-body-color);background-color:var(--bs-body-bg);border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit{display:block;padding:0}.form-control::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled{background-color:var(--bs-secondary-bg);opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:var(--bs-secondary-bg)}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:var(--bs-body-color);background-color:transparent;border:solid transparent;border-width:var(--bs-border-width) 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2));padding:.25rem .5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));padding:.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2))}textarea.form-control-sm{min-height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2))}textarea.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-control-color{width:3rem;height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2));padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:var(--bs-border-radius)}.form-control-color::-webkit-color-swatch{border:0!important;border-radius:var(--bs-border-radius)}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2))}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-image:var(--bs-form-select-bg-img),var(--bs-form-select-bg-icon,none);background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:var(--bs-secondary-bg)}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--bs-body-color)}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}[data-bs-theme=dark] .form-select{--bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);flex-shrink:0;width:1em;height:1em;margin-top:.25em;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}[data-bs-theme=dark] .form-switch .form-check-input:not(:checked):not(:focus){--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e")}.form-range{width:100%;height:1.5rem;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;-webkit-appearance:none;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;-moz-appearance:none;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}.form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>textarea:focus~label::after,.form-floating>textarea:not(:placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:"";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>textarea:disabled~label::after{background-color:var(--bs-secondary-bg)}.form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}.form-floating>.form-control:disabled~label,.form-floating>:disabled~label{color:#6c757d}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);text-align:center;white-space:nowrap;background-color:var(--bs-tertiary-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius)}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(-1 * var(--bs-border-width));border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:var(--bs-form-valid-border-color);padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:var(--bs-form-valid-border-color)}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:var(--bs-form-valid-border-color)}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:var(--bs-form-valid-color)}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:var(--bs-form-valid-color)}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-invalid-color)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:var(--bs-form-invalid-border-color);padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:var(--bs-form-invalid-border-color)}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{--bs-form-select-bg-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:var(--bs-form-invalid-border-color)}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:var(--bs-form-invalid-color)}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:var(--bs-form-invalid-color)}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:var(--bs-body-color);--bs-btn-bg:transparent;--bs-btn-border-width:var(--bs-border-width);--bs-btn-border-color:transparent;--bs-btn-border-radius:var(--bs-border-radius);--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked:focus-visible+.btn{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:0 0 0 #000;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:var(--bs-border-radius-lg)}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:var(--bs-border-radius-sm)}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:var(--bs-body-color);--bs-dropdown-bg:var(--bs-body-bg);--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:var(--bs-border-radius);--bs-dropdown-border-width:var(--bs-border-width);--bs-dropdown-inner-border-radius:calc(var(--bs-border-radius) - var(--bs-border-width));--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:var(--bs-box-shadow);--bs-dropdown-link-color:var(--bs-body-color);--bs-dropdown-link-hover-color:var(--bs-body-color);--bs-dropdown-link-hover-bg:var(--bs-tertiary-bg);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:var(--bs-tertiary-color);--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0;border-radius:var(--bs-dropdown-item-border-radius,0)}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:var(--bs-border-radius)}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:calc(-1 * var(--bs-border-width))}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:calc(-1 * var(--bs-border-width))}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:nth-child(n+3),.btn-group-vertical>:not(.btn-check)+.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;background:0 0;border:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link:focus-visible{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.nav-link.disabled,.nav-link:disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:var(--bs-border-width);--bs-nav-tabs-border-color:var(--bs-border-color);--bs-nav-tabs-border-radius:var(--bs-border-radius);--bs-nav-tabs-link-hover-border-color:var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);--bs-nav-tabs-link-active-color:var(--bs-emphasis-color);--bs-nav-tabs-link-active-bg:var(--bs-body-bg);--bs-nav-tabs-link-active-border-color:var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:var(--bs-border-radius);--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-underline{--bs-nav-underline-gap:1rem;--bs-nav-underline-border-width:0.125rem;--bs-nav-underline-link-active-color:var(--bs-emphasis-color);gap:var(--bs-nav-underline-gap)}.nav-underline .nav-link{padding-right:0;padding-left:0;border-bottom:var(--bs-nav-underline-border-width) solid transparent}.nav-underline .nav-link:focus,.nav-underline .nav-link:hover{border-bottom-color:currentcolor}.nav-underline .nav-link.active,.nav-underline .show>.nav-link{font-weight:700;color:var(--bs-nav-underline-link-active-color);border-bottom-color:currentcolor}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-grow:1;flex-basis:0;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(var(--bs-emphasis-color-rgb), 0.65);--bs-navbar-hover-color:rgba(var(--bs-emphasis-color-rgb), 0.8);--bs-navbar-disabled-color:rgba(var(--bs-emphasis-color-rgb), 0.3);--bs-navbar-active-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-brand-hover-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");--bs-navbar-toggler-border-color:rgba(var(--bs-emphasis-color-rgb), 0.15);--bs-navbar-toggler-border-radius:var(--bs-border-radius);--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .nav-link.show{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-grow:1;flex-basis:100%;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark,.navbar[data-bs-theme=dark]{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}[data-bs-theme=dark] .navbar-toggler-icon{--bs-navbar-toggler-icon-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-title-color: ;--bs-card-subtitle-color: ;--bs-card-border-width:var(--bs-border-width);--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:var(--bs-border-radius);--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(var(--bs-border-radius) - (var(--bs-border-width)));--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(var(--bs-body-color-rgb), 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:var(--bs-body-bg);--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);color:var(--bs-body-color);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y);color:var(--bs-card-title-color)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0;color:var(--bs-card-subtitle-color)}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child)>.card-header,.card-group>.card:not(:last-child)>.card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child)>.card-footer,.card-group>.card:not(:last-child)>.card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child)>.card-header,.card-group>.card:not(:first-child)>.card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child)>.card-footer,.card-group>.card:not(:first-child)>.card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:var(--bs-body-color);--bs-accordion-bg:var(--bs-body-bg);--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:var(--bs-border-width);--bs-accordion-border-radius:var(--bs-border-radius);--bs-accordion-inner-border-radius:calc(var(--bs-border-radius) - (var(--bs-border-width)));--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:var(--bs-body-color);--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23052c65' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:var(--bs-primary-text-emphasis);--bs-accordion-active-bg:var(--bs-primary-bg-subtle)}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:"";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type>.accordion-header .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type>.accordion-header .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type>.accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush>.accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush>.accordion-item:first-child{border-top:0}.accordion-flush>.accordion-item:last-child{border-bottom:0}.accordion-flush>.accordion-item>.accordion-collapse,.accordion-flush>.accordion-item>.accordion-header .accordion-button,.accordion-flush>.accordion-item>.accordion-header .accordion-button.collapsed{border-radius:0}[data-bs-theme=dark] .accordion-button::after{--bs-accordion-btn-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");--bs-accordion-btn-active-icon:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e")}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:var(--bs-secondary-color);--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:var(--bs-body-bg);--bs-pagination-border-width:var(--bs-border-width);--bs-pagination-border-color:var(--bs-border-color);--bs-pagination-border-radius:var(--bs-border-radius);--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:var(--bs-tertiary-bg);--bs-pagination-hover-border-color:var(--bs-border-color);--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:var(--bs-secondary-bg);--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:var(--bs-secondary-color);--bs-pagination-disabled-bg:var(--bs-secondary-bg);--bs-pagination-disabled-border-color:var(--bs-border-color);display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:calc(-1 * var(--bs-border-width))}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:var(--bs-border-radius-lg)}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:var(--bs-border-radius-sm)}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:var(--bs-border-radius);display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:var(--bs-border-width) solid var(--bs-alert-border-color);--bs-alert-border-radius:var(--bs-border-radius);--bs-alert-link-color:inherit;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700;color:var(--bs-alert-link-color)}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:var(--bs-primary-text-emphasis);--bs-alert-bg:var(--bs-primary-bg-subtle);--bs-alert-border-color:var(--bs-primary-border-subtle);--bs-alert-link-color:var(--bs-primary-text-emphasis)}.alert-secondary{--bs-alert-color:var(--bs-secondary-text-emphasis);--bs-alert-bg:var(--bs-secondary-bg-subtle);--bs-alert-border-color:var(--bs-secondary-border-subtle);--bs-alert-link-color:var(--bs-secondary-text-emphasis)}.alert-success{--bs-alert-color:var(--bs-success-text-emphasis);--bs-alert-bg:var(--bs-success-bg-subtle);--bs-alert-border-color:var(--bs-success-border-subtle);--bs-alert-link-color:var(--bs-success-text-emphasis)}.alert-info{--bs-alert-color:var(--bs-info-text-emphasis);--bs-alert-bg:var(--bs-info-bg-subtle);--bs-alert-border-color:var(--bs-info-border-subtle);--bs-alert-link-color:var(--bs-info-text-emphasis)}.alert-warning{--bs-alert-color:var(--bs-warning-text-emphasis);--bs-alert-bg:var(--bs-warning-bg-subtle);--bs-alert-border-color:var(--bs-warning-border-subtle);--bs-alert-link-color:var(--bs-warning-text-emphasis)}.alert-danger{--bs-alert-color:var(--bs-danger-text-emphasis);--bs-alert-bg:var(--bs-danger-bg-subtle);--bs-alert-border-color:var(--bs-danger-border-subtle);--bs-alert-link-color:var(--bs-danger-text-emphasis)}.alert-light{--bs-alert-color:var(--bs-light-text-emphasis);--bs-alert-bg:var(--bs-light-bg-subtle);--bs-alert-border-color:var(--bs-light-border-subtle);--bs-alert-link-color:var(--bs-light-text-emphasis)}.alert-dark{--bs-alert-color:var(--bs-dark-text-emphasis);--bs-alert-bg:var(--bs-dark-bg-subtle);--bs-alert-border-color:var(--bs-dark-border-subtle);--bs-alert-link-color:var(--bs-dark-text-emphasis)}@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}.progress,.progress-stacked{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:var(--bs-secondary-bg);--bs-progress-border-radius:var(--bs-border-radius);--bs-progress-box-shadow:var(--bs-box-shadow-inset);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-stacked>.progress{overflow:visible}.progress-stacked>.progress>.progress-bar{width:100%}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:var(--bs-body-color);--bs-list-group-bg:var(--bs-body-bg);--bs-list-group-border-color:var(--bs-border-color);--bs-list-group-border-width:var(--bs-border-width);--bs-list-group-border-radius:var(--bs-border-radius);--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:var(--bs-secondary-color);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-tertiary-bg);--bs-list-group-action-active-color:var(--bs-body-color);--bs-list-group-action-active-bg:var(--bs-secondary-bg);--bs-list-group-disabled-color:var(--bs-secondary-color);--bs-list-group-disabled-bg:var(--bs-body-bg);--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:not(.active):focus,.list-group-item-action:not(.active):hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:not(.active):active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{--bs-list-group-color:var(--bs-primary-text-emphasis);--bs-list-group-bg:var(--bs-primary-bg-subtle);--bs-list-group-border-color:var(--bs-primary-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-primary-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-primary-border-subtle);--bs-list-group-active-color:var(--bs-primary-bg-subtle);--bs-list-group-active-bg:var(--bs-primary-text-emphasis);--bs-list-group-active-border-color:var(--bs-primary-text-emphasis)}.list-group-item-secondary{--bs-list-group-color:var(--bs-secondary-text-emphasis);--bs-list-group-bg:var(--bs-secondary-bg-subtle);--bs-list-group-border-color:var(--bs-secondary-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-secondary-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-secondary-border-subtle);--bs-list-group-active-color:var(--bs-secondary-bg-subtle);--bs-list-group-active-bg:var(--bs-secondary-text-emphasis);--bs-list-group-active-border-color:var(--bs-secondary-text-emphasis)}.list-group-item-success{--bs-list-group-color:var(--bs-success-text-emphasis);--bs-list-group-bg:var(--bs-success-bg-subtle);--bs-list-group-border-color:var(--bs-success-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-success-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-success-border-subtle);--bs-list-group-active-color:var(--bs-success-bg-subtle);--bs-list-group-active-bg:var(--bs-success-text-emphasis);--bs-list-group-active-border-color:var(--bs-success-text-emphasis)}.list-group-item-info{--bs-list-group-color:var(--bs-info-text-emphasis);--bs-list-group-bg:var(--bs-info-bg-subtle);--bs-list-group-border-color:var(--bs-info-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-info-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-info-border-subtle);--bs-list-group-active-color:var(--bs-info-bg-subtle);--bs-list-group-active-bg:var(--bs-info-text-emphasis);--bs-list-group-active-border-color:var(--bs-info-text-emphasis)}.list-group-item-warning{--bs-list-group-color:var(--bs-warning-text-emphasis);--bs-list-group-bg:var(--bs-warning-bg-subtle);--bs-list-group-border-color:var(--bs-warning-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-warning-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-warning-border-subtle);--bs-list-group-active-color:var(--bs-warning-bg-subtle);--bs-list-group-active-bg:var(--bs-warning-text-emphasis);--bs-list-group-active-border-color:var(--bs-warning-text-emphasis)}.list-group-item-danger{--bs-list-group-color:var(--bs-danger-text-emphasis);--bs-list-group-bg:var(--bs-danger-bg-subtle);--bs-list-group-border-color:var(--bs-danger-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-danger-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-danger-border-subtle);--bs-list-group-active-color:var(--bs-danger-bg-subtle);--bs-list-group-active-bg:var(--bs-danger-text-emphasis);--bs-list-group-active-border-color:var(--bs-danger-text-emphasis)}.list-group-item-light{--bs-list-group-color:var(--bs-light-text-emphasis);--bs-list-group-bg:var(--bs-light-bg-subtle);--bs-list-group-border-color:var(--bs-light-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-light-border-subtle);--bs-list-group-active-color:var(--bs-light-bg-subtle);--bs-list-group-active-bg:var(--bs-light-text-emphasis);--bs-list-group-active-border-color:var(--bs-light-text-emphasis)}.list-group-item-dark{--bs-list-group-color:var(--bs-dark-text-emphasis);--bs-list-group-bg:var(--bs-dark-bg-subtle);--bs-list-group-border-color:var(--bs-dark-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-dark-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-dark-border-subtle);--bs-list-group-active-color:var(--bs-dark-bg-subtle);--bs-list-group-active-bg:var(--bs-dark-text-emphasis);--bs-list-group-active-border-color:var(--bs-dark-text-emphasis)}.btn-close{--bs-btn-close-color:#000;--bs-btn-close-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e");--bs-btn-close-opacity:0.5;--bs-btn-close-hover-opacity:0.75;--bs-btn-close-focus-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-btn-close-focus-opacity:1;--bs-btn-close-disabled-opacity:0.25;box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:var(--bs-btn-close-color);background:transparent var(--bs-btn-close-bg) center/1em auto no-repeat;filter:var(--bs-btn-close-filter);border:0;border-radius:.375rem;opacity:var(--bs-btn-close-opacity)}.btn-close:hover{color:var(--bs-btn-close-color);text-decoration:none;opacity:var(--bs-btn-close-hover-opacity)}.btn-close:focus{outline:0;box-shadow:var(--bs-btn-close-focus-shadow);opacity:var(--bs-btn-close-focus-opacity)}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--bs-btn-close-disabled-opacity)}.btn-close-white{--bs-btn-close-filter:invert(1) grayscale(100%) brightness(200%)}:root,[data-bs-theme=light]{--bs-btn-close-filter: }[data-bs-theme=dark]{--bs-btn-close-filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(var(--bs-body-bg-rgb), 0.85);--bs-toast-border-width:var(--bs-border-width);--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:var(--bs-border-radius);--bs-toast-box-shadow:var(--bs-box-shadow);--bs-toast-header-color:var(--bs-secondary-color);--bs-toast-header-bg:rgba(var(--bs-body-bg-rgb), 0.85);--bs-toast-header-border-color:var(--bs-border-color-translucent);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color:var(--bs-body-color);--bs-modal-bg:var(--bs-body-bg);--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:var(--bs-border-width);--bs-modal-border-radius:var(--bs-border-radius-lg);--bs-modal-box-shadow:var(--bs-box-shadow-sm);--bs-modal-inner-border-radius:calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:var(--bs-border-width);--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transform:translate(0,-50px);transition:transform .3s ease-out}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:var(--bs-box-shadow)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:var(--bs-body-bg);--bs-tooltip-bg:var(--bs-emphasis-color);--bs-tooltip-border-radius:var(--bs-border-radius);--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:calc(-1 * var(--bs-tooltip-arrow-height))}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:calc(-1 * var(--bs-tooltip-arrow-height))}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:var(--bs-body-bg);--bs-popover-border-width:var(--bs-border-width);--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:var(--bs-border-radius-lg);--bs-popover-inner-border-radius:calc(var(--bs-border-radius-lg) - var(--bs-border-width));--bs-popover-box-shadow:var(--bs-box-shadow);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color:inherit;--bs-popover-header-bg:var(--bs-secondary-bg);--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:var(--bs-body-color);--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:"";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;filter:var(--bs-carousel-control-icon-filter);border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:var(--bs-carousel-indicator-active-bg);background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:var(--bs-carousel-caption-color);text-align:center}.carousel-dark{--bs-carousel-indicator-active-bg:#000;--bs-carousel-caption-color:#000;--bs-carousel-control-icon-filter:invert(1) grayscale(100)}:root,[data-bs-theme=light]{--bs-carousel-indicator-active-bg:#fff;--bs-carousel-caption-color:#fff;--bs-carousel-control-icon-filter: }[data-bs-theme=dark]{--bs-carousel-indicator-active-bg:#000;--bs-carousel-caption-color:#000;--bs-carousel-control-icon-filter:invert(1) grayscale(100)}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color:var(--bs-body-color);--bs-offcanvas-bg:var(--bs-body-bg);--bs-offcanvas-border-width:var(--bs-border-width);--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:var(--bs-box-shadow-sm);--bs-offcanvas-transition:transform 0.3s ease-in-out;--bs-offcanvas-title-line-height:1.5}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y));margin-left:auto}.offcanvas-title{margin-bottom:0;line-height:var(--bs-offcanvas-title-line-height)}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.text-bg-primary{color:#fff!important;background-color:RGBA(var(--bs-primary-rgb),var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(var(--bs-secondary-rgb),var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(var(--bs-success-rgb),var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(var(--bs-info-rgb),var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(var(--bs-warning-rgb),var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(var(--bs-danger-rgb),var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(var(--bs-light-rgb),var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(var(--bs-dark-rgb),var(--bs-bg-opacity,1))!important}.link-primary{color:RGBA(var(--bs-primary-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-primary-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-primary-rgb),var(--bs-link-underline-opacity,1))!important}.link-primary:focus,.link-primary:hover{color:RGBA(10,88,202,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(10,88,202,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(10,88,202,var(--bs-link-underline-opacity,1))!important}.link-secondary{color:RGBA(var(--bs-secondary-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-secondary-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-secondary-rgb),var(--bs-link-underline-opacity,1))!important}.link-secondary:focus,.link-secondary:hover{color:RGBA(86,94,100,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(86,94,100,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(86,94,100,var(--bs-link-underline-opacity,1))!important}.link-success{color:RGBA(var(--bs-success-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-success-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-success-rgb),var(--bs-link-underline-opacity,1))!important}.link-success:focus,.link-success:hover{color:RGBA(20,108,67,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(20,108,67,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(20,108,67,var(--bs-link-underline-opacity,1))!important}.link-info{color:RGBA(var(--bs-info-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-info-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-info-rgb),var(--bs-link-underline-opacity,1))!important}.link-info:focus,.link-info:hover{color:RGBA(61,213,243,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(61,213,243,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(61,213,243,var(--bs-link-underline-opacity,1))!important}.link-warning{color:RGBA(var(--bs-warning-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-warning-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-warning-rgb),var(--bs-link-underline-opacity,1))!important}.link-warning:focus,.link-warning:hover{color:RGBA(255,205,57,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(255,205,57,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(255,205,57,var(--bs-link-underline-opacity,1))!important}.link-danger{color:RGBA(var(--bs-danger-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-danger-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-danger-rgb),var(--bs-link-underline-opacity,1))!important}.link-danger:focus,.link-danger:hover{color:RGBA(176,42,55,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(176,42,55,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(176,42,55,var(--bs-link-underline-opacity,1))!important}.link-light{color:RGBA(var(--bs-light-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-light-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-light-rgb),var(--bs-link-underline-opacity,1))!important}.link-light:focus,.link-light:hover{color:RGBA(249,250,251,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(249,250,251,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(249,250,251,var(--bs-link-underline-opacity,1))!important}.link-dark{color:RGBA(var(--bs-dark-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-dark-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-dark-rgb),var(--bs-link-underline-opacity,1))!important}.link-dark:focus,.link-dark:hover{color:RGBA(26,30,33,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(26,30,33,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(26,30,33,var(--bs-link-underline-opacity,1))!important}.link-body-emphasis{color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,1))!important}.link-body-emphasis:focus,.link-body-emphasis:hover{color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-opacity,.75))!important;-webkit-text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,0.75))!important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,0.75))!important}.focus-ring:focus{outline:0;box-shadow:var(--bs-focus-ring-x,0) var(--bs-focus-ring-y,0) var(--bs-focus-ring-blur,0) var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.icon-link{display:inline-flex;gap:.375rem;align-items:center;-webkit-text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,0.5));text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,0.5));text-underline-offset:0.25em;-webkit-backface-visibility:hidden;backface-visibility:hidden}.icon-link>.bi{flex-shrink:0;width:1em;height:1em;fill:currentcolor;transition:.2s ease-in-out transform}@media (prefers-reduced-motion:reduce){.icon-link>.bi{transition:none}}.icon-link-hover:focus-visible>.bi,.icon-link-hover:hover>.bi{transform:var(--bs-icon-link-transform,translate3d(.25em,0,0))}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption),.visually-hidden:not(caption){position:absolute!important}.visually-hidden *,.visually-hidden-focusable:not(:focus):not(:focus-within) *{overflow:hidden!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-none{-o-object-fit:none!important;object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:var(--bs-box-shadow)!important}.shadow-sm{box-shadow:var(--bs-box-shadow-sm)!important}.shadow-lg{box-shadow:var(--bs-box-shadow-lg)!important}.shadow-none{box-shadow:none!important}.focus-ring-primary{--bs-focus-ring-color:rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-secondary{--bs-focus-ring-color:rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-success{--bs-focus-ring-color:rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity))}.focus-ring-info{--bs-focus-ring-color:rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity))}.focus-ring-warning{--bs-focus-ring-color:rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity))}.focus-ring-danger{--bs-focus-ring-color:rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity))}.focus-ring-light{--bs-focus-ring-color:rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity))}.focus-ring-dark{--bs-focus-ring-color:rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity))}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-black{--bs-border-opacity:1;border-color:rgba(var(--bs-black-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-primary-subtle{border-color:var(--bs-primary-border-subtle)!important}.border-secondary-subtle{border-color:var(--bs-secondary-border-subtle)!important}.border-success-subtle{border-color:var(--bs-success-border-subtle)!important}.border-info-subtle{border-color:var(--bs-info-border-subtle)!important}.border-warning-subtle{border-color:var(--bs-warning-border-subtle)!important}.border-danger-subtle{border-color:var(--bs-danger-border-subtle)!important}.border-light-subtle{border-color:var(--bs-light-border-subtle)!important}.border-dark-subtle{border-color:var(--bs-dark-border-subtle)!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.row-gap-0{row-gap:0!important}.row-gap-1{row-gap:.25rem!important}.row-gap-2{row-gap:.5rem!important}.row-gap-3{row-gap:1rem!important}.row-gap-4{row-gap:1.5rem!important}.row-gap-5{row-gap:3rem!important}.column-gap-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-lighter{font-weight:lighter!important}.fw-light{font-weight:300!important}.fw-normal{font-weight:400!important}.fw-medium{font-weight:500!important}.fw-semibold{font-weight:600!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:var(--bs-secondary-color)!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-body-secondary{--bs-text-opacity:1;color:var(--bs-secondary-color)!important}.text-body-tertiary{--bs-text-opacity:1;color:var(--bs-tertiary-color)!important}.text-body-emphasis{--bs-text-opacity:1;color:var(--bs-emphasis-color)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.text-primary-emphasis{color:var(--bs-primary-text-emphasis)!important}.text-secondary-emphasis{color:var(--bs-secondary-text-emphasis)!important}.text-success-emphasis{color:var(--bs-success-text-emphasis)!important}.text-info-emphasis{color:var(--bs-info-text-emphasis)!important}.text-warning-emphasis{color:var(--bs-warning-text-emphasis)!important}.text-danger-emphasis{color:var(--bs-danger-text-emphasis)!important}.text-light-emphasis{color:var(--bs-light-text-emphasis)!important}.text-dark-emphasis{color:var(--bs-dark-text-emphasis)!important}.link-opacity-10{--bs-link-opacity:0.1}.link-opacity-10-hover:hover{--bs-link-opacity:0.1}.link-opacity-25{--bs-link-opacity:0.25}.link-opacity-25-hover:hover{--bs-link-opacity:0.25}.link-opacity-50{--bs-link-opacity:0.5}.link-opacity-50-hover:hover{--bs-link-opacity:0.5}.link-opacity-75{--bs-link-opacity:0.75}.link-opacity-75-hover:hover{--bs-link-opacity:0.75}.link-opacity-100{--bs-link-opacity:1}.link-opacity-100-hover:hover{--bs-link-opacity:1}.link-offset-1{text-underline-offset:0.125em!important}.link-offset-1-hover:hover{text-underline-offset:0.125em!important}.link-offset-2{text-underline-offset:0.25em!important}.link-offset-2-hover:hover{text-underline-offset:0.25em!important}.link-offset-3{text-underline-offset:0.375em!important}.link-offset-3-hover:hover{text-underline-offset:0.375em!important}.link-underline-primary{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-primary-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-primary-rgb),var(--bs-link-underline-opacity))!important}.link-underline-secondary{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-secondary-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-secondary-rgb),var(--bs-link-underline-opacity))!important}.link-underline-success{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-success-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-success-rgb),var(--bs-link-underline-opacity))!important}.link-underline-info{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-info-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-info-rgb),var(--bs-link-underline-opacity))!important}.link-underline-warning{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-warning-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-warning-rgb),var(--bs-link-underline-opacity))!important}.link-underline-danger{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-danger-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-danger-rgb),var(--bs-link-underline-opacity))!important}.link-underline-light{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-light-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-light-rgb),var(--bs-link-underline-opacity))!important}.link-underline-dark{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-dark-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-dark-rgb),var(--bs-link-underline-opacity))!important}.link-underline{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-underline-opacity,1))!important}.link-underline-opacity-0{--bs-link-underline-opacity:0}.link-underline-opacity-0-hover:hover{--bs-link-underline-opacity:0}.link-underline-opacity-10{--bs-link-underline-opacity:0.1}.link-underline-opacity-10-hover:hover{--bs-link-underline-opacity:0.1}.link-underline-opacity-25{--bs-link-underline-opacity:0.25}.link-underline-opacity-25-hover:hover{--bs-link-underline-opacity:0.25}.link-underline-opacity-50{--bs-link-underline-opacity:0.5}.link-underline-opacity-50-hover:hover{--bs-link-underline-opacity:0.5}.link-underline-opacity-75{--bs-link-underline-opacity:0.75}.link-underline-opacity-75-hover:hover{--bs-link-underline-opacity:0.75}.link-underline-opacity-100{--bs-link-underline-opacity:1}.link-underline-opacity-100-hover:hover{--bs-link-underline-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-body-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-bg-rgb),var(--bs-bg-opacity))!important}.bg-body-tertiary{--bs-bg-opacity:1;background-color:rgba(var(--bs-tertiary-bg-rgb),var(--bs-bg-opacity))!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-primary-subtle{background-color:var(--bs-primary-bg-subtle)!important}.bg-secondary-subtle{background-color:var(--bs-secondary-bg-subtle)!important}.bg-success-subtle{background-color:var(--bs-success-bg-subtle)!important}.bg-info-subtle{background-color:var(--bs-info-bg-subtle)!important}.bg-warning-subtle{background-color:var(--bs-warning-bg-subtle)!important}.bg-danger-subtle{background-color:var(--bs-danger-bg-subtle)!important}.bg-light-subtle{background-color:var(--bs-light-bg-subtle)!important}.bg-dark-subtle{background-color:var(--bs-dark-bg-subtle)!important}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-xxl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-0{border-top-left-radius:0!important;border-top-right-radius:0!important}.rounded-top-1{border-top-left-radius:var(--bs-border-radius-sm)!important;border-top-right-radius:var(--bs-border-radius-sm)!important}.rounded-top-2{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-3{border-top-left-radius:var(--bs-border-radius-lg)!important;border-top-right-radius:var(--bs-border-radius-lg)!important}.rounded-top-4{border-top-left-radius:var(--bs-border-radius-xl)!important;border-top-right-radius:var(--bs-border-radius-xl)!important}.rounded-top-5{border-top-left-radius:var(--bs-border-radius-xxl)!important;border-top-right-radius:var(--bs-border-radius-xxl)!important}.rounded-top-circle{border-top-left-radius:50%!important;border-top-right-radius:50%!important}.rounded-top-pill{border-top-left-radius:var(--bs-border-radius-pill)!important;border-top-right-radius:var(--bs-border-radius-pill)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-0{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-end-1{border-top-right-radius:var(--bs-border-radius-sm)!important;border-bottom-right-radius:var(--bs-border-radius-sm)!important}.rounded-end-2{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-3{border-top-right-radius:var(--bs-border-radius-lg)!important;border-bottom-right-radius:var(--bs-border-radius-lg)!important}.rounded-end-4{border-top-right-radius:var(--bs-border-radius-xl)!important;border-bottom-right-radius:var(--bs-border-radius-xl)!important}.rounded-end-5{border-top-right-radius:var(--bs-border-radius-xxl)!important;border-bottom-right-radius:var(--bs-border-radius-xxl)!important}.rounded-end-circle{border-top-right-radius:50%!important;border-bottom-right-radius:50%!important}.rounded-end-pill{border-top-right-radius:var(--bs-border-radius-pill)!important;border-bottom-right-radius:var(--bs-border-radius-pill)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-0{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.rounded-bottom-1{border-bottom-right-radius:var(--bs-border-radius-sm)!important;border-bottom-left-radius:var(--bs-border-radius-sm)!important}.rounded-bottom-2{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-3{border-bottom-right-radius:var(--bs-border-radius-lg)!important;border-bottom-left-radius:var(--bs-border-radius-lg)!important}.rounded-bottom-4{border-bottom-right-radius:var(--bs-border-radius-xl)!important;border-bottom-left-radius:var(--bs-border-radius-xl)!important}.rounded-bottom-5{border-bottom-right-radius:var(--bs-border-radius-xxl)!important;border-bottom-left-radius:var(--bs-border-radius-xxl)!important}.rounded-bottom-circle{border-bottom-right-radius:50%!important;border-bottom-left-radius:50%!important}.rounded-bottom-pill{border-bottom-right-radius:var(--bs-border-radius-pill)!important;border-bottom-left-radius:var(--bs-border-radius-pill)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-0{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-start-1{border-bottom-left-radius:var(--bs-border-radius-sm)!important;border-top-left-radius:var(--bs-border-radius-sm)!important}.rounded-start-2{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-3{border-bottom-left-radius:var(--bs-border-radius-lg)!important;border-top-left-radius:var(--bs-border-radius-lg)!important}.rounded-start-4{border-bottom-left-radius:var(--bs-border-radius-xl)!important;border-top-left-radius:var(--bs-border-radius-xl)!important}.rounded-start-5{border-bottom-left-radius:var(--bs-border-radius-xxl)!important;border-top-left-radius:var(--bs-border-radius-xxl)!important}.rounded-start-circle{border-bottom-left-radius:50%!important;border-top-left-radius:50%!important}.rounded-start-pill{border-bottom-left-radius:var(--bs-border-radius-pill)!important;border-top-left-radius:var(--bs-border-radius-pill)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.z-n1{z-index:-1!important}.z-0{z-index:0!important}.z-1{z-index:1!important}.z-2{z-index:2!important}.z-3{z-index:3!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.object-fit-sm-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-sm-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-sm-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-sm-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-sm-none{-o-object-fit:none!important;object-fit:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-inline-grid{display:inline-grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.row-gap-sm-0{row-gap:0!important}.row-gap-sm-1{row-gap:.25rem!important}.row-gap-sm-2{row-gap:.5rem!important}.row-gap-sm-3{row-gap:1rem!important}.row-gap-sm-4{row-gap:1.5rem!important}.row-gap-sm-5{row-gap:3rem!important}.column-gap-sm-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-sm-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-sm-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-sm-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-sm-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-sm-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.object-fit-md-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-md-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-md-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-md-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-md-none{-o-object-fit:none!important;object-fit:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-inline-grid{display:inline-grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.row-gap-md-0{row-gap:0!important}.row-gap-md-1{row-gap:.25rem!important}.row-gap-md-2{row-gap:.5rem!important}.row-gap-md-3{row-gap:1rem!important}.row-gap-md-4{row-gap:1.5rem!important}.row-gap-md-5{row-gap:3rem!important}.column-gap-md-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-md-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-md-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-md-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-md-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-md-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.object-fit-lg-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-lg-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-lg-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-lg-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-lg-none{-o-object-fit:none!important;object-fit:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-inline-grid{display:inline-grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.row-gap-lg-0{row-gap:0!important}.row-gap-lg-1{row-gap:.25rem!important}.row-gap-lg-2{row-gap:.5rem!important}.row-gap-lg-3{row-gap:1rem!important}.row-gap-lg-4{row-gap:1.5rem!important}.row-gap-lg-5{row-gap:3rem!important}.column-gap-lg-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-lg-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-lg-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-lg-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-lg-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-lg-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.object-fit-xl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xl-none{-o-object-fit:none!important;object-fit:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-inline-grid{display:inline-grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.row-gap-xl-0{row-gap:0!important}.row-gap-xl-1{row-gap:.25rem!important}.row-gap-xl-2{row-gap:.5rem!important}.row-gap-xl-3{row-gap:1rem!important}.row-gap-xl-4{row-gap:1.5rem!important}.row-gap-xl-5{row-gap:3rem!important}.column-gap-xl-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-xl-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-xl-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-xl-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xl-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xl-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.object-fit-xxl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xxl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xxl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xxl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xxl-none{-o-object-fit:none!important;object-fit:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-inline-grid{display:inline-grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.row-gap-xxl-0{row-gap:0!important}.row-gap-xxl-1{row-gap:.25rem!important}.row-gap-xxl-2{row-gap:.5rem!important}.row-gap-xxl-3{row-gap:1rem!important}.row-gap-xxl-4{row-gap:1.5rem!important}.row-gap-xxl-5{row-gap:3rem!important}.column-gap-xxl-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-xxl-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-xxl-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-xxl-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xxl-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xxl-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-inline-grid{display:inline-grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} -/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/custom.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/custom.css deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/octicons.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/octicons.css deleted file mode 100644 index 31d97867..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/octicons.css +++ /dev/null @@ -1,5 +0,0 @@ -.octicon { - display: inline-block; - vertical-align: text-top; - fill: currentColor; -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css deleted file mode 100644 index c8a4cf7f..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css +++ /dev/null @@ -1,264 +0,0 @@ - -:root { - /* Implementing an auto-selection of dark/light theme via: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark */ - color-scheme: light dark; - - /* PHPUnit ligh/dark colors */ - --phpunit-breadcrumbs: light-dark(var(--bs-gray-200), var(--bs-gray-800)); - --phpunit-success-bar: light-dark(#28a745 ,#1f8135); - --phpunit-success-high: light-dark(#99cb84, #3d5c4e); - --phpunit-success-medium: light-dark(#c3e3b5,#3c6051); - --phpunit-success-low: light-dark(#dff0d8, #2d4431); - --phpunit-warning: light-dark(#fcf8e3, #3e3408); - --phpunit-warning-bar: light-dark(#ffc107 ,#c19406); - --phpunit-danger: light-dark(#f2dede, #42221e); - --phpunit-danger-bar: light-dark(#dc3545, #a62633); - - /* Bootstrap v5.3 default colors (ligth, dark) */ - --bs-body-bg-rgb: light-dark((255, 255, 255), (33, 37, 41)); - --bs-body-bg: light-dark(#fff, #212529); - --bs-body-color-rgb: light-dark(33, 37, 41, 222, 226, 230); - --bs-body-color: light-dark(#212529, #dee2e6); - --bs-border-color-translucent: light-dark(rgba(0, 0, 0, 0.175), rgba(255, 255, 255, 0.15)); - --bs-border-color: light-dark(#dee2e6, #495057); - --bs-code-color: light-dark(#d63384, #e685b5); - --bs-danger-bg-subtle: light-dark(#f8d7da, #2c0b0e); - --bs-danger-border-subtle: light-dark(#f1aeb5, #842029); - --bs-danger-text-emphasis: light-dark(#58151c, #ea868f); - --bs-dark-bg-subtle: light-dark(#ced4da, #1a1d20); - --bs-dark-border-subtle: light-dark(#adb5bd, #343a40); - --bs-dark-text-emphasis: light-dark(#495057, #dee2e6); - --bs-emphasis-color-rgb: light-dark((0, 0, 0), (255, 255, 255)); - --bs-emphasis-color: light-dark(#000, #fff); - --bs-form-invalid-border-color: light-dark(#dc3545, #ea868f); - --bs-form-invalid-color: light-dark(#dc3545, #ea868f); - --bs-form-valid-border-color: light-dark(#198754, #75b798); - --bs-form-valid-color: light-dark(#198754, #75b798); - --bs-highlight-bg: light-dark(#fff3cd, #664d03); - --bs-highlight-color: light-dark(#212529, #dee2e6); - --bs-info-bg-subtle: light-dark(#cff4fc, #032830); - --bs-info-border-subtle: light-dark(#9eeaf9, #087990); - --bs-info-text-emphasis: light-dark(#055160, #6edff6); - --bs-light-bg-subtle: light-dark(#fcfcfd, #343a40); - --bs-light-border-subtle: light-dark(#e9ecef, #495057); - --bs-light-text-emphasis: light-dark(#495057, #f8f9fa); - --bs-link-color-rgb: light-dark((13, 110, 253), (110, 168, 254)); - --bs-link-color: light-dark(#0d6efd, #6ea8fe); - --bs-link-hover-color-rgb: light-dark((10, 88, 202), (139, 185, 254)); - --bs-link-hover-color: light-dark(#0a58ca, #8bb9fe); - --bs-primary-bg-subtle: light-dark(#cfe2ff, #031633); - --bs-primary-border-subtle: light-dark(#9ec5fe, #084298); - --bs-primary-text-emphasis: light-dark(#052c65, #6ea8fe); - --bs-secondary-bg-rgb: light-dark((233, 236, 239), (52, 58, 64)); - --bs-secondary-bg-subtle: light-dark(#e2e3e5, #161719); - --bs-secondary-bg: light-dark(#e9ecef, #343a40); - --bs-secondary-border-subtle: light-dark(#c4c8cb, #41464b); - --bs-secondary-color-rgb: light-dark((33, 37, 41), (222, 226, 230)); - --bs-secondary-color: light-dark(rgba(33, 37, 41, 0.75), rgba(222, 226, 230, 0.75)); - --bs-secondary-text-emphasis: light-dark(#2b2f32, #a7acb1); - --bs-success-bg-subtle: light-dark(#d1e7dd, #051b11); - --bs-success-border-subtle: light-dark(#a3cfbb, #0f5132); - --bs-success-text-emphasis: light-dark(#0a3622, #75b798); - --bs-tertiary-bg-rgb: light-dark(248, 249, 250, 43, 48, 53); - --bs-tertiary-bg: light-dark(#f8f9fa, #2b3035); - --bs-tertiary-color-rgb: light-dark((33, 37, 41), (222, 226, 230)); - --bs-tertiary-color: light-dark(rgba(33, 37, 41, 0.5), rgba(222, 226, 230, 0.5)); - --bs-warning-bg-subtle: light-dark(#fff3cd, #332701); - --bs-warning-border-subtle: light-dark(#ffe69c, #997404); - --bs-warning-text-emphasis: light-dark(#664d03, #ffda6a); -} - -@media (prefers-color-scheme: dark) { - /* Invert icon's colors on dark mode to improve readability */ - img.octicon { filter: invert(1); } -} - -body { - font-family: sans-serif; - font-size: 1em; - font-kerning: normal; - text-rendering: optimizeLegibility; - padding-top: 10px; -} - -nav .breadcrumb { - border-radius: var(--bs-border-radius); - background-color: var(--phpunit-breadcrumbs); - padding: .75rem 1rem; -} - -.popover { - max-width: none; -} - -.popover-body { - max-height: 90vh; - overflow-y: auto; -} - -.octicon { - margin-right:.25em; - vertical-align: baseline; - width: 0.75em; -} - -.table-bordered>thead>tr>td { - border-bottom-width: 1px; -} - -.table tbody>tr>td, .table thead>tr>td { - padding-top: 3px; - padding-bottom: 3px; -} - -.table-condensed tbody>tr>td { - padding-top: 0; - padding-bottom: 0; -} - -.table .progress { - margin-bottom: inherit; -} - -.table-borderless th, .table-borderless td { - border: 0 !important; -} - -.table tbody tr.covered-by-large-tests, .table tbody tr.covered-by-large-tests td, li.covered-by-large-tests, tr.success, tr.success td, td.success, li.success, span.success { - background-color: var(--phpunit-success-low); -} - -.table tbody tr.covered-by-medium-tests, .table tbody tr.covered-by-medium-tests td, li.covered-by-medium-tests { - background-color: var(--phpunit-success-medium); -} - -.table tbody tr.covered-by-small-tests, .table tbody tr.covered-by-small-tests td, li.covered-by-small-tests { - background-color: var(--phpunit-success-high); -} - -.table tbody tr.warning, .table tbody tr.warning td, .table tbody td.warning, li.warning, span.warning { - background-color: var(--phpunit-warning); -} - -.table tbody tr.danger, .table tbody tr.danger td, .table tbody td.danger, li.danger, span.danger { - background-color: var(--phpunit-danger); -} - -.table tbody td.info { - background-color: rgb(from var(--bs-info) r g b / 0.25); -} - -td.big { - vertical-align: middle; - width: 117px; -} - -td.small { -} - -td.codeLine { - font-family: "Source Code Pro", var(--bs-font-monospace); - white-space: pre-wrap; -} - -td span.comment { - color: var(--bs-secondary-color); -} - -td span.default { - color: var(--bs-body-color); -} - -td span.html { - color: var(--bs-secondary-color); -} - -td span.keyword { - color: var(--bs-body-color); - font-weight: bold; -} - -pre span.string { - color: var(--bs-body-color); -} - -span.success, span.warning, span.danger { - margin-right: 2px; - padding-left: 10px; - padding-right: 10px; - text-align: center; -} - -#toplink { - position: fixed; - left: 5px; - bottom: 5px; - outline: 0; -} - -svg text { - font-family: var(--bs-font-sans-serif); - font-size: 11px; - color: var(--bs-gray); - fill: var(--bs-gray); -} - -.scrollbox { - height:245px; - overflow-x:scroll; - overflow-y:scroll; -} - -table + .structure-heading { - border-top: 1px solid var(--bs-gray-200); - padding-top: 0.5em; -} - -table#code td:first-of-type { - padding-left: .75em; - padding-right: .75em; -} - -table#code td:first-of-type a { - text-decoration: none; -} - -.legend { - font-weight: bold; - margin-right: 2px; - padding-left: 10px; - padding-right: 10px; - text-align: center; -} - -.covered-by-small-tests { - background-color: var(--phpunit-success-high); -} - -.covered-by-medium-tests { - background-color: var(--phpunit-success-medium); -} - -.covered-by-large-tests { - background-color: var(--phpunit-success-low); -} - -.not-covered { - background-color: var(--phpunit-danger); -} - -.not-coverable { - background-color: var(--phpunit-warning); -} - -.progress-bar.bg-success { - background-color: var(--phpunit-success-bar) !important; -} - -.progress-bar.bg-warning { - background-color: var(--phpunit-warning-bar) !important; -} - -.progress-bar.bg-danger { - background-color: var(--phpunit-danger-bar) !important; -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist deleted file mode 100644 index d6575bc2..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist +++ /dev/null @@ -1,299 +0,0 @@ - - - - - Dashboard for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          -

          Classes

          -
          -
          -
          -
          -

          Coverage Distribution

          -
          - -
          -
          -
          -

          Complexity

          -
          - -
          -
          -
          -
          -
          -

          Insufficient Coverage

          -
          - - - - - - - - -{{insufficient_coverage_classes}} - -
          ClassCoverage
          -
          -
          -
          -

          Project Risks

          -
          - - - - - - - - - - -{{project_risks_classes}} - -
          ClassCoverageComplexityCRAP
          -
          -
          -
          -
          -
          -

          Methods

          -
          -
          -
          -
          -

          Coverage Distribution

          -
          - -
          -
          -
          -

          Complexity

          -
          - -
          -
          -
          -
          -
          -

          Insufficient Coverage

          -
          - - - - - - - - -{{insufficient_coverage_methods}} - -
          MethodCoverage
          -
          -
          -
          -

          Project Risks

          -
          - - - - - - - - - - -{{project_risks_methods}} - -
          MethodCoverageComplexityCRAP
          -
          -
          -
          - -
          - - - - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard_branch.html.dist deleted file mode 100644 index eb003154..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard_branch.html.dist +++ /dev/null @@ -1,293 +0,0 @@ - - - - - Dashboard for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          -
          -

          Classes

          -
          -
          -
          -
          -

          Coverage Distribution

          -
          - -
          -
          -
          -

          Complexity

          -
          - -
          -
          -
          -
          -
          -

          Insufficient Coverage

          -
          - - - - - - - - -{{insufficient_coverage_classes}} - -
          ClassCoverage
          -
          -
          -
          -

          Project Risks

          -
          - - - - - - - - -{{project_risks_classes}} - -
          ClassCRAP
          -
          -
          -
          -
          -
          -

          Methods

          -
          -
          -
          -
          -

          Coverage Distribution

          -
          - -
          -
          -
          -

          Complexity

          -
          - -
          -
          -
          -
          -
          -

          Insufficient Coverage

          -
          - - - - - - - - -{{insufficient_coverage_methods}} - -
          MethodCoverage
          -
          -
          -
          -

          Project Risks

          -
          - - - - - - - - -{{project_risks_methods}} - -
          MethodCRAP
          -
          -
          -
          - -
          - - - - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist deleted file mode 100644 index f769d2ca..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - - - - - - - - - -{{items}} - -
           
          Code Coverage
           
          Lines
          Functions and Methods
          Classes and Traits
          -
          -
          -
          -

          Legend

          -

          - Low: 0% to {{low_upper_bound}}% - Medium: {{low_upper_bound}}% to {{high_lower_bound}}% - High: {{high_lower_bound}}% to 100% -

          -

          - Generated by php-code-coverage {{version}} using {{runtime}}{{generator}} at {{date}}. -

          -
          -
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_branch.html.dist deleted file mode 100644 index a40c2e12..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_branch.html.dist +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - - - - - - - - - - - -{{items}} - -
           
          Code Coverage
           
          Lines
          Branches
          Paths
          Functions and Methods
          Classes and Traits
          -
          -
          -
          -

          Legend

          -

          - Low: 0% to {{low_upper_bound}}% - Medium: {{low_upper_bound}}% to {{high_lower_bound}}% - High: {{high_lower_bound}}% to 100% -

          -

          - Generated by php-code-coverage {{version}} using {{runtime}}{{generator}} at {{date}}. -

          -
          -
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist deleted file mode 100644 index f6941a43..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist +++ /dev/null @@ -1,13 +0,0 @@ - - {{icon}}{{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{classes_bar}} -
          {{classes_tested_percent}}
          -
          {{classes_number}}
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item_branch.html.dist deleted file mode 100644 index 532a436c..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item_branch.html.dist +++ /dev/null @@ -1,19 +0,0 @@ - - {{icon}}{{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{branches_bar}} -
          {{branches_executed_percent}}
          -
          {{branches_number}}
          - {{paths_bar}} -
          {{paths_executed_percent}}
          -
          {{paths_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{classes_bar}} -
          {{classes_tested_percent}}
          -
          {{classes_number}}
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist deleted file mode 100644 index d2910348..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - - - - - - - - - -{{items}} - -
           
          Code Coverage
           
          Lines
          Functions and Methods
          Classes and Traits
          -
          -{{lines}} -{{structure}} - -
          - - - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist deleted file mode 100644 index b8bcf374..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist +++ /dev/null @@ -1,66 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - - -
          -
          -
          -
          - -
          -
          -
          -
          -
          -
          - - - - - - - - - - - - - - - - -{{items}} - -
           
          Code Coverage
           
          Lines
          Branches
          Paths
          Functions and Methods
          Classes and Traits
          -
          -{{lines}} -{{structure}} - -
          - - - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist deleted file mode 100644 index b1c0fca4..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist +++ /dev/null @@ -1,14 +0,0 @@ - - {{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{crap}} - {{classes_bar}} -
          {{classes_tested_percent}}
          -
          {{classes_number}}
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist deleted file mode 100644 index 50502517..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist +++ /dev/null @@ -1,20 +0,0 @@ - - {{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{branches_bar}} -
          {{branches_executed_percent}}
          -
          {{branches_number}}
          - {{paths_bar}} -
          {{paths_executed_percent}}
          -
          {{paths_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{crap}} - {{classes_bar}} -
          {{classes_tested_percent}}
          -
          {{classes_number}}
          - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-code.svg b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-code.svg deleted file mode 100644 index 5b4b1995..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-code.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-directory.svg b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-directory.svg deleted file mode 100644 index 4bf1f1ca..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-directory.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/billboard.pkgd.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/billboard.pkgd.min.js deleted file mode 100644 index 52128a86..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/billboard.pkgd.min.js +++ /dev/null @@ -1,57 +0,0 @@ -/*! - * Copyright (c) 2017 ~ present NAVER Corp. - * billboard.js project is licensed under the MIT license - * - * billboard.js, JavaScript chart library - * https://naver.github.io/billboard.js/ - * - * @version 3.15.1 - * - * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills. - * - @types/d3-selection ^3.0.11 - * - @types/d3-transition ^3.0.9 - * - d3-axis ^3.0.0 - * - d3-brush ^3.0.0 - * - d3-drag ^3.0.0 - * - d3-dsv ^3.0.1 - * - d3-ease ^3.0.1 - * - d3-hierarchy ^3.1.2 - * - d3-interpolate ^3.0.1 - * - d3-scale ^4.0.2 - * - d3-selection ^3.0.0 - * - d3-shape ^3.2.0 - * - d3-time-format ^4.1.0 - * - d3-transition ^3.0.1 - * - d3-zoom ^3.0.0 - */(function(Xa,zn){if(typeof exports=="object"&&typeof module=="object")module.exports=zn();else if(typeof define=="function"&&define.amd)define([],zn);else{var Ha=zn();for(var x in Ha)(typeof exports=="object"?exports:Xa)[x]=Ha[x]}})(this,function(){return function(){"use strict";var Cs=[function(x,b,r){r(1),r(97),r(98),r(99),r(100),r(101),r(102),r(103),r(104),r(105),r(106),r(107),r(108),r(109),r(110),r(111),r(124),r(126),r(136),r(137),r(139),r(143),r(146),r(148),r(150),r(151),r(152),r(153),r(155),r(156),r(158),r(159),r(161),r(165),r(166),r(167),r(168),r(173),r(174),r(176),r(177),r(178),r(180),r(184),r(185),r(186),r(187),r(188),r(193),r(195),r(196),r(198),r(201),r(202),r(203),r(204),r(205),r(207),r(218),r(220),r(221),r(223),r(224),r(227),r(230),r(236),r(237),r(238),r(239),r(240),r(241),r(245),r(246),r(248),r(249),r(250),r(252),r(253),r(254),r(255),r(256),r(261),r(262),r(263),r(264),r(266),r(267),r(268),r(270),r(271),r(272),r(273),r(93),r(274),r(275),r(283),r(285),r(287),r(288),r(289),r(290),r(291),r(293),r(294),r(295),r(296),r(297),r(298),r(300),r(301),r(302),r(303),r(304),r(305),r(306),r(307),r(311),r(312),r(314),r(316),r(317),r(318),r(319),r(320),r(322),r(324),r(325),r(326),r(327),r(329),r(330),r(332),r(333),r(334),r(335),r(337),r(338),r(339),r(340),r(341),r(342),r(343),r(344),r(345),r(347),r(348),r(349),r(350),r(351),r(352),r(353),r(354),r(355),r(356),r(357),r(359),r(360),r(361),r(362),r(386),r(387),r(388),r(389),r(390),r(391),r(392),r(393),r(394),r(395),r(397),r(398),r(399),r(400),r(401),r(402),r(403),r(404),r(405),r(406),r(413),r(415),r(416),r(418),r(419),r(420),r(421),r(422),r(424),r(434),r(436),r(438),r(440),r(442),r(444),r(446),r(447),r(449),r(452),r(453),r(454),r(455),r(456),r(460),r(461),r(463),r(464),r(465),r(466),r(468),r(469),r(470),r(471),r(472),r(473),r(474),r(476),r(479),r(482),r(485),r(486),r(487),r(488),r(489),r(490),r(491),r(492),r(493),r(494),r(495),r(496),r(497),r(505),r(506),r(507),r(508),r(509),r(510),r(511),r(512),r(513),r(514),r(515),r(516),r(517),r(519),r(520),r(521),r(522),r(523),r(524),r(525),r(526),r(527),r(528),r(529),r(530),r(531),r(532),r(533),r(534),r(535),r(536),r(537),r(538),r(539),r(540),r(541),r(542),r(543),r(544),r(545),r(546),r(549),r(551),r(553),r(554),r(557),r(558),r(560),r(561),r(562),r(566),r(567),r(568),r(569),r(572),r(577),r(578),r(579),r(580),r(581),r(582),r(583),r(80)},function(x,b,r){r(2),r(90),r(92),r(93),r(96)},function(x,b,r){var u=r(3),d=r(4),h=r(8),p=r(14),y=r(36),T=r(6),$=r(26),A=r(7),E=r(38),R=r(24),I=r(46),O=r(12),C=r(18),D=r(68),M=r(11),F=r(71),z=r(73),U=r(57),j=r(75),G=r(66),B=r(5),V=r(44),Y=r(72),Z=r(10),J=r(47),q=r(77),nt=r(34),rt=r(53),_=r(54),tt=r(40),et=r(33),lt=r(78),mt=r(79),gt=r(81),xt=r(82),yt=r(51),Ut=r(83).forEach,Dt=rt("hidden"),Xt="Symbol",Qt="prototype",kt=yt.set,me=yt.getterFor(Xt),ge=Object[Qt],ae=d.Symbol,Mt=ae&&ae[Qt],Ht=d.RangeError,re=d.TypeError,se=d.QObject,ee=B.f,fe=V.f,Pe=j.f,Me=Z.f,$e=p([].push),ce=nt("symbols"),Ae=nt("op-symbols"),Te=nt("wks"),de=!se||!se[Qt]||!se[Qt].findChild,bt=function(It,Pt,Ct){var Nt=ee(ge,Pt);Nt&&delete ge[Pt],fe(It,Pt,Ct),Nt&&It!==ge&&fe(ge,Pt,Nt)},Ft=T&&A(function(){return F(fe({},"a",{get:function(){return fe(this,"a",{value:7}).a}})).a!==7})?bt:fe,Tt=function(It,Pt){var Ct=ce[It]=F(Mt);return kt(Ct,{type:Xt,tag:It,description:Pt}),T||(Ct.description=Pt),Ct},qt=function(Pt,Ct,Nt){Pt===ge&&qt(Ae,Ct,Nt),I(Pt);var Et=C(Ct);return I(Nt),E(ce,Et)?(Nt.enumerable?(E(Pt,Dt)&&Pt[Dt][Et]&&(Pt[Dt][Et]=!1),Nt=F(Nt,{enumerable:M(0,!1)})):(E(Pt,Dt)||fe(Pt,Dt,M(1,F(null))),Pt[Dt][Et]=!0),Ft(Pt,Et,Nt)):fe(Pt,Et,Nt)},te=function(Pt,Ct){I(Pt);var Nt=O(Ct),Et=z(Nt).concat(ut(Nt));return Ut(Et,function(ie){(!T||h(Yt,Nt,ie))&&qt(Pt,ie,Nt[ie])}),Pt},Zt=function(Pt,Ct){return Ct===void 0?F(Pt):te(F(Pt),Ct)},Yt=function(Pt){var Ct=C(Pt),Nt=h(Me,this,Ct);return this===ge&&E(ce,Ct)&&!E(Ae,Ct)?!1:Nt||!E(this,Ct)||!E(ce,Ct)||E(this,Dt)&&this[Dt][Ct]?Nt:!0},Ye=function(Pt,Ct){var Nt=O(Pt),Et=C(Ct);if(!(Nt===ge&&E(ce,Et)&&!E(Ae,Et))){var ie=ee(Nt,Et);return ie&&E(ce,Et)&&!(E(Nt,Dt)&&Nt[Dt][Et])&&(ie.enumerable=!0),ie}},Ze=function(Pt){var Ct=Pe(O(Pt)),Nt=[];return Ut(Ct,function(Et){!E(ce,Et)&&!E(_,Et)&&$e(Nt,Et)}),Nt},ut=function(It){var Pt=It===ge,Ct=Pe(Pt?Ae:O(It)),Nt=[];return Ut(Ct,function(Et){E(ce,Et)&&(!Pt||E(ge,Et))&&$e(Nt,ce[Et])}),Nt};$||(ae=function(){if(R(Mt,this))throw new re("Symbol is not a constructor");var Pt=!arguments.length||arguments[0]===void 0?void 0:D(arguments[0]),Ct=tt(Pt),Nt=function(Et){var ie=this===void 0?d:this;ie===ge&&h(Nt,Ae,Et),E(ie,Dt)&&E(ie[Dt],Ct)&&(ie[Dt][Ct]=!1);var we=M(1,Et);try{Ft(ie,Ct,we)}catch(Rt){if(!(Rt instanceof Ht))throw Rt;bt(ie,Ct,we)}};return T&&de&&Ft(ge,Ct,{configurable:!0,set:Nt}),Tt(Ct,Pt)},Mt=ae[Qt],J(Mt,"toString",function(){return me(this).tag}),J(ae,"withoutSetter",function(It){return Tt(tt(It),It)}),Z.f=Yt,V.f=qt,Y.f=te,B.f=Ye,U.f=j.f=Ze,G.f=ut,lt.f=function(It){return Tt(et(It),It)},T&&(q(Mt,"description",{configurable:!0,get:function(){return me(this).description}}),y||J(ge,"propertyIsEnumerable",Yt,{unsafe:!0}))),u({global:!0,constructor:!0,wrap:!0,forced:!$,sham:!$},{Symbol:ae}),Ut(z(Te),function(It){mt(It)}),u({target:Xt,stat:!0,forced:!$},{useSetter:function(){de=!0},useSimple:function(){de=!1}}),u({target:"Object",stat:!0,forced:!$,sham:!T},{create:Zt,defineProperty:qt,defineProperties:te,getOwnPropertyDescriptor:Ye}),u({target:"Object",stat:!0,forced:!$},{getOwnPropertyNames:Ze}),gt(),xt(ae,Xt),_[Dt]=!0},function(x,b,r){var u=r(4),d=r(5).f,h=r(43),p=r(47),y=r(37),T=r(55),$=r(67);x.exports=function(A,E){var R=A.target,I=A.global,O=A.stat,C,D,M,F,z,U;if(I?D=u:O?D=u[R]||y(R,{}):D=u[R]&&u[R].prototype,D)for(M in E){if(z=E[M],A.dontCallGetSet?(U=d(D,M),F=U&&U.value):F=D[M],C=$(I?M:R+(O?".":"#")+M,A.forced),!C&&F!==void 0){if(typeof z==typeof F)continue;T(z,F)}(A.sham||F&&F.sham)&&h(z,"sham",!0),p(D,M,z,A)}}},function(x){var b=function(r){return r&&r.Math===Math&&r};x.exports=b(typeof globalThis=="object"&&globalThis)||b(typeof window=="object"&&window)||b(typeof self=="object"&&self)||b(typeof global=="object"&&global)||b(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},function(x,b,r){var u=r(6),d=r(8),h=r(10),p=r(11),y=r(12),T=r(18),$=r(38),A=r(41),E=Object.getOwnPropertyDescriptor;b.f=u?E:function(I,O){if(I=y(I),O=T(O),A)try{return E(I,O)}catch(C){}if($(I,O))return p(!d(h.f,I,O),I[O])}},function(x,b,r){var u=r(7);x.exports=!u(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},function(x){x.exports=function(b){try{return!!b()}catch(r){return!0}}},function(x,b,r){var u=r(9),d=Function.prototype.call;x.exports=u?d.bind(d):function(){return d.apply(d,arguments)}},function(x,b,r){var u=r(7);x.exports=!u(function(){var d=function(){}.bind();return typeof d!="function"||d.hasOwnProperty("prototype")})},function(x,b){var r={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,d=u&&!r.call({1:2},1);b.f=d?function(p){var y=u(this,p);return!!y&&y.enumerable}:r},function(x){x.exports=function(b,r){return{enumerable:!(b&1),configurable:!(b&2),writable:!(b&4),value:r}}},function(x,b,r){var u=r(13),d=r(16);x.exports=function(h){return u(d(h))}},function(x,b,r){var u=r(14),d=r(7),h=r(15),p=Object,y=u("".split);x.exports=d(function(){return!p("z").propertyIsEnumerable(0)})?function(T){return h(T)==="String"?y(T,""):p(T)}:p},function(x,b,r){var u=r(9),d=Function.prototype,h=d.call,p=u&&d.bind.bind(h,h);x.exports=u?p:function(y){return function(){return h.apply(y,arguments)}}},function(x,b,r){var u=r(14),d=u({}.toString),h=u("".slice);x.exports=function(p){return h(d(p),8,-1)}},function(x,b,r){var u=r(17),d=TypeError;x.exports=function(h){if(u(h))throw new d("Can't call method on "+h);return h}},function(x){x.exports=function(b){return b==null}},function(x,b,r){var u=r(19),d=r(22);x.exports=function(h){var p=u(h,"string");return d(p)?p:p+""}},function(x,b,r){var u=r(8),d=r(20),h=r(22),p=r(29),y=r(32),T=r(33),$=TypeError,A=T("toPrimitive");x.exports=function(E,R){if(!d(E)||h(E))return E;var I=p(E,A),O;if(I){if(R===void 0&&(R="default"),O=u(I,E,R),!d(O)||h(O))return O;throw new $("Can't convert object to primitive value")}return R===void 0&&(R="number"),y(E,R)}},function(x,b,r){var u=r(21);x.exports=function(d){return typeof d=="object"?d!==null:u(d)}},function(x){var b=typeof document=="object"&&document.all;x.exports=typeof b=="undefined"&&b!==void 0?function(r){return typeof r=="function"||r===b}:function(r){return typeof r=="function"}},function(x,b,r){var u=r(23),d=r(21),h=r(24),p=r(25),y=Object;x.exports=p?function(T){return typeof T=="symbol"}:function(T){var $=u("Symbol");return d($)&&h($.prototype,y(T))}},function(x,b,r){var u=r(4),d=r(21),h=function(p){return d(p)?p:void 0};x.exports=function(p,y){return arguments.length<2?h(u[p]):u[p]&&u[p][y]}},function(x,b,r){var u=r(14);x.exports=u({}.isPrototypeOf)},function(x,b,r){var u=r(26);x.exports=u&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(x,b,r){var u=r(27),d=r(7),h=r(4),p=h.String;x.exports=!!Object.getOwnPropertySymbols&&!d(function(){var y=Symbol("symbol detection");return!p(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&u&&u<41})},function(x,b,r){var u=r(4),d=r(28),h=u.process,p=u.Deno,y=h&&h.versions||p&&p.version,T=y&&y.v8,$,A;T&&($=T.split("."),A=$[0]>0&&$[0]<4?1:+($[0]+$[1])),!A&&d&&($=d.match(/Edge\/(\d+)/),(!$||$[1]>=74)&&($=d.match(/Chrome\/(\d+)/),$&&(A=+$[1]))),x.exports=A},function(x,b,r){var u=r(4),d=u.navigator,h=d&&d.userAgent;x.exports=h?String(h):""},function(x,b,r){var u=r(30),d=r(17);x.exports=function(h,p){var y=h[p];return d(y)?void 0:u(y)}},function(x,b,r){var u=r(21),d=r(31),h=TypeError;x.exports=function(p){if(u(p))return p;throw new h(d(p)+" is not a function")}},function(x){var b=String;x.exports=function(r){try{return b(r)}catch(u){return"Object"}}},function(x,b,r){var u=r(8),d=r(21),h=r(20),p=TypeError;x.exports=function(y,T){var $,A;if(T==="string"&&d($=y.toString)&&!h(A=u($,y))||d($=y.valueOf)&&!h(A=u($,y))||T!=="string"&&d($=y.toString)&&!h(A=u($,y)))return A;throw new p("Can't convert object to primitive value")}},function(x,b,r){var u=r(4),d=r(34),h=r(38),p=r(40),y=r(26),T=r(25),$=u.Symbol,A=d("wks"),E=T?$.for||$:$&&$.withoutSetter||p;x.exports=function(R){return h(A,R)||(A[R]=y&&h($,R)?$[R]:E("Symbol."+R)),A[R]}},function(x,b,r){var u=r(35);x.exports=function(d,h){return u[d]||(u[d]=h||{})}},function(x,b,r){var u=r(36),d=r(4),h=r(37),p="__core-js_shared__",y=x.exports=d[p]||h(p,{});(y.versions||(y.versions=[])).push({version:"3.41.0",mode:u?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(x){x.exports=!1},function(x,b,r){var u=r(4),d=Object.defineProperty;x.exports=function(h,p){try{d(u,h,{value:p,configurable:!0,writable:!0})}catch(y){u[h]=p}return p}},function(x,b,r){var u=r(14),d=r(39),h=u({}.hasOwnProperty);x.exports=Object.hasOwn||function(y,T){return h(d(y),T)}},function(x,b,r){var u=r(16),d=Object;x.exports=function(h){return d(u(h))}},function(x,b,r){var u=r(14),d=0,h=Math.random(),p=u(1 .toString);x.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+p(++d+h,36)}},function(x,b,r){var u=r(6),d=r(7),h=r(42);x.exports=!u&&!d(function(){return Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a!==7})},function(x,b,r){var u=r(4),d=r(20),h=u.document,p=d(h)&&d(h.createElement);x.exports=function(y){return p?h.createElement(y):{}}},function(x,b,r){var u=r(6),d=r(44),h=r(11);x.exports=u?function(p,y,T){return d.f(p,y,h(1,T))}:function(p,y,T){return p[y]=T,p}},function(x,b,r){var u=r(6),d=r(41),h=r(45),p=r(46),y=r(18),T=TypeError,$=Object.defineProperty,A=Object.getOwnPropertyDescriptor,E="enumerable",R="configurable",I="writable";b.f=u?h?function(C,D,M){if(p(C),D=y(D),p(M),typeof C=="function"&&D==="prototype"&&"value"in M&&I in M&&!M[I]){var F=A(C,D);F&&F[I]&&(C[D]=M.value,M={configurable:R in M?M[R]:F[R],enumerable:E in M?M[E]:F[E],writable:!1})}return $(C,D,M)}:$:function(C,D,M){if(p(C),D=y(D),p(M),d)try{return $(C,D,M)}catch(F){}if("get"in M||"set"in M)throw new T("Accessors not supported");return"value"in M&&(C[D]=M.value),C}},function(x,b,r){var u=r(6),d=r(7);x.exports=u&&d(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},function(x,b,r){var u=r(20),d=String,h=TypeError;x.exports=function(p){if(u(p))return p;throw new h(d(p)+" is not an object")}},function(x,b,r){var u=r(21),d=r(44),h=r(48),p=r(37);x.exports=function(y,T,$,A){A||(A={});var E=A.enumerable,R=A.name!==void 0?A.name:T;if(u($)&&h($,R,A),A.global)E?y[T]=$:p(T,$);else{try{A.unsafe?y[T]&&(E=!0):delete y[T]}catch(I){}E?y[T]=$:d.f(y,T,{value:$,enumerable:!1,configurable:!A.nonConfigurable,writable:!A.nonWritable})}return y}},function(x,b,r){var u=r(14),d=r(7),h=r(21),p=r(38),y=r(6),T=r(49).CONFIGURABLE,$=r(50),A=r(51),E=A.enforce,R=A.get,I=String,O=Object.defineProperty,C=u("".slice),D=u("".replace),M=u([].join),F=y&&!d(function(){return O(function(){},"length",{value:8}).length!==8}),z=String(String).split("String"),U=x.exports=function(j,G,B){C(I(G),0,7)==="Symbol("&&(G="["+D(I(G),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),B&&B.getter&&(G="get "+G),B&&B.setter&&(G="set "+G),(!p(j,"name")||T&&j.name!==G)&&(y?O(j,"name",{value:G,configurable:!0}):j.name=G),F&&B&&p(B,"arity")&&j.length!==B.arity&&O(j,"length",{value:B.arity});try{B&&p(B,"constructor")&&B.constructor?y&&O(j,"prototype",{writable:!1}):j.prototype&&(j.prototype=void 0)}catch(Y){}var V=E(j);return p(V,"source")||(V.source=M(z,typeof G=="string"?G:"")),j};Function.prototype.toString=U(function(){return h(this)&&R(this).source||$(this)},"toString")},function(x,b,r){var u=r(6),d=r(38),h=Function.prototype,p=u&&Object.getOwnPropertyDescriptor,y=d(h,"name"),T=y&&function(){}.name==="something",$=y&&(!u||u&&p(h,"name").configurable);x.exports={EXISTS:y,PROPER:T,CONFIGURABLE:$}},function(x,b,r){var u=r(14),d=r(21),h=r(35),p=u(Function.toString);d(h.inspectSource)||(h.inspectSource=function(y){return p(y)}),x.exports=h.inspectSource},function(x,b,r){var u=r(52),d=r(4),h=r(20),p=r(43),y=r(38),T=r(35),$=r(53),A=r(54),E="Object already initialized",R=d.TypeError,I=d.WeakMap,O,C,D,M=function(j){return D(j)?C(j):O(j,{})},F=function(j){return function(G){var B;if(!h(G)||(B=C(G)).type!==j)throw new R("Incompatible receiver, "+j+" required");return B}};if(u||T.state){var z=T.state||(T.state=new I);z.get=z.get,z.has=z.has,z.set=z.set,O=function(j,G){if(z.has(j))throw new R(E);return G.facade=j,z.set(j,G),G},C=function(j){return z.get(j)||{}},D=function(j){return z.has(j)}}else{var U=$("state");A[U]=!0,O=function(j,G){if(y(j,U))throw new R(E);return G.facade=j,p(j,U,G),G},C=function(j){return y(j,U)?j[U]:{}},D=function(j){return y(j,U)}}x.exports={set:O,get:C,has:D,enforce:M,getterFor:F}},function(x,b,r){var u=r(4),d=r(21),h=u.WeakMap;x.exports=d(h)&&/native code/.test(String(h))},function(x,b,r){var u=r(34),d=r(40),h=u("keys");x.exports=function(p){return h[p]||(h[p]=d(p))}},function(x){x.exports={}},function(x,b,r){var u=r(38),d=r(56),h=r(5),p=r(44);x.exports=function(y,T,$){for(var A=d(T),E=p.f,R=h.f,I=0;IR;)d(E,O=A[R++])&&(~p(I,O)||T(I,O));return I}},function(x,b,r){var u=r(12),d=r(60),h=r(63),p=function(y){return function(T,$,A){var E=u(T),R=h(E);if(R===0)return!y&&-1;var I=d(A,R),O;if(y&&$!==$){for(;R>I;)if(O=E[I++],O!==O)return!0}else for(;R>I;I++)if((y||I in E)&&E[I]===$)return y||I||0;return!y&&-1}};x.exports={includes:p(!0),indexOf:p(!1)}},function(x,b,r){var u=r(61),d=Math.max,h=Math.min;x.exports=function(p,y){var T=u(p);return T<0?d(T+y,0):h(T,y)}},function(x,b,r){var u=r(62);x.exports=function(d){var h=+d;return h!==h||h===0?0:u(h)}},function(x){var b=Math.ceil,r=Math.floor;x.exports=Math.trunc||function(d){var h=+d;return(h>0?r:b)(h)}},function(x,b,r){var u=r(64);x.exports=function(d){return u(d.length)}},function(x,b,r){var u=r(61),d=Math.min;x.exports=function(h){var p=u(h);return p>0?d(p,9007199254740991):0}},function(x){x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(x,b){b.f=Object.getOwnPropertySymbols},function(x,b,r){var u=r(7),d=r(21),h=/#|\.prototype\./,p=function(E,R){var I=T[y(E)];return I===A?!0:I===$?!1:d(R)?u(R):!!R},y=p.normalize=function(E){return String(E).replace(h,".").toLowerCase()},T=p.data={},$=p.NATIVE="N",A=p.POLYFILL="P";x.exports=p},function(x,b,r){var u=r(69),d=String;x.exports=function(h){if(u(h)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return d(h)}},function(x,b,r){var u=r(70),d=r(21),h=r(15),p=r(33),y=p("toStringTag"),T=Object,$=h(function(){return arguments}())==="Arguments",A=function(E,R){try{return E[R]}catch(I){}};x.exports=u?h:function(E){var R,I,O;return E===void 0?"Undefined":E===null?"Null":typeof(I=A(R=T(E),y))=="string"?I:$?h(R):(O=h(R))==="Object"&&d(R.callee)?"Arguments":O}},function(x,b,r){var u=r(33),d=u("toStringTag"),h={};h[d]="z",x.exports=String(h)==="[object z]"},function(x,b,r){var u=r(46),d=r(72),h=r(65),p=r(54),y=r(74),T=r(42),$=r(53),A=">",E="<",R="prototype",I="script",O=$("IE_PROTO"),C=function(){},D=function(j){return E+I+A+j+E+"/"+I+A},M=function(j){j.write(D("")),j.close();var G=j.parentWindow.Object;return j=null,G},F=function(){var j=T("iframe"),G="java"+I+":",B;return j.style.display="none",y.appendChild(j),j.src=String(G),B=j.contentWindow.document,B.open(),B.write(D("document.F=Object")),B.close(),B.F},z,U=function(){try{z=new ActiveXObject("htmlfile")}catch(G){}U=typeof document!="undefined"?document.domain&&z?M(z):F():M(z);for(var j=h.length;j--;)delete U[R][h[j]];return U()};p[O]=!0,x.exports=Object.create||function(G,B){var V;return G!==null?(C[R]=u(G),V=new C,C[R]=null,V[O]=G):V=U(),B===void 0?V:d.f(V,B)}},function(x,b,r){var u=r(6),d=r(45),h=r(44),p=r(46),y=r(12),T=r(73);b.f=u&&!d?Object.defineProperties:function(A,E){p(A);for(var R=y(E),I=T(E),O=I.length,C=0,D;O>C;)h.f(A,D=I[C++],R[D]);return A}},function(x,b,r){var u=r(58),d=r(65);x.exports=Object.keys||function(p){return u(p,d)}},function(x,b,r){var u=r(23);x.exports=u("document","documentElement")},function(x,b,r){var u=r(15),d=r(12),h=r(57).f,p=r(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],T=function($){try{return h($)}catch(A){return p(y)}};x.exports.f=function(A){return y&&u(A)==="Window"?T(A):h(d(A))}},function(x,b,r){var u=r(14);x.exports=u([].slice)},function(x,b,r){var u=r(48),d=r(44);x.exports=function(h,p,y){return y.get&&u(y.get,p,{getter:!0}),y.set&&u(y.set,p,{setter:!0}),d.f(h,p,y)}},function(x,b,r){var u=r(33);b.f=u},function(x,b,r){var u=r(80),d=r(38),h=r(78),p=r(44).f;x.exports=function(y){var T=u.Symbol||(u.Symbol={});d(T,y)||p(T,y,{value:h.f(y)})}},function(x,b,r){var u=r(4);x.exports=u},function(x,b,r){var u=r(8),d=r(23),h=r(33),p=r(47);x.exports=function(){var y=d("Symbol"),T=y&&y.prototype,$=T&&T.valueOf,A=h("toPrimitive");T&&!T[A]&&p(T,A,function(E){return u($,this)},{arity:1})}},function(x,b,r){var u=r(44).f,d=r(38),h=r(33),p=h("toStringTag");x.exports=function(y,T,$){y&&!$&&(y=y.prototype),y&&!d(y,p)&&u(y,p,{configurable:!0,value:T})}},function(x,b,r){var u=r(84),d=r(14),h=r(13),p=r(39),y=r(63),T=r(86),$=d([].push),A=function(E){var R=E===1,I=E===2,O=E===3,C=E===4,D=E===6,M=E===7,F=E===5||D;return function(z,U,j,G){for(var B=p(z),V=h(B),Y=y(V),Z=u(U,j),J=0,q=G||T,nt=R?q(z,Y):I||M?q(z,0):void 0,rt,_;Y>J;J++)if((F||J in V)&&(rt=V[J],_=Z(rt,J,B),E))if(R)nt[J]=_;else if(_)switch(E){case 3:return!0;case 5:return rt;case 6:return J;case 2:$(nt,rt)}else switch(E){case 4:return!1;case 7:$(nt,rt)}return D?-1:O||C?C:nt}};x.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}},function(x,b,r){var u=r(85),d=r(30),h=r(9),p=u(u.bind);x.exports=function(y,T){return d(y),T===void 0?y:h?p(y,T):function(){return y.apply(T,arguments)}}},function(x,b,r){var u=r(15),d=r(14);x.exports=function(h){if(u(h)==="Function")return d(h)}},function(x,b,r){var u=r(87);x.exports=function(d,h){return new(u(d))(h===0?0:h)}},function(x,b,r){var u=r(88),d=r(89),h=r(20),p=r(33),y=p("species"),T=Array;x.exports=function($){var A;return u($)&&(A=$.constructor,d(A)&&(A===T||u(A.prototype))?A=void 0:h(A)&&(A=A[y],A===null&&(A=void 0))),A===void 0?T:A}},function(x,b,r){var u=r(15);x.exports=Array.isArray||function(h){return u(h)==="Array"}},function(x,b,r){var u=r(14),d=r(7),h=r(21),p=r(69),y=r(23),T=r(50),$=function(){},A=y("Reflect","construct"),E=/^\s*(?:class|function)\b/,R=u(E.exec),I=!E.test($),O=function(M){if(!h(M))return!1;try{return A($,[],M),!0}catch(F){return!1}},C=function(M){if(!h(M))return!1;switch(p(M)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!R(E,T(M))}catch(F){return!0}};C.sham=!0,x.exports=!A||d(function(){var D;return O(O.call)||!O(Object)||!O(function(){D=!0})||D})?C:O},function(x,b,r){var u=r(3),d=r(23),h=r(38),p=r(68),y=r(34),T=r(91),$=y("string-to-symbol-registry"),A=y("symbol-to-string-registry");u({target:"Symbol",stat:!0,forced:!T},{for:function(E){var R=p(E);if(h($,R))return $[R];var I=d("Symbol")(R);return $[R]=I,A[I]=R,I}})},function(x,b,r){var u=r(26);x.exports=u&&!!Symbol.for&&!!Symbol.keyFor},function(x,b,r){var u=r(3),d=r(38),h=r(22),p=r(31),y=r(34),T=r(91),$=y("symbol-to-string-registry");u({target:"Symbol",stat:!0,forced:!T},{keyFor:function(E){if(!h(E))throw new TypeError(p(E)+" is not a symbol");if(d($,E))return $[E]}})},function(x,b,r){var u=r(3),d=r(23),h=r(94),p=r(8),y=r(14),T=r(7),$=r(21),A=r(22),E=r(76),R=r(95),I=r(26),O=String,C=d("JSON","stringify"),D=y(/./.exec),M=y("".charAt),F=y("".charCodeAt),z=y("".replace),U=y(1 .toString),j=/[\uD800-\uDFFF]/g,G=/^[\uD800-\uDBFF]$/,B=/^[\uDC00-\uDFFF]$/,V=!I||T(function(){var q=d("Symbol")("stringify detection");return C([q])!=="[null]"||C({a:q})!=="{}"||C(Object(q))!=="{}"}),Y=T(function(){return C("\uDF06\uD834")!=='"\\udf06\\ud834"'||C("\uDEAD")!=='"\\udead"'}),Z=function(q,nt){var rt=E(arguments),_=R(nt);if(!(!$(_)&&(q===void 0||A(q))))return rt[1]=function(tt,et){if($(_)&&(et=p(_,this,O(tt),et)),!A(et))return et},h(C,null,rt)},J=function(q,nt,rt){var _=M(rt,nt-1),tt=M(rt,nt+1);return D(G,q)&&!D(B,tt)||D(B,q)&&!D(G,_)?"\\u"+U(F(q,0),16):q};C&&u({target:"JSON",stat:!0,arity:3,forced:V||Y},{stringify:function(nt,rt,_){var tt=E(arguments),et=h(V?Z:C,null,tt);return Y&&typeof et=="string"?z(et,j,J):et}})},function(x,b,r){var u=r(9),d=Function.prototype,h=d.apply,p=d.call;x.exports=typeof Reflect=="object"&&Reflect.apply||(u?p.bind(h):function(){return p.apply(h,arguments)})},function(x,b,r){var u=r(14),d=r(88),h=r(21),p=r(15),y=r(68),T=u([].push);x.exports=function($){if(h($))return $;if(d($)){for(var A=$.length,E=[],R=0;Rj&&R(_,arguments[j]),_});if(J.prototype=Y,B!=="Error"?y?y(J,Z):T(J,Z,{name:!0}):O&&U in V&&($(J,V,U),$(J,V,"prepareStackTrace")),T(J,V),!C)try{Y.name!==B&&h(Y,"name",B),Y.constructor=J}catch(q){}return J}}},function(x,b,r){var u=r(114),d=r(20),h=r(16),p=r(115);x.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y=!1,T={},$;try{$=u(Object.prototype,"__proto__","set"),$(T,[]),y=T instanceof Array}catch(A){}return function(E,R){return h(E),p(R),d(E)&&(y?$(E,R):E.__proto__=R),E}}():void 0)},function(x,b,r){var u=r(14),d=r(30);x.exports=function(h,p,y){try{return u(d(Object.getOwnPropertyDescriptor(h,p)[y]))}catch(T){}}},function(x,b,r){var u=r(116),d=String,h=TypeError;x.exports=function(p){if(u(p))return p;throw new h("Can't set "+d(p)+" as a prototype")}},function(x,b,r){var u=r(20);x.exports=function(d){return u(d)||d===null}},function(x,b,r){var u=r(44).f;x.exports=function(d,h,p){p in d||u(d,p,{configurable:!0,get:function(){return h[p]},set:function(y){h[p]=y}})}},function(x,b,r){var u=r(21),d=r(20),h=r(113);x.exports=function(p,y,T){var $,A;return h&&u($=y.constructor)&&$!==T&&d(A=$.prototype)&&A!==T.prototype&&h(p,A),p}},function(x,b,r){var u=r(68);x.exports=function(d,h){return d===void 0?arguments.length<2?"":h:u(d)}},function(x,b,r){var u=r(20),d=r(43);x.exports=function(h,p){u(p)&&"cause"in p&&d(h,"cause",p.cause)}},function(x,b,r){var u=r(43),d=r(122),h=r(123),p=Error.captureStackTrace;x.exports=function(y,T,$,A){h&&(p?p(y,T):u(y,"stack",d($,A)))}},function(x,b,r){var u=r(14),d=Error,h=u("".replace),p=function($){return String(new d($).stack)}("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,T=y.test(p);x.exports=function($,A){if(T&&typeof $=="string"&&!d.prepareStackTrace)for(;A--;)$=h($,y,"");return $}},function(x,b,r){var u=r(7),d=r(11);x.exports=!u(function(){var h=new Error("a");return"stack"in h?(Object.defineProperty(h,"stack",d(1,7)),h.stack!==7):!0})},function(x,b,r){var u=r(47),d=r(125),h=Error.prototype;h.toString!==d&&u(h,"toString",d)},function(x,b,r){var u=r(6),d=r(7),h=r(46),p=r(119),y=Error.prototype.toString,T=d(function(){if(u){var $=Object.create(Object.defineProperty({},"name",{get:function(){return this===$}}));if(y.call($)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});x.exports=T?function(){var A=h(this),E=p(A.name,"Error"),R=p(A.message);return E?R?E+": "+R:E:R}:y},function(x,b,r){r(127)},function(x,b,r){var u=r(3),d=r(24),h=r(128),p=r(113),y=r(55),T=r(71),$=r(43),A=r(11),E=r(120),R=r(121),I=r(130),O=r(119),C=r(33),D=C("toStringTag"),M=Error,F=[].push,z=function(G,B){var V=d(U,this),Y;p?Y=p(new M,V?h(this):U):(Y=V?this:T(U),$(Y,D,"Error")),B!==void 0&&$(Y,"message",O(B)),R(Y,z,Y.stack,1),arguments.length>2&&E(Y,arguments[2]);var Z=[];return I(G,F,{that:Z}),$(Y,"errors",Z),Y};p?p(z,M):y(z,M,{name:!0});var U=z.prototype=T(M.prototype,{constructor:A(1,z),message:A(1,""),name:A(1,"AggregateError")});u({global:!0,constructor:!0,arity:2},{AggregateError:z})},function(x,b,r){var u=r(38),d=r(21),h=r(39),p=r(53),y=r(129),T=p("IE_PROTO"),$=Object,A=$.prototype;x.exports=y?$.getPrototypeOf:function(E){var R=h(E);if(u(R,T))return R[T];var I=R.constructor;return d(I)&&R instanceof I?I.prototype:R instanceof $?A:null}},function(x,b,r){var u=r(7);x.exports=!u(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},function(x,b,r){var u=r(84),d=r(8),h=r(46),p=r(31),y=r(131),T=r(63),$=r(24),A=r(133),E=r(134),R=r(135),I=TypeError,O=function(D,M){this.stopped=D,this.result=M},C=O.prototype;x.exports=function(D,M,F){var z=F&&F.that,U=!!(F&&F.AS_ENTRIES),j=!!(F&&F.IS_RECORD),G=!!(F&&F.IS_ITERATOR),B=!!(F&&F.INTERRUPTED),V=u(M,z),Y,Z,J,q,nt,rt,_,tt=function(lt){return Y&&R(Y,"normal",lt),new O(!0,lt)},et=function(lt){return U?(h(lt),B?V(lt[0],lt[1],tt):V(lt[0],lt[1])):B?V(lt,tt):V(lt)};if(j)Y=D.iterator;else if(G)Y=D;else{if(Z=E(D),!Z)throw new I(p(D)+" is not iterable");if(y(Z)){for(J=0,q=T(D);q>J;J++)if(nt=et(D[J]),nt&&$(C,nt))return nt;return new O(!1)}Y=A(D,Z)}for(rt=j?D.next:Y.next;!(_=d(rt,Y)).done;){try{nt=et(_.value)}catch(lt){R(Y,"throw",lt)}if(typeof nt=="object"&&nt&&$(C,nt))return nt}return new O(!1)}},function(x,b,r){var u=r(33),d=r(132),h=u("iterator"),p=Array.prototype;x.exports=function(y){return y!==void 0&&(d.Array===y||p[h]===y)}},function(x){x.exports={}},function(x,b,r){var u=r(8),d=r(30),h=r(46),p=r(31),y=r(134),T=TypeError;x.exports=function($,A){var E=arguments.length<2?y($):A;if(d(E))return h(u(E,$));throw new T(p($)+" is not iterable")}},function(x,b,r){var u=r(69),d=r(29),h=r(17),p=r(132),y=r(33),T=y("iterator");x.exports=function($){if(!h($))return d($,T)||d($,"@@iterator")||p[u($)]}},function(x,b,r){var u=r(8),d=r(46),h=r(29);x.exports=function(p,y,T){var $,A;d(p);try{if($=h(p,"return"),!$){if(y==="throw")throw T;return T}$=u($,p)}catch(E){A=!0,$=E}if(y==="throw")throw T;if(A)throw $;return d($),T}},function(x,b,r){var u=r(3),d=r(23),h=r(94),p=r(7),y=r(112),T="AggregateError",$=d(T),A=!p(function(){return $([1]).errors[0]!==1})&&p(function(){return $([1],T,{cause:7}).cause!==7});u({global:!0,constructor:!0,arity:2,forced:A},{AggregateError:y(T,function(E){return function(I,O){return h(E,this,arguments)}},A,!0)})},function(x,b,r){var u=r(3),d=r(39),h=r(63),p=r(61),y=r(138);u({target:"Array",proto:!0},{at:function($){var A=d(this),E=h(A),R=p($),I=R>=0?R:E+R;return I<0||I>=E?void 0:A[I]}}),y("at")},function(x,b,r){var u=r(33),d=r(71),h=r(44).f,p=u("unscopables"),y=Array.prototype;y[p]===void 0&&h(y,p,{configurable:!0,value:d(null)}),x.exports=function(T){y[p][T]=!0}},function(x,b,r){var u=r(3),d=r(7),h=r(88),p=r(20),y=r(39),T=r(63),$=r(140),A=r(141),E=r(86),R=r(142),I=r(33),O=r(27),C=I("isConcatSpreadable"),D=O>=51||!d(function(){var z=[];return z[C]=!1,z.concat()[0]!==z}),M=function(z){if(!p(z))return!1;var U=z[C];return U!==void 0?!!U:h(z)},F=!D||!R("concat");u({target:"Array",proto:!0,arity:1,forced:F},{concat:function(U){var j=y(this),G=E(j,0),B=0,V,Y,Z,J,q;for(V=-1,Z=arguments.length;Vr)throw b("Maximum allowed index exceeded");return u}},function(x,b,r){var u=r(6),d=r(44),h=r(11);x.exports=function(p,y,T){u?d.f(p,y,h(0,T)):p[y]=T}},function(x,b,r){var u=r(7),d=r(33),h=r(27),p=d("species");x.exports=function(y){return h>=51||!u(function(){var T=[],$=T.constructor={};return $[p]=function(){return{foo:1}},T[y](Boolean).foo!==1})}},function(x,b,r){var u=r(3),d=r(144),h=r(138);u({target:"Array",proto:!0},{copyWithin:d}),h("copyWithin")},function(x,b,r){var u=r(39),d=r(60),h=r(63),p=r(145),y=Math.min;x.exports=[].copyWithin||function($,A){var E=u(this),R=h(E),I=d($,R),O=d(A,R),C=arguments.length>2?arguments[2]:void 0,D=y((C===void 0?R:d(C,R))-O,R-I),M=1;for(O0;)O in E?E[I]=E[O]:p(E,I),I+=M,O+=M;return E}},function(x,b,r){var u=r(31),d=TypeError;x.exports=function(h,p){if(!delete h[p])throw new d("Cannot delete property "+u(p)+" of "+u(h))}},function(x,b,r){var u=r(3),d=r(83).every,h=r(147),p=h("every");u({target:"Array",proto:!0,forced:!p},{every:function(T){return d(this,T,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(7);x.exports=function(d,h){var p=[][d];return!!p&&u(function(){p.call(null,h||function(){return 1},1)})}},function(x,b,r){var u=r(3),d=r(149),h=r(138);u({target:"Array",proto:!0},{fill:d}),h("fill")},function(x,b,r){var u=r(39),d=r(60),h=r(63);x.exports=function(y){for(var T=u(this),$=h(T),A=arguments.length,E=d(A>1?arguments[1]:void 0,$),R=A>2?arguments[2]:void 0,I=R===void 0?$:d(R,$);I>E;)T[E++]=y;return T}},function(x,b,r){var u=r(3),d=r(83).filter,h=r(142),p=h("filter");u({target:"Array",proto:!0,forced:!p},{filter:function(T){return d(this,T,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(83).find,h=r(138),p="find",y=!0;p in[]&&Array(1)[p](function(){y=!1}),u({target:"Array",proto:!0,forced:y},{find:function($){return d(this,$,arguments.length>1?arguments[1]:void 0)}}),h(p)},function(x,b,r){var u=r(3),d=r(83).findIndex,h=r(138),p="findIndex",y=!0;p in[]&&Array(1)[p](function(){y=!1}),u({target:"Array",proto:!0,forced:y},{findIndex:function($){return d(this,$,arguments.length>1?arguments[1]:void 0)}}),h(p)},function(x,b,r){var u=r(3),d=r(154).findLast,h=r(138);u({target:"Array",proto:!0},{findLast:function(y){return d(this,y,arguments.length>1?arguments[1]:void 0)}}),h("findLast")},function(x,b,r){var u=r(84),d=r(13),h=r(39),p=r(63),y=function(T){var $=T===1;return function(A,E,R){for(var I=h(A),O=d(I),C=p(O),D=u(E,R),M,F;C-- >0;)if(M=O[C],F=D(M,C,I),F)switch(T){case 0:return M;case 1:return C}return $?-1:void 0}};x.exports={findLast:y(0),findLastIndex:y(1)}},function(x,b,r){var u=r(3),d=r(154).findLastIndex,h=r(138);u({target:"Array",proto:!0},{findLastIndex:function(y){return d(this,y,arguments.length>1?arguments[1]:void 0)}}),h("findLastIndex")},function(x,b,r){var u=r(3),d=r(157),h=r(39),p=r(63),y=r(61),T=r(86);u({target:"Array",proto:!0},{flat:function(){var A=arguments.length?arguments[0]:void 0,E=h(this),R=p(E),I=T(E,0);return I.length=d(I,E,E,R,0,A===void 0?1:y(A)),I}})},function(x,b,r){var u=r(88),d=r(63),h=r(140),p=r(84),y=function(T,$,A,E,R,I,O,C){for(var D=R,M=0,F=O?p(O,C):!1,z,U;M0&&u(z)?(U=d(z),D=y(T,$,z,U,D,I-1)-1):(h(D+1),T[D]=z),D++),M++;return D};x.exports=y},function(x,b,r){var u=r(3),d=r(157),h=r(30),p=r(39),y=r(63),T=r(86);u({target:"Array",proto:!0},{flatMap:function(A){var E=p(this),R=y(E),I;return h(A),I=T(E,0),I.length=d(I,E,E,R,0,1,A,arguments.length>1?arguments[1]:void 0),I}})},function(x,b,r){var u=r(3),d=r(160);u({target:"Array",proto:!0,forced:[].forEach!==d},{forEach:d})},function(x,b,r){var u=r(83).forEach,d=r(147),h=d("forEach");x.exports=h?[].forEach:function(y){return u(this,y,arguments.length>1?arguments[1]:void 0)}},function(x,b,r){var u=r(3),d=r(162),h=r(164),p=!h(function(y){Array.from(y)});u({target:"Array",stat:!0,forced:p},{from:d})},function(x,b,r){var u=r(84),d=r(8),h=r(39),p=r(163),y=r(131),T=r(89),$=r(63),A=r(141),E=r(133),R=r(134),I=Array;x.exports=function(C){var D=h(C),M=T(this),F=arguments.length,z=F>1?arguments[1]:void 0,U=z!==void 0;U&&(z=u(z,F>2?arguments[2]:void 0));var j=R(D),G=0,B,V,Y,Z,J,q;if(j&&!(this===I&&y(j)))for(V=M?new this:[],Z=E(D,j),J=Z.next;!(Y=d(J,Z)).done;G++)q=U?p(Z,z,[Y.value,G],!0):Y.value,A(V,G,q);else for(B=$(D),V=M?new this(B):I(B);B>G;G++)q=U?z(D[G],G):D[G],A(V,G,q);return V.length=G,V}},function(x,b,r){var u=r(46),d=r(135);x.exports=function(h,p,y,T){try{return T?p(u(y)[0],y[1]):p(y)}catch($){d(h,"throw",$)}}},function(x,b,r){var u=r(33),d=u("iterator"),h=!1;try{var p=0,y={next:function(){return{done:!!p++}},return:function(){h=!0}};y[d]=function(){return this},Array.from(y,function(){throw 2})}catch(T){}x.exports=function(T,$){try{if(!$&&!h)return!1}catch(R){return!1}var A=!1;try{var E={};E[d]=function(){return{next:function(){return{done:A=!0}}}},T(E)}catch(R){}return A}},function(x,b,r){var u=r(3),d=r(59).includes,h=r(7),p=r(138),y=h(function(){return!Array(1).includes()});u({target:"Array",proto:!0,forced:y},{includes:function($){return d(this,$,arguments.length>1?arguments[1]:void 0)}}),p("includes")},function(x,b,r){var u=r(3),d=r(85),h=r(59).indexOf,p=r(147),y=d([].indexOf),T=!!y&&1/y([1],1,-0)<0,$=T||!p("indexOf");u({target:"Array",proto:!0,forced:$},{indexOf:function(E){var R=arguments.length>1?arguments[1]:void 0;return T?y(this,E,R)||0:h(this,E,R)}})},function(x,b,r){var u=r(3),d=r(88);u({target:"Array",stat:!0},{isArray:d})},function(x,b,r){var u=r(12),d=r(138),h=r(132),p=r(51),y=r(44).f,T=r(169),$=r(172),A=r(36),E=r(6),R="Array Iterator",I=p.set,O=p.getterFor(R);x.exports=T(Array,"Array",function(D,M){I(this,{type:R,target:u(D),index:0,kind:M})},function(){var D=O(this),M=D.target,F=D.index++;if(!M||F>=M.length)return D.target=null,$(void 0,!0);switch(D.kind){case"keys":return $(F,!1);case"values":return $(M[F],!1)}return $([F,M[F]],!1)},"values");var C=h.Arguments=h.Array;if(d("keys"),d("values"),d("entries"),!A&&E&&C.name!=="values")try{y(C,"name",{value:"values"})}catch(D){}},function(x,b,r){var u=r(3),d=r(8),h=r(36),p=r(49),y=r(21),T=r(170),$=r(128),A=r(113),E=r(82),R=r(43),I=r(47),O=r(33),C=r(132),D=r(171),M=p.PROPER,F=p.CONFIGURABLE,z=D.IteratorPrototype,U=D.BUGGY_SAFARI_ITERATORS,j=O("iterator"),G="keys",B="values",V="entries",Y=function(){return this};x.exports=function(Z,J,q,nt,rt,_,tt){T(q,J,nt);var et=function(kt){if(kt===rt&&yt)return yt;if(!U&&kt&&kt in gt)return gt[kt];switch(kt){case G:return function(){return new q(this,kt)};case B:return function(){return new q(this,kt)};case V:return function(){return new q(this,kt)}}return function(){return new q(this)}},lt=J+" Iterator",mt=!1,gt=Z.prototype,xt=gt[j]||gt["@@iterator"]||rt&>[rt],yt=!U&&xt||et(rt),Ut=J==="Array"&>.entries||xt,Dt,Xt,Qt;if(Ut&&(Dt=$(Ut.call(new Z)),Dt!==Object.prototype&&Dt.next&&(!h&&$(Dt)!==z&&(A?A(Dt,z):y(Dt[j])||I(Dt,j,Y)),E(Dt,lt,!0,!0),h&&(C[lt]=Y))),M&&rt===B&&xt&&xt.name!==B&&(!h&&F?R(gt,"name",B):(mt=!0,yt=function(){return d(xt,this)})),rt)if(Xt={values:et(B),keys:_?yt:et(G),entries:et(V)},tt)for(Qt in Xt)(U||mt||!(Qt in gt))&&I(gt,Qt,Xt[Qt]);else u({target:J,proto:!0,forced:U||mt},Xt);return(!h||tt)&>[j]!==yt&&I(gt,j,yt,{name:rt}),C[J]=yt,Xt}},function(x,b,r){var u=r(171).IteratorPrototype,d=r(71),h=r(11),p=r(82),y=r(132),T=function(){return this};x.exports=function($,A,E,R){var I=A+" Iterator";return $.prototype=d(u,{next:h(+!R,E)}),p($,I,!1,!0),y[I]=T,$}},function(x,b,r){var u=r(7),d=r(21),h=r(20),p=r(71),y=r(128),T=r(47),$=r(33),A=r(36),E=$("iterator"),R=!1,I,O,C;[].keys&&(C=[].keys(),"next"in C?(O=y(y(C)),O!==Object.prototype&&(I=O)):R=!0);var D=!h(I)||u(function(){var M={};return I[E].call(M)!==M});D?I={}:A&&(I=p(I)),d(I[E])||T(I,E,function(){return this}),x.exports={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:R}},function(x){x.exports=function(b,r){return{value:b,done:r}}},function(x,b,r){var u=r(3),d=r(14),h=r(13),p=r(12),y=r(147),T=d([].join),$=h!==Object,A=$||!y("join",",");u({target:"Array",proto:!0,forced:A},{join:function(R){return T(p(this),R===void 0?",":R)}})},function(x,b,r){var u=r(3),d=r(175);u({target:"Array",proto:!0,forced:d!==[].lastIndexOf},{lastIndexOf:d})},function(x,b,r){var u=r(94),d=r(12),h=r(61),p=r(63),y=r(147),T=Math.min,$=[].lastIndexOf,A=!!$&&1/[1].lastIndexOf(1,-0)<0,E=y("lastIndexOf"),R=A||!E;x.exports=R?function(O){if(A)return u($,this,arguments)||0;var C=d(this),D=p(C);if(D===0)return-1;var M=D-1;for(arguments.length>1&&(M=T(M,h(arguments[1]))),M<0&&(M=D+M);M>=0;M--)if(M in C&&C[M]===O)return M||0;return-1}:$},function(x,b,r){var u=r(3),d=r(83).map,h=r(142),p=h("map");u({target:"Array",proto:!0,forced:!p},{map:function(T){return d(this,T,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(7),h=r(89),p=r(141),y=Array,T=d(function(){function $(){}return!(y.of.call($)instanceof $)});u({target:"Array",stat:!0,forced:T},{of:function(){for(var A=0,E=arguments.length,R=new(h(this)?this:y)(E);E>A;)p(R,A,arguments[A++]);return R.length=E,R}})},function(x,b,r){var u=r(3),d=r(39),h=r(63),p=r(179),y=r(140),T=r(7),$=T(function(){return[].push.call({length:4294967296},1)!==4294967297}),A=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(R){return R instanceof TypeError}},E=$||!A();u({target:"Array",proto:!0,arity:1,forced:E},{push:function(I){var O=d(this),C=h(O),D=arguments.length;y(C+D);for(var M=0;M79&&p<83,$=T||!h("reduce");u({target:"Array",proto:!0,forced:$},{reduce:function(E){var R=arguments.length;return d(this,E,R,R>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(30),d=r(39),h=r(13),p=r(63),y=TypeError,T="Reduce of empty array with no initial value",$=function(A){return function(E,R,I,O){var C=d(E),D=h(C),M=p(C);if(u(R),M===0&&I<2)throw new y(T);var F=A?M-1:0,z=A?-1:1;if(I<2)for(;;){if(F in D){O=D[F],F+=z;break}if(F+=z,A?F<0:M<=F)throw new y(T)}for(;A?F>=0:M>F;F+=z)F in D&&(O=R(O,D[F],F,C));return O}};x.exports={left:$(!1),right:$(!0)}},function(x,b,r){var u=r(183);x.exports=u==="NODE"},function(x,b,r){var u=r(4),d=r(28),h=r(15),p=function(y){return d.slice(0,y.length)===y};x.exports=function(){return p("Bun/")?"BUN":p("Cloudflare-Workers")?"CLOUDFLARE":p("Deno/")?"DENO":p("Node.js/")?"NODE":u.Bun&&typeof Bun.version=="string"?"BUN":u.Deno&&typeof Deno.version=="object"?"DENO":h(u.process)==="process"?"NODE":u.window&&u.document?"BROWSER":"REST"}()},function(x,b,r){var u=r(3),d=r(181).right,h=r(147),p=r(27),y=r(182),T=!y&&p>79&&p<83,$=T||!h("reduceRight");u({target:"Array",proto:!0,forced:$},{reduceRight:function(E){return d(this,E,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(14),h=r(88),p=d([].reverse),y=[1,2];u({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return h(this)&&(this.length=this.length),p(this)}})},function(x,b,r){var u=r(3),d=r(88),h=r(89),p=r(20),y=r(60),T=r(63),$=r(12),A=r(141),E=r(33),R=r(142),I=r(76),O=R("slice"),C=E("species"),D=Array,M=Math.max;u({target:"Array",proto:!0,forced:!O},{slice:function(z,U){var j=$(this),G=T(j),B=y(z,G),V=y(U===void 0?G:U,G),Y,Z,J;if(d(j)&&(Y=j.constructor,h(Y)&&(Y===D||d(Y.prototype))?Y=void 0:p(Y)&&(Y=Y[C],Y===null&&(Y=void 0)),Y===D||Y===void 0))return I(j,B,V);for(Z=new(Y===void 0?D:Y)(M(V-B,0)),J=0;B1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(14),h=r(30),p=r(39),y=r(63),T=r(145),$=r(68),A=r(7),E=r(189),R=r(147),I=r(190),O=r(191),C=r(27),D=r(192),M=[],F=d(M.sort),z=d(M.push),U=A(function(){M.sort(void 0)}),j=A(function(){M.sort(null)}),G=R("sort"),B=!A(function(){if(C)return C<70;if(!(I&&I>3)){if(O)return!0;if(D)return D<603;var Z="",J,q,nt,rt;for(J=65;J<76;J++){switch(q=String.fromCharCode(J),J){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(rt=0;rt<47;rt++)M.push({k:q+rt,v:nt})}for(M.sort(function(_,tt){return tt.v-_.v}),rt=0;rt$(q)?1:-1}};u({target:"Array",proto:!0,forced:V},{sort:function(J){J!==void 0&&h(J);var q=p(this);if(B)return J===void 0?F(q):F(q,J);var nt=[],rt=y(q),_,tt;for(tt=0;tt0;)p[E]=p[--E];E!==$++&&(p[E]=A)}else for(var R=d(T/2),I=h(u(p,0,R),y),O=h(u(p,R),y),C=I.length,D=O.length,M=0,F=0;Mj-Y+V;J--)R(U,J-1)}else if(V>Y)for(J=j-Y;J>G;J--)q=J+Y-1,nt=J+V-1,q in U?U[nt]=U[q]:R(U,nt);for(J=0;J2?p:u(h),$=new d(T);T>y;)$[y]=h[y++];return $}},function(x,b,r){var u=r(4);x.exports=function(d,h){var p=u[d],y=p&&p.prototype;return y&&y[h]}},function(x,b,r){var u=r(3),d=r(138),h=r(140),p=r(63),y=r(60),T=r(12),$=r(61),A=Array,E=Math.max,R=Math.min;u({target:"Array",proto:!0},{toSpliced:function(O,C){var D=T(this),M=p(D),F=y(O,M),z=arguments.length,U=0,j,G,B,V;for(z===0?j=G=0:z===1?(j=0,G=M-F):(j=z-2,G=R(E($(C),0),M-F)),B=h(M+j-G),V=A(B);U=A||R<0)throw new h("Incorrect index");for(var I=new y(A),O=0;O>8&255]},se=function(bt){return[bt&255,bt>>8&255,bt>>16&255,bt>>24&255]},ee=function(bt){return bt[3]<<24|bt[2]<<16|bt[1]<<8|bt[0]},fe=function(bt){return ae(D(bt),23,4)},Pe=function(bt){return ae(bt,52,8)},Me=function(bt,Ft,Tt){$(bt[rt],Ft,{configurable:!0,get:function(){return Tt(this)[Ft]}})},$e=function(bt,Ft,Tt,qt){var te=lt(bt),Zt=C(Tt),Yt=!!qt;if(Zt+Ft>te.byteLength)throw new kt(tt);var Ye=te.bytes,Ze=Zt+te.byteOffset,ut=j(Ye,Ze,Ze+Ft);return Yt?ut:ge(ut)},ce=function(bt,Ft,Tt,qt,te,Zt){var Yt=lt(bt),Ye=C(Tt),Ze=qt(+te),ut=!!Zt;if(Ye+Ft>Yt.byteLength)throw new kt(tt);for(var It=Yt.bytes,Pt=Ye+Yt.byteOffset,Ct=0;CtZt)throw new kt("Wrong offset");if(qt=qt===void 0?Zt-Yt:O(qt),Yt+qt>Zt)throw new kt(_);mt(this,{type:nt,buffer:Ft,byteLength:qt,byteOffset:Yt,bytes:te.bytes}),h||(this.buffer=Ft,this.byteLength=qt,this.byteOffset=Yt)},Dt=Ut[rt],h&&(Me(xt,"byteLength",et),Me(Ut,"buffer",lt),Me(Ut,"byteLength",lt),Me(Ut,"byteOffset",lt)),A(Dt,{getInt8:function(Ft){return $e(this,1,Ft)[0]<<24>>24},getUint8:function(Ft){return $e(this,1,Ft)[0]},getInt16:function(Ft){var Tt=$e(this,2,Ft,arguments.length>1?arguments[1]:!1);return(Tt[1]<<8|Tt[0])<<16>>16},getUint16:function(Ft){var Tt=$e(this,2,Ft,arguments.length>1?arguments[1]:!1);return Tt[1]<<8|Tt[0]},getInt32:function(Ft){return ee($e(this,4,Ft,arguments.length>1?arguments[1]:!1))},getUint32:function(Ft){return ee($e(this,4,Ft,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(Ft){return Mt($e(this,4,Ft,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(Ft){return Mt($e(this,8,Ft,arguments.length>1?arguments[1]:!1),52)},setInt8:function(Ft,Tt){ce(this,1,Ft,Ht,Tt)},setUint8:function(Ft,Tt){ce(this,1,Ft,Ht,Tt)},setInt16:function(Ft,Tt){ce(this,2,Ft,re,Tt,arguments.length>2?arguments[2]:!1)},setUint16:function(Ft,Tt){ce(this,2,Ft,re,Tt,arguments.length>2?arguments[2]:!1)},setInt32:function(Ft,Tt){ce(this,4,Ft,se,Tt,arguments.length>2?arguments[2]:!1)},setUint32:function(Ft,Tt){ce(this,4,Ft,se,Tt,arguments.length>2?arguments[2]:!1)},setFloat32:function(Ft,Tt){ce(this,4,Ft,fe,Tt,arguments.length>2?arguments[2]:!1)},setFloat64:function(Ft,Tt){ce(this,8,Ft,Pe,Tt,arguments.length>2?arguments[2]:!1)}});else{var Ae=Z&>.name!==q;!E(function(){gt(1)})||!E(function(){new gt(-1)})||E(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||Ae&&!J})?(xt=function(Ft){return R(this,yt),G(new gt(C(Ft)),this,xt)},xt[rt]=yt,yt.constructor=xt,B(xt,gt)):Ae&&J&&T(gt,"name",q),z&&F(Dt)!==Xt&&z(Dt,Xt);var Te=new Ut(new xt(2)),de=d(Dt.setInt8);Te.setInt8(0,2147483648),Te.setInt8(1,2147483649),(Te.getInt8(0)||!Te.getInt8(1))&&A(Dt,{setInt8:function(Ft,Tt){de(this,Ft,Tt<<24>>24)},setUint8:function(Ft,Tt){de(this,Ft,Tt<<24>>24)}},{unsafe:!0})}V(xt,q),V(Ut,nt),x.exports={ArrayBuffer:xt,DataView:Ut}},function(x){x.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},function(x,b,r){var u=r(47);x.exports=function(d,h,p){for(var y in h)u(d,y,h[y],p);return d}},function(x,b,r){var u=r(24),d=TypeError;x.exports=function(h,p){if(u(p,h))return h;throw new d("Incorrect invocation")}},function(x,b,r){var u=r(61),d=r(64),h=RangeError;x.exports=function(p){if(p===void 0)return 0;var y=u(p),T=d(y);if(y!==T)throw new h("Wrong length or index");return T}},function(x,b,r){var u=r(214),d=11920928955078125e-23,h=34028234663852886e22,p=11754943508222875e-54;x.exports=Math.fround||function(T){return u(T,d,h,p)}},function(x,b,r){var u=r(215),d=r(216),h=Math.abs,p=2220446049250313e-31;x.exports=function(y,T,$,A){var E=+y,R=h(E),I=u(E);if(R$||C!==C?I*(1/0):I*C}},function(x){x.exports=Math.sign||function(r){var u=+r;return u===0||u!==u?u:u<0?-1:1}},function(x){var b=2220446049250313e-31,r=1/b;x.exports=function(u){return u+r-r}},function(x){var b=Array,r=Math.abs,u=Math.pow,d=Math.floor,h=Math.log,p=Math.LN2,y=function($,A,E){var R=b(E),I=E*8-A-1,O=(1<>1,D=A===23?u(2,-24)-u(2,-77):0,M=$<0||$===0&&1/$<0?1:0,F=0,z,U,j;for($=r($),$!==$||$===1/0?(U=$!==$?1:0,z=O):(z=d(h($)/p),j=u(2,-z),$*j<1&&(z--,j*=2),z+C>=1?$+=D/j:$+=D*u(2,1-C),$*j>=2&&(z++,j/=2),z+C>=O?(U=0,z=O):z+C>=1?(U=($*j-1)*u(2,A),z+=C):(U=$*u(2,C-1)*u(2,A),z=0));A>=8;)R[F++]=U&255,U/=256,A-=8;for(z=z<0;)R[F++]=z&255,z/=256,I-=8;return R[F-1]|=M*128,R},T=function($,A){var E=$.length,R=E*8-A-1,I=(1<>1,C=R-7,D=E-1,M=$[D--],F=M&127,z;for(M>>=7;C>0;)F=F*256+$[D--],C-=8;for(z=F&(1<<-C)-1,F>>=-C,C+=A;C>0;)z=z*256+$[D--],C-=8;if(F===0)F=1-O;else{if(F===I)return z?NaN:M?-1/0:1/0;z+=u(2,A),F-=O}return(M?-1:1)*z*u(2,F-A)};x.exports={pack:y,unpack:T}},function(x,b,r){var u=r(3),d=r(219),h=d.NATIVE_ARRAY_BUFFER_VIEWS;u({target:"ArrayBuffer",stat:!0,forced:!h},{isView:d.isView})},function(x,b,r){var u=r(209),d=r(6),h=r(4),p=r(21),y=r(20),T=r(38),$=r(69),A=r(31),E=r(43),R=r(47),I=r(77),O=r(24),C=r(128),D=r(113),M=r(33),F=r(40),z=r(51),U=z.enforce,j=z.get,G=h.Int8Array,B=G&&G.prototype,V=h.Uint8ClampedArray,Y=V&&V.prototype,Z=G&&C(G),J=B&&C(B),q=Object.prototype,nt=h.TypeError,rt=M("toStringTag"),_=F("TYPED_ARRAY_TAG"),tt="TypedArrayConstructor",et=u&&!!D&&$(h.opera)!=="Opera",lt=!1,mt,gt,xt,yt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ut={BigInt64Array:8,BigUint64Array:8},Dt=function(Ht){if(!y(Ht))return!1;var re=$(Ht);return re==="DataView"||T(yt,re)||T(Ut,re)},Xt=function(Mt){var Ht=C(Mt);if(y(Ht)){var re=j(Ht);return re&&T(re,tt)?re[tt]:Xt(Ht)}},Qt=function(Mt){if(!y(Mt))return!1;var Ht=$(Mt);return T(yt,Ht)||T(Ut,Ht)},kt=function(Mt){if(Qt(Mt))return Mt;throw new nt("Target is not a typed array")},me=function(Mt){if(p(Mt)&&(!D||O(Z,Mt)))return Mt;throw new nt(A(Mt)+" is not a typed array constructor")},ge=function(Mt,Ht,re,se){if(d){if(re)for(var ee in yt){var fe=h[ee];if(fe&&T(fe.prototype,Mt))try{delete fe.prototype[Mt]}catch(Pe){try{fe.prototype[Mt]=Ht}catch(Me){}}}(!J[Mt]||re)&&R(J,Mt,re?Ht:et&&B[Mt]||Ht,se)}},ae=function(Mt,Ht,re){var se,ee;if(d){if(D){if(re){for(se in yt)if(ee=h[se],ee&&T(ee,Mt))try{delete ee[Mt]}catch(fe){}}if(!Z[Mt]||re)try{return R(Z,Mt,re?Ht:et&&Z[Mt]||Ht)}catch(fe){}else return}for(se in yt)ee=h[se],ee&&(!ee[Mt]||re)&&R(ee,Mt,Ht)}};for(mt in yt)gt=h[mt],xt=gt&>.prototype,xt?U(xt)[tt]=gt:et=!1;for(mt in Ut)gt=h[mt],xt=gt&>.prototype,xt&&(U(xt)[tt]=gt);if((!et||!p(Z)||Z===Function.prototype)&&(Z=function(){throw new nt("Incorrect invocation")},et))for(mt in yt)h[mt]&&D(h[mt],Z);if((!et||!J||J===q)&&(J=Z.prototype,et))for(mt in yt)h[mt]&&D(h[mt].prototype,J);if(et&&C(Y)!==J&&D(Y,J),d&&!T(J,rt)){lt=!0,I(J,rt,{configurable:!0,get:function(){return y(this)?this[_]:void 0}});for(mt in yt)h[mt]&&E(h[mt],_,mt)}x.exports={NATIVE_ARRAY_BUFFER_VIEWS:et,TYPED_ARRAY_TAG:lt&&_,aTypedArray:kt,aTypedArrayConstructor:me,exportTypedArrayMethod:ge,exportTypedArrayStaticMethod:ae,getTypedArrayConstructor:Xt,isView:Dt,isTypedArray:Qt,TypedArray:Z,TypedArrayPrototype:J}},function(x,b,r){var u=r(3),d=r(85),h=r(7),p=r(208),y=r(46),T=r(60),$=r(64),A=p.ArrayBuffer,E=p.DataView,R=E.prototype,I=d(A.prototype.slice),O=d(R.getUint8),C=d(R.setUint8),D=h(function(){return!new A(2).slice(1,void 0).byteLength});u({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:D},{slice:function(F,z){if(I&&z===void 0)return I(y(this),F);for(var U=y(this).byteLength,j=T(F,U),G=T(z===void 0?U:z,U),B=new A($(G-j)),V=new E(this),Y=new E(B),Z=0;j>>15,O=R>>>10&p,C=R&y;return O===p?C===0?I===0?1/0:-1/0:NaN:O===0?C*(I===0?T:-T):h(2,O-15)*(I===0?1+C*$:-1-C*$)},E=d(DataView.prototype.getUint16);u({target:"DataView",proto:!0},{getFloat16:function(I){var O=E(this,I,arguments.length>1?arguments[1]:!1);return A(O)}})},function(x,b,r){var u=r(3),d=r(14),h=r(225),p=r(212),y=r(226),T=r(216),$=Math.pow,A=65520,E=61005353927612305e-21,R=16777216,I=1024,O=function(D){if(D!==D)return 32256;if(D===0)return(1/D===-1/0)<<15;var M=D<0;if(M&&(D=-D),D>=A)return M<<15|31744;if(D2?arguments[2]:!1)}})},function(x,b,r){var u=r(69),d=TypeError;x.exports=function(h){if(u(h)==="DataView")return h;throw new d("Argument is not a DataView")}},function(x){var b=Math.log,r=Math.LN2;x.exports=Math.log2||function(d){return b(d)/r}},function(x,b,r){var u=r(6),d=r(77),h=r(228),p=ArrayBuffer.prototype;u&&!("detached"in p)&&d(p,"detached",{configurable:!0,get:function(){return h(this)}})},function(x,b,r){var u=r(4),d=r(209),h=r(229),p=u.DataView;x.exports=function(y){if(!d||h(y)!==0)return!1;try{return new p(y),!1}catch(T){return!0}}},function(x,b,r){var u=r(4),d=r(114),h=r(15),p=u.ArrayBuffer,y=u.TypeError;x.exports=p&&d(p.prototype,"byteLength","get")||function(T){if(h(T)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return T.byteLength}},function(x,b,r){var u=r(3),d=r(231);d&&u({target:"ArrayBuffer",proto:!0},{transfer:function(){return d(this,arguments.length?arguments[0]:void 0,!0)}})},function(x,b,r){var u=r(4),d=r(14),h=r(114),p=r(212),y=r(232),T=r(229),$=r(233),A=r(235),E=u.structuredClone,R=u.ArrayBuffer,I=u.DataView,O=Math.min,C=R.prototype,D=I.prototype,M=d(C.slice),F=h(C,"resizable","get"),z=h(C,"maxByteLength","get"),U=d(D.getInt8),j=d(D.setInt8);x.exports=(A||$)&&function(G,B,V){var Y=T(G),Z=B===void 0?Y:p(B),J=!F||!F(G),q;if(y(G),A&&(G=E(G,{transfer:[G]}),Y===Z&&(V||J)))return G;if(Y>=Z&&(!V||J))q=M(G,0,Z);else{var nt=V&&!J&&z?{maxByteLength:z(G)}:void 0;q=new R(Z,nt);for(var rt=new I(G),_=new I(q),tt=O(Z,Y),et=0;et92||p==="NODE"&&h>94||p==="BROWSER"&&h>97)return!1;var T=new ArrayBuffer(8),$=y(T,{transfer:[T]});return T.byteLength!==0||$.byteLength!==8})},function(x,b,r){var u=r(3),d=r(231);d&&u({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return d(this,arguments.length?arguments[0]:void 0,!1)}})},function(x,b,r){var u=r(3),d=r(14),h=r(7),p=h(function(){return new Date(16e11).getYear()!==120}),y=d(Date.prototype.getFullYear);u({target:"Date",proto:!0,forced:p},{getYear:function(){return y(this)-1900}})},function(x,b,r){var u=r(3),d=r(14),h=Date,p=d(h.prototype.getTime);u({target:"Date",stat:!0},{now:function(){return p(new h)}})},function(x,b,r){var u=r(3),d=r(14),h=r(61),p=Date.prototype,y=d(p.getTime),T=d(p.setFullYear);u({target:"Date",proto:!0},{setYear:function(A){y(this);var E=h(A),R=E>=0&&E<=99?E+1900:E;return T(this,R)}})},function(x,b,r){var u=r(3);u({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(x,b,r){var u=r(3),d=r(242);u({target:"Date",proto:!0,forced:Date.prototype.toISOString!==d},{toISOString:d})},function(x,b,r){var u=r(14),d=r(7),h=r(243).start,p=RangeError,y=isFinite,T=Math.abs,$=Date.prototype,A=$.toISOString,E=u($.getTime),R=u($.getUTCDate),I=u($.getUTCFullYear),O=u($.getUTCHours),C=u($.getUTCMilliseconds),D=u($.getUTCMinutes),M=u($.getUTCMonth),F=u($.getUTCSeconds);x.exports=d(function(){return A.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!d(function(){A.call(new Date(NaN))})?function(){if(!y(E(this)))throw new p("Invalid time value");var U=this,j=I(U),G=C(U),B=j<0?"-":j>9999?"+":"";return B+h(T(j),B?6:4,0)+"-"+h(M(U)+1,2,0)+"-"+h(R(U),2,0)+"T"+h(O(U),2,0)+":"+h(D(U),2,0)+":"+h(F(U),2,0)+"."+h(G,3,0)+"Z"}:A},function(x,b,r){var u=r(14),d=r(64),h=r(68),p=r(244),y=r(16),T=u(p),$=u("".slice),A=Math.ceil,E=function(R){return function(I,O,C){var D=h(y(I)),M=d(O),F=D.length,z=C===void 0?" ":h(C),U,j;return M<=F||z===""?D:(U=M-F,j=T(z,A(U/z.length)),j.length>U&&(j=$(j,0,U)),R?D+j:j+D)}};x.exports={start:E(!1),end:E(!0)}},function(x,b,r){var u=r(61),d=r(68),h=r(16),p=RangeError;x.exports=function(T){var $=d(h(this)),A="",E=u(T);if(E<0||E===1/0)throw new p("Wrong number of repetitions");for(;E>0;(E>>>=1)&&($+=$))E&1&&(A+=$);return A}},function(x,b,r){var u=r(3),d=r(7),h=r(39),p=r(19),y=d(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});u({target:"Date",proto:!0,arity:1,forced:y},{toJSON:function($){var A=h(this),E=p(A,"number");return typeof E=="number"&&!isFinite(E)?null:A.toISOString()}})},function(x,b,r){var u=r(38),d=r(47),h=r(247),p=r(33),y=p("toPrimitive"),T=Date.prototype;u(T,y)||d(T,y,h)},function(x,b,r){var u=r(46),d=r(32),h=TypeError;x.exports=function(p){if(u(this),p==="string"||p==="default")p="string";else if(p!=="number")throw new h("Incorrect hint");return d(this,p)}},function(x,b,r){var u=r(14),d=r(47),h=Date.prototype,p="Invalid Date",y="toString",T=u(h[y]),$=u(h.getTime);String(new Date(NaN))!==p&&d(h,y,function(){var E=$(this);return E===E?T(this):p})},function(x,b,r){var u=r(3),d=r(14),h=r(68),p=d("".charAt),y=d("".charCodeAt),T=d(/./.exec),$=d(1 .toString),A=d("".toUpperCase),E=/[\w*+\-./@]/,R=function(I,O){for(var C=$(I,16);C.length1?arguments[1]:void 0),_;_=_?_.next:nt.first;)for(rt(_.value,_.key,this);_&&_.removed;)_=_.previous},has:function(q){return!!Z(this,q)}}),h(B,U?{get:function(q){var nt=Z(this,q);return nt&&nt.value},set:function(q,nt){return Y(this,q===0?0:q,nt)}}:{add:function(q){return Y(this,q=q===0?0:q,q)}}),I&&d(B,"size",{configurable:!0,get:function(){return V(this).size}}),G},setStrong:function(F,z,U){var j=z+" Iterator",G=M(z),B=M(j);A(F,z,function(V,Y){D(this,{type:j,target:V,state:G(V),kind:Y,last:null})},function(){for(var V=B(this),Y=V.kind,Z=V.last;Z&&Z.removed;)Z=Z.previous;return!V.target||!(V.last=Z=Z?Z.next:V.state.first)?(V.target=null,E(void 0,!0)):E(Y==="keys"?Z.key:Y==="values"?Z.value:[Z.key,Z.value],!1)},U?"entries":"values",!U,!0),R(z)}}},function(x,b,r){var u=r(3),d=r(14),h=r(30),p=r(16),y=r(130),T=r(284),$=r(36),A=r(7),E=T.Map,R=T.has,I=T.get,O=T.set,C=d([].push),D=$||A(function(){return E.groupBy("ab",function(M){return M}).get("a").length!==1});u({target:"Map",stat:!0,forced:$||D},{groupBy:function(F,z){p(F),h(z);var U=new E,j=0;return y(F,function(G){var B=z(G,j++);R(U,B)?C(I(U,B),G):O(U,B,[G])}),U}})},function(x,b,r){var u=r(14),d=Map.prototype;x.exports={Map,set:u(d.set),get:u(d.get),has:u(d.has),remove:u(d.delete),proto:d}},function(x,b,r){var u=r(3),d=r(286),h=Math.acosh,p=Math.log,y=Math.sqrt,T=Math.LN2,$=!h||Math.floor(h(Number.MAX_VALUE))!==710||h(1/0)!==1/0;u({target:"Math",stat:!0,forced:$},{acosh:function(E){var R=+E;return R<1?NaN:R>9490626562425156e-8?p(R)+T:d(R-1+y(R-1)*y(R+1))}})},function(x){var b=Math.log;x.exports=Math.log1p||function(u){var d=+u;return d>-1e-8&&d<1e-8?d-d*d/2:b(1+d)}},function(x,b,r){var u=r(3),d=Math.asinh,h=Math.log,p=Math.sqrt;function y($){var A=+$;return!isFinite(A)||A===0?A:A<0?-y(-A):h(A+p(A*A+1))}var T=!(d&&1/d(0)>0);u({target:"Math",stat:!0,forced:T},{asinh:y})},function(x,b,r){var u=r(3),d=Math.atanh,h=Math.log,p=!(d&&1/d(-0)<0);u({target:"Math",stat:!0,forced:p},{atanh:function(T){var $=+T;return $===0?$:h((1+$)/(1-$))/2}})},function(x,b,r){var u=r(3),d=r(215),h=Math.abs,p=Math.pow;u({target:"Math",stat:!0},{cbrt:function(T){var $=+T;return d($)*p(h($),.3333333333333333)}})},function(x,b,r){var u=r(3),d=Math.floor,h=Math.log,p=Math.LOG2E;u({target:"Math",stat:!0},{clz32:function(T){var $=T>>>0;return $?31-d(h($+.5)*p):32}})},function(x,b,r){var u=r(3),d=r(292),h=Math.cosh,p=Math.abs,y=Math.E,T=!h||h(710)===1/0;u({target:"Math",stat:!0,forced:T},{cosh:function(A){var E=d(p(A)-1)+1;return(E+1/(E*y*y))*(y/2)}})},function(x){var b=Math.expm1,r=Math.exp;x.exports=!b||b(10)>22025.465794806718||b(10)<22025.465794806718||b(-2e-17)!==-2e-17?function(d){var h=+d;return h===0?h:h>-1e-6&&h<1e-6?h+h*h/2:r(h)-1}:b},function(x,b,r){var u=r(3),d=r(292);u({target:"Math",stat:!0,forced:d!==Math.expm1},{expm1:d})},function(x,b,r){var u=r(3),d=r(213);u({target:"Math",stat:!0},{fround:d})},function(x,b,r){var u=r(3),d=r(214),h=.0009765625,p=65504,y=6103515625e-14;u({target:"Math",stat:!0},{f16round:function($){return d($,h,p,y)}})},function(x,b,r){var u=r(3),d=Math.hypot,h=Math.abs,p=Math.sqrt,y=!!d&&d(1/0,NaN)!==1/0;u({target:"Math",stat:!0,arity:2,forced:y},{hypot:function($,A){for(var E=0,R=0,I=arguments.length,O=0,C,D;R0?(D=C/O,E+=D*D):E+=C;return O===1/0?1/0:O*p(E)}})},function(x,b,r){var u=r(3),d=r(7),h=Math.imul,p=d(function(){return h(4294967295,5)!==-5||h.length!==2});u({target:"Math",stat:!0,forced:p},{imul:function(T,$){var A=65535,E=+T,R=+$,I=A&E,O=A&R;return 0|I*O+((A&E>>>16)*O+I*(A&R>>>16)<<16>>>0)}})},function(x,b,r){var u=r(3),d=r(299);u({target:"Math",stat:!0},{log10:d})},function(x){var b=Math.log,r=Math.LOG10E;x.exports=Math.log10||function(d){return b(d)*r}},function(x,b,r){var u=r(3),d=r(286);u({target:"Math",stat:!0},{log1p:d})},function(x,b,r){var u=r(3),d=r(226);u({target:"Math",stat:!0},{log2:d})},function(x,b,r){var u=r(3),d=r(215);u({target:"Math",stat:!0},{sign:d})},function(x,b,r){var u=r(3),d=r(7),h=r(292),p=Math.abs,y=Math.exp,T=Math.E,$=d(function(){return Math.sinh(-2e-17)!==-2e-17});u({target:"Math",stat:!0,forced:$},{sinh:function(E){var R=+E;return p(R)<1?(h(R)-h(-R))/2:(y(R-1)-y(-R-1))*(T/2)}})},function(x,b,r){var u=r(3),d=r(292),h=Math.exp;u({target:"Math",stat:!0},{tanh:function(y){var T=+y,$=d(T),A=d(-T);return $===1/0?1:A===1/0?-1:($-A)/(h(T)+h(-T))}})},function(x,b,r){var u=r(82);u(Math,"Math",!0)},function(x,b,r){var u=r(3),d=r(62);u({target:"Math",stat:!0},{trunc:d})},function(x,b,r){var u=r(3),d=r(36),h=r(6),p=r(4),y=r(80),T=r(14),$=r(67),A=r(38),E=r(118),R=r(24),I=r(22),O=r(19),C=r(7),D=r(57).f,M=r(5).f,F=r(44).f,z=r(308),U=r(309).trim,j="Number",G=p[j],B=y[j],V=G.prototype,Y=p.TypeError,Z=T("".slice),J=T("".charCodeAt),q=function(lt){var mt=O(lt,"number");return typeof mt=="bigint"?mt:nt(mt)},nt=function(lt){var mt=O(lt,"number"),gt,xt,yt,Ut,Dt,Xt,Qt,kt;if(I(mt))throw new Y("Cannot convert a Symbol value to a number");if(typeof mt=="string"&&mt.length>2){if(mt=U(mt),gt=J(mt,0),gt===43||gt===45){if(xt=J(mt,2),xt===88||xt===120)return NaN}else if(gt===48){switch(J(mt,1)){case 66:case 98:yt=2,Ut=49;break;case 79:case 111:yt=8,Ut=55;break;default:return+mt}for(Dt=Z(mt,2),Xt=Dt.length,Qt=0;QtUt)return NaN;return parseInt(Dt,yt)}}return+mt},rt=$(j,!G(" 0o1")||!G("0b1")||G("+0x1")),_=function(lt){return R(V,lt)&&C(function(){z(lt)})},tt=function(mt){var gt=arguments.length<1?0:G(q(mt));return _(this)?E(Object(gt),this,tt):gt};tt.prototype=V,rt&&!d&&(V.constructor=tt),u({global:!0,constructor:!0,wrap:!0,forced:rt},{Number:tt});var et=function(lt,mt){for(var gt=h?D(mt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),xt=0,yt;gt.length>xt;xt++)A(mt,yt=gt[xt])&&!A(lt,yt)&&F(lt,yt,M(mt,yt))};d&&B&&et(y[j],B),(rt||d)&&et(y[j],G)},function(x,b,r){var u=r(14);x.exports=u(1 .valueOf)},function(x,b,r){var u=r(14),d=r(16),h=r(68),p=r(310),y=u("".replace),T=RegExp("^["+p+"]+"),$=RegExp("(^|[^"+p+"])["+p+"]+$"),A=function(E){return function(R){var I=h(d(R));return E&1&&(I=y(I,T,"")),E&2&&(I=y(I,$,"$1")),I}};x.exports={start:A(1),end:A(2),trim:A(3)}},function(x){x.exports=` -\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(x,b,r){var u=r(3);u({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},function(x,b,r){var u=r(3),d=r(313);u({target:"Number",stat:!0},{isFinite:d})},function(x,b,r){var u=r(4),d=u.isFinite;x.exports=Number.isFinite||function(p){return typeof p=="number"&&d(p)}},function(x,b,r){var u=r(3),d=r(315);u({target:"Number",stat:!0},{isInteger:d})},function(x,b,r){var u=r(20),d=Math.floor;x.exports=Number.isInteger||function(p){return!u(p)&&isFinite(p)&&d(p)===p}},function(x,b,r){var u=r(3);u({target:"Number",stat:!0},{isNaN:function(h){return h!==h}})},function(x,b,r){var u=r(3),d=r(315),h=Math.abs;u({target:"Number",stat:!0},{isSafeInteger:function(y){return d(y)&&h(y)<=9007199254740991}})},function(x,b,r){var u=r(3);u({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(x,b,r){var u=r(3);u({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(x,b,r){var u=r(3),d=r(321);u({target:"Number",stat:!0,forced:Number.parseFloat!==d},{parseFloat:d})},function(x,b,r){var u=r(4),d=r(7),h=r(14),p=r(68),y=r(309).trim,T=r(310),$=h("".charAt),A=u.parseFloat,E=u.Symbol,R=E&&E.iterator,I=1/A(T+"-0")!==-1/0||R&&!d(function(){A(Object(R))});x.exports=I?function(C){var D=y(p(C)),M=A(D);return M===0&&$(D,0)==="-"?-0:M}:A},function(x,b,r){var u=r(3),d=r(323);u({target:"Number",stat:!0,forced:Number.parseInt!==d},{parseInt:d})},function(x,b,r){var u=r(4),d=r(7),h=r(14),p=r(68),y=r(309).trim,T=r(310),$=u.parseInt,A=u.Symbol,E=A&&A.iterator,R=/^[+-]?0x/i,I=h(R.exec),O=$(T+"08")!==8||$(T+"0x16")!==22||E&&!d(function(){$(Object(E))});x.exports=O?function(D,M){var F=y(p(D));return $(F,M>>>0||(I(R,F)?16:10))}:$},function(x,b,r){var u=r(3),d=r(14),h=r(61),p=r(308),y=r(244),T=r(299),$=r(7),A=RangeError,E=String,R=isFinite,I=Math.abs,O=Math.floor,C=Math.pow,D=Math.round,M=d(1 .toExponential),F=d(y),z=d("".slice),U=M(-69e-12,4)==="-6.9000e-11"&&M(1.255,2)==="1.25e+0"&&M(12345,3)==="1.235e+4"&&M(25,0)==="3e+1",j=function(){return $(function(){M(1,1/0)})&&$(function(){M(1,-1/0)})},G=function(){return!$(function(){M(1/0,1/0),M(NaN,1/0)})},B=!U||!j()||!G();u({target:"Number",proto:!0,forced:B},{toExponential:function(Y){var Z=p(this);if(Y===void 0)return M(Z);var J=h(Y);if(!R(Z))return String(Z);if(J<0||J>20)throw new A("Incorrect fraction digits");if(U)return M(Z,J);var q="",nt,rt,_,tt;if(Z<0&&(q="-",Z=-Z),Z===0)rt=0,nt=F("0",J+1);else{var et=T(Z);rt=O(et);var lt=C(10,rt-J),mt=D(Z/lt);2*Z>=(2*mt+1)*lt&&(mt+=1),mt>=C(10,J+1)&&(mt/=10,rt+=1),nt=E(mt)}return J!==0&&(nt=z(nt,0,1)+"."+z(nt,1)),rt===0?(_="+",tt="0"):(_=rt>0?"+":"-",tt=E(I(rt))),nt+="e"+_+tt,q+nt}})},function(x,b,r){var u=r(3),d=r(14),h=r(61),p=r(308),y=r(244),T=r(7),$=RangeError,A=String,E=Math.floor,R=d(y),I=d("".slice),O=d(1 .toFixed),C=function(j,G,B){return G===0?B:G%2===1?C(j,G-1,B*j):C(j*j,G/2,B)},D=function(j){for(var G=0,B=j;B>=4096;)G+=12,B/=4096;for(;B>=2;)G+=1,B/=2;return G},M=function(j,G,B){for(var V=-1,Y=B;++V<6;)Y+=G*j[V],j[V]=Y%1e7,Y=E(Y/1e7)},F=function(j,G){for(var B=6,V=0;--B>=0;)V+=j[B],j[B]=E(V/G),V=V%G*1e7},z=function(j){for(var G=6,B="";--G>=0;)if(B!==""||G===0||j[G]!==0){var V=A(j[G]);B=B===""?V:B+R("0",7-V.length)+V}return B},U=T(function(){return O(8e-5,3)!=="0.000"||O(.9,0)!=="1"||O(1.255,2)!=="1.25"||O(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!T(function(){O({})});u({target:"Number",proto:!0,forced:U},{toFixed:function(G){var B=p(this),V=h(G),Y=[0,0,0,0,0,0],Z="",J="0",q,nt,rt,_;if(V<0||V>20)throw new $("Incorrect fraction digits");if(B!==B)return"NaN";if(B<=-1e21||B>=1e21)return A(B);if(B<0&&(Z="-",B=-B),B>1e-21)if(q=D(B*C(2,69,1))-69,nt=q<0?B*C(2,-q,1):B/C(2,q,1),nt*=4503599627370496,q=52-q,q>0){for(M(Y,0,nt),rt=V;rt>=7;)M(Y,1e7,0),rt-=7;for(M(Y,C(10,rt,1),0),rt=q-1;rt>=23;)F(Y,8388608),rt-=23;F(Y,1<0?(_=J.length,J=Z+(_<=V?"0."+R("0",V-_)+J:I(J,0,_-V)+"."+I(J,_-V))):J=Z+J,J}})},function(x,b,r){var u=r(3),d=r(14),h=r(7),p=r(308),y=d(1 .toPrecision),T=h(function(){return y(1,void 0)!=="1"})||!h(function(){y({})});u({target:"Number",proto:!0,forced:T},{toPrecision:function(A){return A===void 0?y(p(this)):y(p(this),A)}})},function(x,b,r){var u=r(3),d=r(328);u({target:"Object",stat:!0,arity:2,forced:Object.assign!==d},{assign:d})},function(x,b,r){var u=r(6),d=r(14),h=r(8),p=r(7),y=r(73),T=r(66),$=r(10),A=r(39),E=r(13),R=Object.assign,I=Object.defineProperty,O=d([].concat);x.exports=!R||p(function(){if(u&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var C={},D={},M=Symbol("assign detection"),F="abcdefghijklmnopqrst";return C[M]=7,F.split("").forEach(function(z){D[z]=z}),R({},C)[M]!==7||y(R({},D)).join("")!==F})?function(D,M){for(var F=A(D),z=arguments.length,U=1,j=T.f,G=$.f;z>U;)for(var B=E(arguments[U++]),V=j?O(y(B),j(B)):y(B),Y=V.length,Z=0,J;Y>Z;)J=V[Z++],(!u||h(G,B,J))&&(F[J]=B[J]);return F}:R},function(x,b,r){var u=r(3),d=r(6),h=r(71);u({target:"Object",stat:!0,sham:!d},{create:h})},function(x,b,r){var u=r(3),d=r(6),h=r(331),p=r(30),y=r(39),T=r(44);d&&u({target:"Object",proto:!0,forced:h},{__defineGetter__:function(A,E){T.f(y(this),A,{get:p(E),enumerable:!0,configurable:!0})}})},function(x,b,r){var u=r(36),d=r(4),h=r(7),p=r(192);x.exports=u||!h(function(){if(!(p&&p<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete d[y]}})},function(x,b,r){var u=r(3),d=r(6),h=r(72).f;u({target:"Object",stat:!0,forced:Object.defineProperties!==h,sham:!d},{defineProperties:h})},function(x,b,r){var u=r(3),d=r(6),h=r(44).f;u({target:"Object",stat:!0,forced:Object.defineProperty!==h,sham:!d},{defineProperty:h})},function(x,b,r){var u=r(3),d=r(6),h=r(331),p=r(30),y=r(39),T=r(44);d&&u({target:"Object",proto:!0,forced:h},{__defineSetter__:function(A,E){T.f(y(this),A,{set:p(E),enumerable:!0,configurable:!0})}})},function(x,b,r){var u=r(3),d=r(336).entries;u({target:"Object",stat:!0},{entries:function(p){return d(p)}})},function(x,b,r){var u=r(6),d=r(7),h=r(14),p=r(128),y=r(73),T=r(12),$=r(10).f,A=h($),E=h([].push),R=u&&d(function(){var O=Object.create(null);return O[2]=2,!A(O,2)}),I=function(O){return function(C){for(var D=T(C),M=y(D),F=R&&p(D)===null,z=M.length,U=0,j=[],G;z>U;)G=M[U++],(!u||(F?G in D:A(D,G)))&&E(j,O?[G,D[G]]:D[G]);return j}};x.exports={entries:I(!0),values:I(!1)}},function(x,b,r){var u=r(3),d=r(281),h=r(7),p=r(20),y=r(278).onFreeze,T=Object.freeze,$=h(function(){T(1)});u({target:"Object",stat:!0,forced:$,sham:!d},{freeze:function(E){return T&&p(E)?T(y(E)):E}})},function(x,b,r){var u=r(3),d=r(130),h=r(141);u({target:"Object",stat:!0},{fromEntries:function(y){var T={};return d(y,function($,A){h(T,$,A)},{AS_ENTRIES:!0}),T}})},function(x,b,r){var u=r(3),d=r(7),h=r(12),p=r(5).f,y=r(6),T=!y||d(function(){p(1)});u({target:"Object",stat:!0,forced:T,sham:!y},{getOwnPropertyDescriptor:function(A,E){return p(h(A),E)}})},function(x,b,r){var u=r(3),d=r(6),h=r(56),p=r(12),y=r(5),T=r(141);u({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(A){for(var E=p(A),R=y.f,I=h(E),O={},C=0,D,M;I.length>C;)M=R(E,D=I[C++]),M!==void 0&&T(O,D,M);return O}})},function(x,b,r){var u=r(3),d=r(7),h=r(75).f,p=d(function(){return!Object.getOwnPropertyNames(1)});u({target:"Object",stat:!0,forced:p},{getOwnPropertyNames:h})},function(x,b,r){var u=r(3),d=r(7),h=r(39),p=r(128),y=r(129),T=d(function(){p(1)});u({target:"Object",stat:!0,forced:T,sham:!y},{getPrototypeOf:function(A){return p(h(A))}})},function(x,b,r){var u=r(3),d=r(23),h=r(14),p=r(30),y=r(16),T=r(18),$=r(130),A=r(7),E=Object.groupBy,R=d("Object","create"),I=h([].push),O=!E||A(function(){return E("ab",function(C){return C}).a.length!==1});u({target:"Object",stat:!0,forced:O},{groupBy:function(D,M){y(D),p(M);var F=R(null),z=0;return $(D,function(U){var j=T(M(U,z++));j in F?I(F[j],U):F[j]=[U]}),F}})},function(x,b,r){var u=r(3),d=r(38);u({target:"Object",stat:!0},{hasOwn:d})},function(x,b,r){var u=r(3),d=r(346);u({target:"Object",stat:!0},{is:d})},function(x){x.exports=Object.is||function(r,u){return r===u?r!==0||1/r===1/u:r!==r&&u!==u}},function(x,b,r){var u=r(3),d=r(279);u({target:"Object",stat:!0,forced:Object.isExtensible!==d},{isExtensible:d})},function(x,b,r){var u=r(3),d=r(7),h=r(20),p=r(15),y=r(280),T=Object.isFrozen,$=y||d(function(){T(1)});u({target:"Object",stat:!0,forced:$},{isFrozen:function(E){return!h(E)||y&&p(E)==="ArrayBuffer"?!0:T?T(E):!1}})},function(x,b,r){var u=r(3),d=r(7),h=r(20),p=r(15),y=r(280),T=Object.isSealed,$=y||d(function(){T(1)});u({target:"Object",stat:!0,forced:$},{isSealed:function(E){return!h(E)||y&&p(E)==="ArrayBuffer"?!0:T?T(E):!1}})},function(x,b,r){var u=r(3),d=r(39),h=r(73),p=r(7),y=p(function(){h(1)});u({target:"Object",stat:!0,forced:y},{keys:function($){return h(d($))}})},function(x,b,r){var u=r(3),d=r(6),h=r(331),p=r(39),y=r(18),T=r(128),$=r(5).f;d&&u({target:"Object",proto:!0,forced:h},{__lookupGetter__:function(E){var R=p(this),I=y(E),O;do if(O=$(R,I))return O.get;while(R=T(R))}})},function(x,b,r){var u=r(3),d=r(6),h=r(331),p=r(39),y=r(18),T=r(128),$=r(5).f;d&&u({target:"Object",proto:!0,forced:h},{__lookupSetter__:function(E){var R=p(this),I=y(E),O;do if(O=$(R,I))return O.set;while(R=T(R))}})},function(x,b,r){var u=r(3),d=r(20),h=r(278).onFreeze,p=r(281),y=r(7),T=Object.preventExtensions,$=y(function(){T(1)});u({target:"Object",stat:!0,forced:$,sham:!p},{preventExtensions:function(E){return T&&d(E)?T(h(E)):E}})},function(x,b,r){var u=r(6),d=r(77),h=r(20),p=r(116),y=r(39),T=r(16),$=Object.getPrototypeOf,A=Object.setPrototypeOf,E=Object.prototype,R="__proto__";if(u&&$&&A&&!(R in E))try{d(E,R,{configurable:!0,get:function(){return $(y(this))},set:function(O){var C=T(this);p(O)&&h(C)&&A(C,O)}})}catch(I){}},function(x,b,r){var u=r(3),d=r(20),h=r(278).onFreeze,p=r(281),y=r(7),T=Object.seal,$=y(function(){T(1)});u({target:"Object",stat:!0,forced:$,sham:!p},{seal:function(E){return T&&d(E)?T(h(E)):E}})},function(x,b,r){var u=r(3),d=r(113);u({target:"Object",stat:!0},{setPrototypeOf:d})},function(x,b,r){var u=r(70),d=r(47),h=r(358);u||d(Object.prototype,"toString",h,{unsafe:!0})},function(x,b,r){var u=r(70),d=r(69);x.exports=u?{}.toString:function(){return"[object "+d(this)+"]"}},function(x,b,r){var u=r(3),d=r(336).values;u({target:"Object",stat:!0},{values:function(p){return d(p)}})},function(x,b,r){var u=r(3),d=r(321);u({global:!0,forced:parseFloat!==d},{parseFloat:d})},function(x,b,r){var u=r(3),d=r(323);u({global:!0,forced:parseInt!==d},{parseInt:d})},function(x,b,r){r(363),r(379),r(381),r(382),r(383),r(384)},function(x,b,r){var u=r(3),d=r(36),h=r(182),p=r(4),y=r(8),T=r(47),$=r(113),A=r(82),E=r(194),R=r(30),I=r(21),O=r(20),C=r(211),D=r(364),M=r(366).set,F=r(369),z=r(374),U=r(375),j=r(371),G=r(51),B=r(376),V=r(377),Y=r(378),Z="Promise",J=V.CONSTRUCTOR,q=V.REJECTION_EVENT,nt=V.SUBCLASSING,rt=G.getterFor(Z),_=G.set,tt=B&&B.prototype,et=B,lt=tt,mt=p.TypeError,gt=p.document,xt=p.process,yt=Y.f,Ut=yt,Dt=!!(gt&>.createEvent&&p.dispatchEvent),Xt="unhandledrejection",Qt="rejectionhandled",kt=0,me=1,ge=2,ae=1,Mt=2,Ht,re,se,ee,fe=function(Tt){var qt;return O(Tt)&&I(qt=Tt.then)?qt:!1},Pe=function(Tt,qt){var te=qt.value,Zt=qt.state===me,Yt=Zt?Tt.ok:Tt.fail,Ye=Tt.resolve,Ze=Tt.reject,ut=Tt.domain,It,Pt,Ct;try{Yt?(Zt||(qt.rejection===Mt&&Te(qt),qt.rejection=ae),Yt===!0?It=te:(ut&&ut.enter(),It=Yt(te),ut&&(ut.exit(),Ct=!0)),It===Tt.promise?Ze(new mt("Promise-chain cycle")):(Pt=fe(It))?y(Pt,It,Ye,Ze):Ye(It)):Ze(te)}catch(Nt){ut&&!Ct&&ut.exit(),Ze(Nt)}},Me=function(Tt,qt){Tt.notified||(Tt.notified=!0,F(function(){for(var te=Tt.reactions,Zt;Zt=te.get();)Pe(Zt,Tt);Tt.notified=!1,qt&&!Tt.rejection&&ce(Tt)}))},$e=function(Tt,qt,te){var Zt,Yt;Dt?(Zt=gt.createEvent("Event"),Zt.promise=qt,Zt.reason=te,Zt.initEvent(Tt,!1,!0),p.dispatchEvent(Zt)):Zt={promise:qt,reason:te},!q&&(Yt=p["on"+Tt])?Yt(Zt):Tt===Xt&&z("Unhandled promise rejection",te)},ce=function(Tt){y(M,p,function(){var qt=Tt.facade,te=Tt.value,Zt=Ae(Tt),Yt;if(Zt&&(Yt=U(function(){h?xt.emit("unhandledRejection",te,qt):$e(Xt,qt,te)}),Tt.rejection=h||Ae(Tt)?Mt:ae,Yt.error))throw Yt.value})},Ae=function(Tt){return Tt.rejection!==ae&&!Tt.parent},Te=function(Tt){y(M,p,function(){var qt=Tt.facade;h?xt.emit("rejectionHandled",qt):$e(Qt,qt,Tt.value)})},de=function(Tt,qt,te){return function(Zt){Tt(qt,Zt,te)}},bt=function(Tt,qt,te){Tt.done||(Tt.done=!0,te&&(Tt=te),Tt.value=qt,Tt.state=ge,Me(Tt,!0))},Ft=function(Tt,qt,te){if(!Tt.done){Tt.done=!0,te&&(Tt=te);try{if(Tt.facade===qt)throw new mt("Promise can't be resolved itself");var Zt=fe(qt);Zt?F(function(){var Yt={done:!1};try{y(Zt,qt,de(Ft,Yt,Tt),de(bt,Yt,Tt))}catch(Ye){bt(Yt,Ye,Tt)}}):(Tt.value=qt,Tt.state=me,Me(Tt,!1))}catch(Yt){bt({done:!1},Yt,Tt)}}};if(J&&(et=function(qt){C(this,lt),R(qt),y(Ht,this);var te=rt(this);try{qt(de(Ft,te),de(bt,te))}catch(Zt){bt(te,Zt)}},lt=et.prototype,Ht=function(qt){_(this,{type:Z,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:kt,value:null})},Ht.prototype=T(lt,"then",function(qt,te){var Zt=rt(this),Yt=yt(D(this,et));return Zt.parent=!0,Yt.ok=I(qt)?qt:!0,Yt.fail=I(te)&&te,Yt.domain=h?xt.domain:void 0,Zt.state===kt?Zt.reactions.add(Yt):F(function(){Pe(Yt,Zt)}),Yt.promise}),re=function(){var Tt=new Ht,qt=rt(Tt);this.promise=Tt,this.resolve=de(Ft,qt),this.reject=de(bt,qt)},Y.f=yt=function(Tt){return Tt===et||Tt===se?new re(Tt):Ut(Tt)},!d&&I(B)&&tt!==Object.prototype)){ee=tt.then,nt||T(tt,"then",function(qt,te){var Zt=this;return new et(function(Yt,Ye){y(ee,Zt,Yt,Ye)}).then(qt,te)},{unsafe:!0});try{delete tt.constructor}catch(Tt){}$&&$(tt,lt)}u({global:!0,constructor:!0,wrap:!0,forced:J},{Promise:et}),A(et,Z,!1,!0),E(Z)},function(x,b,r){var u=r(46),d=r(365),h=r(17),p=r(33),y=p("species");x.exports=function(T,$){var A=u(T).constructor,E;return A===void 0||h(E=u(A)[y])?$:d(E)}},function(x,b,r){var u=r(89),d=r(31),h=TypeError;x.exports=function(p){if(u(p))return p;throw new h(d(p)+" is not a constructor")}},function(x,b,r){var u=r(4),d=r(94),h=r(84),p=r(21),y=r(38),T=r(7),$=r(74),A=r(76),E=r(42),R=r(367),I=r(368),O=r(182),C=u.setImmediate,D=u.clearImmediate,M=u.process,F=u.Dispatch,z=u.Function,U=u.MessageChannel,j=u.String,G=0,B={},V="onreadystatechange",Y,Z,J,q;T(function(){Y=u.location});var nt=function(et){if(y(B,et)){var lt=B[et];delete B[et],lt()}},rt=function(et){return function(){nt(et)}},_=function(et){nt(et.data)},tt=function(et){u.postMessage(j(et),Y.protocol+"//"+Y.host)};(!C||!D)&&(C=function(lt){R(arguments.length,1);var mt=p(lt)?lt:z(lt),gt=A(arguments,1);return B[++G]=function(){d(mt,void 0,gt)},Z(G),G},D=function(lt){delete B[lt]},O?Z=function(et){M.nextTick(rt(et))}:F&&F.now?Z=function(et){F.now(rt(et))}:U&&!I?(J=new U,q=J.port2,J.port1.onmessage=_,Z=h(q.postMessage,q)):u.addEventListener&&p(u.postMessage)&&!u.importScripts&&Y&&Y.protocol!=="file:"&&!T(tt)?(Z=tt,u.addEventListener("message",_,!1)):V in E("script")?Z=function(et){$.appendChild(E("script"))[V]=function(){$.removeChild(this),nt(et)}}:Z=function(et){setTimeout(rt(et),0)}),x.exports={set:C,clear:D}},function(x){var b=TypeError;x.exports=function(r,u){if(r1?p(arguments,1):[],C=y.f(this),D=$(function(){return h(T(I),void 0,O)});return(D.error?C.reject:C.resolve)(D.value),C.promise}})},function(x,b,r){var u=r(3),d=r(378);u({target:"Promise",stat:!0},{withResolvers:function(){var p=d.f(this);return{promise:p.promise,resolve:p.resolve,reject:p.reject}}})},function(x,b,r){var u=r(3),d=r(94),h=r(30),p=r(46),y=r(7),T=!y(function(){Reflect.apply(function(){})});u({target:"Reflect",stat:!0,forced:T},{apply:function(A,E,R){return d(h(A),E,p(R))}})},function(x,b,r){var u=r(3),d=r(23),h=r(94),p=r(251),y=r(365),T=r(46),$=r(20),A=r(71),E=r(7),R=d("Reflect","construct"),I=Object.prototype,O=[].push,C=E(function(){function F(){}return!(R(function(){},[],F)instanceof F)}),D=!E(function(){R(function(){})}),M=C||D;u({target:"Reflect",stat:!0,forced:M,sham:M},{construct:function(z,U){y(z),T(U);var j=arguments.length<3?z:y(arguments[2]);if(D&&!C)return R(z,U,j);if(z===j){switch(U.length){case 0:return new z;case 1:return new z(U[0]);case 2:return new z(U[0],U[1]);case 3:return new z(U[0],U[1],U[2]);case 4:return new z(U[0],U[1],U[2],U[3])}var G=[null];return h(O,G,U),new(h(p,z,G))}var B=j.prototype,V=A($(B)?B:I),Y=h(z,V,U);return $(Y)?Y:V}})},function(x,b,r){var u=r(3),d=r(6),h=r(46),p=r(18),y=r(44),T=r(7),$=T(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});u({target:"Reflect",stat:!0,forced:$,sham:!d},{defineProperty:function(E,R,I){h(E);var O=p(R);h(I);try{return y.f(E,O,I),!0}catch(C){return!1}}})},function(x,b,r){var u=r(3),d=r(46),h=r(5).f;u({target:"Reflect",stat:!0},{deleteProperty:function(y,T){var $=h(d(y),T);return $&&!$.configurable?!1:delete y[T]}})},function(x,b,r){var u=r(3),d=r(8),h=r(20),p=r(46),y=r(396),T=r(5),$=r(128);function A(E,R){var I=arguments.length<3?E:arguments[2],O,C;if(p(E)===I)return E[R];if(O=T.f(E,R),O)return y(O)?O.value:O.get===void 0?void 0:d(O.get,I);if(h(C=$(E)))return A(C,R,I)}u({target:"Reflect",stat:!0},{get:A})},function(x,b,r){var u=r(38);x.exports=function(d){return d!==void 0&&(u(d,"value")||u(d,"writable"))}},function(x,b,r){var u=r(3),d=r(6),h=r(46),p=r(5);u({target:"Reflect",stat:!0,sham:!d},{getOwnPropertyDescriptor:function(T,$){return p.f(h(T),$)}})},function(x,b,r){var u=r(3),d=r(46),h=r(128),p=r(129);u({target:"Reflect",stat:!0,sham:!p},{getPrototypeOf:function(T){return h(d(T))}})},function(x,b,r){var u=r(3);u({target:"Reflect",stat:!0},{has:function(h,p){return p in h}})},function(x,b,r){var u=r(3),d=r(46),h=r(279);u({target:"Reflect",stat:!0},{isExtensible:function(y){return d(y),h(y)}})},function(x,b,r){var u=r(3),d=r(56);u({target:"Reflect",stat:!0},{ownKeys:d})},function(x,b,r){var u=r(3),d=r(23),h=r(46),p=r(281);u({target:"Reflect",stat:!0,sham:!p},{preventExtensions:function(T){h(T);try{var $=d("Object","preventExtensions");return $&&$(T),!0}catch(A){return!1}}})},function(x,b,r){var u=r(3),d=r(8),h=r(46),p=r(20),y=r(396),T=r(7),$=r(44),A=r(5),E=r(128),R=r(11);function I(C,D,M){var F=arguments.length<4?C:arguments[3],z=A.f(h(C),D),U,j,G;if(!z){if(p(j=E(C)))return I(j,D,M,F);z=R(0)}if(y(z)){if(z.writable===!1||!p(F))return!1;if(U=A.f(F,D)){if(U.get||U.set||U.writable===!1)return!1;U.value=M,$.f(F,D,U)}else $.f(F,D,R(0,M))}else{if(G=z.set,G===void 0)return!1;d(G,F,M)}return!0}var O=T(function(){var C=function(){},D=$.f(new C,"a",{configurable:!0});return Reflect.set(C.prototype,"a",1,D)!==!1});u({target:"Reflect",stat:!0,forced:O},{set:I})},function(x,b,r){var u=r(3),d=r(46),h=r(115),p=r(113);p&&u({target:"Reflect",stat:!0},{setPrototypeOf:function(T,$){d(T),h($);try{return p(T,$),!0}catch(A){return!1}}})},function(x,b,r){var u=r(3),d=r(4),h=r(82);u({global:!0},{Reflect:{}}),h(d.Reflect,"Reflect",!0)},function(x,b,r){var u=r(6),d=r(4),h=r(14),p=r(67),y=r(118),T=r(43),$=r(71),A=r(57).f,E=r(24),R=r(407),I=r(68),O=r(408),C=r(410),D=r(117),M=r(47),F=r(7),z=r(38),U=r(51).enforce,j=r(194),G=r(33),B=r(411),V=r(412),Y=G("match"),Z=d.RegExp,J=Z.prototype,q=d.SyntaxError,nt=h(J.exec),rt=h("".charAt),_=h("".replace),tt=h("".indexOf),et=h("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,mt=/a/g,gt=/a/g,xt=new Z(mt)!==mt,yt=C.MISSED_STICKY,Ut=C.UNSUPPORTED_Y,Dt=u&&(!xt||yt||B||V||F(function(){return gt[Y]=!1,Z(mt)!==mt||Z(gt)===gt||String(Z(mt,"i"))!=="/a/i"})),Xt=function(ae){for(var Mt=ae.length,Ht=0,re="",se=!1,ee;Ht<=Mt;Ht++){if(ee=rt(ae,Ht),ee==="\\"){re+=ee+rt(ae,++Ht);continue}!se&&ee==="."?re+="[\\s\\S]":(ee==="["?se=!0:ee==="]"&&(se=!1),re+=ee)}return re},Qt=function(ae){for(var Mt=ae.length,Ht=0,re="",se=[],ee=$(null),fe=!1,Pe=!1,Me=0,$e="",ce;Ht<=Mt;Ht++){if(ce=rt(ae,Ht),ce==="\\")ce+=rt(ae,++Ht);else if(ce==="]")fe=!1;else if(!fe)switch(!0){case ce==="[":fe=!0;break;case ce==="(":if(re+=ce,et(ae,Ht+1,Ht+3)==="?:")continue;nt(lt,et(ae,Ht+1))&&(Ht+=2,Pe=!0),Me++;continue;case(ce===">"&&Pe):if($e===""||z(ee,$e))throw new q("Invalid capture group name");ee[$e]=!0,se[se.length]=[$e,Me],Pe=!1,$e="";continue}Pe?$e+=ce:re+=ce}return[re,se]};if(p("RegExp",Dt)){for(var kt=function(Mt,Ht){var re=E(J,this),se=R(Mt),ee=Ht===void 0,fe=[],Pe=Mt,Me,$e,ce,Ae,Te,de;if(!re&&se&&ee&&Mt.constructor===kt)return Mt;if((se||E(J,Mt))&&(Mt=Mt.source,ee&&(Ht=O(Pe))),Mt=Mt===void 0?"":I(Mt),Ht=Ht===void 0?"":I(Ht),Pe=Mt,B&&"dotAll"in mt&&($e=!!Ht&&tt(Ht,"s")>-1,$e&&(Ht=_(Ht,/s/g,""))),Me=Ht,yt&&"sticky"in mt&&(ce=!!Ht&&tt(Ht,"y")>-1,ce&&Ut&&(Ht=_(Ht,/y/g,""))),V&&(Ae=Qt(Mt),Mt=Ae[0],fe=Ae[1]),Te=y(Z(Mt,Ht),re?this:J,kt),($e||ce||fe.length)&&(de=U(Te),$e&&(de.dotAll=!0,de.raw=kt(Xt(Mt),Me)),ce&&(de.sticky=!0),fe.length&&(de.groups=fe)),Mt!==Pe)try{T(Te,"source",Pe===""?"(?:)":Pe)}catch(bt){}return Te},me=A(Z),ge=0;me.length>ge;)D(kt,Z,me[ge++]);J.constructor=kt,kt.prototype=J,M(d,"RegExp",kt,{constructor:!0})}j("RegExp")},function(x,b,r){var u=r(20),d=r(15),h=r(33),p=h("match");x.exports=function(y){var T;return u(y)&&((T=y[p])!==void 0?!!T:d(y)==="RegExp")}},function(x,b,r){var u=r(8),d=r(38),h=r(24),p=r(409),y=RegExp.prototype;x.exports=function(T){var $=T.flags;return $===void 0&&!("flags"in y)&&!d(T,"flags")&&h(y,T)?u(p,T):$}},function(x,b,r){var u=r(46);x.exports=function(){var d=u(this),h="";return d.hasIndices&&(h+="d"),d.global&&(h+="g"),d.ignoreCase&&(h+="i"),d.multiline&&(h+="m"),d.dotAll&&(h+="s"),d.unicode&&(h+="u"),d.unicodeSets&&(h+="v"),d.sticky&&(h+="y"),h}},function(x,b,r){var u=r(7),d=r(4),h=d.RegExp,p=u(function(){var $=h("a","y");return $.lastIndex=2,$.exec("abcd")!==null}),y=p||u(function(){return!h("a","y").sticky}),T=p||u(function(){var $=h("^r","gy");return $.lastIndex=2,$.exec("str")!==null});x.exports={BROKEN_CARET:T,MISSED_STICKY:y,UNSUPPORTED_Y:p}},function(x,b,r){var u=r(7),d=r(4),h=d.RegExp;x.exports=u(function(){var p=h(".","s");return!(p.dotAll&&p.test(` -`)&&p.flags==="s")})},function(x,b,r){var u=r(7),d=r(4),h=d.RegExp;x.exports=u(function(){var p=h("(?b)","g");return p.exec("b").groups.a!=="b"||"b".replace(p,"$c")!=="bc"})},function(x,b,r){var u=r(3),d=r(14),h=r(414),p=r(38),y=r(243).start,T=r(310),$=Array,A=RegExp.escape,E=d("".charAt),R=d("".charCodeAt),I=d(1.1.toString),O=d([].join),C=/^[0-9a-z]/i,D=/^[$()*+./?[\\\]^{|}]/,M=RegExp("^[!\"#%&',\\-:;<=>@`~"+T+"]"),F=d(C.exec),z={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},U=function(G){var B=I(R(G,0),16);return B.length<3?"\\x"+y(B,2,"0"):"\\u"+y(B,4,"0")},j=!A||A("ab")!=="\\x61b";u({target:"RegExp",stat:!0,forced:j},{escape:function(B){h(B);for(var V=B.length,Y=$(V),Z=0;Z=56320||Z+1>=V||(R(B,Z+1)&64512)!==56320?Y[Z]=U(J):(Y[Z]=J,Y[++Z]=E(B,Z))}}return O(Y,"")}})},function(x){var b=TypeError;x.exports=function(r){if(typeof r=="string")return r;throw new b("Argument is not a string")}},function(x,b,r){var u=r(6),d=r(411),h=r(15),p=r(77),y=r(51).get,T=RegExp.prototype,$=TypeError;u&&d&&p(T,"dotAll",{configurable:!0,get:function(){if(this!==T){if(h(this)==="RegExp")return!!y(this).dotAll;throw new $("Incompatible receiver, RegExp required")}}})},function(x,b,r){var u=r(3),d=r(417);u({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},function(x,b,r){var u=r(8),d=r(14),h=r(68),p=r(409),y=r(410),T=r(34),$=r(71),A=r(51).get,E=r(411),R=r(412),I=T("native-string-replace",String.prototype.replace),O=RegExp.prototype.exec,C=O,D=d("".charAt),M=d("".indexOf),F=d("".replace),z=d("".slice),U=function(){var V=/a/,Y=/b*/g;return u(O,V,"a"),u(O,Y,"a"),V.lastIndex!==0||Y.lastIndex!==0}(),j=y.BROKEN_CARET,G=/()??/.exec("")[1]!==void 0,B=U||G||j||E||R;B&&(C=function(Y){var Z=this,J=A(Z),q=h(Y),nt=J.raw,rt,_,tt,et,lt,mt,gt;if(nt)return nt.lastIndex=Z.lastIndex,rt=u(C,nt,q),Z.lastIndex=nt.lastIndex,rt;var xt=J.groups,yt=j&&Z.sticky,Ut=u(p,Z),Dt=Z.source,Xt=0,Qt=q;if(yt&&(Ut=F(Ut,"y",""),M(Ut,"g")===-1&&(Ut+="g"),Qt=z(q,Z.lastIndex),Z.lastIndex>0&&(!Z.multiline||Z.multiline&&D(q,Z.lastIndex-1)!==` -`)&&(Dt="(?: "+Dt+")",Qt=" "+Qt,Xt++),_=new RegExp("^(?:"+Dt+")",Ut)),G&&(_=new RegExp("^"+Dt+"$(?!\\s)",Ut)),U&&(tt=Z.lastIndex),et=u(O,yt?_:Z,Qt),yt?et?(et.input=z(et.input,Xt),et[0]=z(et[0],Xt),et.index=Z.lastIndex,Z.lastIndex+=et[0].length):Z.lastIndex=0:U&&et&&(Z.lastIndex=Z.global?et.index+et[0].length:tt),G&&et&&et.length>1&&u(I,et[0],_,function(){for(lt=1;ltC.size?T(C.getIterator(),function(M){E(O,M)&&A(D,M)}):y(O,function(M){C.includes(M)&&A(D,M)}),D}},function(x,b,r){var u=r(3),d=r(437),h=r(433),p=!h("isDisjointFrom",function(y){return!y});u({target:"Set",proto:!0,real:!0,forced:p},{isDisjointFrom:d})},function(x,b,r){var u=r(426),d=r(427).has,h=r(431),p=r(432),y=r(429),T=r(430),$=r(135);x.exports=function(E){var R=u(this),I=p(E);if(h(R)<=I.size)return y(R,function(C){if(I.includes(C))return!1},!0)!==!1;var O=I.getIterator();return T(O,function(C){if(d(R,C))return $(O,"normal",!1)})!==!1}},function(x,b,r){var u=r(3),d=r(439),h=r(433),p=!h("isSubsetOf",function(y){return y});u({target:"Set",proto:!0,real:!0,forced:p},{isSubsetOf:d})},function(x,b,r){var u=r(426),d=r(431),h=r(429),p=r(432);x.exports=function(T){var $=u(this),A=p(T);return d($)>A.size?!1:h($,function(E){if(!A.includes(E))return!1},!0)!==!1}},function(x,b,r){var u=r(3),d=r(441),h=r(433),p=!h("isSupersetOf",function(y){return!y});u({target:"Set",proto:!0,real:!0,forced:p},{isSupersetOf:d})},function(x,b,r){var u=r(426),d=r(427).has,h=r(431),p=r(432),y=r(430),T=r(135);x.exports=function(A){var E=u(this),R=p(A);if(h(E)=0?C:O+C;return D<0||D>=O?void 0:$(I,D)}})},function(x,b,r){var u=r(3),d=r(448).codeAt;u({target:"String",proto:!0},{codePointAt:function(p){return d(this,p)}})},function(x,b,r){var u=r(14),d=r(61),h=r(68),p=r(16),y=u("".charAt),T=u("".charCodeAt),$=u("".slice),A=function(E){return function(R,I){var O=h(p(R)),C=d(I),D=O.length,M,F;return C<0||C>=D?E?"":void 0:(M=T(O,C),M<55296||M>56319||C+1===D||(F=T(O,C+1))<56320||F>57343?E?y(O,C):M:E?$(O,C,C+2):(M-55296<<10)+(F-56320)+65536)}};x.exports={codeAt:A(!1),charAt:A(!0)}},function(x,b,r){var u=r(3),d=r(85),h=r(5).f,p=r(64),y=r(68),T=r(450),$=r(16),A=r(451),E=r(36),R=d("".slice),I=Math.min,O=A("endsWith"),C=!E&&!O&&!!function(){var D=h(String.prototype,"endsWith");return D&&!D.writable}();u({target:"String",proto:!0,forced:!C&&!O},{endsWith:function(M){var F=y($(this));T(M);var z=arguments.length>1?arguments[1]:void 0,U=F.length,j=z===void 0?U:I(p(z),U),G=y(M);return R(F,j-G.length,j)===G}})},function(x,b,r){var u=r(407),d=TypeError;x.exports=function(h){if(u(h))throw new d("The method doesn't accept regular expressions");return h}},function(x,b,r){var u=r(33),d=u("match");x.exports=function(h){var p=/./;try{"/./"[h](p)}catch(y){try{return p[d]=!1,"/./"[h](p)}catch(T){}}return!1}},function(x,b,r){var u=r(3),d=r(14),h=r(60),p=RangeError,y=String.fromCharCode,T=String.fromCodePoint,$=d([].join),A=!!T&&T.length!==1;u({target:"String",stat:!0,arity:1,forced:A},{fromCodePoint:function(R){for(var I=[],O=arguments.length,C=0,D;O>C;){if(D=+arguments[C++],h(D,1114111)!==D)throw new p(D+" is not a valid code point");I[C]=D<65536?y(D):y(((D-=65536)>>10)+55296,D%1024+56320)}return $(I,"")}})},function(x,b,r){var u=r(3),d=r(14),h=r(450),p=r(16),y=r(68),T=r(451),$=d("".indexOf);u({target:"String",proto:!0,forced:!T("includes")},{includes:function(E){return!!~$(y(p(this)),y(h(E)),arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(14),h=r(16),p=r(68),y=d("".charCodeAt);u({target:"String",proto:!0},{isWellFormed:function(){for(var $=p(h(this)),A=$.length,E=0;E=56320||++E>=A||(y($,E)&64512)!==56320))return!1}return!0}})},function(x,b,r){var u=r(448).charAt,d=r(68),h=r(51),p=r(169),y=r(172),T="String Iterator",$=h.set,A=h.getterFor(T);p(String,"String",function(E){$(this,{type:T,string:d(E),index:0})},function(){var R=A(this),I=R.string,O=R.index,C;return O>=I.length?y(void 0,!0):(C=u(I,O),R.index+=C.length,y(C,!1))})},function(x,b,r){var u=r(8),d=r(457),h=r(46),p=r(17),y=r(64),T=r(68),$=r(16),A=r(29),E=r(458),R=r(459);d("match",function(I,O,C){return[function(M){var F=$(this),z=p(M)?void 0:A(M,I);return z?u(z,M,F):new RegExp(M)[I](T(F))},function(D){var M=h(this),F=T(D),z=C(O,M,F);if(z.done)return z.value;if(!M.global)return R(M,F);var U=M.unicode;M.lastIndex=0;for(var j=[],G=0,B;(B=R(M,F))!==null;){var V=T(B[0]);j[G]=V,V===""&&(M.lastIndex=E(F,y(M.lastIndex),U)),G++}return G===0?null:j}]})},function(x,b,r){r(416);var u=r(8),d=r(47),h=r(417),p=r(7),y=r(33),T=r(43),$=y("species"),A=RegExp.prototype;x.exports=function(E,R,I,O){var C=y(E),D=!p(function(){var U={};return U[C]=function(){return 7},""[E](U)!==7}),M=D&&!p(function(){var U=!1,j=/a/;return E==="split"&&(j={},j.constructor={},j.constructor[$]=function(){return j},j.flags="",j[C]=/./[C]),j.exec=function(){return U=!0,null},j[C](""),!U});if(!D||!M||I){var F=/./[C],z=R(C,""[E],function(U,j,G,B,V){var Y=j.exec;return Y===h||Y===A.exec?D&&!V?{done:!0,value:u(F,j,G,B)}:{done:!0,value:u(U,G,j,B)}:{done:!1}});d(String.prototype,E,z[0]),d(A,C,z[1])}O&&T(A[C],"sham",!0)}},function(x,b,r){var u=r(448).charAt;x.exports=function(d,h,p){return h+(p?u(d,h).length:1)}},function(x,b,r){var u=r(8),d=r(46),h=r(21),p=r(15),y=r(417),T=TypeError;x.exports=function($,A){var E=$.exec;if(h(E)){var R=u(E,$,A);return R!==null&&d(R),R}if(p($)==="RegExp")return u(y,$,A);throw new T("RegExp#exec called on incompatible receiver")}},function(x,b,r){var u=r(3),d=r(8),h=r(85),p=r(170),y=r(172),T=r(16),$=r(64),A=r(68),E=r(46),R=r(17),I=r(15),O=r(407),C=r(408),D=r(29),M=r(47),F=r(7),z=r(33),U=r(364),j=r(458),G=r(459),B=r(51),V=r(36),Y=z("matchAll"),Z="RegExp String",J=Z+" Iterator",q=B.set,nt=B.getterFor(J),rt=RegExp.prototype,_=TypeError,tt=h("".indexOf),et=h("".matchAll),lt=!!et&&!F(function(){et("a",/./)}),mt=p(function(yt,Ut,Dt,Xt){q(this,{type:J,regexp:yt,string:Ut,global:Dt,unicode:Xt,done:!1})},Z,function(){var yt=nt(this);if(yt.done)return y(void 0,!0);var Ut=yt.regexp,Dt=yt.string,Xt=G(Ut,Dt);return Xt===null?(yt.done=!0,y(void 0,!0)):yt.global?(A(Xt[0])===""&&(Ut.lastIndex=j(Dt,$(Ut.lastIndex),yt.unicode)),y(Xt,!1)):(yt.done=!0,y(Xt,!1))}),gt=function(xt){var yt=E(this),Ut=A(xt),Dt=U(yt,RegExp),Xt=A(C(yt)),Qt,kt,me;return Qt=new Dt(Dt===RegExp?yt.source:yt,Xt),kt=!!~tt(Xt,"g"),me=!!~tt(Xt,"u"),Qt.lastIndex=$(yt.lastIndex),new mt(Qt,Ut,kt,me)};u({target:"String",proto:!0,forced:lt},{matchAll:function(yt){var Ut=T(this),Dt,Xt,Qt,kt;if(R(yt)){if(lt)return et(Ut,yt)}else{if(O(yt)&&(Dt=A(T(C(yt))),!~tt(Dt,"g")))throw new _("`.matchAll` does not allow non-global regexes");if(lt)return et(Ut,yt);if(Qt=D(yt,Y),Qt===void 0&&V&&I(yt)==="RegExp"&&(Qt=gt),Qt)return d(Qt,yt,Ut)}return Xt=A(Ut),kt=new RegExp(yt,"g"),V?d(gt,kt,Xt):kt[Y](Xt)}}),V||Y in rt||M(rt,Y,gt)},function(x,b,r){var u=r(3),d=r(243).end,h=r(462);u({target:"String",proto:!0,forced:h},{padEnd:function(y){return d(this,y,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(28);x.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(u)},function(x,b,r){var u=r(3),d=r(243).start,h=r(462);u({target:"String",proto:!0,forced:h},{padStart:function(y){return d(this,y,arguments.length>1?arguments[1]:void 0)}})},function(x,b,r){var u=r(3),d=r(14),h=r(12),p=r(39),y=r(68),T=r(63),$=d([].push),A=d([].join);u({target:"String",stat:!0},{raw:function(R){var I=h(p(R).raw),O=T(I);if(!O)return"";for(var C=arguments.length,D=[],M=0;;){if($(D,y(I[M++])),M===O)return A(D,"");M")!=="7"});p("replace",function(_,tt,et){var lt=nt?"$":"$0";return[function(gt,xt){var yt=O(this),Ut=A(gt)?void 0:D(gt,U);return Ut?d(Ut,gt,yt,xt):d(tt,I(yt),gt,xt)},function(mt,gt){var xt=T(this),yt=I(mt);if(typeof gt=="string"&&Y(gt,lt)===-1&&Y(gt,"$<")===-1){var Ut=et(tt,xt,yt,gt);if(Ut.done)return Ut.value}var Dt=$(gt);Dt||(gt=I(gt));var Xt=xt.global,Qt;Xt&&(Qt=xt.unicode,xt.lastIndex=0);for(var kt=[],me;me=F(xt,yt),!(me===null||(V(kt,me),!Xt));){var ge=I(me[0]);ge===""&&(xt.lastIndex=C(yt,R(xt.lastIndex),Qt))}for(var ae="",Mt=0,Ht=0;Ht=Mt&&(ae+=Z(yt,Mt,se)+fe,Mt=se+re.length)}return ae+Z(yt,Mt)}]},!rt||!q||nt)},function(x,b,r){var u=r(14),d=r(39),h=Math.floor,p=u("".charAt),y=u("".replace),T=u("".slice),$=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A=/\$([$&'`]|\d{1,2})/g;x.exports=function(E,R,I,O,C,D){var M=I+E.length,F=O.length,z=A;return C!==void 0&&(C=d(C),z=$),y(D,z,function(U,j){var G;switch(p(j,0)){case"$":return"$";case"&":return E;case"`":return T(R,0,I);case"'":return T(R,M);case"<":G=C[T(j,1,-1)];break;default:var B=+j;if(B===0)return U;if(B>F){var V=h(B/10);return V===0?U:V<=F?O[V-1]===void 0?p(j,1):O[V-1]+p(j,1):U}G=O[B-1]}return G===void 0?"":G})}},function(x,b,r){var u=r(3),d=r(8),h=r(14),p=r(16),y=r(21),T=r(17),$=r(407),A=r(68),E=r(29),R=r(408),I=r(467),O=r(33),C=r(36),D=O("replace"),M=TypeError,F=h("".indexOf),z=h("".replace),U=h("".slice),j=Math.max;u({target:"String",proto:!0},{replaceAll:function(B,V){var Y=p(this),Z,J,q,nt,rt,_,tt,et,lt,mt,gt=0,xt="";if(!T(B)){if(Z=$(B),Z&&(J=A(p(R(B))),!~F(J,"g")))throw new M("`.replaceAll` does not allow non-global regexes");if(q=E(B,D),q)return d(q,B,Y,V);if(C&&Z)return z(A(Y),B,V)}for(nt=A(Y),rt=A(B),_=y(V),_||(V=A(V)),tt=rt.length,et=j(1,tt),lt=F(nt,rt);lt!==-1;)mt=_?A(V(rt,lt,nt)):I(rt,nt,lt,[],void 0,V),xt+=U(nt,gt,lt)+mt,gt=lt+tt,lt=lt+et>nt.length?-1:F(nt,rt,lt+et);return gt1||"".split(/.?/).length;h("split",function(V,Y,Z){var J="0".split(void 0,0).length?function(q,nt){return q===void 0&&nt===0?[]:u(Y,this,q,nt)}:Y;return[function(nt,rt){var _=T(this),tt=y(nt)?void 0:I(nt,V);return tt?u(tt,nt,_,rt):u(J,R(_),nt,rt)},function(q,nt){var rt=p(this),_=R(q);if(!B){var tt=Z(J,rt,_,nt,J!==Y);if(tt.done)return tt.value}var et=$(rt,RegExp),lt=rt.unicode,mt=(rt.ignoreCase?"i":"")+(rt.multiline?"m":"")+(rt.unicode?"u":"")+(M?"g":"y"),gt=new et(M?"^(?:"+rt.source+")":rt,mt),xt=nt===void 0?F:nt>>>0;if(xt===0)return[];if(_.length===0)return O(gt,_)===null?[_]:[];for(var yt=0,Ut=0,Dt=[];Ut<_.length;){gt.lastIndex=M?0:Ut;var Xt=O(gt,M?j(_,Ut):_),Qt;if(Xt===null||(Qt=z(E(gt.lastIndex+(M?Ut:0)),_.length))===yt)Ut=A(_,Ut,lt);else{if(U(Dt,j(_,yt,Ut)),Dt.length===xt)return Dt;for(var kt=1;kt<=Xt.length-1;kt++)if(U(Dt,Xt[kt]),Dt.length===xt)return Dt;Ut=yt=Qt}}return U(Dt,j(_,yt)),Dt}]},B||!G,M)},function(x,b,r){var u=r(3),d=r(85),h=r(5).f,p=r(64),y=r(68),T=r(450),$=r(16),A=r(451),E=r(36),R=d("".slice),I=Math.min,O=A("startsWith"),C=!E&&!O&&!!function(){var D=h(String.prototype,"startsWith");return D&&!D.writable}();u({target:"String",proto:!0,forced:!C&&!O},{startsWith:function(M){var F=y($(this));T(M);var z=p(I(arguments.length>1?arguments[1]:void 0,F.length)),U=y(M);return R(F,z,z+U.length)===U}})},function(x,b,r){var u=r(3),d=r(14),h=r(16),p=r(61),y=r(68),T=d("".slice),$=Math.max,A=Math.min,E=!"".substr||"ab".substr(-1)!=="b";u({target:"String",proto:!0,forced:E},{substr:function(I,O){var C=y(h(this)),D=C.length,M=p(I),F,z;return M===1/0&&(M=0),M<0&&(M=$(D+M,0)),F=O===void 0?D:p(O),F<=0||F===1/0?"":(z=A(M+F,D),M>=z?"":T(C,M,z))}})},function(x,b,r){var u=r(3),d=r(8),h=r(14),p=r(16),y=r(68),T=r(7),$=Array,A=h("".charAt),E=h("".charCodeAt),R=h([].join),I="".toWellFormed,O="\uFFFD",C=I&&T(function(){return d(I,1)!=="1"});u({target:"String",proto:!0,forced:C},{toWellFormed:function(){var M=y(p(this));if(C)return d(I,M);for(var F=M.length,z=$(F),U=0;U=56320||U+1>=F||(E(M,U+1)&64512)!==56320?z[U]=O:(z[U]=A(M,U),z[++U]=A(M,U))}return R(z,"")}})},function(x,b,r){var u=r(3),d=r(309).trim,h=r(475);u({target:"String",proto:!0,forced:h("trim")},{trim:function(){return d(this)}})},function(x,b,r){var u=r(49).PROPER,d=r(7),h=r(310),p="\u200B\x85\u180E";x.exports=function(y){return d(function(){return!!h[y]()||p[y]()!==p||u&&h[y].name!==y})}},function(x,b,r){r(477);var u=r(3),d=r(478);u({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==d},{trimEnd:d})},function(x,b,r){var u=r(3),d=r(478);u({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==d},{trimRight:d})},function(x,b,r){var u=r(309).end,d=r(475);x.exports=d("trimEnd")?function(){return u(this)}:"".trimEnd},function(x,b,r){r(480);var u=r(3),d=r(481);u({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==d},{trimStart:d})},function(x,b,r){var u=r(3),d=r(481);u({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==d},{trimLeft:d})},function(x,b,r){var u=r(309).start,d=r(475);x.exports=d("trimStart")?function(){return u(this)}:"".trimStart},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("anchor")},{anchor:function(y){return d(this,"a","name",y)}})},function(x,b,r){var u=r(14),d=r(16),h=r(68),p=/"/g,y=u("".replace);x.exports=function(T,$,A,E){var R=h(d(T)),I="<"+$;return A!==""&&(I+=" "+A+'="'+y(h(E),p,""")+'"'),I+">"+R+""}},function(x,b,r){var u=r(7);x.exports=function(d){return u(function(){var h=""[d]('"');return h!==h.toLowerCase()||h.split('"').length>3})}},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("big")},{big:function(){return d(this,"big","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("blink")},{blink:function(){return d(this,"blink","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("bold")},{bold:function(){return d(this,"b","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("fixed")},{fixed:function(){return d(this,"tt","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("fontcolor")},{fontcolor:function(y){return d(this,"font","color",y)}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("fontsize")},{fontsize:function(y){return d(this,"font","size",y)}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("italics")},{italics:function(){return d(this,"i","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("link")},{link:function(y){return d(this,"a","href",y)}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("small")},{small:function(){return d(this,"small","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("strike")},{strike:function(){return d(this,"strike","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("sub")},{sub:function(){return d(this,"sub","","")}})},function(x,b,r){var u=r(3),d=r(483),h=r(484);u({target:"String",proto:!0,forced:h("sup")},{sup:function(){return d(this,"sup","","")}})},function(x,b,r){var u=r(498);u("Float32",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(3),d=r(4),h=r(8),p=r(6),y=r(499),T=r(219),$=r(208),A=r(211),E=r(11),R=r(43),I=r(315),O=r(64),C=r(212),D=r(500),M=r(501),F=r(18),z=r(38),U=r(69),j=r(20),G=r(22),B=r(71),V=r(24),Y=r(113),Z=r(57).f,J=r(502),q=r(83).forEach,nt=r(194),rt=r(77),_=r(44),tt=r(5),et=r(199),lt=r(51),mt=r(118),gt=lt.get,xt=lt.set,yt=lt.enforce,Ut=_.f,Dt=tt.f,Xt=d.RangeError,Qt=$.ArrayBuffer,kt=Qt.prototype,me=$.DataView,ge=T.NATIVE_ARRAY_BUFFER_VIEWS,ae=T.TYPED_ARRAY_TAG,Mt=T.TypedArray,Ht=T.TypedArrayPrototype,re=T.isTypedArray,se="BYTES_PER_ELEMENT",ee="Wrong length",fe=function(Ae,Te){rt(Ae,Te,{configurable:!0,get:function(){return gt(this)[Te]}})},Pe=function(Ae){var Te;return V(kt,Ae)||(Te=U(Ae))==="ArrayBuffer"||Te==="SharedArrayBuffer"},Me=function(Ae,Te){return re(Ae)&&!G(Te)&&Te in Ae&&I(+Te)&&Te>=0},$e=function(Te,de){return de=F(de),Me(Te,de)?E(2,Te[de]):Dt(Te,de)},ce=function(Te,de,bt){return de=F(de),Me(Te,de)&&j(bt)&&z(bt,"value")&&!z(bt,"get")&&!z(bt,"set")&&!bt.configurable&&(!z(bt,"writable")||bt.writable)&&(!z(bt,"enumerable")||bt.enumerable)?(Te[de]=bt.value,Te):Ut(Te,de,bt)};p?(ge||(tt.f=$e,_.f=ce,fe(Ht,"buffer"),fe(Ht,"byteOffset"),fe(Ht,"byteLength"),fe(Ht,"length")),u({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:$e,defineProperty:ce}),x.exports=function(Ae,Te,de){var bt=Ae.match(/\d+/)[0]/8,Ft=Ae+(de?"Clamped":"")+"Array",Tt="get"+Ae,qt="set"+Ae,te=d[Ft],Zt=te,Yt=Zt&&Zt.prototype,Ye={},Ze=function(Ct,Nt){var Et=gt(Ct);return Et.view[Tt](Nt*bt+Et.byteOffset,!0)},ut=function(Ct,Nt,Et){var ie=gt(Ct);ie.view[qt](Nt*bt+ie.byteOffset,de?M(Et):Et,!0)},It=function(Ct,Nt){Ut(Ct,Nt,{get:function(){return Ze(this,Nt)},set:function(Et){return ut(this,Nt,Et)},enumerable:!0})};ge?y&&(Zt=Te(function(Ct,Nt,Et,ie){return A(Ct,Yt),mt(function(){return j(Nt)?Pe(Nt)?ie!==void 0?new te(Nt,D(Et,bt),ie):Et!==void 0?new te(Nt,D(Et,bt)):new te(Nt):re(Nt)?et(Zt,Nt):h(J,Zt,Nt):new te(C(Nt))}(),Ct,Zt)}),Y&&Y(Zt,Mt),q(Z(te),function(Ct){Ct in Zt||R(Zt,Ct,te[Ct])}),Zt.prototype=Yt):(Zt=Te(function(Ct,Nt,Et,ie){A(Ct,Yt);var we=0,Rt=0,zt,jt,Wt;if(!j(Nt))Wt=C(Nt),jt=Wt*bt,zt=new Qt(jt);else if(Pe(Nt)){zt=Nt,Rt=D(Et,bt);var ue=Nt.byteLength;if(ie===void 0){if(ue%bt)throw new Xt(ee);if(jt=ue-Rt,jt<0)throw new Xt(ee)}else if(jt=O(ie)*bt,jt+Rt>ue)throw new Xt(ee);Wt=jt/bt}else return re(Nt)?et(Zt,Nt):h(J,Zt,Nt);for(xt(Ct,{buffer:zt,byteOffset:Rt,byteLength:jt,length:Wt,view:new me(zt)});we255?255:u&255}},function(x,b,r){var u=r(84),d=r(8),h=r(365),p=r(39),y=r(63),T=r(133),$=r(134),A=r(131),E=r(503),R=r(219).aTypedArrayConstructor,I=r(504);x.exports=function(C){var D=h(this),M=p(C),F=arguments.length,z=F>1?arguments[1]:void 0,U=z!==void 0,j=$(M),G,B,V,Y,Z,J,q,nt;if(j&&!A(j))for(q=T(M,j),nt=q.next,M=[];!(J=d(nt,q)).done;)M.push(J.value);for(U&&F>2&&(z=u(z,arguments[2])),B=y(M),V=new(R(D))(B),Y=E(V),G=0;B>G;G++)Z=U?z(M[G],G):M[G],V[G]=Y?I(Z):+Z;return V}},function(x,b,r){var u=r(69);x.exports=function(d){var h=u(d);return h==="BigInt64Array"||h==="BigUint64Array"}},function(x,b,r){var u=r(19),d=TypeError;x.exports=function(h){var p=u(h,"number");if(typeof p=="number")throw new d("Can't convert number to bigint");return BigInt(p)}},function(x,b,r){var u=r(498);u("Float64",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Int8",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Int16",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Int32",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Uint8",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Uint8",function(d){return function(p,y,T){return d(this,p,y,T)}},!0)},function(x,b,r){var u=r(498);u("Uint16",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(498);u("Uint32",function(d){return function(p,y,T){return d(this,p,y,T)}})},function(x,b,r){var u=r(219),d=r(63),h=r(61),p=u.aTypedArray,y=u.exportTypedArrayMethod;y("at",function($){var A=p(this),E=d(A),R=h($),I=R>=0?R:E+R;return I<0||I>=E?void 0:A[I]})},function(x,b,r){var u=r(14),d=r(219),h=r(144),p=u(h),y=d.aTypedArray,T=d.exportTypedArrayMethod;T("copyWithin",function(A,E){return p(y(this),A,E,arguments.length>2?arguments[2]:void 0)})},function(x,b,r){var u=r(219),d=r(83).every,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("every",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(149),h=r(504),p=r(69),y=r(8),T=r(14),$=r(7),A=u.aTypedArray,E=u.exportTypedArrayMethod,R=T("".slice),I=$(function(){var O=0;return new Int8Array(2).fill({valueOf:function(){return O++}}),O!==1});E("fill",function(C){var D=arguments.length;A(this);var M=R(p(this),0,3)==="Big"?h(C):+C;return y(d,this,M,D>1?arguments[1]:void 0,D>2?arguments[2]:void 0)},I)},function(x,b,r){var u=r(219),d=r(83).filter,h=r(518),p=u.aTypedArray,y=u.exportTypedArrayMethod;y("filter",function($){var A=d(p(this),$,arguments.length>1?arguments[1]:void 0);return h(this,A)})},function(x,b,r){var u=r(199),d=r(219).getTypedArrayConstructor;x.exports=function(h,p){return u(d(h),p)}},function(x,b,r){var u=r(219),d=r(83).find,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("find",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(83).findIndex,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("findIndex",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(154).findLast,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("findLast",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(154).findLastIndex,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("findLastIndex",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(83).forEach,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("forEach",function(T){d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(499),d=r(219).exportTypedArrayStaticMethod,h=r(502);d("from",h,u)},function(x,b,r){var u=r(219),d=r(59).includes,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("includes",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(59).indexOf,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("indexOf",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(4),d=r(7),h=r(14),p=r(219),y=r(168),T=r(33),$=T("iterator"),A=u.Uint8Array,E=h(y.values),R=h(y.keys),I=h(y.entries),O=p.aTypedArray,C=p.exportTypedArrayMethod,D=A&&A.prototype,M=!d(function(){D[$].call([1])}),F=!!D&&D.values&&D[$]===D.values&&D.values.name==="values",z=function(){return E(O(this))};C("entries",function(){return I(O(this))},M),C("keys",function(){return R(O(this))},M),C("values",z,M||!F,{name:"values"}),C($,z,M||!F,{name:"values"})},function(x,b,r){var u=r(219),d=r(14),h=u.aTypedArray,p=u.exportTypedArrayMethod,y=d([].join);p("join",function($){return y(h(this),$)})},function(x,b,r){var u=r(219),d=r(94),h=r(175),p=u.aTypedArray,y=u.exportTypedArrayMethod;y("lastIndexOf",function($){var A=arguments.length;return d(h,p(this),A>1?[$,arguments[1]]:[$])})},function(x,b,r){var u=r(219),d=r(83).map,h=u.aTypedArray,p=u.getTypedArrayConstructor,y=u.exportTypedArrayMethod;y("map",function($){return d(h(this),$,arguments.length>1?arguments[1]:void 0,function(A,E){return new(p(A))(E)})})},function(x,b,r){var u=r(219),d=r(499),h=u.aTypedArrayConstructor,p=u.exportTypedArrayStaticMethod;p("of",function(){for(var T=0,$=arguments.length,A=new(h(this))($);$>T;)A[T]=arguments[T++];return A},d)},function(x,b,r){var u=r(219),d=r(181).left,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("reduce",function(T){var $=arguments.length;return d(h(this),T,$,$>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=r(181).right,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("reduceRight",function(T){var $=arguments.length;return d(h(this),T,$,$>1?arguments[1]:void 0)})},function(x,b,r){var u=r(219),d=u.aTypedArray,h=u.exportTypedArrayMethod,p=Math.floor;h("reverse",function(){for(var T=this,$=d(T).length,A=p($/2),E=0,R;E1?arguments[1]:void 0,1),j=T(z);if(D)return d(I,this,j,U);var G=this.length,B=p(j),V=0;if(B+U>G)throw new A("Wrong length");for(;VC;)M[C]=I[C++];return M},$)},function(x,b,r){var u=r(219),d=r(83).some,h=u.aTypedArray,p=u.exportTypedArrayMethod;p("some",function(T){return d(h(this),T,arguments.length>1?arguments[1]:void 0)})},function(x,b,r){var u=r(4),d=r(85),h=r(7),p=r(30),y=r(189),T=r(219),$=r(190),A=r(191),E=r(27),R=r(192),I=T.aTypedArray,O=T.exportTypedArrayMethod,C=u.Uint16Array,D=C&&d(C.prototype.sort),M=!!D&&!(h(function(){D(new C(2),null)})&&h(function(){D(new C(2),{})})),F=!!D&&!h(function(){if(E)return E<74;if($)return $<67;if(A)return!0;if(R)return R<602;var U=new C(516),j=Array(516),G,B;for(G=0;G<516;G++)B=G%4,U[G]=515-G,j[G]=G-2*B+3;for(D(U,function(V,Y){return(V/4|0)-(Y/4|0)}),G=0;G<516;G++)if(U[G]!==j[G])return!0}),z=function(U){return function(j,G){return U!==void 0?+U(j,G)||0:G!==G?-1:j!==j?1:j===0&&G===0?1/j>0&&1/G<0?1:-1:j>G}};O("sort",function(j){return j!==void 0&&p(j),F?D(this,j):y(I(this),z(j))},!F||M)},function(x,b,r){var u=r(219),d=r(64),h=r(60),p=u.aTypedArray,y=u.getTypedArrayConstructor,T=u.exportTypedArrayMethod;T("subarray",function(A,E){var R=p(this),I=R.length,O=h(A,I),C=y(R);return new C(R.buffer,R.byteOffset+O*R.BYTES_PER_ELEMENT,d((E===void 0?I:h(E,I))-O))})},function(x,b,r){var u=r(4),d=r(94),h=r(219),p=r(7),y=r(76),T=u.Int8Array,$=h.aTypedArray,A=h.exportTypedArrayMethod,E=[].toLocaleString,R=!!T&&p(function(){E.call(new T(1))}),I=p(function(){return[1,2].toLocaleString()!==new T([1,2]).toLocaleString()})||!p(function(){T.prototype.toLocaleString.call([1,2])});A("toLocaleString",function(){return d(E,R?y($(this)):$(this),y(arguments))},I)},function(x,b,r){var u=r(197),d=r(219),h=d.aTypedArray,p=d.exportTypedArrayMethod,y=d.getTypedArrayConstructor;p("toReversed",function(){return u(h(this),y(this))})},function(x,b,r){var u=r(219),d=r(14),h=r(30),p=r(199),y=u.aTypedArray,T=u.getTypedArrayConstructor,$=u.exportTypedArrayMethod,A=d(u.TypedArrayPrototype.sort);$("toSorted",function(R){R!==void 0&&h(R);var I=y(this),O=p(T(I),I);return A(O,R)})},function(x,b,r){var u=r(219).exportTypedArrayMethod,d=r(7),h=r(4),p=r(14),y=h.Uint8Array,T=y&&y.prototype||{},$=[].toString,A=p([].join);d(function(){$.call({})})&&($=function(){return A(this)});var E=T.toString!==$;u("toString",$,E)},function(x,b,r){var u=r(206),d=r(219),h=r(503),p=r(61),y=r(504),T=d.aTypedArray,$=d.getTypedArrayConstructor,A=d.exportTypedArrayMethod,E=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(R){return R===8}}();A("with",function(R,I){var O=T(this),C=p(R),D=h(O)?y(I):+I;return u(O,$(O),C,D)},!E)},function(x,b,r){var u=r(3),d=r(14),h=r(68),p=String.fromCharCode,y=d("".charAt),T=d(/./.exec),$=d("".slice),A=/^[\da-f]{2}$/i,E=/^[\da-f]{4}$/i;u({global:!0},{unescape:function(I){for(var O=h(I),C="",D=O.length,M=0,F,z;M>(-2*_&6)));return nt}})},function(x){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=b+"+/",u=b+"-_",d=function(h){for(var p={},y=0;y<64;y++)p[h.charAt(y)]=y;return p};x.exports={i2c:r,c2i:d(r),i2cUrl:u,c2iUrl:d(u)}},function(x,b,r){var u=r(3),d=r(4),h=r(23),p=r(14),y=r(8),T=r(7),$=r(68),A=r(367),E=r(552).i2c,R=h("btoa"),I=p("".charAt),O=p("".charCodeAt),C=!!R&&!T(function(){return R("hi")!=="aGk="}),D=C&&!T(function(){R()}),M=C&&T(function(){return R(null)!=="bnVsbA=="}),F=C&&R.length!==1;u({global:!0,bind:!0,enumerable:!0,forced:!C||D||M||F},{btoa:function(U){if(A(arguments.length,1),C)return y(R,d,$(U));for(var j=$(U),G="",B=0,V=E,Y,Z;I(j,B)||(V="=",B%1);){if(Z=O(j,B+=.75),Z>255)throw new(h("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");Y=Y<<8|Z,G+=I(V,63&Y>>8-B%1*8)}return G}})},function(x,b,r){var u=r(4),d=r(555),h=r(556),p=r(160),y=r(43),T=function(A){if(A&&A.forEach!==p)try{y(A,"forEach",p)}catch(E){A.forEach=p}};for(var $ in d)d[$]&&T(u[$]&&u[$].prototype);T(h)},function(x){x.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(x,b,r){var u=r(42),d=u("span").classList,h=d&&d.constructor&&d.constructor.prototype;x.exports=h===Object.prototype?void 0:h},function(x,b,r){var u=r(4),d=r(555),h=r(556),p=r(168),y=r(43),T=r(82),$=r(33),A=$("iterator"),E=p.values,R=function(O,C){if(O){if(O[A]!==E)try{y(O,A,E)}catch(M){O[A]=E}if(T(O,C,!0),d[C]){for(var D in p)if(O[D]!==p[D])try{y(O,D,p[D])}catch(M){O[D]=p[D]}}}};for(var I in d)R(u[I]&&u[I].prototype,I);R(h,"DOMTokenList")},function(x,b,r){var u=r(3),d=r(23),h=r(234),p=r(7),y=r(71),T=r(11),$=r(44).f,A=r(47),E=r(77),R=r(38),I=r(211),O=r(46),C=r(125),D=r(119),M=r(559),F=r(122),z=r(51),U=r(6),j=r(36),G="DOMException",B="DATA_CLONE_ERR",V=d("Error"),Y=d(G)||function(){try{var Mt=d("MessageChannel")||h("worker_threads").MessageChannel;new Mt().port1.postMessage(new WeakMap)}catch(Ht){if(Ht.name===B&&Ht.code===25)return Ht.constructor}}(),Z=Y&&Y.prototype,J=V.prototype,q=z.set,nt=z.getterFor(G),rt="stack"in new V(G),_=function(Mt){return R(M,Mt)&&M[Mt].m?M[Mt].c:0},tt=function(){I(this,et);var Ht=arguments.length,re=D(Ht<1?void 0:arguments[0]),se=D(Ht<2?void 0:arguments[1],"Error"),ee=_(se);if(q(this,{type:G,name:se,message:re,code:ee}),U||(this.name=se,this.message=re,this.code=ee),rt){var fe=new V(re);fe.name=G,$(this,"stack",T(1,F(fe.stack,1)))}},et=tt.prototype=y(J),lt=function(Mt){return{enumerable:!0,configurable:!0,get:Mt}},mt=function(Mt){return lt(function(){return nt(this)[Mt]})};U&&(E(et,"code",mt("code")),E(et,"message",mt("message")),E(et,"name",mt("name"))),$(et,"constructor",T(1,tt));var gt=p(function(){return!(new Y instanceof V)}),xt=gt||p(function(){return J.toString!==C||String(new Y(1,2))!=="2: 1"}),yt=gt||p(function(){return new Y(1,"DataCloneError").code!==25}),Ut=gt||Y[B]!==25||Z[B]!==25,Dt=j?xt||yt||Ut:gt;u({global:!0,constructor:!0,forced:Dt},{DOMException:Dt?tt:Y});var Xt=d(G),Qt=Xt.prototype;xt&&(j||Y===Xt)&&A(Qt,"toString",C),yt&&U&&Y===Xt&&E(Qt,"code",lt(function(){return _(O(this).name)}));for(var kt in M)if(R(M,kt)){var me=M[kt],ge=me.s,ae=T(6,me.c);R(Xt,ge)||$(Xt,ge,ae),R(Qt,ge)||$(Qt,ge,ae)}},function(x){x.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(x,b,r){var u=r(3),d=r(4),h=r(23),p=r(11),y=r(44).f,T=r(38),$=r(211),A=r(118),E=r(119),R=r(559),I=r(122),O=r(6),C=r(36),D="DOMException",M=h("Error"),F=h(D),z=function(){$(this,U);var tt=arguments.length,et=E(tt<1?void 0:arguments[0]),lt=E(tt<2?void 0:arguments[1],"Error"),mt=new F(et,lt),gt=new M(et);return gt.name=D,y(mt,"stack",p(1,I(gt.stack,1))),A(mt,this,z),mt},U=z.prototype=F.prototype,j="stack"in new M(D),G="stack"in new F(1,2),B=F&&O&&Object.getOwnPropertyDescriptor(d,D),V=!!B&&!(B.writable&&B.configurable),Y=j&&!V&&!G;u({global:!0,constructor:!0,forced:C||Y},{DOMException:Y?z:F});var Z=h(D),J=Z.prototype;if(J.constructor!==Z){C||y(J,"constructor",p(1,Z));for(var q in R)if(T(R,q)){var nt=R[q],rt=nt.s;T(Z,rt)||y(Z,rt,p(6,nt.c))}}},function(x,b,r){var u=r(23),d=r(82),h="DOMException";d(u(h),h)},function(x,b,r){r(563),r(564)},function(x,b,r){var u=r(3),d=r(4),h=r(366).clear;u({global:!0,bind:!0,enumerable:!0,forced:d.clearImmediate!==h},{clearImmediate:h})},function(x,b,r){var u=r(3),d=r(4),h=r(366).set,p=r(565),y=d.setImmediate?p(h,!1):h;u({global:!0,bind:!0,enumerable:!0,forced:d.setImmediate!==y},{setImmediate:y})},function(x,b,r){var u=r(4),d=r(94),h=r(21),p=r(183),y=r(28),T=r(76),$=r(367),A=u.Function,E=/MSIE .\./.test(y)||p==="BUN"&&function(){var R=u.Bun.version.split(".");return R.length<3||R[0]==="0"&&(R[1]<3||R[1]==="3"&&R[2]==="0")}();x.exports=function(R,I){var O=I?2:1;return E?function(C,D){var M=$(arguments.length,1)>O,F=h(C)?C:A(C),z=M?T(arguments,O):[],U=M?function(){d(F,this,z)}:F;return I?R(U,D):R(U)}:R}},function(x,b,r){var u=r(3),d=r(4),h=r(369),p=r(30),y=r(367),T=r(7),$=r(6),A=T(function(){return $&&Object.getOwnPropertyDescriptor(d,"queueMicrotask").value.length!==1});u({global:!0,enumerable:!0,dontCallGetSet:!0,forced:A},{queueMicrotask:function(R){y(arguments.length,1),h(p(R))}})},function(x,b,r){var u=r(3),d=r(4),h=r(77),p=r(6),y=TypeError,T=Object.defineProperty,$=d.self!==d;try{if(p){var A=Object.getOwnPropertyDescriptor(d,"self");($||!A||!A.get||!A.enumerable)&&h(d,"self",{get:function(){return d},set:function(R){if(this!==d)throw new y("Illegal invocation");T(d,"self",{value:R,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else u({global:!0,simple:!0,forced:$},{self:d})}catch(E){}},function(x,b,r){var u=r(36),d=r(3),h=r(4),p=r(23),y=r(14),T=r(7),$=r(40),A=r(21),E=r(89),R=r(17),I=r(20),O=r(22),C=r(130),D=r(46),M=r(69),F=r(38),z=r(141),U=r(43),j=r(63),G=r(367),B=r(408),V=r(284),Y=r(427),Z=r(429),J=r(233),q=r(123),nt=r(235),rt=h.Object,_=h.Array,tt=h.Date,et=h.Error,lt=h.TypeError,mt=h.PerformanceMark,gt=p("DOMException"),xt=V.Map,yt=V.has,Ut=V.get,Dt=V.set,Xt=Y.Set,Qt=Y.add,kt=Y.has,me=p("Object","keys"),ge=y([].push),ae=y((!0).valueOf),Mt=y(1 .valueOf),Ht=y("".valueOf),re=y(tt.prototype.getTime),se=$("structuredClone"),ee="DataCloneError",fe="Transferring",Pe=function(ut){return!T(function(){var It=new h.Set([7]),Pt=ut(It),Ct=ut(rt(7));return Pt===It||!Pt.has(7)||!I(Ct)||+Ct!=7})&&ut},Me=function(ut,It){return!T(function(){var Pt=new It,Ct=ut({a:Pt,b:Pt});return!(Ct&&Ct.a===Ct.b&&Ct.a instanceof It&&Ct.a.stack===Pt.stack)})},$e=function(ut){return!T(function(){var It=ut(new h.AggregateError([1],se,{cause:3}));return It.name!=="AggregateError"||It.errors[0]!==1||It.message!==se||It.cause!==3})},ce=h.structuredClone,Ae=u||!Me(ce,et)||!Me(ce,gt)||!$e(ce),Te=!ce&&Pe(function(ut){return new mt(se,{detail:ut}).detail}),de=Pe(ce)||Te,bt=function(ut){throw new gt("Uncloneable type: "+ut,ee)},Ft=function(ut,It){throw new gt((It||"Cloning")+" of "+ut+" cannot be properly polyfilled in this engine",ee)},Tt=function(ut,It){return de||Ft(It),de(ut)},qt=function(){var ut;try{ut=new h.DataTransfer}catch(It){try{ut=new h.ClipboardEvent("").clipboardData}catch(Pt){}}return ut&&ut.items&&ut.files?ut:null},te=function(ut,It,Pt){if(yt(It,ut))return Ut(It,ut);var Ct=Pt||M(ut),Nt,Et,ie,we,Rt,zt;if(Ct==="SharedArrayBuffer")de?Nt=de(ut):Nt=ut;else{var jt=h.DataView;!jt&&!A(ut.slice)&&Ft("ArrayBuffer");try{if(A(ut.slice)&&!ut.resizable)Nt=ut.slice(0);else for(Et=ut.byteLength,ie=("maxByteLength"in ut)?{maxByteLength:ut.maxByteLength}:void 0,Nt=new ArrayBuffer(Et,ie),we=new jt(ut),Rt=new jt(Nt),zt=0;zt1&&!R(arguments[1])?D(arguments[1]):void 0,Ct=Pt?Pt.transfer:void 0,Nt,Et;Ct!==void 0&&(Nt=new xt,Et=Ye(Ct,Nt));var ie=Yt(It,Nt);return Et&&Ze(Et),ie}})},function(x,b,r){r(570),r(571)},function(x,b,r){var u=r(3),d=r(4),h=r(565),p=h(d.setInterval,!0);u({global:!0,bind:!0,forced:d.setInterval!==p},{setInterval:p})},function(x,b,r){var u=r(3),d=r(4),h=r(565),p=h(d.setTimeout,!0);u({global:!0,bind:!0,forced:d.setTimeout!==p},{setTimeout:p})},function(x,b,r){r(573)},function(x,b,r){r(455);var u=r(3),d=r(6),h=r(574),p=r(4),y=r(84),T=r(14),$=r(47),A=r(77),E=r(211),R=r(38),I=r(328),O=r(162),C=r(76),D=r(448).codeAt,M=r(575),F=r(68),z=r(82),U=r(367),j=r(576),G=r(51),B=G.set,V=G.getterFor("URL"),Y=j.URLSearchParams,Z=j.getState,J=p.URL,q=p.TypeError,nt=p.parseInt,rt=Math.floor,_=Math.pow,tt=T("".charAt),et=T(/./.exec),lt=T([].join),mt=T(1 .toString),gt=T([].pop),xt=T([].push),yt=T("".replace),Ut=T([].shift),Dt=T("".split),Xt=T("".slice),Qt=T("".toLowerCase),kt=T([].unshift),me="Invalid authority",ge="Invalid scheme",ae="Invalid host",Mt="Invalid port",Ht=/[a-z]/i,re=/[\d+-.a-z]/i,se=/\d/,ee=/^0x/i,fe=/^[0-7]+$/,Pe=/^\d+$/,Me=/^[\da-f]+$/i,$e=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ce=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ae=/^[\u0000-\u0020]+/,Te=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,de=/[\t\n\r]/g,bt,Ft=function(ft){var wt=Dt(ft,"."),pt,it,Ot,ye,_t,Ie,rn;if(wt.length&&wt[wt.length-1]===""&&wt.length--,pt=wt.length,pt>4)return ft;for(it=[],Ot=0;Ot1&&tt(ye,0)==="0"&&(_t=et(ee,ye)?16:8,ye=Xt(ye,_t===8?1:2)),ye==="")Ie=0;else{if(!et(_t===10?Pe:_t===8?fe:Me,ye))return ft;Ie=nt(ye,_t)}xt(it,Ie)}for(Ot=0;Ot=_(256,5-pt))return null}else if(Ie>255)return null;for(rn=gt(it),Ot=0;Ot6))return;for(Ie=0;an();){if(rn=null,Ie>0)if(an()==="."&&Ie<4)Ot++;else return;if(!et(se,an()))return;for(;et(se,an());){if(hn=nt(an(),10),rn===null)rn=hn;else{if(rn===0)return;rn=rn*10+hn}if(rn>255)return;Ot++}wt[pt]=wt[pt]*256+rn,Ie++,(Ie===2||Ie===4)&&pt++}if(Ie!==4)return;break}else if(an()===":"){if(Ot++,!an())return}else if(an())return;wt[pt++]=ye}if(it!==null)for(pn=pt-it,pt=7;pt!==0&&pn>0;)ot=wt[pt],wt[pt--]=wt[it+pn-1],wt[it+--pn]=ot;else if(pt!==8)return;return wt},qt=function(ft){for(var wt=null,pt=1,it=null,Ot=0,ye=0;ye<8;ye++)ft[ye]!==0?(Ot>pt&&(wt=it,pt=Ot),it=null,Ot=0):(it===null&&(it=ye),++Ot);return Ot>pt?it:wt},te=function(ft){var wt,pt,it,Ot;if(typeof ft=="number"){for(wt=[],pt=0;pt<4;pt++)kt(wt,ft%256),ft=rt(ft/256);return lt(wt,".")}if(typeof ft=="object"){for(wt="",it=qt(ft),pt=0;pt<8;pt++)Ot&&ft[pt]===0||(Ot&&(Ot=!1),it===pt?(wt+=pt?":":"::",Ot=!0):(wt+=mt(ft[pt],16),pt<7&&(wt+=":")));return"["+wt+"]"}return ft},Zt={},Yt=I({},Zt,{" ":1,'"':1,"<":1,">":1,"`":1}),Ye=I({},Yt,{"#":1,"?":1,"{":1,"}":1}),Ze=I({},Ye,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(ft,wt){var pt=D(ft,0);return pt>32&&pt<127&&!R(wt,ft)?ft:encodeURIComponent(ft)},It={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Pt=function(ft,wt){var pt;return ft.length===2&&et(Ht,tt(ft,0))&&((pt=tt(ft,1))===":"||!wt&&pt==="|")},Ct=function(ft){var wt;return ft.length>1&&Pt(Xt(ft,0,2))&&(ft.length===2||(wt=tt(ft,2))==="/"||wt==="\\"||wt==="?"||wt==="#")},Nt=function(ft){return ft==="."||Qt(ft)==="%2e"},Et=function(ft){return ft=Qt(ft),ft===".."||ft==="%2e."||ft===".%2e"||ft==="%2e%2e"},ie={},we={},Rt={},zt={},jt={},Wt={},ue={},Ee={},Xe={},Je={},nn={},vn={},jn={},Hr={},Ya={},ga={},yr={},Vn={},Wa={},ir={},Wn={},va=function(ft,wt,pt){var it=F(ft),Ot,ye,_t;if(wt){if(ye=this.parse(it),ye)throw new q(ye);this.searchParams=null}else{if(pt!==void 0&&(Ot=new va(pt,!0)),ye=this.parse(it,null,Ot),ye)throw new q(ye);_t=Z(new Y),_t.bindURL(this),this.searchParams=_t}};va.prototype={type:"URL",parse:function(ft,wt,pt){var it=this,Ot=wt||ie,ye=0,_t="",Ie=!1,rn=!1,hn=!1,pn,ot,an,Fn;for(ft=F(ft),wt||(it.scheme="",it.username="",it.password="",it.host=null,it.port=null,it.path=[],it.query=null,it.fragment=null,it.cannotBeABaseURL=!1,ft=yt(ft,Ae,""),ft=yt(ft,Te,"$1")),ft=yt(ft,de,""),pn=O(ft);ye<=pn.length;){switch(ot=pn[ye],Ot){case ie:if(ot&&et(Ht,ot))_t+=Qt(ot),Ot=we;else{if(wt)return ge;Ot=Rt;continue}break;case we:if(ot&&(et(re,ot)||ot==="+"||ot==="-"||ot==="."))_t+=Qt(ot);else if(ot===":"){if(wt&&(it.isSpecial()!==R(It,_t)||_t==="file"&&(it.includesCredentials()||it.port!==null)||it.scheme==="file"&&!it.host))return;if(it.scheme=_t,wt){it.isSpecial()&&It[it.scheme]===it.port&&(it.port=null);return}_t="",it.scheme==="file"?Ot=Hr:it.isSpecial()&&pt&&pt.scheme===it.scheme?Ot=zt:it.isSpecial()?Ot=Ee:pn[ye+1]==="/"?(Ot=jt,ye++):(it.cannotBeABaseURL=!0,xt(it.path,""),Ot=Wa)}else{if(wt)return ge;_t="",Ot=Rt,ye=0;continue}break;case Rt:if(!pt||pt.cannotBeABaseURL&&ot!=="#")return ge;if(pt.cannotBeABaseURL&&ot==="#"){it.scheme=pt.scheme,it.path=C(pt.path),it.query=pt.query,it.fragment="",it.cannotBeABaseURL=!0,Ot=Wn;break}Ot=pt.scheme==="file"?Hr:Wt;continue;case zt:if(ot==="/"&&pn[ye+1]==="/")Ot=Xe,ye++;else{Ot=Wt;continue}break;case jt:if(ot==="/"){Ot=Je;break}else{Ot=Vn;continue}case Wt:if(it.scheme=pt.scheme,ot===bt)it.username=pt.username,it.password=pt.password,it.host=pt.host,it.port=pt.port,it.path=C(pt.path),it.query=pt.query;else if(ot==="/"||ot==="\\"&&it.isSpecial())Ot=ue;else if(ot==="?")it.username=pt.username,it.password=pt.password,it.host=pt.host,it.port=pt.port,it.path=C(pt.path),it.query="",Ot=ir;else if(ot==="#")it.username=pt.username,it.password=pt.password,it.host=pt.host,it.port=pt.port,it.path=C(pt.path),it.query=pt.query,it.fragment="",Ot=Wn;else{it.username=pt.username,it.password=pt.password,it.host=pt.host,it.port=pt.port,it.path=C(pt.path),it.path.length--,Ot=Vn;continue}break;case ue:if(it.isSpecial()&&(ot==="/"||ot==="\\"))Ot=Xe;else if(ot==="/")Ot=Je;else{it.username=pt.username,it.password=pt.password,it.host=pt.host,it.port=pt.port,Ot=Vn;continue}break;case Ee:if(Ot=Xe,ot!=="/"||tt(_t,ye+1)!=="/")continue;ye++;break;case Xe:if(ot!=="/"&&ot!=="\\"){Ot=Je;continue}break;case Je:if(ot==="@"){Ie&&(_t="%40"+_t),Ie=!0,an=O(_t);for(var en=0;en65535)return Mt;it.port=it.isSpecial()&&Bn===It[it.scheme]?null:Bn,_t=""}if(wt)return;Ot=yr;continue}else return Mt;break;case Hr:if(it.scheme="file",ot==="/"||ot==="\\")Ot=Ya;else if(pt&&pt.scheme==="file")switch(ot){case bt:it.host=pt.host,it.path=C(pt.path),it.query=pt.query;break;case"?":it.host=pt.host,it.path=C(pt.path),it.query="",Ot=ir;break;case"#":it.host=pt.host,it.path=C(pt.path),it.query=pt.query,it.fragment="",Ot=Wn;break;default:Ct(lt(C(pn,ye),""))||(it.host=pt.host,it.path=C(pt.path),it.shortenPath()),Ot=Vn;continue}else{Ot=Vn;continue}break;case Ya:if(ot==="/"||ot==="\\"){Ot=ga;break}pt&&pt.scheme==="file"&&!Ct(lt(C(pn,ye),""))&&(Pt(pt.path[0],!0)?xt(it.path,pt.path[0]):it.host=pt.host),Ot=Vn;continue;case ga:if(ot===bt||ot==="/"||ot==="\\"||ot==="?"||ot==="#"){if(!wt&&Pt(_t))Ot=Vn;else if(_t===""){if(it.host="",wt)return;Ot=yr}else{if(Fn=it.parseHost(_t),Fn)return Fn;if(it.host==="localhost"&&(it.host=""),wt)return;_t="",Ot=yr}continue}else _t+=ot;break;case yr:if(it.isSpecial()){if(Ot=Vn,ot!=="/"&&ot!=="\\")continue}else if(!wt&&ot==="?")it.query="",Ot=ir;else if(!wt&&ot==="#")it.fragment="",Ot=Wn;else if(ot!==bt&&(Ot=Vn,ot!=="/"))continue;break;case Vn:if(ot===bt||ot==="/"||ot==="\\"&&it.isSpecial()||!wt&&(ot==="?"||ot==="#")){if(Et(_t)?(it.shortenPath(),ot!=="/"&&!(ot==="\\"&&it.isSpecial())&&xt(it.path,"")):Nt(_t)?ot!=="/"&&!(ot==="\\"&&it.isSpecial())&&xt(it.path,""):(it.scheme==="file"&&!it.path.length&&Pt(_t)&&(it.host&&(it.host=""),_t=tt(_t,0)+":"),xt(it.path,_t)),_t="",it.scheme==="file"&&(ot===bt||ot==="?"||ot==="#"))for(;it.path.length>1&&it.path[0]==="";)Ut(it.path);ot==="?"?(it.query="",Ot=ir):ot==="#"&&(it.fragment="",Ot=Wn)}else _t+=ut(ot,Ye);break;case Wa:ot==="?"?(it.query="",Ot=ir):ot==="#"?(it.fragment="",Ot=Wn):ot!==bt&&(it.path[0]+=ut(ot,Zt));break;case ir:!wt&&ot==="#"?(it.fragment="",Ot=Wn):ot!==bt&&(ot==="'"&&it.isSpecial()?it.query+="%27":ot==="#"?it.query+="%23":it.query+=ut(ot,Zt));break;case Wn:ot!==bt&&(it.fragment+=ut(ot,Yt));break}ye++}},parseHost:function(ft){var wt,pt,it;if(tt(ft,0)==="["){if(tt(ft,ft.length-1)!=="]"||(wt=Tt(Xt(ft,1,-1)),!wt))return ae;this.host=wt}else if(this.isSpecial()){if(ft=M(ft),et($e,ft)||(wt=Ft(ft),wt===null))return ae;this.host=wt}else{if(et(ce,ft))return ae;for(wt="",pt=O(ft),it=0;it1?arguments[1]:void 0,Ot=B(pt,new va(wt,!1,it));d||(pt.href=Ot.serialize(),pt.origin=Ot.getOrigin(),pt.protocol=Ot.getProtocol(),pt.username=Ot.getUsername(),pt.password=Ot.getPassword(),pt.host=Ot.getHost(),pt.hostname=Ot.getHostname(),pt.port=Ot.getPort(),pt.pathname=Ot.getPathname(),pt.search=Ot.getSearch(),pt.searchParams=Ot.getSearchParams(),pt.hash=Ot.getHash())},xn=xr.prototype,Mn=function(ft,wt){return{get:function(){return V(this)[ft]()},set:wt&&function(pt){return V(this)[wt](pt)},configurable:!0,enumerable:!0}};if(d&&(A(xn,"href",Mn("serialize","setHref")),A(xn,"origin",Mn("getOrigin")),A(xn,"protocol",Mn("getProtocol","setProtocol")),A(xn,"username",Mn("getUsername","setUsername")),A(xn,"password",Mn("getPassword","setPassword")),A(xn,"host",Mn("getHost","setHost")),A(xn,"hostname",Mn("getHostname","setHostname")),A(xn,"port",Mn("getPort","setPort")),A(xn,"pathname",Mn("getPathname","setPathname")),A(xn,"search",Mn("getSearch","setSearch")),A(xn,"searchParams",Mn("getSearchParams")),A(xn,"hash",Mn("getHash","setHash"))),$(xn,"toJSON",function(){return V(this).serialize()},{enumerable:!0}),$(xn,"toString",function(){return V(this).serialize()},{enumerable:!0}),J){var Ka=J.createObjectURL,Za=J.revokeObjectURL;Ka&&$(xr,"createObjectURL",y(Ka,J)),Za&&$(xr,"revokeObjectURL",y(Za,J))}z(xr,"URL"),u({global:!0,constructor:!0,forced:!h,sham:!d},{URL:xr})},function(x,b,r){var u=r(7),d=r(33),h=r(6),p=r(36),y=d("iterator");x.exports=!u(function(){var T=new URL("b?a=1&b=2&c=3","https://a"),$=T.searchParams,A=new URLSearchParams("a=1&a=2&b=3"),E="";return T.pathname="c%20d",$.forEach(function(R,I){$.delete("b"),E+=I+R}),A.delete("a",2),A.delete("b",void 0),p&&(!T.toJSON||!A.has("a",1)||A.has("a",2)||!A.has("a",void 0)||A.has("b"))||!$.size&&(p||!h)||!$.sort||T.href!=="https://a/c%20d?a=1&c=3"||$.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!$[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||E!=="a1c3"||new URL("https://x",void 0).host!=="x"})},function(x,b,r){var u=r(14),d=2147483647,h=36,p=1,y=26,T=38,$=700,A=72,E=128,R="-",I=/[^\0-\u007E]/,O=/[.\u3002\uFF0E\uFF61]/g,C="Overflow: input needs wider integers to process",D=h-p,M=RangeError,F=u(O.exec),z=Math.floor,U=String.fromCharCode,j=u("".charCodeAt),G=u([].join),B=u([].push),V=u("".replace),Y=u("".split),Z=u("".toLowerCase),J=function(_){for(var tt=[],et=0,lt=_.length;et=55296&&mt<=56319&&et>1,_+=z(_/tt);_>D*y>>1;)_=z(_/D),lt+=h;return z(lt+(D+1)*_/(_+T))},rt=function(_){var tt=[];_=J(_);var et=_.length,lt=E,mt=0,gt=A,xt,yt;for(xt=0;xt<_.length;xt++)yt=_[xt],yt<128&&B(tt,U(yt));var Ut=tt.length,Dt=Ut;for(Ut&&B(tt,R);Dt=lt&&ytz((d-mt)/Qt))throw new M(C);for(mt+=(Xt-lt)*Qt,lt=Xt,xt=0;xt<_.length;xt++){if(yt=_[xt],ytd)throw new M(C);if(yt===lt){for(var kt=mt,me=h;;){var ge=me<=gt?p:me>=gt+y?y:me-gt;if(kt0&&(Rt&jt)!==0;jt>>=1)zt++;return zt},qt=function(Rt){var zt=null;switch(Rt.length){case 1:zt=Rt[0];break;case 2:zt=(Rt[0]&31)<<6|Rt[1]&63;break;case 3:zt=(Rt[0]&15)<<12|(Rt[1]&63)<<6|Rt[2]&63;break;case 4:zt=(Rt[0]&7)<<18|(Rt[1]&63)<<12|(Rt[2]&63)<<6|Rt[3]&63;break}return zt>1114111?null:zt},te=function(Rt){Rt=fe(Rt,Te," ");for(var zt=Rt.length,jt="",Wt=0;Wtzt){jt+="%",Wt++;continue}var Ee=Ft(Rt,Wt+1);if(Ee!==Ee){jt+=ue,Wt++;continue}Wt+=2;var Xe=Tt(Ee);if(Xe===0)ue=ae(Ee);else{if(Xe===1||Xe>4){jt+=de,Wt++;continue}for(var Je=[Ee],nn=1;nnzt||re(Rt,Wt)!=="%"));){var vn=Ft(Rt,Wt+1);if(vn!==vn){Wt+=3;break}if(vn>191||vn<128)break;ee(Je,vn),Wt+=2,nn++}if(Je.length!==Xe){jt+=de;continue}var jn=qt(Je);jn===null?jt+=de:ue=Mt(jn)}}jt+=ue,Wt++}return jt},Zt=/[!'()~]|%20/g,Yt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ye=function(Rt){return Yt[Rt]},Ze=function(Rt){return fe(ge(Rt),Zt,Ye)},ut=C(function(zt,jt){gt(this,{type:mt,target:xt(zt).entries,index:0,kind:jt})},lt,function(){var zt=yt(this),jt=zt.target,Wt=zt.index++;if(!jt||Wt>=jt.length)return zt.target=null,nt(void 0,!0);var ue=jt[Wt];switch(zt.kind){case"keys":return nt(ue.key,!1);case"values":return nt(ue.value,!1)}return nt([ue.key,ue.value],!1)},!0),It=function(Rt){this.entries=[],this.url=null,Rt!==void 0&&(B(Rt)?this.parseObject(Rt):this.parseQuery(typeof Rt=="string"?re(Rt,0)==="?"?ce(Rt,1):Rt:V(Rt)))};It.prototype={type:lt,bindURL:function(Rt){this.url=Rt,this.update()},parseObject:function(Rt){var zt=this.entries,jt=q(Rt),Wt,ue,Ee,Xe,Je,nn,vn;if(jt)for(Wt=J(Rt,jt),ue=Wt.next;!(Ee=y(ue,Wt)).done;){if(Xe=J(G(Ee.value)),Je=Xe.next,(nn=y(Je,Xe)).done||(vn=y(Je,Xe)).done||!y(Je,Xe).done)throw new me("Expected sequence with length 2");ee(zt,{key:V(nn.value),value:V(vn.value)})}else for(var jn in Rt)z(Rt,jn)&&ee(zt,{key:jn,value:V(Rt[jn])})},parseQuery:function(Rt){if(Rt)for(var zt=this.entries,jt=$e(Rt,"&"),Wt=0,ue,Ee;Wt0?arguments[0]:void 0,jt=gt(this,new It(zt));$||(this.size=jt.entries.length)},Ct=Pt.prototype;if(I(Ct,{append:function(zt,jt){var Wt=xt(this);rt(arguments.length,2),ee(Wt.entries,{key:V(zt),value:V(jt)}),$||this.length++,Wt.updateURL()},delete:function(Rt){for(var zt=xt(this),jt=rt(arguments.length,1),Wt=zt.entries,ue=V(Rt),Ee=jt<2?void 0:arguments[1],Xe=Ee===void 0?Ee:V(Ee),Je=0;JeWt.key?1:-1}),zt.updateURL()},forEach:function(zt){for(var jt=xt(this).entries,Wt=U(zt,arguments.length>1?arguments[1]:void 0),ue=0,Ee;ue1?ie(arguments[1]):{})}}),F(Dt)){var we=function(zt){return M(this,Qt),new Dt(zt,arguments.length>1?ie(arguments[1]):{})};Qt.constructor=we,we.prototype=Qt,u({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:we})}}x.exports={URLSearchParams:Pt,getState:xt}},function(x,b,r){var u=r(3),d=r(23),h=r(7),p=r(367),y=r(68),T=r(574),$=d("URL"),A=T&&h(function(){$.canParse()}),E=h(function(){return $.canParse.length!==1});u({target:"URL",stat:!0,forced:!A||E},{canParse:function(I){var O=p(arguments.length,1),C=y(I),D=O<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new $(C,D)}catch(M){return!1}}})},function(x,b,r){var u=r(3),d=r(23),h=r(367),p=r(68),y=r(574),T=d("URL");u({target:"URL",stat:!0,forced:!y},{parse:function(A){var E=h(arguments.length,1),R=p(A),I=E<2||arguments[1]===void 0?void 0:p(arguments[1]);try{return new T(R,I)}catch(O){return null}}})},function(x,b,r){var u=r(3),d=r(8);u({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return d(URL.prototype.toString,this)}})},function(x,b,r){r(576)},function(x,b,r){var u=r(47),d=r(14),h=r(68),p=r(367),y=URLSearchParams,T=y.prototype,$=d(T.append),A=d(T.delete),E=d(T.forEach),R=d([].push),I=new y("a=1&a=2&b=3");I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&u(T,"delete",function(O){var C=arguments.length,D=C<2?void 0:arguments[1];if(C&&D===void 0)return A(this,O);var M=[];E(this,function(Y,Z){R(M,{key:Z,value:Y})}),p(C,1);for(var F=h(O),z=h(D),U=0,j=0,G=!1,B=M.length,V;U=W&&(W=X+1);!(k=L[W])&&++W=0;)(s=a[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function xt(t){t||(t=yt);function e(v,m){return v&&m?t(v.__data__,m.__data__):!v-!m}for(var n=this._groups,a=n.length,i=new Array(a),o=0;oe?1:t>=e?0:NaN}function Ut(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Dt(){return Array.from(this)}function Xt(){for(var t=this._groups,e=0,n=t.length;e=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),ae.hasOwnProperty(e)?{space:ae[e],local:t}:t}function Ht(t){return function(){this.removeAttribute(t)}}function re(t){return function(){this.removeAttributeNS(t.space,t.local)}}function se(t,e){return function(){this.setAttribute(t,e)}}function ee(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Pe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Me(t,e){var n=Mt(t);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((e==null?n.local?re:Ht:typeof e=="function"?n.local?Pe:fe:n.local?ee:se)(n,e))}function $e(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ce(t){return function(){this.style.removeProperty(t)}}function Ae(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Te(t,e,n){return function(){var a=e.apply(this,arguments);a==null?this.style.removeProperty(t):this.style.setProperty(t,a,n)}}function de(t,e,n){return arguments.length>1?this.each((e==null?ce:typeof e=="function"?Te:Ae)(t,e,n==null?"":n)):bt(this.node(),t)}function bt(t,e){return t.style.getPropertyValue(e)||$e(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Tt(t,e){return function(){this[t]=e}}function qt(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function te(t,e){return arguments.length>1?this.each((e==null?Ft:typeof e=="function"?qt:Tt)(t,e)):this.node()[t]}function Zt(t){return t.trim().split(/^|\s+/)}function Yt(t){return t.classList||new Ye(t)}function Ye(t){this._node=t,this._names=Zt(t.getAttribute("class")||"")}Ye.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ze(t,e){for(var n=Yt(t),a=-1,i=e.length;++a=0&&(n=e.slice(a+1),e=e.slice(0,a)),{type:e,name:n}})}function Ka(t){return function(){var e=this.__on;if(e){for(var n=0,a=-1,i=e.length,o;n(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),l=i.ceil(o);return o-s(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,l)=>{const c=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o0))return c;let f;do c.push(f=new Date(+o)),e(o,l),t(o);while(fen(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!o(s););else for(;--l>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(an.setTime(+o),Fn.setTime(+s),t(an),t(Fn),Math.floor(n(an,Fn))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(a?s=>a(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Gn=1e3,In=Gn*60,Bn=In*60,or=Bn*24,to=or*7,Ps=or*30,eo=or*365;function Rr(t){return en(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*In)/to)}const Ja=Rr(0),Qa=Rr(1),Rf=Rr(2),If=Rr(3),Yr=Rr(4),Of=Rr(5),Cf=Rr(6),I0=Ja.range,O0=Qa.range,C0=Rf.range,P0=If.range,w0=Yr.range,M0=Of.range,D0=Cf.range;function Ir(t){return en(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/to)}const ka=Ir(0),qa=Ir(1),Pf=Ir(2),wf=Ir(3),Wr=Ir(4),Mf=Ir(5),Df=Ir(6),L0=ka.range,N0=qa.range,F0=Pf.range,B0=wf.range,U0=Wr.range,z0=Mf.range,j0=Df.range,pa=en(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*In)/or,t=>t.getDate()-1),V0=pa.range,_a=en(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/or,t=>t.getUTCDate()-1),G0=_a.range,ws=en(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/or,t=>Math.floor(t/or)),X0=ws.range,sr=en(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());sr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:en(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const H0=sr.range,lr=en(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());lr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:en(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const Y0=lr.range;function no(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ro(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ma(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Lf(t){var e=t.dateTime,n=t.date,a=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,f=ya(i),g=xa(i),v=ya(o),m=xa(o),S=ya(s),P=xa(s),N=ya(l),L=xa(l),w=ya(c),X=xa(c),W={a:At,A:Gt,b:Bt,B:Kt,c:null,d:Bs,e:Bs,f:rd,g:hd,G:vd,H:td,I:ed,j:nd,L:Us,m:ad,M:id,p:ne,q:le,Q:Hs,s:Ys,S:od,u:sd,U:ld,V:cd,w:ud,W:fd,x:null,X:null,y:dd,Y:gd,Z:pd,"%":Xs},H={a:be,A:Oe,b:Ce,B:He,c:null,d:js,e:js,f:Td,g:Pd,G:Md,H:md,I:yd,j:xd,L:Vs,m:$d,M:Sd,p:Fe,q:dn,Q:Hs,s:Ys,S:Ad,u:Ed,U:bd,V:Rd,w:Id,W:Od,x:null,X:null,y:Cd,Y:wd,Z:Dd,"%":Xs},k={a:dt,A:st,b:Vt,B:vt,c:Q,d:Ns,e:Ns,f:Qf,g:Ls,G:Ds,H:Fs,I:Fs,j:Wf,L:Jf,m:Yf,M:Kf,p:$t,q:Hf,Q:qf,s:_f,S:Zf,u:zf,U:jf,V:Vf,w:Uf,W:Gf,x:St,X:ct,y:Ls,Y:Ds,Z:Xf,"%":kf};W.x=K(n,W),W.X=K(a,W),W.c=K(e,W),H.x=K(n,H),H.X=K(a,H),H.c=K(e,H);function K(Jt,xe){return function(Re){var Lt=[],un=-1,Ge=0,Pn=Jt.length,wn,pe,fn;for(Re instanceof Date||(Re=new Date(+Re));++un53)return null;"w"in Lt||(Lt.w=1),"Z"in Lt?(Ge=ro(ma(Lt.y,0,1)),Pn=Ge.getUTCDay(),Ge=Pn>4||Pn===0?qa.ceil(Ge):qa(Ge),Ge=_a.offset(Ge,(Lt.V-1)*7),Lt.y=Ge.getUTCFullYear(),Lt.m=Ge.getUTCMonth(),Lt.d=Ge.getUTCDate()+(Lt.w+6)%7):(Ge=no(ma(Lt.y,0,1)),Pn=Ge.getDay(),Ge=Pn>4||Pn===0?Qa.ceil(Ge):Qa(Ge),Ge=pa.offset(Ge,(Lt.V-1)*7),Lt.y=Ge.getFullYear(),Lt.m=Ge.getMonth(),Lt.d=Ge.getDate()+(Lt.w+6)%7)}else("W"in Lt||"U"in Lt)&&("w"in Lt||(Lt.w="u"in Lt?Lt.u%7:"W"in Lt?1:0),Pn="Z"in Lt?ro(ma(Lt.y,0,1)).getUTCDay():no(ma(Lt.y,0,1)).getDay(),Lt.m=0,Lt.d="W"in Lt?(Lt.w+6)%7+Lt.W*7-(Pn+5)%7:Lt.w+Lt.U*7-(Pn+6)%7);return"Z"in Lt?(Lt.H+=Lt.Z/100|0,Lt.M+=Lt.Z%100,ro(Lt)):no(Lt)}}function ht(Jt,xe,Re,Lt){for(var un=0,Ge=xe.length,Pn=Re.length,wn,pe;un=Pn)return-1;if(wn=xe.charCodeAt(un++),wn===37){if(wn=xe.charAt(un++),pe=k[wn in Ms?xe.charAt(un++):wn],!pe||(Lt=pe(Jt,Re,Lt))<0)return-1}else if(wn!=Re.charCodeAt(Lt++))return-1}return Lt}function $t(Jt,xe,Re){var Lt=f.exec(xe.slice(Re));return Lt?(Jt.p=g.get(Lt[0].toLowerCase()),Re+Lt[0].length):-1}function dt(Jt,xe,Re){var Lt=S.exec(xe.slice(Re));return Lt?(Jt.w=P.get(Lt[0].toLowerCase()),Re+Lt[0].length):-1}function st(Jt,xe,Re){var Lt=v.exec(xe.slice(Re));return Lt?(Jt.w=m.get(Lt[0].toLowerCase()),Re+Lt[0].length):-1}function Vt(Jt,xe,Re){var Lt=w.exec(xe.slice(Re));return Lt?(Jt.m=X.get(Lt[0].toLowerCase()),Re+Lt[0].length):-1}function vt(Jt,xe,Re){var Lt=N.exec(xe.slice(Re));return Lt?(Jt.m=L.get(Lt[0].toLowerCase()),Re+Lt[0].length):-1}function Q(Jt,xe,Re){return ht(Jt,e,xe,Re)}function St(Jt,xe,Re){return ht(Jt,n,xe,Re)}function ct(Jt,xe,Re){return ht(Jt,a,xe,Re)}function At(Jt){return s[Jt.getDay()]}function Gt(Jt){return o[Jt.getDay()]}function Bt(Jt){return c[Jt.getMonth()]}function Kt(Jt){return l[Jt.getMonth()]}function ne(Jt){return i[+(Jt.getHours()>=12)]}function le(Jt){return 1+~~(Jt.getMonth()/3)}function be(Jt){return s[Jt.getUTCDay()]}function Oe(Jt){return o[Jt.getUTCDay()]}function Ce(Jt){return c[Jt.getUTCMonth()]}function He(Jt){return l[Jt.getUTCMonth()]}function Fe(Jt){return i[+(Jt.getUTCHours()>=12)]}function dn(Jt){return 1+~~(Jt.getUTCMonth()/3)}return{format:function(Jt){var xe=K(Jt+="",W);return xe.toString=function(){return Jt},xe},parse:function(Jt){var xe=at(Jt+="",!1);return xe.toString=function(){return Jt},xe},utcFormat:function(Jt){var xe=K(Jt+="",H);return xe.toString=function(){return Jt},xe},utcParse:function(Jt){var xe=at(Jt+="",!0);return xe.toString=function(){return Jt},xe}}}var Ms={"-":"",_:" ",0:"0"},mn=/^\s*\d+/,Nf=/^%/,Ff=/[\\^$*+?|[\]().{}]/g;function Ne(t,e,n){var a=t<0?"-":"",i=(a?-t:t)+"",o=i.length;return a+(o[e.toLowerCase(),n]))}function Uf(t,e,n){var a=mn.exec(e.slice(n,n+1));return a?(t.w=+a[0],n+a[0].length):-1}function zf(t,e,n){var a=mn.exec(e.slice(n,n+1));return a?(t.u=+a[0],n+a[0].length):-1}function jf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.U=+a[0],n+a[0].length):-1}function Vf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.V=+a[0],n+a[0].length):-1}function Gf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.W=+a[0],n+a[0].length):-1}function Ds(t,e,n){var a=mn.exec(e.slice(n,n+4));return a?(t.y=+a[0],n+a[0].length):-1}function Ls(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function Xf(t,e,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return a?(t.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function Hf(t,e,n){var a=mn.exec(e.slice(n,n+1));return a?(t.q=a[0]*3-3,n+a[0].length):-1}function Yf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.m=a[0]-1,n+a[0].length):-1}function Ns(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.d=+a[0],n+a[0].length):-1}function Wf(t,e,n){var a=mn.exec(e.slice(n,n+3));return a?(t.m=0,t.d=+a[0],n+a[0].length):-1}function Fs(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.H=+a[0],n+a[0].length):-1}function Kf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.M=+a[0],n+a[0].length):-1}function Zf(t,e,n){var a=mn.exec(e.slice(n,n+2));return a?(t.S=+a[0],n+a[0].length):-1}function Jf(t,e,n){var a=mn.exec(e.slice(n,n+3));return a?(t.L=+a[0],n+a[0].length):-1}function Qf(t,e,n){var a=mn.exec(e.slice(n,n+6));return a?(t.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function kf(t,e,n){var a=Nf.exec(e.slice(n,n+1));return a?n+a[0].length:-1}function qf(t,e,n){var a=mn.exec(e.slice(n));return a?(t.Q=+a[0],n+a[0].length):-1}function _f(t,e,n){var a=mn.exec(e.slice(n));return a?(t.s=+a[0],n+a[0].length):-1}function Bs(t,e){return Ne(t.getDate(),e,2)}function td(t,e){return Ne(t.getHours(),e,2)}function ed(t,e){return Ne(t.getHours()%12||12,e,2)}function nd(t,e){return Ne(1+pa.count(sr(t),t),e,3)}function Us(t,e){return Ne(t.getMilliseconds(),e,3)}function rd(t,e){return Us(t,e)+"000"}function ad(t,e){return Ne(t.getMonth()+1,e,2)}function id(t,e){return Ne(t.getMinutes(),e,2)}function od(t,e){return Ne(t.getSeconds(),e,2)}function sd(t){var e=t.getDay();return e===0?7:e}function ld(t,e){return Ne(Ja.count(sr(t)-1,t),e,2)}function zs(t){var e=t.getDay();return e>=4||e===0?Yr(t):Yr.ceil(t)}function cd(t,e){return t=zs(t),Ne(Yr.count(sr(t),t)+(sr(t).getDay()===4),e,2)}function ud(t){return t.getDay()}function fd(t,e){return Ne(Qa.count(sr(t)-1,t),e,2)}function dd(t,e){return Ne(t.getFullYear()%100,e,2)}function hd(t,e){return t=zs(t),Ne(t.getFullYear()%100,e,2)}function gd(t,e){return Ne(t.getFullYear()%1e4,e,4)}function vd(t,e){var n=t.getDay();return t=n>=4||n===0?Yr(t):Yr.ceil(t),Ne(t.getFullYear()%1e4,e,4)}function pd(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ne(e/60|0,"0",2)+Ne(e%60,"0",2)}function js(t,e){return Ne(t.getUTCDate(),e,2)}function md(t,e){return Ne(t.getUTCHours(),e,2)}function yd(t,e){return Ne(t.getUTCHours()%12||12,e,2)}function xd(t,e){return Ne(1+_a.count(lr(t),t),e,3)}function Vs(t,e){return Ne(t.getUTCMilliseconds(),e,3)}function Td(t,e){return Vs(t,e)+"000"}function $d(t,e){return Ne(t.getUTCMonth()+1,e,2)}function Sd(t,e){return Ne(t.getUTCMinutes(),e,2)}function Ad(t,e){return Ne(t.getUTCSeconds(),e,2)}function Ed(t){var e=t.getUTCDay();return e===0?7:e}function bd(t,e){return Ne(ka.count(lr(t)-1,t),e,2)}function Gs(t){var e=t.getUTCDay();return e>=4||e===0?Wr(t):Wr.ceil(t)}function Rd(t,e){return t=Gs(t),Ne(Wr.count(lr(t),t)+(lr(t).getUTCDay()===4),e,2)}function Id(t){return t.getUTCDay()}function Od(t,e){return Ne(qa.count(lr(t)-1,t),e,2)}function Cd(t,e){return Ne(t.getUTCFullYear()%100,e,2)}function Pd(t,e){return t=Gs(t),Ne(t.getUTCFullYear()%100,e,2)}function wd(t,e){return Ne(t.getUTCFullYear()%1e4,e,4)}function Md(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Wr(t):Wr.ceil(t),Ne(t.getUTCFullYear()%1e4,e,4)}function Dd(){return"+0000"}function Xs(){return"%"}function Hs(t){return+t}function Ys(t){return Math.floor(+t/1e3)}var Kr,ao,Ws,io,Ks;Ld({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ld(t){return Kr=Lf(t),ao=Kr.format,Ws=Kr.parse,io=Kr.utcFormat,Ks=Kr.utcParse,Kr}var Nd=Object.defineProperty,Zs=Object.getOwnPropertySymbols,Fd=Object.prototype.hasOwnProperty,Bd=Object.prototype.propertyIsEnumerable,Js=(t,e,n)=>e in t?Nd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ke=(t,e)=>{for(var n in e||(e={}))Fd.call(e,n)&&Js(t,n,e[n]);if(Zs)for(var n of Zs(e))Bd.call(e,n)&&Js(t,n,e[n]);return t};const Se={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},Ve={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},ti={area:"bb-area",areas:"bb-areas"},Tn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip"},Kn={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"},cr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},$n={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},oo={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Or={dragarea:"bb-dragarea",INCLUDED:"_included_"},Ta={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},Un={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},We={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},ur={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Zn={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},qe={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"},on={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},Tr={level:"bb-level",levels:"bb-levels"},Qs={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},$a={region:"bb-region",regions:"bb-regions"},tn={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},sn={shape:"bb-shape",shapes:"bb-shapes"},ks={brush:"bb-brush",subchart:"bb-subchart"},On={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"},ei={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},qs={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},so={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Ue=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke({},Se),Ve),ti),Tn),Kn),cr),$n),oo),Or),Un),We),ur),Zn),qe),Ta),on),Qs),$a),tn),sn),ks),On),ei),qs),so),Ud={boost_useCssRule:!1,boost_useWorker:!1},zd={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},jd={legend_contents_bindto:void 0,legend_contents_template:"{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},Vd={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},regions:[]},Gd={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Xd={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},Hd={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},Yd={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},Wd={value:()=>{}};function _s(){for(var t=0,e=arguments.length,n={},a;t=0&&(a=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}ni.prototype=_s.prototype={constructor:ni,on:function(t,e){var n=this._,a=Kd(t+"",n),i,o=-1,s=a.length;if(arguments.length<2){for(;++o0)for(var n=new Array(i),a=0,i,o;a>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ii(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ii(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=kd.exec(t))?new Dn(e[1],e[2],e[3],1):(e=qd.exec(t))?new Dn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=_d.exec(t))?ii(e[1],e[2],e[3],e[4]):(e=th.exec(t))?ii(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=eh.exec(t))?ll(e[1],e[2]/100,e[3]/100,1):(e=nh.exec(t))?ll(e[1],e[2]/100,e[3]/100,e[4]):nl.hasOwnProperty(t)?il(nl[t]):t==="transparent"?new Dn(NaN,NaN,NaN,0):null}function il(t){return new Dn(t>>16&255,t>>8&255,t&255,1)}function ii(t,e,n,a){return a<=0&&(t=e=n=NaN),new Dn(t,e,n,a)}function ih(t){return t instanceof Aa||(t=Cr(t)),t?(t=t.rgb(),new Dn(t.r,t.g,t.b,t.opacity)):new Dn}function oi(t,e,n,a){return arguments.length===1?ih(t):new Dn(t,e,n,a==null?1:a)}function Dn(t,e,n,a){this.r=+t,this.g=+e,this.b=+n,this.opacity=+a}fo(Dn,oi,el(Aa,{brighter(t){return t=t==null?ai:Math.pow(ai,t),new Dn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ea:Math.pow(Ea,t),new Dn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Dn(Pr(this.r),Pr(this.g),Pr(this.b),si(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ol,formatHex:ol,formatHex8:oh,formatRgb:sl,toString:sl}));function ol(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function oh(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function sl(){const t=si(this.opacity);return`${t===1?"rgb(":"rgba("}${Pr(this.r)}, ${Pr(this.g)}, ${Pr(this.b)}${t===1?")":`, ${t})`}`}function si(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wr(t){return t=Pr(t),(t<16?"0":"")+t.toString(16)}function ll(t,e,n,a){return a<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Jn(t,e,n,a)}function cl(t){if(t instanceof Jn)return new Jn(t.h,t.s,t.l,t.opacity);if(t instanceof Aa||(t=Cr(t)),!t)return new Jn;if(t instanceof Jn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,a=t.b/255,i=Math.min(e,n,a),o=Math.max(e,n,a),s=NaN,l=o-i,c=(o+i)/2;return l?(e===o?s=(n-a)/l+(n0&&c<1?0:s,new Jn(s,l,c,t.opacity)}function sh(t,e,n,a){return arguments.length===1?cl(t):new Jn(t,e,n,a==null?1:a)}function Jn(t,e,n,a){this.h=+t,this.s=+e,this.l=+n,this.opacity=+a}fo(Jn,sh,el(Aa,{brighter(t){return t=t==null?ai:Math.pow(ai,t),new Jn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ea:Math.pow(Ea,t),new Jn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*e,i=2*n-a;return new Dn(ho(t>=240?t-240:t+120,i,a),ho(t,i,a),ho(t<120?t+240:t-120,i,a),this.opacity)},clamp(){return new Jn(ul(this.h),li(this.s),li(this.l),si(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=si(this.opacity);return`${t===1?"hsl(":"hsla("}${ul(this.h)}, ${li(this.s)*100}%, ${li(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ul(t){return t=(t||0)%360,t<0?t+360:t}function li(t){return Math.max(0,Math.min(1,t||0))}function ho(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function fl(t,e,n,a,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*a+s*i)/6}function lh(t){var e=t.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[a],o=t[a+1],s=a>0?t[a-1]:2*i-o,l=a()=>t;function dl(t,e){return function(n){return t+n*e}}function uh(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(a){return Math.pow(t+a*e,n)}}function W0(t,e){var n=e-t;return n?dl(t,n>180||n<-180?n-360*Math.round(n/360):n):ci(isNaN(t)?e:t)}function fh(t){return(t=+t)==1?hl:function(e,n){return n-e?uh(e,n,t):ci(isNaN(e)?n:e)}}function hl(t,e){var n=e-t;return n?dl(t,n):ci(isNaN(t)?e:t)}var ui=function t(e){var n=fh(e);function a(i,o){var s=n((i=oi(i)).r,(o=oi(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),f=hl(i.opacity,o.opacity);return function(g){return i.r=s(g),i.g=l(g),i.b=c(g),i.opacity=f(g),i+""}}return a.gamma=t,a}(1);function gl(t){return function(e){var n=e.length,a=new Array(n),i=new Array(n),o=new Array(n),s,l;for(s=0;sn&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(a=a[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Qn(a,i)})),n=vo.lastIndex;return n=0&&t._call.call(void 0,e),t=t._next;--kr}function Sl(){Mr=(di=Ca.now())+hi,kr=Ra=0;try{yh()}finally{kr=0,Th(),Mr=0}}function xh(){var t=Ca.now(),e=t-di;e>xl&&(hi-=e,di=t)}function Th(){for(var t,e=fi,n,a=1/0;e;)e._call?(a>e._time&&(a=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fi=n);Oa=t,mo(a)}function mo(t){if(!kr){Ra&&(Ra=clearTimeout(Ra));var e=t-Mr;e>24?(t<1/0&&(Ra=setTimeout(Sl,t-Ca.now()-hi)),Ia&&(Ia=clearInterval(Ia))):(Ia||(di=Ca.now(),Ia=setInterval(xh,xl)),kr=1,Tl(Sl))}}function Al(t,e,n){var a=new gi;return e=e==null?0:+e,a.restart(i=>{a.stop(),t(i+e)},e,n),a}var $h=ri("start","end","cancel","interrupt"),Sh=[],El=0,bl=1,yo=2,vi=3,Rl=4,xo=5,pi=6;function mi(t,e,n,a,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Ah(t,n,{name:e,index:a,group:i,on:$h,tween:Sh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:El})}function To(t,e){var n=kn(t,e);if(n.state>El)throw new Error("too late; already scheduled");return n}function er(t,e){var n=kn(t,e);if(n.state>vi)throw new Error("too late; already running");return n}function kn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ah(t,e,n){var a=t.__transition,i;a[e]=n,n.timer=$l(o,0,n.time);function o(f){n.state=bl,n.timer.restart(s,n.delay,n.time),n.delay<=f&&s(f-n.delay)}function s(f){var g,v,m,S;if(n.state!==bl)return c();for(g in a)if(S=a[g],S.name===n.name){if(S.state===vi)return Al(s);S.state===Rl?(S.state=pi,S.timer.stop(),S.on.call("interrupt",t,t.__data__,S.index,S.group),delete a[g]):+gyo&&a.state180?g+=360:g-f>180&&(f+=360),m.push({i:v.push(i(v)+"rotate(",null,a)-2,x:Qn(f,g)})):g&&v.push(i(v)+"rotate("+g+a)}function l(f,g,v,m){f!==g?m.push({i:v.push(i(v)+"skewX(",null,a)-2,x:Qn(f,g)}):g&&v.push(i(v)+"skewX("+g+a)}function c(f,g,v,m,S,P){if(f!==v||g!==m){var N=S.push(i(S)+"scale(",null,",",null,")");P.push({i:N-4,x:Qn(f,v)},{i:N-2,x:Qn(g,m)})}else(v!==1||m!==1)&&S.push(i(S)+"scale("+v+","+m+")")}return function(f,g){var v=[],m=[];return f=t(f),g=t(g),o(f.translateX,f.translateY,g.translateX,g.translateY,v,m),s(f.rotate,g.rotate,v,m),l(f.skewX,g.skewX,v,m),c(f.scaleX,f.scaleY,g.scaleX,g.scaleY,v,m),f=g=null,function(S){for(var P=-1,N=m.length,L;++P=0&&(e=e.slice(0,n)),!e||e==="start"})}function rg(t,e,n){var a,i,o=ng(e)?To:er;return function(){var s=o(this,t),l=s.on;l!==a&&(i=(a=l).copy()).on(e,n),s.on=i}}function ag(t,e){var n=this._id;return arguments.length<2?kn(this.node(),n).on.on(t):this.each(rg(n,t,e))}function ig(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function og(){return this.on("end.remove",ig(this._id))}function sg(t){var e=this._name,n=this._id;typeof t!="function"&&(t=p(t));for(var a=this._groups,i=a.length,o=new Array(i),s=0;s()=>t;function Mg(t,{sourceEvent:e,target:n,selection:a,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:a,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Dg(t){t.stopImmediatePropagation()}function Eo(t){t.preventDefault(),t.stopImmediatePropagation()}var Ll={name:"drag"},bo={name:"space"},_r={name:"handle"},ta={name:"center"};const{abs:Nl,max:Sn,min:An}=Math;function Fl(t){return[+t[0],+t[1]]}function Ro(t){return[Fl(t[0]),Fl(t[1])]}var xi={name:"x",handles:["w","e"].map(Pa),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ti={name:"y",handles:["n","s"].map(Pa),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Lg={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Pa),input:function(t){return t==null?null:Ro(t)},output:function(t){return t}},hr={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ul={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Ng={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Fg={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Pa(t){return{type:t}}function Bg(t){return!t.ctrlKey&&!t.button}function Ug(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function zg(){return navigator.maxTouchPoints||"ontouchstart"in this}function Io(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function jg(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function zl(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Vg(){return Oo(xi)}function Gg(){return Oo(Ti)}function q0(){return Oo(Lg)}function Oo(t){var e=Ug,n=Bg,a=zg,i=!0,o=ri("start","brush","end"),s=6,l;function c(L){var w=L.property("__brush",N).selectAll(".overlay").data([Pa("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",hr.overlay).merge(w).each(function(){var W=Io(this).extent;ot(this).attr("x",W[0][0]).attr("y",W[0][1]).attr("width",W[1][0]-W[0][0]).attr("height",W[1][1]-W[0][1])}),L.selectAll(".selection").data([Pa("selection")]).enter().append("rect").attr("class","selection").attr("cursor",hr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var X=L.selectAll(".handle").data(t.handles,function(W){return W.type});X.exit().remove(),X.enter().append("rect").attr("class",function(W){return"handle handle--"+W.type}).attr("cursor",function(W){return hr[W.type]}),L.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",m).filter(a).on("touchstart.brush",m).on("touchmove.brush",S).on("touchend.brush touchcancel.brush",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(L,w,X){L.tween?L.on("start.brush",function(W){g(this,arguments).beforestart().start(W)}).on("interrupt.brush end.brush",function(W){g(this,arguments).end(W)}).tween("brush",function(){var W=this,H=W.__brush,k=g(W,arguments),K=H.selection,at=t.input(typeof w=="function"?w.apply(this,arguments):w,H.extent),ht=Qr(K,at);function $t(dt){H.selection=dt===1&&at===null?null:ht(dt),f.call(W),k.brush()}return K!==null&&at!==null?$t:$t(1)}):L.each(function(){var W=this,H=arguments,k=W.__brush,K=t.input(typeof w=="function"?w.apply(W,H):w,k.extent),at=g(W,H).beforestart();qr(W),k.selection=K===null?null:K,f.call(W),at.start(X).brush(X).end(X)})},c.clear=function(L,w){c.move(L,null,w)};function f(){var L=ot(this),w=Io(this).selection;w?(L.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),L.selectAll(".handle").style("display",null).attr("x",function(X){return X.type[X.type.length-1]==="e"?w[1][0]-s/2:w[0][0]-s/2}).attr("y",function(X){return X.type[0]==="s"?w[1][1]-s/2:w[0][1]-s/2}).attr("width",function(X){return X.type==="n"||X.type==="s"?w[1][0]-w[0][0]+s:s}).attr("height",function(X){return X.type==="e"||X.type==="w"?w[1][1]-w[0][1]+s:s})):L.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function g(L,w,X){var W=L.__brush.emitter;return W&&(!X||!W.clean)?W:new v(L,w,X)}function v(L,w,X){this.that=L,this.args=w,this.state=L.__brush,this.active=0,this.clean=X}v.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(L,w){return this.starting?(this.starting=!1,this.emit("start",L,w)):this.emit("brush",L),this},brush:function(L,w){return this.emit("brush",L,w),this},end:function(L,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",L,w)),this},emit:function(L,w,X){var W=ot(this.that).datum();o.call(L,this.that,new Mg(L,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:X,dispatch:o}),W)}};function m(L){if(l&&!L.touches||!n.apply(this,arguments))return;var w=this,X=L.target.__data__.type,W=(i&&L.metaKey?X="overlay":X)==="selection"?Ll:i&&L.altKey?ta:_r,H=t===Ti?null:Ng[X],k=t===xi?null:Fg[X],K=Io(w),at=K.extent,ht=K.selection,$t=at[0][0],dt,st,Vt=at[0][1],vt,Q,St=at[1][0],ct,At,Gt=at[1][1],Bt,Kt,ne=0,le=0,be,Oe=H&&k&&i&&L.shiftKey,Ce,He,Fe=Array.from(L.touches||[L],pe=>{const fn=pe.identifier;return pe=Xn(pe,w),pe.point0=pe.slice(),pe.identifier=fn,pe});qr(w);var dn=g(w,arguments,!0).beforestart();if(X==="overlay"){ht&&(be=!0);const pe=[Fe[0],Fe[1]||Fe[0]];K.selection=ht=[[dt=t===Ti?$t:An(pe[0][0],pe[1][0]),vt=t===xi?Vt:An(pe[0][1],pe[1][1])],[ct=t===Ti?St:Sn(pe[0][0],pe[1][0]),Bt=t===xi?Gt:Sn(pe[0][1],pe[1][1])]],Fe.length>1&&un(L)}else dt=ht[0][0],vt=ht[0][1],ct=ht[1][0],Bt=ht[1][1];st=dt,Q=vt,At=ct,Kt=Bt;var Jt=ot(w).attr("pointer-events","none"),xe=Jt.selectAll(".overlay").attr("cursor",hr[X]);if(L.touches)dn.moved=Lt,dn.ended=Ge;else{var Re=ot(L.view).on("mousemove.brush",Lt,!0).on("mouseup.brush",Ge,!0);i&&Re.on("keydown.brush",Pn,!0).on("keyup.brush",wn,!0),co(L.view)}f.call(w),dn.start(L,W.name);function Lt(pe){for(const fn of pe.changedTouches||[pe])for(const Ga of Fe)Ga.identifier===fn.identifier&&(Ga.cur=Xn(fn,w));if(Oe&&!Ce&&!He&&Fe.length===1){const fn=Fe[0];Nl(fn.cur[0]-fn[0])>Nl(fn.cur[1]-fn[1])?He=!0:Ce=!0}for(const fn of Fe)fn.cur&&(fn[0]=fn.cur[0],fn[1]=fn.cur[1]);be=!0,Eo(pe),un(pe)}function un(pe){const fn=Fe[0],Ga=fn.point0;var br;switch(ne=fn[0]-Ga[0],le=fn[1]-Ga[1],W){case bo:case Ll:{H&&(ne=Sn($t-dt,An(St-ct,ne)),st=dt+ne,At=ct+ne),k&&(le=Sn(Vt-vt,An(Gt-Bt,le)),Q=vt+le,Kt=Bt+le);break}case _r:{Fe[1]?(H&&(st=Sn($t,An(St,Fe[0][0])),At=Sn($t,An(St,Fe[1][0])),H=1),k&&(Q=Sn(Vt,An(Gt,Fe[0][1])),Kt=Sn(Vt,An(Gt,Fe[1][1])),k=1)):(H<0?(ne=Sn($t-dt,An(St-dt,ne)),st=dt+ne,At=ct):H>0&&(ne=Sn($t-ct,An(St-ct,ne)),st=dt,At=ct+ne),k<0?(le=Sn(Vt-vt,An(Gt-vt,le)),Q=vt+le,Kt=Bt):k>0&&(le=Sn(Vt-Bt,An(Gt-Bt,le)),Q=vt,Kt=Bt+le));break}case ta:{H&&(st=Sn($t,An(St,dt-ne*H)),At=Sn($t,An(St,ct+ne*H))),k&&(Q=Sn(Vt,An(Gt,vt-le*k)),Kt=Sn(Vt,An(Gt,Bt+le*k)));break}}At0&&(dt=st-ne),k<0?Bt=Kt-le:k>0&&(vt=Q-le),W=bo,xe.attr("cursor",hr.selection),un(pe));break}default:return}Eo(pe)}function wn(pe){switch(pe.keyCode){case 16:{Oe&&(Ce=He=Oe=!1,un(pe));break}case 18:{W===ta&&(H<0?ct=At:H>0&&(dt=st),k<0?Bt=Kt:k>0&&(vt=Q),W=_r,un(pe));break}case 32:{W===bo&&(pe.altKey?(H&&(ct=At-ne*H,dt=st+ne*H),k&&(Bt=Kt-le*k,vt=Q+le*k),W=ta):(H<0?ct=At:H>0&&(dt=st),k<0?Bt=Kt:k>0&&(vt=Q),W=_r),xe.attr("cursor",hr[X]),un(pe));break}default:return}Eo(pe)}}function S(L){g(this,arguments).moved(L)}function P(L){g(this,arguments).ended(L)}function N(){var L=this.__brush||{selection:null};return L.extent=Ro(e.apply(this,arguments)),L.dim=t,L}return c.extent=function(L){return arguments.length?(e=typeof L=="function"?L:Ao(Ro(L)),c):e},c.filter=function(L){return arguments.length?(n=typeof L=="function"?L:Ao(!!L),c):n},c.touchable=function(L){return arguments.length?(a=typeof L=="function"?L:Ao(!!L),c):a},c.handleSize=function(L){return arguments.length?(s=+L,c):s},c.keyModifiers=function(L){return arguments.length?(i=!!L,c):i},c.on=function(){var L=o.on.apply(o,arguments);return L===o?c:L},c}function Xg(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function Hg(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",a=o=>setTimeout(o,1),i=o=>clearTimeout(o);return[e?t.requestAnimationFrame:a,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:a,n?t.cancelIdleCallback:i]}const Ke=Xg(),gn=Ke==null?void 0:Ke.document,[Yg,_0,jl,t1]=Hg(Ke);var Wg=Object.defineProperty,Vl=Object.getOwnPropertySymbols,Kg=Object.prototype.hasOwnProperty,Zg=Object.prototype.propertyIsEnumerable,Gl=(t,e,n)=>e in t?Wg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xl=(t,e)=>{for(var n in e||(e={}))Kg.call(e,n)&&Gl(t,n,e[n]);if(Vl)for(var n of Vl(e))Zg.call(e,n)&&Gl(t,n,e[n]);return t};const De=t=>t||t===0,ve=t=>typeof t=="function",ze=t=>typeof t=="string",he=t=>typeof t=="number",ln=t=>typeof t=="undefined",Qe=t=>typeof t!="undefined",Co=t=>typeof t=="boolean",Jg=t=>Math.ceil(t/10)*10,$i=t=>Math.ceil(t)+.5,Dr=t=>t[1]-t[0],nr=t=>typeof t=="object",qn=t=>ln(t)||t===null||ze(t)&&t.length===0||nr(t)&&!(t instanceof Date)&&Object.keys(t).length===0||he(t)&&isNaN(t),cn=t=>!qn(t),je=t=>Array.isArray(t),Be=t=>t&&!(t!=null&&t.nodeType)&&nr(t)&&!je(t);function $r(t,e,n){return Qe(t[e])?t[e]:n}function Qg(t,e){let n=!1;return Object.keys(t).forEach(a=>t[a]===e&&(n=!0)),n}function _e(t,e,...n){const a=ve(t);return a&&t.call(e,...n),a}function Si(t,e){let n=0;const a=function(...i){!--n&&e.apply(this,...i)};"duration"in t?t.each(()=>++n).on("end",a):(++n,t.call(a))}function Po(t){return ze(t)?t.replace(/<(script|img)?/ig,"<").replace(/(script)?>/ig,">"):t}function wa(t,e,n=[-1,1],a=!1){if(!(!t||!ze(e)))if(e.indexOf(` -`)===-1)t.text(e);else{const i=[t.text(),e].map(o=>o.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const o=e.split(` -`),s=a?o.length-1:1;t.html(""),o.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function Hl(t){const{x:e,y:n,width:a,height:i}=t.getBBox();return[{x:e,y:n+i},{x:e,y:n},{x:e+a,y:n},{x:e+a,y:n+i}]}function Yl(t){const{width:e,height:n}=t.getBoundingClientRect(),a=Hl(t),i=a[0].x,o=Math.min(a[0].y,a[1].y);return{x:i,y:o,width:e,height:n}}function Hn(t,e){var n;const a=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=Xn(a||t,e)}catch(o){}return i.map(o=>isNaN(o)?0:o)}function Wl(t){const{event:e,$el:n}=t,a=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:a&&(i=a.select(".bb-brush").node())&&(i=zl(i)),i}function Ma(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function gr(t=!0,e=0,n=1e4){const a=Ke.crypto||Ke.msCrypto,i=a?e+a.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?String(i):i}function wo(t,e,n,a,i){if(n>a)return-1;const o=Math.floor((n+a)/2);let{x:s,w:l=0}=t[o];return i&&(s=t[o].y,l=t[o].h),e>=s&&e<=s+l?o:e{if(Be(n)&&n.constructor){const a=new n.constructor;for(const i in n)a[i]=e(n[i]);return a}return n};return t.map(n=>e(n)).reduce((n,a)=>Xl(Xl({},n),a))}function yn(t={},e){je(e)&&e.forEach(n=>yn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}const Cn=t=>t.charAt(0).toUpperCase()+t.slice(1);function qg(t,e="-"){return t.split(e).map((n,a)=>a?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Lr=t=>[].slice.call(t);function _g(t,e,n){const{rootSelector:a="",sheet:i}=t,s=`${a} ${(l=>l.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](s,i.cssRules.length)}function tv(t){let e=[];return t.forEach(n=>{var a;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Lr(n.cssRules)))}catch(i){(a=Ke.console)==null||a.warn(`Error while reading rules from ${n.href}: ${i.toString()}`)}}),e}function Zl(t){var e,n,a,i,o,s;return{x:((n=(e=Ke.pageXOffset)!=null?e:Ke.scrollX)!=null?n:0)+((a=t.scrollLeft)!=null?a:0),y:((o=(i=Ke.pageYOffset)!=null?i:Ke.scrollY)!=null?o:0)+((s=t.scrollTop)!=null?s:0)}}function Ai(t,e=0,n=0,a=!0){const i=new DOMPoint(e,n),o=t.getScreenCTM(),s=i.matrixTransform(a?o==null?void 0:o.inverse():o);if(a===!1){const l=t.getBoundingClientRect();s.x-=l.x,s.y-=l.y}return s}function Jl(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Mo(t){const e=t[0]instanceof Date,n=(e?t.map(Number):t).filter((a,i,o)=>o.indexOf(a)===i);return e?n.map(a=>new Date(a)):n}function Do(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function ea(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return Be(t)&&Be(n)&&Object.keys(n).forEach(a=>{if(!/^(__proto__|constructor|prototype)$/i.test(a)){const i=n[a];Be(i)?(!t[a]&&(t[a]={}),t[a]=ea(t[a],i)):t[a]=je(i)?i.concat():i}}),ea(t,...e)}function na(t,e=!0){let n;return t[0]instanceof Date?n=e?(a,i)=>a-i:(a,i)=>i-a:e&&!t.every(isNaN)?n=(a,i)=>a-i:e||(n=(a,i)=>a>i&&-1||acn(a));return n.length?he(n[0])?n=Math[t](...n):n[0]instanceof Date&&(n=na(n,t==="min")[0]):n=void 0,n}const Ei=(t,e,n=1)=>{const a=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let o=t;o{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,a=t())=>{e.dispatchEvent(new MouseEvent(n,a))}}catch(e){return(n,a,i=t())=>{const o=gn.createEvent("MouseEvent");o.initMouseEvent(a,i.bubbles,i.cancelable,Ke,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}})(),touch:(t,e,n)=>{const a=new Touch(ea({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[a],targetTouches:[],changedTouches:[a]}))}};function bi(t,e){let n=t;for(const a in e)n=n.replace(new RegExp(`{=${a}}`,"g"),e[a]);return n}function Yn(t){var e;let n;if(t instanceof Date)n=t;else if(ze(t)){const{config:a,format:i}=this;n=(e=i.dataTime(a.data_xFormat)(t))!=null?e:new Date(t)}else he(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function Lo(t){const e=t.attr("viewBox");return e?/(\d+(\.\d+)?){3}/.test(e):!1}function nv(t,e,n=!1){const a=!!t.node;let i=!1;for(const[o,s]of Object.entries(e))if(i=a?t.style(o)===s:t.style[o]===s,n===!1&&i)break;return i}function Da(){var t,e;return((t=gn)==null?void 0:t.hidden)===!1||((e=gn)==null?void 0:e.visibilityState)==="visible"}function rv(t,e){const{DocumentTouch:n,matchMedia:a,navigator:i}=Ke,o=a==null?void 0:a("(pointer:coarse)").matches;let s=!1;if(e)if(i&&"maxTouchPoints"in i)s=i.maxTouchPoints>0;else if("ontouchmove"in Ke||n&&gn instanceof n)s=!0;else if(o)s=!0;else{const c=i.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!o&&(a==null?void 0:a("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function Ql(t,e){e()===!1?Yg(()=>Ql(t,e)):t()}var av=Object.defineProperty,kl=Object.getOwnPropertySymbols,iv=Object.prototype.hasOwnProperty,ov=Object.prototype.propertyIsEnumerable,No=(t,e,n)=>e in t?av(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ql=(t,e)=>{for(var n in e||(e={}))iv.call(e,n)&&No(t,n,e[n]);if(kl)for(var n of kl(e))ov.call(e,n)&&No(t,n,e[n]);return t},sv=(t,e,n)=>No(t,typeof e!="symbol"?e+"":e,n);const _l=class bf{static setOptions(e){this.data=e.reduce((n,a)=>ql(ql({},n),a),this.data)}constructor(){return kg(Vd,Ud,Hd,zd,Yd,jd,Gd,Xd,bf.data)}};sv(_l,"data",{});let Nr=_l;class lv{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class cv{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,cssRule:{},current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:[],hiddenLegendIds:[],focusedTargetIds:[],defocusedTargetIds:[],radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null}}}}const tc={element:lv,state:cv};class uv{constructor(){Object.keys(tc).forEach(e=>{this[e]=new tc[e]})}getStore(e){return this[e]}}var fv=Object.defineProperty,dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hv=(t,e,n)=>dv(t,typeof e!="symbol"?e+"":e,n);const Ln={bubbleBaseLength:"$baseLength",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",legendItemTextBox:"legendItemTextBox",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect"};class gv{constructor(){hv(this,"cache",{})}add(e,n,a=!1){return this.cache[e]=a?this.cloneTarget(n):n,this.cache[e]}remove(e){(ze(e)?[e]:e).forEach(n=>delete this.cache[n])}get(e,n=!1){if(n&&Array.isArray(e)){const a=[];for(let i=0,o;o=e[i];i++)o in this.cache&&a.push(this.cloneTarget(this.cache[o]));return a}else{const a=this.cache[e];return De(a)?a:null}}reset(e){const n=this;for(const a in n.cache)(e||/^\$/.test(a))&&(n.cache[a]=null)}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const oe={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Fo={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},Sr={Area:[oe.AREA,oe.AREA_SPLINE,oe.AREA_SPLINE_RANGE,oe.AREA_LINE_RANGE,oe.AREA_STEP,oe.AREA_STEP_RANGE],AreaRange:[oe.AREA_SPLINE_RANGE,oe.AREA_LINE_RANGE,oe.AREA_STEP_RANGE],Arc:[oe.PIE,oe.DONUT,oe.GAUGE,oe.POLAR,oe.RADAR],Line:[oe.LINE,oe.SPLINE,oe.AREA,oe.AREA_SPLINE,oe.AREA_SPLINE_RANGE,oe.AREA_LINE_RANGE,oe.STEP,oe.AREA_STEP,oe.AREA_STEP_RANGE],Step:[oe.STEP,oe.AREA_STEP,oe.AREA_STEP_RANGE],Spline:[oe.SPLINE,oe.AREA_SPLINE,oe.AREA_SPLINE_RANGE]};function vv(t){const e=t,{config:n}=e;let a="";if(qn(n.data_type||n.data_types)&&!e[Fo.LINE])a="line";else for(const i in Fo){const o=oe[i];if(e.hasType(o)&&!e[Fo[i]]){a=o;break}}a&&pv(`Please, make sure if %c${qg(a)}`,"module has been imported and specified correctly.","https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality")}function pv(t,e,n){var a;const i="[billboard.js]";if((a=Ke.console)==null?void 0:a.error){const s=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...s),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}const{setTimeout:mv,clearTimeout:yv}=Ke;function xv(t){const e=[];let n;const a=function(){a.clear(),t===!1?jl(()=>{e.forEach(i=>i())},{timeout:200}):n=mv(()=>{e.forEach(i=>i())},he(t)?t:200)};return a.clear=()=>{n&&(yv(n),n=null)},a.add=i=>e.push(i),a.remove=i=>e.splice(e.indexOf(i),1),a}function ec(){let t=[];const e=function(n,a){function i(){var o;let s=0;for(let l=0,c;c=t[l];l++){if(c===!0||(o=c.empty)!=null&&o.call(c)){s++;continue}if(Da()===!1){s=t.length;break}try{c.transition()}catch(f){s++}}return s===t.length}Ql(()=>{a==null||a()},i)};return e.add=function(n){je(n)?t=t.concat(n):t.push(n)},e}const Bo={};function Tv(t,e){var n;const a=t.toString(),i=a.replace(/(function|[\s\W\n])/g,"").substring(0,15);return i in Bo||(Bo[i]=new Ke.Blob([`${(n=e==null?void 0:e.map(String).join(";"))!=null?n:""} - - self.onmessage=function({data}) { - const result = (${a}).apply(null, data); - self.postMessage(result); - };`],{type:"text/javascript"})),Ke.URL.createObjectURL(Bo[i])}function $v(t){const e=new Ke.Worker(t);return e.onerror=function(n){console.error?console.error(n):console.log(n)},e}function Uo(t=!0,e,n,a){let i=function(...o){const s=e(...o);n(s)};if(Ke.Worker&&t){const o=Tv(e,a),s=$v(o);i=function(...l){s.postMessage(l),s.onmessage=function(c){return Ke.URL.revokeObjectURL(o),n(c.data)}}}return i}var nc={},zo={},jo=34,La=10,Vo=13;function rc(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function Sv(t,e){var n=rc(t);return function(a,i){return e(n(a),i,t)}}function ac(t){var e=Object.create(null),n=[];return t.forEach(function(a){for(var i in a)i in e||n.push(e[i]=i)}),n}function Nn(t,e){var n=t+"",a=n.length;return a9999?"+"+Nn(t,6):Nn(t,4)}function Ev(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),a=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":Av(t.getUTCFullYear(),4)+"-"+Nn(t.getUTCMonth()+1,2)+"-"+Nn(t.getUTCDate(),2)+(i?"T"+Nn(e,2)+":"+Nn(n,2)+":"+Nn(a,2)+"."+Nn(i,3)+"Z":a?"T"+Nn(e,2)+":"+Nn(n,2)+":"+Nn(a,2)+"Z":n||e?"T"+Nn(e,2)+":"+Nn(n,2)+"Z":"")}function ic(t){var e=new RegExp('["'+t+` -\r]`),n=t.charCodeAt(0);function a(v,m){var S,P,N=i(v,function(L,w){if(S)return S(L,w-1);P=L,S=m?Sv(L,m):rc(L)});return N.columns=P||[],N}function i(v,m){var S=[],P=v.length,N=0,L=0,w,X=P<=0,W=!1;v.charCodeAt(P-1)===La&&--P,v.charCodeAt(P-1)===Vo&&--P;function H(){if(X)return zo;if(W)return W=!1,nc;var K,at=N,ht;if(v.charCodeAt(at)===jo){for(;N++=P?X=!0:(ht=v.charCodeAt(N++))===La?W=!0:ht===Vo&&(W=!0,v.charCodeAt(N)===La&&++N),v.slice(at+1,K-1).replace(/""/g,'"')}for(;N0){if(typeof e[s-1]=="undefined"&&(e[s-1]={}),typeof o=="undefined")throw new Error(`Source data is missing a component at (${a}, ${s})!`);e[s-1][i]=o}})}),e}function Xo(t){const e=t[0],n=[];return t.forEach(function(a,i){if(i>0){const o={};a.forEach(function(s,l){if(typeof s=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);o[e[l]]=s}),n.push(o)}}),n}function oc(t,e){const n=[];let a,i;if(Array.isArray(t)){const o=function(s,l){if(s[l]!==void 0)return s[l];const f=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let g=s;return f.some(function(v){return!(g=g&&v in g?g[v]:void 0)}),g};e.x?a=e.value.concat(e.x):a=e.value,n.push(a),t.forEach(function(s){const l=a.map(function(c){let f=o(s,c);return typeof f=="undefined"&&(f=null),f});n.push(l)}),i=Xo(n)}else Object.keys(t).forEach(function(o){var s;const l=t[o].concat();(s=l.unshift)==null||s.call(l,o),n.push(l)}),i=Go(n);return i}function Cv(t,e="csv",n,a,i){const o=new XMLHttpRequest,s={csv:Pv,tsv:wv,json:oc};o.open("GET",t),n&&Object.keys(n).forEach(function(l){o.setRequestHeader(l,n[l])}),o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){const l=o.responseText;l&&i.call(this,s[e](e==="json"?JSON.parse(l):l,a))}else throw new Error(`${t}: Something went wrong loading!`)},o.send()}function sc(t,e){const n=t.rows(e);let a;return n.length===1?(a=[{}],n[0].forEach(i=>{a[0][i]=null})):a=t.parse(e),a}function Pv(t){return sc({rows:Rv,parse:bv},t)}function wv(t){return sc({rows:Ov,parse:Iv},t)}function lc(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}var Mv={convertData(t,e){const{config:n}=this,a=n.boost_useWorker;let i=t;if(t.bindto&&(i={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(o=>{const s=`data_${o}`;s in t&&(i[o]=t[s])})),i.url&&e)Cv(i.url,i.mimeType,i.headers,lc(i.keys,n),e);else if(i.json)Uo(a,oc,e,[Go,Xo])(i.json,lc(i.keys,n));else if(i.rows)Uo(a,Xo,e)(i.rows);else if(i.columns)Uo(a,Go,e)(i.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:a,config:i,state:o}=n,s=i.data_type;let l=!1,c=!1,f=!1;a&&(l=a.isCategorized(),c=a.isTimeSeries(),f=a.isCustomX());const g=Object.keys(t[0]||{}),v=g.length?g.filter(n.isNotX,n):[],m=g.length?g.filter(n.isX,n):[];let S;v.forEach(N=>{const L=this.getXKey(N);f||c?m.indexOf(L)>=0?S=(e&&n.data.xs[N]||[]).concat(t.map(w=>w[L]).filter(De).map((w,X)=>n.generateTargetX(w,N,X))):i.data_x?S=this.getOtherTargetXs():cn(i.data_xs)&&(S=n.getXValuesOfXKey(L,n.data.targets)):S=t.map((w,X)=>X),S&&(this.data.xs[N]=S)}),v.forEach(N=>{if(!this.data.xs[N])throw new Error(`x is not defined for id = "${N}".`)});const P=v.map((N,L)=>{const w=i.data_idConverter.bind(n.api)(N),X=n.getXKey(N),W=f&&l,H=W&&t.map(at=>at.x).every(at=>i.axis_x_categories.indexOf(at)>-1),k=t.__append__,K=X===null&&k?n.api.data.values(N).length:0;return{id:w,id_org:N,values:t.map((at,ht)=>{const $t=at[X];let dt=at[N],st;return dt=dt!==null&&!isNaN(dt)&&!Be(dt)?+dt:je(dt)||Be(dt)?dt:null,(W||o.hasRadar)&&L===0&&!ln($t)?(!H&&L===0&&ht===0&&!k&&(i.axis_x_categories=[]),st=i.axis_x_categories.indexOf($t),st===-1&&(st=i.axis_x_categories.length,i.axis_x_categories.push($t))):st=n.generateTargetX($t,N,K+ht),(ln(dt)||n.data.xs[N].length<=ht)&&(st=void 0),{x:st,value:dt,id:w,index:-1}}).filter(at=>Qe(at.x))}});if(P.forEach(N=>{var L;i.data_xSort&&(N.values=N.values.sort((w,X)=>{const W=w.x||w.x===0?w.x:1/0,H=X.x||X.x===0?X.x:1/0;return W-H})),N.values.forEach((w,X)=>w.index=X),(L=n.data.xs[N.id])==null||L.sort((w,X)=>w-X)}),o.hasNegativeValue=n.hasNegativeValueInTargets(P),o.hasPositiveValue=n.hasPositiveValueInTargets(P),s&&n.isValidChartType(s)){const N=n.mapToIds(P).filter(L=>!(L in i.data_types)||!n.isValidChartType(i.data_types[L]));n.setTargetType(N,s)}return P.forEach(N=>n.cache.add(N.id_org,N,!0)),P}},Dv={isX(t){const e=this,{config:n}=e,a=n.data_x&&t===n.data_x,i=cn(n.data_xs)&&Qg(n.data_xs,t);return a||i},isNotX(t){return!this.isX(t)},isStackNormalized(){const{config:t}=this;return!!(t.data_stack_normalize&&t.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:cn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,a=e&&cn(e)?n.mapToIds(e):[];let i;return a.forEach(o=>{n.getXKey(o)===t&&(i=n.data.xs[o])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(ze(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&De(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t{n.data_xs[a]=t[a]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(cn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let a;return t&&(a=n.data_names[t.id],t.name=a!==void 0?a:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let a=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(a=a.filter(i=>i&&"value"in i&&De(i.value))),a},getValueOnIndex(t,e){const n=t.filter(a=>a.index===e);return n.length?n[0]:null},updateTargetX(t,e){const n=this;t.forEach(a=>{a.values.forEach((i,o)=>{i.x=n.generateTargetX(e[o],a.id,o)}),n.data.xs[a.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(a=>{e[a.id]&&n.updateTargetX([a],e[a.id])})},generateTargetX(t,e,n){const a=this,{axis:i}=a;let o=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const s=Yn.bind(a);o=s(t||a.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(o=De(t)?+t:a.getXValue(e,n));return o},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return Qe(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return Qe(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:a}=t;return a&&n&&(e.isAreaRangeType(t)?a=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(a=e.getBubbleZData(a,"y"))),a},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n,a;return(t||this.data.targets.map(i=>i.values)).forEach((i,o)=>{const s=i.map(e).filter(he);n=Math.min(o?n:1/0,...s),a=Math.max(o?a:-1/0,...s)}),{min:n,max:a}},getMinMaxData(){const t=this,e=Ln.dataMinMax;let n=t.cache.get(e);if(!n){const a=t.data.targets.map(l=>l.values),i=t.getMinMaxValue(a);let o=[],s=[];a.forEach(l=>{const c=t.getFilteredDataByValue(l,i.min),f=t.getFilteredDataByValue(l,i.max);c.length&&(o=o.concat(c)),f.length&&(s=s.concat(f))}),t.cache.add(e,n={min:o,max:s})}return n},getTotalPerIndex(){const t=this,e=Ln.dataTotalPerIndex;let n=t.cache.get(e);return(t.config.data_groups.length||t.isStackNormalized())&&!n&&(n=[],t.data.targets.forEach(a=>{a.values.forEach((i,o)=>{n[o]||(n[o]=0),n[o]+=he(i.value)?i.value:0})})),n},getTotalDataSum(t){const e=this,n=Ln.dataTotalSum;let a=e.cache.get(n);if(!he(a)){const i=Do(e.data.targets.map(o=>o.values)).map(o=>o.value);a=i.length?i.reduce((o,s)=>o+s):0,e.cache.add(n,a)}return t&&(a-=e.getHiddenTotalDataSum()),a},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let a=0;return n.length&&(a=e.data.values.bind(e)(n).reduce((i,o)=>i+o)),a},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){return Math.max(...this.data.targets.map(t=>t.values.length),0)},getMaxDataCountTarget(){let t=this.filterTargetsToShow()||[];const e=t.length,n=this.config.axis_x_inverted;return e>1?(t=t.map(a=>a.values).reduce((a,i)=>a.concat(i)).map(a=>a.x),t=na(Mo(t)).map((a,i,o)=>({x:a,index:n?o.length-i-1:i}))):e&&(t=t[0].values.concat()),t},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?je(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let a=0,i;i=n[a];a++)if(i===e)return!0;return!1},isTargetToShow(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow(t){const e=this;return(t||e.data.targets).filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let a=[];return t!=null&&t.length&&(a=Mo(Do(t.map(i=>i.values.map(o=>+o.x)))),a=n!=null&&n.isTimeSeries()?a.map(i=>new Date(+i)):a.map(Number)),na(a)},addTargetIds(t,e){const{state:n}=this;(je(e)?e:[e]).forEach(i=>{n[t].indexOf(i)<0&&n[t].push(i)})},removeTargetIds(t,e){const{state:n}=this;(je(e)?e:[e]).forEach(i=>{const o=n[t].indexOf(i);o>=0&&n[t].splice(o,1)})},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,a={},i=e.isMultipleX(),o=i?e.mapTargetsToUniqueXs(t).map(s=>ze(s)?s:+s):null;return t.forEach(s=>{const l=[];s.values.filter(({value:c})=>De(c)||c===null).forEach(c=>{let{value:f}=c;f!==null&&e.isCandlestickType(c)&&(f=je(f)?f.slice(0,4):[f.open,f.high,f.low,f.close]),je(f)?l.push(...f):Be(f)&&"high"in f?l.push(...Object.values(f)):e.isBubbleZType(c)?l.push(n&&e.getBubbleZData(f,"y")):i?l[e.getIndexByX(c.x,o)]=f:l.push(f)}),a[s.id]=l}),a},checkValueInTargets(t,e){const n=Object.keys(t);let a;for(let i=0;i1},hasNegativeValueInTargets(t){return this.checkValueInTargets(t,e=>e<0)},hasPositiveValueInTargets(t){return this.checkValueInTargets(t,e=>e>0)},orderTargets(t){const e=this,n=[...t],a=e.getSortCompareFn();return a&&n.sort(a),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,a=n.data_order,i=/asc/i.test(a),o=/desc/i.test(a);let s;if(i||o){const l=(f,g)=>f+Math.abs(g.value),c=f=>he(f)?f:"values"in f?f.values.reduce(l,0):f.value;s=(f,g)=>{const v=c(f),m=c(g);return t?i?v-m:m-v:i?m-v:v-m}}else ve(a)&&(s=a.bind(e.api));return s||null},filterByX(t,e){return Do(t.map(n=>n.values)).filter(n=>n.x-e===0)},filterRemoveNull(t){return t.filter(e=>De(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(a=>e[0]<=a.x&&a.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Co(t)&&t||nr(t)&&cn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:a,state:{hasRadar:i,inputType:o,eventReceiver:{coords:s,rect:l}}}=e;let c;if(i){let f=t.target;/tspan/i.test(f.tagName)&&(f=f.parentNode);const g=ot(f).datum();c=g&&Object.keys(g).length===1?g.index:void 0}else{const f=a.axis_rotated,g=Zl(n.chart.node()),v=o==="touch"&&t.changedTouches?t.changedTouches[0]:t;let m=f?v.clientY+g.y:v.clientX+g.x;if(Lo(n.svg)){const S=[m,0];f&&S.reverse(),m=Ai(n.eventRect.node(),...S)[f?"y":"x"]}else m-=f?l.top:l.left;c=wo(s,m,0,s.length-1,f)}return c},getDataLabelLength(t,e,n){const a=this,i=[0,0],o=1.3;return a.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(s=>a.dataLabelFormat(s.id)(s)).each(function(s,l){i[l]=this.getBoundingClientRect()[n]*o}).remove(),i},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,a=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)a.push(t[i]);for(i=e;in.findClosest(i.values,e));return n.findClosest(a,e)},findClosest(t,e){const n=this,{$el:{main:a}}=n,i=t.filter(l=>l&&De(l.value));let o,s;return i.filter(l=>n.isBarType(l.id)||n.isCandlestickType(l.id)).forEach(l=>{const c=n.isBarType(l.id)?`.${Kn.chartBar}.${Se.target}${n.getTargetSelectorSuffix(l.id)} .${Kn.bar}-${l.index}`:`.${cr.chartCandlestick}.${Se.target}${n.getTargetSelectorSuffix(l.id)} .${cr.candlestick}-${l.index} path`;!s&&n.isWithinBar(a.select(c).node())&&(s=l)}),i.filter(l=>!n.isBarType(l.id)&&!n.isCandlestickType(l.id)).forEach(l=>{const c=n.dist(l,e);o=n.getPointSensitivity(l),c{const{x:i,id:o}=a;n.push({x:i,id:o,value:a.value[0]}),n.push({x:i,id:o,value:a.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:a}=n,i=a[`data_${t}`];return ln(e)||(Object.keys(e).forEach(o=>{i[o]=e[o]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){const a=t==null?void 0:t.value;if(je(a)){if(n==="bar")return a.reduce((i,o)=>o-i);{const i={areaRange:["high","mid","low"],candlestick:["open","high","low","close","volume"]}[n].indexOf(e);return i>=0&&a?a[i]:void 0}}else if(a&&e)return a[e];return a},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(a=>e.isGrouped(a.id))){const a=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(a):a(i)})}},getRatio(t,e,n=!1){const a=this,{config:i,state:o}=a,s=a.api;let l=0;if(e&&s.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(a.pie.padAngle()())l=e.value/a.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?a.getArcLength():a.getStartingAngle()*-2,f=a.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/f}else if(t==="index"){const c=s.data.values.bind(s);let f=this.getTotalPerIndex();if(o.hiddenTargetIds.length){let v=c(o.hiddenTargetIds,!1);v.length&&(v=v.reduce((m,S)=>m.map((P,N)=>(he(P)?P:0)+S[N])),f=f.map((m,S)=>m-v[S]))}const g=f[e.index];e.ratio=he(e.value)&&f&&g?e.value/g:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/o.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const f=a.getYScaleById.bind(a)(e.id).domain().reduce((g,v)=>v-g);l=f===0?0:Math.abs(a.getRangedData(e,null,t)/f)}else t==="treemap"&&(l/=a.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((a,i,o)=>(a[Number(i.x)]=o,a),{});e.data.targets.forEach(a=>{a.values.forEach((i,o)=>{let s=n[Number(i.x)];s===void 0&&(s=o),i.index=s})})},isBubbleZType(t){return this.isBubbleType(t)&&(Be(t.value)&&("z"in t.value||"y"in t.value)||je(t.value)&&t.value.length>=2)},isBarRangeType(t){const e=this,{value:n}=t;return e.isBarType(t)&&je(n)&&n.length>=2&&n.every(a=>he(a))},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function cc(t,e=!1){const n=this,{api:a}=n;e&&n.api.flush(!0),t==null||t.call(a)}var Lv={load(t,e){const n=this,{axis:a,data:i,org:o,scale:s}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let f=t;f&&(e.filter&&(f=f.filter(e.filter)),(e.type||e.types)&&f.forEach(g=>{var v;const m=((v=e.types)==null?void 0:v[g.id])||e.type;n.setTargetType(g.id,m)}),i.targets.forEach(g=>{for(let v=0;v{const a=t.data||n;t.append&&(a.__append__=!0),a&&e.load(e.convertDataToTargets(a),t)}))},unload(t,e){var n;const a=this,{state:i,$el:o,$T:s}=a,l=!!((n=a.hasLegendDefsPoint)!=null&&n.call(a));let c=e,f=t;if(a.cache.reset(),c||(c=()=>{}),f=f.filter(v=>a.hasTarget(a.data.targets,v)),!f||f.length===0){c();return}const g=o.svg.selectAll(f.map(v=>a.selectorTarget(v)));s(g).style("opacity","0").remove().call(Si,c),f.forEach(v=>{var m;const S=a.getTargetSelectorSuffix(v);i.withoutFadeIn[v]=!1,o.legend&&o.legend.selectAll(`.${We.legendItem}${S}`).remove(),a.data.targets=a.data.targets.filter(P=>P.id!==v),l&&((m=o.defs)==null||m.select(`#${a.getDefsPointId(S)}`).remove())}),i.hasFunnel&&a.updateFunnel(a.data.targets),i.hasTreemap&&a.updateTargetsForTreemap(a.data.targets),a.updateTypesElements()}},Ri=t=>()=>t;function Ho(t,{sourceEvent:e,subject:n,target:a,identifier:i,active:o,x:s,y:l,dx:c,dy:f,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:g}})}Ho.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Nv(t){return!t.ctrlKey&&!t.button}function Fv(){return this.parentNode}function Bv(t,e){return e==null?{x:t.x,y:t.y}:e}function Uv(){return navigator.maxTouchPoints||"ontouchstart"in this}function uc(){var t=Nv,e=Fv,n=Bv,a=Uv,i={},o=ri("start","drag","end"),s=0,l,c,f,g,v=0;function m(H){H.on("mousedown.drag",S).filter(a).on("touchstart.drag",L).on("touchmove.drag",w,Jd).on("touchend.drag touchcancel.drag",X).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(H,k){if(!(g||!t.call(this,H,k))){var K=W(this,e.call(this,H,k),H,k,"mouse");K&&(ot(H.view).on("mousemove.drag",P,Sa).on("mouseup.drag",N,Sa),co(H.view),lo(H),f=!1,l=H.clientX,c=H.clientY,K("start",H))}}function P(H){if(Zr(H),!f){var k=H.clientX-l,K=H.clientY-c;f=k*k+K*K>v}i.mouse("drag",H)}function N(H){ot(H.view).on("mousemove.drag mouseup.drag",null),uo(H.view,f),Zr(H),i.mouse("end",H)}function L(H,k){if(t.call(this,H,k)){var K=H.changedTouches,at=e.call(this,H,k),ht=K.length,$t,dt;for($t=0;$ti.$el[o]).forEach(o=>{a&&i.$el[o].classed(Se.EXPANDED,!1),i.getShapeByIndex(o,e,n).classed(Se.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:a,state:{hasFunnel:i,hasRadar:o,hasTreemap:s},$el:{main:l}}=n,c=Be(e);if(c||e!==-1){const f=a[t?"data_onover":"data_onout"].bind(n.api);if(a.color_onover&&n.setOverColor(t,e,c),c){const g=n.getTargetSelectorSuffix(e.id),v=i||s?`${Se.target+g} .${sn.shape}`:Ve.arc+g;f(e,l.select(`.${v}`).node())}else if(a.tooltip_grouped)t&&(o&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${sn.shape}-${e}`).each(function(g){f(g,this)});else{const g=n.cache.get(Ln.setOverOut)||[],v=l.selectAll(`.${sn.shape}-${e}`).filter(function(S){return n.isWithinShape(this,S)}),m=v.filter(function(){return g.every(S=>S!==this)});if(!t||v.empty()||g.length===m.size()&&m.nodes().every((S,P)=>S!==g[P]))for(;g.length;){const S=g.pop();a.data_onout.bind(n.api)(ot(S).datum(),S)}m.each(function(){t&&(f(ot(this).datum(),this),g.push(this))}),n.cache.add(Ln.setOverOut,g)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Ln.callOverOutForTouch);(Be(t)&&n?t.id!==n.id:t!==n)&&((n||he(n))&&e.setOverOut(!1,n),(t||he(t))&&e.setOverOut(!0,t),e.cache.add(Ln.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?uc().on("drag",function(a){n.event=a,t.drag(Hn(a,this))}).on("start",function(a){n.event=a,t.dragstart(Hn(a,this))}).on("end",a=>{n.event=a,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var a,i,o;const s=this,{config:l,state:{eventReceiver:c,hasAxis:f,hasFunnel:g,hasRadar:v,hasTreemap:m},$el:{eventRect:S,funnel:P,radar:N,svg:L,treemap:w}}=s;let X=(o=(i=(g||m)&&c.rect||v&&N.axes.select(`.${Tn.axis}-${e} text`)||S||((a=s.getArcElementByIdOrIndex)==null?void 0:a.call(s,e)))==null?void 0:i.node)==null?void 0:o.call(i);if(X){const W=s.isMultipleX(),H=l.axis_rotated;let{width:k,left:K,top:at}=X.getBoundingClientRect();if(f&&!v&&!W){const st=c.coords[e];st?(k=st.w,K+=st.x,at+=st.y):(k=0,K=0,at=0)}let ht=K+(n?n[0]:0)+(W||H?0:k/2),$t=at+(n?n[1]:0)+(H?4:0);if(Lo(L)){const st=Ai(s.$el.eventRect.node(),ht,$t,!1);ht=st.x,$t=st.y}const dt={screenX:ht,screenY:$t,clientX:ht,clientY:$t,bubbles:v};(g||m)&&(X=(P!=null?P:w).node()),ev[/^(mouse|click)/.test(t)?"mouse":"touch"](X,t,dt)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{eventRect:e,zoomResetBtn:n}}=t;e==null||e.on(".zoom wheel.zoom .drag",null),n==null||n.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:a,legend:i,region:o,svg:s,treemap:l},brush:c}=e,f=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,a,o==null?void 0:o.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(g=>g==null?void 0:g.on(f,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},jv={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}},Vv={generateClass(t,e){return` ${t} ${t+this.getTargetSelectorSuffix(e)}`},getClass(t,e){const n=/s$/.test(t),a=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return o=>{const s=o.data||o;return((e?this.generateClass(Ue[n?"shapes":"shape"],s[i]):"")+this.generateClass(Ue[t],s[a?"id":i])).trim()}},getChartClass(t){return e=>Ue[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(a){var i;const o=a.id||((i=a.data)==null?void 0:i.id)||a;return n.indexOf(o)<0&&n.push(o),e[n.indexOf(o)%e.length]}},classRegion(t,e){return`${this.generateClass(Ue.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Ue.target}-${e}`),this.generateClass(Ue.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.indexOf(t.id)>=0?Ue.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.indexOf(t.id)>=0?Ue.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-")},selectorTarget(t,e="",n=""){const a=this.getTargetSelectorSuffix(t);return`${e}.${Ue.target+a} ${n}, ${e}.${Ue.circles+a} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(a=>this.selectorTarget(a,e)):null},selectorLegend(t){return`.${Ue.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};class fc extends Map{constructor(e,n=gc){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[a,i]of e)this.set(a,i)}get(e){return super.get(Yo(this,e))}has(e){return super.has(Yo(this,e))}set(e,n){return super.set(dc(this,e),n)}delete(e){return super.delete(hc(this,e))}}class f1 extends Set{constructor(e,n=gc){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const a of e)this.add(a)}has(e){return super.has(Yo(this,e))}add(e){return super.add(dc(this,e))}delete(e){return super.delete(hc(this,e))}}function Yo({_intern:t,_key:e},n){const a=e(n);return t.has(a)?t.get(a):n}function dc({_intern:t,_key:e},n){const a=e(n);return t.has(a)?t.get(a):(t.set(a,n),n)}function hc({_intern:t,_key:e},n){const a=e(n);return t.has(a)&&(n=t.get(a),t.delete(a)),n}function gc(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ra(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function d1(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const vc=Symbol("implicit");function pc(){var t=new fc,e=[],n=[],a=vc;function i(o){let s=t.get(o);if(s===void 0){if(a!==vc)return a;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new fc;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return pc(e,n).unknown(a)},ra.apply(i,arguments),i}const Gv=(t,e,n)=>{const a=ot(t.cloneNode(!0));return a.attr("id",n).insert("rect",":first-child").attr("width",a.attr("width")).attr("height",a.attr("height")).style("fill",e),{id:n,node:a.node()}};function Xv(t){const e=Ln.colorPattern,{body:n}=gn;let a=n[e];if(!a){const i=";",o=t.classed(oo.colorPattern,!0).style("background-image");t.classed(oo.colorPattern,!1),o.indexOf(i)>-1&&(a=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(i).map(s=>s.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=a)}return a}const Hv=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Yv={generateColor(){const t=this,{$el:e,config:n}=t,a=n.data_colors,i=n.data_color,o=[];let s=cn(n.color_pattern)?n.color_pattern:pc(Xv(e.chart)||Hv).range();const l=s;if(ve(n.color_tiles)){const c=n.color_tiles.bind(t.api)(),f=s.map((g,v)=>{const m=g.replace(/[#\(\)\s,]/g,""),S=`${t.state.datetimeId}-pattern-${m}-${v}`;return Gv(c[v%c.length],g,S)});s=f.map(g=>`url(#${g.id})`),t.patterns=f}return function(c){var f;const g=c.id||((f=c.data)==null?void 0:f.id)||c,v=t.isTypeOf(g,["line","spline","step"])||!n.data_types[g];let m;return ve(a[g])?m=a[g].bind(t.api)(c):a[g]?m=a[g]:(o.indexOf(g)<0&&o.push(g),m=v?l[o.indexOf(g)%l.length]:s[o.indexOf(g)%s.length],a[g]=m),ve(i)?i.bind(t.api)(m,c):m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,a=e.color_threshold,i=a.unit==="value",o=a.max||100,s=a.values&&a.values.length?a.values:[];return cn(a)?function(l){const c=i?l:l*100/o;let f=n[n.length-1];for(let g=0,v=s.length;g{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(s)}${ze(t)?n.getTargetSelectorSuffix(t):""}`;a.defs.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l).html(` - `)})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:a},$el:{defs:i}}=t;n.forEach(o=>{const s=`${a}-gradient${t.getTargetSelectorSuffix(o.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(o)&&"area"||t.isBarType(o)&&"bar";if((l||c)&&i.select(`#${s}`).empty()){const f=t.color(o),g={defs:null,stops:[]};if(l){const{cx:v=.3,cy:m=.3,r:S=.7,stops:P=[[.1,f,0],[.9,f,1]]}=l;g.stops=P,g.defs=i.append("radialGradient").attr("id",`${s}`).attr("cx",v).attr("cy",m).attr("r",S)}else{const v=e.axis_rotated,{x:m=v?[1,0]:[0,0],y:S=v?[0,0]:[0,1],stops:P=[[0,f,1],[1,f,0]]}=e[`${c}_linearGradient`];g.stops=P,g.defs=i.append("linearGradient").attr("id",`${s}`).attr("x1",m[0]).attr("x2",m[1]).attr("y1",S[0]).attr("y2",S[1])}g.stops.forEach(v=>{const[m,S,P]=v,N=ve(S)?S.bind(t.api)(o.id):S;g.defs&&g.defs.append("stop").attr("offset",m).attr("stop-color",N||f).attr("stop-opacity",P)})}})},setOverColor(t,e){const n=this,{config:a,$el:{main:i}}=n,o=a.color_onover;let s=t?o:n.color;Be(s)?s=({id:l})=>l in o?o[l]:n.color(l):ze(s)?s=()=>o:ve(o)&&(s=s.bind(n.api)),i.selectAll(Be(e)?`.${Ve.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${sn.shape}-${e}`).style("fill",s)}},Wv={getYDomainMinMax(t,e){const n=this,{axis:a,config:i}=n,o=e==="min",s=i.data_groups,l=n.mapToIds(t),c=n.getValuesAsIdKeyed(t);if(s.length>0){const f=n[`has${o?"Negative":"Positive"}ValueInTargets`](t);s.forEach(g=>{const v=g.filter(m=>l.indexOf(m)>=0);if(v.length){const m=v[0],S=a.getId(m);f&&c[m]&&(c[m]=c[m].map(P=>(o?P<0:P>0)?P:0)),v.filter((P,N)=>N>0).forEach(P=>{if(c[P]){const N=a.getId(P);c[P].forEach((L,w)=>{const X=+L,W=o?X>0:X<0;N===S&&!(f&&W)&&(c[m][w]+=X)})}})}})}return _n(e,Object.keys(c).map(f=>_n(e,c[f])))},isHiddenTargetWithYDomain(t){const e=this;return e.state.hiddenTargetIds.some(n=>e.axis.getId(n)===t)},getYDomain(t,e,n){const a=this,{axis:i,config:o,scale:s}=a,l=`axis_${e}`;if(a.isStackNormalized())return[0,100];const c=(s==null?void 0:s[e])&&s[e].type==="log",f=t.filter(dt=>i.getId(dt.id)===e),g=n?a.filterByXDomain(f,n):f;if(g.length===0)return a.isHiddenTargetWithYDomain(e)?s[e].domain():e==="y2"?s.y.domain():a.getYDomain(t,"y2",n);const v=o[`${l}_min`],m=o[`${l}_max`],S=o[`${l}_center`],P=o[`${l}_inverted`],N=a.hasDataLabel()&&o.axis_rotated,L=a.hasDataLabel()&&!o.axis_rotated;let w=a.getYDomainMinMax(g,"min"),X=a.getYDomainMinMax(g,"max"),W=[oe.BAR,oe.BUBBLE,oe.SCATTER,...Sr.Line].some(dt=>{const st=dt.indexOf("area")>-1?"area":dt;return a.hasType(dt,g,!0)&&o[`${st}_zerobased`]});w=De(v)?v:De(m)?w<=m?w:m-10:w,X=De(m)?m:De(v)?v<=X?X:v+10:X,isNaN(w)&&(w=0),isNaN(X)&&(X=w),w===X&&(w<0?X=0:w=0);const H=w>=0&&X>=0,k=w<=0&&X<=0;(De(v)&&H||De(m)&&k)&&(W=!1),W&&(H&&(w=0),k&&(X=0));const K=Math.abs(X-w);let at={top:K*.1,bottom:K*.1};if(Qe(S)){const dt=Math.max(Math.abs(w),Math.abs(X));X=S+dt,w=S-dt}if(N){const dt=Dr(s.y.range()),st=a.getDataLabelLength(w,X,"width").map(Vt=>Vt/dt);["bottom","top"].forEach((Vt,vt)=>{at[Vt]+=K*(st[vt]/(1-st[0]-st[1]))})}else if(L){const dt=a.getDataLabelLength(w,X,"height");["bottom","top"].forEach((st,Vt)=>{at[st]+=a.convertPixelToScale("y",dt[Vt],K)})}at=a.getResettedPadding(at);const ht=o[`${l}_padding`];cn(ht)&&["bottom","top"].forEach(dt=>{at[dt]=i.getPadding(ht,dt,at[dt],K)}),W&&(H&&(at.bottom=w),k&&(at.top=-X));const $t=c?[w,X].map(dt=>dt<0?0:dt):[w-at.bottom,X+at.top];return P?$t.reverse():$t},getXDomainMinMax(t,e){var n;const a=this,i=a.config[`axis_x_${e}`],o=_n(e,t.map(l=>_n(e,l.values.map(c=>c.x))));let s=Be(i)?i.value:i;return s=Qe(s)&&((n=a.axis)!=null&&n.isTimeSeries())?Yn.bind(this)(s):s,Be(i)&&i.fit&&(e==="min"&&so)&&(s=void 0),Qe(s)?s:o},getXDomainPadding(t,e){const n=this,{axis:a,config:i}=n,o=i.axis_x_padding,s=a.isTimeSeries()&&e,l=Dr(t);let c;if(a.isCategorized()||s)c=0;else if(n.hasType("bar")){const v=n.getMaxDataCount();c=v>1?l/(v-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:f=c,right:g=c}=he(o)?{left:o,right:o}:o;if(o.unit==="px"){const v=Math.abs(l+l*.2);f=a.getPadding(o,"left",c,v),g=a.getPadding(o,"right",c,v)}else{const v=l+f+g;if(s&&v){const m=l/e/v;f=f/v/m,g=g/v/m}}return{left:f,right:g}},getXDomain(t){const e=this,{axis:n,config:a,scale:{x:i}}=e,o=a.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=s;if(i.type!=="log"){const f=n.isCategorized(),g=n.isTimeSeries(),v=e.getXDomainPadding(s);let[m,S]=s;m-S===0&&!f&&(g?(m=new Date(m.getTime()*.5),S=new Date(S.getTime()*1.5)):(m=m===0?1:m*.5,S=S===0?-1:S*1.5)),(m||m===0)&&(l=g?new Date(m.getTime()-v.left):m-v.left),(S||S===0)&&(c=g?new Date(S.getTime()+v.right):S+v.right)}return o?[c,l]:[l,c]},updateXDomain(t,e,n,a,i){var o;const s=this,{config:l,org:c,scale:{x:f,subX:g}}=s,v=l.zoom_enabled;if(n&&(f.domain(i||na(s.getXDomain(t),!l.axis_x_inverted)),c.xDomain=f.domain(),g.domain(f.domain()),(o=s.brush)==null||o.scale(g)),e){const m=i||!s.brush||Kl(s)?c.xDomain:Wl(s).map(g.invert);f.domain(m)}return(n||e)&&v&&s.zoom.updateScaleExtent(),a&&f.domain(s.trimXDomain(f.orgDomain())),f.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,a=e.getZoomDomain(),[i,o]=a;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=o:t[1]>=o)&&(t[0]=+t[0]-(t[1]-o),t[1]=o),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:a,scale:i,org:o}=n;let[s,l]=e&&i[t]?i[t].domain():o.xDomain;return t==="zoom"&&(Qe(a.zoom_x_min)&&(s=_n("min",[s,a.zoom_x_min])),Qe(a.zoom_x_max)&&(l=_n("max",[l,a.zoom_x_max]))),[s,l]},getZoomDomainValue(t){const e=this,{config:n,axis:a}=e;if(a.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((s,l)=>Number(s)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const a=this,{config:i,state:o}=a,s=i.axis_rotated;let l;return t==="x"?l=s?"height":"width":l=s?"width":"height",n*(e/o[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[o,s]=n;if(Array.isArray(t)){const l=[...t];if(i&&l.reverse(),l[0](f===0?i?+c<=o:+c>=o:i?+c>=s:+c<=s)&&!t.every((g,v)=>g===e[v]))}return!1}};function mc(t,e,n){const{config:a}=t,i=`axis_${e}_tick_format`;return(a[i]?a[i]:t.defaultValueFormat).call(t.api,n)}var Kv={yFormat(t){return mc(this,"y",t)},y2Format(t){return mc(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:a}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?a:n).call(t,o,s)}},defaultValueFormat(t){return je(t)?t.join("~"):De(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,a=o=>{const s="~";let l=o;return je(o)?l=o.join(s):Be(o)&&(l=Object.values(o).join(s)),l};let i=a;return ve(n.format)?i=n.format:nr(n.format)&&(n.format[t]?i=n.format[t]===!0?a:n.format[t]:i=()=>""),i.bind(e.api)}};function Ii(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function Wo(t,e=!0){var n;const{config:a}=this;let i=(n=a.data_names[t])!=null?n:t;return e&&ve(a.legend_format)&&(i=a.legend_format(i,t!==i?t:void 0)),i}var Zv={initLegend(){const t=this,{config:e,$el:n}=t;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(We.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend(t,e,n){var a;const i=this,{config:o,state:s,scale:l,$el:c}=i,f=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};f.withTransition=$r(f,"withTransition",!0),f.withTransitionForTransform=$r(f,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?i.updateLegendTemplate():s.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),f,n),(a=c.legend)==null||a.selectAll(`.${We.legendItem}`).classed(We.legendItemHidden,function(g){const v=!i.isTargetToShow(g);return v&&(this.style.opacity=null),v}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(f.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,a=ot(e.legend_contents_bindto),i=e.legend_contents_template;if(!a.empty()){const o=t.mapToIds(t.data.targets),s=[];let l="";o.forEach(f=>{const g=ve(i)?i.bind(t.api)(f,t.color(f),t.api.data(f)[0].values):bi(i,{COLOR:t.color(f),TITLE:f});g&&(s.push(f),l+=g)});const c=a.html(l).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(c),n.legend=a}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:a,isLegendLeft:i,isLegendRight:o,isLegendInset:s,current:l}}=e,{width:c,height:f}=t,g={top:a?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-f-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?g.top:l.height-f,right:NaN,bottom:0,left:o?l.width-c:s?g.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:a}=e;a(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep(t){this.state.legendStep=t},updateLegendItemWidth(t){this.state.legendItemWidth=t},updateLegendItemHeight(t){this.state.legendItemHeight=t},updateLegendItemColor(t,e){const{legend:n}=this.$el;n&&n.select(`.${We.legendItem}-${t} line`).style("stroke",e)},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:a,legendItemWidth:i,legendStep:o}=t.state;return t.config.legend_show?n||a?i*(o+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:a,legendItemHeight:i,legendStep:o}=e.state,s=((t=e.config.padding)==null?void 0:t.mode)==="fit";return e.config.legend_show?a?n.height:Math.max(s?10:20,i)*(o+1):0},opacityForUnfocusedLegend(t){return t.classed(We.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:a},$T:i}=n,o=n.mapToTargetIds(t);a&&i(a.selectAll(`.${We.legendItem}`).filter(s=>o.indexOf(s)>=0).classed(qe.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,ot(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${We.legendItem}`).classed(qe.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:a,$T:i}=e;n.legend_show||(n.legend_show=!0,a.legend?a.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(a.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:a}}=e;n.legend_show&&qn(t)&&(n.legend_show=!1,a.style("visibility","hidden")),e.addHiddenLegendIds(t),a.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:a,state:i}=n;let o;const s=Ln.legendItemTextBox;return t&&(o=!i.redrawing&&a.get(s)||{},o[t]||(o[t]=n.getTextRect(e,We.legendItem),a.add(s,o)),o=o[t]),o},setLegendItem(t){const e=this,{$el:n,api:a,config:i,state:o}=e,s=o.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,f=i.legend_item_interaction;t.attr("class",function(g){const v=ot(this);return(!v.empty()&&v.attr("class")||"")+e.generateClass(We.legendItem,g)}).style("visibility",g=>e.isLegendToShow(g)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${We.legendItem}`,"cursor:pointer"],[`.${We.legendItem} text`,"pointer-events:none"],[`.${We.legendItemPoint} text`,"pointer-events:none"],[`.${We.legendItemTile}`,"pointer-events:none"],[`.${We.legendItemEvent}`,"fill-opacity:0"]].forEach(g=>{const[v,m]=g;e.setCssRule(!1,v,[m])(n.legend)}),t.on(f.dblclick?"dblclick":"click",f||ve(i.legend_item_onclick)?function(g,v){if(!_e(i.legend_item_onclick,a,v,!o.hiddenTargetIds.includes(v))){const{altKey:m,target:S,type:P}=g;P==="dblclick"||m?o.hiddenTargetIds.length&&S.parentNode.getAttribute("class").indexOf(We.legendItemHidden)===-1?a.show():(a.hide(),a.show(v)):(a.toggle(v),ot(this).classed(qe.legendItemFocused,!1))}s&&e.hideTooltip()}:null),!s&&t.on("mouseout",f||ve(i.legend_item_onout)?function(g,v){_e(i.legend_item_onout,a,v,!o.hiddenTargetIds.includes(v))||(ot(this).classed(qe.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${Un.gaugeValue}`),e.api.revert())}:null).on("mouseover",f||ve(i.legend_item_onover)?function(g,v){_e(i.legend_item_onover,a,v,!o.hiddenTargetIds.includes(v))||(ot(this).classed(qe.legendItemFocused,!0),l&&e.markOverlapped(v,e,`.${Un.gaugeValue}`),!o.transiting&&e.isTargetToShow(v)&&a.focus(v))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer")))},updateLegendElement(t,e){const n=this,{config:a,state:i,$el:{legend:o},$T:s}=n,c=a.legend_item_tile_type!=="circle",f=a.legend_item_tile_r,g={width:c?a.legend_item_tile_width:f*2,height:c?a.legend_item_tile_height:f*2},v={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:g.width+5,totalLength:0},m={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let S,P,N;const L=t.filter(K=>!Qe(a.data_names[K])||a.data_names[K]!==null),w=e.withTransition,X=n.getUpdateLegendPositions(L,v,m);i.isLegendInset&&(v.step=a.legend_inset_step?a.legend_inset_step:L.length,n.updateLegendStep(v.step)),i.isLegendRight?(S=K=>v.max.width*m.steps[K],P=K=>m.margins[m.steps[K]]+m.offsets[K]):i.isLegendInset?(S=K=>v.max.width*m.steps[K]+10,P=K=>m.margins[m.steps[K]]+m.offsets[K]):(S=K=>m.margins[m.steps[K]]+m.offsets[K],P=K=>v.max.height*m.steps[K]);const W={xText:(K,at)=>S(K,at)+4+g.width,xRect:(K,at)=>S(K,at),x1Tile:(K,at)=>S(K,at)-2,x2Tile:(K,at)=>S(K,at)-2+g.width,yText:(K,at)=>P(K,at)+9,yRect:(K,at)=>P(K,at)-5,yTile:(K,at)=>P(K,at)+4};n.generateLegendItem(L,g,X,W),N=o.select(`.${We.legendBackground} rect`),i.isLegendInset&&v.max.width>0&&N.size()===0&&(N=o.insert("g",`.${We.legendItem}`).attr("class",We.legendBackground).append("rect")),a.legend_tooltip&&o.selectAll("title").data(L).text(K=>Wo.bind(n)(K,!1));const H=o.selectAll("text").data(L).text(K=>Wo.bind(n)(K)).each(function(K,at){X(this,K,at)});s(H,w).attr("x",W.xText).attr("y",W.yText);const k=o.selectAll(`rect.${We.legendItemEvent}`).data(L);s(k,w).attr("width",K=>m.widths[K]).attr("height",K=>m.heights[K]).attr("x",W.xRect).attr("y",W.yRect),n.updateLegendItemPos(L,w,W),N&&s(N,w).attr("height",n.getLegendHeight()-12).attr("width",v.max.width*(v.step+1)+10),n.updateLegendItemWidth(v.max.width),n.updateLegendItemHeight(v.max.height),n.updateLegendStep(v.step)},getUpdateLegendPositions(t,e,n){const a=this,{config:i,state:o}=a,s=o.isLegendRight||o.isLegendInset;return function(l,c,f){const g=f===0,v=f===t.length-1,m=a.getLegendItemTextBox(c,l),S=m.width+e.tileWidth+(v&&!s?0:e.padding.right)+i.legend_padding,P=m.height+e.padding.top,N=s?P:S,L=s?a.getLegendHeight():a.getLegendWidth();let w;const X=function(H,k){k||(w=(L-e.totalLength-N)/2,w=e.max.width)&&(e.max.width=S),(!e.max.height||P>=e.max.height)&&(e.max.height=P);const W=s?e.max.height:e.max.width;i.legend_equally?(Object.keys(n.widths).forEach(H=>n.widths[H]=e.max.width),Object.keys(n.heights).forEach(H=>n.heights[H]=e.max.height),w=(L-W*t.length)/2,wX(H))):X(c,!0)):X(c)}},generateLegendItem(t,e,n,a){const i=this,{config:o,state:s,$el:{legend:l}}=i,c=o.legend_usePoint,f=o.legend_item_tile_r,g=o.legend_item_tile_type,v=g!=="circle",m=s.isLegendRight||s.isLegendInset,S=-200,P=l.selectAll(`.${We.legendItem}`).data(t).enter().append("g");if(i.setLegendItem(P),o.legend_tooltip&&P.append("title").text(N=>N),P.append("text").text(N=>Wo.bind(i)(N)).each(function(N,L){n(this,N,L)}).style("pointer-events",i.getStylePropValue("none")).attr("x",m?a.xText:S).attr("y",m?S:a.yText),P.append("rect").attr("class",We.legendItemEvent).style("fill-opacity",i.getStylePropValue("0")).attr("x",m?a.xRect:S).attr("y",m?S:a.yRect),c){const N=[];P.append(L=>{const w=cn(o.point_pattern)?o.point_pattern:[o.point_type];N.indexOf(L)===-1&&N.push(L);let X=w[N.indexOf(L)%w.length];return X==="rectangle"&&(X="rect"),gn.createElementNS(ae.svg,"hasValidPointType"in i&&i.hasValidPointType(X)?X:"use")}).attr("class",We.legendItemPoint).style("fill",Ii.bind(i)).style("pointer-events",i.getStylePropValue("none")).attr("href",(L,w,X)=>{const H=X[w].nodeName.toLowerCase(),k=i.getTargetSelectorSuffix(L);return H==="use"?`#${s.datetimeId}-point${k}`:void 0})}else P.append(v?"line":g).attr("class",We.legendItemTile).style("stroke",Ii.bind(i)).style("pointer-events",i.getStylePropValue("none")).call(N=>{g==="circle"?N.attr("r",f).style("fill",Ii.bind(i)).attr("cx",m?a.x2Tile:S).attr("cy",m?S:a.yTile):v&&N.attr("stroke-width",e.height).attr("x1",m?a.x1Tile:S).attr("y1",m?S:a.yTile).attr("x2",m?a.x2Tile:S).attr("y2",m?S:a.yTile)})},updateLegendItemPos(t,e,n){const a=this,{config:i,$el:{legend:o},$T:s}=a,l=i.legend_usePoint,c=i.legend_item_tile_type,f=c!=="circle";if(l){const g=o.selectAll(`.${We.legendItemPoint}`).data(t);s(g,e).each(function(){const v=this.nodeName.toLowerCase(),m=i.point_r;let S="x",P="y",N=2,L=2.5,w=null,X=null,W=null;if(v==="circle"){const H=m*.2;S="cx",P="cy",w=m+H,N=m*2,L=-H}else if(v==="rect"){const H=m*2.5;X=H,W=H,L=3}ot(this).attr(S,H=>n.x1Tile(H)+N).attr(P,H=>n.yTile(H)-L).attr("r",w).attr("width",X).attr("height",W)})}else{const g=o.selectAll(`.${We.legendItemTile}`).data(t);s(g,e).style("stroke",Ii.bind(a)).call(v=>{c==="circle"?v.attr("cx",m=>{const S=n.x2Tile(m);return S-(S-n.x1Tile(m))/2}).attr("cy",n.yTile):f&&v.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},Jv={redraw(t={}){var e,n,a,i;const o=this,{config:s,state:l,$el:c}=o,{main:f,treemap:g}=c;l.redrawing=!0;const v=o.filterTargetsToShow(o.data.targets),{flow:m,initializing:S}=t,P=o.getWithOption(t),N=P.Transition?s.transition_duration:0,L=P.TransitionForExit?N:0,w=P.TransitionForAxis?N:0,X=(e=o.axis)==null?void 0:e.generateTransitions(w);o.updateSizes(S),P.Legend&&s.legend_show?(t.withTransition=!!N,!g&&o.updateLegend(o.mapToIds(o.data.targets),t,X)):P.Dimension&&o.updateDimension(!0),s.data_empty_label_text&&f.select(`text.${On.text}.${Se.empty}`).attr("x",l.width/2).attr("y",l.height/2).text(s.data_empty_label_text).style("display",v.length?"none":null),l.hasAxis?(o.axis.redrawAxis(v,P,X,m,S),o.hasGrid()&&o.updateGrid(),s.regions.length&&o.updateRegion(),["bar","candlestick","line","area"].forEach(W=>{const H=Cn(W);(/^(line|area)$/.test(W)&&o.hasTypeOf(H)||o.hasType(W))&&o[`update${H}`](P.TransitionForExit)}),c.text&&f.selectAll(`.${tn.selectedCircles}`).filter(o.isBarType.bind(o)).selectAll("circle").remove(),s.interaction_enabled&&!m&&P.EventRect&&(o.redrawEventRect(),(n=o.bindZoomEvent)==null||n.call(o))):(c.arcs&&o.redrawArc(N,L,P.Transform),c.radar&&o.redrawRadar(),c.polar&&o.redrawPolar(),c.funnel&&o.redrawFunnel(),g&&o.updateTreemap(L)),!l.resizing&&!g&&(o.hasPointType()||l.hasRadar)?o.updateCircle():(a=o.hasLegendDefsPoint)!=null&&a.call(o)&&o.data.targets.forEach(o.point("create",this)),o.hasDataLabel()&&!o.hasArcType(null,["radar"])&&o.updateText(),(i=o.redrawTitle)==null||i.call(o),S&&o.updateTypesElements(),o.generateRedrawList(v,m,N,P.Subchart),o.updateTooltipOnRedraw(),o.callPluginHook("$redraw",t,N)},generateRedrawList(t,e,n,a){const i=this,{config:o,state:s}=i,l=i.getDrawShape();s.hasAxis&&o.subchart_show&&i.redrawSubchart(a,n,l);const c=e&&i.generateFlow({targets:t,flow:e,duration:e.duration,shape:l,xv:i.xv.bind(i)}),f=(n||c)&&Da(),g=i.getRedrawList(l,e,c,f),v=()=>{c&&c(),s.redrawing=!1,_e(o.onrendered,i.api)};if(v)if(f&&g.length){const m=ec();Ml().duration(n).each(()=>{g.reduce((S,P)=>S.concat(P),[]).forEach(S=>m.add(S))}).call(m,v)}else s.transiting||v();i.mapToIds(i.data.targets).forEach(m=>{s.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,a){const i=this,{config:o,state:{hasAxis:s,hasRadar:l,hasTreemap:c},$el:{grid:f}}=i,{cx:g,cy:v,xForText:m,yForText:S}=t.pos,P=[];return s&&((o.grid_x_lines.length||o.grid_y_lines.length)&&P.push(i.redrawGrid(a)),o.regions.length&&P.push(i.redrawRegion(a)),Object.keys(t.type).forEach(N=>{const L=Cn(N),w=t.type[N];(/^(area|line)$/.test(N)&&i.hasTypeOf(L)||i.hasType(N))&&P.push(i[`redraw${L}`](w,a))}),!e&&f.main&&P.push(i.updateGridFocus())),(!i.hasArcType()||l)&&cn(o.data_labels)&&o.data_labels!==!1&&P.push(i.redrawText(m,S,e,a)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&P.push(i.redrawCircle(g,v,a,n)),c&&P.push(i.redrawTreemap(a)),P},updateAndRedraw(t={}){const e=this,{config:n,state:a}=e;let i;t.withTransition=$r(t,"withTransition",!0),t.withTransform=$r(t,"withTransform",!1),t.withLegend=$r(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=$r(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(a.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t,i)}};const Qv=Math.sqrt(50),kv=Math.sqrt(10),qv=Math.sqrt(2);function Oi(t,e,n){const a=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(a)),o=a/Math.pow(10,i),s=o>=Qv?10:o>=kv?5:o>=qv?2:1;let l,c,f;return i<0?(f=Math.pow(10,-i)/s,l=Math.round(t*f),c=Math.round(e*f),l/fe&&--c,f=-f):(f=Math.pow(10,i)*s,l=Math.round(t/f),c=Math.round(e/f),l*fe&&--c),c0))return[];if(t===e)return[t];const a=e=i))return[];const l=o-i+1,c=new Array(l);if(a)if(s<0)for(let f=0;fe?1:t>=e?0:NaN}function _v(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Qo(t){let e,n,a;t.length!==2?(e=Ci,n=(l,c)=>Ci(t(l),c),a=(l,c)=>t(l)-c):(e=t===Ci||t===_v?t:tp,n=t,a=t);function i(l,c,f=0,g=l.length){if(f>>1;n(l[v],c)<0?f=v+1:g=v}while(f>>1;n(l[v],c)<=0?f=v+1:g=v}while(ff&&a(l[v-1],c)>-a(l[v],c)?v-1:v}return{left:i,center:s,right:o}}function tp(){return 0}function ep(t){return t===null?NaN:+t}function*h1(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(a=+a)>=a&&(yield a)}}const yc=Qo(Ci),np=yc.right,g1=yc.left,v1=Qo(ep).center;var rp=np;function ap(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function ip(t){return function(){return t}}function op(t){return+t}var xc=[0,1];function aa(t){return t}function ko(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:ip(isNaN(e)?NaN:.5)}function sp(t,e){var n;return t>e&&(n=t,t=e,e=n),function(a){return Math.max(t,Math.min(e,a))}}function lp(t,e,n){var a=t[0],i=t[1],o=e[0],s=e[1];return i2?cp:lp,c=f=null,v}function v(m){return m==null||isNaN(m=+m)?o:(c||(c=l(t.map(a),e,n)))(a(s(m)))}return v.invert=function(m){return s(i((f||(f=l(e,t.map(a),Qn)))(m)))},v.domain=function(m){return arguments.length?(t=Array.from(m,op),g()):t.slice()},v.range=function(m){return arguments.length?(e=Array.from(m),g()):e.slice()},v.rangeRound=function(m){return e=Array.from(m),n=ap,g()},v.clamp=function(m){return arguments.length?(s=m?!0:aa,g()):s!==aa},v.interpolate=function(m){return arguments.length?(n=m,g()):n},v.unknown=function(m){return arguments.length?(o=m,v):o},function(m,S){return a=m,i=S,g()}}function Tc(){return qo()(aa,aa)}var up=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Na(t){if(!(e=up.exec(t)))throw new Error("invalid format: "+t);var e;return new _o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Na.prototype=_o.prototype;function _o(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}_o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fp(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function wi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,a=t.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+t.slice(n+1)]}function ia(t){return t=wi(Math.abs(t)),t?t[1]:NaN}function dp(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ia(e)/3)))*3-ia(Math.abs(t)))}function hp(t,e){return function(n,a){for(var i=n.length,o=[],s=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>a&&(l=Math.max(1,a-c)),o.push(n.substring(i-=l,i+l)),!((c+=l+1)>a));)l=t[s=(s+1)%t.length];return o.reverse().join(e)}}function gp(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function vp(t){t:for(var e=t.length,n=1,a=-1,i;n0&&(a=0);break}return a>0?t.slice(0,a)+t.slice(i+1):t}var $c;function pp(t,e){var n=wi(t,e);if(!n)return t+"";var a=n[0],i=n[1],o=i-($c=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=a.length;return o===s?a:o>s?a+new Array(o-s+1).join("0"):o>0?a.slice(0,o)+"."+a.slice(o):"0."+new Array(1-o).join("0")+wi(t,Math.max(0,e+o-1))[0]}function Sc(t,e){var n=wi(t,e);if(!n)return t+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}var Ac={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:fp,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Sc(t*100,e),r:Sc,s:pp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ec(t){return t}var bc=Array.prototype.map,Rc=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function mp(t){var e=t.grouping===void 0||t.thousands===void 0?Ec:hp(bc.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",a=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Ec:gp(bc.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function f(v){v=Na(v);var m=v.fill,S=v.align,P=v.sign,N=v.symbol,L=v.zero,w=v.width,X=v.comma,W=v.precision,H=v.trim,k=v.type;k==="n"?(X=!0,k="g"):Ac[k]||(W===void 0&&(W=12),H=!0,k="g"),(L||m==="0"&&S==="=")&&(L=!0,m="0",S="=");var K=N==="$"?n:N==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",at=N==="$"?a:/[%p]/.test(k)?s:"",ht=Ac[k],$t=/[defgprs%]/.test(k);W=W===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,W)):Math.max(0,Math.min(20,W));function dt(st){var Vt=K,vt=at,Q,St,ct;if(k==="c")vt=ht(st)+vt,st="";else{st=+st;var At=st<0||1/st<0;if(st=isNaN(st)?c:ht(Math.abs(st),W),H&&(st=vp(st)),At&&+st==0&&P!=="+"&&(At=!1),Vt=(At?P==="("?P:l:P==="-"||P==="("?"":P)+Vt,vt=(k==="s"?Rc[8+$c/3]:"")+vt+(At&&P==="("?")":""),$t){for(Q=-1,St=st.length;++Qct||ct>57){vt=(ct===46?i+st.slice(Q+1):st.slice(Q))+vt,st=st.slice(0,Q);break}}}X&&!L&&(st=e(st,1/0));var Gt=Vt.length+st.length+vt.length,Bt=Gt>1)+Vt+st+vt+Bt.slice(Gt);break;default:st=Bt+Vt+st+vt;break}return o(st)}return dt.toString=function(){return v+""},dt}function g(v,m){var S=f((v=Na(v),v.type="f",v)),P=Math.max(-8,Math.min(8,Math.floor(ia(m)/3)))*3,N=Math.pow(10,-P),L=Rc[8+P/3];return function(w){return S(N*w)+L}}return{format:f,formatPrefix:g}}var Mi,ts,Ic;yp({thousands:",",grouping:[3],currency:["$",""]});function yp(t){return Mi=mp(t),ts=Mi.format,Ic=Mi.formatPrefix,Mi}function xp(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ia(e)-ia(t))+1}function Tp(t){return Math.max(0,-ia(Math.abs(t)))}function $p(t,e,n,a){var i=Jo(t,e,n),o;switch(a=Na(a==null?",f":a),a.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return a.precision==null&&!isNaN(o=dp(i,s))&&(a.precision=o),Ic(a,s)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(o=xp(i,Math.max(Math.abs(t),Math.abs(e))))&&(a.precision=o-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(o=Tp(i))&&(a.precision=o-(a.type==="%")*2);break}}return ts(a)}function Oc(t){var e=t.domain;return t.ticks=function(n){var a=e();return Ko(a[0],a[a.length-1],n==null?10:n)},t.tickFormat=function(n,a){var i=e();return $p(i[0],i[i.length-1],n==null?10:n,a)},t.nice=function(n){n==null&&(n=10);var a=e(),i=0,o=a.length-1,s=a[i],l=a[o],c,f,g=10;for(l0;){if(f=Zo(s,l,n),f===c)return a[i]=s,a[o]=l,e(a);if(f>0)s=Math.floor(s/f)*f,l=Math.ceil(l/f)*f;else if(f<0)s=Math.ceil(s*f)/f,l=Math.floor(l*f)/f;else break;c=f}return t},t}function Di(){var t=Tc();return t.copy=function(){return Pi(t,Di())},ra.apply(t,arguments),Oc(t)}function Cc(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Pc(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Sp(t){var e=1,n=t(Cc(e),Pc(e));return n.constant=function(a){return arguments.length?t(Cc(e=+a),Pc(e)):e},Oc(n)}function wc(){var t=Sp(qo());return t.copy=function(){return Pi(t,wc()).constant(t.constant())},ra.apply(t,arguments)}function Mc(t,e){t=t.slice();var n=0,a=t.length-1,i=t[n],o=t[a],s;return oMath.pow(t,e)}function Ip(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Nc(t){return(e,n)=>-t(-e,n)}function Op(t){const e=t(Dc,Lc),n=e.domain;let a=10,i,o;function s(){return i=Ip(a),o=Rp(a),n()[0]<0?(i=Nc(i),o=Nc(o),t(Ap,Ep)):t(Dc,Lc),e}return e.base=function(l){return arguments.length?(a=+l,s()):a},e.domain=function(l){return arguments.length?(n(l),s()):n()},e.ticks=l=>{const c=n();let f=c[0],g=c[c.length-1];const v=g0){for(;m<=S;++m)for(P=1;Pg)break;w.push(N)}}else for(;m<=S;++m)for(P=a-1;P>=1;--P)if(N=m>0?P/o(-m):P*o(m),!(Ng)break;w.push(N)}w.length*2{if(l==null&&(l=10),c==null&&(c=a===10?"s":","),typeof c!="function"&&(!(a%1)&&(c=Na(c)).precision==null&&(c.trim=!0),c=ts(c)),l===1/0)return c;const f=Math.max(1,a*l/e.ticks().length);return g=>{let v=g/o(Math.round(i(g)));return v*an(Mc(n(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),e}function Fc(){const t=Op(qo()).domain([1,10]);return t.copy=()=>Pi(t,Fc()).base(t.base()),ra.apply(t,arguments),t}const Li=en(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Li.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?en(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Li);const p1=Li.range,Ur=en(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Gn)},(t,e)=>(e-t)/Gn,t=>t.getUTCSeconds()),m1=Ur.range,es=en(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Gn)},(t,e)=>{t.setTime(+t+e*In)},(t,e)=>(e-t)/In,t=>t.getMinutes()),y1=es.range,ns=en(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*In)},(t,e)=>(e-t)/In,t=>t.getUTCMinutes()),x1=ns.range,rs=en(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Gn-t.getMinutes()*In)},(t,e)=>{t.setTime(+t+e*Bn)},(t,e)=>(e-t)/Bn,t=>t.getHours()),T1=rs.range,as=en(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Bn)},(t,e)=>(e-t)/Bn,t=>t.getUTCHours()),$1=as.range,is=en(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),S1=is.range,os=en(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),A1=os.range;function Bc(t,e,n,a,i,o){const s=[[Ur,1,Gn],[Ur,5,5*Gn],[Ur,15,15*Gn],[Ur,30,30*Gn],[o,1,In],[o,5,5*In],[o,15,15*In],[o,30,30*In],[i,1,Bn],[i,3,3*Bn],[i,6,6*Bn],[i,12,12*Bn],[a,1,or],[a,2,2*or],[n,1,to],[e,1,Ps],[e,3,3*Ps],[t,1,eo]];function l(f,g,v){const m=gL).right(s,m);if(S===s.length)return t.every(Jo(f/eo,g/eo,v));if(S===0)return Li.every(Math.max(Jo(f,g,v),1));const[P,N]=s[m/s[S-1][2]n.axis.x.tickOffset()),i=n.config.axis_x_inverted,o=function(s){return t(s)+a()};for(const s in t)o[s]=t[s];return o.orgDomain=()=>t.domain(),o.orgScale=()=>t,n.axis.isCategorized()&&(o.domain=function(s){let l=s;return arguments.length?(t.domain(l),o):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),o},updateScales(t,e=!0){var n,a;const i=this,{axis:o,config:s,format:l,org:c,scale:f,state:{current:g,width:v,height:m,width2:S,height2:P,hasAxis:N,hasTreemap:L}}=i;if(N){const w=s.axis_rotated,X=i.getResettedPadding(1),W={x:w?X:0,y:w?0:m,subX:w?1:0,subY:w?0:P},H={x:w?m:v,y:w?v:X,subX:w?m:v,subY:w?S:1},k=e&&((n=f.x)==null?void 0:n.orgDomain()),K=e&&c.xDomain;f.x=i.getXScale(W.x,H.x,k,()=>o.x.tickOffset()),f.subX=i.getXScale(W.x,H.x,K,at=>{var ht;return at%1?0:((ht=o.subX)!=null?ht:o.x).tickOffset()}),l.xAxisTick=o.getXAxisTickFormat(),l.subXAxisTick=o.getXAxisTickFormat(!0),o.setAxis("x",f.x,s.axis_x_tick_outer,t),s.subchart_show&&o.setAxis("subX",f.subX,s.axis_x_tick_outer,t),f.y=i.getYScale("y",W.y,H.y,f.y?f.y.domain():s.axis_y_default),f.subY=i.getYScale("y",W.subY,H.subY,f.subY?f.subY.domain():s.axis_y_default),o.setAxis("y",f.y,s.axis_y_tick_outer,t),s.axis_y2_show&&(f.y2=i.getYScale("y2",W.y,H.y,f.y2?f.y2.domain():s.axis_y2_default),f.subY2=i.getYScale("y2",W.subY,H.subY,f.subY2?f.subY2.domain():s.axis_y2_default),o.setAxis("y2",f.y2,s.axis_y2_tick_outer,t))}else if(L){const w=i.getCurrentPadding();f.x=Di().rangeRound([w.left,g.width-w.right]),f.y=Di().rangeRound([w.top,g.height-w.bottom])}else(a=i.updateArc)==null||a.call(i)},xx(t){const e=this,{config:n,scale:{x:a,zoom:i}}=e,o=n.zoom_enabled&&i?i:a;return t?o(De(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:a,scale:{x:i,zoom:o}}=e,s=a.zoom_enabled&&o?o:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Yn.call(e,l):n.isCategorized()&&ze(l)&&(l=a.axis_x_categories.indexOf(l)),s(l)},yv(t){const e=this,{scale:{y:n,y2:a}}=e;return(t.axis&&t.axis==="y2"?a:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}},Up={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentWidth()},getCurrentHeight(){const t=this,{config:e}=t,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Cn(t)}`;let n=this.$el.chart.node(),a=0;for(;a<30&&n&&n.tagName!=="BODY";){try{a=n.getBoundingClientRect()[t]}catch(o){e in n&&(a=n[e])}n=n.parentNode}const i=gn.body[e];return a>i&&(a=i),a},getParentWidth(){return this.getParentRectValue("width")},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){const e=this,{config:n,state:{hasAxis:a},$el:i}=e,o=n.axis_rotated,s=o||!o&&!n.axis_y_inner,l=o?Tn.axisX:Tn.axisY,c=i.main.select(`.${l}`).node(),f=a&&n[`axis_${o?"x":"y"}_label`];let g=0;if(a&&(ze(f)||ze(f.text)||/^inner-/.test(f==null?void 0:f.position))){const N=i.main.select(`.${l}-label`);N.empty()||(g=N.node().getBoundingClientRect().left)}const v=c&&s?c.getBoundingClientRect():{right:0},m=i.chart.node().getBoundingClientRect().left+g,S=e.hasArcType(),P=v.right-m-(S?0:e.getCurrentPaddingByDirection("left",t));return P>0?P:0},updateDimension(t){var e;const n=this,{config:a,state:{hasAxis:i},$el:o}=n;i&&!t&&n.axis.x&&a.axis_rotated&&((e=n.axis.subX)==null||e.create(o.axis.subX)),n.updateScales(t),n.updateSvgSize(),n.transformAll(!1)},updateSvgSize(){const t=this,{config:e,state:{clip:n,current:a,hasAxis:i,width:o,height:s},$el:{svg:l}}=t;if(e.resize_auto==="viewBox"?l.attr("viewBox",`0 0 ${a.width} ${a.height}`):l.attr("width",a.width).attr("height",a.height),i){const c=l.select(`.${ks.brush} .overlay`),f={width:0,height:0};c.size()&&(f.width=+c.attr("width"),f.height=+c.attr("height")),l.selectAll([`#${n.id}`,`#${n.idGrid}`]).select("rect").attr("width",o).attr("height",s),l.select(`#${n.idXAxis}`).select("rect").call(t.setXAxisClipPath.bind(t)),l.select(`#${n.idYAxis}`).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&l.select(`#${n.idSubchart}`).select("rect").attr("width",o).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var a;const i=this,{config:o,$el:s,state:{hasAxis:l}}=i,c=o.axis_rotated,f=((a=o.padding)==null?void 0:a.mode)==="fit",g=he(o[`padding_${t}`])?o[`padding_${t}`]:void 0,v=l?{top:c?"y2":null,bottom:c?"y":"x",left:c?"x":"y",right:c?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=v&&o[`axis_${v}_inner`],P=v&&o[`axis_${v}_show`],N=v?o[`axis_${v}_axes`].length:0;let L=v?m?i.getAxisWidthByAxisId(v,e):i.getHorizontalAxisHeight(v):0;const w=20;let X=0;!f&&m&&(L=Jg(L));let W=l&&m&&(S||ln(g)&&!P)?0:f?(P?L:0)+(g!=null?g:0):ln(g)?L:g;return m&&l?(v&&(f||S)&&o[`axis_${v}_label`].text&&(W+=i.axis.getAxisLabelPosition(v).isOuter?w:0),t==="right"?(W+=c?!f&&ln(g)?10:2:!P||S?f?2:1:0,W+=n?i.axis.getXAxisTickTextY2Overflow(w):0):t==="left"&&c&&ln(g)&&(W=o.axis_x_show?f?L:Math.max(L,40):1)):t==="top"?(s.title&&s.title.node()&&(W+=i.getTitlePadding()),X=c&&!S?N:0):t==="bottom"&&l&&c&&!P&&(W+=1),W+L*N-X},getCurrentPadding(t=!1){const e=this,[n,a,i,o]=["top","bottom","left","right"].map(s=>e.getCurrentPaddingByDirection(s,null,t));return{top:n,bottom:a,left:i,right:o}},getResettedPadding(t){const e=this,{config:n}=e,a=he(t);let i=a?0:{};return n.padding===!1?!a&&Object.keys(t).forEach(o=>{i[o]=!qn(n.data_labels)&&n.data_labels!==!1&&o==="top"?t[o]:0}):i=t,i},updateSizes(t){var e,n,a,i,o;const s=this,{config:l,state:c,$el:{legend:f}}=s,g=l.axis_rotated,v=s.hasArcType()||c.hasFunnel||c.hasTreemap,m=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&s.setContainerSize();const S={width:f?s.getLegendWidth():0,height:f?s.getLegendHeight():0};!v&&l.axis_x_show&&l.axis_x_tick_autorotate&&s.updateXAxisTickClip();const P={right:l.legend_show&&c.isLegendRight?s.getLegendWidth()+(m?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S.height},N=g||v?0:s.getHorizontalAxisHeight("x"),L=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?N:30,w=l.subchart_show&&!v?l.subchart_size_height+L:0,X=s.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,W=s.getCurrentPadding(!0);if(c.margin=!v&&g?{top:W.top,right:v?0:W.right+P.right,bottom:P.bottom+W.bottom,left:w+(v?0:W.left)}:{top:(m?0:4)+W.top,right:v?0:W.right+P.right,bottom:X+w+P.bottom+W.bottom,left:v?0:W.left},c.margin=s.getResettedPadding(c.margin),c.margin2=g?{top:c.margin.top,right:NaN,bottom:20+P.bottom,left:s.state.rotatedPadding.left}:{top:c.current.height-w-P.bottom,right:NaN,bottom:L+P.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=s.updateSizeForLegend)==null||n.call(s,S),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=g?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=g?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),s.hasArcType()){const H=s.hasType("gauge"),k=l.legend_show&&c.isLegendRight,K=(a=c.hasRadar&&s.cache.get(Ln.radarTextWidth))!=null?a:0;c.arcWidth=c.width-(k?S.width+10:0)-K,c.arcHeight=c.height-(k&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-s.getPaddingBottomForGauge()),(o=s.updateRadius)==null||o.call(s)}c.isLegendRight&&v&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},zp={setCssRule(t,e,n,a){const i=this,{config:o,state:{cssRule:s,style:l}}=i;return o.boost_useCssRule?c=>{c.each(f=>{const g=a&&(a==null?void 0:a.call(i,f)),v=`${t?`.${sn.shapes+i.getTargetSelectorSuffix(f.id)}`:""}${e}`;e in s&&l.sheet.deleteRule(s[v]),i.state.cssRule[v]=_g(l,v,n.filter(Boolean).map(m=>ze(g)&&m.indexOf(":")===-1?`${m}: ${g}`:m||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ve(t)?t.bind(this):t}};function Uc(t){return typeof t=="string"?new Ie([document.querySelectorAll(t)],[document.documentElement]):new Ie([T(t)],_t)}function jp(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function Vp(t,e,n,a,i){var o;const s=this,{value:l}=t,c=s.isCandlestickType(t),f=he(l)&&l<0||c&&!((o=s.getCandlestickData(t))!=null&&o._isUp);let{x:g,y:v}=e;const m=4,S=m*2;return a?n==="start"?(g+=f?0:S,v+=m):n==="middle"?(g+=S,v-=S):n==="end"&&(f&&(g-=S),v+=m):(n==="start"?(g+=m,f&&(v+=S*2)):n==="middle"?v-=S:n==="end"&&(g-=m,f&&(v+=S*2)),i&&(v+=f?-17:c?13:7)),{x:g,y:v}}function zc(t,e){var n;const a=this.config.data_labels_position,{id:i,index:o,value:s}=t;return(n=ve(a)?a.bind(this.api)(e,s,i,o,this.$el.text):(i in a?a[i]:a)[e])!=null?n:0}var Gp={opacityForText(t){const e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${Se.chart}`).append("g").attr("class",On.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),a=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${On.chartTexts}`).selectAll(`.${On.chartText}`).data(t).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${On.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",a)},updateText(){const t=this,{$el:e,$T:n,config:a,axis:i}=t,o=t.getClass("text","index"),s=a.data_labels.centered,l=e.main.selectAll(`.${On.texts}`).selectAll(`.${On.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",o).attr("text-anchor",c=>{let g=a[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const v=t.getCandlestickData(c);g=!(v!=null&&v._isUp)}else if(t.isTreemapType(c))return s?"middle":"start";return a.axis_rotated?g?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,f,g){const v=ot(this);let{value:m}=c;if(t.isBubbleZType(c))m=t.getBubbleZData(m,"z");else if(t.isCandlestickType(c)){const S=t.getCandlestickData(c);S&&(m=S.close)}m=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(v):t.dataLabelFormat(c.id)(m,c.id,c.index,g),he(m)?this.textContent=m:wa(v,m)})},updateTextColor(t){const e=this,{config:n}=e,a=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(ze(a))o=a;else if(Be(a)){const{id:s}=t.data||t;o=a[s]}else ve(a)&&(o=a.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ve(a)){const s=e.getCandlestickData(t);if(!(s!=null&&s._isUp)){const l=n.candlestick_color_down;o=Be(l)?l[t.id]:l}}return o||i},updateTextBGColor(t,e){const n=this,{$el:a}=n;let i="";if(ze(e)||Be(e)){const o=ze(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=a.defs.select(["filter[id*='labels-bg","']"].join(o));s.size()&&(i=`url(#${s.attr("id")})`)}return i||null},redrawText(t,e,n,a){const i=this,{$T:o,axis:s,config:l,state:{hasTreemap:c}}=i,f=gr(!0),g=l.axis_rotated,v=l.data_labels.rotate,m=jp(v),S=v?`rotate(${v})`:"";return i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",P=>i.updateTextBGColor.bind(i)(P,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)).each(function(P,N){const L=o(c&&this.childElementCount?this.parentNode:this,!!(a&&this.getAttribute("x")),f),w=l[`axis_${s==null?void 0:s.getId(P.id)}_inverted`];let X={x:t.bind(this)(P,N),y:e.bind(this)(P,N)};v&&(X=Vp.bind(i)(P,X,m,g,w),L.attr("text-anchor",m)),this.childElementCount||v?L.attr("transform",`translate(${X.x} ${X.y}) ${S}`):L.attr("x",X.x).attr("y",X.y)}),!0},getTextRect(t,e){const n=this;let a=t.node?t.node():t;/text/i.test(a.tagName)||(a=a.querySelector("text"));const i=a.textContent,o=`${Ln.textRect}-${i.replace(/\W/g,"_")}`;let s=n.cache.get(o);return s||(n.$el.svg.append("text").style("visibility","hidden").style("font",ot(a).style("font")).classed(e,!0).text(i).call(l=>{s=Ma(l.node())}).remove(),n.cache.add(o,s)),s},generateXYForText(t,e){const n=this,{state:{hasRadar:a,hasFunnel:i,hasTreemap:o}}=n,s=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&s.push("funnel"),a&&s.push("radar"),o&&s.push("treemap"),s.forEach(f=>{l[f]=n[`generateGet${Cn(f)}Points`](t[f],!1)}),function(f,g){const v=n.isAreaType(f)&&"area"||n.isBarType(f)&&"bar"||n.isCandlestickType(f)&&"candlestick"||n.isFunnelType(f)&&"funnel"||n.isRadarType(f)&&"radar"||n.isTreemapType(f)&&"treemap"||"line";return c.call(n,l[v](f,g),f,this)}},getCenteredTextPos(t,e,n,a){const i=this,{config:o}=i,s=o.axis_rotated,l=i.isBarType(t),c=i.isTreemapType(t);if(o.data_labels.centered&&(l||c)){const f=Ma(n);if(l){const g=i.getRangedData(t,null,"bar")>=0;if(s){const v=(g?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return g?-v-3:v+2}else{const v=(g?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return g?v:-v-2}}else if(c)return a==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+f.height/2}return 0},getXForText(t,e,n){var a;const i=this,{config:o}=i,s=o.axis_rotated,l=i.isFunnelType(e),c=i.isTreemapType(e);let f=t?t[0][0]:0;if(i.isCandlestickType(e))s?f=(a=i.getCandlestickData(e))!=null&&a._isUp?t[2][2]+4:t[2][1]-4:f+=(t[1][0]-f)/2;else if(l)f+=i.state.current.width/2;else if(c)f+=o.data_labels.centered?0:5;else if(s){const g=o[`axis_${i.axis.getId(e.id)}_inverted`],v=i.isBarType(e)?4:6,m=e.value;f=t[2][1],g?f-=v*(m>0?1:-1):f+=v*(m<0?-1:1)}else f=i.hasType("bar")?(t[2][0]+t[0][0])/2:f;return(s||c)&&(f+=i.getCenteredTextPos(e,t,n,"x")),f+zc.call(this,e,"x")},getYForText(t,e,n){const a=this,{axis:i,config:o,state:s}=a,l=o.axis_rotated,c=o[`axis_${i==null?void 0:i.getId(e.id)}_inverted`],f=a.isBarType(e),g=a.isFunnelType(e),v=a.isTreemapType(e),m=o.point_r,S=Ma(n);let{value:P}=e,N=3,L;if(a.isCandlestickType(e))P=a.getCandlestickData(e),l?(L=t[0][0],L+=(t[1][0]-L)/2+N):(L=P&&P._isUp?t[2][2]-N:t[2][1]+N*4,c&&(L+=15*(P._isUp?1:-1)));else if(g)L=t?t[0][1]+(t[1][1]-t[0][1])/2+S.height/2-3:0;else if(v)L=t[0][1]+(o.data_labels.centered?0:S.height+5);else if(l)L=(t[0][0]+t[2][0]+S.height*.6)/2;else if(L=t[2][1],he(m)&&m>5&&(a.isLineType(e)||a.isScatterType(e))&&(N+=o.point_r/2.3),P<0||P===0&&!s.hasPositiveValue&&s.hasNegativeValue)L+=c?f?-3:-5:S.height+(f?-N:N);else{let w=-N*2;f?w=-N:a.isBubbleType(e)&&(w=N),c&&(w=f?10:15),L+=w}return(!l||v)&&(L+=a.getCenteredTextPos(e,t,n,"y")),L+zc.call(this,e,"y")},markOverlapped(t,e,n){const a=e.$el.arcs.selectAll(n),i=a.filter(c=>c.data.id!==t),o=a.filter(c=>c.data.id===t),s=Jl(o.node()),l=(c,f)=>Math.sqrt(Math.pow(c,2)+Math.pow(f,2));o.node()&&i.each(function(){const c=Jl(this),f=ot(this),g=l(s.e,s.f)>l(c.e,c.f)?o:f,v=Math.ceil(Math.abs(s.e-c.e))=i}};function jc(t="left",e){const n=he(e);let a;return t.indexOf("center")>-1?a=n?e/2:"middle":t.indexOf("right")>-1?a=n?e:"end":a=n?0:"start",a}var Xp={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const a=n.title.append("text").style("text-anchor",jc(e.title_position)).attr("class",On.title);wa(a,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:a}}=t;if(a){const i=jc(e.title_position,n.width),o=(e.title_padding.top||0)+t.getTextRect(t.$el.title,On.title).height;a.attr("transform",`translate(${i}, ${o})`)}},getTitlePadding(){const t=this,{$el:{title:e},config:n}=t;return(n.title_padding.top||0)+(e?t.getTextRect(e,On.title).height:0)+(n.title_padding.bottom||0)}},Hp={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=ot(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",ei.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:a,state:{hasAxis:i,hasRadar:o}}=e;if(n.tooltip_init_show){const s=!(i||o);(t=e.axis)!=null&&t.isTimeSeries()&&ze(n.tooltip_init_x)&&(n.tooltip_init_x=Yn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[s?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!qn(l)){const{top:c=0,left:f=50}=l;a.tooltip.style("top",ze(c)?c:`${c}px`).style("left",ze(f)?f:`${f}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:a}=e;return ve(a.tooltip_contents)?a.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t)},getTooltipContent(t,e,n,a){var i;const o=this,{api:s,config:l,state:c,$el:f}=o,[g,v,m]=["title","name","value"].map(vt=>{const Q=l[`tooltip_format_${vt}`];return ve(Q)?Q.bind(s):Q}),S=(...vt)=>Po((g||e)(...vt)),P=(...vt)=>Po((v||(Q=>Q))(...vt)),N=(...vt)=>{const Q=m||(c.hasTreemap||o.isStackNormalized()?(St,ct)=>`${(ct*100).toFixed(2)}%`:n);return Po(Q(...vt))},L=l.tooltip_order,w=vt=>o.axis&&o.isBubbleZType(vt)?o.getBubbleZData(vt.value,"z"):o.getBaseValue(vt),X=o.levelColor?vt=>o.levelColor(vt.value):vt=>a(vt),W=l.tooltip_contents,H=W.template,k=o.mapToTargetIds();if(L===null&&l.data_groups.length){const vt=o.orderTargets(o.data.targets).map(Q=>Q.id).reverse();t.sort((Q,St)=>{let ct=Q?Q.value:null,At=St?St.value:null;return ct>0&&At>0&&(ct=Q.id?vt.indexOf(Q.id):null,At=St.id?vt.indexOf(St.id):null),ct-At})}else if(/^(asc|desc)$/.test(L)){const vt=L==="asc";t.sort((Q,St)=>{const ct=Q?w(Q):null,At=St?w(St):null;return vt?ct-At:At-ct})}else ve(L)&&t.sort(L.bind(s));const K=o.getTooltipContentTemplate(H),at=t.length;let ht,$t,dt,st,Vt;for(Vt=0;Vt${vt}`:""})}if(!$t.ratio&&f.arcs&&(dt=["arc",o.$el.arcs.select(`path.${Ve.arc}-${$t.id}`).data()[0]],$t.ratio=o.getRatio(...dt)),dt=[$t.ratio,$t.id,$t.index],o.isAreaRangeType($t)){const[vt,Q]=["high","low"].map(ct=>N(o.getRangedData($t,ct),...dt));st=`Mid: ${N(w($t),...dt)} High: ${vt} Low: ${Q}`}else if(o.isCandlestickType($t)){const[vt,Q,St,ct,At]=["open","high","low","close","volume"].map(Gt=>o.getRangedData($t,Gt,"candlestick")?N(o.getRangedData($t,Gt,"candlestick"),...dt):void 0);st=`Open: ${vt} High: ${Q} Low: ${St} Close: ${ct}${At?` Volume: ${At}`:""}`}else if(o.isBarRangeType($t)){const{value:vt,id:Q,index:St}=$t;st=`${N(vt,void 0,Q,St)}`}else st=N(w($t),...dt);if(st!==void 0){if($t.name===null)continue;const vt=P((i=$t.name)!=null?i:$t.id,...dt),Q=X($t),St={CLASS_TOOLTIP_NAME:ei.tooltipName+o.getTargetSelectorSuffix($t.id),COLOR:H||!o.patterns?Q:``,NAME:vt,VALUE:st};if(H&&Be(W.text)){const ct=k.indexOf($t.id);Object.keys(W.text).forEach(At=>{St[At]=W.text[At][ct]})}ht+=bi(K[1],St)}}return`${ht}`},getTooltipContentTemplate(t){return(t||` - {=TITLE} - {{ - - - }} -
          ${this.patterns?"{=COLOR}":''}{=NAME}{=VALUE}
          `).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition(t,e){var n,a;const i=this,{config:o,scale:s,state:l,$el:{eventRect:c,tooltip:f,svg:g}}=i,{bindto:v}=o.tooltip_contents,m=o.axis_rotated,S=f==null?void 0:f.datum();if(!v&&S){const P=t!=null?t:JSON.parse(S.current),[N,L]=Hn(l.event,e!=null?e:c==null?void 0:c.node()),w={x:N,y:L};if(l.hasAxis&&s.x&&S&&"x"in S){const k=(K=0,at,ht="y")=>{var $t;const dt=s[at?($t=i.axis)==null?void 0:$t.getId(at):ht];return dt?dt(K)+(m?l.margin.left:l.margin.top):0};w.xAxis=s.x(S.x)+(o.tooltip_position?m?l.margin.top:l.margin.left:0),P.length===1?w.yAxis=k(P[0].value,P[0].id):w.yAxis=k}const{width:X=0,height:W=0}=S,H=(a=(n=o.tooltip_position)==null?void 0:n.bind(i.api)(P,X,W,c==null?void 0:c.node(),w))!=null?a:Lo(g)?i.getTooltipPositionViewBox.bind(i)(X,W,w):i.getTooltipPosition.bind(i)(X,W,w);["top","left"].forEach(k=>{const K=H[k];f.style(k,`${K}px`),k==="left"&&!S.xPosInPercent&&(S.xPosInPercent=K/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var a,i;const o=this,{$el:{eventRect:s,svg:l},config:c,state:f}=o,g=c.axis_rotated,v=o.hasArcType()||f.hasFunnel||f.hasTreemap,m=(i=(a=v?l:s)==null?void 0:a.node())!=null?i:f.event.target;let{x:S,y:P}=n;f.hasAxis&&(S=g?S:n.xAxis,P=g?n.xAxis:P);const N=Ai(m,S,P,!1),L=m.getBoundingClientRect(),w=Ai(m,20,0,!1).x;let X=N.y,W=N.x+t/2+w;return v&&(f.hasFunnel||f.hasTreemap||f.hasRadar?(W-=t/2+w,X+=e):(X+=L.height/2,W+=L.width/2-(t-w))),W+t>L.width&&(W=L.width-t-w),X+e>L.height&&(X-=e*2),{top:X,left:W}},getTooltipPosition(t,e,n){var a,i,o;const s=this,{config:l,scale:c,state:f}=s,{width:g,height:v,current:m,hasFunnel:S,hasRadar:P,hasTreemap:N,isLegendRight:L,inputType:w}=f,X=s.hasType("gauge")&&!l.gauge_fullCircle,W=l.axis_rotated,H=s.hasArcType(),k=s.getSvgLeft(!0);let K=k+m.width-s.getCurrentPaddingByDirection("right");const at=20;let{x:ht,y:$t}=n;if(P)ht+=ht>=g/2?15:-(t+15),$t+=15;else if(H){if(w!=="touch"){let Vt=(i=(a=s.getTitlePadding)==null?void 0:a.call(s))!=null?i:0;Vt&&X&&((o=l.arc_rangeText_values)!=null&&o.length)&&(Vt+=10),ht+=(g-(L?s.getLegendWidth():0))/2,$t+=(X?v:v/2+e)+Vt}}else if(S||N)$t+=e;else{const st={top:s.getCurrentPaddingByDirection("top",!0),left:s.getCurrentPaddingByDirection("left",!0)};W?(ht+=k+st.left+at,$t=st.top+n.xAxis+at,K-=k):(ht=k+st.left+at+(c.zoom?ht:n.xAxis),$t+=st.top-5)}if(ht+t+15>K&&(ht-=t+(S||N||H?0:W?at*2:38)),$t+e>m.height){const st=N?e+10:30;$t-=X?e*1.5:e+st}const dt={top:$t,left:ht};return Object.keys(dt).forEach(st=>{dt[st]<0&&(dt[st]=0)}),dt},showTooltip(t,e){const n=this,{config:a,$el:{tooltip:i}}=n,o=t.filter(c=>c&&De(n.getBaseValue(c)));if(!i||o.length===0||!a.tooltip_show)return;let s=i.datum();const l=JSON.stringify(t);if(!s||s.current!==l){const{index:c,x:f}=t.concat().sort()[0];_e(a.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null).datum(s={index:c,x:f,current:l,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),_e(a.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,c)}n.setTooltipPosition(o,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:a}}=t;e.add(()=>{if(a.style("display")==="block"){const{current:i}=n,{width:o,xPosInPercent:s}=a.datum();let l=i.width/100*s;const c=i.width-(l+o);c<0&&(l+=c),a.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:a,config:i,$el:{tooltip:o}}=n;if(o&&o.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const s=JSON.parse((e=o.datum().current)!=null?e:{});_e(i.tooltip_onhide,a,s),o.style("display","none").style("visibility","hidden").datum(null),_e(i.tooltip_onhidden,a,s)}},_handleLinkedCharts(t,e){const n=this,{charts:a,config:i,state:{event:o}}=n;if(o!=null&&o.isTrusted&&i.tooltip_linked&&a.length>1){const s=i.tooltip_linked_name;a.filter(l=>l!==n.api).forEach(l=>{const{config:c,$el:f}=l.internal,g=c.tooltip_linked,v=c.tooltip_linked_name,m=gn.body.contains(f.chart.node());if(g&&s===v&&m){const S=f.tooltip.data()[0],P=e!==(S==null?void 0:S.index);try{l.tooltip[t&&P?"show":"hide"]({index:e})}catch(N){}}})}},updateTooltipOnRedraw(t,e){var n;const a=this,{config:i,$el:{eventRect:o,svg:s,tooltip:l},state:{event:c,hasAxis:f,hasRadar:g,hasTreemap:v}}=a;if((l==null?void 0:l.style("display"))==="block"&&c){const m=t!=null?t:(n=g?s:o)==null?void 0:n.node();if(f||g)if(a.isMultipleX())a.selectRectForMultipleXs(m,!1);else{const S=e!=null?e:a.getDataIndexFromEvent(c);e===-1?a.api.tooltip.hide():(a.selectRectForSingle(m,S),a.setExpand(S,null,!0))}else{const{clientX:S,clientY:P}=c;setTimeout(()=>{let N=[S,P].every(Number.isFinite)&&gn.elementFromPoint(S,P);const L=N&&ot(N).datum();if(L){const w=a.hasArcType()?a.convertToArcData(a.updateAngle(L)):L==null?void 0:L.data;v&&(N=s.node()),w&&a.showTooltip([w],N)}else a.api.tooltip.hide()},i.transition_duration)}}}},Yp={getTranslate(t,e=0){var n;const a=this,{config:i,state:o}=a,s=i.axis_rotated;let l=0,c,f;if(e&&/^(x|y2?)$/.test(t)&&(l=a.getAxisSize(t)*e),t==="main")c=$i(o.margin.left),f=$i(o.margin.top);else if(t==="context")c=$i(o.margin2.left),f=$i(o.margin2.top);else if(t==="legend")c=o.margin3.left,f=o.margin3.top;else if(t==="x")c=s?-l:0,f=s?0:o.height+l;else if(t==="y")c=s?0:-l,f=s?o.height+l:0;else if(t==="y2")c=s?0:o.width+l,f=s?-l-1:0;else if(t==="subX")c=0,f=s?0:o.height2;else if(t==="arc")c=o.arcWidth/2,f=o.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(f+=5+(a.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=o.arcWidth/2,f=o.arcHeight/2;else if(t==="radar"){const[g,v]=a.getRadarSize();c=o.width/2-g,f=o.height/2-v}return`translate(${c}, ${f})`},transformMain(t,e){const n=this,{$el:{main:a},$T:i}=n,o=e!=null&&e.axisX?e.axisX:i(a.select(`.${Tn.axisX}`),t),s=e!=null&&e.axisY?e.axisY:i(a.select(`.${Tn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(a.select(`.${Tn.axisY2}`),t);i(a,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),a.select(`.${Ve.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:a,state:{hasAxis:i,hasFunnel:o,hasTreemap:s},$el:l}=n;!o&&!s&&n.transformMain(t,e),i&&a.subchart_show&&n.transformContext(t,e),l.legend&&n.transformLegend(t)}},Wp={isValidChartType(t){return!!(t&&Object.values(oe).indexOf(t)>-1)},setTargetType(t,e){const n=this,{config:a,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(o=>{i[o]=e===a.data_types[o],a.data_types[o]=e}),t||(a.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(oe).forEach(n=>{const a=oe[n],i=t.hasType(a,null,!0),o=e.types.indexOf(a);o===-1&&i?e.types.push(a):o>-1&&!i&&e.types.splice(o,1)}),t.setChartElements()},hasType(t,e,n=!1){var a;const i=this,{config:o,state:{current:s}}=i,l=o.data_types,c=e||i.data.targets;let f=!1;return!n&&((a=s.types)==null?void 0:a.indexOf(t))>-1?f=!0:c!=null&&c.length?c.forEach(g=>{const v=l[g.id];(v===t||!v&&t==="line")&&(f=!0)}):Object.keys(l).length?Object.keys(l).forEach(g=>{l[g]===t&&(f=!0)}):f=o.data_type===t,f},hasTypeOf(t,e,n=[]){return t in Sr?!Sr[t].filter(a=>n.indexOf(a)===-1).every(a=>!this.hasType(a,e)):!1},isTypeOf(t,e){var n;const a=ze(t)?t:t.id,i=this.config&&(((n=this.config.data_types)==null?void 0:n[a])||this.config.data_type);return je(e)?e.indexOf(i)>=0:i===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=ze(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Sr.Line)},isStepType(t){return this.isTypeOf(t,Sr.Step)},isSplineType(t){return this.isTypeOf(t,Sr.Spline)},isAreaType(t){return this.isTypeOf(t,Sr.Area)},isAreaRangeType(t){return this.isTypeOf(t,Sr.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;let a=!1;return(t==null?void 0:t.tagName)==="circle"?a=!0:a=e.point_type==="circle"&&(!n||je(n)&&n.length===0),a},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>he(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}};function Ni(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Fi(t){this._context=t}Fi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ni(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ni(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Kp(t){return new Fi(t)}function Ar(){}function Vc(t){this._context=t}Vc.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ni(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Zp(t){return new Vc(t)}function Gc(t){this._context=t}Gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,a=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:Ni(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Jp(t){return new Gc(t)}function Xc(t,e){this._basis=new Fi(t),this._beta=e}Xc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var a=t[0],i=e[0],o=t[n]-a,s=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(a+c*o),this._beta*e[l]+(1-this._beta)*(i+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Qp=function t(e){function n(a){return e===1?new Fi(a):new Xc(a,e)}return n.beta=function(a){return t(+a)},n}(.85);function Bi(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ls(t,e){this._context=t,this._k=(1-e)/6}ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Bi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kp=function t(e){function n(a){return new ls(a,e)}return n.tension=function(a){return t(+a)},n}(0);function cs(t,e){this._context=t,this._k=(1-e)/6}cs.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Bi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var qp=function t(e){function n(a){return new cs(a,e)}return n.tension=function(a){return t(+a)},n}(0);function us(t,e){this._context=t,this._k=(1-e)/6}us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _p=function t(e){function n(a){return new us(a,e)}return n.tension=function(a){return t(+a)},n}(0);const Hc=Math.abs,En=Math.atan2,jr=Math.cos,tm=Math.max,fs=Math.min,rr=Math.sin,oa=Math.sqrt,bn=1e-12,Fa=Math.PI,Ui=Fa/2,zi=2*Fa;function em(t){return t>1?0:t<-1?Fa:Math.acos(t)}function Yc(t){return t>=1?Ui:t<=-1?-Ui:Math.asin(t)}function ds(t,e,n){var a=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>bn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);a=(a*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>bn){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,g=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-e*t._l12_2a)/g,s=(s*f+t._y1*t._l23_2a-n*t._l12_2a)/g}t._context.bezierCurveTo(a,i,o,s,t._x2,t._y2)}function Wc(t,e){this._context=t,this._alpha=e}Wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:ds(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var nm=function t(e){function n(a){return e?new Wc(a,e):new ls(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function Kc(t,e){this._context=t,this._alpha=e}Kc.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ds(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var rm=function t(e){function n(a){return e?new Kc(a,e):new cs(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function Zc(t,e){this._context=t,this._alpha=e}Zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ds(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var am=function t(e){function n(a){return e?new Zc(a,e):new us(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function Jc(t){return t<0?-1:1}function Qc(t,e,n){var a=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(a||i<0&&-0),s=(n-t._y1)/(i||a<0&&-0),l=(o*i+s*a)/(a+i);return(Jc(o)+Jc(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function kc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function hs(t,e,n){var a=t._x0,i=t._y0,o=t._x1,s=t._y1,l=(o-a)/3;t._context.bezierCurveTo(a+l,i+l*e,o-l,s-l*n,o,s)}function ji(t){this._context=t}ji.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hs(this,this._t0,kc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,hs(this,kc(this,n=Qc(this,t,e)),n);break;default:hs(this,this._t0,n=Qc(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function qc(t){this._context=new _c(t)}(qc.prototype=Object.create(ji.prototype)).point=function(t,e){ji.prototype.point.call(this,e,t)};function _c(t){this._context=t}_c.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,a,i,o){this._context.bezierCurveTo(e,t,a,n,o,i)}};function im(t){return new ji(t)}function om(t){return new qc(t)}function tu(t){this._context=t}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var a=eu(t),i=eu(e),o=0,s=1;s=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function cm(t){return new Vi(t,.5)}function um(t){return new Vi(t,0)}function fm(t){return new Vi(t,1)}function dm(t){const e=this;let n;return e.isLineType(t)?n=e.generateGetLinePoints(e.getShapeIndices(e.isLineType)):e.isBarType(t)&&(n=e.generateGetBarPoints(e.getShapeIndices(e.isBarType))),n}var hm={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:a}=t.state,i={type:{},indices:{},pos:{}};if(!a&&["bar","candlestick","line","area"].forEach(o=>{const s=Cn(/^(bubble|scatter)$/.test(o)?"line":o);if(t.hasType(o)||t.hasTypeOf(s)||o==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${s}Type`]),c=t[`generateDraw${s}`];i.indices[o]=l,i.type[o]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||a){let o,s;a||(o=n?t.radarCircleX:e?t.circleY:t.circleX,s=n?t.radarCircleY:e?t.circleX:t.circleY),i.pos={xForText:t.generateXYForText(i.indices,!0),yForText:t.generateXYForText(i.indices,!1),cx:(o||function(){}).bind(t),cy:(s||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,a=n.data_xs,i=cn(a),o={};let s=i?{}:0;return i&&Mo(Object.keys(a).map(l=>a[l])).forEach(l=>{s[l]=0,o[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const f=l.id in a?a[l.id]:"",g=f?o[f]:o;for(let v=0,m;m=n.data_groups[v];v++)if(!(m.indexOf(l.id)<0))for(let S=0,P;P=m[S];S++){if(P in g){g[l.id]=g[P];break}l.id!==P&&f&&(g[P]=(c=g[l.id])!=null?c:s[f])}ln(g[l.id])&&(g[l.id]=f?s[f]++:s++,g.__max__=(f?s[f]:s)-1)}),o},getIndices(t,e,n){const a=this,{data_xs:i,bar_indices_removeNull:o}=a.config,{id:s,index:l}=e;if(a.isBarType(s)&&o){const c={};return a.getAllValuesOnIndex(l,!0).forEach((f,g)=>{c[f.id]=g,c.__max__=g}),c}return cn(i)?t[i[s]]:t},getIndicesMax(t){return cn(this.config.data_xs)?Object.keys(t).map(e=>t[e].__max__||0).reduce((e,n)=>e+n):t.__max__},getShapeX(t,e,n){const a=this,{config:i,scale:o}=a,s=n?o.subX:o.zoom||o.x,l=i.bar_overlap,c=i.bar_padding,f=(v,m)=>v+m,g=nr(t)&&(t._$total.length?t._$total.reduce(f)/2:0);return v=>{const m=a.getIndices(e,v,"getShapeX"),S=v.id in m?m[v.id]:0,P=(m.__max__||0)+1;let N=0;if(cn(v.x)){const L=s(v.x,!0);if(g){const w=t[v.id]||t._$width;N=l?L-w/2:L-w+t._$total.slice(0,S+1).reduce(f)-g}else N=L-(he(t)?t:t._$width)*(P/2-(l?1:S))}return t&&N&&P>1&&c&&(S&&(N+=c*S),P>2?N-=(P-1)*c/2:P===2&&(N-=c/2)),N}},getShapeY(t){const e=this,n=e.isStackNormalized();return a=>{let{value:i}=a;return he(a)?i=a:e.isAreaRangeType(a)?i=e.getBaseValue(a,"mid"):n?i=e.getRatio("index",a,!0):e.isBubbleZType(a)?i=e.getBubbleZData(a.value,"y"):e.isBarRangeType(a)&&(i=i[1]),e.getYScaleById(a.id,t)(i)}},getShapeYMin(t){const e=this,n=e.axis.getId(t),a=e.scale[n],[i]=a.domain(),o=e.config[`axis_${n}_inverted`];return!e.isGrouped(t)&&!o&&i>0?i:0},getShapeOffsetData(t){const e=this,n=e.orderTargets(e.filterTargetsToShow(e.data.targets.filter(t,e))),a=e.isStackNormalized(),i=n.map(s=>{let l=s.values;const c={};e.isStepType(s)&&(l=e.convertValuesToStep(l));const f=l.reduce((g,v)=>{const m=Number(v.x);return g[m]=v,c[m]=a?e.getRatio("index",v,!0):v.value,g},{});return{id:s.id,rowValues:l,rowValueMapByXValue:f,values:c}});return{indexMapByTargetId:n.reduce((s,{id:l},c)=>(s[l]=c,s),{}),shapeOffsetTargets:i}},getShapeOffset(t,e,n){const a=this,{shapeOffsetTargets:i,indexMapByTargetId:o}=a.getShapeOffsetData(t),s=a.config.data_groupsZeroAs;return(l,c)=>{const{id:f,value:g,x:v}=l,m=a.getIndices(e,l),S=a.getYScaleById(f,n);if(a.isBarRangeType(l))return S(g[0]);const P=Number(v),N=S(s==="zero"?0:a.getShapeYMin(f));let L=N;return i.filter(w=>w.id!==f&&m[w.id]===m[f]).forEach(w=>{const{id:X,rowValueMapByXValue:W,rowValues:H,values:k}=w;if(o[X]=0&&he(K)&&(g!==0||s==="positive"&&K>0||s==="negative"&&K<0)&&(L+=S(K)-N)}}),L}},circleY(t,e){const n=this,a=t.id;let i;return n.isGrouped(a)&&(i=dm.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(a)(n.getBaseValue(t))},getBarW(t,e,n){var a,i,o,s,l;const c=this,{config:f,org:g,scale:v,state:m}=c,S=c.getMaxDataCount(),P=t==="bar"&&((a=f.data_groups)==null?void 0:a.length),N=`${t}_width`,{k:L}=(o=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?o:{k:1},w=[(s=f.axis_x_min)!=null?s:g.xDomain[0],(l=f.axis_x_max)!=null?l:g.xDomain[1]].map(c.axis.isTimeSeries()?Yn.bind(c):Number);let X=e.tickInterval(S);if(v.zoom&&!c.axis.isCategorized()&&L>1){const k=w.every((K,at)=>K===g.xDomain[at]);X=g.xDomain.map((K,at)=>{const ht=k?K:K-Math.abs(w[at]);return v.zoom(ht)}).reduce((K,at)=>Math.abs(K)+at)/S}const W=k=>{const K=k?f[N][k]:f[N],at=k?K.ratio:f[`${N}_ratio`],ht=k?K.max:f[`${N}_max`],$t=he(K)?K:ve(K)?K.call(c,m.width,n,S):n?X*at/n:0;return ht&&$t>ht?ht:$t};let H=W();return!P&&nr(f[N])&&(H={_$width:H,_$total:[]},c.filterTargetsToShow(c.data.targets).forEach(k=>{f[N][k.id]&&(H[k.id]=W(k.id),H._$total.push(H[k.id]||H._$width))})),H},getShapeByIndex(t,e,n){const a=this,{$el:i}=a,o=De(e)?`-${e}`:"";let s=i[t];return s&&!s.empty()?s=s.filter(l=>n?l.id===n:!0).filter(l=>De(e)?l.index===e:!0):s=(n?i.main.selectAll(`.${Ue[`${t}s`]}${a.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Ue[t]}${o}`),s},isWithinShape(t,e){var n;const a=this,i=ot(t);let o;return a.isTargetToShow(e.id)?(n=a.hasValidPointType)!=null&&n.call(a,t.nodeName)?o=a.isStepType(e)?a.isWithinStep(t,a.getYScaleById(e.id)(a.getBaseValue(e))):a.isWithinCircle(t,a.isBubbleType(e)?a.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(o=i.classed(Ue.bar)?a.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return{basis:Kp,"basis-closed":Zp,"basis-open":Jp,bundle:Qp,cardinal:kp,"cardinal-closed":qp,"cardinal-open":_p,"catmull-rom":nm,"catmull-rom-closed":rm,"catmull-rom-open":am,"monotone-x":im,"monotone-y":om,natural:sm,"linear-closed":lm,linear:gs,step:cm,"step-after":fm,"step-before":um}[n]},getInterpolateType(t){const e=this,{config:n}=e,a=n.spline_interpolation_type,i=e.isInterpolationType(a)?a:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=Hn(this.state.event,t),n=Hl(t),[a,i]=n,o=Math.min(a.x,i.x),s=Math.min(a.y,i.y),l=this.config.bar_sensitivity,{width:c,height:f}=t.getBBox(),g=o-l,v=o+c+l,m=s+f+l,S=s-l;return ge in t?gm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rn=(t,e,n)=>vm(t,typeof e!="symbol"?e+"":e,n);class Vr{constructor(e){Rn(this,"api"),Rn(this,"config"),Rn(this,"cache"),Rn(this,"$el"),Rn(this,"state"),Rn(this,"charts"),Rn(this,"data",{xs:{},targets:[]}),Rn(this,"axis"),Rn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Rn(this,"org",{xScale:null,xDomain:null}),Rn(this,"color"),Rn(this,"patterns"),Rn(this,"levelColor"),Rn(this,"point"),Rn(this,"brush"),Rn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new Nr,n.cache=new gv;const a=new uv;n.$el=a.getStore("element"),n.state=a.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,a){const{config:i,state:o}=this,s=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=ot(c)),c=(n!==!1&&s||n)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l?c.transition(a).duration(s):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),_e(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),_e(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:a,$el:i}=e,o=n.boost_useCssRule;if(vv(e),a.hasRadar=!a.hasAxis&&e.hasType("radar"),a.hasFunnel=!a.hasAxis&&e.hasType("funnel"),a.hasTreemap=!a.hasAxis&&e.hasType("treemap"),a.hasAxis=!e.hasArcType()&&!a.hasFunnel&&!a.hasTreemap,a.datetimeId=`bb-${+new Date*gr()}`,o){const l=gn.createElement("style");l.type="text/css",gn.head.appendChild(l),a.style={rootSelctor:`.${a.datetimeId}`,sheet:l.sheet},i.style=l}const s={element:n.bindto,classname:"bb"};Be(n.bindto)&&(s.element=n.bindto.element||"#chart",s.classname=n.bindto.classname||s.classname),i.chart=ve(s.element.node)?n.bindto.element:ot(s.element||[]),i.chart.empty()&&(i.chart=ot(gn.body.appendChild(gn.createElement("div")))),i.chart.html("").classed(s.classname,!0).classed(a.datetimeId,o).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:a,state:i,$el:{chart:o}}=n,s=()=>nv(o,{display:"none",visibility:"hidden"}),l=a.render.lazy===!1?!1:a.render.lazy||s(),c=Ke.MutationObserver;l&&c&&a.render.observe!==!1&&!e&&new c((f,g)=>{s()||(g.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(a,f=>{n.initWithData(f),n.afterInit()})}initParams(){var e;const n=this,{config:a,format:i,state:o}=n,s=a.axis_rotated;if(n.color=n.generateColor(),n.levelColor=n.generateLevelColor(),a.padding===!1&&(a.axis_x_show=!1,a.axis_y_show=!1,a.axis_y2_show=!1,a.subchart_show=!1),(n.hasPointType()||(e=n.hasLegendDefsPoint)!=null&&e.call(n))&&(n.point=n.generatePoint()),o.hasAxis){n.initClip(),i.extraLineClasses=n.generateExtraLineClass(),i.dataTime=a.data_xLocaltime?Ws:Ks,i.axisTime=a.axis_x_localtime?ao:io;const l=n.config.zoom_enabled&&n.config.zoom_type==="drag";i.defaultAxisTime=c=>{const{x:f,zoom:g}=n.scale,v=l?g:g&&f.orgDomain().toString()!==g.domain().toString(),m=c.getMilliseconds()&&".%L"||c.getSeconds()&&".:%S"||c.getMinutes()&&"%I:%M"||c.getHours()&&"%I %p"||c.getDate()!==1&&"%b %d"||v&&c.getDate()===1&&"%b'%y"||c.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(m)(c)}}o.isLegendRight=a.legend_position==="right",o.isLegendInset=a.legend_position==="inset",o.isLegendTop=a.legend_inset_anchor==="top-left"||a.legend_inset_anchor==="top-right",o.isLegendLeft=a.legend_inset_anchor==="top-left"||a.legend_inset_anchor==="bottom-left",o.rotatedPadding.top=n.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=s&&!a.axis_x_show?0:30,o.inputType=rv(a.interaction_inputType_mouse,a.interaction_inputType_touch)}initWithData(e){var n,a,i;const o=this,{config:s,scale:l,state:c,$el:f,org:g}=o,{hasAxis:v,hasFunnel:m,hasTreemap:S}=c,P=s.interaction_enabled,N=o.hasType("polar"),L=s.data_labels_backgroundColors;if(v&&(o.axis=o.getAxisInstance(),s.zoom_enabled&&o.initZoom()),o.data.xs={},o.data.targets=o.convertDataToTargets(e),s.data_filter&&(o.data.targets=o.data.targets.filter(s.data_filter.bind(o.api))),s.data_hide&&o.addHiddenTargetIds(s.data_hide===!0?o.mapToIds(o.data.targets):s.data_hide),s.legend_hide&&o.addHiddenLegendIds(s.legend_hide===!0?o.mapToIds(o.data.targets):s.legend_hide),o.updateSizes(),o.updateScales(!0),v){const{x:W,y:H,y2:k,subX:K,subY:at,subY2:ht}=l;W&&(W.domain(na(o.getXDomain(o.data.targets),!s.axis_x_inverted)),K.domain(W.domain()),g.xDomain=W.domain()),H&&(H.domain(o.getYDomain(o.data.targets,"y")),at.domain(H.domain())),k&&(k.domain(o.getYDomain(o.data.targets,"y2")),ht&&ht.domain(k.domain()))}if(f.svg=f.chart.append("svg").style("overflow","hidden").style("display","block"),P&&c.inputType){const W=c.inputType==="touch",{onclick:H,onover:k,onout:K}=s;f.svg.on("click",(H==null?void 0:H.bind(o.api))||null).on(W?"touchstart":"mouseenter",(k==null?void 0:k.bind(o.api))||null).on(W?"touchend":"mouseleave",(K==null?void 0:K.bind(o.api))||null)}s.svg_classname&&f.svg.attr("class",s.svg_classname);const w=ve(s.color_tiles)&&o.patterns;(v||w||N||S||L||(n=o.hasLegendDefsPoint)!=null&&n.call(o))&&(f.defs=f.svg.append("defs"),v&&["id","idXAxis","idYAxis","idGrid"].forEach(W=>{o.appendClip(f.defs,c.clip[W])}),o.generateTextBGColorFilter(L),w&&o.patterns.forEach(W=>f.defs.append(()=>W.node))),o.updateSvgSize(),o.bindResize();const X=f.svg.append("g").classed(Se.main,!0).attr("transform",m||S?null:o.getTranslate("main"));if(f.main=X,s.subchart_show&&o.initSubchart(),s.tooltip_show&&o.initTooltip(),s.title_text&&o.initTitle(),!S&&s.legend_show&&o.initLegend(),s.data_empty_label_text&&X.append("text").attr("class",`${On.text} ${Se.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),v&&(s.regions.length&&o.initRegion(),!s.clipPath&&o.axis.init()),X.append("g").classed(Se.chart,!0).attr("clip-path",v?c.clip.path:null),o.callPluginHook("$init"),o.initChartElements(),v&&(P&&((a=o.initEventRect)==null||a.call(o)),o.initGrid(),s.clipPath&&((i=o.axis)==null||i.init())),o.updateTargets(o.data.targets),o.updateDimension(),_e(s.oninit,o.api),o.setBackground(),o.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),s.data_onmin||s.data_onmax){const W=o.getMinMaxData();_e(s.data_onmin,o.api,W.min),_e(s.data_onmax,o.api,W.max)}s.tooltip_show&&o.initShowTooltip(),c.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:a,hasTreemap:i}=e.state,o=[];if(n){const s=["bar","bubble","candlestick","line"];e.config.bar_front&&s.push(s.shift()),s.forEach(l=>{const c=Cn(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&o.push(c)})}else if(i)o.push("Treemap");else if(e.hasType("funnel"))o.push("Funnel");else{const s=e.hasType("polar");a||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):a?o.push("Radar"):s&&o.push("Polar")}o.forEach(s=>{e[`init${s}`]()}),cn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:a,defs:i,main:o,tooltip:s,legend:l,title:c,grid:f,needle:g,arcs:v,circle:m,bar:S,candlestick:P,line:N,area:L,text:w}}=e;e.api.$={chart:n,svg:a,defs:i,main:o,tooltip:s,legend:l,title:c,grid:f,arc:v,circles:m,bar:{bars:S},candlestick:P,line:{lines:N,areas:L},needle:g,text:{texts:w}}}setBackground(){const e=this,{config:{background:n},state:a,$el:{svg:i}}=e;if(cn(n)){const o=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?o.attr("href",n.imgUrl):n.color&&o.style("fill",n.color).attr("clip-path",a.clip.path),o.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n;const a=this,{hasAxis:i,hasFunnel:o,hasRadar:s,hasTreemap:l}=a.state,c=g=>a[`updateTargetsFor${g}`](e.filter(a[`is${g}Type`].bind(a)));if(a.updateTargetsForText(e),i)["bar","candlestick","line"].forEach(g=>{const v=Cn(g);(g==="line"&&a.hasTypeOf(v)||a.hasType(g))&&c(v)}),a.updateTargetsForSubchart&&a.updateTargetsForSubchart(e);else if(a.hasArcType(e)){let g="Arc";s?g="Radar":a.hasType("polar")&&(g="Polar"),c(g)}else o?c("Funnel"):l&&c("Treemap");const f=a.hasType("bubble")||a.hasType("scatter");f&&((n=a.updateTargetForCircle)==null||n.call(a)),a.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:a},$T:i}=n;let o=`.${Se.target}`;e&&(o+=`, .${$n.chartCircles} > .${$n.circles}`),i(a.selectAll(o).filter(s=>n.isTargetToShow(s.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(a=>{let i=n[a];ze(i)&&(i=n[i]),n[a]=$r(e,`with${a}`,i)}),n}initialOpacity(e){const n=this,{withoutFadeIn:a}=n.state;return n.getBaseValue(e)!==null&&a[e.id]?null:"0"}bindResize(){const e=this,{$el:n,config:a,state:i}=e,o=xv(a.resize_timer),s=[];s.push(()=>_e(a.onresize,e.api)),/^(true|parent)$/.test(a.resize_auto)&&s.push(()=>{i.resizing=!0,a.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}),s.push(()=>{_e(a.onresized,e.api),i.resizing=!1}),s.forEach(l=>o.add(l)),e.resizeFunction=o,a.resize_auto==="parent"?(e.resizeFunction.resizeObserver=new ResizeObserver(e.resizeFunction.bind(e))).observe(n.chart.node().parentNode):Ke.addEventListener("resize",e.resizeFunction)}callPluginHook(e,...n){this.config.plugins.forEach(a=>{e==="$beforeInit"&&(a.$$=this,this.api.plugins.push(a)),a[e](...n)})}}yn(Vr.prototype,[Mv,Dv,Lv,jv,Vv,Yv,Wv,zv,Kv,Zv,Jv,Bp,hm,Up,zp,Gp,Xp,Hp,Yp,Wp]);function pm(t){const e=this.config;let n,a,i;const o=()=>{const s=a.shift();if(s&&n&&nr(n)&&s in n)return n=n[s],o();if(!s)return n};Object.keys(e).forEach(s=>{n=t,a=s.split("_"),i=o(),Qe(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var mm={resize(t){const e=this.internal,{config:n,state:a}=e;a.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,a.resizing=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const a=this.internal,{state:i,$el:{zoomResetBtn:o}}=a;i.rendered?(i.resizing?(e=a.brush)==null||e.updateResize():(n=a.axis)==null||n.setOrient(),o==null||o.style("display","none"),a.scale.zoom=null,t?a.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):a.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&a.brush&&(a.brush.getSelection().call(a.brush.move),a.unselectRect())):a.initToRender(!0)},destroy(){var t;const e=this.internal,{$el:{chart:n,style:a,svg:i}}=e;if(cn(e)){e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),e.unbindAllEvents(),i.select("*").interrupt(),e.resizeFunction.clear(),(t=e.resizeFunction.resizeObserver)==null||t.disconnect(),Ke.removeEventListener("resize",e.resizeFunction),n.classed("bb",!1).style("position",null).selectChildren().remove(),a&&a.parentNode.removeChild(a),Object.keys(this).forEach(o=>{o==="internal"&&Object.keys(e).forEach(s=>{e[s]=null}),this[o]=null,delete this[o]});for(const o in this)this[o]=()=>{}}return null},config(t,e,n){const a=this.internal,{config:i,state:o}=a,s=t==null?void 0:t.replace(/\./g,"_");let l;return t&&s in i?Qe(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||qn(t))&&(l=o.orgConfig),l}},ym={color(t){return this.internal.color(t)}};const au=function(t){const{targets:e}=this.internal.data;if(!ln(t)){const n=je(t)?t:[t];return e.filter(a=>n.some(i=>i===a.id))}return e};yn(au,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const a=this.data(t);je(a)&&(n=[],a.forEach(i=>{const o=i.values.map(s=>s.value);e?n=n.concat(o):n.push(o)}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var xm={data:au};const Tm=t=>{var e,n;return(n=(e=Ke).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(a,i)=>String.fromCharCode(+`0x${i}`)))};function $m(t,e,n){const{width:a,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=tv(Lr(gn.styleSheets)).filter(m=>m.cssText).map(m=>m.cssText);s.setAttribute("xmlns",ae.xhtml),s.style.margin="0",s.style.padding="0",e.preserveFontStyle&&s.querySelectorAll("text").forEach(m=>{m.innerHTML=""});const c=o.serializeToString(s),f=gn.createElement("style");f.appendChild(gn.createTextNode(l.join(` -`)));const g=o.serializeToString(f),v=` - - ${g} - ${c.replace(/(url\()[^#]+/g,"$1")} - `;return`data:image/svg+xml;base64,${Tm(v)}`}function Sm(t,e){const{top:n,left:a}=e,{x:i,y:o}=t.getBBox(),{a:s,b:l,c,d:f,e:g,f:v}=t.getScreenCTM(),{width:m,height:S}=t.getBoundingClientRect();return{x:s*i+c*o+g-a,y:l*i+f*o+v-n+(S-Math.round(S/4)),width:m,height:S}}function Am(t){const{left:e,top:n}=t.getBoundingClientRect(),a=o=>o.textContent||o.childElementCount,i=[];return Lr(t.querySelectorAll("text")).filter(a).forEach(o=>{const s=l=>{const{fill:c,fontFamily:f,fontSize:g,textAnchor:v,transform:m}=Ke.getComputedStyle(l),{x:S,y:P,width:N,height:L}=Sm(l,{left:e,top:n});return{[l.textContent]:{x:S,y:P,width:N,height:L,fill:c,fontFamily:f,fontSize:g,textAnchor:v,transform:m}}};if(o.childElementCount>1){const l=[];return Lr(o.querySelectorAll("tspan")).filter(a).forEach(c=>{i.push(s(c))}),l}else i.push(s(o))}),i}function Em(t,e){e.forEach(n=>{Object.keys(n).forEach(a=>{const{x:i,y:o,width:s,height:l,fill:c,fontFamily:f,fontSize:g,transform:v}=n[a];if(t.save(),t.font=`${g} ${f}`,t.fillStyle=c,v==="none")t.fillText(a,i,o);else{const m=v.replace(/(matrix|\(|\))/g,"").split(",");m.splice(4).every(S=>+S==0)?(m.push(i+s-s/4),m.push(o-l+l/3)):(m.push(i),m.push(o)),t.transform(...m),t.fillText(a,0,0)}t.restore()})})}var bm={export(t,e){const n=this.internal,{state:a,$el:{chart:i,svg:o}}=n,{width:s,height:l}=a.current,c=ea(Object.create(null),{width:s,height:l,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),f=$m(i.node(),c,{width:s,height:l}),g=c.preserveFontStyle?Am(o.node()):[];if(e&&ve(e)){const v=new Image;v.crossOrigin="Anonymous",v.onload=()=>{const m=gn.createElement("canvas"),S=m.getContext("2d");m.width=c.width||s,m.height=c.height||l,S.drawImage(v,0,0),g.length&&(Em(S,g),g.length=0),e.bind(this)(m.toDataURL(c.mimeType))},v.src=f}return f}},Rm={focus(t){const e=this.internal,{state:n}=e,a=e.mapToTargetIds(t),i=e.$el.svg.selectAll(e.selectorTargets(a.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),i.classed(qe.focused,!0).classed(qe.defocused,!1),e.hasArcType()&&!n.hasRadar&&(e.expandArc(a),e.hasType("gauge")&&e.markOverlapped(t,e,`.${Un.gaugeValue}`)),e.toggleFocusLegend(a,!0),n.focusedTargetIds=a,n.defocusedTargetIds=n.defocusedTargetIds.filter(o=>a.indexOf(o)<0)},defocus(t){const e=this.internal,{state:n}=e,a=e.mapToTargetIds(t);e.$el.svg.selectAll(e.selectorTargets(a.filter(e.isTargetToShow,e))).classed(qe.focused,!1).classed(qe.defocused,!0),e.hasArcType(null,["polar"])&&(e.unexpandArc(a),e.hasType("gauge")&&e.undoMarkOverlapped(e,`.${Un.gaugeValue}`)),e.toggleFocusLegend(a,!1),n.focusedTargetIds=n.focusedTargetIds.filter(o=>a.indexOf(o)<0),n.defocusedTargetIds=a},revert(t){const e=this.internal,{config:n,state:a,$el:i}=e,o=e.mapToTargetIds(t);i.svg.selectAll(e.selectorTargets(o)).classed(qe.focused,!1).classed(qe.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(o),n.legend_show&&(e.showLegend(o.filter(e.isLegendToShow.bind(e))),i.legend.selectAll(e.selectorLegends(o)).filter(function(){return ot(this).classed(qe.legendItemFocused)}).classed(qe.legendItemFocused,!1)),a.focusedTargetIds=[],a.defocusedTargetIds=[]}},Im={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},Om={load(t){const e=this.internal,{config:n}=e;t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(a=>{n.data_classes[a]=t.classes[a]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(a=>{n.data_axes[a]=t.axes[a]}),"colors"in t&&Object.keys(t.colors).forEach(a=>{n.data_colors[a]=t.colors[a]}),"unload"in t&&t.unload!==!1?e.unload(e.mapToTargetIds(t.unload===!0?null:t.unload),()=>{jl(()=>e.loadFromArgs(t))}):e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};qn(n)&&this.tooltip.hide(),je(n)?n={ids:n}:ze(n)&&(n={ids:[n]});const a=e.mapToTargetIds(n.ids);e.unload(a,()=>{e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(a),cc.call(e,n.done,n.resizeAfter)})}};function iu(t,e,n){const a=this.internal,i=a.mapToTargetIds(e),o=a.state.hiddenTargetIds.map(c=>i.indexOf(c)>-1&&c).filter(Boolean);a.state.toggling=!0,a[`${t?"remove":"add"}HiddenTargetIds`](i);const s=a.$el.svg.selectAll(a.selectorTargets(i)),l=t?null:"0";t&&o.length&&(s.style("display",null),_e(a.config.data_onshown,this,o)),a.$T(s).style("opacity",l,"important").call(Si,()=>{var c;!t&&o.length===0&&(s.style("display","none"),_e((c=a.config)==null?void 0:c.data_onhidden,this,i)),s.style("opacity",l)}),n.withLegend&&a[`${t?"show":"hide"}Legend`](i),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.state.toggling=!1}var Cm={show(t,e={}){iu.call(this,!0,t,e)},hide(t,e={}){iu.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,a={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>a[n.isTargetToShow(i)?"hide":"show"].push(i)),a.show.length&&this.show(a.show,e),a.hide.length&&setTimeout(()=>this.hide(a.hide,e),0)}},Pm={tooltip:{show:function(t){var e,n,a;const i=this.internal,{$el:o,config:s,state:{eventReceiver:l,hasFunnel:c,hasTreemap:f,inputType:g}}=i;let v,m;if(t.mouse&&(m=t.mouse),t.data){const{data:S}=t,P=(e=i.getYScaleById(S.id))==null?void 0:e(S.value);if((c||f)&&S.id){const N=i.selectorTarget(S.id,void 0,`.${sn.shape}`);l.rect=o.main.select(N)}else i.isMultipleX()?m=[i.xx(S),P]:(s.tooltip_grouped||(m=[0,P]),v=(a=S.index)!=null?a:i.hasArcType()&&S.id?(n=i.getArcElementByIdOrIndex(S.id))==null?void 0:n.datum().index:i.getIndexByX(S.x))}else Qe(t.x)?v=i.getIndexByX(t.x):Qe(t.index)&&(v=t.index);(g==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(S=>{i.dispatchEvent(S,v,m)})},hide:function(){var t,e,n;const a=this.internal,{state:{inputType:i},$el:{tooltip:o}}=a,s=o==null?void 0:o.datum();if(s){const{index:l}=JSON.parse(s.current)[0];(i==="mouse"?["mouseout"]:["touchend"]).forEach(c=>{a.dispatchEvent(c,l)})}i==="touch"&&a.callOverOutForTouch(),a.hideTooltip(!0),(t=a.hideGridFocus)==null||t.call(a),(e=a.unexpandCircles)==null||e.call(a),(n=a.expandBarTypeShapes)==null||n.call(a,!1)}}},wm=Object.defineProperty,Mm=(t,e,n)=>e in t?wm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ou=(t,e,n)=>Mm(t,typeof e!="symbol"?e+"":e,n);class Er{constructor(e){ou(this,"plugins",[]),ou(this,"internal");const n=new Vr(this);this.internal=n,function a(i,o,s){Object.keys(i).forEach(l=>{const c=ve(i[l]),f=o!==s,g=cn(i[l]),v=g&&Object.keys(i[l]).length>0;c&&(!f&&v||f)?o[l]=i[l].bind(s):g&&!c?o[l]={}:o[l]=i[l],v&&a(i[l],o[l],s)})}(Er.prototype,this,this),pm.call(n,e),n.beforeInit(),n.init()}}yn(Er.prototype,[mm,ym,xm,bm,Rm,Im,Om,Cm,Pm]);function su(t=!1,e,n,a){const i=this,{config:o,$el:{main:s}}=i,l=o.data_selection_grouped,c=o.data_selection_isselectable.bind(i.api);o.data_selection_enabled&&s.selectAll(`.${sn.shapes}`).selectAll(`.${sn.shape}`).each(function(f){const g=ot(this),{id:v,index:m}=f.data?f.data:f,S=i.getToggle(this,f).bind(i),P=l||!e||e.indexOf(v)>=0,N=!n||n.indexOf(m)>=0,L=g.classed(tn.SELECTED);g.classed(ur.line)||g.classed(ti.area)||(t?P&&N&&c(f)&&!L?S(!0,g.classed(tn.SELECTED,!0),f,m):Qe(a)&&a&&L&&S(!1,g.classed(tn.SELECTED,!1),f,m):P&&N&&c(f)&&L&&S(!1,g.classed(tn.SELECTED,!1),f,m))})}var Dm={selected(t){const e=this.internal,n=[];return e.$el.main.selectAll(`.${sn.shapes+e.getTargetSelectorSuffix(t)}`).selectAll(`.${sn.shape}`).filter(function(){return ot(this).classed(tn.SELECTED)}).each(a=>n.push(a)),n},select(t,e,n){const a=this.internal;su.bind(a)(!0,t,e,n)},unselect(t,e){const n=this.internal;su.bind(n)(!1,t,e)}};const lu=function(t){var e;const n=this.internal,{axis:a,brush:i,config:o,scale:{x:s,subX:l},state:c}=n;let f;return o.subchart_show&&(f=t,Array.isArray(f)?(a.isTimeSeries()&&(f=f.map(v=>Yn.bind(n)(v))),n.withinRange(f,n.getZoomDomain("subX",!0),n.getZoomDomain("subX"))&&(c.domain=f,i.move(i.getSelection(),f.map(l)))):f=(e=c.domain)!=null?e:s.orgDomain()),f};yn(lu,{show(){var t,e;const n=this.internal,{$el:{subchart:a},config:i}=n,o=i.subchart_show;if(!o){n.unbindZoomEvent(),i.subchart_show=!o,!a.main&&n.initSubchart();let s=a.main.selectAll(`.${Se.target}`);n.data.targets.length!==s.size()&&(n.updateSizes(),n.updateTargetsForSubchart(n.data.targets),s=(t=a.main)==null?void 0:t.selectAll(`.${Se.target}`)),s==null||s.style("opacity",null),(e=a.main)==null||e.style("display",null),this.resize()}},hide(){const t=this.internal,{$el:{subchart:{main:e}},config:n}=t;n.subchart_show&&(e==null?void 0:e.style("display"))!=="none"&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){const t=this.internal,{brush:e}=t;e.clear(e.getSelection())}});var Lm={subchart:lu},Nm=1e-12;function cu(t){return((t=Math.exp(t))+1/t)/2}function Fm(t){return((t=Math.exp(t))-1/t)/2}function Bm(t){return((t=Math.exp(2*t))-1)/(t+1)}var Um=function t(e,n,a){function i(o,s){var l=o[0],c=o[1],f=o[2],g=s[0],v=s[1],m=s[2],S=g-l,P=v-c,N=S*S+P*P,L,w;if(N()=>t;function zm(t,{sourceEvent:e,target:n,transform:a,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:i}})}function vr(t,e,n){this.k=t,this.x=e,this.y=n}vr.prototype={constructor:vr,scale:function(t){return t===1?this:new vr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new vr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ar=new vr(1,0,0);vs.prototype=vr.prototype;function vs(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ar;return t.__zoom}function ps(t){t.stopImmediatePropagation()}function Ba(t){t.preventDefault(),t.stopImmediatePropagation()}function jm(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Vm(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function uu(){return this.__zoom||ar}function Gm(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Xm(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hm(t,e,n){var a=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function Ym(){var t=jm,e=Vm,n=Hm,a=Gm,i=Xm,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Um,f=ri("start","zoom","end"),g,v,m,S=500,P=150,N=0,L=10;function w(Q){Q.property("__zoom",uu).on("wheel.zoom",ht,{passive:!1}).on("mousedown.zoom",$t).on("dblclick.zoom",dt).filter(i).on("touchstart.zoom",st).on("touchmove.zoom",Vt).on("touchend.zoom touchcancel.zoom",vt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(Q,St,ct,At){var Gt=Q.selection?Q.selection():Q;Gt.property("__zoom",uu),Q!==Gt?k(Q,St,ct,At):Gt.interrupt().each(function(){K(this,arguments).event(At).start().zoom(null,typeof St=="function"?St.apply(this,arguments):St).end()})},w.scaleBy=function(Q,St,ct,At){w.scaleTo(Q,function(){var Gt=this.__zoom.k,Bt=typeof St=="function"?St.apply(this,arguments):St;return Gt*Bt},ct,At)},w.scaleTo=function(Q,St,ct,At){w.transform(Q,function(){var Gt=e.apply(this,arguments),Bt=this.__zoom,Kt=ct==null?H(Gt):typeof ct=="function"?ct.apply(this,arguments):ct,ne=Bt.invert(Kt),le=typeof St=="function"?St.apply(this,arguments):St;return n(W(X(Bt,le),Kt,ne),Gt,s)},ct,At)},w.translateBy=function(Q,St,ct,At){w.transform(Q,function(){return n(this.__zoom.translate(typeof St=="function"?St.apply(this,arguments):St,typeof ct=="function"?ct.apply(this,arguments):ct),e.apply(this,arguments),s)},null,At)},w.translateTo=function(Q,St,ct,At,Gt){w.transform(Q,function(){var Bt=e.apply(this,arguments),Kt=this.__zoom,ne=At==null?H(Bt):typeof At=="function"?At.apply(this,arguments):At;return n(ar.translate(ne[0],ne[1]).scale(Kt.k).translate(typeof St=="function"?-St.apply(this,arguments):-St,typeof ct=="function"?-ct.apply(this,arguments):-ct),Bt,s)},At,Gt)};function X(Q,St){return St=Math.max(o[0],Math.min(o[1],St)),St===Q.k?Q:new vr(St,Q.x,Q.y)}function W(Q,St,ct){var At=St[0]-ct[0]*Q.k,Gt=St[1]-ct[1]*Q.k;return At===Q.x&&Gt===Q.y?Q:new vr(Q.k,At,Gt)}function H(Q){return[(+Q[0][0]+ +Q[1][0])/2,(+Q[0][1]+ +Q[1][1])/2]}function k(Q,St,ct,At){Q.on("start.zoom",function(){K(this,arguments).event(At).start()}).on("interrupt.zoom end.zoom",function(){K(this,arguments).event(At).end()}).tween("zoom",function(){var Gt=this,Bt=arguments,Kt=K(Gt,Bt).event(At),ne=e.apply(Gt,Bt),le=ct==null?H(ne):typeof ct=="function"?ct.apply(Gt,Bt):ct,be=Math.max(ne[1][0]-ne[0][0],ne[1][1]-ne[0][1]),Oe=Gt.__zoom,Ce=typeof St=="function"?St.apply(Gt,Bt):St,He=c(Oe.invert(le).concat(be/Oe.k),Ce.invert(le).concat(be/Ce.k));return function(Fe){if(Fe===1)Fe=Ce;else{var dn=He(Fe),Jt=be/dn[2];Fe=new vr(Jt,le[0]-dn[0]*Jt,le[1]-dn[1]*Jt)}Kt.zoom(null,Fe)}})}function K(Q,St,ct){return!ct&&Q.__zooming||new at(Q,St)}function at(Q,St){this.that=Q,this.args=St,this.active=0,this.sourceEvent=null,this.extent=e.apply(Q,St),this.taps=0}at.prototype={event:function(Q){return Q&&(this.sourceEvent=Q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(Q,St){return this.mouse&&Q!=="mouse"&&(this.mouse[1]=St.invert(this.mouse[0])),this.touch0&&Q!=="touch"&&(this.touch0[1]=St.invert(this.touch0[0])),this.touch1&&Q!=="touch"&&(this.touch1[1]=St.invert(this.touch1[0])),this.that.__zoom=St,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(Q){var St=ot(this.that).datum();f.call(Q,this.that,new zm(Q,{sourceEvent:this.sourceEvent,target:w,type:Q,transform:this.that.__zoom,dispatch:f}),St)}};function ht(Q,...St){if(!t.apply(this,arguments))return;var ct=K(this,St).event(Q),At=this.__zoom,Gt=Math.max(o[0],Math.min(o[1],At.k*Math.pow(2,a.apply(this,arguments)))),Bt=Xn(Q);if(ct.wheel)(ct.mouse[0][0]!==Bt[0]||ct.mouse[0][1]!==Bt[1])&&(ct.mouse[1]=At.invert(ct.mouse[0]=Bt)),clearTimeout(ct.wheel);else{if(At.k===Gt)return;ct.mouse=[Bt,At.invert(Bt)],qr(this),ct.start()}Ba(Q),ct.wheel=setTimeout(Kt,P),ct.zoom("mouse",n(W(X(At,Gt),ct.mouse[0],ct.mouse[1]),ct.extent,s));function Kt(){ct.wheel=null,ct.end()}}function $t(Q,...St){if(m||!t.apply(this,arguments))return;var ct=Q.currentTarget,At=K(this,St,!0).event(Q),Gt=ot(Q.view).on("mousemove.zoom",le,!0).on("mouseup.zoom",be,!0),Bt=Xn(Q,ct),Kt=Q.clientX,ne=Q.clientY;co(Q.view),ps(Q),At.mouse=[Bt,this.__zoom.invert(Bt)],qr(this),At.start();function le(Oe){if(Ba(Oe),!At.moved){var Ce=Oe.clientX-Kt,He=Oe.clientY-ne;At.moved=Ce*Ce+He*He>N}At.event(Oe).zoom("mouse",n(W(At.that.__zoom,At.mouse[0]=Xn(Oe,ct),At.mouse[1]),At.extent,s))}function be(Oe){Gt.on("mousemove.zoom mouseup.zoom",null),uo(Oe.view,At.moved),Ba(Oe),At.event(Oe).end()}}function dt(Q,...St){if(t.apply(this,arguments)){var ct=this.__zoom,At=Xn(Q.changedTouches?Q.changedTouches[0]:Q,this),Gt=ct.invert(At),Bt=ct.k*(Q.shiftKey?.5:2),Kt=n(W(X(ct,Bt),At,Gt),e.apply(this,St),s);Ba(Q),l>0?ot(this).transition().duration(l).call(k,Kt,At,Q):ot(this).call(w.transform,Kt,At,Q)}}function st(Q,...St){if(t.apply(this,arguments)){var ct=Q.touches,At=ct.length,Gt=K(this,St,Q.changedTouches.length===At).event(Q),Bt,Kt,ne,le;for(ps(Q),Kt=0;KtYn.bind(n)(v))),n.withinRange(f,n.getZoomDomain("zoom",!0),n.getZoomDomain("zoom"))){if(l.domain=f,f=n.getZoomDomainValue(f),n.api.tooltip.hide(),i.subchart_show){const v=s.zoom||s.x;n.brush.getSelection().call(n.brush.move,f.map(v))}else{const v=c?s.x.orgScale():o.xScale||s.x;n.updateCurrentZoomTransform(v,f)}n.setZoomResetButton()}}else f=n.zoom.getDomain();return(e=l.domain)!=null?e:f};yn(fu,{enable(t){const e=this.internal,{config:n}=e;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?t===!1&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:a}}=e;return(t===0||t)&&(n.zoom_x_max=_n("max",[a[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:a}}=e;return(t===0||t)&&(n.zoom_x_min=_n("min",[a[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(Be(t)){const{min:n,max:a}=t;Qe(n)&&e.min(n),Qe(a)&&e.max(a)}return{min:e.min(),max:e.max()}}});var Wm={zoom:fu,unzoom(){const t=this.internal,{config:e,$el:{eventRect:n,zoomResetBtn:a},scale:{zoom:i},state:o}=t;i&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(ar),t.updateZoom(!0),a==null||a.style("display","none"),vs(n.node())!==ar&&t.zoom.transform(n,ar),o.domain=void 0)}},Km={initBrush(){const t=this,{config:e,scale:n,$el:{subchart:a},state:i}=t,o=e.axis_rotated,s=e.subchart_size_height;let l,c,f;t.brush=(o?Gg():Vg()).handleSize(5),t.brush.on("start brush end",g=>{const{selection:v,sourceEvent:m,target:S,type:P}=g;P==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=m?v:null),/(start|brush)/.test(P)&&(P==="brush"&&m&&i.domain&&(c==null||c.forEach((N,L)=>{N!==v[L]&&(i.domain[L]=n.x.orgDomain()[L])})),t.redrawForBrush(P!=="start")),P==="end"&&(l=n.x.orgDomain()),S!=null&&S.handle&&(v===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(N,L)=>{const w=[v[L],s/2];return`translate(${o?w.reverse():w})`}))}),t.brush.updateResize=function(){f&&clearTimeout(f),f=setTimeout(()=>{const g=this.getSelection();l&&zl(g.node())&&this.move(g,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var g;return this.extent()()[1].filter(m=>isNaN(m)).length===0&&((g=a.main)==null||g.select(`.${Ue.brush}`).call(this)),this},t.brush.scale=function(g){const v=e.subchart_size_height;let m=t.axis.getExtent();!m&&g.range?m=[[0,0],[g.range()[1],v]]:je(m)&&(m=m.map((S,P)=>[S,P>0?v:P])),o&&m[1].reverse(),this.extent(m),this.update()},t.brush.getSelection=()=>a.main?a.main.select(`.${Ue.brush}`):ot([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:a},$el:{defs:i,svg:o,subchart:s,axis:l}}=t;if(!a)return;const c=e.subchart_show?null:"hidden",f=`${n.id}-subchart`,g=t.getClipPath(f);n.idSubchart=f,t.appendClip(i,f),t.initBrush(),s.main=o.append("g").classed(Ue.subchart,!0).attr("transform",t.getTranslate("context"));const{main:v}=s;v.style("visibility",c),v.append("g").attr("clip-path",g).attr("class",Ue.chart),["bar","line","bubble","candlestick","scatter"].forEach(S=>{const P=Cn(/^(bubble|scatter)$/.test(S)?"circle":S);if(t.hasType(S)||t.hasTypeOf(P)){const N=v.select(`.${Ue.chart}`),L=Ue[`chart${P}s`];N.select(`.${L}`).empty()&&N.append("g").attr("class",L)}});const m=v.append("g").attr("clip-path",g).attr("class",Ue.brush).call(t.brush);e.subchart_showHandle&&t.addBrushHandle(m),l.subX=v.append("g").attr("class",Ue.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,a=n.axis_rotated,i=n.subchart_init_range,o="handle--custom",s=a?["M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z","M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"]:["M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z","M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"];e.brush.handle=t.selectAll(`.${o}`).data(a?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",o).attr("cursor",`${a?"ns":"ew"}-resize`).attr("d",l=>s[+/[se]/.test(l.type)]).attr("display",i?null:"none")},updateTargetsForSubchart(t){const e=this,{config:n,state:a,$el:{subchart:{main:i}}}=e;n.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(o=>e.hasType(o)||e.hasTypeOf(Cn(o))).forEach(o=>{const s=/^(bubble|scatter)$/.test(o),l=Cn(s?"circle":o),c=e.getChartClass(l,!0),f=e.getClass(s?"circles":`${o}s`,!0),g=i.select(`.${Ue[`chart${`${l}s`}`]}`);if(s){const v=g.selectAll(`.${Ue.circles}`).data(t.filter(e[`is${Cn(o)}Type`].bind(e))).attr("class",f);v.exit().remove(),v.enter().append("g").attr("class",f)}else{const v=g.selectAll(`.${Ue[`chart${l}`]}`).attr("class",c).data(t.filter(e[`is${l}Type`].bind(e))),m=v.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",f);v.exit().remove(),o==="line"&&e.hasTypeOf("Area")&&m.append("g").attr("class",e.getClass("areas",!0))}}),i.selectAll(`.${Ue.brush} rect`).attr(n.axis_rotated?"width":"height",n.axis_rotated?a.width2:a.height2))},redrawSubchart(t,e,n){var a;const i=this,{config:o,$el:{subchart:{main:s}},state:l}=i,c=!!e;if(s.style("visibility",o.subchart_show?null:"hidden"),o.subchart_show&&(((a=l.event)==null?void 0:a.type)==="zoom"&&i.brush.update(),t)){const f=o.subchart_init_range;if(!Kl(i)&&i.brush.update(),Object.keys(n.type).forEach(g=>{const v=Cn(g),m=i[`generateDraw${v}`](n.indices[g],!0);i[`update${v}`](c,!0),i[`redraw${v}`](m,c,!0)}),i.hasType("bubble")||i.hasType("scatter")){const{cx:g}=n.pos,v=i.updateCircleY(!0);i.updateCircle(!0),i.redrawCircle(g,v,c,void 0,!0)}!l.rendered&&f&&(l.domain=f,i.brush.move(i.brush.getSelection(),f.map(i.scale.x)))}},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:a,zoom_rescale:i},scale:o,state:s}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&s.rendered&&a.bind(n.api)((e=s.domain)!=null?e:o.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:a},$T:i}=n,o=e!=null&&e.axisSubX?e.axisSubX:i(a.main.select(`.${Ue.axisX}`),t);a.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))}},Zm={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:a}=t,i=Ym().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const o=e.zoom_extent||[1,10];return[o[0],Math.max(t.getMaxDataCount()/o[1],o[1])]},i.updateScaleExtent=function(){const o=Dr(t.scale.x.orgDomain())/Dr(t.getZoomDomain()),s=this.orgScaleExtent();return this.scaleExtent([s[0]*o,s[1]*o]),this},i.updateTransformScale=(o,s)=>{var l;const c=e.axis_rotated;(l=n.xScale)==null||l.range(a.x.range());const f=o[c?"rescaleY":"rescaleX"](n.xScale||a.x);if(f.domain().some(m=>/(Invalid Date|NaN)/.test(m.toString())))return;const g=t.trimXDomain(f.domain()),v=e.zoom_rescale;if(f.domain(g,n.xDomain),s){const m=f(a.x.domain()[0]),S=c?o.x:m,P=c?m:o.y;t.$el.eventRect.property("__zoom",ar.translate(S,P).scale(o.k))}t.state.xTickOffset||(t.state.xTickOffset=t.axis.x.tickOffset()),a.zoom=t.getCustomizedXScale(f),t.axis.x.scale(a.zoom),v?(!n.xScale&&(n.xScale=a.x.copy()),a.x.domain(g)):n.xScale&&(a.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const o=a[a.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(o[1]-=2),o},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,_e(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){var e;const n=this,{config:a,scale:i,state:o,org:s}=n,{sourceEvent:l}=t,c=(t==null?void 0:t.transform)===ar;if(!a.zoom_enabled||n.filterTargetsToShow(n.data.targets).length===0||!i.zoom&&(l==null?void 0:l.type.indexOf("touch"))>-1&&(l==null?void 0:l.touches.length)===1)return;t.sourceEvent&&(o.zooming=!0,o.domain=void 0);const f=(l==null?void 0:l.type)==="mousemove",g=(l==null?void 0:l.wheelDelta)<0,{transform:v}=t;!f&&g&&i.x.domain().every((S,P)=>S!==s.xDomain[P])&&i.x.domain(s.xDomain),n.zoom.updateTransformScale(v,a.zoom_type==="wheel"&&l);const m=a.transition_duration>0&&!a.subchart_show&&(o.dragging||c||!t.sourceEvent);n.redraw({withTransition:m,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n.state.cancelClick=f,!c&&_e(a.zoom_onzoom,n.api,(e=n.state.domain)!=null?e:n.zoom.getDomain())},onZoomEnd(t){var e,n;const a=this,{config:i,state:o}=a;let{startEvent:s}=a.zoom,l=t==null?void 0:t.sourceEvent;const c=(t==null?void 0:t.transform)===ar;(s==null?void 0:s.type.indexOf("touch"))>-1&&(s=s.changedTouches[0],l=(e=l==null?void 0:l.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&l&&s.clientX===l.clientX&&s.clientY===l.clientY)&&(o.zooming=!1,a.redrawEventRect(),a.updateZoom(),!c&&(l||o.dragging)&&_e(i.zoom_onzoomend,a.api,(n=a.state.domain)!=null?n:a.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:a,zoom:i}=e.scale;if(i){const o=i.domain(),s=n.domain(),l=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+l>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+l):(o[0]<=s[0]||o[0]-l<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-l);(t||c)&&(e.axis.x.scale(n),a.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){const n=this,{$el:{eventRect:a},config:i}=n,o=i.axis_rotated,s=[-t(e[0]),0],l=ar.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...o?s.reverse():s);a.call(n.zoom.transform,l)},bindZoomOnEventRect(){var t;const e=this,{config:n,$el:{eventRect:a,svg:i}}=e,o=n.zoom_type==="drag"?e.zoomBehaviour:e.zoom;Ke.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((t=Ke.navigator)==null?void 0:t.userAgent)&&i.on("wheel",()=>{}),a==null||a.call(o).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,a=e.axis_rotated;let i=0,o=0,s,l;const c={axis:a?"y":"x",attr:a?"height":"width",index:a?1:0};t.zoomBehaviour=uc().clickDistance(4).on("start",function(f){l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),s||(s=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",so.zoomBrush).attr("width",a?n.width:0).attr("height",a?0:n.height)),i=Hn(f,this)[c.index],l&&(il[1]&&(i=l[1])),o=i,s.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){o=Hn(f,this)[c.index],l&&(o>l[1]?o=l[1]:o{const g=t.scale.zoom||t.scale.x;n.event=f,s.attr(c.axis,0).attr(c.attr,0),i>o&&([i,o]=[o,i]),i<0&&(o+=Math.abs(i),i=0),i!==o&&t.api.zoom([i,o].map(v=>g.invert(v))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,a=e.zoom_resetButton;a&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Se.button,!0).append("span").on("click",function(){ve(a.onclick)&&a.onclick.bind(t.api)(this),t.api.unzoom()}).classed(so.buttonZoomReset,!0).text(a.text||"Reset Zoom"))},getZoomTransform(){const t=this,{$el:{eventRect:e}}=t;return e!=null&&e.node()?vs(e.node()):{k:1}}},Jm={drag(t){const e=this,{config:n,state:a,$el:{main:i}}=e,o=n.data_selection_grouped,s=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=a.dragStart||[0,0],[f,g]=t,v=Math.min(l,f),m=Math.max(l,f),S=o?a.margin.top:Math.min(c,g),P=o?a.height:Math.max(c,g);i.select(`.${Or.dragarea}`).attr("x",v).attr("y",S).attr("width",m-v).attr("height",P-S),i.selectAll(`.${sn.shapes}`).selectAll(`.${sn.shape}`).filter(N=>s==null?void 0:s.bind(e.api)(N)).each(function(N,L){const w=ot(this),X=w.classed(tn.SELECTED),W=w.classed(Or.INCLUDED);let H=!1,k;if(w.classed($n.circle)){const K=+w.attr("cx")*1,at=+w.attr("cy")*1;k=e.togglePoint,H=ve in t?Qm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ey=(t,e)=>{for(var n in e||(e={}))_m.call(e,n)&&hu(t,n,e[n]);if(du)for(var n of du(e))ty.call(e,n)&&hu(t,n,e[n]);return t},ny=(t,e)=>km(t,qm(e)),ry=ny(ey({},Jm),{selectPoint(t,e,n){const a=this,{config:i,$el:{main:o},$T:s}=a,l=i.axis_rotated,c=(l?a.circleY:a.circleX).bind(a),f=(l?a.circleX:a.circleY).bind(a),g=a.pointSelectR.bind(a);_e(i.data_onselected,a.api,e,t.node()),s(o.select(`.${tn.selectedCircles}${a.getTargetSelectorSuffix(e.id)}`).selectAll(`.${tn.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>a.generateClass(tn.selectedCircle,n)).attr("cx",c).attr("cy",f).attr("stroke",a.color).attr("r",v=>a.pointSelectR(v)*1.4)).attr("r",g)},unselectPoint(t,e,n){const a=this,{config:i,$el:{main:o},$T:s}=a;_e(i.data_onunselected,a.api,e,t==null?void 0:t.node()),s(o.select(`.${tn.selectedCircles}${a.getTargetSelectorSuffix(e.id)}`).selectAll(`.${tn.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,a){this[`${t?"":"un"}selectPoint`](e,n,a)},selectPath(t,e){const n=this,{config:a}=n;_e(a.data_onselected,n.api,e,t.node()),a.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:a}=n;_e(a.data_onunselected,n.api,e,t.node()),a.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,a){this[`${t?"":"un"}selectPath`](e,n,a)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var a;const i=this,{config:o,$el:{main:s}}=i;if(o.data_selection_enabled&&o.data_selection_isselectable.bind(i.api)(e)){const l=ot(t),c=l.classed(tn.SELECTED),f=i.getToggle(t,e).bind(i);let g;if(!o.data_selection_multiple){const v=(a=i.isPointFocusOnly)==null?void 0:a.call(i);let m=`.${v?tn.selectedCircles:sn.shapes}`;o.data_selection_grouped&&(m+=i.getTargetSelectorSuffix(e.id)),s.selectAll(m).selectAll(v?`.${tn.selectedCircle}`:`.${sn.shape}.${tn.SELECTED}`).classed(tn.SELECTED,!1).each(function(S){const P=ot(this);g=P,f(!1,P,S,S.index)})}(!g||g.node()!==l.node())&&(l.classed(tn.SELECTED,!c),f(!c,l,e,n))}}}),ay={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}},iy={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}},oy={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let gu=()=>(yn(Vr.prototype,ry),yn(Er.prototype,Dm),Nr.setOptions([ay]),(gu=()=>!0)()),vu=()=>(yn(Vr.prototype,Km),yn(Er.prototype,Lm),Nr.setOptions([iy]),(vu=()=>!0)()),pu=()=>(yn(Vr.prototype,Zm),yn(Er.prototype,Wm),Nr.setOptions([oy]),(pu=()=>!0)());function mu(t,e,n){const{config:a}=t,i=(o,s)=>{const l=he(s)?s:s===!1?void 0:null;l!==null&&(a[`axis_${o}_${e}`]=l)};Qe(n)&&(nr(n)?Object.keys(n).forEach(o=>{i(o,n[o])}):(he(n)||n===!1)&&["y","y2"].forEach(o=>{i(o,n)}),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function yu(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var sy={axis:{labels:function(t){const e=this.internal;let n;return t&&(Object.keys(t).forEach(a=>{e.axis.setLabelText(a,t[a])}),e.axis.updateLabels()),["x","y","y2"].forEach(a=>{const i=e.axis.getLabelText(a);i&&(!n&&(n={}),n[a]=i)}),n},min:function(t){const e=this.internal;return De(t)||t===!1?mu(e,"min",t):yu(e,"min")},max:function(t){const e=this.internal;return De(t)||t===!1?mu(e,"max",t):yu(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:a}=t;Qe(a)&&e.max(a),Qe(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},ly={category(t,e){const n=this.internal,{config:a}=n;return arguments.length>1&&(a.axis_x_categories[t]=e,n.redraw()),a.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const a=n.axis_x_categories;return qn(a)?Object.values(e.data.xs)[0]:a}return n.axis_x_categories=t,e.redraw(),n.axis_x_categories}},cy={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,a()});function a(){let i,o=0,s=0,l,c;if(e.state.redrawing||!n||!Da())return;const f=[],g=e.getMaxDataCount(),v=e.convertDataToTargets(n,!0),m=e.axis.isTimeSeries();e.data.targets.forEach(N=>{let L=!1;for(let w=0;w{for(let L=0;L{const L=[];for(let w=e.data.targets[0].values[0].index;w{w.index+=s,m||(w.x+=s)}),N.values=L.concat(N.values)}),e.data.targets=e.data.targets.concat(v);const S=e.data.targets[0],P=S.values[0];Qe(t.to)?(o=0,c=m?Yn.call(e,t.to):t.to,S.values.forEach(N=>{N.x1?S.values[S.values.length-1].x-P.x:P.x-e.getXDomain(e.data.targets)[0]:l=1,i=[P.x-l,P.x]),i&&e.updateXDomain(null,!0,!0,!1,i),e.updateTargets(e.data.targets),e.redraw({flow:{index:P.index,length:o,duration:De(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:g},withLegend:!0,withTransition:g>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}};function ms(t,e){const n=this.internal,{config:a}=n,i=a.transition_duration&&Da(),o=`grid_${e}_lines`;return t&&(a[o]=t,n.updateGrid(),n.redrawGrid(i)),a[o]}function xu(t,e){const n=`grid_${e}_lines`;return ms.bind(this)(this.internal.config[n].concat(t||[]),e)}function Tu(t,e){this.internal.removeGridLines(t,e)}const $u=function(t){return ms.bind(this)(t,"x")};yn($u,{add(t){return xu.bind(this)(t,"x")},remove(t){return Tu.bind(this)(t,!0)}});const Su=function(t){return ms.bind(this)(t,"y")};yn(Su,{add(t){return xu.bind(this)(t,"y")},remove(t){return Tu.bind(this)(t,!1)}});var uy={xgrids:$u,ygrids:Su},fy={groups(t){const e=this.internal,{config:n}=e;return ln(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function Au(t,e=!1){const n=this.internal,{config:a}=n,i=a.transition_duration&&Da();return t?(a.regions=e?a.regions.concat(t):t,n.updateRegion(),n.redrawRegion(i),e?a.regions:t):a.regions}const Eu=function(t){return Au.bind(this)(t)};yn(Eu,{add:function(t){return Au.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:a}=e,i=t||{},o=$r(i,"classes",[$a.region]);let s=e.$el.main.select(`.${$a.regions}`).selectAll(o.map(l=>`.${l}`));return a(s).style("opacity","0").remove(),s=n.regions,Object.keys(i).length?(s=s.filter(l=>{let c=!1;return l.class?(l.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(c=!0)}),!c):!0}),n.regions=s):n.regions=[],s}});var dy={regions:Eu},hy={x(t){const e=this.internal,{axis:n,data:a}=e,i=n.isCustomX()&&n.isCategorized();return je(t)&&(i?this.categories(t):(e.updateTargetX(a.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():a.xs},xs(t){const e=this.internal;return Be(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}};function gy(t){return t}var Xi=1,Hi=2,ys=3,Ua=4,bu=1e-6;function vy(t){return"translate("+t+",0)"}function py(t){return"translate(0,"+t+")"}function my(t){return e=>+t(e)}function yy(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function xy(){return!this.__axis}function Yi(t,e){var n=[],a=null,i=null,o=6,s=6,l=3,c=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,f=t===Xi||t===Ua?-1:1,g=t===Ua||t===Hi?"x":"y",v=t===Xi||t===ys?vy:py;function m(S){var P=a==null?e.ticks?e.ticks.apply(e,n):e.domain():a,N=i==null?e.tickFormat?e.tickFormat.apply(e,n):gy:i,L=Math.max(o,0)+l,w=e.range(),X=+w[0]+c,W=+w[w.length-1]+c,H=(e.bandwidth?yy:my)(e.copy(),c),k=S.selection?S.selection():S,K=k.selectAll(".domain").data([null]),at=k.selectAll(".tick").data(P,e).order(),ht=at.exit(),$t=at.enter().append("g").attr("class","tick"),dt=at.select("line"),st=at.select("text");K=K.merge(K.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),at=at.merge($t),dt=dt.merge($t.append("line").attr("stroke","currentColor").attr(g+"2",f*o)),st=st.merge($t.append("text").attr("fill","currentColor").attr(g,f*L).attr("dy",t===Xi?"0em":t===ys?"0.71em":"0.32em")),S!==k&&(K=K.transition(S),at=at.transition(S),dt=dt.transition(S),st=st.transition(S),ht=ht.transition(S).attr("opacity",bu).attr("transform",function(Vt){return isFinite(Vt=H(Vt))?v(Vt+c):this.getAttribute("transform")}),$t.attr("opacity",bu).attr("transform",function(Vt){var vt=this.parentNode.__axis;return v((vt&&isFinite(vt=vt(Vt))?vt:H(Vt))+c)})),ht.remove(),K.attr("d",t===Ua||t===Hi?s?"M"+f*s+","+X+"H"+c+"V"+W+"H"+f*s:"M"+c+","+X+"V"+W:s?"M"+X+","+f*s+"V"+c+"H"+W+"V"+f*s:"M"+X+","+c+"H"+W),at.attr("opacity",1).attr("transform",function(Vt){return v(H(Vt)+c)}),dt.attr(g+"2",f*o),st.attr(g,f*L).text(N),k.filter(xy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Hi?"start":t===Ua?"end":"middle"),k.each(function(){this.__axis=H})}return m.scale=function(S){return arguments.length?(e=S,m):e},m.ticks=function(){return n=Array.from(arguments),m},m.tickArguments=function(S){return arguments.length?(n=S==null?[]:Array.from(S),m):n.slice()},m.tickValues=function(S){return arguments.length?(a=S==null?null:Array.from(S),m):a&&a.slice()},m.tickFormat=function(S){return arguments.length?(i=S,m):i},m.tickSize=function(S){return arguments.length?(o=s=+S,m):o},m.tickSizeInner=function(S){return arguments.length?(o=+S,m):o},m.tickSizeOuter=function(S){return arguments.length?(s=+S,m):s},m.tickPadding=function(S){return arguments.length?(l=+S,m):l},m.offset=function(S){return arguments.length?(c=+S,m):c},m}function Ty(t){return Yi(Xi,t)}function $y(t){return Yi(Hi,t)}function Ru(t){return Yi(ys,t)}function Iu(t){return Yi(Ua,t)}var Sy=Object.defineProperty,Ay=(t,e,n)=>e in t?Sy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xs=(t,e,n)=>Ay(t,typeof e!="symbol"?e+"":e,n);class Ou{constructor(e){xs(this,"owner"),xs(this,"config"),xs(this,"scale");const n=zr(),{config:a,params:i}=e;this.owner=e,this.config=a,this.scale=n,(a.noTransition||!i.config.transition_duration)&&(a.withoutTransition=!0),a.range=this.scaleExtent((i.orgXScale||n).range())}static getSizeFor1Char(e,n=!0){const a={w:5.5,h:11.5};return!e.empty()&&e.text("0").call(i=>{try{const{width:o,height:s}=i.node().getBBox();o&&s&&(a.w=o,a.h=s)}finally{i.text("")}}),n&&(this.getSizeFor1Char=()=>a),a}getTickTransformSetter(e){const{config:n}=this,a=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,o)=>{i.attr("transform",s=>{const l=o(s);return De(s)?a(l):null})}}scaleExtent(e){const n=e[0],a=e[e.length-1];return n0?i:1,o]).range(e.range());s=c.ticks();for(let f=o.toFixed().length;s.length>15;f--)s=c.ticks(f);s.splice(0,1,i),s.splice(s.length-1,1,o)}else s=e.ticks(...this.config.tickArguments||[]);s=s.map(c=>ze(c)&&he(c)&&!isNaN(c)&&Math.round(c*10)/10||c)}return s}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,a=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(a):a;return Qe(i)?i:""}transitionise(e){const{config:n}=this;let a=e;if(n.withoutTransition)a=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{a=e.transition(n.transition)}catch(i){}return a}}var Ey=Object.defineProperty,by=(t,e,n)=>e in t?Ey(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,za=(t,e,n)=>by(t,typeof e!="symbol"?e+"":e,n);class Ry{constructor(e={}){za(this,"helper"),za(this,"config"),za(this,"params"),za(this,"g"),za(this,"generatedTicks");const n={innerTickSize:6,outerTickSize:e.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new Ou(this)}create(e){const n=this,{config:a,helper:i,params:o}=n,{scale:s}=i,{orient:l}=a,c=this.splitTickText.bind(n),f=/^(left|right)$/.test(l),g=/^(top|bottom)$/.test(l),v=i.getTickTransformSetter(g?"x":"y"),m=v===i.axisX?"y":"x",S=/^(top|left)$/.test(l)?-1:1,P=o.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((o.orgXScale||s).range());const{innerTickSize:N,tickLength:L,range:w}=a,X=o.id,W=X&&/^(x|y|y2)$/.test(X)?o.config[`axis_${X}_tick_text_position`]:{x:0,y:0},H=X==="subX"?"subchart_axis_x":`axis_${X}`,k=o.config[`${H}_show`],K={tick:k?o.config[`${H}_tick_show`]:!1,text:k?o.config[`${H}_tick_text_show`]:!1},at=o.config.axis_evalTextSize;let ht;e.each(function(){const $t=ot(this);let dt=this.__chart__||s,st=i.copyScale();ht=$t,this.__chart__=st,a.tickOffset=o.isCategory?(st(1)-st(0))/2:0;const Vt=$t.selectAll(".domain").data([0]);if(Vt.enter().append("path").attr("class","domain").merge(Vt).attr("d",()=>{const vt=a.outerTickSize*S;return g?`M${w[0]},${vt}V0H${w[1]}V${vt}`:`M${vt},${w[0]}H0V${w[1]}H${vt}`}),K.tick||K.text){const vt=a.tickValues||i.generateTicks(st,f);n.generatedTicks=vt;let Q=$t.selectAll(".tick").data(vt,st);const St=Q.enter().insert("g",".domain").attr("class","tick"),ct=Q.exit().remove();Q=St.merge(Q),K.tick&&St.append("line"),K.text&&St.append("text");const At=Q.select("text"),Gt=ve(at)?at.bind(n.params.owner.api)(At.node()):Ou.getSizeFor1Char(At,at),Bt=[];let Kt=At.selectAll("tspan").data((be,Oe)=>{const Ce=o.tickMultiline?c(be,st,vt,f,Gt.w):je(i.textFormatted(be))?i.textFormatted(be).concat():[i.textFormatted(be)];return Bt[Oe]=Ce.length,Ce.map(He=>({index:Oe,splitted:He}))});Kt.exit().remove(),Kt=Kt.enter().append("tspan").merge(Kt).text(be=>be.splitted),Kt.attr("x",g?0:L*S).attr("dx",(()=>{let be=0;return/(top|bottom)/.test(l)&&P&&(be=8*Math.sin(Math.PI*(P/180))*(l==="top"?-1:1)),be+(W.x||0)})()).attr("dy",(be,Oe)=>{const Ce=".71em";let He=0;return l!=="top"&&(He=Gt.h,Oe===0&&(He=f?-((Bt[be.index]-1)*(Gt.h/2)-3):W.y===0?Ce:0)),he(He)&&W.y?He+W.y:He||Ce});const ne=Q.select("line"),le=Q.select("text");if(St.select("line").attr(`${m}2`,N*S),St.select("text").attr(m,L*S),n.setTickLineTextPosition(ne,le),o.tickTitle){const be=le.select("title");(be.empty()?le.append("title"):be).text(Oe=>o.tickTitle[Oe])}if(st.bandwidth){const be=st,Oe=be.bandwidth()/2;dt=Ce=>be(Ce)+Oe,st=dt}else dt.bandwidth?dt=st:v(ct,st);Q=o.owner.state.flowing?i.transitionise(Q):o.owner.$T(Q),v(St,dt),v(Q.style("opacity",null),st)}}),this.g=ht}getGeneratedTicks(e){var n;const a=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(a>e){const o=Math.round(a/e+.1);i=this.generatedTicks.map((s,l)=>l%o===0?s:null).filter(s=>s!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:a}=this,{innerTickSize:i,range:o}=a,s=n(e)+(a.tickCentered?0:a.tickOffset);return o[0]{const N=["start","end"];return o==="top"&&N.reverse(),P?N[P>0?0:1]:"middle"},g=P=>P?`rotate(${P})`:null,v=P=>{const N=P/(o==="bottom"?15:23);return P?11.5-2.5*N*(P>0?1:-1):s},{config:{axis_rotated:m,axis_x_tick_text_inner:S}}=this.params.owner;switch(o){case"bottom":e.attr("x1",a.x).attr("x2",a.x).attr("y2",this.getTickSize.bind(this)),n.attr("x",0).attr("y",v(c)).style("text-anchor",f(c)).style("text-anchor",(P,N,{length:L})=>!m&&N===0&&(S===!0||S.first)?"start":!m&&N===L-1&&(S===!0||S.last)?"end":f(c)).attr("transform",g(c));break;case"top":e.attr("x2",0).attr("y2",-i),n.attr("x",0).attr("y",-v(c)*2).style("text-anchor",f(c)).attr("transform",g(c));break;case"left":e.attr("x2",-i).attr("y1",a.y).attr("y2",a.y),n.attr("x",-s).attr("y",l).style("text-anchor","end");break;case"right":e.attr("x2",i).attr("y2",0),n.attr("x",s).attr("y",0).style("text-anchor","start")}}splitTickText(e,n,a,i,o){const{params:s}=this,l=this.helper.textFormatted(e),c=ze(l)&&l.indexOf(` -`)>-1?l.split(` -`):[];if(c.length)return c;if(je(l))return l;let f=s.tickWidth;(!f||f<=0)&&(f=i?95:s.isCategory?(s.isInverted?n(a[0])-n(a[1]):n(a[1])-n(a[0]))-12:110);function g(v,m){let S,P,N;for(let L=1;L{const S=v+1;return Se(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var Iy=Object.defineProperty,Oy=(t,e,n)=>e in t?Iy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pr=(t,e,n)=>Oy(t,typeof e!="symbol"?e+"":e,n),Cy={getAxisInstance:function(){return this.axis||new Py(this)}};class Py{constructor(e){pr(this,"owner"),pr(this,"x"),pr(this,"subX"),pr(this,"y"),pr(this,"y2"),pr(this,"axesList",{}),pr(this,"tick",{x:null,y:null,y2:null}),pr(this,"xs",[]),pr(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Tn.axis} ${Tn[`axis${Cn(e)}`]}`}isHorizontal(e,n){const a=e.config.axis_rotated;return n?a:!a}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||cn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:a}=e;let i=n.axis_x_extent;if(i){if(ve(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),a.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const o=Yn.bind(e);i=i.map(s=>a.subX(o(s)))}}return i}init(){const e=this.owner,{config:n,$el:{main:a,axis:i},state:{clip:o}}=e,s=["x","y"];n.axis_y2_show&&s.push("y2"),s.forEach(l=>{const c=this.getAxisClassName(l);i[l]=a.append("g").attr("class",c).attr("clip-path",()=>{let f=null;return l==="x"?f=o.pathXAxis:l==="y"&&(f=o.pathYAxis),f}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:a,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?a?"top":"bottom":a?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom"}}generateAxes(e){const n=this.owner,{config:a}=n,i=[],o=a[`axis_${e}_axes`],s=a.axis_rotated;let l;e==="x"?l=s?Iu:Ru:e==="y"?l=s?Ru:Iu:e==="y2"&&(l=s?Ty:$y),o.length&&o.forEach(c=>{const f=c.tick||{},g=n.scale[e].copy();c.domain&&g.domain(c.domain),i.push(l(g).ticks(f.count).tickFormat(ve(f.format)?f.format.bind(n.api):v=>v).tickValues(f.values).tickSizeOuter(f.outer===!1?0:6))}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:a},$T:i}=e;Object.keys(this.axesList).forEach(o=>{const s=n[`axis_${o}_axes`],l=e.scale[o].copy(),c=l.range();this.axesList[o].forEach((f,g)=>{const v=f.scale().range();c.every((P,N)=>P===v[N])||f.scale().range(c);const m=`${this.getAxisClassName(o)}-${g+1}`;let S=a.select(`.${m.replace(/\s/,".")}`);S.empty()?S=a.append("g").attr("class",m).style("visibility",n[`axis_${o}_show`]?null:"hidden").call(f):(s[g].domain&&l.domain(s[g].domain),i(S).call(f.scale(l))),S.attr("transform",e.getTranslate(o,g+1))})})}setAxis(e,n,a,i){const o=this.owner;e!=="subX"&&(this.tick[e]=this.getTickValues(e)),this[e]=this.getAxis(e,n,a,e==="x"&&(o.scale.zoom||o.config.subchart_show||o.state.resizing)?!0:i)}getAxis(e,n,a,i,o){const s=this.owner,{config:l}=s,c=/^(x|subX)$/.test(e),f=c?"x":e,g=c&&this.isCategorized(),v=this.orient[e],m=o?0:s.getAxisTickRotate(f);let S;if(c)S=e==="subX"?s.format.subXAxisTick:s.format.xAxisTick;else{const X=l[`axis_${e}_tick_format`];ve(X)&&(S=X.bind(s.api))}let P=this.tick[f];const N=ea({outerTick:a,noTransition:i,config:l,id:e,tickTextRotate:m,owner:s},c&&{isCategory:g,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:g&&l.axis_x_tick_tooltip&&s.api.categories(),orgXScale:s.scale.x});c||(N.tickStepSize=l[`axis_${f}_tick_stepSize`]);const L=new Ry(N).scale(c&&s.scale.zoom||n).orient(v);if(c&&this.isTimeSeries()&&P&&!ve(P)){const X=Yn.bind(s);P=P.map(W=>X(W))}else!c&&this.isTimeSeriesY()&&(L.ticks(l.axis_y_tick_time_value),P=null);P&&L.tickValues(P),L.tickFormat(S||!c&&s.isStackNormalized()&&(X=>`${X}%`)),g&&(L.tickCentered(l.axis_x_tick_centered),qn(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=l[`axis_${f}_tick_count`];return w&&L.ticks(w),L}updateXAxisTickValues(e,n){var a;const i=this.owner,{config:o}=i,s=o.axis_x_tick_fit;let l=o.axis_x_tick_count,c;return(s||l&&s)&&(c=i.mapTargetsToUniqueXs(e),this.isCategorized()&&l>c.length&&(l=c.length),c=this.generateTickValues(c,l,this.isTimeSeries())),n?n.tickValues(c):this.x&&(this.x.tickValues(c),(a=this.subX)==null||a.tickValues(c)),c}getId(e){const{config:n,scale:a}=this.owner;let i=n.data_axes[e];return(!i||!a[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:a,format:i}=n,o=e&&a.subchart_axis_x_tick_format||a.axis_x_tick_format,s=this.isTimeSeries(),l=this.isCategorized();let c;return o?ve(o)?c=o.bind(n.api):s&&(c=f=>f?i.axisTime(o)(f):""):c=s?i.defaultAxisTime:l?n.categoryName:f=>f<0?f.toFixed(0):f,ve(c)?f=>c.apply(n,l?[f,n.categoryName(f)]:[f]):c}getTickValues(e){const n=this.owner,a=n.config[`axis_${e}_tick_values`],i=n[`${e}Axis`];return(ve(a)?a.call(n.api):a)||(i?i.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return ze(n)?n:n?n.text:null}setLabelText(e,n){const a=this.owner,{config:i}=a,o=this.getLabelOptionByAxisId(e);ze(o)?i[`axis_${e}_label`]=n:o&&(o.text=n)}getLabelPosition(e,n){const a=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),o=nr(i)&&i.position?i.position:n[+!a],s=l=>!!~o.indexOf(l);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}getLabelPositionById(e){return this.getAxisLabelPosition(e)}xForAxisLabel(e){const n=this.owner,{state:{width:a,height:i}}=n,o=this.getAxisLabelPosition(e);let s=o.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?s=o.isLeft?0:o.isCenter?a/2:a:o.isBottom&&(s=-i),s}textAnchorForAxisLabel(e){const n=this.owner,a=this.getAxisLabelPosition(e);let i=a.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=a.isLeft?"start":a.isCenter?"middle":"end":a.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,a=this.getAxisLabelPosition(e);let i=a.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=a.isLeft?"0.5em":a.isRight?"-0.5em":"0":a.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:a}=n,i=a.axis_rotated,o=this.getAxisLabelPosition(e).isInner,s=a[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const f=a.axis_x_height;i?c=o?"1.2em":-25-l:o?c="-0.5em":f?c=f-10:s?c=s-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?o?c=c[0]:s?c=s*(e==="y2"?-1:1)-c[1]:c=c[2]:c=o?c[3]:(c[4]+(a[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getMaxTickSize(e,n){const a=this.owner,{config:i,state:{current:o},$el:{svg:s,chart:l}}=a,c=o.maxTickSize[e],f=`axis_${e}`,g={width:0,height:0};if(n||!i[`${f}_show`]||c.width>0&&a.filterTargetsToShow().length===0)return c;if(s){const v=/^y2?$/.test(e),m=a.filterTargetsToShow(a.data.targets),S=a.scale[e].copy().domain(a[`get${v?"Y":"X"}Domain`](m,e)),P=S.domain(),N=P[0]===P[1]&&P.every(K=>K>0),L=je(c.domain)&&c.domain[0]===c.domain[1]&&c.domain.every(K=>K>0);if(N||L)return c.size;c.domain=P,v||c.ticks.splice(0);const w=this.getAxis(e,S,!1,!1,!0),X=i[`${f}_tick_rotate`],W=i[`${f}_tick_count`];!i[`${f}_tick_values`]&&W&&w.tickValues(this.generateTickValues(P,W,v?this.isTimeSeriesY():this.isTimeSeries())),!v&&this.updateXAxisTickValues(m,w);const k=l.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");w.create(k),k.selectAll("text").attr("transform",he(X)?`rotate(${X})`:null).each(function(K,at){const{width:ht,height:$t}=this.getBoundingClientRect();g.width=Math.max(g.width,ht),g.height=Math.max(g.height,$t),v||(c.ticks[at]=ht)}),k.remove()}return Object.keys(g).forEach(v=>{g[v]>0&&(c[v]=g[v])}),c}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:a,config:i,state:{current:o,isLegendRight:s,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),f=c>0&&c<90;if((a.isCategorized()||a.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||qn(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&f){const g=i.axis_y2_show&&o.maxTickSize.y2.width||0,v=s&&l||0,m=o.width-n.getCurrentPaddingByDirection("left"),S=this.getXAxisTickMaxOverflow(c,m-e)-g-v,P=Math.max(0,S)+e;return Math.min(P,m/2)}return 0}getXAxisTickMaxOverflow(e,n){const a=this.owner,{axis:i,config:o,state:s}=a,l=i.isTimeSeries(),c=s.current.maxTickSize.x.ticks,f=c.length,{left:g,right:v}=s.axis.x.padding;let m=0;const S=f-(l&&o.axis_x_tick_fit?.5:0);for(let L=0;L{const c=this.getLabelText(l),f=`axis${Cn(l)}`,g=Tn[`${f}Label`];if(c){let v=i.select(`text.${g}`);v.empty()&&(v=i.select(`g.${Tn[f]}`).insert("text",":first-child").attr("class",g).attr("transform",["rotate(-90)",null][l==="x"?+!s:+s]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),o(v,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,a,i){const o=he(e)?e:e[n];return De(o)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",o,i):a}generateTickValues(e,n,a){let i=e;if(n){const o=ve(n)?n():n;if(o===1)i=[e[0]];else if(o===2)i=[e[0],e[e.length-1]];else if(o>2){const s=this.isCategorized(),l=o-2,c=e[0],f=e[e.length-1],g=(f-c)/(l+1);let v;i=[c];for(let m=0;mo-s)),i}generateTransitions(e){const n=this.owner,{$el:{axis:a},$T:i}=n,[o,s,l,c]=["x","y","y2","subX"].map(f=>i(a[f],e));return{axisX:o,axisY:s,axisY2:l,axisSubX:c}}redraw(e,n,a){const i=this.owner,{config:o,state:s,$el:l}=i,c=n?"0":null;["x","y","y2","subX"].forEach(f=>{const g=this[f],v=l.axis[f];g&&v&&(!a&&!o.transition_duration&&(g.config.withoutTransition=!0),v.style("opacity",c),g.create(e[`axis${Cn(f)}`]))}),this.updateAxes(),!s.rendered&&o.axis_tooltip&&this.setAxisTooltip()}redrawAxis(e,n,a,i,o){var s,l,c;const f=this.owner,{config:g,scale:v,$el:m}=f,S=!!v.zoom;let P;!S&&this.isCategorized()&&e.length===0&&v.x.domain([0,m.axis.x.selectAll(".tick").size()]),v.x&&e.length?(!S&&f.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),g.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(s=this.subX)==null||s.tickValues([])),g.zoom_rescale&&!i&&(P=v.x.orgDomain()),["y","y2"].forEach(N=>{const L=`axis_${N}_`,w=v[N];if(w){const X=g[`${L}tick_values`],W=g[`${L}tick_count`];if(w.domain(f.getYDomain(e,N,P)),!X&&W){const H=f.axis[N],k=w.domain();H.tickValues(this.generateTickValues(k,k.every(K=>K===0)?1:W,this.isTimeSeriesY()))}}}),this.redraw(a,f.hasArcType(),o),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling(),n.Y&&((l=v.subY)==null||l.domain(f.getYDomain(e,"y")),(c=v.subY2)==null||c.domain(f.getYDomain(e,"y2")))}setCulling(){const e=this.owner,{config:n,state:{clip:a,current:i},$el:o}=e;["subX","x","y","y2"].forEach(s=>{const l=o.axis[s],f=`axis_${s==="subX"?"x":s}_tick_culling`,g=n[f];if(l&&g){const v=l.selectAll(".tick"),m=na(v.data()),S=m.length,P=n[`${f}_max`],N=n[`${f}_lines`];let L;if(S){for(let w=1;w{var f,g,v;if(ze(l)||l[c])if(s[c]=(f=o[c])==null?void 0:f.append("text").classed(Tn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),a){const m=c==="x"?"x":"y",S=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(g=s[c])==null||g.attr(m,S).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const m=c==="x"?"y":"x",S=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(v=s[c])==null||v.attr(m,S).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var wy={initEventRect(){this.$el.main.select(`.${Se.chart}`).append("g").attr("class",Zn.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:a,$el:i}=e,o=e.isMultipleX(),s=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${Zn.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Zn.eventRectsMultiple,o).classed(Zn.eventRectsSingle,!o).selectAll(`.${Zn.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),a.rendered&&e.updateEventRect(i.eventRect,!0)}if(!o){const l=e.getMaxDataCountTarget();(!n.data_xSort||s)&&l.sort((c,f)=>s?f.x-c.x:c.x-f.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),a.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:a,svg:i}}=t,o=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},s=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Co(l)&&l||!1,f=!isNaN(l)&&l||null;let g;const v=m=>{const S=m.type,N=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():f!==null&&(g=N):S==="touchmove"&&(c||g===!0||f!==null&&Math.abs(g-N)>=f)&&(g=!0,m.preventDefault())};a.on("touchstart",m=>{n.event=m,t.updateEventRect()}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!a.empty()&&a.classed(Zn.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;v(m),o(a.node())}else s()},!0).on("touchend.eventRect",m=>{n.event=m,!a.empty()&&a.classed(Zn.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},!0),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==a.node()&&s()})},updateEventRect(t,e=!1){const n=this,{state:a,$el:i}=n,{eventReceiver:o,width:s,height:l,rendered:c,resizing:f}=a,g=t||i.eventRect,v=()=>{if(o){const m=Zl(i.chart.node());o.rect=g.node().getBoundingClientRect().toJSON(),o.rect.top+=m.y,o.rect.left+=m.x}};(!c||f||e)&&(g.attr("x",0).attr("y",0).attr("width",s).attr("height",l),(!c||e)&&g.classed(Zn.eventRect,!0)),v()},updateEventType(t){const e=this,n=Co(t),a=n?e.$el.eventRect:t,i=n?t!==(a==null?void 0:a.datum().multipleX):!1;a&&(i&&(a==null||a.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(a):e.generateEventRectsForSingleX(a))},updateEventRectData(){const t=this,{config:e,scale:n,state:a}=t,i=n.zoom||n.x,o=e.axis_rotated,s=t.isMultipleX();let l,c,f,g;if(t.updateEventType(s),s)l=0,c=0,f=a.width,g=a.height;else{let S,P;if(t.axis.isCategorized())S=t.getEventRectWidth(),P=N=>i(N.x)-S/2;else{const N=({index:L})=>({prev:t.getPrevX(L),next:t.getNextX(L)});S=L=>{const w=N(L),X=i.domain();let W;return w.prev===null&&w.next===null?W=o?a.height:a.width:w.prev===null?W=(i(w.next)+i(L.x))/2:w.next===null?W=i(X[1])-(i(w.prev)+i(L.x))/2:(Object.keys(w).forEach((H,k)=>{var K;w[H]=(K=w[H])!=null?K:X[k]}),W=Math.max(0,(i(w.next)-i(w.prev))/2)),W},P=L=>{const w=N(L);let X;return w.prev===null&&w.next===null?X=0:w.prev===null?X=i(i.domain()[0]):X=(i(L.x)+i(w.prev))/2,X}}l=o?0:P,c=o?P:0,f=o?a.width:S,g=o?S:a.height}const{eventReceiver:v}=a,m=(S,P)=>ve(S)?S(P):S;v.coords.splice(v.data.length),v.data.forEach((S,P)=>{v.coords[P]={x:m(l,S),y:m(c,S),w:m(f,S),h:m(g,S)}})},selectRectForSingle(t,e){var n,a;const i=this,{config:o,$el:{main:s,circle:l}}=i,c=o.data_selection_enabled,f=o.data_selection_grouped,g=o.data_selection_isselectable,v=o.tooltip_grouped,m=i.getAllValuesOnIndex(e);if(v&&(i.showTooltip(m,t),(n=i.showGridFocus)==null||n.call(i,m),!c||f))return;!l&&s.selectAll(`.${Se.EXPANDED}:not(.${sn.shape}-${e})`).classed(Se.EXPANDED,!1);const S=s.selectAll(`.${sn.shape}-${e}`).classed(Se.EXPANDED,!0).style("cursor",g?"pointer":null).filter(function(P){return i.isWithinShape(this,P)});S.empty()&&!v&&o.interaction_onout&&((a=i.hideGridFocus)==null||a.call(i),i.hideTooltip(),!f&&i.setExpand(e)),S.call(P=>{var N,L;const w=P.data();c&&(f||g!=null&&g.bind(i.api)(w))&&(t.style.cursor="pointer"),v||(i.showTooltip(w,t),(N=i.showGridFocus)==null||N.call(i,w),(L=i.unexpandCircles)==null||L.call(i),P.each(X=>i.setExpand(e,X.id)))})},selectRectForMultipleXs(t,e=!0){const n=this,{config:a,state:i}=n,o=n.filterTargetsToShow(n.data.targets);if(i.dragging||n.hasArcType(o))return;const s=Hn(i.event,t),l=n.findClosestFromTargets(o,s);if(e&&i.mouseover&&(!l||l.id!==i.mouseover.id)&&(a.data_onout.call(n.api,i.mouseover),i.mouseover=void 0),!l){n.unselectRect();return}const f=(n.isBubbleType(l)||n.isScatterType(l)||!a.tooltip_grouped?[l]:n.filterByX(o,l.x)).map(v=>n.addName(v));n.showTooltip(f,t),n.setExpand(l.index,l.id,!0),n.showGridFocus(f);const g=n.dist(l,s);(n.isBarType(l.id)||g{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};o.on("mouseover",l=>{a.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){const c=s(l);if(a.event=l,!c)return;let{index:f}=c;const g=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(g)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],P=m.invert(Hn(l,this)[0]);g==="step-after"&&PS&&(f+=1)}e.showAxisGridFocus();const v=n.tooltip_grouped&&f===i.currentIdx;if(a.dragging||a.flowing||e.hasArcType()||v){n.tooltip_show&&v&&e.setTooltipPosition();return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{a.event=l,!(!n||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&(e.hideAxisGridFocus(),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return o},clickHandlerForSingleX(t,e){const n=e,{config:a,state:i,$el:{main:o}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:s}=t;o.selectAll(`.${sn.shape}-${s}`).each(function(l){var c;(a.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,s),a.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:a}=e;t.on("click",function(i){a.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),a.inputType==="mouse"&&t.on("mouseover mousemove",function(i){a.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{a.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:a}=e,i=e.filterTargetsToShow(e.data.targets);if(e.hasArcType(i))return;const o=Hn(a.event,this),s=e.findClosestFromTargets(i,o),l=e.getPointSensitivity(s);s&&(e.isBarType(s.id)||e.dist(s,o)+t;var Dy={generateFlow(t){const e=this,{data:n,state:a,$el:i}=e;return function(){const o=t.flow.length;a.flowing=!0,n.targets.forEach(l=>{l.values.splice(0,o)}),e.updateXGrid&&e.updateXGrid(!0);const s={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(l=>{const c=l.split(".");let f=i[c[0]];f&&c.length>1&&(f=f[c[1]]),f!=null&&f.size()&&(s[l]=f)}),e.hideGridFocus(),e.setFlowList(s,t)}},setFlowList(t,e){const n=this,{flow:a,targets:i}=e,{duration:o=e.duration,index:s,length:l,orgDataCount:c}=a,f=n.getFlowTransform(i,c,s,l),g=ec();let v;g.add(Object.keys(t).map(m=>(v=t[m].transition().ease(My).duration(o),m==="axis.x"?v=v.call(S=>{n.axis.x.setTransition(S).create(S)}):m==="region.list"?v=v.filter(n.isRegionOnX).attr("transform",f):v=v.attr("transform",f),v))),v.call(g,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:a,state:i,$el:{svg:o}}=n,s=a.axis_rotated,{flow:l,shape:c,xv:f}=e,{cx:g,cy:v,xForText:m,yForText:S}=c.pos,{done:P=()=>{},length:N}=l;N&&(["circle","text","shape","eventRect"].forEach(L=>{const w=[];for(let X=0;X{const w=t[L];if(L!=="axis.x"&&w.attr("transform",null),L==="grid.x")w.attr(i.xgridAttr);else if(L==="gridLines.x")w.attr("x1",s?0:f).attr("x2",s?i.width:f),w.select("text").attr("x",s?i.width:0).attr("y",f);else if(/^(area|bar|line)$/.test(L))w.attr("d",c.type[L]);else if(L==="text")w.attr("x",m).attr("y",S).style("fill-opacity",n.opacityForText.bind(n));else if(L==="circle")if(n.isCirclePoint())w.attr("cx",g).attr("cy",v);else{const X=H=>g(H)-a.point_r,W=H=>v(H)-a.point_r;w.attr("x",X).attr("y",W)}else L==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),a.interaction_enabled&&n.redrawEventRect(),P.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,a){const i=this,{data:o,scale:{x:s}}=i,l=o.targets[0].values;let c=i.getValueOnIndex(l,n),f=i.getValueOnIndex(l,n+a),g;const v=s.domain(),m=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(f==null?void 0:f.x)?g=s(v[0])-s(m[0]):g=i.axis.isTimeSeries()?s(v[0])-s(m[0]):s((c==null?void 0:c.x)||0)-s(f.x):l.length!==1?g=s(v[0])-s(m[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),f=i.getValueOnIndex(l,l.length-1),g=s(c.x)-s(f.x)):g=Dr(m)/2;const S=Dr(v)/Dr(m);return`translate(${g},0) scale(${S},1)`}},Ly={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:a,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,a.left)-(s?0:20),c=(s?a.top+o+10:a.bottom)+20,f=s?-(1+l):-(l-1),g=-15,v=s?a.left+20:i+10+l;t.attr("x",f).attr("y",g).attr("width",v).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:a,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,a.left)-(s?20:0),c=n.axis_y_inner,f=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),g=-(s?20:a.top),v=(s?i+15+l:a.left+20)+(c?20:0),m=(s?a.bottom+10:a.top+o)+10;t.attr("x",f).attr("y",g).attr("width",v).attr("height",m)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:a},$el:{defs:i}}=t,o=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const s=`${n.id}-xaxisticktexts`;t.appendClip(i,s),n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=s}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==a&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,a=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&a){const i=Math.sin(Math.PI/180*Math.abs(a));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:a}}=t;a&&a.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}};const Ny=t=>De(t.position)||"end",Fy=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Cu(t,e,n){return a=>{let i=t?0:e;return a.position==="start"?i=t?-n:0:a.position==="middle"&&(i=(t?-n:e)/2),i}}function Pu(t,e){e==="grid"&&t.each(function(){const n=ot(this);["x1","x2","y1","y2"].forEach(a=>n.attr(a,+n.attr(a)))})}var By={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:a}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(a.gridLines.main=a.main.insert("g",`.${Se.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${on.grid} ${on.gridLines}`),a.gridLines.main.append("g").attr("class",on.xgridLines),a.gridLines.main.append("g").attr("class",on.ygridLines),a.gridLines.x=Uc([]))},updateXGrid(t){const e=this,{config:n,scale:a,state:i,$el:{main:o,grid:s}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,a.x),f=e.axis.isCategorized()?e.axis.x.tickOffset():0,g=v=>(a.zoom||a.x)(v)+f*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:g,y2:g}:{x1:g,x2:g,y1:0,y2:i.height},s.x=o.select(`.${on.xgrids}`).selectAll(`.${on.xgrid}`).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",on.xgrid).merge(s.x),t||s.x.each(function(){const v=ot(this);Object.keys(i.xgridAttr).forEach(m=>{v.attr(m,i.xgridAttr[m]).style("opacity",()=>v.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})})},updateYGrid(){const t=this,{axis:e,config:n,scale:a,state:i,$el:{grid:o,main:s}}=t,l=n.axis_rotated,c=g=>a.y(g),f=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);o.y=s.select(`.${on.ygrids}`).selectAll(`.${on.ygrid}`).data(f),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",on.ygrid).merge(o.y),o.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Pu(o.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:a,main:i},$T:o}=e,s=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${on[`${t}gridLines`]}`).selectAll(`.${on[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);o(c.exit()).style("opacity","0").remove();const f=c.enter().append("g");f.append("line").style("opacity","0"),c=f.merge(c),c.each(function(g){const v=ot(this);v.select("text").empty()&&g.text&&v.append("text").style("opacity","0")}),o(c.attr("class",g=>`${on[`${t}gridLine`]} ${g.class||""}`.trim()).select("text").attr("text-anchor",Ny).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",Fy).attr("dy",-5)).text(function(g){var v;return(v=g.text)!=null?v:this.remove()}),a[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:a,height:i},$el:{gridLines:o},$T:s}=e,l=e.xv.bind(e),c=e.yv.bind(e);let f=o.x.select("line"),g=o.x.select("text"),v=o.y.select("line"),m=o.y.select("text");return f=s(f,t).attr("x1",n?0:l).attr("x2",n?a:l).attr("y1",n?l:0).attr("y2",n?l:i),g=s(g,t).attr("x",Cu(!n,a,i)).attr("y",l),v=s(v,t).attr("x1",n?c:0).attr("x2",n?c:a).attr("y1",n?0:c).attr("y2",n?i:c),m=s(m,t).attr("x",Cu(n,a,i)).attr("y",c),[f.style("opacity",null),g.style("opacity",null),v.style("opacity",null),m.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:{clip:n},$el:a}=t,i=e.grid_front,o=`.${i&&a.gridLines.main?on.gridLines:Se.chart}${i?" + *":""}`,s=a.main.insert("g",o).attr("clip-path",n.pathGrid).attr("class",on.grid);if(a.grid.main=s,e.grid_x_show&&s.append("g").attr("class",on.xgrids),e.grid_y_show&&s.append("g").attr("class",on.ygrids),e.axis_tooltip){const l=s.append("g").attr("class","bb-axis-tooltip");l.append("line").attr("class","bb-axis-tooltip-x"),l.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(s.append("g").attr("class",qe.xgridFocus).append("line").attr("class",qe.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&s.append("g").attr("class",qe.ygridFocus).append("line").attr("class",qe.ygridFocus))},showAxisGridFocus(){var t,e;const n=this,{config:a,format:i,state:{event:o,width:s,height:l}}=n,c=a.axis_rotated,[f,g]=Hn(o,(t=n.$el.eventRect)==null?void 0:t.node()),v={x:f,y:g};for(const[m,S]of Object.entries(n.$el.axisTooltip)){const P=m==="x"&&!c||m!=="x"&&c?"x":"y",N=v[P];let L=(e=n.scale[m])==null?void 0:e.invert(N);L&&(L=m==="x"&&n.axis.isTimeSeries()?i.xAxisTick(L):L==null?void 0:L.toFixed(2),S==null||S.attr(P,N).text(L))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(m,S){const P=ot(this);S===0?P.attr("x1",f).attr("x2",f).attr("y1",S?0:l).attr("y2",S?l:0):P.attr("x1",S?0:s).attr("x2",S?s:0).attr("y1",g).attr("y2",g)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:a,state:{width:i,height:o}}=n,s=a.axis_rotated,l=n.$el.main.selectAll(`line.${qe.xgridFocus}, line.${qe.ygridFocus}`),c=(t||[l.datum()]).filter(v=>v&&De(n.getBaseValue(v)));if(!a.tooltip_show||c.length===0||!a.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const f=a.grid_focus_edge&&!a.tooltip_grouped,g=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(v){const m=ot(this),S={x:g(v),y:n.getYScaleById(v.id)(v.value)};let P;if(m.classed(qe.xgridFocus))P=s?[null,S.x,f?S.y:i,S.x]:[S.x,f?S.y:null,S.x,o];else{const N=n.axis.getId(v.id)==="y2";P=s?[S.y,f&&!N?S.x:null,S.y,f&&N?S.x:o]:[f&&N?S.x:null,S.y,f&&!N?S.x:i,S.y]}["x1","y1","x2","y2"].forEach((N,L)=>m.attr(N,P[L]))}),Pu(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(){var t;const e=this,{state:{inputType:n,resizing:a},$el:{main:i}}=e;(n==="mouse"||!a)&&(i.selectAll(`line.${qe.xgridFocus}, line.${qe.ygridFocus}`).style("visibility","hidden"),(t=e.hideCircleFocus)==null||t.call(e))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:a,height:i,resizing:o},$el:{grid:s}}=e,l=s.main.select(`line.${qe.xgridFocus}`);if(n==="touch")l.empty()?o&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?a:-10).attr("y1",c?-10:0).attr("y2",c?-10:i)}return!0},generateGridData(t,e){const n=this,a=n.$el.main.select(`.${Tn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const o=n.getXDomain(),[s,l]=o.map(c=>c.getFullYear());for(let c=s;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(10),i.length>a&&(i=i.filter(o=>String(o).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(je(t)?t.concat():[t]).forEach(a=>{("value"in a&&e.value===a.value||"class"in a&&e.class===a.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:a,$T:i}=n,o=n.getGridFilterToRemove(t),s=g=>!o(g),l=e?on.xgridLines:on.ygridLines,c=e?on.xgridLine:on.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(o)).style("opacity","0").remove();const f=`grid_${e?"x":"y"}_lines`;a[f]=a[f].filter(s)}},Uy={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",$a.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:a}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${$a.region}`).data(e.regions);a(i.exit()).style("opacity","0").remove();const o=i.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(s){var l;ot(this).select("text").empty()&&((l=s.label)!=null&&l.text)&&ot(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:a}=e,i=e.regionX.bind(e),o=e.regionY.bind(e),s=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=a(l,t).attr("x",i).attr("y",o).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=a(c,t).text(f=>{var g;return(g=f.label)==null?void 0:g.text}).attr("transform",({label:f})=>f.rotated?" rotate(-90)":null).attr("transform",function(f){var g;const{x:v=0,y:m=0,center:S=!1,rotated:P=!1}=(g=f.label)!=null?g:{},N=this.previousElementSibling,L={x:0,y:0};return ze(S)&&["x","y"].forEach((w,X)=>{S.indexOf(w)>-1&&(L[w]=(+N.getAttribute(s[X])-Ma(this)[s[X]])/2)}),`translate(${i(f)+L.x+v}, ${o(f)+L.y+m})${P?" rotate(-90)":""}`}).attr("text-anchor",({label:f})=>f!=null&&f.rotated?"end":null).attr("dy","1em").style("fill",({label:f})=>{var g;return(g=f==null?void 0:f.color)!=null?g:null}),[l.style("fill-opacity",f=>De(f.opacity)?f.opacity:null).on("end",function(){ot(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:a,scale:i,state:o}=n,s=a.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",f=!l&&n[c?"regionX":"regionY"](e);let g=l?"start":"end",v=l?0:o[t],m;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?g="start":l&&!c&&(g="end"),(c?s:!s)&&g in e&&(m=i[e.axis])):(c?!s:s)&&g in e&&(m=i.zoom||i.x),m){let S=0;v=e[g],n.axis.isTimeSeries(e.axis)?v=Yn.call(n,v):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(v)&&(v=a.axis_x_categories.indexOf(v),S=n.axis.x.tickOffset()*(g==="start"?-1:1)),v=m(v)+S}return l?v:v0&&(!i.axis_x_tick_autorotate||a.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||L)&&N.height>S&&(P+=N.height-S),P+(a.axis.getLabelPositionById(t).isInner?0:10)+(t==="y2"&&!f?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,a=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,a?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:a,state:i,$el:o}=e;let s=a[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(a.axis_x_tick_fit&&l){const c=a.axis_x_tick_count,f=i.current.maxTickSize.x.ticks.length;let g=0;if(c?g=c>f?f:c:f&&(g=f),g!==i.axis.x.tickCount){const{targets:v}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(v,"min"),e.getXDomainMinMax(v,"max")],g)}i.axis.x.tickCount=g}o.svg&&a.axis_x_tick_autorotate&&a.axis_x_tick_fit&&!a.axis_x_tick_multiline&&!a.axis_x_tick_culling&&l&&(s=e.needToRotateXAxisTickTexts()?a.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:a,legendItemWidth:i}}=t,o=a&&i,s=n.width-o-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),f=l?s/l:0;return c>f}},jy={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},Vy={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Gy={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},Xy=Object.defineProperty,wu=Object.getOwnPropertySymbols,Hy=Object.prototype.hasOwnProperty,Yy=Object.prototype.propertyIsEnumerable,Mu=(t,e,n)=>e in t?Xy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ts=(t,e)=>{for(var n in e||(e={}))Hy.call(e,n)&&Mu(t,n,e[n]);if(wu)for(var n of wu(e))Yy.call(e,n)&&Mu(t,n,e[n]);return t},Wy=Ts(Ts(Ts({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},jy),Vy),Gy),Ky={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0},Zy={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const Jy=[sy,ly,cy,uy,fy,dy,hy],Du={axis:Cy,clip:Ly,eventrect:wy,flow:Dy,grid:By,region:Uy,sizeAxis:zy},Lu={optDataAxis:Zy,optAxis:Wy,optGrid:Ky};var I1=Array.prototype.slice;function $s(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Le(t){return function(){return t}}function Qy(t,e){return et?1:e>=t?0:NaN}function ky(t){return t}function qy(){var t=ky,e=Qy,n=null,a=Le(0),i=Le(zi),o=Le(0);function s(l){var c,f=(l=$s(l)).length,g,v,m=0,S=new Array(f),P=new Array(f),N=+a.apply(this,arguments),L=Math.min(zi,Math.max(-zi,i.apply(this,arguments)-N)),w,X=Math.min(Math.abs(L)/f,o.apply(this,arguments)),W=X*(L<0?-1:1),H;for(c=0;c0&&(m+=H);for(e!=null?S.sort(function(k,K){return e(P[k],P[K])}):n!=null&&S.sort(function(k,K){return n(l[k],l[K])}),c=0,v=m?(L-f*W)/m:0;c0?H*v:0)+W,P[g]={data:l[g],index:c,value:H,startAngle:N,endAngle:w,padAngle:X};return P}return s.value=function(l){return arguments.length?(t=typeof l=="function"?l:Le(+l),s):t},s.sortValues=function(l){return arguments.length?(e=l,n=null,s):e},s.sort=function(l){return arguments.length?(n=l,e=null,s):n},s.startAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Le(+l),s):a},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Le(+l),s):i},s.padAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Le(+l),s):o},s}var _y=Math.pow;const Ss=Math.PI,As=2*Ss,Gr=1e-6,tx=As-Gr;function Nu(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Nu;const n=_y(10,e);return function(a){this._+=a[0];for(let i=1,o=a.length;iGr)if(!(Math.abs(v*c-f*g)>Gr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let S=a-s,P=i-l,N=c*c+f*f,L=S*S+P*P,w=Math.sqrt(N),X=Math.sqrt(m),W=o*Math.tan((Ss-Math.acos((N+m-L)/(2*w*X)))/2),H=W/X,k=W/w;Math.abs(H-1)>Gr&&this._append`L${e+H*g},${n+H*v}`,this._append`A${o},${o},0,0,${+(v*S>g*P)},${this._x1=e+k*c},${this._y1=n+k*f}`}}arc(e,n,a,i,o,s){if(e=+e,n=+n,a=+a,s=!!s,a<0)throw new Error(`negative radius: ${a}`);let l=a*Math.cos(i),c=a*Math.sin(i),f=e+l,g=n+c,v=1^s,m=s?i-o:o-i;this._x1===null?this._append`M${f},${g}`:(Math.abs(this._x1-f)>Gr||Math.abs(this._y1-g)>Gr)&&this._append`L${f},${g}`,a&&(m<0&&(m=m%As+As),m>tx?this._append`A${a},${a},0,1,${v},${e-l},${n-c}A${a},${a},0,1,${v},${this._x1=f},${this._y1=g}`:m>Gr&&this._append`A${a},${a},0,${+(m>=Ss)},${v},${this._x1=e+a*Math.cos(o)},${this._y1=n+a*Math.sin(o)}`)}rect(e,n,a,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${a=+a}v${+i}h${-a}Z`}toString(){return this._}}function nx(){return new Wi}nx.prototype=Wi.prototype;function O1(t=3){return new Wi(+t)}function Es(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const a=Math.floor(n);if(!(a>=0))throw new RangeError(`invalid digits: ${n}`);e=a}return t},()=>new Wi(e)}function rx(t){return t.innerRadius}function ax(t){return t.outerRadius}function ix(t){return t.startAngle}function ox(t){return t.endAngle}function sx(t){return t&&t.padAngle}function lx(t,e,n,a,i,o,s,l){var c=n-t,f=a-e,g=s-i,v=l-o,m=v*c-g*f;if(!(m*mQ*Q+St*St&&(ht=dt,$t=st),{cx:ht,cy:$t,x01:-g,y01:-v,x11:ht*(i/k-1),y11:$t*(i/k-1)}}function Fu(){var t=rx,e=ax,n=Le(0),a=null,i=ix,o=ox,s=sx,l=null,c=Es(f);function f(){var g,v,m=+t.apply(this,arguments),S=+e.apply(this,arguments),P=i.apply(this,arguments)-Ui,N=o.apply(this,arguments)-Ui,L=Hc(N-P),w=N>P;if(l||(l=g=c()),Sbn))l.moveTo(0,0);else if(L>zi-bn)l.moveTo(S*jr(P),S*rr(P)),l.arc(0,0,S,P,N,!w),m>bn&&(l.moveTo(m*jr(N),m*rr(N)),l.arc(0,0,m,N,P,w));else{var X=P,W=N,H=P,k=N,K=L,at=L,ht=s.apply(this,arguments)/2,$t=ht>bn&&(a?+a.apply(this,arguments):oa(m*m+S*S)),dt=fs(Hc(S-m)/2,+n.apply(this,arguments)),st=dt,Vt=dt,vt,Q;if($t>bn){var St=Yc($t/m*rr(ht)),ct=Yc($t/S*rr(ht));(K-=St*2)>bn?(St*=w?1:-1,H+=St,k-=St):(K=0,H=k=(P+N)/2),(at-=ct*2)>bn?(ct*=w?1:-1,X+=ct,W-=ct):(at=0,X=W=(P+N)/2)}var At=S*jr(X),Gt=S*rr(X),Bt=m*jr(k),Kt=m*rr(k);if(dt>bn){var ne=S*jr(W),le=S*rr(W),be=m*jr(H),Oe=m*rr(H),Ce;if(Lbn?Vt>bn?(vt=Ki(be,Oe,At,Gt,S,Vt,w),Q=Ki(ne,le,Bt,Kt,S,Vt,w),l.moveTo(vt.cx+vt.x01,vt.cy+vt.y01),Vtbn)||!(K>bn)?l.lineTo(Bt,Kt):st>bn?(vt=Ki(Bt,Kt,ne,le,m,-st,w),Q=Ki(At,Gt,be,Oe,m,-st,w),l.lineTo(vt.cx+vt.x01,vt.cy+vt.y01),ste in t?cx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gx=(t,e)=>{for(var n in e||(e={}))dx.call(e,n)&&Uu(t,n,e[n]);if(Bu)for(var n of Bu(e))hx.call(e,n)&&Uu(t,n,e[n]);return t},vx=(t,e)=>ux(t,fx(e));function zu(t=0){const e=this,{config:n,state:a}=e,i=e.hasMultiArcGauge(),o=a.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,s=t?Math.min(a.radiusExpanded*t-a.radius,o*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?a.radius-o*(l.index+1):he(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let f;if(i)f=a.radius-o*l.index+s;else if(e.hasType("polar")&&!t)f=e.getPolarOuterRadius(l,c);else if(f=c,t){let{radiusExpanded:g}=a;a.radius!==c&&(g-=Math.abs(a.radius-c)),f=g*t}return f},corner(l,c){const{arc_cornerRadius_ratio:f=0,arc_cornerRadius:g=0}=n,{data:{id:v},value:m}=l;let S=0;return f?S=f*c:S=he(g)?g:g.call(e.api,v,m,c),S}}}function bs(t){return function(e){const n=({startAngle:i=0,endAngle:o=0,padAngle:s=0})=>({startAngle:i,endAngle:o,padAngle:s}),a=Qr(n(this._current),n(e));return this._current=e,function(i){const o=a(i),{data:s,index:l,value:c}=e;return t(vx(gx({},o),{data:s,index:l,value:c}))}}}var px={initPie(){const t=this,{config:e}=t,n=e.data_type,a=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,o=(a?a*.01:e[`${n}_padAngle`])||0;t.pie=qy().startAngle(i).endAngle(i+2*Math.PI).padAngle(o).value(s=>{var l,c;return(c=(l=s.values)==null?void 0:l.reduce((f,g)=>f+g.value,0))!=null?c:s}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,a=e.data_type,i=e[`${a}_padding`],o=e.gauge_width||e.donut_width,s=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=o?(n.radius-o)/n.radius:.6,n.gaugeArcWidth=o||(s<=n.radius-n.innerRadius?n.radius-n.innerRadius:s<=n.radius?s:n.radius);const l=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:l},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:a,outerRadius:i}=e.state;return!he(a)&&n&&(a=a[n.id]||0),Be(i)&&n&&n.id in i?i=i[n.id]:he(i)||(i=e.state.radius),{innerRadius:a,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let a=2*(n/360);return n<-360?a=-2:n>360&&(a=2),a*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,a=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,o=Math.PI/2;let s=e[`${n}_startingAngle`]||0;return!a&&s<=i?s=i:!a&&s>=o?s=o:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle(t,e=!1){var n;const a=this,{config:i,state:o}=a,s=e&&a.hasType("gauge");let{pie:l}=a,c=t,f=!1;if(!i)return null;const g=a.getStartingAngle(),v=i.gauge_fullCircle||e&&!s?a.getArcLength():g*-2;if(c.data&&a.isGaugeType(c.data)&&!a.hasMultiArcGauge()){const{gauge_min:m,gauge_max:S}=i,P=a.getTotalDataSum(o.rendered),N=v*((P-m)/(S-m));l=l.startAngle(g).endAngle(N+g)}if(e===!1&&l(a.filterTargetsToShow()).forEach((m,S)=>{var P;!f&&m.data.id===((P=c.data)==null?void 0:P.id)&&(f=!0,c=m,c.index=S)}),isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||a.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,P=e&&!s?a.getTotalDataSum(o.rendered):S,N=v/(P-m),L=(n=c.value)!=null?n:0,w=L{const l=e.updateAngle(s),c=a(l);let f=0;return l&&(f=i(l,c)),l?o.cornerRadius(f)(l):"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:a,$T:i}=t,o=e.arc_rangeText_format,s=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",f=t.getTotalDataSum(a.rendered);c&&(l=l.map(m=>f/100*m));const g=t.pie(l).map((m,S)=>(m.index=S,m));let v=n.selectAll(`.${Ve.arcRange}`).data(l);v.exit(),v=i(v.enter().append("text").attr("class",Ve.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(m=>{const S=c?m/f*100:m;return ve(o)?o(S):`${S}${c?"%":""}`}).merge(v)),(!a.rendered||a.rendered&&!s)&&f>0&&v.attr("transform",(m,S)=>t.transformForArcLabel(g[S],!0)),v.style("opacity",m=>!s&&(m>f||f===0)?"0":null)}},transformForArcLabel(t,e=!1){var n,a,i;const o=this,{config:s,state:{radiusExpanded:l}}=o,c=o.updateAngle(t,e);let f="";if(c){if(e||o.hasMultiArcGauge()){const g=Math.sin(c.endAngle-Math.PI/2),v=s.arc_rangeText_position;let m=Math.cos(c.endAngle-Math.PI/2)*(l+(e?5:25)),S=g*(l+15-Math.abs(g*10))+3;if(e&&v){const P=s.arc_rangeText_values,N=ve(v)?v(P[t.index]):v;m+=(n=N==null?void 0:N.x)!=null?n:0,S+=(a=N==null?void 0:N.y)!=null?a:0}f=`translate(${m},${S})`}else if(!o.hasType("gauge")||o.data.targets.length>1){let{outerRadius:g}=o.getRadius(t);o.hasType("polar")&&(g=o.getPolarOuterRadius(t,g));const v=this.svgArc.centroid(c),[m,S]=v.map(L=>isNaN(L)?0:L),P=Math.sqrt(m*m+S*S);let N=(i=["donut","gauge","pie","polar"].filter(o.hasType.bind(o)).map(L=>s[`${L}_label_ratio`]))==null?void 0:i[0];N?N=ve(N)?N.bind(o.api)(t,g,P):N:N=g&&(P?(36/g>.375?1.175-36/g:.8)*g/P:0),f=`translate(${m*N},${S*N})`}}return f},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){const e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",a=>e.updateTextBGColor.bind(e)(a,e.config.data_labels_backgroundColors)).each(function(a){var i;const o=ot(this),s=e.updateAngle(a),l=e.getRatio("arc",s);if(e.meetsLabelThreshold(l,(i=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))==null?void 0:i[0])){const{value:f}=s||a,g=(e.getArcLabelFormat()||e.defaultArcValueFormat)(f,l,a.data.id).toString();wa(o,g,[-1,1],n)}else o.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:a}=e;if(n){const o=setInterval(()=>{n||(clearInterval(o),a.legend.selectAll(`.${qe.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);a.svg.selectAll(e.selectorTargets(i,`.${Ve.chartArc}`)).each(function(o){if(!e.shouldExpand(o.data.id))return;const s=e.getExpandConfig(o.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(o.data.id,"rate"));ot(this).selectAll("path").transition().duration(s).attrTween("d",bs(e.svgArcExpanded.bind(e))).transition().duration(s*2).attrTween("d",bs(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:a}}=e;if(n)return;const i=e.mapToTargetIds(t);a.selectAll(e.selectorTargets(i,`.${Ve.chartArc}`)).selectAll("path").transition().duration(o=>e.getExpandConfig(o.data.id,"duration")).attrTween("d",bs(e.svgArc.bind(e))),a.selectAll(`${Ve.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:a}=n,i={duration:50,rate:.98};let o;return n.isDonutType(t)?o="donut":n.isGaugeType(t)?o="gauge":n.isPieType(t)&&(o="pie"),o?a[`${o}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel(){const t=this,{config:e}=t;return["donut","gauge","pie","polar"].some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelFormat(){const t=this,{config:e}=t;let n=a=>a;return["donut","gauge","pie","polar"].filter(t.hasType.bind(t)).forEach(a=>{n=e[`${a}_label_format`]}),ve(n)?n.bind(t.api):n},updateTargetsForArc(t){const e=this,{$el:n}=e,a=e.hasType("gauge"),i=e.getChartClass("Arc"),o=e.getClass("arcs",!0),s=e.classFocus.bind(e),l=n.main.select(`.${Ve.chartArcs}`),c=l.selectAll(`.${Ve.chartArc}`).data(e.pie(t)).attr("class",g=>i(g)+s(g.data)),f=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Ve.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));f.append("g").attr("class",o).merge(c),f.append("text").attr("dy",a&&!e.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${Se.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${Se.chart}`).append("g").attr("class",Ve.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),a=e.hasType("gauge");if(n){const i=a?Un.chartArcsGaugeTitle:Ve.chartArcsTitle;let o=e.$el.arcs.select(`.${i}`);o.empty()&&(o=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),a&&o.attr("dy","-0.3em"),wa(o,n,a?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,a=t.getArcTitle();if(a&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(a)){let i=n.current.needle;return he(i)||(i=e.arc_needle_value),bi(a,{NEEDLE_VALUE:he(i)?i:0})}return!1},redrawArc(t,e,n){const a=this,{config:i,state:o,$el:{main:s}}=a,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let f=s.selectAll(`.${Ve.arcs}`).selectAll(`.${Ve.arc}`).data(a.arcData.bind(a));f.exit().transition().duration(e).style("opacity","0").remove(),f=f.enter().append("path").attr("class",a.getClass("arc",!0)).style("fill",g=>a.color(g.data)).style("cursor",g=>{var v;return(v=c==null?void 0:c.bind)!=null&&v.call(c,a.api)(g)?"pointer":null}).style("opacity","0").each(function(g){a.isGaugeType(g.data)&&(g.startAngle=i.gauge_startingAngle,g.endAngle=i.gauge_startingAngle),this._current=g}).merge(f),a.hasType("gauge")&&(a.updateGaugeMax(),a.hasMultiArcGauge()&&a.redrawArcGaugeLine()),f.attr("transform",g=>!a.isGaugeType(g.data)&&n?"scale(0)":"").style("opacity",function(g){return g===this._current?"0":null}).each(()=>{o.transiting=!0}).transition().duration(t).attrTween("d",function(g){const v=a.updateAngle(g);if(!v)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const m=Qr(this._current,v);return this._current=m(0),function(S){const P=m(S);return P.data=g.data,a.getArc(P,!0)}}).attr("transform",n?"scale(1)":"").style("fill",g=>{let v;return a.levelColor?(v=a.levelColor(g.data.values[0].value),i.data_colors[g.data.id]=v):v=a.color(g.data),v}).style("opacity",null).call(Si,function(){if(a.levelColor){const g=ot(this),v=g.datum(this._current);a.updateLegendItemColor(v.data.id,g.style("fill"))}o.transiting=!1,_e(i.onrendered,a.api)}),l&&a.bindArcEvent(f),a.hasType("polar")&&a.redrawPolar(),a.hasType("gauge")&&a.redrawBackgroundArcs(),i.arc_needle_show&&a.redrawNeedle(),a.redrawArcText(t),a.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:a,radius:i}}=t,o=(i-1)/100*n.arc_needle_length,s=a.length!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ve.needle}`);const c=n.arc_needle_path,f=n.arc_needle_bottom_width/2,g=n.arc_needle_top_width/2,v=n.arc_needle_top_rx,m=n.arc_needle_top_ry,S=n.arc_needle_bottom_len,P=n.arc_needle_bottom_rx,N=n.arc_needle_bottom_ry,L=t.getNeedleAngle(),w=()=>{const X=t.getArcTitleWithNeedleValue();X&&t.setArcTitle(X)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Ve.needle,!0),e.needle=l,e.needle.updateHelper=(X,W=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(X)}deg)`).call(Si,()=>{W&&(n.arc_needle_value=X),w()})}),s){const X=ve(c)?c.call(t,o):`M-${f} ${S} A${P} ${N} 0 0 0 ${f} ${S} L${g} -${o} A${v} ${m} 0 0 0 -${g} -${o} L-${f} ${S} Z`;t.$T(l).attr("d",X).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${L}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:a}=e,i=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let l=Qe(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,f=0;if(he(l)||(l=o&&e.data.targets.length===1?s:0),a.current.needle=l,o){c=e.getStartingAngle();const g=n.gauge_fullCircle?i:c*-2,{gauge_min:v,gauge_max:m}=n;f=g*((l-v)/(m-v))}else f=i*(l/s);return(c+f)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,a=t.hasMultiArcGauge(),i=e.gauge_fullCircle,o=t.filterTargetsToShow(t.data.targets).length===0&&!!e.data_empty_label_text,s=t.getStartingAngle(),l=i?s+t.getArcLength():s*-1;let c=t.$el.arcs.select(`${a?"g":""}.${Ve.chartArcsBackground}`);if(a){let f=0;c=c.selectAll(`path.${Ve.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(g,v)=>`${Ve.chartArcsBackground} ${Ve.chartArcsBackground}-${v}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:g})=>{if(o||n.hiddenTargetIds.indexOf(g)>=0)return"M 0 0";const v={data:[{value:e.gauge_max}],startAngle:s,endAngle:l,index:f++};return t.getArc(v,!0,!0)}),c.exit().remove()}else c.attr("d",o?"M 0 0":()=>{const f={data:[{value:e.gauge_max}],startAngle:s,endAngle:l};return t.getArc(f,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:a}=e,i=a.inputType==="touch",o=a.inputType==="mouse";function s(c,f,g){e.expandArc(g),e.api.focus(g),e.toggleFocusLegend(g,!0),e.showTooltip([f],c)}function l(c){const f=(c==null?void 0:c.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(c,f,g){var v;const m=e.updateAngle(f);let S;m&&(S=e.convertToArcData(m),(v=e.toggleShape)==null||v.call(e,this,S,g),n.data_onclick.bind(e.api)(S,this))}),o&&t.on("mouseover",function(c,f){if(a.transiting)return;a.event=c;const g=e.updateAngle(f),v=g?e.convertToArcData(g):null,m=(v==null?void 0:v.id)||void 0;s(this,v,m),e.setOverOut(!0,v)}).on("mouseout",(c,f)=>{if(a.transiting||!n.interaction_onout)return;a.event=c;const g=e.updateAngle(f),v=g?e.convertToArcData(g):null;l(),e.setOverOut(!1,v)}).on("mousemove",function(c,f){const g=e.updateAngle(f),v=g?e.convertToArcData(g):null;a.event=c,e.showTooltip([v],this)}),i&&e.hasArcType()&&!e.radars){const c=f=>{var g,v;const{clientX:m,clientY:S}=(v=(g=f.changedTouches)==null?void 0:g[0])!=null?v:{clientX:0,clientY:0};return ot(gn.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(a.transiting)return;a.event=f;const v=c(f).datum(),m=v!=null&&v.data&&v.data.id?e.updateAngle(v):null,S=m?e.convertToArcData(m):null,P=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),ln(P)?l():s(this,S,P)})}},redrawArcText(t){const e=this,{config:n,state:a,$el:{main:i,arcs:o}}=e,s=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(s&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Ve.chartArc}`).select("text").style("opacity","0").attr("class",f=>e.isGaugeType(f.data)?Un.gaugeValue:null).call(e.textForArcLabel.bind(e)).attr("transform",f=>e.transformForArcLabel.bind(e)(f)).style("font-size",f=>e.isGaugeType(f.data)&&e.data.targets.length===1&&!l?`${Math.round(a.radius/5)}px`:null).transition().duration(t).style("opacity",f=>e.isTargetToShow(f.data.id)&&e.isArcType(f.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Ve.chartArcsTitle}`).style("opacity",e.hasType("donut")||s?null:"0"),s){const f=n.gauge_fullCircle;f&&(c==null||c.attr("dy",`${l?0:Math.round(a.radius/14)}`)),n.gauge_label_show&&(o.select(`.${Un.chartArcsGaugeUnit}`).attr("dy",`${f?1.5:.75}em`).text(n.gauge_units),o.select(`.${Un.chartArcsGaugeMin}`).attr("dx",`${-1*(a.innerRadius+(a.radius-a.innerRadius)/(f?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!f&&o.select(`.${Un.chartArcsGaugeMax}`).attr("dx",`${a.innerRadius+(a.radius-a.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,a=he(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${Se.target} path`).filter(a)}};function ju(t){return t[0]}function Vu(t){return t[1]}function Gu(t,e){var n=Le(!0),a=null,i=gs,o=null,s=Es(l);t=typeof t=="function"?t:t===void 0?ju:Le(t),e=typeof e=="function"?e:e===void 0?Vu:Le(e);function l(c){var f,g=(c=$s(c)).length,v,m=!1,S;for(a==null&&(o=i(S=s())),f=0;f<=g;++f)!(f=S;--P)l.point(W[P],H[P]);l.lineEnd(),l.areaEnd()}w&&(W[m]=+t(L,m,v),H[m]=+e(L,m,v),l.point(a?+a(L,m,v):W[m],n?+n(L,m,v):H[m]))}if(X)return l=null,X+""||null}function g(){return Gu().defined(i).curve(s).context(o)}return f.x=function(v){return arguments.length?(t=typeof v=="function"?v:Le(+v),a=null,f):t},f.x0=function(v){return arguments.length?(t=typeof v=="function"?v:Le(+v),f):t},f.x1=function(v){return arguments.length?(a=v==null?null:typeof v=="function"?v:Le(+v),f):a},f.y=function(v){return arguments.length?(e=typeof v=="function"?v:Le(+v),n=null,f):e},f.y0=function(v){return arguments.length?(e=typeof v=="function"?v:Le(+v),f):e},f.y1=function(v){return arguments.length?(n=v==null?null:typeof v=="function"?v:Le(+v),f):n},f.lineX0=f.lineY0=function(){return g().x(t).y(e)},f.lineY1=function(){return g().x(t).y(n)},f.lineX1=function(){return g().x(a).y(e)},f.defined=function(v){return arguments.length?(i=typeof v=="function"?v:Le(!!v),f):i},f.curve=function(v){return arguments.length?(s=v,o!=null&&(l=s(o)),f):s},f.context=function(v){return arguments.length?(v==null?o=l=null:l=s(o=v),f):o},f}var sa={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?$n.circles:ur.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea(t,e=!1){const n=this,{config:a,state:i,$el:o,$T:s}=n,l=e?o.subchart:o;a.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${ti.areas}`).selectAll(`.${ti.area}`).data(n.lineData.bind(n));s(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=ot(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const a=this,{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:o}=a.state;return[a.$T(i,e,gr()).attr("d",t).style("fill",a.updateAreaColor.bind(a)).style("opacity",s=>String(a.isAreaRangeType(s)?o/1.75:o))]},generateDrawArea(t,e){const n=this,{config:a}=n,i=a.line_connectNull,o=a.axis_rotated,s=n.generateGetAreaPoints(t,e),l=n.getYScaleById.bind(n),c=v=>(e?n.subxx:n.xx).call(n,v),f=(v,m)=>n.isGrouped(v.id)?s(v,m)[0][1]:l(v.id,e)(n.isAreaRangeType(v)?n.getRangedData(v,"high"):n.getShapeYMin(v.id)),g=(v,m)=>n.isGrouped(v.id)?s(v,m)[1][1]:l(v.id,e)(n.isAreaRangeType(v)?n.getRangedData(v,"low"):v.value);return v=>{let m=i?n.filterRemoveNull(v.values):v.values,S=0,P=0,N;if(n.isAreaType(v)){let L=mx();L=o?L.y(c).x0(f).x1(g):L.x(c).y0(a.area_above?0:a.area_below?n.state.height:f).y1(g),i||(L=L.defined(w=>n.getBaseValue(w)!==null)),n.isStepType(v)&&(m=n.convertValuesToStep(m)),N=L.curve(n.getCurve(v))(m)}else m[0]&&(S=n.scale.x(m[0].x),P=n.getYScaleById(v.id)(m[0].value)),N=o?`M ${P} ${S}`:`M ${S} ${P}`;return N||"M 0 0"}},generateGetAreaPoints(t,e){const n=this,{config:a}=n,i=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n);return function(c,f){const g=l.call(n,c.id,e)(n.getShapeYMin(c.id)),v=s(c,f)||g,m=i(c),S=c.value;let P=o(c);return a.axis_rotated&&(S>0&&Pg.values.some(v=>he(v.value)||e.isBarRangeType(v)))).attr("class",g=>i(g)+s(g)).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events",e.getStylePropValue("none")).append("g").attr("class",o).style("cursor",g=>{var v;return(v=l==null?void 0:l.bind)!=null&&v.call(l,e.api)(g)?"pointer":null}).call(e.setCssRule(!0,` .${Kn.bar}`,["fill"],e.color))},updateBar(t,e=!1){const n=this,{config:a,$el:i,$T:o}=n,s=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);a.bar_linearGradient&&n.updateLinearGradient();const f=s.main.selectAll(`.${Kn.bars}`).selectAll(`.${Kn.bar}`).data(n.labelishData.bind(n));o(f.exit(),t).style("opacity","0").remove(),s.bar=f.enter().append("path").attr("class",l).style("fill",n.updateBarColor.bind(n)).merge(f).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},updateBarColor(t){const e=this,n=e.getStylePropValue(e.color);return e.config.bar_linearGradient?e.getGradienColortUrl(t.id):n?n(t):null},redrawBar(t,e,n=!1){const a=this,{bar:i}=n?a.$el.subchart:a.$el;return[a.$T(i,e,gr()).attr("d",o=>(he(o.value)||a.isBarRangeType(o))&&t(o)).style("fill",a.updateBarColor.bind(a)).style("clip-path",o=>o.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:a}=n,i=n.generateGetBarPoints(t,e),o=a.axis_rotated,s=a.bar_radius,l=a.bar_radius_ratio,c=he(s)&&s>0?()=>s:he(l)?f=>f*l:null;return(f,g)=>{const v=i(f,g),m=+o,S=+!m,P=f.value<0,N=a[`axis_${n.axis.getId(f.id)}_inverted`],L=!N&&P||N&&!P,w=["",""],X=n.isGrouped(f.id),W=c&&X?n.isStackingRadiusData(f):!1,H=[v[0][m],v[0][S]];let k=0;if(f.clipPath=null,c){const ht=o?S:m,$t=v[2][ht]-v[0][ht];k=!X||W?c($t):0;const dt=`a${k} ${k} ${L?"1 0 0":"0 0 1"} `;w[+!o]=`${dt}${k},${k}`,w[+o]=`${dt}${[-k,k][o?"sort":"reverse"]()}`,L&&w.reverse()}const K=o?v[1][m]+(L?k:-k):v[1][S]+(L?-k:k);if(k){let ht="";o?L&&H[0]K&&(ht=`0 0 0 ${H[0]-K}px`):L&&H[1]>K?ht=`${H[1]-K}px 0 0 0`:!L&&H[1]-1){const m=n.bar.filter(S=>S.id===s&&S.value===c);return!m.empty()&&/a\d+/i.test(m.attr("d"))}const f=a.data_groups.find(m=>m.indexOf(s)>-1),v=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(m=>f.indexOf(m.id)>-1).map(m=>m.values.filter(S=>S.index===l&&(he(c)&&c>0?S.value>0:S.value<0))[0]).filter(Boolean).map(m=>m.id);return c!==0&&v.indexOf(s)===v.length-1},generateGetBarPoints(t,e){const n=this,{config:a}=n,i=e?n.axis.subX:n.axis.x,o=n.getIndicesMax(t)+1,s=n.getBarW("bar",i,o),l=n.getShapeX(s,t,!!e),c=n.getShapeY(!!e),f=n.getShapeOffset(n.isBarType,t,!!e),g=n.getYScaleById.bind(n);return(v,m)=>{const{id:S}=v,P=g.call(n,S,e)(n.getShapeYMin(S)),N=f(v,m)||P,L=he(s)?s:s[v.id]||s._$width,w=a[`axis_${n.axis.getId(S)}_inverted`],X=v.value,W=l(v);let H=c(v);a.axis_rotated&&!w&&(X>0&&He.isBubbleZType(s)?e.getBubbleZData(s.value,"y"):Be(s.value)?s.value.mid:s.value)),i=n*n*Math.PI,o=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(i/a);return Math.sqrt(o/Math.PI)},getBubbleZData(t,e){return Be(t)?t[e]:t[e==="y"?0:1]}},Tx=Object.defineProperty,Xu=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Sx=Object.prototype.propertyIsEnumerable,Hu=(t,e,n)=>e in t?Tx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ax=(t,e)=>{for(var n in e||(e={}))$x.call(e,n)&&Hu(t,n,e[n]);if(Xu)for(var n of Xu(e))Sx.call(e,n)&&Hu(t,n,e[n]);return t},Ex={initCandlestick(){const{$el:t}=this;t.candlestick=t.main.select(`.${Se.chart}`).append("g").attr("class",cr.chartCandlesticks)},updateTargetsForCandlestick(t){const e=this,{$el:n}=e,a=e.getChartClass("Candlestick");n.candlestick||e.initCandlestick(),e.$el.main.select(`.${cr.chartCandlesticks}`).selectAll(`.${cr.chartCandlestick}`).data(t).enter().append("g").attr("class",a).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:a,$T:i}=n,o=e?a.subchart:a,s=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=o.main.selectAll(`.${cr.chartCandlestick}`).selectAll(`.${cr.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const f=c.enter().filter(g=>g.value).append("g").attr("class",s);f.append("line"),f.append("path"),o.candlestick=c.merge(f).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:a}=n,i=n.generateGetCandlestickPoints(t,e),o=a.axis_rotated,s=a.candlestick_color_down;return(l,c,f)=>{const g=i(l,c),v=n.getCandlestickData(l),m=v==null?void 0:v._isUp,S=+o,P=+!S;f.classed&&f.classed(cr[m?"valueUp":"valueDown"],!0);const N=o?`H${g[1][1]} V${g[1][0]} H${g[0][1]}`:`V${g[1][1]} H${g[1][0]} V${g[0][1]}`;f.select("path").attr("d",`M${g[0][S]},${g[0][P]}${N}z`).style("fill",X=>(m?n.color(X):Be(s)?s[X.id]:s)||n.color(X));const L=f.select("line"),w=o?{x1:g[2][1],x2:g[2][2],y1:g[2][0],y2:g[2][0]}:{x1:g[2][0],x2:g[2][0],y1:g[2][1],y2:g[2][2]};for(const X in w)L.attr(X,w[X])}},generateGetCandlestickPoints(t,e=!1){const n=this,a=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,o=n.getBarW("candlestick",a,i),s=n.getShapeX(o,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n);return(g,v)=>{const m=f.call(n,g.id,e)(n.getShapeYMin(g.id)),S=c(g,v)||m,P=he(o)?o:o[g.id]||o._$width,N=n.getCandlestickData(g);let L;if(N&&he(N.open)&&he(N.close)){const w={start:s(g),end:0};w.end=w.start+P;const X={start:l(N.open),end:l(N.close)},W={x:w.start+P/2,high:l(N.high),low:l(N.low)};X.start-=m-S,L=[[w.start,X.start],[w.end,X.end],[W.x,W.low,W.high]]}else L=[[0,0],[0,0],[0,0,0]];return L}},redrawCandlestick(t,e,n=!1){const a=this,{$el:i,$T:o}=a,{candlestick:s}=n?i.subchart:i,l=gr(!0);return[s.each(function(c,f){const g=o(ot(this),e,l);t(c,f,g)}).style("opacity",null)]},getCandlestickData({value:t}){let e;if(je(t)){const[n,a,i,o,s=!1]=t;e={open:n,high:a,low:i,close:o},s!==!1&&(e.volume=s)}else Be(t)&&(e=Ax({},t));return e&&(e._isUp=e.close>=e.open),e||null}},bx=Object.defineProperty,Yu=Object.getOwnPropertySymbols,Rx=Object.prototype.hasOwnProperty,Ix=Object.prototype.propertyIsEnumerable,Wu=(t,e,n)=>e in t?bx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ox=(t,e)=>{for(var n in e||(e={}))Rx.call(e,n)&&Wu(t,n,e[n]);if(Yu)for(var n of Yu(e))Ix.call(e,n)&&Wu(t,n,e[n]);return t};function Zi(t=!1){const e=this,{config:n,state:{current:{width:a,height:i}}}=e,o=e.getCurrentPadding(),s=Ox({width:a-(o.left+o.right),height:i-(n.legend_show?e.getLegendHeight()+10:0)-(o.top+o.bottom)},o);if(t){const{width:l,height:c}=Ku.call(e,{width:s.width,height:s.height});s.width{let l=o;return Be(o)&&(l=t[s?"height":"width"]*o.ratio),l}),{width:a,height:i}}function Cx(t){const e=this,{top:n,left:a,width:i}=Zi.call(e,!0),o=[];return t.forEach((s,l)=>{const{ratio:c}=s,f=l>0?o[l-1][2][1]:n;o.push(s.coords=[[a,f],[a+i,f],[a+i,l>0?c+f:c+n],[a,l>0?c+f:c+n],[a,f]])}),o}function Zu(t=!1){const e=this,{width:n,height:a,top:i,left:o}=Zi.call(e,!0),s=Ku.call(e,{width:n,height:a}),l=(n-s.width)/2,c=(n+s.width)/2,f=a-s.height,g=[[0,0],[n,0],[c,f],[c,a],[l,a],[l,f],[0,0]];return t&&g.forEach(v=>{v[0]+=o,v[1]+=i}),`M${g.join("L")}z`}function Px(t){const e=this,{config:n}=e,a=t.map(i=>({id:i.id,value:i.values.reduce((o,s)=>o+s.value,0)}));return n.data_order&&a.sort(e.getSortCompareFn.bind(e)(!0)),Ju.call(e,a)}function Ju(t){const e=this,{height:n}=Zi.call(e),a=e.getTotalDataSum(!0);return t.forEach(i=>{i.ratio=i.value/a*n}),t}var wx={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${Se.chart}`).append("g").classed(Ta.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(Ta.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:a}=t,i=o=>{var s;const l=o.isTrusted?o.target:(s=a.eventReceiver.rect)==null?void 0:s.node();let c;return/^path$/i.test(l.tagName)&&(a.event=o,c=ot(l).datum()),c};if(n.interaction_enabled){const o=a.inputType==="touch";e.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.target),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))}).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e,a=e.getChartClass("Funnel"),i=e.getClass("funnel",!0);n||e.initFunnel();const o=Px.call(e,t.filter(e.isFunnelType.bind(e))),s=n.selectAll(`.${Ta.chartFunnel}`).data(o);s.exit().remove();const l=s.enter().insert("g",`.${Ta.funnelBackground}`);l.append("path"),n.path=l.merge(s).attr("class",c=>a(c)).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,a=t.map(({id:i})=>i);n.path=n.path.filter(i=>a.indexOf(i.id)>=0)},generateGetFunnelPoints(){const t=this,{$el:{funnel:e}}=t,n=t.filterTargetsToShow(e.path),{top:a,left:i,right:o}=Zi.call(t),s=(i-o)/2,l={};let c=a!=null?a:0;return n.each((f,g)=>{var v;l[f.id]=[[s,c],[s,c+=((v=n==null?void 0:n[g])!=null?v:f).ratio]]}),f=>l[f.id]},redrawFunnel(){const t=this,{$T:e,$el:{funnel:n}}=t,a=t.filterTargetsToShow(n.path),i=Cx.call(t,Ju.call(t,a.data()));n.attr("clip-path",`path('${Zu.bind(t)()}')`),n.background.attr("d",Zu.call(t,!0)),e(a).attr("d",(o,s)=>`M${i[s].join("L")}z`).style("opacity","1"),n.selectAll("g").style("opacity",null)}},Mx={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,a=(i=null,o="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(o)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Ve.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&a(Un.chartArcsGaugeUnit),e.gauge_label_show&&(a(Un.chartArcsGaugeMin),!e.gauge_fullCircle&&a(Un.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:a}=t,{hiddenTargetIds:i}=t.state,o=a.main.selectAll(`.${Ve.arcs}`).selectAll(`.${Ve.arcLabelLine}`).data(t.arcData.bind(t));o.enter().append("rect").attr("class",l=>`${Ve.arcLabelLine} ${Se.target} ${Se.target}-${l.data.id}`).merge(o).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const f=2;let g=0,v=0,m="";if(i.indexOf(l.data.id)<0){const S=t.updateAngle(l),P=n.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length*(S.index+1),N=S.endAngle-Math.PI/2,L=n.radius-P,w=N-(L===0?0:1/L);c=n.radiusExpanded-n.radius+P,g=Math.cos(w)*L,v=Math.sin(w)*L,m=`rotate(${N*180/Math.PI}, ${g}, ${v})`}ot(this).attr("x",g).attr("y",v).attr("width",c).attr("height",f).attr("transform",m).style("stroke-dasharray",`0, ${c+f}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:a}=n,i=a.gauge_label_extents;return ve(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){const t=this;return t.getGaugeLabelHeight()*(t.config.gauge_label_show?2:2.5)}};function Dx(t,e,n,a=!1){const i=t?[t,0]:n;for(let o=t||n.reduce((s,l)=>s+l);o<=e;)n.forEach(s=>{o+s<=e&&i.push(s),o+=s});return i.length%2!==0&&i.push(a?n[1]:0),{dash:i.join(" "),length:i.reduce((o,s)=>o+s,0)}}function Lx(t,e,n){const a=this,i=[],o="2 2";if(Qe(e)){const s=(l,c)=>ln(l)?c:n?Yn.call(a,l):l;for(let l=0,c;c=e[l];l++){const f=s(c.start,t[0].x),g=s(c.end,t[t.length-1].x),v=c.style||{dasharray:o};i[l]={start:f,end:g,style:v}}}return i}var Nx={initLine(){const{$el:t}=this;t.line=t.main.select(`.${Se.chart}`).append("g").attr("class",ur.chartLines).call(this.setCssRule(!1,`.${ur.chartLines}`,["pointer-events:none"]))},updateTargetsForLine(t){const e=this,{$el:{area:n,line:a,main:i}}=e,o=e.getChartClass("Line"),s=e.getClass("lines",!0),l=e.classFocus.bind(e);a||e.initLine();const c=t.filter(v=>!(e.isScatterType(v)||e.isBubbleType(v))),f=i.select(`.${ur.chartLines}`).selectAll(`.${ur.chartLine}`).data(c).attr("class",v=>o(v)+l(v)),g=f.enter().append("g").attr("class",o).style("opacity","0").style("pointer-events",e.getStylePropValue("none"));if(g.append("g").attr("class",s),e.hasTypeOf("Area")){const v=(!n&&g.empty()?f:g).filter(e.isAreaType.bind(e));e.initArea(v)}e.updateTargetForCircle(c,g)},updateLine(t,e=!1){const n=this,{format:{extraLineClasses:a},$el:i,$T:o}=n,s=e?i.subchart:i,l=s.main.selectAll(`.${ur.lines}`).selectAll(`.${ur.line}`).data(n.lineData.bind(n));o(l.exit(),t).style("opacity","0").remove(),s.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${a(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const a=this,{$el:i,$T:o}=a,{line:s}=n?i.subchart:i;return[o(s,e,gr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?a=>{const i=e.getInterpolate(t)(a);return i.orgPoint=i.point,i.pointRotated=function(o,s){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+s*this._t;this._context.lineTo(this._x,l),this._context.lineTo(o,l),this._x=o,this._y=s},i.point=function(o,s){this._point===0?this.orgPoint(o,s):this.pointRotated(o,s)},i}:e.getInterpolate(t)},generateDrawLine(t,e){const n=this,{config:a,scale:i}=n,o=a.line_connectNull,s=a.axis_rotated,l=n.generateGetLinePoints(t,e),c=n.getYScaleById.bind(n),f=S=>(e?n.subxx:n.xx).call(n,S),g=(S,P)=>n.isGrouped(S.id)?l(S,P)[0][1]:c(S.id,e)(n.getBaseValue(S));let v=Gu();v=s?v.x(g).y(f):v.x(f).y(g),o||(v=v.defined(S=>n.getBaseValue(S)!==null));const m=e?i.subX:i.x;return S=>{const P=c(S.id,e);let N=o?n.filterRemoveNull(S.values):S.values,L=0,w=0,X;if(n.isLineType(S)){const W=a.data_regions[S.id];W?X=n.lineWithRegions(N,i.zoom||m,P,W):(n.isStepType(S)&&(N=n.convertValuesToStep(N)),X=v.curve(n.getCurve(S))(N))}else N[0]&&(L=m(N[0].x),w=P(N[0].value)),X=s?`M ${w} ${L}`:`M ${L} ${w}`;return X||"M 0 0"}},lineWithRegions(t,e,n,a){const i=this,{config:o}=i,s=o.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",f=Lx.bind(i)(t,a,l),g=i.hasNullDataValue(t);let v,m,S,P;const N=s?dt=>n(dt.value):dt=>e(dt.x),L=s?dt=>e(dt.x):dt=>n(dt.value),w=dt=>`M${dt[0][0]},${dt[0][1]}L${dt[1][0]},${dt[1][1]}`,X=l?(dt,st,Vt,vt)=>{const Q=dt.x.getTime(),St=st.x-dt.x,ct=new Date(Q+St*Vt),At=new Date(Q+St*(Vt+vt)),Gt=s?[[n(m(Vt)),e(ct)],[n(m(Vt+S)),e(At)]]:[[e(ct),n(m(Vt))],[e(At),n(m(Vt+S))]];return w(Gt)}:(dt,st,Vt,vt)=>{const Q=e(st.x,!s),St=n(st.value,s),ct=Vt+vt,At=e(v(Vt),!s),Gt=n(m(Vt),s);let Bt=e(v(ct),!s),Kt=n(m(ct),s);Bt>Q&&(Bt=Q),dt.value>st.value&&(s?KtSt)&&(Kt=St);const ne=[[At,Gt],[Bt,Kt]];return s&&ne.forEach(le=>le.reverse()),w(ne)},W={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let H="";const k=i.$el.line.filter(({id:dt})=>dt===t[0].id),K=k.clone().style("display","none"),at=(dt,st)=>dt.attr("d",st).node().getTotalLength(),ht={dash:[],lastLength:0};let $t=!1;for(let dt=0,st;st=t[dt];dt++){const Vt=t[dt-1],vt=Vt&&De(Vt.value);let Q=i.isWithinRegions(st.x,f);if(De(st.value)){if(ln(f)||!Q||!vt)H+=`${dt&&vt?"L":"M"}${N(st)},${L(st)}`;else if(vt)if(Q=((Q==null?void 0:Q.dasharray)||c).split(" ").map(Number),v=zr(W.x,Vt.x,st.x),m=zr(W.y,Vt.value,st.value),g){const St=e(st.x)-e(Vt.x),ct=n(st.value)-n(Vt.value),At=Math.sqrt(Math.pow(St,2)+Math.pow(ct,2));S=Q[0]/At,P=S*Q[1];for(let Gt=S;Gt<=1;Gt+=P)H+=X(Vt,st,Gt,S),Gt+P>=1&&(H+=X(Vt,st,1,0))}else{let St=[];if($t=st.x===t[t.length-1].x,l){const Bt=+Vt.x,Kt=new Date(Bt),ne=new Date(Bt+(+st.x-Bt));St=[[e(Kt),n(m(0))],[e(ne),n(m(1))]]}else St=[[e(v(0)),n(m(0))],[e(v(1)),n(m(1))]];s&&St.forEach(Bt=>Bt.reverse());const ct=at(K,H),At=at(K,H+=`L${St[1].join(",")}`),Gt=Dx(ct-ht.lastLength,At-ht.lastLength,Q,$t);ht.lastLength+=Gt.length,ht.dash.push(Gt.dash)}}}return ht.dash.length&&(!$t&&ht.dash.push(at(K,H)),K.remove(),k.attr("stroke-dasharray",ht.dash.join(" "))),H},isWithinRegions(t,e){for(let n=0,a;a=e[n];n++)if(a.startgr();var Ji={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let a=e.point_opacity;return ln(a)&&(a=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),a},opacityForCircle(t){var e;const{config:n}=this;let a=n.point_opacity;return ln(a)&&(a=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",a=De(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":a:"0"),a},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${Se.chart} > .${$n.chartCircles}`).empty()&&e.select(`.${Se.chart}`).append("g").attr("class",$n.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:a,data:i,$el:o}=n,s=a.interaction_enabled&&a.data_selection_enabled,l=s&&a.data_selection_isselectable,c=n.getClass("circles",!0);if(!a.point_show)return;n.initCircle();let f=t,g=e;if(!f){f=i.targets.filter(m=>this.isScatterType(m)||this.isBubbleType(m));const v=o.main.select(`.${$n.chartCircles}`).style("pointer-events","none").selectAll(`.${$n.circles}`).data(f);v.exit().remove(),g=v.enter()}s&&g.append("g").attr("class",v=>n.generateClass(tn.selectedCircles,v.id)),g.append("g").attr("class",c).call(v=>{n.setCssRule(!0,`.${$n.circles}`,["cursor:pointer"],l)(v),n.setCssRule(!0,` .${$n.circle}`,["fill","stroke"],n.color)(v)}).style("opacity",function(){return ot(this.parentNode).attr("class").indexOf($n.chartCircles)>-1?"0":null}),s&&f.forEach(v=>{o.main.selectAll(`.${tn.selectedCircles}${n.getTargetSelectorSuffix(v.id)}`).selectAll(`${tn.selectedCircle}`).each(m=>{m.value=v.values[m.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:a,$el:i}=e,o=e.isPointFocusOnly(),s=t?i.subchart:i;if(n.point_show&&!a.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=s.main.selectAll(`.${$n.circles}`).selectAll(`.${$n.circle}`).data(c=>e.isLineType(c)&&e.shouldDrawPointsForLine(c)||e.isBubbleType(c)||e.isRadarType(c)||e.isScatterType(c)?o?[c.values[0]]:c.values:[]);l.exit().remove(),l.enter().filter(Boolean).append(e.point("create",this,e.pointR.bind(e),e.updateCircleColor.bind(e))),s.circle=s.main.selectAll(`.${$n.circles} .${$n.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",e.initialOpacityForCircle.bind(e))}},updateCircleColor(t){const e=this,n=e.getStylePropValue(e.color);return e.config.point_radialGradient?e.getGradienColortUrl(t.id):n?n(t):null},redrawCircle(t,e,n,a,i=!1){const o=this,{state:{rendered:s},$el:l,$T:c}=o,f=i?l.subchart:l,g=f.main.selectAll(`.${tn.selectedCircle}`);if(!o.config.point_show)return[];const v=o.point("update",o,t,e,o.updateCircleColor.bind(o),n,a,g),m=o.isCirclePoint()?"c":"",S=gr(),P=o.opacityForCircle.bind(o),N=[];return f.circle.each(function(L){let w=v.bind(this)(L);w=c(w,n||!s,S).style("opacity",P),N.push(w)}),[N,c(g,n).attr(`${m}x`,t).attr(`${m}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:a,toggling:i,transiting:o},$el:s}=e;let{circle:l}=s;if(o===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),f=(n?e.radarCircleY:e.circleY).bind(e),g=i||ln(t),v=e.point("update",e,c,f,e.getStylePropValue(e.color),a?!1:g);t&&(l=l.filter(function(m){var S;const P=(S=t.filter)==null?void 0:S.call(t,N=>N.id===m.id);return P.length?ot(this).datum(P[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(m){const{id:S,index:P,value:N}=m;let L="hidden";De(N)&&(v.bind(this)(m),e.expandCircles(P,S),L=""),this.style.visibility=L})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=e.generateGetLinePoints(e.getShapeIndices(e.isLineType),t);return(a,i)=>{const o=a.id;return e.isGrouped(o)?n(a,i)[0][1]:e.getYScaleById(o,t)(e.getBaseValue(a))}},expandCircles(t,e,n){const a=this,i=a.pointExpandedR.bind(a);n&&a.unexpandCircles();const o=a.getShapeByIndex("circle",t,e).classed(Se.EXPANDED,!0),s=i(o)/a.config.point_r,l=1-s;a.isCirclePoint()?o.attr("r",i):o.each(function(){const c=ot(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:f,height:g}=this.getBBox(),v=l*(+c.attr("x")+f/2),m=l*(+c.attr("y")+g/2);c.attr("transform",`translate(${v} ${m}) scale(${s})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),a=e.getShapeByIndex("circle",t).filter(function(){return ot(this).classed(Se.EXPANDED)}).classed(Se.EXPANDED,!1);if(a.attr("r",n),!e.isCirclePoint()){const i=n(a)/e.config.point_r;a.attr("transform",i!==1?`scale(${i})`:null)}},pointR(t){const e=this,{config:n}=e,a=n.point_r;let i=a;return e.isBubbleType(t)?i=e.getBubbleR(t):ve(a)&&(i=a.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,a=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*a:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ve(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},isWithinCircle(t,e){const{state:n}=this,a=Hn(n.event,t),i=ot(t),o=this.isCirclePoint(t)?"c":"",s=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${o}x`),c=+i.attr(`${o}y`);if(!(l||c)&&t.nodeType===1){const{x:f,y:g}=Ma(t);l=f,c=g}return Math.sqrt(Math.pow(l-a[0],2)+Math.pow(c-a[1],2))<(e||s)},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ve(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},updatePointClass(t){const e=this,{circle:n}=e.$el;let a=!1;return(Be(t)||n)&&(a=t===!0?n.each(function(i){let o=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(Se.EXPANDED)>-1&&(o+=` ${Se.EXPANDED}`),this.setAttribute("class",o)}):e.getClass("circle",!0)(t)),a},generateGetLinePoints(t,e){const n=this,{config:a}=n,i=n.getShapeX(0,t,e),o=n.getShapeY(e),s=n.getShapeOffset(n.isLineType,t,e),l=n.getYScaleById.bind(n);return(c,f)=>{const g=l.call(n,c.id,e)(n.getShapeYMin(c.id)),v=s(c,f)||g,m=i(c);let S=o(c);a.axis_rotated&&(c.value>0&&SDe(S.value)?e(S)-c/2:0,v=S=>De(S.value)?n(S)-f/2:0;let m=t;return i&&(o&&m.attr("x",g),m=l.$T(m,i,la()),s&&l.$T(s,i,la())),m.attr("x",g).attr("y",v).style("fill",a)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,a,i,o,s){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(o&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,la())),s&&l.$T(c,i,la())),c.attr("cx",e).attr("cy",n).style("fill",a)}},rectangle:{create(t,e,n){const a=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",a).attr("height",a).style("fill",n).node()},update(t,e,n,a,i,o,s){const l=this,c=l.config.point_r,f=m=>e(m)-c,g=m=>n(m)-c;let v=t;return i&&(o&&v.attr("x",f),v=l.$T(v,i,la()),s&&l.$T(s,i,la())),v.attr("x",f).attr("y",g).style("fill",a)}}};function Fx(t){return nr(t)&&ve(t.create)&&ve(t.update)}function Bx(t,e){var n;const a=this,i=(c,f)=>{const g=c.attributes;for(let v=0,m;m=g[v];v++)m=m.name,f.setAttribute(m,c.getAttribute(m))},s=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,l=gn.createElementNS(ae.svg,s.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(s,l),(n=s.childNodes)!=null&&n.length){const c=ot(l);"innerHTML"in l?c.html(s.innerHTML):Lr(s.childNodes).forEach(f=>{i(f,c.append(f.tagName).node())})}a.$el.defs.node().appendChild(l)}var ca={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},generatePoint(){const t=this,{$el:e,config:n}=t,a=[],i=cn(n.point_pattern)?n.point_pattern:[n.point_type];return function(o,s,...l){return function(c){var f,g,v,m;const S=t.getTargetSelectorSuffix(c.id||((f=c.data)==null?void 0:f.id)||c),P=ot(this);a.indexOf(S)<0&&a.push(S);let N=i[a.indexOf(S)%i.length];if(t.hasValidPointType(N))N=t[N];else if(!Fx(N||n.point_type)){const L=t.getDefsPointId(S);if(e.defs.select(`#${L}`).size()<1&&Bx.bind(t)(N,L),o==="create")return(g=t.custom)==null?void 0:g.create.bind(s)(P,L,...l);if(o==="update")return(v=t.custom)==null?void 0:v.update.bind(s)(P,...l)}return(m=N[o])==null?void 0:m.bind(s)(P,...l)}}}};function Qu(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var Ux={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,a=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Tr.levels),a&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const a=Qu(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/a*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:a}}}=t,i=e.polar_level_depth,o=Qu(t),s=Ei(0,i),l=n.radius,c=s.map(m=>l*((m+1)/i)),f=(e.polar_level_text_format||function(){}).bind(t.api),g=a.selectAll(`.${Tr.level}`).data(s);g.exit().remove();const v=g.enter().append("g").attr("class",(m,S)=>`${Tr.level} ${Tr.level}-${S}`);if(v.append("circle"),v.merge(g).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",m=>c[m]),e.polar_level_text_show){const m=e.polar_level_text_backgroundColor,S=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(m)}`;v.append("text").style("text-anchor","middle"),v.merge(g).selectAll("text").attr("dy",P=>-c[P]+5).attr("filter",m?`url(${S})`:null).text(P=>f(o/s.length*(P+1)))}}};function zx(t,e,n,a,i,o){const s=t&&a>0?n-a:a,l=2*Math.PI;return i*(1-o*(e==="x"?Math.sin:Math.cos)(s*l/n))}const ua=Ln.radarPoints,ku=Ln.radarTextWidth;var jx={initRadar(){const t=this,{config:e,state:{current:n},$el:a}=t;t.hasType("radar")&&(a.radar=a.main.select(`.${Se.chart}`).append("g").attr("class",Qs.chartRadars),a.radar.levels=a.radar.append("g").attr("class",Tr.levels),a.radar.axes=a.radar.append("g").attr("class",Tn.axis),a.radar.shapes=a.radar.append("g").attr("class",sn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:a}}=t,i=e.axis_x_categories.length<4?-20:10,o=(Math.min(n,a)-i)/2;return[o,o]},updateTargetsForRadar(t){const e=this,{config:n}=e;qn(n.axis_x_categories)&&(n.axis_x_categories=Ei(0,_n("max",t.map(a=>a.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,a){const i=this,{config:o}=i,[s,l]=i.getRadarSize(),c=o.axis_x_categories.length,f=o.radar_direction_clockwise,g=Lr(t).map(v=>zx(f,v,c,e,Qe(n)?n:t==="x"?s:l,he(a)?a:o.radar_size_ratio));return g.length===1?g[0]:g},generateRadarPoints(){const t=this,e=t.data.targets,[n,a]=t.getRadarSize(),i=t.cache.get(ua)||{},o=i._size;(!o||o.width!==n&&o.height!==a)&&(e.forEach(s=>{i[s.id]=s.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:a},t.cache.add(ua,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,a=t.getTranslate("radar");a&&(e.attr("transform",a),n.select(`.${On.chartTexts}`).attr("transform",a),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(ua);return(e,n)=>{const a=t[e.id][n];return[a,a,a,a]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:a}}=t,[i,o]=t.getRadarSize(),s=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,f=a.levels,g=Ei(0,s),v=e.radar_size_ratio*Math.min(i,o),m=g.map(w=>v*((w+1)/s)),S=(e.radar_level_text_format||function(){}).bind(t.api),P=g.map(w=>{const X=m[w];return Ei(0,l).map(H=>t.getRadarPosition(["x","y"],H,X,1).join(",")).join(" ")}),N=f.selectAll(`.${Tr.level}`).data(g);N.exit().remove();const L=N.enter().append("g").attr("class",(w,X)=>`${Tr.level} ${Tr.level}-${X}`);L.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(f.select("text").empty()&&f.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>S(0)),L.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>S(n.current.dataMax/g.length*(w+1)))),L.merge(N).attr("transform",w=>`translate(${i-m[w]}, ${o-m[w]})`).selectAll("polygon").attr("points",w=>P[w]),c&&f.selectAll("text").attr("x",w=>ln(w)?i:P[w].split(",")[0]).attr("y",w=>ln(w)?o:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[a,i]=t.getRadarSize(),o=e.axis_x_categories;let s=n.axes.selectAll("g").data(o);s.exit().remove();const l=s.enter().append("g").attr("class",(c,f)=>`${Tn.axis}-${f}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),s=l.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",a).attr("y1",i).attr("x2",(c,f)=>t.getRadarPosition("x",f)).attr("y2",(c,f)=>t.getRadarPosition("y",f)),e.radar_axis_text_show){const{x:c=0,y:f=0}=e.radar_axis_text_position,g=t.cache.get(ku)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(v=>{v.each(function(m){wa(ot(this),String(m),[-.6,1.2])})}).datum((v,m)=>({index:m})).attr("transform",function(v){ln(this.width)&&(this.width=this.getBoundingClientRect().width/2);let m=t.getRadarPosition("x",v.index,void 0,1),S=Math.round(t.getRadarPosition("y",v.index,void 0,1));return m>a?m+=this.width+c:Math.round(m)i?(S/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),S+=f):SYl(m.node()).width);v.every(m=>m>0)&&t.cache.add(ku,v[0]-v[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:a,svg:i}}=t,o=t.isPointFocusOnly(),{inputType:s,transiting:l}=n,c=s==="mouse",f=g=>{if(n.event=g,!e.interaction_onout)return;const v=t.getDataIndexFromEvent(g),m=ln(v);(c||m)&&(t.hideTooltip(),o?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,v):m&&t.callOverOutForTouch())};a.axes.on(c?"mouseover ":"touchstart",g=>{if(l)return;n.event=g;const v=t.getDataIndexFromEvent(g);t.selectRectForSingle(i.node(),v),c?t.setOverOut(!0,v):t.callOverOutForTouch(v)}).on("mouseout",c?f:null),c||i.on("touchstart",f)},updateRadarShape(){const t=this,e=t.data.targets.filter(o=>t.isRadarType(o)),n=t.cache.get(ua),a=t.$el.radar.shapes.selectAll("polygon").data(e),i=a.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(a.exit()).remove(),i.append("polygon").merge(a).style("fill",t.color).style("stroke",t.color).attr("points",o=>n[o.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(ua)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(ua)[t.id][t.index][1]}};function Vx(t){var e=0,n=t.children,a=n&&n.length;if(!a)e=1;else for(;--a>=0;)e+=n[a].value;t.value=e}function Gx(){return this.eachAfter(Vx)}function Xx(t,e){let n=-1;for(const a of this)t.call(e,a,++n,this);return this}function Hx(t,e){for(var n=this,a=[n],i,o,s=-1;n=a.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)a.push(i[o]);return this}function Yx(t,e){for(var n=this,a=[n],i=[],o,s,l,c=-1;n=a.pop();)if(i.push(n),o=n.children)for(s=0,l=o.length;s=0;)n+=a[i].value;e.value=n})}function Zx(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Jx(t){for(var e=this,n=Qx(e,t),a=[e];e!==n;)e=e.parent,a.push(e);for(var i=a.length;t!==n;)a.splice(i,0,t),t=t.parent;return a}function Qx(t,e){if(t===e)return t;var n=t.ancestors(),a=e.ancestors(),i=null;for(t=n.pop(),e=a.pop();t===e;)i=t,t=n.pop(),e=a.pop();return i}function kx(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function qx(){return Array.from(this)}function _x(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function t0(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*e0(){var t=this,e,n=[t],a,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,a=t.children)for(i=0,o=a.length;i=0;--l)i.push(o=s[l]=new Qi(s[l])),o.parent=a,o.depth=a.depth+1;return n.eachBefore(o0)}function n0(){return Rs(this).eachBefore(i0)}function r0(t){return t.children}function a0(t){return Array.isArray(t)?t[1]:null}function i0(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function o0(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Qi(t){this.data=t,this.depth=this.height=0,this.parent=null}Qi.prototype=Rs.prototype={constructor:Qi,count:Gx,each:Xx,eachAfter:Yx,eachBefore:Hx,find:Wx,sum:Kx,sort:Zx,path:Jx,ancestors:kx,descendants:qx,leaves:_x,links:t0,copy:n0,[Symbol.iterator]:e0};function s0(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ki(t,e,n,a,i){for(var o=t.children,s,l=-1,c=o.length,f=t.value&&(a-e)/t.value;++lX&&(X=f),K=L*L*k,W=Math.max(X/K,K/w),W>H){L-=f;break}H=W}s.push(c={value:L,dice:S1?a:1)},n}(qu);function C1(t){return t==null?null:ef(t)}function ef(t){if(typeof t!="function")throw new Error;return t}function ja(){return 0}function Va(t){return function(){return t}}function l0(){var t=tf,e=!1,n=1,a=1,i=[0],o=ja,s=ja,l=ja,c=ja,f=ja;function g(m){return m.x0=m.y0=0,m.x1=n,m.y1=a,m.eachBefore(v),i=[0],e&&m.eachBefore(s0),m}function v(m){var S=i[m.depth],P=m.x0+S,N=m.y0+S,L=m.x1-S,w=m.y1-S;L=m-1){var X=o[v];X.x0=P,X.y0=N,X.x1=L,X.y1=w;return}for(var W=f[v],H=S/2+W,k=v+1,K=m-1;k>>1;f[at]w-N){var dt=S?(P*$t+L*ht)/S:L;g(v,k,ht,P,N,dt,w),g(k,m,$t,dt,N,L,w)}else{var st=S?(N*$t+w*ht)/S:w;g(v,k,ht,P,N,L,st),g(k,m,$t,P,st,L,w)}}}function c0(t,e,n,a,i){(t.depth&1?qi:ki)(t,e,n,a,i)}var u0=function t(e){function n(a,i,o,s,l){if((c=a._squarify)&&c.ratio===e)for(var c,f,g,v,m=-1,S,P=c.length,N=a.value;++m1?a:1)},n}(qu);function f0(t,e){const n=this,{scale:{x:a,y:i},state:{width:o}}=n;t.selectAll("g").attr("transform",s=>`translate(${s===e?"0,0":`${a(s.x0)},${i(s.y0)}`})`).select("rect").attr("width",s=>s===e?o:a(s.x1)-a(s.x0)).attr("height",s=>s===e?0:i(s.y1)-i(s.y0))}function d0(t){const e=this;return t.map(n=>{const{id:a,values:i}=n,{value:o}=i[0];return{name:a,id:a,value:o,ratio:e.getRatio("treemap",i[0])}})}function h0(t){const e=this,n=Rs(t).sum(i=>i.value),a=e.getSortCompareFn(!0);return[e.treemap(a?n.sort(a):n)]}var g0={initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:a},clip:i,datetimeId:o}}=t;i.id=`${o}-clip`,t.treemap=l0().tile(t.getTreemapTile()),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",a),e.treemap=e.main.select(`.${Se.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(qs.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:a}=t,i=o=>{var s;const l=o.isTrusted?o.target:(s=a.eventReceiver.rect)==null?void 0:s.node();let c;return/^rect$/i.test(l.tagName)&&(a.event=o,c=ot(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const o=a.inputType==="touch";e.treemap.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.currentTarget),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))}).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},getTreemapTile(){var t,e;const n=this,{config:a,state:{current:{width:i,height:o}}}=n,s=(e={binary:nf,dice:ki,slice:qi,sliceDice:c0,squarify:tf,resquarify:u0}[(t=a.treemap_tile)!=null?t:"binary"])!=null?e:nf;return(l,c,f,g,v)=>{s(l,0,0,i,o);for(const m of l.children)m.x0=c+m.x0/i*(g-c),m.x1=c+m.x1/i*(g-c),m.y0=f+m.y0/o*(v-f),m.y1=f+m.y1/o*(v-f)}},getTreemapData(t){const e=this;return{name:"root",children:d0.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,a=h0.call(e,e.getTreemapData(t!=null?t:e.data.targets));n.data(a)},updateTreemap(t){const e=this,{$el:n,$T:a}=e,i=n.treemap.datum(),o=e.getChartClass("Treemap"),s=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);a(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",o).select("rect").attr("class",s).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e,scale:{x:n,y:a}}=t,i={};return e.treemap.selectAll("g").each(o=>{i[o.data.name]=[[n(o.x0),a(o.y0)],[n(o.x1),a(o.y1)]]}),o=>i[o.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:a,height:i}}}=e;return n.defs.select("rect").attr("width",a).attr("height",i),[e.$T(n.treemap,t,gr()).call(f0.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{config:n}=e,{id:a,value:i}=t,o=n.treemap_label_format,s=e.getRatio("treemap",t),l=(s*100).toFixed(2),c=n.treemap_label_show&&e.meetsLabelThreshold(s,"treemap")?null:"0";return function(f){return f.style("opacity",c),ve(o)?o.bind(e.api)(i,s,a):`${a} -${l}%`}}},Xr={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},fa={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},v0={bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0},p0={bubble_maxR:35,bubble_zerobased:!1},m0={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"},y0={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0},x0={scatter_zerobased:!1},Is={spline_interpolation_type:"cardinal"},_i={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},T0={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0},$0={funnel_neck_width:0,funnel_neck_height:0},S0={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50},A0={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0},E0={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0},b0={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1},R0={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};function da(t,e){yn(Vr.prototype,Object.values(Du).concat(t)),yn(Er.prototype,Jy),Nr.setOptions(Object.values(Lu).concat(e||[]))}function mr(t,e){da([ca,Ji,Nx].concat(t||[])),Nr.setOptions([Xr,y0].concat(e||[]))}function ha(t,e){yn(Vr.prototype,[px,ca].concat(t||[])),Nr.setOptions([Xr].concat(e||[]))}let rf=()=>(mr(sa,[fa]),(rf=()=>oe.AREA)()),af=()=>(mr(sa,[fa]),(af=()=>oe.AREA_LINE_RANGE)()),of=()=>(mr(sa,[fa]),(of=()=>oe.AREA_STEP_RANGE)()),sf=()=>(mr(sa,[fa,Is]),(sf=()=>oe.AREA_SPLINE)()),lf=()=>(mr(sa,[fa,Is]),(lf=()=>oe.AREA_SPLINE_RANGE)()),cf=()=>(mr(sa,[fa]),(cf=()=>oe.AREA_STEP)()),uf=()=>(mr(),(uf=()=>oe.LINE)()),ff=()=>(mr(void 0,[Is]),(ff=()=>oe.SPLINE)()),df=()=>(mr(),(df=()=>oe.STEP)()),hf=()=>(ha(void 0,[_i,T0]),(hf=()=>oe.DONUT)()),gf=()=>(ha([Mx],[_i,S0]),(gf=()=>oe.GAUGE)()),vf=()=>(ha(void 0,[_i,A0]),(vf=()=>oe.PIE)()),pf=()=>(ha([Ux],[_i,E0]),(pf=()=>oe.POLAR)()),mf=()=>(ha([Du.eventrect,Ji,jx],[Xr,b0,{axis_x_categories:Lu.optAxis.axis_x_categories}]),(mf=()=>oe.RADAR)()),yf=()=>(da([yx,ca],[v0,Xr]),(yf=()=>oe.BAR)()),xf=()=>(da([ca,Ji,xx],[p0,Xr]),(xf=()=>oe.BUBBLE)()),Tf=()=>(da([Ex,ca],[m0,Xr]),(Tf=()=>oe.CANDLESTICK)()),$f=()=>(da([ca,Ji],[Xr,x0]),($f=()=>oe.SCATTER)()),Sf=()=>(ha([wx],[$0]),(Sf=()=>oe.FUNNEL)()),Af=()=>(da([g0],[R0]),(Af=()=>oe.TREEMAP)()),Os=Object.create(null);const Ef={version:"3.15.1",generate(t){const e=ea(Object.create(null),Os,t),n=new Er(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return Be(t)&&(Os=t),Os},instance:[],plugin:{}};Object.keys(d).forEach(t=>d[t]()),Object.keys(u).forEach(t=>u[t]())}],Xa={};function zn(x){var b=Xa[x];if(b!==void 0)return b.exports;var r=Xa[x]={exports:{}};return Cs[x].call(r.exports,r,r.exports,zn),r.exports}(function(){zn.d=function(x,b){for(var r in b)zn.o(b,r)&&!zn.o(x,r)&&Object.defineProperty(x,r,{enumerable:!0,get:b[r]})}})(),function(){zn.o=function(x,b){return Object.prototype.hasOwnProperty.call(x,b)}}(),function(){zn.r=function(x){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})}}(),zn(0);var Ha=zn(584);return Ha}()}); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.bundle.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.bundle.min.js deleted file mode 100644 index 8739c91c..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.bundle.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v5.3.6 (https://getbootstrap.com/) - * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),s=t=>{t.dispatchEvent(new Event(i))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()})),f.push(e)):e()},g=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,_=(t,e,n=!0)=>{if(!n)return void g(t);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),g(t))};e.addEventListener(i,a),setTimeout((()=>{r||s(e)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=I(t);return C.has(o)||(o=t),[n,s,o]}function S(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(s,{delegateTarget:r}),n.oneOff&&N.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return P(n,{delegateTarget:t}),i.oneOff&&N.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function D(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function $(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&D(t,e,i,r.callable,r.delegationSelector)}function I(t){return t=t.replace(y,""),T[t]||t}const N={on(t,e,i,n){S(t,e,i,n,!1)},one(t,e,i,n){S(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))$(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(w,"");a&&!e.includes(s)||D(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;D(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=u();let s=null,o=!0,r=!0,a=!1;e!==I(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=P(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function P(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function j(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function M(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const F={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${M(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${M(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=j(t.dataset[n])}return e},getDataAttribute:(t,e)=>j(t.getAttribute(`data-bs-${M(e)}`))};class H{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=o(e)?F.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...o(e)?F.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,s]of Object.entries(e)){const e=t[n],r=o(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class W extends H{constructor(t,i){super(),(t=r(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),N.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){_(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(r(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.6"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const B=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>n(t))).join(","):null},z={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!l(t)&&a(t)))},getSelectorFromElement(t){const e=B(t);return e&&z.findOne(e)?e:null},getElementFromSelector(t){const e=B(t);return e?z.findOne(e):null},getMultipleElementsFromSelector(t){const e=B(t);return e?z.find(e):[]}},R=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;N.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),l(this))return;const s=z.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},q=".bs.alert",V=`close${q}`,K=`closed${q}`;class Q extends W{static get NAME(){return"alert"}close(){if(N.trigger(this._element,V).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),N.trigger(this._element,K),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}R(Q,"close"),m(Q);const X='[data-bs-toggle="button"]';class Y extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}N.on(document,"click.bs.button.data-api",X,(t=>{t.preventDefault();const e=t.target.closest(X);Y.getOrCreateInstance(e).toggle()})),m(Y);const U=".bs.swipe",G=`touchstart${U}`,J=`touchmove${U}`,Z=`touchend${U}`,tt=`pointerdown${U}`,et=`pointerup${U}`,it={endCallback:null,leftCallback:null,rightCallback:null},nt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class st extends H{constructor(t,e){super(),this._element=t,t&&st.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return it}static get DefaultType(){return nt}static get NAME(){return"swipe"}dispose(){N.off(this._element,U)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),g(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&g(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(N.on(this._element,tt,(t=>this._start(t))),N.on(this._element,et,(t=>this._end(t))),this._element.classList.add("pointer-event")):(N.on(this._element,G,(t=>this._start(t))),N.on(this._element,J,(t=>this._move(t))),N.on(this._element,Z,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ot=".bs.carousel",rt=".data-api",at="ArrowLeft",lt="ArrowRight",ct="next",ht="prev",dt="left",ut="right",ft=`slide${ot}`,pt=`slid${ot}`,mt=`keydown${ot}`,gt=`mouseenter${ot}`,_t=`mouseleave${ot}`,bt=`dragstart${ot}`,vt=`load${ot}${rt}`,yt=`click${ot}${rt}`,wt="carousel",At="active",Et=".active",Tt=".carousel-item",Ct=Et+Tt,Ot={[at]:ut,[lt]:dt},xt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},kt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Lt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=z.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===wt&&this.cycle()}static get Default(){return xt}static get DefaultType(){return kt}static get NAME(){return"carousel"}next(){this._slide(ct)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(ht)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?N.one(this._element,pt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void N.one(this._element,pt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ct:ht;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&N.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(N.on(this._element,gt,(()=>this.pause())),N.on(this._element,_t,(()=>this._maybeEnableCycle()))),this._config.touch&&st.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of z.find(".carousel-item img",this._element))N.on(t,bt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(dt)),rightCallback:()=>this._slide(this._directionToOrder(ut)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new st(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ot[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=z.findOne(Et,this._indicatorsElement);e.classList.remove(At),e.removeAttribute("aria-current");const i=z.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(At),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===ct,s=e||b(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>N.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(ft).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),d(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(At),i.classList.remove(At,c,l),this._isSliding=!1,r(pt)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return z.findOne(Ct,this._element)}_getItems(){return z.find(Tt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===dt?ht:ct:t===dt?ct:ht}_orderToDirection(t){return p()?t===ht?dt:ut:t===ht?ut:dt}static jQueryInterface(t){return this.each((function(){const e=Lt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}N.on(document,yt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=z.getElementFromSelector(this);if(!e||!e.classList.contains(wt))return;t.preventDefault();const i=Lt.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),N.on(window,vt,(()=>{const t=z.find('[data-bs-ride="carousel"]');for(const e of t)Lt.getOrCreateInstance(e)})),m(Lt);const St=".bs.collapse",Dt=`show${St}`,$t=`shown${St}`,It=`hide${St}`,Nt=`hidden${St}`,Pt=`click${St}.data-api`,jt="show",Mt="collapse",Ft="collapsing",Ht=`:scope .${Mt} .${Mt}`,Wt='[data-bs-toggle="collapse"]',Bt={parent:null,toggle:!0},zt={parent:"(null|element)",toggle:"boolean"};class Rt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=z.find(Wt);for(const t of i){const e=z.getSelectorFromElement(t),i=z.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Bt}static get DefaultType(){return zt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Rt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(N.trigger(this._element,Dt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Mt),this._element.classList.add(Ft),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(Mt,jt),this._element.style[e]="",N.trigger(this._element,$t)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(N.trigger(this._element,It).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,d(this._element),this._element.classList.add(Ft),this._element.classList.remove(Mt,jt);for(const t of this._triggerArray){const e=z.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ft),this._element.classList.add(Mt),N.trigger(this._element,Nt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(jt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=r(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Wt);for(const e of t){const t=z.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=z.find(Ht,this._config.parent);return z.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Rt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}N.on(document,Pt,Wt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of z.getMultipleElementsFromSelector(this))Rt.getOrCreateInstance(t,{toggle:!1}).toggle()})),m(Rt);var qt="top",Vt="bottom",Kt="right",Qt="left",Xt="auto",Yt=[qt,Vt,Kt,Qt],Ut="start",Gt="end",Jt="clippingParents",Zt="viewport",te="popper",ee="reference",ie=Yt.reduce((function(t,e){return t.concat([e+"-"+Ut,e+"-"+Gt])}),[]),ne=[].concat(Yt,[Xt]).reduce((function(t,e){return t.concat([e,e+"-"+Ut,e+"-"+Gt])}),[]),se="beforeRead",oe="read",re="afterRead",ae="beforeMain",le="main",ce="afterMain",he="beforeWrite",de="write",ue="afterWrite",fe=[se,oe,re,ae,le,ce,he,de,ue];function pe(t){return t?(t.nodeName||"").toLowerCase():null}function me(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ge(t){return t instanceof me(t).Element||t instanceof Element}function _e(t){return t instanceof me(t).HTMLElement||t instanceof HTMLElement}function be(t){return"undefined"!=typeof ShadowRoot&&(t instanceof me(t).ShadowRoot||t instanceof ShadowRoot)}const ve={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];_e(s)&&pe(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});_e(n)&&pe(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function ye(t){return t.split("-")[0]}var we=Math.max,Ae=Math.min,Ee=Math.round;function Te(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Ce(){return!/^((?!chrome|android).)*safari/i.test(Te())}function Oe(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&_e(t)&&(s=t.offsetWidth>0&&Ee(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ee(n.height)/t.offsetHeight||1);var r=(ge(t)?me(t):window).visualViewport,a=!Ce()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function xe(t){var e=Oe(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function ke(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&be(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Le(t){return me(t).getComputedStyle(t)}function Se(t){return["table","td","th"].indexOf(pe(t))>=0}function De(t){return((ge(t)?t.ownerDocument:t.document)||window.document).documentElement}function $e(t){return"html"===pe(t)?t:t.assignedSlot||t.parentNode||(be(t)?t.host:null)||De(t)}function Ie(t){return _e(t)&&"fixed"!==Le(t).position?t.offsetParent:null}function Ne(t){for(var e=me(t),i=Ie(t);i&&Se(i)&&"static"===Le(i).position;)i=Ie(i);return i&&("html"===pe(i)||"body"===pe(i)&&"static"===Le(i).position)?e:i||function(t){var e=/firefox/i.test(Te());if(/Trident/i.test(Te())&&_e(t)&&"fixed"===Le(t).position)return null;var i=$e(t);for(be(i)&&(i=i.host);_e(i)&&["html","body"].indexOf(pe(i))<0;){var n=Le(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Pe(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function je(t,e,i){return we(t,Ae(e,i))}function Me(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Fe(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const He={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=ye(i.placement),l=Pe(a),c=[Qt,Kt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Me("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Fe(t,Yt))}(s.padding,i),d=xe(o),u="y"===l?qt:Qt,f="y"===l?Vt:Kt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Ne(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=je(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&ke(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function We(t){return t.split("-")[1]}var Be={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ze(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Qt,y=qt,w=window;if(c){var A=Ne(i),E="clientHeight",T="clientWidth";A===me(i)&&"static"!==Le(A=De(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===qt||(s===Qt||s===Kt)&&o===Gt)&&(y=Vt,m-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),s!==Qt&&(s!==qt&&s!==Vt||o!==Gt)||(v=Kt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&Be),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Ee(i*s)/s||0,y:Ee(n*s)/s||0}}({x:f,y:m},me(i)):{x:f,y:m};return f=x.x,m=x.y,l?Object.assign({},O,((C={})[y]=b?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((e={})[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const Re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:ye(e.placement),variation:We(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ze(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ze(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var qe={passive:!0};const Ve={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=me(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,qe)})),a&&l.addEventListener("resize",i.update,qe),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,qe)})),a&&l.removeEventListener("resize",i.update,qe)}},data:{}};var Ke={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ke[t]}))}var Xe={start:"end",end:"start"};function Ye(t){return t.replace(/start|end/g,(function(t){return Xe[t]}))}function Ue(t){var e=me(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ge(t){return Oe(De(t)).left+Ue(t).scrollLeft}function Je(t){var e=Le(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Ze(t){return["html","body","#document"].indexOf(pe(t))>=0?t.ownerDocument.body:_e(t)&&Je(t)?t:Ze($e(t))}function ti(t,e){var i;void 0===e&&(e=[]);var n=Ze(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=me(n),r=s?[o].concat(o.visualViewport||[],Je(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ti($e(r)))}function ei(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ii(t,e,i){return e===Zt?ei(function(t,e){var i=me(t),n=De(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Ce();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Ge(t),y:l}}(t,i)):ge(e)?function(t,e){var i=Oe(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ei(function(t){var e,i=De(t),n=Ue(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=we(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=we(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ge(t),l=-n.scrollTop;return"rtl"===Le(s||i).direction&&(a+=we(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(De(t)))}function ni(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?ye(s):null,r=s?We(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case qt:e={x:a,y:i.y-n.height};break;case Vt:e={x:a,y:i.y+i.height};break;case Kt:e={x:i.x+i.width,y:l};break;case Qt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Pe(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Ut:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Gt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function si(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Jt:a,c=i.rootBoundary,h=void 0===c?Zt:c,d=i.elementContext,u=void 0===d?te:d,f=i.altBoundary,p=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=Me("number"!=typeof g?g:Fe(g,Yt)),b=u===te?ee:te,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ti($e(t)),i=["absolute","fixed"].indexOf(Le(t).position)>=0&&_e(t)?Ne(t):t;return ge(i)?e.filter((function(t){return ge(t)&&ke(t,i)&&"body"!==pe(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=ii(t,i,n);return e.top=we(s.top,e.top),e.right=Ae(s.right,e.right),e.bottom=Ae(s.bottom,e.bottom),e.left=we(s.left,e.left),e}),ii(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(ge(y)?y:y.contextElement||De(t.elements.popper),l,h,r),A=Oe(t.elements.reference),E=ni({reference:A,element:v,placement:s}),T=ei(Object.assign({},v,E)),C=u===te?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===te&&x){var k=x[s];Object.keys(O).forEach((function(t){var e=[Kt,Vt].indexOf(t)>=0?1:-1,i=[qt,Vt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e}))}return O}function oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?ne:l,h=We(n),d=h?a?ie:ie.filter((function(t){return We(t)===h})):Yt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=si(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[ye(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}const ri={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=ye(g),b=l||(_!==g&&p?function(t){if(ye(t)===Xt)return[];var e=Qe(t);return[Ye(t),e,Ye(e)]}(g):[Qe(g)]),v=[g].concat(b).reduce((function(t,i){return t.concat(ye(i)===Xt?oi(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C=0,S=L?"width":"height",D=si(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?k?Kt:Qt:k?Vt:qt;y[S]>w[S]&&($=Qe($));var I=Qe($),N=[];if(o&&N.push(D[x]<=0),a&&N.push(D[$]<=0,D[I]<=0),N.every((function(t){return t}))){T=O,E=!1;break}A.set(O,N)}if(E)for(var P=function(t){var e=v.find((function(e){var i=A.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},j=p?3:1;j>0&&"break"!==P(j);j--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ai(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function li(t){return[qt,Kt,Vt,Qt].some((function(e){return t[e]>=0}))}const ci={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=si(e,{elementContext:"reference"}),a=si(e,{altBoundary:!0}),l=ai(r,n),c=ai(a,s,o),h=li(l),d=li(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},hi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=ne.reduce((function(t,i){return t[i]=function(t,e,i){var n=ye(t),s=[Qt,qt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Qt,Kt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},di={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=ni({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},ui={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=si(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=ye(e.placement),b=We(e.placement),v=!b,y=Pe(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,S="y"===y?qt:Qt,D="y"===y?Vt:Kt,$="y"===y?"height":"width",I=A[y],N=I+g[S],P=I-g[D],j=f?-T[$]/2:0,M=b===Ut?E[$]:T[$],F=b===Ut?-T[$]:-E[$],H=e.elements.arrow,W=f&&H?xe(H):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[S],R=B[D],q=je(0,E[$],W[$]),V=v?E[$]/2-j-q-z-O.mainAxis:M-q-z-O.mainAxis,K=v?-E[$]/2+j+q+R+O.mainAxis:F+q+R+O.mainAxis,Q=e.elements.arrow&&Ne(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=I+K-Y,G=je(f?Ae(N,I+V-Y-X):N,I,f?we(P,U):P);A[y]=G,k[y]=G-I}if(a){var J,Z="x"===y?qt:Qt,tt="x"===y?Vt:Kt,et=A[w],it="y"===w?"height":"width",nt=et+g[Z],st=et-g[tt],ot=-1!==[qt,Qt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=je(t,e,i);return n>i?i:n}(at,et,lt):je(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function fi(t,e,i){void 0===i&&(i=!1);var n,s,o=_e(e),r=_e(e)&&function(t){var e=t.getBoundingClientRect(),i=Ee(e.width)/t.offsetWidth||1,n=Ee(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=De(e),l=Oe(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==pe(e)||Je(a))&&(c=(n=e)!==me(n)&&_e(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ue(n)),_e(e)?((h=Oe(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ge(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function pi(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var mi={placement:"bottom",modifiers:[],strategy:"absolute"};function gi(){for(var t=arguments.length,e=new Array(t),i=0;iNumber.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...g(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=z.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>a(t)));i.length&&b(i,e,t===Oi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Ki.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=z.find(ji);for(const i of e){const e=Ki.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Ci,Oi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Pi)?this:z.prev(this,Pi)[0]||z.next(this,Pi)[0]||z.findOne(Pi,t.delegateTarget.parentNode),o=Ki.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}N.on(document,$i,Pi,Ki.dataApiKeydownHandler),N.on(document,$i,Mi,Ki.dataApiKeydownHandler),N.on(document,Di,Ki.clearMenus),N.on(document,Ii,Ki.clearMenus),N.on(document,Di,Pi,(function(t){t.preventDefault(),Ki.getOrCreateInstance(this).toggle()})),m(Ki);const Qi="backdrop",Xi="show",Yi=`mousedown.bs.${Qi}`,Ui={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Gi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ji extends H{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Ui}static get DefaultType(){return Gi}static get NAME(){return Qi}show(t){if(!this._config.isVisible)return void g(t);this._append();const e=this._getElement();this._config.isAnimated&&d(e),e.classList.add(Xi),this._emulateAnimation((()=>{g(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Xi),this._emulateAnimation((()=>{this.dispose(),g(t)}))):g(t)}dispose(){this._isAppended&&(N.off(this._element,Yi),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=r(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),N.on(t,Yi,(()=>{g(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){_(t,this._getElement(),this._config.isAnimated)}}const Zi=".bs.focustrap",tn=`focusin${Zi}`,en=`keydown.tab${Zi}`,nn="backward",sn={autofocus:!0,trapElement:null},on={autofocus:"boolean",trapElement:"element"};class rn extends H{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return sn}static get DefaultType(){return on}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),N.off(document,Zi),N.on(document,tn,(t=>this._handleFocusin(t))),N.on(document,en,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,N.off(document,Zi))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=z.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===nn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?nn:"forward")}}const an=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ln=".sticky-top",cn="padding-right",hn="margin-right";class dn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,cn,(e=>e+t)),this._setElementAttributes(an,cn,(e=>e+t)),this._setElementAttributes(ln,hn,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,cn),this._resetElementAttributes(an,cn),this._resetElementAttributes(ln,hn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&F.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=F.getDataAttribute(t,e);null!==i?(F.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(o(t))e(t);else for(const i of z.find(t,this._element))e(i)}}const un=".bs.modal",fn=`hide${un}`,pn=`hidePrevented${un}`,mn=`hidden${un}`,gn=`show${un}`,_n=`shown${un}`,bn=`resize${un}`,vn=`click.dismiss${un}`,yn=`mousedown.dismiss${un}`,wn=`keydown.dismiss${un}`,An=`click${un}.data-api`,En="modal-open",Tn="show",Cn="modal-static",On={backdrop:!0,focus:!0,keyboard:!0},xn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class kn extends W{constructor(t,e){super(t,e),this._dialog=z.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new dn,this._addEventListeners()}static get Default(){return On}static get DefaultType(){return xn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||N.trigger(this._element,gn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(En),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(N.trigger(this._element,fn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Tn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){N.off(window,un),N.off(this._dialog,un),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ji({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new rn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=z.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),d(this._element),this._element.classList.add(Tn),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,N.trigger(this._element,_n,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){N.on(this._element,wn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),N.on(window,bn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),N.on(this._element,yn,(t=>{N.one(this._element,vn,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(En),this._resetAdjustments(),this._scrollBar.reset(),N.trigger(this._element,mn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(N.trigger(this._element,pn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Cn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Cn),this._queueCallback((()=>{this._element.classList.remove(Cn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=kn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}N.on(document,An,'[data-bs-toggle="modal"]',(function(t){const e=z.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),N.one(e,gn,(t=>{t.defaultPrevented||N.one(e,mn,(()=>{a(this)&&this.focus()}))}));const i=z.findOne(".modal.show");i&&kn.getInstance(i).hide(),kn.getOrCreateInstance(e).toggle(this)})),R(kn),m(kn);const Ln=".bs.offcanvas",Sn=".data-api",Dn=`load${Ln}${Sn}`,$n="show",In="showing",Nn="hiding",Pn=".offcanvas.show",jn=`show${Ln}`,Mn=`shown${Ln}`,Fn=`hide${Ln}`,Hn=`hidePrevented${Ln}`,Wn=`hidden${Ln}`,Bn=`resize${Ln}`,zn=`click${Ln}${Sn}`,Rn=`keydown.dismiss${Ln}`,qn={backdrop:!0,keyboard:!0,scroll:!1},Vn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Kn extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qn}static get DefaultType(){return Vn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||N.trigger(this._element,jn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new dn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(In),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add($n),this._element.classList.remove(In),N.trigger(this._element,Mn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(N.trigger(this._element,Fn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Nn),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove($n,Nn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new dn).reset(),N.trigger(this._element,Wn)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Ji({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():N.trigger(this._element,Hn)}:null})}_initializeFocusTrap(){return new rn({trapElement:this._element})}_addEventListeners(){N.on(this._element,Rn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():N.trigger(this._element,Hn))}))}static jQueryInterface(t){return this.each((function(){const e=Kn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}N.on(document,zn,'[data-bs-toggle="offcanvas"]',(function(t){const e=z.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this))return;N.one(e,Wn,(()=>{a(this)&&this.focus()}));const i=z.findOne(Pn);i&&i!==e&&Kn.getInstance(i).hide(),Kn.getOrCreateInstance(e).toggle(this)})),N.on(window,Dn,(()=>{for(const t of z.find(Pn))Kn.getOrCreateInstance(t).show()})),N.on(window,Bn,(()=>{for(const t of z.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Kn.getOrCreateInstance(t).hide()})),R(Kn),m(Kn);const Qn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Yn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Un=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Xn.has(i)||Boolean(Yn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Gn={allowList:Qn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
          "},Jn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Zn={entry:"(string|element|function|null)",selector:"(string|element)"};class ts extends H{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Gn}static get DefaultType(){return Jn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Zn)}_setContent(t,e,i){const n=z.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?o(e)?this._putElementInTemplate(r(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Un(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return g(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const es=new Set(["sanitize","allowList","sanitizeFn"]),is="fade",ns="show",ss=".tooltip-inner",os=".modal",rs="hide.bs.modal",as="hover",ls="focus",cs={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},hs={allowList:Qn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},ds={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class us extends W{constructor(t,e){if(void 0===wi)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return hs}static get DefaultType(){return ds}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),N.off(this._element.closest(os),rs,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=N.trigger(this._element,this.constructor.eventName("show")),e=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),N.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ns),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.on(t,"mouseover",h);this._queueCallback((()=>{N.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!N.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ns),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[ls]=!1,this._activeTrigger[as]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),N.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(is,ns),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(is),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ts({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ss]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(is)}_isShown(){return this.tip&&this.tip.classList.contains(ns)}_createPopper(t){const e=g(this._config.placement,[this,t,this._element]),i=cs[e.toUpperCase()];return yi(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return g(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...g(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)N.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===as?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===as?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");N.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?ls:as]=!0,e._enter()})),N.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?ls:as]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},N.on(this._element.closest(os),rs,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=F.getDataAttributes(this._element);for(const t of Object.keys(e))es.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(us);const fs=".popover-header",ps=".popover-body",ms={...us.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},gs={...us.DefaultType,content:"(null|string|element|function)"};class _s extends us{static get Default(){return ms}static get DefaultType(){return gs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[fs]:this._getTitle(),[ps]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=_s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(_s);const bs=".bs.scrollspy",vs=`activate${bs}`,ys=`click${bs}`,ws=`load${bs}.data-api`,As="active",Es="[href]",Ts=".nav-link",Cs=`${Ts}, .nav-item > ${Ts}, .list-group-item`,Os={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},xs={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ks extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Os}static get DefaultType(){return xs}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=r(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(N.off(this._config.target,ys),N.on(this._config.target,ys,Es,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=z.find(Es,this._config.target);for(const e of t){if(!e.hash||l(e))continue;const t=z.findOne(decodeURI(e.hash),this._element);a(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(As),this._activateParents(t),N.trigger(this._element,vs,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))z.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(As);else for(const e of z.parents(t,".nav, .list-group"))for(const t of z.prev(e,Cs))t.classList.add(As)}_clearActiveClass(t){t.classList.remove(As);const e=z.find(`${Es}.${As}`,t);for(const t of e)t.classList.remove(As)}static jQueryInterface(t){return this.each((function(){const e=ks.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}N.on(window,ws,(()=>{for(const t of z.find('[data-bs-spy="scroll"]'))ks.getOrCreateInstance(t)})),m(ks);const Ls=".bs.tab",Ss=`hide${Ls}`,Ds=`hidden${Ls}`,$s=`show${Ls}`,Is=`shown${Ls}`,Ns=`click${Ls}`,Ps=`keydown${Ls}`,js=`load${Ls}`,Ms="ArrowLeft",Fs="ArrowRight",Hs="ArrowUp",Ws="ArrowDown",Bs="Home",zs="End",Rs="active",qs="fade",Vs="show",Ks=".dropdown-toggle",Qs=`:not(${Ks})`,Xs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ys=`.nav-link${Qs}, .list-group-item${Qs}, [role="tab"]${Qs}, ${Xs}`,Us=`.${Rs}[data-bs-toggle="tab"], .${Rs}[data-bs-toggle="pill"], .${Rs}[data-bs-toggle="list"]`;class Gs extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),N.on(this._element,Ps,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?N.trigger(e,Ss,{relatedTarget:t}):null;N.trigger(t,$s,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Rs),this._activate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),N.trigger(t,Is,{relatedTarget:e})):t.classList.add(Vs)}),t,t.classList.contains(qs)))}_deactivate(t,e){t&&(t.classList.remove(Rs),t.blur(),this._deactivate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),N.trigger(t,Ds,{relatedTarget:e})):t.classList.remove(Vs)}),t,t.classList.contains(qs)))}_keydown(t){if(![Ms,Fs,Hs,Ws,Bs,zs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!l(t)));let i;if([Bs,zs].includes(t.key))i=e[t.key===Bs?0:e.length-1];else{const n=[Fs,Ws].includes(t.key);i=b(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Gs.getOrCreateInstance(i).show())}_getChildren(){return z.find(Ys,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=z.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=z.findOne(t,i);s&&s.classList.toggle(n,e)};n(Ks,Rs),n(".dropdown-menu",Vs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Rs)}_getInnerElement(t){return t.matches(Ys)?t:z.findOne(Ys,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Gs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}N.on(document,Ns,Xs,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this)||Gs.getOrCreateInstance(this).show()})),N.on(window,js,(()=>{for(const t of z.find(Us))Gs.getOrCreateInstance(t)})),m(Gs);const Js=".bs.toast",Zs=`mouseover${Js}`,to=`mouseout${Js}`,eo=`focusin${Js}`,io=`focusout${Js}`,no=`hide${Js}`,so=`hidden${Js}`,oo=`show${Js}`,ro=`shown${Js}`,ao="hide",lo="show",co="showing",ho={animation:"boolean",autohide:"boolean",delay:"number"},uo={animation:!0,autohide:!0,delay:5e3};class fo extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return uo}static get DefaultType(){return ho}static get NAME(){return"toast"}show(){N.trigger(this._element,oo).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ao),d(this._element),this._element.classList.add(lo,co),this._queueCallback((()=>{this._element.classList.remove(co),N.trigger(this._element,ro),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(N.trigger(this._element,no).defaultPrevented||(this._element.classList.add(co),this._queueCallback((()=>{this._element.classList.add(ao),this._element.classList.remove(co,lo),N.trigger(this._element,so)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(lo),super.dispose()}isShown(){return this._element.classList.contains(lo)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){N.on(this._element,Zs,(t=>this._onInteraction(t,!0))),N.on(this._element,to,(t=>this._onInteraction(t,!1))),N.on(this._element,eo,(t=>this._onInteraction(t,!0))),N.on(this._element,io,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=fo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return R(fo),m(fo),{Alert:Q,Button:Y,Carousel:Lt,Collapse:Rt,Dropdown:Ki,Modal:kn,Offcanvas:Kn,Popover:_s,ScrollSpy:ks,Tab:Gs,Toast:fo,Tooltip:us}})); -//# sourceMappingURL=bootstrap.bundle.min.js.map \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/file.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/file.js deleted file mode 100644 index 124a8a18..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/file.js +++ /dev/null @@ -1,53 +0,0 @@ -$(function () { - var $window = $(window) - , $top_link = $('#toplink') - , $body = $('body, html') - , offset = $('#code').offset().top; - - $top_link.hide().click(function (event) { - event.preventDefault(); - $body.animate({scrollTop: 0}, 800); - }); - - $window.scroll(function () { - if ($window.scrollTop() > offset) { - $top_link.fadeIn(); - } else { - $top_link.fadeOut(); - } - }); - - var $popovers = $('.popin > :first-child'); - $('.popin').on({ - 'click.popover': function (event) { - event.stopPropagation(); - - var $container = $(this).children().first(); - - //Close all other popovers: - $popovers.each(function () { - var $current = $(this); - if (!$current.is($container)) { - $current.popover('hide'); - } - }); - - // Toggle this popover: - $container.popover('toggle'); - }, - }); - - //Hide all popovers on outside click: - $(document).click(function (event) { - if ($(event.target).closest($('.popover')).length === 0) { - $popovers.popover('hide'); - } - }); - - //Hide all popovers on escape: - $(document).keyup(function (event) { - if (event.key === 'Escape') { - $popovers.popover('hide'); - } - }); -}); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js deleted file mode 100644 index 798cc8bf..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="
          ",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
          "],col:[2,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
          ",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0{{lineNumber}}{{lineContent}} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/lines.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/lines.html.dist deleted file mode 100644 index add40e4e..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/lines.html.dist +++ /dev/null @@ -1,5 +0,0 @@ - - -{{lines}} - -
          diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist deleted file mode 100644 index 2311d456..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist +++ /dev/null @@ -1,12 +0,0 @@ - - {{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{crap}} - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist deleted file mode 100644 index 36d6cb74..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist +++ /dev/null @@ -1,18 +0,0 @@ - - {{name}} - {{lines_bar}} -
          {{lines_executed_percent}}
          -
          {{lines_number}}
          - {{branches_bar}} -
          {{branches_executed_percent}}
          -
          {{branches_number}}
          - {{paths_bar}} -
          {{paths_executed_percent}}
          -
          {{paths_number}}
          - {{methods_bar}} -
          {{methods_tested_percent}}
          -
          {{methods_number}}
          - {{crap}} - - - diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/paths.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/paths.html.dist deleted file mode 100644 index d14b8ad9..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/paths.html.dist +++ /dev/null @@ -1,9 +0,0 @@ -
          -

          Paths

          -

          - Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not - necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once. - Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement - always has an else as part of its logical flow even if you didn't write one. -

          -{{paths}} diff --git a/vendor/phpunit/php-code-coverage/src/Report/OpenClover.php b/vendor/phpunit/php-code-coverage/src/Report/OpenClover.php deleted file mode 100644 index 65d409b1..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/OpenClover.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use function assert; -use function basename; -use function count; -use function is_string; -use function ksort; -use function max; -use function range; -use function str_replace; -use function time; -use DOMDocument; -use DOMElement; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Util\Xml; -use SebastianBergmann\CodeCoverage\Version; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -final class OpenClover -{ - /** - * @throws WriteOperationFailedException - */ - public function process(CodeCoverage $coverage, ?string $target = null, ?string $name = null): string - { - $time = (string) time(); - - $xmlDocument = new DOMDocument('1.0', 'UTF-8'); - $xmlDocument->formatOutput = true; - - $xmlCoverage = $xmlDocument->createElement('coverage'); - $xmlCoverage->setAttribute('clover', Version::id()); - $xmlCoverage->setAttribute('generated', $time); - $xmlDocument->appendChild($xmlCoverage); - - $xmlProject = $xmlDocument->createElement('project'); - $xmlProject->setAttribute('timestamp', $time); - - if (is_string($name)) { - $xmlProject->setAttribute('name', $name); - } - - $xmlCoverage->appendChild($xmlProject); - - /** @var array $packages */ - $packages = []; - $report = $coverage->getReport(); - - foreach ($report as $item) { - if (!$item instanceof File) { - continue; - } - - $xmlFile = $xmlDocument->createElement('file'); - $xmlFile->setAttribute('name', basename($item->pathAsString())); - $xmlFile->setAttribute('path', $item->pathAsString()); - - $classes = $item->classesAndTraits(); - $coverageData = $item->lineCoverageData(); - $lines = []; - $namespace = 'global'; - - foreach ($classes as $className => $class) { - $classStatements = 0; - $coveredClassStatements = 0; - $coveredMethods = 0; - $classMethods = 0; - - // Assumption: one namespace per file - if ($class['namespace'] !== '') { - $namespace = $class['namespace']; - } - - foreach ($class['methods'] as $methodName => $method) { - /** @phpstan-ignore equal.notAllowed */ - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classStatements += $method['executableLines']; - $coveredClassStatements += $method['executedLines']; - - /** @phpstan-ignore equal.notAllowed */ - if ($method['coverage'] == 100) { - $coveredMethods++; - } - - $methodCount = 0; - - foreach (range($method['startLine'], $method['endLine']) as $line) { - if (isset($coverageData[$line])) { - $methodCount = max($methodCount, count($coverageData[$line])); - } - } - - $lines[$method['startLine']] = [ - 'ccn' => $method['ccn'], - 'count' => $methodCount, - 'type' => 'method', - 'signature' => $method['signature'], - 'visibility' => $method['visibility'], - ]; - } - - $xmlClass = $xmlDocument->createElement('class'); - $xmlClass->setAttribute('name', str_replace($class['namespace'] . '\\', '', $className)); - - $xmlFile->appendChild($xmlClass); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('complexity', (string) $class['ccn']); - $xmlMetrics->setAttribute('elements', (string) ($classMethods + $classStatements + $class['executableBranches'])); - $xmlMetrics->setAttribute('coveredelements', (string) ($coveredMethods + $coveredClassStatements + $class['executedBranches'])); - $xmlMetrics->setAttribute('conditionals', (string) $class['executableBranches']); - $xmlMetrics->setAttribute('coveredconditionals', (string) $class['executedBranches']); - $xmlMetrics->setAttribute('statements', (string) $classStatements); - $xmlMetrics->setAttribute('coveredstatements', (string) $coveredClassStatements); - $xmlMetrics->setAttribute('methods', (string) $classMethods); - $xmlMetrics->setAttribute('coveredmethods', (string) $coveredMethods); - $xmlClass->insertBefore($xmlMetrics, $xmlClass->firstChild); - } - - foreach ($coverageData as $line => $data) { - if ($data === null || isset($lines[$line])) { - continue; - } - - $lines[$line] = [ - 'count' => count($data), - 'type' => 'stmt', - ]; - } - - ksort($lines); - - foreach ($lines as $line => $data) { - $xmlLine = $xmlDocument->createElement('line'); - $xmlLine->setAttribute('num', (string) $line); - $xmlLine->setAttribute('type', $data['type']); - - if (isset($data['ccn'])) { - $xmlLine->setAttribute('complexity', (string) $data['ccn']); - } - - $xmlLine->setAttribute('count', (string) $data['count']); - - if (isset($data['signature'])) { - $xmlLine->setAttribute('signature', $data['signature']); - } - - if (isset($data['visibility'])) { - $xmlLine->setAttribute('visibility', $data['visibility']); - } - - $xmlFile->appendChild($xmlLine); - } - - $linesOfCode = $item->linesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); - $xmlMetrics->setAttribute('classes', (string) $item->numberOfClassesAndTraits()); - $xmlMetrics->setAttribute('complexity', (string) $item->cyclomaticComplexity()); - $xmlMetrics->setAttribute('elements', (string) ($item->numberOfMethods() + $item->numberOfExecutableLines() + $item->numberOfExecutableBranches())); - $xmlMetrics->setAttribute('coveredelements', (string) ($item->numberOfTestedMethods() + $item->numberOfExecutedLines() + $item->numberOfExecutedBranches())); - $xmlMetrics->setAttribute('conditionals', (string) $item->numberOfExecutableBranches()); - $xmlMetrics->setAttribute('coveredconditionals', (string) $item->numberOfExecutedBranches()); - $xmlMetrics->setAttribute('statements', (string) $item->numberOfExecutableLines()); - $xmlMetrics->setAttribute('coveredstatements', (string) $item->numberOfExecutedLines()); - $xmlMetrics->setAttribute('methods', (string) $item->numberOfMethods()); - $xmlMetrics->setAttribute('coveredmethods', (string) $item->numberOfTestedMethods()); - $xmlFile->insertBefore($xmlMetrics, $xmlFile->firstChild); - - if (!isset($packages[$namespace])) { - $packages[$namespace] = $xmlDocument->createElement('package'); - $packages[$namespace]->setAttribute('name', $namespace); - - $xmlPackageMetrics = $xmlDocument->createElement('metrics'); - $xmlPackageMetrics->setAttribute('complexity', '0'); - $xmlPackageMetrics->setAttribute('elements', '0'); - $xmlPackageMetrics->setAttribute('coveredelements', '0'); - $xmlPackageMetrics->setAttribute('conditionals', '0'); - $xmlPackageMetrics->setAttribute('coveredconditionals', '0'); - $xmlPackageMetrics->setAttribute('statements', '0'); - $xmlPackageMetrics->setAttribute('coveredstatements', '0'); - $xmlPackageMetrics->setAttribute('methods', '0'); - $xmlPackageMetrics->setAttribute('coveredmethods', '0'); - $packages[$namespace]->appendChild($xmlPackageMetrics); - - $xmlProject->appendChild($packages[$namespace]); - } - - $xmlPackageMetrics = $packages[$namespace]->firstChild; - - assert($xmlPackageMetrics instanceof DOMElement); - - $xmlPackageMetrics->setAttribute('complexity', (string) ((int) $xmlPackageMetrics->getAttribute('complexity') + $item->cyclomaticComplexity())); - $xmlPackageMetrics->setAttribute('elements', (string) ((int) $xmlPackageMetrics->getAttribute('elements') + $item->numberOfMethods() + $item->numberOfExecutableLines() + $item->numberOfExecutableBranches())); - $xmlPackageMetrics->setAttribute('coveredelements', (string) ((int) $xmlPackageMetrics->getAttribute('coveredelements') + $item->numberOfTestedMethods() + $item->numberOfExecutedLines() + $item->numberOfExecutedBranches())); - $xmlPackageMetrics->setAttribute('conditionals', (string) ((int) $xmlPackageMetrics->getAttribute('conditionals') + $item->numberOfExecutableBranches())); - $xmlPackageMetrics->setAttribute('coveredconditionals', (string) ((int) $xmlPackageMetrics->getAttribute('coveredconditionals') + $item->numberOfExecutedBranches())); - $xmlPackageMetrics->setAttribute('statements', (string) ((int) $xmlPackageMetrics->getAttribute('statements') + $item->numberOfExecutableLines())); - $xmlPackageMetrics->setAttribute('coveredstatements', (string) ((int) $xmlPackageMetrics->getAttribute('coveredstatements') + $item->numberOfExecutedLines())); - $xmlPackageMetrics->setAttribute('methods', (string) ((int) $xmlPackageMetrics->getAttribute('methods') + $item->numberOfMethods())); - $xmlPackageMetrics->setAttribute('coveredmethods', (string) ((int) $xmlPackageMetrics->getAttribute('coveredmethods') + $item->numberOfTestedMethods())); - - $packages[$namespace]->appendChild($xmlFile); - } - - $linesOfCode = $report->linesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('files', (string) count($report)); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); - $xmlMetrics->setAttribute('classes', (string) $report->numberOfClassesAndTraits()); - $xmlMetrics->setAttribute('complexity', (string) $report->cyclomaticComplexity()); - $xmlMetrics->setAttribute('elements', (string) ($report->numberOfMethods() + $report->numberOfExecutableLines() + $report->numberOfExecutableBranches())); - $xmlMetrics->setAttribute('coveredelements', (string) ($report->numberOfTestedMethods() + $report->numberOfExecutedLines() + $report->numberOfExecutedBranches())); - $xmlMetrics->setAttribute('conditionals', (string) $report->numberOfExecutableBranches()); - $xmlMetrics->setAttribute('coveredconditionals', (string) $report->numberOfExecutedBranches()); - $xmlMetrics->setAttribute('statements', (string) $report->numberOfExecutableLines()); - $xmlMetrics->setAttribute('coveredstatements', (string) $report->numberOfExecutedLines()); - $xmlMetrics->setAttribute('methods', (string) $report->numberOfMethods()); - $xmlMetrics->setAttribute('coveredmethods', (string) $report->numberOfTestedMethods()); - $xmlProject->insertBefore($xmlMetrics, $xmlProject->firstChild); - - $buffer = Xml::asString($xmlDocument); - - if ($target !== null) { - Filesystem::write($target, $buffer); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/Report/PHP.php deleted file mode 100644 index aa941dc8..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/PHP.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use const PHP_EOL; -use function serialize; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -final class PHP -{ - /** - * @param null|non-empty-string $target - * - * @throws WriteOperationFailedException - */ - public function process(CodeCoverage $coverage, ?string $target = null): string - { - $coverage->clearCache(); - - $buffer = " - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use const PHP_EOL; -use function array_map; -use function date; -use function ksort; -use function max; -use function sprintf; -use function str_pad; -use function strlen; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Util\Percentage; - -final class Text -{ - private const string COLOR_GREEN = "\x1b[30;42m"; - private const string COLOR_YELLOW = "\x1b[30;43m"; - private const string COLOR_RED = "\x1b[37;41m"; - private const string COLOR_HEADER = "\x1b[1;37;40m"; - private const string COLOR_RESET = "\x1b[0m"; - private readonly Thresholds $thresholds; - private readonly bool $showUncoveredFiles; - private readonly bool $showOnlySummary; - - public function __construct(Thresholds $thresholds, bool $showUncoveredFiles = false, bool $showOnlySummary = false) - { - $this->thresholds = $thresholds; - $this->showUncoveredFiles = $showUncoveredFiles; - $this->showOnlySummary = $showOnlySummary; - } - - public function process(CodeCoverage $coverage, bool $showColors = false): string - { - $hasBranchCoverage = $coverage->getData(true)->functionCoverage() !== []; - - $output = PHP_EOL . PHP_EOL; - $report = $coverage->getReport(); - - $colors = [ - 'header' => '', - 'classes' => '', - 'methods' => '', - 'lines' => '', - 'branches' => '', - 'paths' => '', - 'reset' => '', - ]; - - if ($showColors) { - $colors['classes'] = $this->coverageColor( - $report->numberOfTestedClassesAndTraits(), - $report->numberOfClassesAndTraits(), - ); - - $colors['methods'] = $this->coverageColor( - $report->numberOfTestedMethods(), - $report->numberOfMethods(), - ); - - $colors['lines'] = $this->coverageColor( - $report->numberOfExecutedLines(), - $report->numberOfExecutableLines(), - ); - - $colors['branches'] = $this->coverageColor( - $report->numberOfExecutedBranches(), - $report->numberOfExecutableBranches(), - ); - - $colors['paths'] = $this->coverageColor( - $report->numberOfExecutedPaths(), - $report->numberOfExecutablePaths(), - ); - - $colors['reset'] = self::COLOR_RESET; - $colors['header'] = self::COLOR_HEADER; - } - - $classes = sprintf( - ' Classes: %6s (%d/%d)', - Percentage::fromFractionAndTotal( - $report->numberOfTestedClassesAndTraits(), - $report->numberOfClassesAndTraits(), - )->asString(), - $report->numberOfTestedClassesAndTraits(), - $report->numberOfClassesAndTraits(), - ); - - $methods = sprintf( - ' Methods: %6s (%d/%d)', - Percentage::fromFractionAndTotal( - $report->numberOfTestedMethods(), - $report->numberOfMethods(), - )->asString(), - $report->numberOfTestedMethods(), - $report->numberOfMethods(), - ); - - $paths = ''; - $branches = ''; - - if ($hasBranchCoverage) { - $paths = sprintf( - ' Paths: %6s (%d/%d)', - Percentage::fromFractionAndTotal( - $report->numberOfExecutedPaths(), - $report->numberOfExecutablePaths(), - )->asString(), - $report->numberOfExecutedPaths(), - $report->numberOfExecutablePaths(), - ); - - $branches = sprintf( - ' Branches: %6s (%d/%d)', - Percentage::fromFractionAndTotal( - $report->numberOfExecutedBranches(), - $report->numberOfExecutableBranches(), - )->asString(), - $report->numberOfExecutedBranches(), - $report->numberOfExecutableBranches(), - ); - } - - $lines = sprintf( - ' Lines: %6s (%d/%d)', - Percentage::fromFractionAndTotal( - $report->numberOfExecutedLines(), - $report->numberOfExecutableLines(), - )->asString(), - $report->numberOfExecutedLines(), - $report->numberOfExecutableLines(), - ); - - $padding = max(array_map('strlen', [$classes, $methods, $lines])); - - if ($this->showOnlySummary) { - $title = 'Code Coverage Report Summary:'; - $padding = max($padding, strlen($title)); - - $output .= $this->format($colors['header'], $padding, $title); - } else { - $date = date(' Y-m-d H:i:s'); - $title = 'Code Coverage Report:'; - - $output .= $this->format($colors['header'], $padding, $title); - $output .= $this->format($colors['header'], $padding, $date); - $output .= $this->format($colors['header'], $padding, ''); - $output .= $this->format($colors['header'], $padding, ' Summary:'); - } - - $output .= $this->format($colors['classes'], $padding, $classes); - $output .= $this->format($colors['methods'], $padding, $methods); - - if ($hasBranchCoverage) { - $output .= $this->format($colors['paths'], $padding, $paths); - $output .= $this->format($colors['branches'], $padding, $branches); - } - $output .= $this->format($colors['lines'], $padding, $lines); - - if ($this->showOnlySummary) { - return $output . PHP_EOL; - } - - $classCoverage = []; - - foreach ($report as $item) { - if (!$item instanceof File) { - continue; - } - - $classes = $item->classesAndTraits(); - - foreach ($classes as $className => $class) { - $classExecutableLines = 0; - $classExecutedLines = 0; - $classExecutableBranches = 0; - $classExecutedBranches = 0; - $classExecutablePaths = 0; - $classExecutedPaths = 0; - $coveredMethods = 0; - $classMethods = 0; - - foreach ($class['methods'] as $method) { - /** @phpstan-ignore equal.notAllowed */ - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classExecutableLines += $method['executableLines']; - $classExecutedLines += $method['executedLines']; - $classExecutableBranches += $method['executableBranches']; - $classExecutedBranches += $method['executedBranches']; - $classExecutablePaths += $method['executablePaths']; - $classExecutedPaths += $method['executedPaths']; - - /** @phpstan-ignore equal.notAllowed */ - if ($method['coverage'] == 100) { - $coveredMethods++; - } - } - - $classCoverage[$className] = [ - 'namespace' => $class['namespace'], - 'className' => $className, - 'methodsCovered' => $coveredMethods, - 'methodCount' => $classMethods, - 'statementsCovered' => $classExecutedLines, - 'statementCount' => $classExecutableLines, - 'branchesCovered' => $classExecutedBranches, - 'branchesCount' => $classExecutableBranches, - 'pathsCovered' => $classExecutedPaths, - 'pathsCount' => $classExecutablePaths, - ]; - } - } - - ksort($classCoverage); - - $methodColor = ''; - $pathsColor = ''; - $branchesColor = ''; - $linesColor = ''; - $resetColor = ''; - - foreach ($classCoverage as $fullQualifiedPath => $classInfo) { - /** @phpstan-ignore notEqual.notAllowed */ - if ($this->showUncoveredFiles || $classInfo['statementsCovered'] != 0) { - if ($showColors) { - $methodColor = $this->coverageColor($classInfo['methodsCovered'], $classInfo['methodCount']); - $pathsColor = $this->coverageColor($classInfo['pathsCovered'], $classInfo['pathsCount']); - $branchesColor = $this->coverageColor($classInfo['branchesCovered'], $classInfo['branchesCount']); - $linesColor = $this->coverageColor($classInfo['statementsCovered'], $classInfo['statementCount']); - $resetColor = $colors['reset']; - } - - $output .= PHP_EOL . $fullQualifiedPath . PHP_EOL - . ' ' . $methodColor . 'Methods: ' . $this->printCoverageCounts($classInfo['methodsCovered'], $classInfo['methodCount'], 2) . $resetColor . ' '; - - if ($hasBranchCoverage) { - $output .= ' ' . $pathsColor . 'Paths: ' . $this->printCoverageCounts($classInfo['pathsCovered'], $classInfo['pathsCount'], 3) . $resetColor . ' ' - . ' ' . $branchesColor . 'Branches: ' . $this->printCoverageCounts($classInfo['branchesCovered'], $classInfo['branchesCount'], 3) . $resetColor . ' '; - } - $output .= ' ' . $linesColor . 'Lines: ' . $this->printCoverageCounts($classInfo['statementsCovered'], $classInfo['statementCount'], 3) . $resetColor; - } - } - - return $output . PHP_EOL; - } - - private function coverageColor(int $numberOfCoveredElements, int $totalNumberOfElements): string - { - $coverage = Percentage::fromFractionAndTotal( - $numberOfCoveredElements, - $totalNumberOfElements, - ); - - if ($coverage->asFloat() >= $this->thresholds->highLowerBound()) { - return self::COLOR_GREEN; - } - - if ($coverage->asFloat() > $this->thresholds->lowUpperBound()) { - return self::COLOR_YELLOW; - } - - return self::COLOR_RED; - } - - private function printCoverageCounts(int $numberOfCoveredElements, int $totalNumberOfElements, int $precision): string - { - $format = '%' . $precision . 's'; - - return Percentage::fromFractionAndTotal( - $numberOfCoveredElements, - $totalNumberOfElements, - )->asFixedWidthString() . - ' (' . sprintf($format, $numberOfCoveredElements) . '/' . - sprintf($format, $totalNumberOfElements) . ')'; - } - - private function format(string $color, int $padding, false|string $string): string - { - if ($color === '') { - return (string) $string . PHP_EOL; - } - - return $color . str_pad((string) $string, $padding) . self::COLOR_RESET . PHP_EOL; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php b/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php deleted file mode 100644 index d1a81a26..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report; - -use SebastianBergmann\CodeCoverage\InvalidArgumentException; - -/** - * @immutable - */ -final readonly class Thresholds -{ - private int $lowUpperBound; - private int $highLowerBound; - - public static function default(): self - { - return new self(50, 90); - } - - /** - * @throws InvalidArgumentException - */ - public static function from(int $lowUpperBound, int $highLowerBound): self - { - if ($lowUpperBound > $highLowerBound) { - throw new InvalidArgumentException( - '$lowUpperBound must not be larger than $highLowerBound', - ); - } - - return new self($lowUpperBound, $highLowerBound); - } - - private function __construct(int $lowUpperBound, int $highLowerBound) - { - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - } - - public function lowUpperBound(): int - { - return $this->lowUpperBound; - } - - public function highLowerBound(): int - { - return $this->highLowerBound; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php deleted file mode 100644 index dba23012..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use function phpversion; -use DateTimeImmutable; -use DOMElement; -use SebastianBergmann\Environment\Runtime; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class BuildInformation -{ - private DOMElement $contextNode; - - public function __construct(DOMElement $contextNode) - { - $this->contextNode = $contextNode; - } - - public function setRuntimeInformation(Runtime $runtime): void - { - $runtimeNode = $this->nodeByName('runtime'); - - $runtimeNode->setAttribute('name', $runtime->getName()); - $runtimeNode->setAttribute('version', $runtime->getVersion()); - $runtimeNode->setAttribute('url', $runtime->getVendorUrl()); - - $driverNode = $this->nodeByName('driver'); - - if ($runtime->hasXdebug()) { - $driverNode->setAttribute('name', 'xdebug'); - $driverNode->setAttribute('version', phpversion('xdebug')); - } - - if ($runtime->hasPCOV()) { - $driverNode->setAttribute('name', 'pcov'); - $driverNode->setAttribute('version', phpversion('pcov')); - } - } - - public function setBuildTime(DateTimeImmutable $date): void - { - $this->contextNode->setAttribute('time', $date->format('D M j G:i:s T Y')); - } - - public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void - { - $this->contextNode->setAttribute('phpunit', $phpUnitVersion); - $this->contextNode->setAttribute('coverage', $coverageVersion); - } - - private function nodeByName(string $name): DOMElement - { - $node = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - $name, - )->item(0); - - if ($node === null) { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - $name, - ), - ); - } - - assert($node instanceof DOMElement); - - return $node; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php deleted file mode 100644 index afb70a06..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use DOMElement; -use SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException; -use XMLWriter; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Coverage -{ - private readonly XMLWriter $writer; - private readonly DOMElement $contextNode; - private bool $finalized = false; - - public function __construct(DOMElement $context, string $line) - { - $this->contextNode = $context; - - $this->writer = new XMLWriter; - $this->writer->openMemory(); - $this->writer->startElementNs(null, $context->nodeName, 'https://schema.phpunit.de/coverage/1.0'); - $this->writer->writeAttribute('nr', $line); - } - - /** - * @throws ReportAlreadyFinalizedException - */ - public function addTest(string $test): void - { - if ($this->finalized) { - // @codeCoverageIgnoreStart - throw new ReportAlreadyFinalizedException; - // @codeCoverageIgnoreEnd - } - - $this->writer->startElement('covered'); - $this->writer->writeAttribute('by', $test); - $this->writer->endElement(); - } - - public function finalize(): void - { - $this->writer->endElement(); - - $fragment = $this->contextNode->ownerDocument->createDocumentFragment(); - $fragment->appendXML($this->writer->outputMemory()); - - $this->contextNode->parentNode->replaceChild( - $fragment, - $this->contextNode, - ); - - $this->finalized = true; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php deleted file mode 100644 index b712953a..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Directory extends Node -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php deleted file mode 100644 index ba008f2f..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php +++ /dev/null @@ -1,290 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use const DIRECTORY_SEPARATOR; -use function count; -use function dirname; -use function file_get_contents; -use function is_array; -use function is_dir; -use function is_file; -use function is_writable; -use function sprintf; -use function strlen; -use function substr; -use DateTimeImmutable; -use DOMDocument; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\Node\AbstractNode; -use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; -use SebastianBergmann\CodeCoverage\PathExistsButIsNotDirectoryException; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Util\Xml; -use SebastianBergmann\CodeCoverage\Version; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; -use SebastianBergmann\CodeCoverage\XmlException; -use SebastianBergmann\Environment\Runtime; - -/** - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type TestType from CodeCoverage - */ -final class Facade -{ - private string $target; - private Project $project; - private readonly string $phpUnitVersion; - - public function __construct(string $version) - { - $this->phpUnitVersion = $version; - } - - /** - * @throws XmlException - */ - public function process(CodeCoverage $coverage, string $target): void - { - if (substr($target, -1, 1) !== DIRECTORY_SEPARATOR) { - $target .= DIRECTORY_SEPARATOR; - } - - $this->target = $target; - $this->initTargetDirectory($target); - - $report = $coverage->getReport(); - - $this->project = new Project( - $coverage->getReport()->name(), - ); - - $this->setBuildInformation(); - $this->processTests($coverage->getTests()); - $this->processDirectory($report, $this->project); - - $this->saveDocument($this->project->asDom(), 'index'); - } - - private function setBuildInformation(): void - { - $buildNode = $this->project->buildInformation(); - $buildNode->setRuntimeInformation(new Runtime); - $buildNode->setBuildTime(new DateTimeImmutable); - $buildNode->setGeneratorVersions($this->phpUnitVersion, Version::id()); - } - - /** - * @throws PathExistsButIsNotDirectoryException - * @throws WriteOperationFailedException - */ - private function initTargetDirectory(string $directory): void - { - if (is_file($directory)) { - // @codeCoverageIgnoreStart - if (!is_dir($directory)) { - throw new PathExistsButIsNotDirectoryException($directory); - } - - if (!is_writable($directory)) { - throw new WriteOperationFailedException($directory); - } - // @codeCoverageIgnoreEnd - } - - Filesystem::createDirectory($directory); - } - - /** - * @throws XmlException - */ - private function processDirectory(DirectoryNode $directory, Node $context): void - { - $directoryName = $directory->name(); - - if ($this->project->projectSourceDirectory() === $directoryName) { - $directoryName = '/'; - } - - $directoryObject = $context->addDirectory($directoryName); - - $this->setTotals($directory, $directoryObject->totals()); - - foreach ($directory->directories() as $node) { - $this->processDirectory($node, $directoryObject); - } - - foreach ($directory->files() as $node) { - $this->processFile($node, $directoryObject); - } - } - - /** - * @throws XmlException - */ - private function processFile(FileNode $file, Directory $context): void - { - $fileObject = $context->addFile( - $file->name(), - $file->id() . '.xml', - ); - - $this->setTotals($file, $fileObject->totals()); - - $path = substr( - $file->pathAsString(), - strlen($this->project->projectSourceDirectory()), - ); - - $fileReport = new Report($path); - - $this->setTotals($file, $fileReport->totals()); - - foreach ($file->classesAndTraits() as $unit) { - $this->processUnit($unit, $fileReport); - } - - foreach ($file->functions() as $function) { - $this->processFunction($function, $fileReport); - } - - foreach ($file->lineCoverageData() as $line => $tests) { - if (!is_array($tests) || count($tests) === 0) { - continue; - } - - $coverage = $fileReport->lineCoverage((string) $line); - - foreach ($tests as $test) { - $coverage->addTest($test); - } - - $coverage->finalize(); - } - - $fileReport->source()->setSourceCode( - file_get_contents($file->pathAsString()), - ); - - $this->saveDocument($fileReport->asDom(), $file->id()); - } - - /** - * @param ProcessedClassType|ProcessedTraitType $unit - */ - private function processUnit(array $unit, Report $report): void - { - if (isset($unit['className'])) { - $unitObject = $report->classObject($unit['className']); - } else { - $unitObject = $report->traitObject($unit['traitName']); - } - - $unitObject->setLines( - $unit['startLine'], - $unit['executableLines'], - $unit['executedLines'], - ); - - $unitObject->setCrap((float) $unit['crap']); - $unitObject->setNamespace($unit['namespace']); - - foreach ($unit['methods'] as $method) { - $methodObject = $unitObject->addMethod($method['methodName']); - $methodObject->setSignature($method['signature']); - $methodObject->setLines((string) $method['startLine'], (string) $method['endLine']); - $methodObject->setCrap($method['crap']); - $methodObject->setTotals( - (string) $method['executableLines'], - (string) $method['executedLines'], - (string) $method['coverage'], - ); - } - } - - /** - * @param ProcessedFunctionType $function - */ - private function processFunction(array $function, Report $report): void - { - $functionObject = $report->functionObject($function['functionName']); - - $functionObject->setSignature($function['signature']); - $functionObject->setLines((string) $function['startLine']); - $functionObject->setCrap($function['crap']); - $functionObject->setTotals((string) $function['executableLines'], (string) $function['executedLines'], (string) $function['coverage']); - } - - /** - * @param array $tests - */ - private function processTests(array $tests): void - { - $testsObject = $this->project->tests(); - - foreach ($tests as $test => $result) { - $testsObject->addTest($test, $result); - } - } - - private function setTotals(AbstractNode $node, Totals $totals): void - { - $loc = $node->linesOfCode(); - - $totals->setNumLines( - $loc->linesOfCode(), - $loc->commentLinesOfCode(), - $loc->nonCommentLinesOfCode(), - $node->numberOfExecutableLines(), - $node->numberOfExecutedLines(), - ); - - $totals->setNumClasses( - $node->numberOfClasses(), - $node->numberOfTestedClasses(), - ); - - $totals->setNumTraits( - $node->numberOfTraits(), - $node->numberOfTestedTraits(), - ); - - $totals->setNumMethods( - $node->numberOfMethods(), - $node->numberOfTestedMethods(), - ); - - $totals->setNumFunctions( - $node->numberOfFunctions(), - $node->numberOfTestedFunctions(), - ); - } - - private function targetDirectory(): string - { - return $this->target; - } - - /** - * @throws XmlException - */ - private function saveDocument(DOMDocument $document, string $name): void - { - $filename = sprintf('%s/%s.xml', $this->targetDirectory(), $name); - - $this->initTargetDirectory(dirname($filename)); - - Filesystem::write($filename, Xml::asString($document)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php deleted file mode 100644 index 4a3fea00..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -class File -{ - private readonly DOMDocument $dom; - private readonly DOMElement $contextNode; - - public function __construct(DOMElement $context) - { - $this->dom = $context->ownerDocument; - $this->contextNode = $context; - } - - public function totals(): Totals - { - $totalsContainer = $this->contextNode->firstChild; - - if ($totalsContainer === null) { - $totalsContainer = $this->contextNode->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'totals', - ), - ); - } - - assert($totalsContainer instanceof DOMElement); - - return new Totals($totalsContainer); - } - - public function lineCoverage(string $line): Coverage - { - $coverage = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'coverage', - )->item(0); - - if ($coverage === null) { - $coverage = $this->contextNode->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'coverage', - ), - ); - } - - $lineNode = $coverage->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'line', - ), - ); - - assert($lineNode instanceof DOMElement); - - return new Coverage($lineNode, $line); - } - - protected function contextNode(): DOMElement - { - return $this->contextNode; - } - - protected function dom(): DOMDocument - { - return $this->dom; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php deleted file mode 100644 index 1994d0f7..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Method -{ - private DOMElement $contextNode; - - public function __construct(DOMElement $context, string $name) - { - $this->contextNode = $context; - - $this->setName($name); - } - - public function setSignature(string $signature): void - { - $this->contextNode->setAttribute('signature', $signature); - } - - public function setLines(string $start, ?string $end = null): void - { - $this->contextNode->setAttribute('start', $start); - - if ($end !== null) { - $this->contextNode->setAttribute('end', $end); - } - } - - public function setTotals(string $executable, string $executed, string $coverage): void - { - $this->contextNode->setAttribute('executable', $executable); - $this->contextNode->setAttribute('executed', $executed); - $this->contextNode->setAttribute('coverage', $coverage); - } - - public function setCrap(string $crap): void - { - $this->contextNode->setAttribute('crap', $crap); - } - - private function setName(string $name): void - { - $this->contextNode->setAttribute('name', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php deleted file mode 100644 index e41197a0..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class Node -{ - private DOMDocument $dom; - private DOMElement $contextNode; - - public function __construct(DOMElement $context) - { - $this->setContextNode($context); - } - - public function dom(): DOMDocument - { - return $this->dom; - } - - public function totals(): Totals - { - $totalsContainer = $this->contextNode()->firstChild; - - if ($totalsContainer === null) { - $totalsContainer = $this->contextNode()->appendChild( - $this->dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'totals', - ), - ); - } - - assert($totalsContainer instanceof DOMElement); - - return new Totals($totalsContainer); - } - - public function addDirectory(string $name): Directory - { - $dirNode = $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'directory', - ); - - $dirNode->setAttribute('name', $name); - $this->contextNode()->appendChild($dirNode); - - return new Directory($dirNode); - } - - public function addFile(string $name, string $href): File - { - $fileNode = $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'file', - ); - - $fileNode->setAttribute('name', $name); - $fileNode->setAttribute('href', $href); - $this->contextNode()->appendChild($fileNode); - - return new File($fileNode); - } - - protected function setContextNode(DOMElement $context): void - { - $this->dom = $context->ownerDocument; - $this->contextNode = $context; - } - - protected function contextNode(): DOMElement - { - return $this->contextNode; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php deleted file mode 100644 index 21b5a2ce..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Project extends Node -{ - /** - * @phpstan-ignore constructor.missingParentCall - */ - public function __construct(string $directory) - { - $this->init(); - $this->setProjectSourceDirectory($directory); - } - - public function projectSourceDirectory(): string - { - return $this->contextNode()->getAttribute('source'); - } - - public function buildInformation(): BuildInformation - { - $buildNode = $this->dom()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'build', - )->item(0); - - if ($buildNode === null) { - $buildNode = $this->dom()->documentElement->appendChild( - $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'build', - ), - ); - } - - assert($buildNode instanceof DOMElement); - - return new BuildInformation($buildNode); - } - - public function tests(): Tests - { - $testsNode = $this->contextNode()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'tests', - )->item(0); - - if ($testsNode === null) { - $testsNode = $this->contextNode()->appendChild( - $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'tests', - ), - ); - } - - assert($testsNode instanceof DOMElement); - - return new Tests($testsNode); - } - - public function asDom(): DOMDocument - { - return $this->dom(); - } - - private function init(): void - { - $dom = new DOMDocument; - $dom->loadXML(''); - - $this->setContextNode( - $dom->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'project', - )->item(0), - ); - } - - private function setProjectSourceDirectory(string $name): void - { - $this->contextNode()->setAttribute('source', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php deleted file mode 100644 index f39ab860..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use function basename; -use function dirname; -use DOMDocument; -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Report extends File -{ - public function __construct(string $name) - { - $dom = new DOMDocument; - $dom->loadXML(''); - - $contextNode = $dom->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'file', - )->item(0); - - parent::__construct($contextNode); - - $this->setName($name); - } - - public function asDom(): DOMDocument - { - return $this->dom(); - } - - public function functionObject(string $name): Method - { - $node = $this->contextNode()->appendChild( - $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'function', - ), - ); - - assert($node instanceof DOMElement); - - return new Method($node, $name); - } - - public function classObject(string $name): Unit - { - return $this->unitObject('class', $name); - } - - public function traitObject(string $name): Unit - { - return $this->unitObject('trait', $name); - } - - public function source(): Source - { - $source = $this->contextNode()->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'source', - )->item(0); - - if ($source === null) { - $source = $this->contextNode()->appendChild( - $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'source', - ), - ); - } - - assert($source instanceof DOMElement); - - return new Source($source); - } - - private function setName(string $name): void - { - $this->contextNode()->setAttribute('name', basename($name)); - $this->contextNode()->setAttribute('path', dirname($name)); - } - - private function unitObject(string $tagName, string $name): Unit - { - $node = $this->contextNode()->appendChild( - $this->dom()->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - $tagName, - ), - ); - - assert($node instanceof DOMElement); - - return new Unit($node, $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php deleted file mode 100644 index 448fe72d..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use DOMElement; -use TheSeer\Tokenizer\NamespaceUri; -use TheSeer\Tokenizer\Tokenizer; -use TheSeer\Tokenizer\XMLSerializer; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Source -{ - private DOMElement $context; - - public function __construct(DOMElement $context) - { - $this->context = $context; - } - - public function setSourceCode(string $source): void - { - $context = $this->context; - - $tokens = (new Tokenizer)->parse($source); - $srcDom = (new XMLSerializer(new NamespaceUri($context->namespaceURI)))->toDom($tokens); - - $context->parentNode->replaceChild( - $context->ownerDocument->importNode($srcDom->documentElement, true), - $context, - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php deleted file mode 100644 index c9e9c48e..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use DOMElement; -use SebastianBergmann\CodeCoverage\CodeCoverage; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type TestType from CodeCoverage - */ -final readonly class Tests -{ - private DOMElement $contextNode; - - public function __construct(DOMElement $context) - { - $this->contextNode = $context; - } - - /** - * @param TestType $result - */ - public function addTest(string $test, array $result): void - { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'test', - ), - ); - - assert($node instanceof DOMElement); - - $node->setAttribute('name', $test); - $node->setAttribute('size', $result['size']); - $node->setAttribute('status', $result['status']); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php deleted file mode 100644 index 8e285a78..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function sprintf; -use DOMElement; -use SebastianBergmann\CodeCoverage\Util\Percentage; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Totals -{ - private DOMElement $linesNode; - private DOMElement $methodsNode; - private DOMElement $functionsNode; - private DOMElement $classesNode; - private DOMElement $traitsNode; - - public function __construct(DOMElement $container) - { - $dom = $container->ownerDocument; - - $this->linesNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'lines', - ); - - $this->methodsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'methods', - ); - - $this->functionsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'functions', - ); - - $this->classesNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'classes', - ); - - $this->traitsNode = $dom->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'traits', - ); - - $container->appendChild($this->linesNode); - $container->appendChild($this->methodsNode); - $container->appendChild($this->functionsNode); - $container->appendChild($this->classesNode); - $container->appendChild($this->traitsNode); - } - - public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void - { - $this->linesNode->setAttribute('total', (string) $loc); - $this->linesNode->setAttribute('comments', (string) $cloc); - $this->linesNode->setAttribute('code', (string) $ncloc); - $this->linesNode->setAttribute('executable', (string) $executable); - $this->linesNode->setAttribute('executed', (string) $executed); - $this->linesNode->setAttribute( - 'percent', - $executable === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($executed, $executable)->asFloat()), - ); - } - - public function setNumClasses(int $count, int $tested): void - { - $this->classesNode->setAttribute('count', (string) $count); - $this->classesNode->setAttribute('tested', (string) $tested); - $this->classesNode->setAttribute( - 'percent', - $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()), - ); - } - - public function setNumTraits(int $count, int $tested): void - { - $this->traitsNode->setAttribute('count', (string) $count); - $this->traitsNode->setAttribute('tested', (string) $tested); - $this->traitsNode->setAttribute( - 'percent', - $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()), - ); - } - - public function setNumMethods(int $count, int $tested): void - { - $this->methodsNode->setAttribute('count', (string) $count); - $this->methodsNode->setAttribute('tested', (string) $tested); - $this->methodsNode->setAttribute( - 'percent', - $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()), - ); - } - - public function setNumFunctions(int $count, int $tested): void - { - $this->functionsNode->setAttribute('count', (string) $count); - $this->functionsNode->setAttribute('tested', (string) $tested); - $this->functionsNode->setAttribute( - 'percent', - $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php deleted file mode 100644 index a00f85d3..00000000 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Report\Xml; - -use function assert; -use DOMElement; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Unit -{ - private DOMElement $contextNode; - - public function __construct(DOMElement $context, string $name) - { - $this->contextNode = $context; - - $this->setName($name); - } - - public function setLines(int $start, int $executable, int $executed): void - { - $this->contextNode->setAttribute('start', (string) $start); - $this->contextNode->setAttribute('executable', (string) $executable); - $this->contextNode->setAttribute('executed', (string) $executed); - } - - public function setCrap(float $crap): void - { - $this->contextNode->setAttribute('crap', (string) $crap); - } - - public function setNamespace(string $namespace): void - { - $node = $this->contextNode->getElementsByTagNameNS( - 'https://schema.phpunit.de/coverage/1.0', - 'namespace', - )->item(0); - - if ($node === null) { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'namespace', - ), - ); - } - - assert($node instanceof DOMElement); - - $node->setAttribute('name', $namespace); - } - - public function addMethod(string $name): Method - { - $node = $this->contextNode->appendChild( - $this->contextNode->ownerDocument->createElementNS( - 'https://schema.phpunit.de/coverage/1.0', - 'method', - ), - ); - - assert($node instanceof DOMElement); - - return new Method($node, $name); - } - - private function setName(string $name): void - { - $this->contextNode->setAttribute('name', $name); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php deleted file mode 100644 index dcd0c61e..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function file_get_contents; -use SebastianBergmann\CodeCoverage\Filter; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class CacheWarmer -{ - /** - * @return array{cacheHits: non-negative-int, cacheMisses: non-negative-int} - */ - public function warmCache(string $cacheDirectory, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode, Filter $filter): array - { - $analyser = new CachingSourceAnalyser( - $cacheDirectory, - new ParsingSourceAnalyser, - ); - - foreach ($filter->files() as $file) { - $analyser->analyse( - $file, - file_get_contents($file), - $useAnnotationsForIgnoringCode, - $ignoreDeprecatedCode, - ); - } - - return [ - 'cacheHits' => $analyser->cacheHits(), - 'cacheMisses' => $analyser->cacheMisses(), - ]; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingSourceAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingSourceAnalyser.php deleted file mode 100644 index 6a7b8001..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingSourceAnalyser.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use const DIRECTORY_SEPARATOR; -use function file_get_contents; -use function file_put_contents; -use function hash; -use function implode; -use function is_file; -use function serialize; -use function unserialize; -use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Version; - -/** - * @internal This interface is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class CachingSourceAnalyser implements SourceAnalyser -{ - /** - * @var non-empty-string - */ - private readonly string $directory; - private readonly SourceAnalyser $sourceAnalyser; - - /** - * @var non-negative-int - */ - private int $cacheHits = 0; - - /** - * @var non-negative-int - */ - private int $cacheMisses = 0; - - public function __construct(string $directory, SourceAnalyser $sourceAnalyser) - { - Filesystem::createDirectory($directory); - - $this->directory = $directory; - $this->sourceAnalyser = $sourceAnalyser; - } - - /** - * @param non-empty-string $sourceCodeFile - */ - public function analyse(string $sourceCodeFile, string $sourceCode, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode): AnalysisResult - { - $cacheFile = $this->cacheFile( - $sourceCode, - $useAnnotationsForIgnoringCode, - $ignoreDeprecatedCode, - ); - - $cachedAnalysisResult = $this->read($cacheFile); - - if ($cachedAnalysisResult !== false) { - $this->cacheHits++; - - return $cachedAnalysisResult; - } - - $this->cacheMisses++; - - $analysisResult = $this->sourceAnalyser->analyse( - $sourceCodeFile, - $sourceCode, - $useAnnotationsForIgnoringCode, - $ignoreDeprecatedCode, - ); - - $this->write($cacheFile, $analysisResult); - - return $analysisResult; - } - - /** - * @return non-negative-int - */ - public function cacheHits(): int - { - return $this->cacheHits; - } - - /** - * @return non-negative-int - */ - public function cacheMisses(): int - { - return $this->cacheMisses; - } - - /** - * @param non-empty-string $cacheFile - */ - private function read(string $cacheFile): AnalysisResult|false - { - if (!is_file($cacheFile)) { - return false; - } - - return unserialize( - file_get_contents($cacheFile), - [ - 'allowed_classes' => [ - AnalysisResult::class, - Class_::class, - Function_::class, - Interface_::class, - LinesOfCode::class, - Method::class, - Trait_::class, - ], - ], - ); - } - - /** - * @param non-empty-string $cacheFile - */ - private function write(string $cacheFile, AnalysisResult $result): void - { - file_put_contents( - $cacheFile, - serialize($result), - ); - } - - private function cacheFile(string $source, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode): string - { - $cacheKey = hash( - 'sha256', - implode( - "\0", - [ - $source, - Version::id(), - $useAnnotationsForIgnoringCode, - $ignoreDeprecatedCode, - ], - ), - ); - - return $this->directory . DIRECTORY_SEPARATOR . $cacheKey; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php deleted file mode 100644 index 3b1c5a42..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function file_get_contents; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class FileAnalyser -{ - private readonly SourceAnalyser $sourceAnalyser; - private readonly bool $useAnnotationsForIgnoringCode; - private readonly bool $ignoreDeprecatedCode; - - /** - * @var array - */ - private array $cache = []; - - public function __construct(SourceAnalyser $sourceAnalyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) - { - $this->sourceAnalyser = $sourceAnalyser; - $this->useAnnotationsForIgnoringCode = $useAnnotationsForIgnoringCode; - $this->ignoreDeprecatedCode = $ignoreDeprecatedCode; - } - - /** - * @param non-empty-string $sourceCodeFile - */ - public function analyse(string $sourceCodeFile): AnalysisResult - { - if (isset($this->cache[$sourceCodeFile])) { - return $this->cache[$sourceCodeFile]; - } - - $this->cache[$sourceCodeFile] = $this->sourceAnalyser->analyse( - $sourceCodeFile, - file_get_contents($sourceCodeFile), - $this->useAnnotationsForIgnoringCode, - $this->ignoreDeprecatedCode, - ); - - return $this->cache[$sourceCodeFile]; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingSourceAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingSourceAnalyser.php deleted file mode 100644 index 7f46eeca..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingSourceAnalyser.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use const T_COMMENT; -use const T_DOC_COMMENT; -use function array_merge; -use function array_unique; -use function assert; -use function is_array; -use function max; -use function range; -use function sort; -use function sprintf; -use function substr_count; -use function token_get_all; -use function trim; -use PhpParser\Error; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitor\NameResolver; -use PhpParser\ParserFactory; -use SebastianBergmann\CodeCoverage\ParserException; -use SebastianBergmann\LinesOfCode\LineCountingVisitor; - -/** - * @internal This interface is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class ParsingSourceAnalyser implements SourceAnalyser -{ - /** - * @param non-empty-string $sourceCodeFile - */ - public function analyse(string $sourceCodeFile, string $sourceCode, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode): AnalysisResult - { - $linesOfCode = max(substr_count($sourceCode, "\n") + 1, substr_count($sourceCode, "\r") + 1); - - if ($linesOfCode === 0 && $sourceCode !== '') { - $linesOfCode = 1; - } - - assert($linesOfCode > 0); - - $parser = (new ParserFactory)->createForHostVersion(); - - try { - $nodes = $parser->parse($sourceCode); - - assert($nodes !== null); - - $traverser = new NodeTraverser; - $codeUnitFindingVisitor = new CodeUnitFindingVisitor($sourceCodeFile); - $lineCountingVisitor = new LineCountingVisitor($linesOfCode); - $ignoredLinesFindingVisitor = new IgnoredLinesFindingVisitor($useAnnotationsForIgnoringCode, $ignoreDeprecatedCode); - $executableLinesFindingVisitor = new ExecutableLinesFindingVisitor($sourceCode); - - $traverser->addVisitor(new NameResolver); - $traverser->addVisitor(new AttributeParentConnectingVisitor); - $traverser->addVisitor($codeUnitFindingVisitor); - $traverser->addVisitor($lineCountingVisitor); - $traverser->addVisitor($ignoredLinesFindingVisitor); - $traverser->addVisitor($executableLinesFindingVisitor); - - /* @noinspection UnusedFunctionResultInspection */ - $traverser->traverse($nodes); - // @codeCoverageIgnoreStart - } catch (Error $error) { - throw new ParserException( - sprintf( - 'Cannot parse %s: %s', - $sourceCodeFile, - $error->getMessage(), - ), - $error->getCode(), - $error, - ); - } - // @codeCoverageIgnoreEnd - - $ignoredLines = array_unique( - array_merge( - $this->findLinesIgnoredByLineBasedAnnotations( - $sourceCodeFile, - $sourceCode, - $useAnnotationsForIgnoringCode, - ), - $ignoredLinesFindingVisitor->ignoredLines(), - ), - ); - - sort($ignoredLines); - - return new AnalysisResult( - $codeUnitFindingVisitor->interfaces(), - $codeUnitFindingVisitor->classes(), - $codeUnitFindingVisitor->traits(), - $codeUnitFindingVisitor->functions(), - new LinesOfCode( - $lineCountingVisitor->result()->linesOfCode(), - $lineCountingVisitor->result()->commentLinesOfCode(), - $lineCountingVisitor->result()->nonCommentLinesOfCode(), - ), - $executableLinesFindingVisitor->executableLinesGroupedByBranch(), - $ignoredLines, - ); - } - - /** - * @return array - */ - private function findLinesIgnoredByLineBasedAnnotations(string $filename, string $source, bool $useAnnotationsForIgnoringCode): array - { - if (!$useAnnotationsForIgnoringCode) { - return []; - } - - $result = []; - $start = false; - - foreach (token_get_all($source) as $token) { - if (!is_array($token) || - !(T_COMMENT === $token[0] || T_DOC_COMMENT === $token[0])) { - continue; - } - - $comment = trim($token[1]); - - if ($comment === '// @codeCoverageIgnore' || - $comment === '//@codeCoverageIgnore') { - $result[] = $token[2]; - - continue; - } - - if ($comment === '// @codeCoverageIgnoreStart' || - $comment === '//@codeCoverageIgnoreStart') { - $start = $token[2]; - - continue; - } - - if ($comment === '// @codeCoverageIgnoreEnd' || - $comment === '//@codeCoverageIgnoreEnd') { - if (false === $start) { - $start = $token[2]; - } - - $result = array_merge( - $result, - range($start, $token[2]), - ); - } - } - - return $result; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/SourceAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/SourceAnalyser.php deleted file mode 100644 index bc18996f..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/SourceAnalyser.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This interface is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -interface SourceAnalyser -{ - /** - * @param non-empty-string $sourceCodeFile - */ - public function analyse(string $sourceCodeFile, string $sourceCode, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode): AnalysisResult; -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/AnalysisResult.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/AnalysisResult.php deleted file mode 100644 index 88fff2c4..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/AnalysisResult.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @phpstan-type LinesType array - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class AnalysisResult -{ - /** - * @var array - */ - private array $interfaces; - - /** - * @var array - */ - private array $classes; - - /** - * @var array - */ - private array $traits; - - /** - * @var array - */ - private array $functions; - private LinesOfCode $linesOfCode; - - /** - * @var LinesType - */ - private array $executableLines; - - /** - * @var LinesType - */ - private array $ignoredLines; - - /** - * @param array $interfaces - * @param array $classes - * @param array $traits - * @param array $functions - * @param LinesType $executableLines - * @param LinesType $ignoredLines - */ - public function __construct(array $interfaces, array $classes, array $traits, array $functions, LinesOfCode $linesOfCode, array $executableLines, array $ignoredLines) - { - $this->interfaces = $interfaces; - $this->classes = $classes; - $this->traits = $traits; - $this->functions = $functions; - $this->linesOfCode = $linesOfCode; - $this->executableLines = $executableLines; - $this->ignoredLines = $ignoredLines; - } - - /** - * @return array - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return array - */ - public function classes(): array - { - return $this->classes; - } - - /** - * @return array - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function functions(): array - { - return $this->functions; - } - - public function linesOfCode(): LinesOfCode - { - return $this->linesOfCode; - } - - /** - * @return LinesType - */ - public function executableLines(): array - { - return $this->executableLines; - } - - /** - * @return LinesType - */ - public function ignoredLines(): array - { - return $this->ignoredLines; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php deleted file mode 100644 index ee87b246..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Class_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var ?non-empty-string - */ - private ?string $parentClass; - - /** - * @var list - */ - private array $interfaces; - - /** - * @var list - */ - private array $traits; - - /** - * @var array - */ - private array $methods; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-empty-string $file - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param ?non-empty-string $parentClass - * @param list $interfaces - * @param list $traits - * @param array $methods - */ - public function __construct(string $name, string $namespacedName, string $namespace, string $file, int $startLine, int $endLine, ?string $parentClass, array $interfaces, array $traits, array $methods) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->file = $file; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->parentClass = $parentClass; - $this->interfaces = $interfaces; - $this->traits = $traits; - $this->methods = $methods; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - public function hasParent(): bool - { - return $this->parentClass !== null; - } - - /** - * @return ?non-empty-string - */ - public function parentClass(): ?string - { - return $this->parentClass; - } - - /** - * @return list - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return list - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function methods(): array - { - return $this->methods; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php deleted file mode 100644 index 7069dec9..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Function_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var non-empty-string - */ - private string $signature; - - /** - * @var positive-int - */ - private int $cyclomaticComplexity; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param non-empty-string $signature - * @param positive-int $cyclomaticComplexity - */ - public function __construct(string $name, string $namespacedName, string $namespace, int $startLine, int $endLine, string $signature, int $cyclomaticComplexity) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->signature = $signature; - $this->cyclomaticComplexity = $cyclomaticComplexity; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return non-empty-string - */ - public function signature(): string - { - return $this->signature; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php deleted file mode 100644 index 0b257928..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Interface_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var list - */ - private array $parentInterfaces; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param list $parentInterfaces - */ - public function __construct(string $name, string $namespacedName, string $namespace, int $startLine, int $endLine, array $parentInterfaces) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->parentInterfaces = $parentInterfaces; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return list - */ - public function parentInterfaces(): array - { - return $this->parentInterfaces; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php deleted file mode 100644 index f8720e1a..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class LinesOfCode -{ - /** - * @var non-negative-int - */ - private int $linesOfCode; - - /** - * @var non-negative-int - */ - private int $commentLinesOfCode; - - /** - * @var non-negative-int - */ - private int $nonCommentLinesOfCode; - - /** - * @param non-negative-int $linesOfCode - * @param non-negative-int $commentLinesOfCode - * @param non-negative-int $nonCommentLinesOfCode - */ - public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode) - { - $this->linesOfCode = $linesOfCode; - $this->commentLinesOfCode = $commentLinesOfCode; - $this->nonCommentLinesOfCode = $nonCommentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function linesOfCode(): int - { - return $this->linesOfCode; - } - - /** - * @return non-negative-int - */ - public function commentLinesOfCode(): int - { - return $this->commentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function nonCommentLinesOfCode(): int - { - return $this->nonCommentLinesOfCode; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php deleted file mode 100644 index 12e3438e..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Method -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - private Visibility $visibility; - - /** - * @var non-empty-string - */ - private string $signature; - - /** - * @var positive-int - */ - private int $cyclomaticComplexity; - - /** - * @param non-empty-string $name - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param non-empty-string $signature - * @param positive-int $cyclomaticComplexity - */ - public function __construct(string $name, int $startLine, int $endLine, string $signature, Visibility $visibility, int $cyclomaticComplexity) - { - $this->name = $name; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->signature = $signature; - $this->visibility = $visibility; - $this->cyclomaticComplexity = $cyclomaticComplexity; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return non-empty-string - */ - public function signature(): string - { - return $this->signature; - } - - public function visibility(): Visibility - { - return $this->visibility; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php deleted file mode 100644 index 7bf1084c..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Trait_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var list - */ - private array $traits; - - /** - * @var array - */ - private array $methods; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-empty-string $file - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param list $traits - * @param array $methods - */ - public function __construct(string $name, string $namespacedName, string $namespace, string $file, int $startLine, int $endLine, array $traits, array $methods) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->file = $file; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->traits = $traits; - $this->methods = $methods; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return list - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function methods(): array - { - return $this->methods; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php deleted file mode 100644 index c9279775..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This enumeration is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -enum Visibility: string -{ - case Public = 'public'; - case Protected = 'protected'; - case Private = 'private'; -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/AttributeParentConnectingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/AttributeParentConnectingVisitor.php deleted file mode 100644 index 2e214140..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/AttributeParentConnectingVisitor.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function array_pop; -use function count; -use PhpParser\Node; -use PhpParser\NodeVisitor; - -/** - * Visitor that connects a child node to its parent node optimized for Attribute nodes. - * - * On the child node, the parent node can be accessed through - * $node->getAttribute('parent'). - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class AttributeParentConnectingVisitor implements NodeVisitor -{ - /** - * @var Node[] - */ - private array $stack = []; - - public function beforeTraverse(array $nodes): null - { - $this->stack = []; - - return null; - } - - public function enterNode(Node $node): null - { - if ($this->stack !== [] && - ($node instanceof Node\Attribute || $node instanceof Node\AttributeGroup)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); - } - - $this->stack[] = $node; - - return null; - } - - public function leaveNode(Node $node): null - { - array_pop($this->stack); - - return null; - } - - public function afterTraverse(array $nodes): null - { - return null; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/CodeUnitFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/CodeUnitFindingVisitor.php deleted file mode 100644 index 558d3e05..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/CodeUnitFindingVisitor.php +++ /dev/null @@ -1,435 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function assert; -use function implode; -use function rtrim; -use function trim; -use PhpParser\Node; -use PhpParser\Node\ComplexType; -use PhpParser\Node\Identifier; -use PhpParser\Node\IntersectionType; -use PhpParser\Node\Name; -use PhpParser\Node\NullableType; -use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\Node\Stmt\Enum_; -use PhpParser\Node\Stmt\Function_; -use PhpParser\Node\Stmt\Interface_; -use PhpParser\Node\Stmt\Trait_; -use PhpParser\Node\UnionType; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitorAbstract; -use SebastianBergmann\Complexity\CyclomaticComplexityCalculatingVisitor; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class CodeUnitFindingVisitor extends NodeVisitorAbstract -{ - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var array - */ - private array $interfaces = []; - - /** - * @var array - */ - private array $classes = []; - - /** - * @var array - */ - private array $traits = []; - - /** - * @var array - */ - private array $functions = []; - - /** - * @param non-empty-string $file - */ - public function __construct(string $file) - { - $this->file = $file; - } - - public function enterNode(Node $node): null - { - if ($node instanceof Interface_) { - $this->processInterface($node); - } - - if ($node instanceof Class_) { - if ($node->isAnonymous()) { - return null; - } - - $this->processClass($node); - } - - if ($node instanceof Enum_) { - $this->processClass($node); - } - - if ($node instanceof Trait_) { - $this->processTrait($node); - } - - if (!$node instanceof Function_) { - return null; - } - - $this->processFunction($node); - - return null; - } - - public function leaveNode(Node $node): null - { - if ($node instanceof Class_ && $node->isAnonymous()) { - return null; - } - - if (!$node instanceof Class_ && !$node instanceof Trait_) { - return null; - } - - $traits = []; - - foreach ($node->getTraitUses() as $traitUse) { - foreach ($traitUse->traits as $trait) { - $traits[] = $trait->toString(); - } - } - - if ($traits === []) { - return null; - } - - $this->postProcessClassOrTrait($node, $traits); - - return null; - } - - /** - * @return array - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return array - */ - public function classes(): array - { - return $this->classes; - } - - /** - * @return array - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function functions(): array - { - return $this->functions; - } - - private function cyclomaticComplexity(ClassMethod|Function_ $node): int - { - $nodes = $node->getStmts(); - - if ($nodes === null) { - return 0; - } - - $traverser = new NodeTraverser; - - $cyclomaticComplexityCalculatingVisitor = new CyclomaticComplexityCalculatingVisitor; - - $traverser->addVisitor($cyclomaticComplexityCalculatingVisitor); - - /* @noinspection UnusedFunctionResultInspection */ - $traverser->traverse($nodes); - - return $cyclomaticComplexityCalculatingVisitor->cyclomaticComplexity(); - } - - private function signature(ClassMethod|Function_ $node): string - { - $signature = ($node->returnsByRef() ? '&' : '') . $node->name->toString() . '('; - $parameters = []; - - foreach ($node->getParams() as $parameter) { - assert(isset($parameter->var->name)); - - $parameterAsString = ''; - - if ($parameter->type !== null) { - $parameterAsString = $this->type($parameter->type) . ' '; - } - - $parameterAsString .= '$' . $parameter->var->name; - - /* @todo Handle default values */ - - $parameters[] = $parameterAsString; - } - - $signature .= implode(', ', $parameters) . ')'; - - $returnType = $node->getReturnType(); - - if ($returnType !== null) { - $signature .= ': ' . $this->type($returnType); - } - - return $signature; - } - - private function type(ComplexType|Identifier|Name $type): string - { - if ($type instanceof NullableType) { - return '?' . $type->type; - } - - if ($type instanceof UnionType) { - return $this->unionTypeAsString($type); - } - - if ($type instanceof IntersectionType) { - return $this->intersectionTypeAsString($type); - } - - return $type->toString(); - } - - private function visibility(ClassMethod $node): Visibility - { - if ($node->isPrivate()) { - return Visibility::Private; - } - - if ($node->isProtected()) { - return Visibility::Protected; - } - - return Visibility::Public; - } - - private function processInterface(Interface_ $node): void - { - $name = $node->name->toString(); - $namespacedName = $node->namespacedName->toString(); - $parentInterfaces = []; - - foreach ($node->extends as $parentInterface) { - $parentInterfaces[] = $parentInterface->toString(); - } - - $this->interfaces[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Interface_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $node->getStartLine(), - $node->getEndLine(), - $parentInterfaces, - ); - } - - private function processClass(Class_|Enum_ $node): void - { - $name = $node->name->toString(); - $namespacedName = $node->namespacedName->toString(); - $parentClass = null; - $interfaces = []; - - if (!$node instanceof Enum_) { - if ($node->extends instanceof Name) { - $parentClass = $node->extends->toString(); - } - - foreach ($node->implements as $interface) { - $interfaces[] = $interface->toString(); - } - } - - $this->classes[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Class_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $this->file, - $node->getStartLine(), - $node->getEndLine(), - $parentClass, - $interfaces, - [], - $this->processMethods($node->getMethods()), - ); - } - - private function processTrait(Trait_ $node): void - { - $name = $node->name->toString(); - $namespacedName = $node->namespacedName->toString(); - - $this->traits[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $this->file, - $node->getStartLine(), - $node->getEndLine(), - [], - $this->processMethods($node->getMethods()), - ); - } - - /** - * @param list $nodes - * - * @return array - */ - private function processMethods(array $nodes): array - { - $methods = []; - - foreach ($nodes as $node) { - $methods[$node->name->toString()] = new Method( - $node->name->toString(), - $node->getStartLine(), - $node->getEndLine(), - $this->signature($node), - $this->visibility($node), - $this->cyclomaticComplexity($node), - ); - } - - return $methods; - } - - private function processFunction(Function_ $node): void - { - assert(isset($node->name)); - assert(isset($node->namespacedName)); - assert($node->namespacedName instanceof Name); - - $name = $node->name->toString(); - $namespacedName = $node->namespacedName->toString(); - - $this->functions[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Function_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $node->getStartLine(), - $node->getEndLine(), - $this->signature($node), - $this->cyclomaticComplexity($node), - ); - } - - private function namespace(string $namespacedName, string $name): string - { - return trim(rtrim($namespacedName, $name), '\\'); - } - - private function unionTypeAsString(UnionType $node): string - { - $types = []; - - foreach ($node->types as $type) { - if ($type instanceof IntersectionType) { - $types[] = '(' . $this->intersectionTypeAsString($type) . ')'; - - continue; - } - - $types[] = $this->typeAsString($type); - } - - return implode('|', $types); - } - - private function intersectionTypeAsString(IntersectionType $node): string - { - $types = []; - - foreach ($node->types as $type) { - $types[] = $this->typeAsString($type); - } - - return implode('&', $types); - } - - private function typeAsString(Identifier|Name $node): string - { - if ($node instanceof Name) { - return $node->toCodeString(); - } - - return $node->toString(); - } - - /** - * @param list $traits - */ - private function postProcessClassOrTrait(Class_|Trait_ $node, array $traits): void - { - $name = $node->namespacedName->toString(); - - if ($node instanceof Class_) { - assert(isset($this->classes[$name])); - - $this->classes[$name] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Class_( - $this->classes[$name]->name(), - $this->classes[$name]->namespacedName(), - $this->classes[$name]->namespace(), - $this->classes[$name]->file(), - $this->classes[$name]->startLine(), - $this->classes[$name]->endLine(), - $this->classes[$name]->parentClass(), - $this->classes[$name]->interfaces(), - $traits, - $this->classes[$name]->methods(), - ); - - return; - } - - assert(isset($this->traits[$name])); - - $this->traits[$name] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_( - $this->traits[$name]->name(), - $this->traits[$name]->namespacedName(), - $this->traits[$name]->namespace(), - $this->traits[$name]->file(), - $this->traits[$name]->startLine(), - $this->traits[$name]->endLine(), - $traits, - $this->traits[$name]->methods(), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/ExecutableLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/ExecutableLinesFindingVisitor.php deleted file mode 100644 index 6a114e1b..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/ExecutableLinesFindingVisitor.php +++ /dev/null @@ -1,402 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function array_diff_key; -use function assert; -use function count; -use function current; -use function end; -use function explode; -use function max; -use function preg_match; -use function preg_quote; -use function range; -use function reset; -use function sprintf; -use PhpParser\Node; -use PhpParser\NodeVisitorAbstract; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @phpstan-import-type LinesType from AnalysisResult - */ -final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract -{ - private int $nextBranch = 0; - private readonly string $source; - - /** - * @var LinesType - */ - private array $executableLinesGroupedByBranch = []; - - /** - * @var array - */ - private array $unsets = []; - - /** - * @var array - */ - private array $commentsToCheckForUnset = []; - - public function __construct(string $source) - { - $this->source = $source; - } - - public function enterNode(Node $node): null - { - foreach ($node->getComments() as $comment) { - $commentLine = $comment->getStartLine(); - - if (!isset($this->executableLinesGroupedByBranch[$commentLine])) { - continue; - } - - foreach (explode("\n", $comment->getText()) as $text) { - $this->commentsToCheckForUnset[$commentLine] = $text; - $commentLine++; - } - } - - if ($node instanceof Node\Scalar\String_ || - $node instanceof Node\Scalar\EncapsedStringPart) { - $startLine = $node->getStartLine() + 1; - $endLine = $node->getEndLine() - 1; - - if ($startLine <= $endLine) { - foreach (range($startLine, $endLine) as $line) { - unset($this->executableLinesGroupedByBranch[$line]); - } - } - - return null; - } - - if ($node instanceof Node\Stmt\Interface_) { - foreach (range($node->getStartLine(), $node->getEndLine()) as $line) { - $this->unsets[$line] = true; - } - - return null; - } - - if ($node instanceof Node\Stmt\Declare_ || - $node instanceof Node\Stmt\DeclareDeclare || - $node instanceof Node\Stmt\Else_ || - $node instanceof Node\Stmt\EnumCase || - $node instanceof Node\Stmt\Finally_ || - $node instanceof Node\Stmt\GroupUse || - $node instanceof Node\Stmt\Label || - $node instanceof Node\Stmt\Namespace_ || - $node instanceof Node\Stmt\Nop || - $node instanceof Node\Stmt\Switch_ || - $node instanceof Node\Stmt\TryCatch || - $node instanceof Node\Stmt\Use_ || - $node instanceof Node\Stmt\UseUse || - $node instanceof Node\Expr\ConstFetch || - $node instanceof Node\Expr\Variable || - $node instanceof Node\Expr\Throw_ || - $node instanceof Node\ComplexType || - $node instanceof Node\Const_ || - $node instanceof Node\Identifier || - $node instanceof Node\Name || - $node instanceof Node\Param || - $node instanceof Node\Scalar) { - return null; - } - - if ($node instanceof Node\Expr\Match_) { - foreach ($node->arms as $arm) { - $this->setLineBranch( - $arm->body->getStartLine(), - $arm->body->getEndLine(), - ++$this->nextBranch, - ); - } - - return null; - } - - if ($node instanceof Node\Stmt\Expression && $node->expr instanceof Node\Expr\Throw_) { - $this->setLineBranch($node->expr->expr->getEndLine(), $node->expr->expr->getEndLine(), ++$this->nextBranch); - - return null; - } - - if ($node instanceof Node\Stmt\Enum_ || - $node instanceof Node\Stmt\Function_ || - $node instanceof Node\Stmt\Class_ || - $node instanceof Node\Stmt\ClassMethod || - $node instanceof Node\Expr\Closure || - $node instanceof Node\Stmt\Trait_) { - if ($node instanceof Node\Stmt\Function_ || $node instanceof Node\Stmt\ClassMethod) { - $unsets = []; - - foreach ($node->getParams() as $param) { - foreach (range($param->getStartLine(), $param->getEndLine()) as $line) { - $unsets[$line] = true; - } - } - - unset($unsets[$node->getEndLine()]); - - $this->unsets += $unsets; - } - - $isConcreteClassLike = $node instanceof Node\Stmt\Enum_ || $node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Trait_; - - if (null !== $node->stmts) { - foreach ($node->stmts as $stmt) { - if ($stmt instanceof Node\Stmt\Nop) { - continue; - } - - foreach (range($stmt->getStartLine(), $stmt->getEndLine()) as $line) { - unset($this->executableLinesGroupedByBranch[$line]); - - if ( - $isConcreteClassLike && - !$stmt instanceof Node\Stmt\ClassMethod - ) { - $this->unsets[$line] = true; - } - } - } - } - - if ($isConcreteClassLike) { - return null; - } - - $hasEmptyBody = [] === $node->stmts || - null === $node->stmts || - ( - 1 === count($node->stmts) && - $node->stmts[0] instanceof Node\Stmt\Nop - ); - - if ($hasEmptyBody) { - if ($node->getEndLine() === $node->getStartLine() && isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { - return null; - } - - $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); - - return null; - } - - return null; - } - - if ($node instanceof Node\Expr\ArrowFunction) { - $startLine = max( - $node->getStartLine() + 1, - $node->expr->getStartLine(), - ); - - $endLine = $node->expr->getEndLine(); - - if ($endLine < $startLine) { - return null; - } - - $this->setLineBranch($startLine, $endLine, ++$this->nextBranch); - - return null; - } - - if ($node instanceof Node\Expr\Ternary) { - if (null !== $node->if && - $node->getStartLine() !== $node->if->getEndLine()) { - $this->setLineBranch($node->if->getStartLine(), $node->if->getEndLine(), ++$this->nextBranch); - } - - if ($node->getStartLine() !== $node->else->getEndLine()) { - $this->setLineBranch($node->else->getStartLine(), $node->else->getEndLine(), ++$this->nextBranch); - } - - return null; - } - - if ($node instanceof Node\Expr\BinaryOp\Coalesce) { - if ($node->getStartLine() !== $node->getEndLine()) { - $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); - } - - return null; - } - - if ($node instanceof Node\Stmt\If_ || - $node instanceof Node\Stmt\ElseIf_ || - $node instanceof Node\Stmt\Case_) { - if (null === $node->cond) { - return null; - } - - $this->setLineBranch( - $node->cond->getStartLine(), - $node->cond->getStartLine(), - ++$this->nextBranch, - ); - - return null; - } - - if ($node instanceof Node\Stmt\For_) { - $startLine = null; - $endLine = null; - - if ([] !== $node->init) { - $startLine = $node->init[0]->getStartLine(); - - end($node->init); - - $endLine = current($node->init)->getEndLine(); - - reset($node->init); - } - - if ([] !== $node->cond) { - if (null === $startLine) { - $startLine = $node->cond[0]->getStartLine(); - } - - end($node->cond); - - $endLine = current($node->cond)->getEndLine(); - - reset($node->cond); - } - - if ([] !== $node->loop) { - if (null === $startLine) { - $startLine = $node->loop[0]->getStartLine(); - } - - end($node->loop); - - $endLine = current($node->loop)->getEndLine(); - - reset($node->loop); - } - - if (null === $startLine || null === $endLine) { - return null; - } - - $this->setLineBranch( - $startLine, - $endLine, - ++$this->nextBranch, - ); - - return null; - } - - if ($node instanceof Node\Stmt\Foreach_) { - $this->setLineBranch( - $node->expr->getStartLine(), - $node->valueVar->getEndLine(), - ++$this->nextBranch, - ); - - return null; - } - - if ($node instanceof Node\Stmt\While_ || - $node instanceof Node\Stmt\Do_) { - $this->setLineBranch( - $node->cond->getStartLine(), - $node->cond->getEndLine(), - ++$this->nextBranch, - ); - - return null; - } - - if ($node instanceof Node\Stmt\Catch_) { - assert([] !== $node->types); - $startLine = $node->types[0]->getStartLine(); - end($node->types); - $endLine = current($node->types)->getEndLine(); - - $this->setLineBranch( - $startLine, - $endLine, - ++$this->nextBranch, - ); - - return null; - } - - if ($node instanceof Node\Expr\CallLike) { - if (isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { - $branch = $this->executableLinesGroupedByBranch[$node->getStartLine()]; - } else { - $branch = ++$this->nextBranch; - } - - $this->setLineBranch($node->getStartLine(), $node->getEndLine(), $branch); - - return null; - } - - if (isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { - return null; - } - - $this->setLineBranch($node->getStartLine(), $node->getEndLine(), ++$this->nextBranch); - - return null; - } - - public function afterTraverse(array $nodes): null - { - $lines = explode("\n", $this->source); - - foreach ($lines as $lineNumber => $line) { - $lineNumber++; - - if (1 === preg_match('/^\s*$/', $line) || - ( - isset($this->commentsToCheckForUnset[$lineNumber]) && - 1 === preg_match(sprintf('/^\s*%s\s*$/', preg_quote($this->commentsToCheckForUnset[$lineNumber], '/')), $line) - )) { - unset($this->executableLinesGroupedByBranch[$lineNumber]); - } - } - - $this->executableLinesGroupedByBranch = array_diff_key( - $this->executableLinesGroupedByBranch, - $this->unsets, - ); - - return null; - } - - /** - * @return LinesType - */ - public function executableLinesGroupedByBranch(): array - { - return $this->executableLinesGroupedByBranch; - } - - private function setLineBranch(int $start, int $end, int $branch): void - { - foreach (range($start, $end) as $line) { - $this->executableLinesGroupedByBranch[$line] = $branch; - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/IgnoredLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/IgnoredLinesFindingVisitor.php deleted file mode 100644 index fefe646c..00000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Visitor/IgnoredLinesFindingVisitor.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -use function assert; -use function str_contains; -use PhpParser\Node; -use PhpParser\Node\Attribute; -use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\Node\Stmt\Enum_; -use PhpParser\Node\Stmt\Function_; -use PhpParser\Node\Stmt\Interface_; -use PhpParser\Node\Stmt\Trait_; -use PhpParser\NodeVisitorAbstract; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract -{ - /** - * @var array - */ - private array $ignoredLines = []; - private readonly bool $useAnnotationsForIgnoringCode; - private readonly bool $ignoreDeprecated; - - public function __construct(bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecated) - { - $this->useAnnotationsForIgnoringCode = $useAnnotationsForIgnoringCode; - $this->ignoreDeprecated = $ignoreDeprecated; - } - - public function enterNode(Node $node): null - { - if (!$node instanceof Class_ && - !$node instanceof Trait_ && - !$node instanceof Interface_ && - !$node instanceof Enum_ && - !$node instanceof ClassMethod && - !$node instanceof Function_ && - !$node instanceof Attribute) { - return null; - } - - if ($node instanceof Class_ && $node->isAnonymous()) { - return null; - } - - if ($node instanceof Class_ || - $node instanceof Trait_ || - $node instanceof Interface_ || - $node instanceof Attribute) { - $this->ignoredLines[] = $node->getStartLine(); - - assert($node->name !== null); - - // Workaround for https://github.com/nikic/PHP-Parser/issues/886 - $this->ignoredLines[] = $node->name->getStartLine(); - } - - if (!$this->useAnnotationsForIgnoringCode) { - return null; - } - - if ($node instanceof Interface_) { - return null; - } - - if ($node instanceof Attribute && - $node->name->toString() === 'PHPUnit\Framework\Attributes\CodeCoverageIgnore') { - $attributeGroup = $node->getAttribute('parent'); - $attributedNode = $attributeGroup->getAttribute('parent'); - - for ($line = $attributedNode->getStartLine(); $line <= $attributedNode->getEndLine(); $line++) { - $this->ignoredLines[] = $line; - } - - return null; - } - - $this->processDocComment($node); - - return null; - } - - /** - * @return array - */ - public function ignoredLines(): array - { - return $this->ignoredLines; - } - - private function processDocComment(Node $node): void - { - $docComment = $node->getDocComment(); - - if ($docComment === null) { - return; - } - - if (str_contains($docComment->getText(), '@codeCoverageIgnore')) { - for ($line = $node->getStartLine(); $line <= $node->getEndLine(); $line++) { - $this->ignoredLines[] = $line; - } - } - - if ($this->ignoreDeprecated && str_contains($docComment->getText(), '@deprecated')) { - for ($line = $node->getStartLine(); $line <= $node->getEndLine(); $line++) { - $this->ignoredLines[] = $line; - } - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Class_.php b/vendor/phpunit/php-code-coverage/src/Target/Class_.php deleted file mode 100644 index 9e669780..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Class_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Class_ extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - protected function __construct(string $className) - { - $this->className = $className; - } - - public function isClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classes'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Class ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php b/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php deleted file mode 100644 index 94fdb56d..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class ClassesThatExtendClass extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - protected function __construct(string $className) - { - $this->className = $className; - } - - public function isClassesThatExtendClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classesThatExtendClass'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Classes that extend class ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php b/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php deleted file mode 100644 index 6bbe18ef..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class ClassesThatImplementInterface extends Target -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - protected function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - public function isClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classesThatImplementInterface'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->interfaceName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Classes that implement interface ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Function_.php b/vendor/phpunit/php-code-coverage/src/Target/Function_.php deleted file mode 100644 index 1d7cdddc..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Function_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Function_ extends Target -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param non-empty-string $functionName - */ - protected function __construct(string $functionName) - { - $this->functionName = $functionName; - } - - public function isFunction(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'functions'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->functionName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Function ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php b/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php deleted file mode 100644 index 8e8d93fb..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function array_keys; -use function array_merge; -use function array_slice; -use function array_unique; -use function count; -use function explode; -use function implode; -use function range; -use SebastianBergmann\CodeCoverage\Filter; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Class_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; - -/** - * @phpstan-import-type TargetMap from Mapper - * @phpstan-import-type TargetMapPart from Mapper - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class MapBuilder -{ - /** - * @return TargetMap - */ - public function build(Filter $filter, FileAnalyser $analyser): array - { - /** - * @var array $classDetails - */ - $classDetails = []; - - $namespaces = []; - $classes = []; - $classesThatExtendClass = []; - $classesThatImplementInterface = []; - $traits = []; - $methods = []; - $functions = []; - $reverseLookup = []; - - foreach ($filter->files() as $file) { - foreach ($analyser->analyse($file)->traits() as $trait) { - if ($trait->isNamespaced()) { - $this->processNamespace($namespaces, $trait->namespace(), $file, $trait->startLine(), $trait->endLine()); - } - - $this->process($traits, $trait->namespacedName(), $file, $trait->startLine(), $trait->endLine()); - $this->processMethods($trait, $file, $methods, $reverseLookup); - } - } - - foreach ($filter->files() as $file) { - foreach ($analyser->analyse($file)->traits() as $trait) { - foreach ($trait->traits() as $traitName) { - if (!isset($traits[$traitName])) { - continue; - } - - $this->mergeLines($trait->namespacedName(), $traits[$traitName], $traits); - } - } - } - - foreach ($filter->files() as $file) { - $analysisResult = $analyser->analyse($file); - - foreach ($analysisResult->interfaces() as $interface) { - $classesThatImplementInterface[$interface->namespacedName()] = []; - } - - foreach ($analysisResult->classes() as $class) { - if ($class->isNamespaced()) { - $this->processNamespace($namespaces, $class->namespace(), $file, $class->startLine(), $class->endLine()); - } - - $this->process($classes, $class->namespacedName(), $file, $class->startLine(), $class->endLine()); - - foreach ($class->traits() as $traitName) { - if (!isset($traits[$traitName])) { - continue; - } - - $this->mergeLines($class->namespacedName(), $traits[$traitName], $classes); - } - - $this->processMethods($class, $file, $methods, $reverseLookup); - - $classesThatExtendClass[$class->namespacedName()] = []; - $classDetails[$class->namespacedName()] = $class; - } - - foreach ($analysisResult->functions() as $function) { - if ($function->isNamespaced()) { - $this->processNamespace($namespaces, $function->namespace(), $file, $function->startLine(), $function->endLine()); - } - - $this->process($functions, $function->namespacedName(), $file, $function->startLine(), $function->endLine()); - - foreach (range($function->startLine(), $function->endLine()) as $line) { - $reverseLookup[$file . ':' . $line] = $function->namespacedName(); - } - } - } - - foreach ($namespaces as $namespace => $files) { - foreach (array_keys($files) as $file) { - $namespaces[$namespace][$file] = array_unique($namespaces[$namespace][$file]); - } - } - - foreach ($classDetails as $class) { - foreach ($class->interfaces() as $interfaceName) { - if (!isset($classesThatImplementInterface[$interfaceName])) { - continue; - } - - $this->process($classesThatImplementInterface, $interfaceName, $class->file(), $class->startLine(), $class->endLine()); - } - - foreach ($this->parentClasses($classDetails, $class) as $parentClass) { - $this->mergeLines($class->namespacedName(), $classes[$parentClass->namespacedName()], $classes); - - if (isset($classesThatExtendClass[$parentClass->namespacedName()])) { - $this->process($classesThatExtendClass, $parentClass->namespacedName(), $class->file(), $class->startLine(), $class->endLine()); - } - } - } - - foreach (array_keys($classesThatImplementInterface) as $className) { - if ($classesThatImplementInterface[$className] !== []) { - continue; - } - - unset($classesThatImplementInterface[$className]); - } - - foreach (array_keys($classesThatExtendClass) as $className) { - if ($classesThatExtendClass[$className] !== []) { - continue; - } - - unset($classesThatExtendClass[$className]); - } - - return [ - 'namespaces' => $namespaces, - 'traits' => $traits, - 'classes' => $classes, - 'classesThatExtendClass' => $classesThatExtendClass, - 'classesThatImplementInterface' => $classesThatImplementInterface, - 'methods' => $methods, - 'functions' => $functions, - 'reverseLookup' => $reverseLookup, - ]; - } - - private function mergeLines(string $targetClass, array $sourceData, array &$data): void - { - /** - * In large inheritance trees we might handle a lot of data. - * This loop needs to prevent unnecessary work whenever possible. - */ - foreach ($sourceData as $file => $lines) { - if (!isset($data[$targetClass][$file])) { - $data[$targetClass][$file] = $lines; - - continue; - } - - if ($data[$targetClass][$file] === $lines) { - continue; - } - - $data[$targetClass][$file] = array_unique( - array_merge( - $data[$targetClass][$file], - $lines, - ), - ); - } - } - - private function processMethods(Class_|Trait_ $classOrTrait, string $file, array &$methods, array &$reverseLookup): void - { - foreach ($classOrTrait->methods() as $method) { - $methodName = $classOrTrait->namespacedName() . '::' . $method->name(); - - $this->process($methods, $methodName, $file, $method->startLine(), $method->endLine()); - - foreach (range($method->startLine(), $method->endLine()) as $line) { - $reverseLookup[$file . ':' . $line] = $methodName; - } - } - } - - /** - * @param TargetMapPart $data - * @param non-empty-string $namespace - * @param non-empty-string $file - * @param positive-int $startLine - * @param positive-int $endLine - * - * @param-out TargetMapPart $data - */ - private function processNamespace(array &$data, string $namespace, string $file, int $startLine, int $endLine): void - { - $parts = explode('\\', $namespace); - - foreach (range(1, count($parts)) as $i) { - $this->process($data, implode('\\', array_slice($parts, 0, $i)), $file, $startLine, $endLine); - } - } - - /** - * @param TargetMapPart $data - * @param non-empty-string $unit - * @param non-empty-string $file - * @param positive-int $startLine - * @param positive-int $endLine - * - * @param-out TargetMapPart $data - */ - private function process(array &$data, string $unit, string $file, int $startLine, int $endLine): void - { - if (!isset($data[$unit])) { - $data[$unit] = []; - } - - if (!isset($data[$unit][$file])) { - $data[$unit][$file] = []; - } - - $data[$unit][$file] = array_merge( - $data[$unit][$file], - range($startLine, $endLine), - ); - } - - /** - * @param array $classDetails - * - * @return array - */ - private function parentClasses(array $classDetails, Class_ $class): array - { - if (!$class->hasParent()) { - return []; - } - - if (!isset($classDetails[$class->parentClass()])) { - return []; - } - - return array_merge( - [$classDetails[$class->parentClass()]], - $this->parentClasses($classDetails, $classDetails[$class->parentClass()]), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Mapper.php b/vendor/phpunit/php-code-coverage/src/Target/Mapper.php deleted file mode 100644 index 50c243be..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Mapper.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function array_keys; -use function array_merge; -use function array_unique; -use function strcasecmp; - -/** - * @phpstan-type TargetMap array{namespaces: TargetMapPart, traits: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup} - * @phpstan-type TargetMapPart array>> - * @phpstan-type ReverseLookup array - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Mapper -{ - /** - * @var TargetMap - */ - private array $map; - - /** - * @param TargetMap $map - */ - public function __construct(array $map) - { - $this->map = $map; - } - - /** - * @return array> - */ - public function mapTargets(TargetCollection $targets): array - { - $result = []; - - foreach ($targets as $target) { - foreach ($this->mapTarget($target) as $file => $lines) { - if (!isset($result[$file])) { - $result[$file] = $lines; - - continue; - } - - $result[$file] = array_unique(array_merge($result[$file], $lines)); - } - } - - return $result; - } - - /** - * @throws InvalidCodeCoverageTargetException - * - * @return array> - */ - public function mapTarget(Target $target): array - { - if (isset($this->map[$target->key()][$target->target()])) { - return $this->map[$target->key()][$target->target()]; - } - - foreach (array_keys($this->map[$target->key()]) as $key) { - if (strcasecmp($key, $target->target()) === 0) { - return $this->map[$target->key()][$key]; - } - } - - throw new InvalidCodeCoverageTargetException($target); - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * - * @return non-empty-string - */ - public function lookup(string $file, int $line): string - { - $key = $file . ':' . $line; - - if (isset($this->map['reverseLookup'][$key])) { - return $this->map['reverseLookup'][$key]; - } - - return $key; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Method.php b/vendor/phpunit/php-code-coverage/src/Target/Method.php deleted file mode 100644 index 0b46ba90..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Method.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Method extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - public function isMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'methods'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className . '::' . $this->methodName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Method ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php b/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php deleted file mode 100644 index 651927d9..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Namespace_ extends Target -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - protected function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - public function isNamespace(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'namespaces'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Namespace ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Target.php b/vendor/phpunit/php-code-coverage/src/Target/Target.php deleted file mode 100644 index 7432c81a..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Target.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class Target -{ - /** - * @param non-empty-string $namespace - */ - public static function forNamespace(string $namespace): Namespace_ - { - return new Namespace_($namespace); - } - - /** - * @param class-string $className - */ - public static function forClass(string $className): Class_ - { - return new Class_($className); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function forMethod(string $className, string $methodName): Method - { - return new Method($className, $methodName); - } - - /** - * @param class-string $interfaceName - */ - public static function forClassesThatImplementInterface(string $interfaceName): ClassesThatImplementInterface - { - return new ClassesThatImplementInterface($interfaceName); - } - - /** - * @param class-string $className - */ - public static function forClassesThatExtendClass(string $className): ClassesThatExtendClass - { - return new ClassesThatExtendClass($className); - } - - /** - * @param non-empty-string $functionName - */ - public static function forFunction(string $functionName): Function_ - { - return new Function_($functionName); - } - - /** - * @param trait-string $traitName - */ - public static function forTrait(string $traitName): Trait_ - { - return new Trait_($traitName); - } - - public function isNamespace(): bool - { - return false; - } - - public function isClass(): bool - { - return false; - } - - public function isMethod(): bool - { - return false; - } - - public function isClassesThatImplementInterface(): bool - { - return false; - } - - public function isClassesThatExtendClass(): bool - { - return false; - } - - public function isFunction(): bool - { - return false; - } - - public function isTrait(): bool - { - return false; - } - - /** - * @return non-empty-string - */ - abstract public function key(): string; - - /** - * @return non-empty-string - */ - abstract public function target(): string; - - /** - * @return non-empty-string - */ - abstract public function description(): string; -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php deleted file mode 100644 index ef6e32ac..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class TargetCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $targets; - - /** - * @param list $targets - */ - public static function fromArray(array $targets): self - { - return new self(...$targets); - } - - private function __construct(Target ...$targets) - { - $this->targets = $targets; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->targets; - } - - public function count(): int - { - return count($this->targets); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } - - public function isNotEmpty(): bool - { - return $this->count() > 0; - } - - public function getIterator(): TargetCollectionIterator - { - return new TargetCollectionIterator($this); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php deleted file mode 100644 index 9a5ca06d..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class TargetCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $targets; - private int $position = 0; - - public function __construct(TargetCollection $metadata) - { - $this->targets = $metadata->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->targets); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Target - { - return $this->targets[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php deleted file mode 100644 index 37034143..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function implode; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class TargetCollectionValidator -{ - public function validate(Mapper $mapper, TargetCollection $targets): ValidationResult - { - $errors = []; - - foreach ($targets as $target) { - try { - $mapper->mapTarget($target); - } catch (InvalidCodeCoverageTargetException $e) { - $errors[] = $e->getMessage(); - } - } - - if ($errors === []) { - return ValidationResult::success(); - } - - return ValidationResult::failure(implode("\n", $errors)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Trait_.php b/vendor/phpunit/php-code-coverage/src/Target/Trait_.php deleted file mode 100644 index a698a18a..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Trait_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Trait_ extends Target -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param trait-string $traitName - */ - protected function __construct(string $traitName) - { - $this->traitName = $traitName; - } - - public function isTrait(): true - { - return true; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'traits'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->traitName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Trait ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php b/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php deleted file mode 100644 index e43791f5..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class ValidationFailure extends ValidationResult -{ - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - * - * @noinspection PhpMissingParentConstructorInspection - */ - protected function __construct(string $message) - { - $this->message = $message; - } - - public function isFailure(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php b/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php deleted file mode 100644 index 8abf5112..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract readonly class ValidationResult -{ - public static function success(): ValidationSuccess - { - return new ValidationSuccess; - } - - /** - * @param non-empty-string $message - */ - public static function failure(string $message): ValidationFailure - { - return new ValidationFailure($message); - } - - /** - * @phpstan-assert-if-true ValidationSuccess $this - */ - public function isSuccess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true ValidationFailure $this - */ - public function isFailure(): bool - { - return false; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php b/vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php deleted file mode 100644 index 1dffd0d2..00000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class ValidationSuccess extends ValidationResult -{ - public function isSuccess(): true - { - return true; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/Known.php b/vendor/phpunit/php-code-coverage/src/TestSize/Known.php deleted file mode 100644 index 2bd72abe..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/Known.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -abstract class Known extends TestSize -{ - public function isKnown(): true - { - return true; - } - - abstract public function isGreaterThan(self $other): bool; -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/Large.php b/vendor/phpunit/php-code-coverage/src/TestSize/Large.php deleted file mode 100644 index f6a1b953..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/Large.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -final class Large extends Known -{ - public function isLarge(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return !$other->isLarge(); - } - - public function asString(): string - { - return 'large'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/Medium.php b/vendor/phpunit/php-code-coverage/src/TestSize/Medium.php deleted file mode 100644 index f7fd7c86..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/Medium.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -final class Medium extends Known -{ - public function isMedium(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return $other->isSmall(); - } - - public function asString(): string - { - return 'medium'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/Small.php b/vendor/phpunit/php-code-coverage/src/TestSize/Small.php deleted file mode 100644 index 7c695ef4..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/Small.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -final class Small extends Known -{ - public function isSmall(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return false; - } - - public function asString(): string - { - return 'small'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/TestSize.php b/vendor/phpunit/php-code-coverage/src/TestSize/TestSize.php deleted file mode 100644 index a2c92dcc..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/TestSize.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -abstract class TestSize -{ - public static function unknown(): Unknown - { - return new Unknown; - } - - public static function small(): Small - { - return new Small; - } - - public static function medium(): Medium - { - return new Medium; - } - - public static function large(): Large - { - return new Large; - } - - /** - * @phpstan-assert-if-true Known $this - */ - public function isKnown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Unknown $this - */ - public function isUnknown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Small $this - */ - public function isSmall(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Medium $this - */ - public function isMedium(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Large $this - */ - public function isLarge(): bool - { - return false; - } - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/php-code-coverage/src/TestSize/Unknown.php b/vendor/phpunit/php-code-coverage/src/TestSize/Unknown.php deleted file mode 100644 index 92808f68..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestSize/Unknown.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestSize; - -/** - * @immutable - */ -final class Unknown extends TestSize -{ - public function isUnknown(): true - { - return true; - } - - public function asString(): string - { - return 'unknown'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestStatus/Failure.php b/vendor/phpunit/php-code-coverage/src/TestStatus/Failure.php deleted file mode 100644 index a08ac3f6..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestStatus/Failure.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestStatus; - -/** - * @immutable - */ -final class Failure extends Known -{ - public function isFailure(): true - { - return true; - } - - public function asString(): string - { - return 'failure'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestStatus/Known.php b/vendor/phpunit/php-code-coverage/src/TestStatus/Known.php deleted file mode 100644 index 358abe16..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestStatus/Known.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestStatus; - -/** - * @immutable - */ -abstract class Known extends TestStatus -{ - public function isKnown(): true - { - return true; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestStatus/Success.php b/vendor/phpunit/php-code-coverage/src/TestStatus/Success.php deleted file mode 100644 index 55f84a6b..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestStatus/Success.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestStatus; - -/** - * @immutable - */ -final class Success extends Known -{ - public function isSuccess(): true - { - return true; - } - - public function asString(): string - { - return 'success'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/TestStatus/TestStatus.php b/vendor/phpunit/php-code-coverage/src/TestStatus/TestStatus.php deleted file mode 100644 index c8015992..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestStatus/TestStatus.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestStatus; - -/** - * @immutable - */ -abstract class TestStatus -{ - public static function unknown(): self - { - return new Unknown; - } - - public static function success(): self - { - return new Success; - } - - public static function failure(): self - { - return new Failure; - } - - /** - * @phpstan-assert-if-true Known $this - */ - public function isKnown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Unknown $this - */ - public function isUnknown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Success $this - */ - public function isSuccess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Failure $this - */ - public function isFailure(): bool - { - return false; - } - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/php-code-coverage/src/TestStatus/Unknown.php b/vendor/phpunit/php-code-coverage/src/TestStatus/Unknown.php deleted file mode 100644 index ecde844d..00000000 --- a/vendor/phpunit/php-code-coverage/src/TestStatus/Unknown.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\TestStatus; - -/** - * @immutable - */ -final class Unknown extends TestStatus -{ - public function isUnknown(): true - { - return true; - } - - public function asString(): string - { - return 'unknown'; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Util/Filesystem.php b/vendor/phpunit/php-code-coverage/src/Util/Filesystem.php deleted file mode 100644 index f73388ae..00000000 --- a/vendor/phpunit/php-code-coverage/src/Util/Filesystem.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Util; - -use function dirname; -use function file_put_contents; -use function is_dir; -use function mkdir; -use function sprintf; -use function str_contains; -use SebastianBergmann\CodeCoverage\WriteOperationFailedException; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Filesystem -{ - /** - * @throws DirectoryCouldNotBeCreatedException - */ - public static function createDirectory(string $directory): void - { - $success = !(!is_dir($directory) && !@mkdir($directory, 0o777, true) && !is_dir($directory)); - - if (!$success) { - throw new DirectoryCouldNotBeCreatedException( - sprintf( - 'Directory "%s" could not be created', - $directory, - ), - ); - } - } - - /** - * @param non-empty-string $target - * - * @throws WriteOperationFailedException - */ - public static function write(string $target, string $buffer): void - { - if (!str_contains($target, '://')) { - self::createDirectory(dirname($target)); - } - - if (@file_put_contents($target, $buffer) === false) { - throw new WriteOperationFailedException($target); - } - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Util/Percentage.php b/vendor/phpunit/php-code-coverage/src/Util/Percentage.php deleted file mode 100644 index 1de640f8..00000000 --- a/vendor/phpunit/php-code-coverage/src/Util/Percentage.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Util; - -use function sprintf; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Percentage -{ - private float $fraction; - private float $total; - - public static function fromFractionAndTotal(float $fraction, float $total): self - { - return new self($fraction, $total); - } - - private function __construct(float $fraction, float $total) - { - $this->fraction = $fraction; - $this->total = $total; - } - - public function asFloat(): float - { - if ($this->total > 0) { - return ($this->fraction / $this->total) * 100; - } - - return 100.0; - } - - public function asString(): string - { - if ($this->total > 0) { - return sprintf('%01.2F%%', $this->asFloat()); - } - - return ''; - } - - public function asFixedWidthString(): string - { - if ($this->total > 0) { - return sprintf('%6.2F%%', $this->asFloat()); - } - - return ''; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Util/Xml.php b/vendor/phpunit/php-code-coverage/src/Util/Xml.php deleted file mode 100644 index de958a4b..00000000 --- a/vendor/phpunit/php-code-coverage/src/Util/Xml.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Util; - -use const PHP_EOL; -use function libxml_clear_errors; -use function libxml_get_errors; -use function libxml_use_internal_errors; -use DOMDocument; -use SebastianBergmann\CodeCoverage\XmlException; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Xml -{ - /** - * @throws XmlException - * - * @see https://bugs.php.net/bug.php?id=79191 - */ - public static function asString(DOMDocument $document): string - { - $xmlErrorHandling = libxml_use_internal_errors(true); - - $document->formatOutput = true; - $document->preserveWhiteSpace = false; - - $buffer = $document->saveXML(); - - if ($buffer === false) { - $message = 'Unable to generate the XML'; - - foreach (libxml_get_errors() as $error) { - $message .= PHP_EOL . $error->message; - } - - throw new XmlException($message); - } - - libxml_clear_errors(); - libxml_use_internal_errors($xmlErrorHandling); - - return $buffer; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Version.php b/vendor/phpunit/php-code-coverage/src/Version.php deleted file mode 100644 index a52b872a..00000000 --- a/vendor/phpunit/php-code-coverage/src/Version.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage; - -use function dirname; -use SebastianBergmann\Version as VersionId; - -final class Version -{ - private static string $version = ''; - - public static function id(): string - { - if (self::$version === '') { - self::$version = (new VersionId('12.4.0', dirname(__DIR__)))->asString(); - } - - return self::$version; - } -} diff --git a/vendor/phpunit/php-file-iterator/ChangeLog.md b/vendor/phpunit/php-file-iterator/ChangeLog.md deleted file mode 100644 index a0fa134a..00000000 --- a/vendor/phpunit/php-file-iterator/ChangeLog.md +++ /dev/null @@ -1,202 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). - -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [5.1.0] - 2024-08-27 - -### Added - -* [#83](https://github.com/sebastianbergmann/php-file-iterator/pull/83): Support for "Globstar" pattern - -## [5.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [5.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [4.1.0] - 2023-08-31 - -### Added - -* [#81](https://github.com/sebastianbergmann/php-file-iterator/issues/81): Accept `array|string $paths` in `Facade::getFilesAsArray()` - -## [4.0.2] - 2023-05-07 - -### Fixed - -* [#80](https://github.com/sebastianbergmann/php-file-iterator/pull/80): Ignore unresolvable symbolic link - -## [4.0.1] - 2023-02-10 - -### Fixed - -* [#67](https://github.com/sebastianbergmann/php-file-iterator/issues/61): Excluded directories are traversed unnecessarily - -## [4.0.0] - 2023-02-03 - -### Removed - -* The optional `$commonPath` parameter of `SebastianBergmann\FileIterator\Facade` as well as the functionality it controlled has been removed -* The `SebastianBergmann\FileIterator\Factory` and `SebastianBergmann\FileIterator\Iterator` classes are now marked `@internal` -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [3.0.6] - 2021-12-02 - -### Changed - -* [#73](https://github.com/sebastianbergmann/php-file-iterator/pull/73): Micro performance improvements on parsing paths - -## [3.0.5] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [3.0.4] - 2020-07-11 - -### Fixed - -* [#67](https://github.com/sebastianbergmann/php-file-iterator/issues/67): `TypeError` in `SebastianBergmann\FileIterator\Iterator::accept()` - -## [3.0.3] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [3.0.2] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [3.0.1] - 2020-04-18 - -### Fixed - -* [#64](https://github.com/sebastianbergmann/php-file-iterator/issues/64): Release tarball contains Composer PHAR - -## [3.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -## [2.0.5] - 2021-12-02 - -### Changed - -* [#73](https://github.com/sebastianbergmann/php-file-iterator/pull/73): Micro performance improvements on parsing paths - -### Fixed - -* [#74](https://github.com/sebastianbergmann/php-file-iterator/pull/74): Document return type of `SebastianBergmann\FileIterator\Iterator::accept()` so that Symfony's `DebugClassLoader` does not trigger a deprecation warning - -## [2.0.4] - 2021-07-19 - -### Changed - -* Added `ReturnTypeWillChange` attribute to `SebastianBergmann\FileIterator\Iterator::accept()` because the return type of `\FilterIterator::accept()` will change in PHP 8.1 - -## [2.0.3] - 2020-11-30 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.1` to `>=7.1` - -## [2.0.2] - 2018-09-13 - -### Fixed - -* [#48](https://github.com/sebastianbergmann/php-file-iterator/issues/48): Excluding an array that contains false ends up excluding the current working directory - -## [2.0.1] - 2018-06-11 - -### Fixed - -* [#46](https://github.com/sebastianbergmann/php-file-iterator/issues/46): Regression with hidden parent directory - -## [2.0.0] - 2018-05-28 - -### Fixed - -* [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30): Exclude is not considered if it is a parent of the base path - -### Changed - -* This component now uses namespaces - -### Removed - -* This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 - -## [1.4.5] - 2017-11-27 - -### Fixed - -* [#37](https://github.com/sebastianbergmann/php-file-iterator/issues/37): Regression caused by fix for [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30) - -## [1.4.4] - 2017-11-27 - -### Fixed - -* [#30](https://github.com/sebastianbergmann/php-file-iterator/issues/30): Exclude is not considered if it is a parent of the base path - -## [1.4.3] - 2017-11-25 - -### Fixed - -* [#34](https://github.com/sebastianbergmann/php-file-iterator/issues/34): Factory should use canonical directory names - -## [1.4.2] - 2016-11-26 - -No changes - -## [1.4.1] - 2015-07-26 - -No changes - -## 1.4.0 - 2015-04-02 - -### Added - -* [#23](https://github.com/sebastianbergmann/php-file-iterator/pull/23): Added support for wildcards (glob) in exclude - -[6.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.1...6.0.0 -[5.1.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.1...5.1.0 -[5.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.1...5.0.0 -[4.1.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.0.2...4.1.0 -[4.0.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.6...4.0.0 -[3.0.6]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.5...3.0.6 -[3.0.5]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.4...3.0.5 -[3.0.4]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.3...3.0.4 -[3.0.3]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.2...3.0.3 -[3.0.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.5...3.0.0 -[2.0.5]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.4...2.0.5 -[2.0.4]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.5...2.0.0 -[1.4.5]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.4...1.4.5 -[1.4.4]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.3...1.4.4 -[1.4.3]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.2...1.4.3 -[1.4.2]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.1...1.4.2 -[1.4.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/1.4.0...1.4.1 diff --git a/vendor/phpunit/php-file-iterator/LICENSE b/vendor/phpunit/php-file-iterator/LICENSE deleted file mode 100644 index 017eb48b..00000000 --- a/vendor/phpunit/php-file-iterator/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2009-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-file-iterator/README.md b/vendor/phpunit/php-file-iterator/README.md deleted file mode 100644 index 5bc7da65..00000000 --- a/vendor/phpunit/php-file-iterator/README.md +++ /dev/null @@ -1,17 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-file-iterator/v)](https://packagist.org/packages/phpunit/php-file-iterator) -[![CI Status](https://github.com/sebastianbergmann/php-file-iterator/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-file-iterator/actions) -[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/php-file-iterator/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/php-file-iterator) -[![codecov](https://codecov.io/gh/sebastianbergmann/php-file-iterator/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-file-iterator) - -# php-file-iterator - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phpunit/php-file-iterator - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phpunit/php-file-iterator - diff --git a/vendor/phpunit/php-file-iterator/SECURITY.md b/vendor/phpunit/php-file-iterator/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/phpunit/php-file-iterator/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/phpunit/php-file-iterator/composer.json b/vendor/phpunit/php-file-iterator/composer.json deleted file mode 100644 index 528f298b..00000000 --- a/vendor/phpunit/php-file-iterator/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "phpunit/php-file-iterator", - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "type": "library", - "keywords": [ - "iterator", - "filesystem" - ], - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - } -} diff --git a/vendor/phpunit/php-file-iterator/src/ExcludeIterator.php b/vendor/phpunit/php-file-iterator/src/ExcludeIterator.php deleted file mode 100644 index 209ec00f..00000000 --- a/vendor/phpunit/php-file-iterator/src/ExcludeIterator.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\FileIterator; - -use function assert; -use function str_starts_with; -use RecursiveDirectoryIterator; -use RecursiveFilterIterator; -use SplFileInfo; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-file-iterator - */ -final class ExcludeIterator extends RecursiveFilterIterator -{ - /** - * @var list - */ - private array $exclude; - - /** - * @param list $exclude - */ - public function __construct(RecursiveDirectoryIterator $iterator, array $exclude) - { - parent::__construct($iterator); - - $this->exclude = $exclude; - } - - public function accept(): bool - { - $current = $this->current(); - - assert($current instanceof SplFileInfo); - - $path = $current->getRealPath(); - - if ($path === false) { - return false; - } - - foreach ($this->exclude as $exclude) { - if (str_starts_with($path, $exclude)) { - return false; - } - } - - return true; - } - - public function hasChildren(): bool - { - return $this->getInnerIterator()->hasChildren(); - } - - public function getChildren(): self - { - return new self( - $this->getInnerIterator()->getChildren(), - $this->exclude, - ); - } - - public function getInnerIterator(): RecursiveDirectoryIterator - { - $innerIterator = parent::getInnerIterator(); - - assert($innerIterator instanceof RecursiveDirectoryIterator); - - return $innerIterator; - } -} diff --git a/vendor/phpunit/php-file-iterator/src/Facade.php b/vendor/phpunit/php-file-iterator/src/Facade.php deleted file mode 100644 index a0410e84..00000000 --- a/vendor/phpunit/php-file-iterator/src/Facade.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\FileIterator; - -use function array_unique; -use function assert; -use function sort; -use SplFileInfo; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - /** - * @param list|non-empty-string $paths - * @param list|string $suffixes - * @param list|string $prefixes - * @param list $exclude - * - * @return list - */ - public function getFilesAsArray(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): array - { - $iterator = (new Factory)->getFileIterator($paths, $suffixes, $prefixes, $exclude); - - $files = []; - - foreach ($iterator as $file) { - assert($file instanceof SplFileInfo); - - $file = $file->getRealPath(); - - if ($file) { - $files[] = $file; - } - } - - $files = array_unique($files); - - sort($files); - - return $files; - } -} diff --git a/vendor/phpunit/php-file-iterator/src/Factory.php b/vendor/phpunit/php-file-iterator/src/Factory.php deleted file mode 100644 index da53df92..00000000 --- a/vendor/phpunit/php-file-iterator/src/Factory.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\FileIterator; - -use const GLOB_ONLYDIR; -use function array_filter; -use function array_map; -use function array_merge; -use function array_unique; -use function array_values; -use function glob; -use function is_dir; -use function is_string; -use function realpath; -use function sort; -use function stripos; -use function substr; -use AppendIterator; -use FilesystemIterator; -use RecursiveDirectoryIterator; -use RecursiveIteratorIterator; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-file-iterator - */ -final class Factory -{ - /** - * @param list|non-empty-string $paths - * @param list|string $suffixes - * @param list|string $prefixes - * @param list $exclude - * - * @phpstan-ignore missingType.generics - */ - public function getFileIterator(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): AppendIterator - { - if (is_string($paths)) { - $paths = [$paths]; - } - - $paths = $this->resolveWildcards($paths); - $exclude = $this->resolveWildcards($exclude); - - if (is_string($prefixes)) { - if ($prefixes !== '') { - $prefixes = [$prefixes]; - } else { - $prefixes = []; - } - } - - if (is_string($suffixes)) { - if ($suffixes !== '') { - $suffixes = [$suffixes]; - } else { - $suffixes = []; - } - } - - $iterator = new AppendIterator; - - foreach ($paths as $path) { - if (is_dir($path)) { - $iterator->append( - new Iterator( - $path, - new RecursiveIteratorIterator( - new ExcludeIterator( - new RecursiveDirectoryIterator($path, FilesystemIterator::FOLLOW_SYMLINKS | FilesystemIterator::SKIP_DOTS), - $exclude, - ), - ), - $suffixes, - $prefixes, - ), - ); - } - } - - return $iterator; - } - - /** - * @param list $paths - * - * @return list - */ - private function resolveWildcards(array $paths): array - { - $_paths = [[]]; - - foreach ($paths as $path) { - if ($locals = $this->globstar($path)) { - $_paths[] = array_map('\realpath', $locals); - } else { - // @codeCoverageIgnoreStart - $_paths[] = [realpath($path)]; - // @codeCoverageIgnoreEnd - } - } - - return array_values(array_filter(array_merge(...$_paths))); - } - - /** - * @see https://gist.github.com/funkjedi/3feee27d873ae2297b8e2370a7082aad - * - * @return list - */ - private function globstar(string $pattern): array - { - if (stripos($pattern, '**') === false) { - $files = glob($pattern, GLOB_ONLYDIR); - } else { - $position = stripos($pattern, '**'); - $rootPattern = substr($pattern, 0, $position - 1); - $restPattern = substr($pattern, $position + 2); - - $patterns = [$rootPattern . $restPattern]; - $rootPattern .= '/*'; - - while ($directories = glob($rootPattern, GLOB_ONLYDIR)) { - $rootPattern .= '/*'; - - foreach ($directories as $directory) { - $patterns[] = $directory . $restPattern; - } - } - - $files = []; - - foreach ($patterns as $_pattern) { - $files = array_merge($files, $this->globstar($_pattern)); - } - } - - if ($files !== false) { - $files = array_unique($files); - - sort($files); - - return $files; - } - - // @codeCoverageIgnoreStart - return []; - // @codeCoverageIgnoreEnd - } -} diff --git a/vendor/phpunit/php-file-iterator/src/Iterator.php b/vendor/phpunit/php-file-iterator/src/Iterator.php deleted file mode 100644 index b29f235a..00000000 --- a/vendor/phpunit/php-file-iterator/src/Iterator.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\FileIterator; - -use function preg_match; -use function realpath; -use function str_ends_with; -use function str_replace; -use function str_starts_with; -use FilterIterator; -use SplFileInfo; - -/** - * @template-extends FilterIterator - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-file-iterator - */ -final class Iterator extends FilterIterator -{ - public const int PREFIX = 0; - public const int SUFFIX = 1; - private false|string $basePath; - - /** - * @var list - */ - private array $suffixes; - - /** - * @var list - */ - private array $prefixes; - - /** - * @param list $suffixes - * @param list $prefixes - */ - public function __construct(string $basePath, \Iterator $iterator, array $suffixes = [], array $prefixes = []) - { - $this->basePath = realpath($basePath); - $this->prefixes = $prefixes; - $this->suffixes = $suffixes; - - parent::__construct($iterator); - } - - public function accept(): bool - { - $current = $this->getInnerIterator()->current(); - - $filename = $current->getFilename(); - $realPath = $current->getRealPath(); - - if ($realPath === false) { - // @codeCoverageIgnoreStart - return false; - // @codeCoverageIgnoreEnd - } - - return $this->acceptPath($realPath) && - $this->acceptPrefix($filename) && - $this->acceptSuffix($filename); - } - - private function acceptPath(string $path): bool - { - // Filter files in hidden directories by checking path that is relative to the base path. - if (preg_match('=/\.[^/]*/=', str_replace((string) $this->basePath, '', $path))) { - return false; - } - - return true; - } - - private function acceptPrefix(string $filename): bool - { - return $this->acceptSubString($filename, $this->prefixes, self::PREFIX); - } - - private function acceptSuffix(string $filename): bool - { - return $this->acceptSubString($filename, $this->suffixes, self::SUFFIX); - } - - /** - * @param list $subStrings - */ - private function acceptSubString(string $filename, array $subStrings, int $type): bool - { - if (empty($subStrings)) { - return true; - } - - foreach ($subStrings as $string) { - if (($type === self::PREFIX && str_starts_with($filename, $string)) || - ($type === self::SUFFIX && str_ends_with($filename, $string))) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/php-invoker/ChangeLog.md b/vendor/phpunit/php-invoker/ChangeLog.md deleted file mode 100644 index 9af1807a..00000000 --- a/vendor/phpunit/php-invoker/ChangeLog.md +++ /dev/null @@ -1,76 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [5.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [5.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [4.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [3.1.1] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [3.1.0] - 2020-08-06 - -### Changed - -* [#14](https://github.com/sebastianbergmann/php-invoker/pull/14): Clear alarm in `finally` block - -## [3.0.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [3.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [3.0.0] - 2020-02-07 - -### Added - -* Added `canInvokeWithTimeout()` method to check requirements for the functionality provided by this component to work - -### Changed - -* Moved `"ext-pcntl": "*"` requirement from `require` to `suggest` so that this component can be installed even if `ext/pcntl` is not available -* `invoke()` now raises an exception when the requirements for the functionality provided by this component to work are not met - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -[6.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/5.0...6.0.0 -[5.0.1]: https://github.com/sebastianbergmann/php-invoker/compare/5.0.1...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/4.0...5.0.0 -[4.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/3.1.1...4.0.0 -[3.1.1]: https://github.com/sebastianbergmann/php-invoker/compare/3.1.0...3.1.1 -[3.1.0]: https://github.com/sebastianbergmann/php-invoker/compare/3.0.2...3.1.0 -[3.0.2]: https://github.com/sebastianbergmann/php-invoker/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/php-invoker/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/2.0.0...3.0.0 diff --git a/vendor/phpunit/php-invoker/LICENSE b/vendor/phpunit/php-invoker/LICENSE deleted file mode 100644 index 9d94d32e..00000000 --- a/vendor/phpunit/php-invoker/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2011-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-invoker/README.md b/vendor/phpunit/php-invoker/README.md deleted file mode 100644 index aedc3397..00000000 --- a/vendor/phpunit/php-invoker/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# phpunit/php-invoker - -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-invoker/v)](https://packagist.org/packages/phpunit/php-invoker) -[![CI Status](https://github.com/sebastianbergmann/php-invoker/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-invoker/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/php-invoker/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-invoker) - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require phpunit/php-invoker -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev phpunit/php-invoker -``` diff --git a/vendor/phpunit/php-invoker/SECURITY.md b/vendor/phpunit/php-invoker/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/phpunit/php-invoker/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/phpunit/php-invoker/composer.json b/vendor/phpunit/php-invoker/composer.json deleted file mode 100644 index b5bd9b85..00000000 --- a/vendor/phpunit/php-invoker/composer.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "phpunit/php-invoker", - "description": "Invoke callables with a timeout", - "type": "library", - "keywords": [ - "process" - ], - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture/" - ] - }, - "suggest": { - "ext-pcntl": "*" - }, - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - } -} - diff --git a/vendor/phpunit/php-invoker/src/Invoker.php b/vendor/phpunit/php-invoker/src/Invoker.php deleted file mode 100644 index 18ae4ff8..00000000 --- a/vendor/phpunit/php-invoker/src/Invoker.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Invoker; - -use const SIGALRM; -use function call_user_func_array; -use function extension_loaded; -use function function_exists; -use function pcntl_alarm; -use function pcntl_async_signals; -use function pcntl_signal; -use function sprintf; -use Throwable; - -final class Invoker -{ - /** - * @param array $arguments - * - * @throws Throwable - */ - public function invoke(callable $callable, array $arguments, int $timeout): mixed - { - if (!$this->canInvokeWithTimeout()) { - // @codeCoverageIgnoreStart - throw new ProcessControlExtensionNotLoadedException; - // @codeCoverageIgnoreEnd - } - - pcntl_signal( - SIGALRM, - static function () use ($timeout): void - { - throw new TimeoutException( - sprintf( - 'Execution aborted after %d second%s', - $timeout, - $timeout === 1 ? '' : 's', - ), - ); - }, - ); - - pcntl_async_signals(true); - pcntl_alarm($timeout); - - try { - return call_user_func_array($callable, $arguments); - } finally { - pcntl_alarm(0); - } - } - - public function canInvokeWithTimeout(): bool - { - return extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_async_signals') && function_exists('pcntl_alarm'); - } -} diff --git a/vendor/phpunit/php-invoker/src/exceptions/Exception.php b/vendor/phpunit/php-invoker/src/exceptions/Exception.php deleted file mode 100644 index 6ecbf5dd..00000000 --- a/vendor/phpunit/php-invoker/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Invoker; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php b/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php deleted file mode 100644 index 7f410d3c..00000000 --- a/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Invoker; - -use const PHP_EOL; -use function extension_loaded; -use function function_exists; -use function implode; -use RuntimeException; - -final class ProcessControlExtensionNotLoadedException extends RuntimeException implements Exception -{ - public function __construct() - { - $message = []; - - if (!extension_loaded('pcntl')) { - $message[] = 'The pcntl (process control) extension for PHP must be loaded.'; - } - - if (!function_exists('pcntl_signal')) { - $message[] = 'The pcntl_signal() function must not be disabled.'; - } - - if (!function_exists('pcntl_async_signals')) { - $message[] = 'The pcntl_async_signals() function must not be disabled.'; - } - - if (!function_exists('pcntl_alarm')) { - $message[] = 'The pcntl_alarm() function must not be disabled.'; - } - - parent::__construct(implode(PHP_EOL, $message)); - } -} diff --git a/vendor/phpunit/php-invoker/src/exceptions/TimeoutException.php b/vendor/phpunit/php-invoker/src/exceptions/TimeoutException.php deleted file mode 100644 index 2f7631c0..00000000 --- a/vendor/phpunit/php-invoker/src/exceptions/TimeoutException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Invoker; - -use RuntimeException; - -final class TimeoutException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/php-text-template/.psalm/baseline.xml b/vendor/phpunit/php-text-template/.psalm/baseline.xml deleted file mode 100644 index 1f9a5e31..00000000 --- a/vendor/phpunit/php-text-template/.psalm/baseline.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/vendor/phpunit/php-text-template/.psalm/config.xml b/vendor/phpunit/php-text-template/.psalm/config.xml deleted file mode 100644 index 343cc8e3..00000000 --- a/vendor/phpunit/php-text-template/.psalm/config.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/vendor/phpunit/php-text-template/ChangeLog.md b/vendor/phpunit/php-text-template/ChangeLog.md deleted file mode 100644 index ff91aa43..00000000 --- a/vendor/phpunit/php-text-template/ChangeLog.md +++ /dev/null @@ -1,79 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [4.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [4.0.0] - 2024-02-02 - -### Removed - -* The `SebastianBergmann\Template\Template::setFile()` method has been removed -* This component is no longer supported on PHP 8.1 - -## [3.0.1] - 2023-08-31 - -### Changed - -* Warnings from `file_put_contents()` are now suppressed - -## [3.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [2.0.4] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Template\Exception` now correctly extends `\Throwable` - -## [2.0.3] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [2.0.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [2.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [2.0.0] - 2020-02-07 - -### Changed - -* The `Text_Template` class was renamed to `SebastianBergmann\Template\Template` - -### Removed - -* Removed support for PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1, and PHP 7.2 - -[5.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/4.0...5.0.0 -[4.0.1]: https://github.com/sebastianbergmann/php-text-template/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/3.0...4.0.0 -[3.0.1]: https://github.com/sebastianbergmann/php-text-template/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/2.0.4...3.0.0 -[2.0.4]: https://github.com/sebastianbergmann/php-text-template/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/sebastianbergmann/php-text-template/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/sebastianbergmann/php-text-template/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/php-text-template/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/1.2.1...2.0.0 diff --git a/vendor/phpunit/php-text-template/LICENSE b/vendor/phpunit/php-text-template/LICENSE deleted file mode 100644 index 017eb48b..00000000 --- a/vendor/phpunit/php-text-template/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2009-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-text-template/README.md b/vendor/phpunit/php-text-template/README.md deleted file mode 100644 index 009d5466..00000000 --- a/vendor/phpunit/php-text-template/README.md +++ /dev/null @@ -1,16 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-text-template/v)](https://packagist.org/packages/phpunit/php-text-template) -[![CI Status](https://github.com/sebastianbergmann/php-text-template/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-text-template/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/php-text-template/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-text-template) - -# php-text-template - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - - composer require phpunit/php-text-template - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - - composer require --dev phpunit/php-text-template - diff --git a/vendor/phpunit/php-text-template/SECURITY.md b/vendor/phpunit/php-text-template/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/phpunit/php-text-template/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/phpunit/php-text-template/composer.json b/vendor/phpunit/php-text-template/composer.json deleted file mode 100644 index f7a5ae77..00000000 --- a/vendor/phpunit/php-text-template/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "phpunit/php-text-template", - "description": "Simple template engine.", - "type": "library", - "keywords": [ - "template" - ], - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - } -} diff --git a/vendor/phpunit/php-text-template/src/Template.php b/vendor/phpunit/php-text-template/src/Template.php deleted file mode 100644 index c062a0cd..00000000 --- a/vendor/phpunit/php-text-template/src/Template.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Template; - -use function array_keys; -use function array_merge; -use function file_get_contents; -use function file_put_contents; -use function is_file; -use function is_string; -use function sprintf; -use function str_replace; - -final class Template -{ - /** - * @var non-empty-string - */ - private readonly string $template; - - /** - * @var non-empty-string - */ - private readonly string $openDelimiter; - - /** - * @var non-empty-string - */ - private readonly string $closeDelimiter; - - /** - * @var array - */ - private array $values = []; - - /** - * @param non-empty-string $templateFile - * @param non-empty-string $openDelimiter - * @param non-empty-string $closeDelimiter - * - * @throws InvalidArgumentException - */ - public function __construct(string $templateFile, string $openDelimiter = '{', string $closeDelimiter = '}') - { - $this->template = $this->loadTemplateFile($templateFile); - $this->openDelimiter = $openDelimiter; - $this->closeDelimiter = $closeDelimiter; - } - - /** - * @param array $values - */ - public function setVar(array $values, bool $merge = true): void - { - if (!$merge || empty($this->values)) { - $this->values = $values; - - return; - } - - $this->values = array_merge($this->values, $values); - } - - public function render(): string - { - $keys = []; - - foreach (array_keys($this->values) as $key) { - $keys[] = $this->openDelimiter . $key . $this->closeDelimiter; - } - - return str_replace($keys, $this->values, $this->template); - } - - /** - * @codeCoverageIgnore - */ - public function renderTo(string $target): void - { - if (!@file_put_contents($target, $this->render())) { - throw new RuntimeException( - sprintf( - 'Writing rendered result to "%s" failed', - $target, - ), - ); - } - } - - /** - * @param non-empty-string $file - * - * @throws InvalidArgumentException - * - * @return non-empty-string - */ - private function loadTemplateFile(string $file): string - { - if (is_file($file)) { - $template = file_get_contents($file); - - if (is_string($template) && !empty($template)) { - return $template; - } - } - - $distFile = $file . '.dist'; - - if (is_file($distFile)) { - $template = file_get_contents($distFile); - - if (is_string($template) && !empty($template)) { - return $template; - } - } - - throw new InvalidArgumentException( - sprintf( - 'Failed to load template "%s"', - $file, - ), - ); - } -} diff --git a/vendor/phpunit/php-text-template/src/exceptions/Exception.php b/vendor/phpunit/php-text-template/src/exceptions/Exception.php deleted file mode 100644 index d7dc5cbe..00000000 --- a/vendor/phpunit/php-text-template/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Template; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php b/vendor/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php deleted file mode 100644 index 10e1cd11..00000000 --- a/vendor/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Template; - -final class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/phpunit/php-text-template/src/exceptions/RuntimeException.php b/vendor/phpunit/php-text-template/src/exceptions/RuntimeException.php deleted file mode 100644 index 131498e6..00000000 --- a/vendor/phpunit/php-text-template/src/exceptions/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Template; - -use InvalidArgumentException; - -final class RuntimeException extends InvalidArgumentException implements Exception -{ -} diff --git a/vendor/phpunit/php-timer/ChangeLog.md b/vendor/phpunit/php-timer/ChangeLog.md deleted file mode 100644 index e103064e..00000000 --- a/vendor/phpunit/php-timer/ChangeLog.md +++ /dev/null @@ -1,166 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [7.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [7.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [6.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [5.0.3] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Timer\Exception` now correctly extends `\Throwable` - -## [5.0.2] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [5.0.1] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [5.0.0] - 2020-06-07 - -### Changed - -* Parameter type for `SebastianBergmann\Timer\Duration::fromMicroseconds()` was changed from `int` to `float` -* Parameter type for `SebastianBergmann\Timer\Duration::fromNanoseconds()` was changed from `int` to `float` -* Return type for `SebastianBergmann\Timer\Duration::asNanoseconds()` was changed from `int` to `float` - -### Fixed - -* [#31](https://github.com/sebastianbergmann/php-timer/issues/31): Type Error on 32-bit systems (where `hrtime()` returns `float` instead of `int`) - -## [4.0.0] - 2020-06-01 - -### Added - -* Introduced `Duration` value object for encapsulating a duration with nanosecond granularity -* Introduced `ResourceUsageFormatter` object for formatting resource usage with option to explicitly pass a duration (instead of looking at the unreliable `$_SERVER['REQUEST_TIME_FLOAT']` variable) - -### Changed - -* The methods of `Timer` are no longer static -* `Timer::stop()` now returns a `Duration` value object - -### Removed - -* Functionality that is now implemented in `Duration` and `ResourceUsageFormatter` has been removed from `Timer` - -## [3.1.4] - 2020-04-20 - -### Changed - -* `Timer::timeSinceStartOfRequest()` no longer tries `$_SERVER['REQUEST_TIME']` when `$_SERVER['REQUEST_TIME_FLOAT']` is not available (`$_SERVER['REQUEST_TIME_FLOAT']` was added in PHP 5.4 and this library requires PHP 7.3) -* Improved exception messages when `$_SERVER['REQUEST_TIME_FLOAT']` is not set or is not of type `float` - -### Changed - -## [3.1.3] - 2020-04-20 - -### Changed - -* `Timer::timeSinceStartOfRequest()` now raises an exception if `$_SERVER['REQUEST_TIME_FLOAT']` does not contain a `float` (or `$_SERVER['REQUEST_TIME']` does not contain an `int`) - -## [3.1.2] - 2020-04-17 - -### Changed - -* Improved the fix for [#30](https://github.com/sebastianbergmann/php-timer/issues/30) and restored usage of `hrtime()` - -## [3.1.1] - 2020-04-17 - -### Fixed - -* [#30](https://github.com/sebastianbergmann/php-timer/issues/30): Resolution of time returned by `Timer::stop()` is different than before (this reverts using `hrtime()` instead of `microtime()`) - -## [3.1.0] - 2020-04-17 - -### Added - -* `Timer::secondsToShortTimeString()` as alternative to `Timer::secondsToTimeString()` - -### Changed - -* `Timer::start()` and `Timer::stop()` now use `hrtime()` (high resolution monotonic timer) instead of `microtime()` -* `Timer::timeSinceStartOfRequest()` now uses `Timer::secondsToShortTimeString()` for time formatting -* Improved formatting of `Timer::secondsToTimeString()` result - -## [3.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -## [2.1.2] - 2019-06-07 - -### Fixed - -* [#21](https://github.com/sebastianbergmann/php-timer/pull/21): Formatting of memory consumption does not work on 32bit systems - -## [2.1.1] - 2019-02-20 - -### Changed - -* Improved formatting of memory consumption for `resourceUsage()` - -## [2.1.0] - 2019-02-20 - -### Changed - -* Improved formatting of memory consumption for `resourceUsage()` - -## [2.0.0] - 2018-02-01 - -### Changed - -* This component now uses namespaces - -### Removed - -* This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 - -[8.0.0]: https://github.com/sebastianbergmann/php-timer/compare/7.0...8.0.0 -[7.0.1]: https://github.com/sebastianbergmann/php-timer/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/php-timer/compare/6.0...7.0.0 -[6.0.0]: https://github.com/sebastianbergmann/php-timer/compare/5.0.3...6.0.0 -[5.0.3]: https://github.com/sebastianbergmann/php-timer/compare/5.0.2...5.0.3 -[5.0.2]: https://github.com/sebastianbergmann/php-timer/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/php-timer/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/php-timer/compare/4.0.0...5.0.0 -[4.0.0]: https://github.com/sebastianbergmann/php-timer/compare/3.1.4...4.0.0 -[3.1.4]: https://github.com/sebastianbergmann/php-timer/compare/3.1.3...3.1.4 -[3.1.3]: https://github.com/sebastianbergmann/php-timer/compare/3.1.2...3.1.3 -[3.1.2]: https://github.com/sebastianbergmann/php-timer/compare/3.1.1...3.1.2 -[3.1.1]: https://github.com/sebastianbergmann/php-timer/compare/3.1.0...3.1.1 -[3.1.0]: https://github.com/sebastianbergmann/php-timer/compare/3.0.0...3.1.0 -[3.0.0]: https://github.com/sebastianbergmann/php-timer/compare/2.1.2...3.0.0 -[2.1.2]: https://github.com/sebastianbergmann/php-timer/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/sebastianbergmann/php-timer/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/sebastianbergmann/php-timer/compare/2.0.0...2.1.0 -[2.0.0]: https://github.com/sebastianbergmann/php-timer/compare/1.0.9...2.0.0 diff --git a/vendor/phpunit/php-timer/LICENSE b/vendor/phpunit/php-timer/LICENSE deleted file mode 100644 index fd52ce61..00000000 --- a/vendor/phpunit/php-timer/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2010-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-timer/README.md b/vendor/phpunit/php-timer/README.md deleted file mode 100644 index bc9157c3..00000000 --- a/vendor/phpunit/php-timer/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# phpunit/php-timer - -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-timer/v)](https://packagist.org/packages/phpunit/php-timer) -[![CI Status](https://github.com/sebastianbergmann/php-timer/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-timer/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/php-timer/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-timer) - -Utility class for timing things, factored out of PHPUnit into a stand-alone component. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require phpunit/php-timer -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev phpunit/php-timer -``` - -## Usage - -### Basic Timing - -```php -require __DIR__ . '/vendor/autoload.php'; - -use SebastianBergmann\Timer\Timer; - -$timer = new Timer; - -$timer->start(); - -foreach (\range(0, 100000) as $i) { - // ... -} - -$duration = $timer->stop(); - -var_dump(get_class($duration)); -var_dump($duration->asString()); -var_dump($duration->asSeconds()); -var_dump($duration->asMilliseconds()); -var_dump($duration->asMicroseconds()); -var_dump($duration->asNanoseconds()); -``` - -The code above yields the output below: - -``` -string(32) "SebastianBergmann\Timer\Duration" -string(9) "00:00.002" -float(0.002851062) -float(2.851062) -float(2851.062) -int(2851062) -``` - -### Resource Consumption - -#### Explicit duration - -```php -require __DIR__ . '/vendor/autoload.php'; - -use SebastianBergmann\Timer\ResourceUsageFormatter; -use SebastianBergmann\Timer\Timer; - -$timer = new Timer; -$timer->start(); - -foreach (\range(0, 100000) as $i) { - // ... -} - -print (new ResourceUsageFormatter)->resourceUsage($timer->stop()); -``` - -The code above yields the output below: - -``` -Time: 00:00.002, Memory: 6.00 MB -``` - -#### Duration since PHP Startup (using unreliable `$_SERVER['REQUEST_TIME_FLOAT']`) - -```php -require __DIR__ . '/vendor/autoload.php'; - -use SebastianBergmann\Timer\ResourceUsageFormatter; - -foreach (\range(0, 100000) as $i) { - // ... -} - -print (new ResourceUsageFormatter)->resourceUsageSinceStartOfRequest(); -``` - -The code above yields the output below: - -``` -Time: 00:00.002, Memory: 6.00 MB -``` diff --git a/vendor/phpunit/php-timer/SECURITY.md b/vendor/phpunit/php-timer/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/phpunit/php-timer/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/phpunit/php-timer/composer.json b/vendor/phpunit/php-timer/composer.json deleted file mode 100644 index 89c39842..00000000 --- a/vendor/phpunit/php-timer/composer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "phpunit/php-timer", - "description": "Utility class for timing", - "type": "library", - "keywords": [ - "timer" - ], - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - } -} - diff --git a/vendor/phpunit/php-timer/src/Duration.php b/vendor/phpunit/php-timer/src/Duration.php deleted file mode 100644 index 1ab58b4e..00000000 --- a/vendor/phpunit/php-timer/src/Duration.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use function floor; -use function sprintf; - -/** - * @immutable - */ -final readonly class Duration -{ - private float $nanoseconds; - private int $hours; - private int $minutes; - private int $seconds; - private int $milliseconds; - - public static function fromMicroseconds(float $microseconds): self - { - return new self($microseconds * 1000); - } - - public static function fromNanoseconds(float $nanoseconds): self - { - return new self($nanoseconds); - } - - private function __construct(float $nanoseconds) - { - $this->nanoseconds = $nanoseconds; - $timeInMilliseconds = $nanoseconds / 1000000; - $hours = floor($timeInMilliseconds / 60 / 60 / 1000); - $hoursInMilliseconds = $hours * 60 * 60 * 1000; - $minutes = floor($timeInMilliseconds / 60 / 1000) % 60; - $minutesInMilliseconds = $minutes * 60 * 1000; - $seconds = floor(($timeInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1000); - $secondsInMilliseconds = $seconds * 1000; - $milliseconds = $timeInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds - $secondsInMilliseconds; - $this->hours = (int) $hours; - $this->minutes = $minutes; - $this->seconds = (int) $seconds; - $this->milliseconds = (int) $milliseconds; - } - - public function asNanoseconds(): float - { - return $this->nanoseconds; - } - - public function asMicroseconds(): float - { - return $this->nanoseconds / 1000; - } - - public function asMilliseconds(): float - { - return $this->nanoseconds / 1000000; - } - - public function asSeconds(): float - { - return $this->nanoseconds / 1000000000; - } - - public function asString(): string - { - $result = ''; - - if ($this->hours > 0) { - $result = sprintf('%02d', $this->hours) . ':'; - } - - $result .= sprintf('%02d', $this->minutes) . ':'; - $result .= sprintf('%02d', $this->seconds); - - if ($this->milliseconds > 0) { - $result .= '.' . sprintf('%03d', $this->milliseconds); - } - - return $result; - } -} diff --git a/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php b/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php deleted file mode 100644 index f797bc03..00000000 --- a/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use function is_float; -use function memory_get_peak_usage; -use function microtime; -use function sprintf; - -final class ResourceUsageFormatter -{ - /** - * @var array - */ - private const array SIZES = [ - 'GB' => 1073741824, - 'MB' => 1048576, - 'KB' => 1024, - ]; - - public function resourceUsage(Duration $duration): string - { - return sprintf( - 'Time: %s, Memory: %s', - $duration->asString(), - $this->bytesToString(memory_get_peak_usage(true)), - ); - } - - /** - * @throws TimeSinceStartOfRequestNotAvailableException - */ - public function resourceUsageSinceStartOfRequest(): string - { - if (!isset($_SERVER['REQUEST_TIME_FLOAT'])) { - throw new TimeSinceStartOfRequestNotAvailableException( - 'Cannot determine time at which the request started because $_SERVER[\'REQUEST_TIME_FLOAT\'] is not available', - ); - } - - if (!is_float($_SERVER['REQUEST_TIME_FLOAT'])) { - throw new TimeSinceStartOfRequestNotAvailableException( - 'Cannot determine time at which the request started because $_SERVER[\'REQUEST_TIME_FLOAT\'] is not of type float', - ); - } - - return $this->resourceUsage( - Duration::fromMicroseconds( - (1000000 * (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'])), - ), - ); - } - - private function bytesToString(int $bytes): string - { - foreach (self::SIZES as $unit => $value) { - if ($bytes >= $value) { - return sprintf('%.2f %s', $bytes / $value, $unit); - } - } - - // @codeCoverageIgnoreStart - return $bytes . ' byte' . ($bytes !== 1 ? 's' : ''); - // @codeCoverageIgnoreEnd - } -} diff --git a/vendor/phpunit/php-timer/src/Timer.php b/vendor/phpunit/php-timer/src/Timer.php deleted file mode 100644 index d59eef63..00000000 --- a/vendor/phpunit/php-timer/src/Timer.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use function array_pop; -use function hrtime; - -final class Timer -{ - /** - * @var list - */ - private array $startTimes = []; - - public function start(): void - { - $this->startTimes[] = (float) hrtime(true); - } - - /** - * @throws NoActiveTimerException - */ - public function stop(): Duration - { - if (empty($this->startTimes)) { - throw new NoActiveTimerException( - 'Timer::start() has to be called before Timer::stop()', - ); - } - - return Duration::fromNanoseconds((float) hrtime(true) - array_pop($this->startTimes)); - } -} diff --git a/vendor/phpunit/php-timer/src/exceptions/Exception.php b/vendor/phpunit/php-timer/src/exceptions/Exception.php deleted file mode 100644 index 996da086..00000000 --- a/vendor/phpunit/php-timer/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/php-timer/src/exceptions/NoActiveTimerException.php b/vendor/phpunit/php-timer/src/exceptions/NoActiveTimerException.php deleted file mode 100644 index 40fe45e8..00000000 --- a/vendor/phpunit/php-timer/src/exceptions/NoActiveTimerException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use LogicException; - -final class NoActiveTimerException extends LogicException implements Exception -{ -} diff --git a/vendor/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php b/vendor/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php deleted file mode 100644 index a2d94ce8..00000000 --- a/vendor/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Timer; - -use RuntimeException; - -final class TimeSinceStartOfRequestNotAvailableException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/ChangeLog-12.4.md b/vendor/phpunit/phpunit/ChangeLog-12.4.md deleted file mode 100644 index 9dacecaa..00000000 --- a/vendor/phpunit/phpunit/ChangeLog-12.4.md +++ /dev/null @@ -1,26 +0,0 @@ -# Changes in PHPUnit 12.4 - -All notable changes of the PHPUnit 12.4 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [12.4.1] - 2025-10-09 - -### Fixed - -* [#6364](https://github.com/sebastianbergmann/phpunit/issues/6364): `--filter` format used by PhpStorm stopped working -* [#6378](https://github.com/sebastianbergmann/phpunit/issues/6378): Wrong method name passed to `DataProviderMethodCalled` event value object - -## [12.4.0] - 2025-10-03 - -### Added - -* [#6277](https://github.com/sebastianbergmann/phpunit/issues/6277): Allow tests to opt out of the validation that a data provider method does not provide data sets with more values than a test method accepts -* [#6341](https://github.com/sebastianbergmann/phpunit/pull/6341): Support for regular expressions with `#[IgnoreDeprecations]` attribute -* [#6354](https://github.com/sebastianbergmann/phpunit/issues/6354): Invokable constraints - -### Deprecated - -* [#6284](https://github.com/sebastianbergmann/phpunit/issues/6284): `#[RunClassInSeparateProcess]` attribute -* [#6355](https://github.com/sebastianbergmann/phpunit/issues/6355): Support for version constraint string argument without explicit version comparison operator - -[12.4.1]: https://github.com/sebastianbergmann/phpunit/compare/12.4.0...12.4.1 -[12.4.0]: https://github.com/sebastianbergmann/phpunit/compare/12.3.15...12.4.0 diff --git a/vendor/phpunit/phpunit/DEPRECATIONS.md b/vendor/phpunit/phpunit/DEPRECATIONS.md deleted file mode 100644 index 0dd23e55..00000000 --- a/vendor/phpunit/phpunit/DEPRECATIONS.md +++ /dev/null @@ -1,53 +0,0 @@ -# Deprecations - -## Soft Deprecations - -This functionality is currently [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation): - -### Extending PHPUnit - -| Issue | Description | Since | Replacement | -|-------------------------------------------------------------------|---------------------------------------------|--------|-------------------------------------------------| -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `AfterTestMethodCalled::testClassName()` | 12.1.0 | `AfterTestMethodCalled::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `AfterTestMethodErrored::testClassName()` | 12.1.0 | `AfterTestMethodErrored::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `AfterTestMethodFinished::testClassName()` | 12.1.0 | `AfterTestMethodFinished::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `BeforeTestMethodCalled::testClassName()` | 12.1.0 | `BeforeTestMethodCalled::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `BeforeTestMethodErrored::testClassName()` | 12.1.0 | `BeforeTestMethodErrored::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `BeforeTestMethodFinished::testClassName()` | 12.1.0 | `BeforeTestMethodFinished::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PreConditionCalled::testClassName()` | 12.1.0 | `PreConditionCalled::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PreConditionErrored::testClassName()` | 12.1.0 | `PreConditionErrored::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PreConditionFinished::testClassName()` | 12.1.0 | `PreConditionFinished::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PostConditionCalled::testClassName()` | 12.1.0 | `PostConditionCalled::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PostConditionErrored::testClassName()` | 12.1.0 | `PostConditionErrored::test()->className()` | -| [#6140](https://github.com/sebastianbergmann/phpunit/issues/6140) | `PostConditionFinished::testClassName()` | 12.1.0 | `PostConditionFinished::test()->className()` | -| [#6229](https://github.com/sebastianbergmann/phpunit/issues/6229) | `Configuration::includeTestSuite()` | 12.3.0 | `Configuration::includeTestSuites()` | -| [#6229](https://github.com/sebastianbergmann/phpunit/issues/6229) | `Configuration::excludeTestSuite()` | 12.3.0 | `Configuration::excludeTestSuites()` | - -## Hard Deprecations - -This functionality is currently [hard-deprecated](https://phpunit.de/backward-compatibility.html#hard-deprecation): - -### Writing Tests - -#### Assertions, Constraints, and Expectations - -| Issue | Description | Since | Replacement | -|-------------------------------------------------------------------|------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [#6052](https://github.com/sebastianbergmann/phpunit/issues/6052) | `Assert::isType()` | 11.5.0 | Use `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNull()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, or `isString()` instead | -| [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055) | `Assert::assertContainsOnly()` | 11.5.0 | Use `assertContainsOnlyArray()`, `assertContainsOnlyBool()`, `assertContainsOnlyCallable()`, `assertContainsOnlyFloat()`, `assertContainsOnlyInt()`, `assertContainsOnlyIterable()`, `assertContainsOnlyNumeric()`, `assertContainsOnlyObject()`, `assertContainsOnlyResource()`, `assertContainsOnlyClosedResource()`, `assertContainsOnlyScalar()`, or `assertContainsOnlyString()` instead | -| [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055) | `Assert::assertNotContainsOnly()` | 11.5.0 | Use `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, or `assertContainsNotOnlyString()` instead | -| [#6059](https://github.com/sebastianbergmann/phpunit/issues/6059) | `Assert::containsOnly()` | 11.5.0 | Use `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, or `containsOnlyString()` instead | - -### Attributes - -| Issue | Description | Since | Replacement | -|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------|--------|----------------------------------------------| -| [#6246](https://github.com/sebastianbergmann/phpunit/issues/6246) | Using `#[CoversNothing]` on a test method | 12.3.0 | | -| [#6284](https://github.com/sebastianbergmann/phpunit/issues/6284) | Using `#[RunClassInSeparateProcess]` on a test class | 12.4.0 | Use `#[RunTestsInSeparateProcesses]` instead | -| [#6355](https://github.com/sebastianbergmann/phpunit/issues/6355) | Support for version constraint string argument without explicit version comparison operator | 12.4.0 | | - -### Running Tests - -| Issue | Description | Since | Replacement | -|-------------------------------------------------------------------|------------------------------------------|--------|--------------------------------------------------------| -| [#6240](https://github.com/sebastianbergmann/phpunit/issues/6240) | `--dont-report-useless-tests` CLI option | 12.2.3 | Use `--do-not-report-useless-tests` CLI option instead | diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE deleted file mode 100644 index b687f39a..00000000 --- a/vendor/phpunit/phpunit/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2001-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md deleted file mode 100644 index 189d75f8..00000000 --- a/vendor/phpunit/phpunit/README.md +++ /dev/null @@ -1,109 +0,0 @@ -[![PHPUnit](.github/img/phpunit.svg)](https://phpunit.de/?ref=github) - -[![CI Status](https://github.com/sebastianbergmann/phpunit/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/phpunit/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/phpunit/branch/main/graph/badge.svg?token=0yzBUK8Wri)](https://codecov.io/gh/sebastianbergmann/phpunit) -[![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit/v)](https://packagist.org/packages/phpunit/phpunit) -[![Total Downloads](https://poser.pugx.org/phpunit/phpunit/downloads)](https://packagist.org/packages/phpunit/phpunit/stats) -[![Monthly Downloads](https://poser.pugx.org/phpunit/phpunit/d/monthly)](https://packagist.org/packages/phpunit/phpunit/stats) -[![Daily Downloads](https://poser.pugx.org/phpunit/phpunit/d/daily)](https://packagist.org/packages/phpunit/phpunit/stats) - -# PHPUnit - -PHPUnit is a programmer-oriented testing framework for PHP. -It is an instance of the xUnit architecture for unit testing frameworks. - -## Installation - -We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required dependencies of PHPUnit bundled in a single file: - -```bash -$ wget https://phar.phpunit.de/phpunit-X.Y.phar - -$ php phpunit-X.Y.phar --version -``` - -Please replace `X.Y` with the version of PHPUnit you are interested in. - -Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. -Please refer to the [documentation](https://phpunit.de/documentation.html?ref=github) for details on how to install PHPUnit. - -## Contribute - -Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/main/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. - -A big "Thank you!" to everyone who has contributed to PHPUnit! -You can find a detailed list of contributors on every PHPUnit related package on GitHub. - -Here is a list of all components that are primarily developed and maintained by [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github): - -* [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) -* [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) -* [phpunit/php-file-iterator](https://github.com/sebastianbergmann/php-file-iterator) -* [phpunit/php-invoker](https://github.com/sebastianbergmann/php-invoker) -* [phpunit/php-text-template](https://github.com/sebastianbergmann/php-text-template) -* [phpunit/php-timer](https://github.com/sebastianbergmann/php-timer) -* [sebastian/cli-parser](https://github.com/sebastianbergmann/cli-parser) -* [sebastian/comparator](https://github.com/sebastianbergmann/comparator) -* [sebastian/complexity](https://github.com/sebastianbergmann/complexity) -* [sebastian/diff](https://github.com/sebastianbergmann/diff) -* [sebastian/environment](https://github.com/sebastianbergmann/environment) -* [sebastian/exporter](https://github.com/sebastianbergmann/exporter) -* [sebastian/global-state](https://github.com/sebastianbergmann/global-state) -* [sebastian/lines-of-code](https://github.com/sebastianbergmann/lines-of-code) -* [sebastian/object-enumerator](https://github.com/sebastianbergmann/object-enumerator) -* [sebastian/object-reflector](https://github.com/sebastianbergmann/object-reflector) -* [sebastian/recursion-context](https://github.com/sebastianbergmann/recursion-context) -* [sebastian/type](https://github.com/sebastianbergmann/type) -* [sebastian/version](https://github.com/sebastianbergmann/version) - -A very special thanks to everyone who has contributed to the [PHPUnit Manual](https://github.com/sebastianbergmann/phpunit-documentation-english). - -In addition to the components listed above, PHPUnit depends on the components listed below: - -* [myclabs/deep-copy](https://github.com/myclabs/DeepCopy) -* [nikic/php-parser](https://github.com/nikic/php-parser) -* [phar-io/manifest](https://github.com/phar-io/manifest) -* [phar-io/version](https://github.com/phar-io/version) -* [staabm/side-effects-detector](https://github.com/staabm/side-effects-detector) -* [theseer/tokenizer](https://github.com/theseer/tokenizer) - -These tools are used to develop PHPUnit: - -* [Composer](https://getcomposer.org/) -* [Phive](https://phar.io/) -* [PHP Autoload Builder](https://github.com/theseer/Autoload/) -* [PHP-CS-Fixer](https://cs.symfony.com/) -* [PHP-Scoper](https://github.com/humbug/php-scoper) -* [PHPStan](https://phpstan.org/) - -## Sponsors - -It has taken [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github) thousands of hours to develop, test, and support PHPUnit. -[**You can sponsor his Open Source work through GitHub Sponsors**](https://github.com/sponsors/sebastianbergmann), for example. - -These businesses support Sebastian Bergmann's work on PHPUnit: - - - - - - - - - - - - - - - - - - -
          Bubble Shooterin2it vofLambdaTest
          RoaveTestmo GmbHTideways GmbH
          TYPO3 GmbHVEMA Versicherungsmakler Genossenschaft eG
          - -Would you like to see your logo here as well as on the [PHPUnit website](https://phpunit.de/sponsors.html?ref=github)? -Contact Sebastian Bergmann at [sponsoring@phpunit.de](mailto:sponsoring@phpunit.de) to learn more about how you can support his work on PHPUnit. - -Whether you are a CEO, CFO, CTO, or a developer: your company surely depends on Open Source software. -[It is time to pay your share](https://opensourcepledge.com/) and support maintainers like [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github). diff --git a/vendor/phpunit/phpunit/SECURITY.md b/vendor/phpunit/phpunit/SECURITY.md deleted file mode 100644 index 5f55c419..00000000 --- a/vendor/phpunit/phpunit/SECURITY.md +++ /dev/null @@ -1,33 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in PHPUnit, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -PHPUnit is a framework for writing as well as a command-line tool for running tests. Writing and running tests is a development-time activity. There is no reason why PHPUnit should be installed on a webserver and/or in a production environment. - -**If you upload PHPUnit to a webserver then your deployment process is broken. On a more general note, if your `vendor` directory is publicly accessible on your webserver then your deployment process is also broken.** - -Please note that if you upload PHPUnit to a webserver "bad things" may happen. [You have been warned.](https://thephp.cc/articles/phpunit-a-security-risk?ref=phpunit) - -PHPUnit is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using PHPUnit in an HTTP or web context or with untrusted input data is performed. PHPUnit might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If PHPUnit is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json deleted file mode 100644 index cd01d969..00000000 --- a/vendor/phpunit/phpunit/composer.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "phpunit/phpunit", - "description": "The PHP Unit Testing framework.", - "type": "library", - "keywords": [ - "phpunit", - "xunit", - "testing" - ], - "homepage": "https://phpunit.de/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "phpunit/php-code-coverage": "^12.4.0", - "phpunit/php-file-iterator": "^6.0.0", - "phpunit/php-invoker": "^6.0.0", - "phpunit/php-text-template": "^5.0.0", - "phpunit/php-timer": "^8.0.0", - "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.3", - "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.3", - "sebastian/exporter": "^7.0.2", - "sebastian/global-state": "^8.0.2", - "sebastian/object-enumerator": "^7.0.0", - "sebastian/type": "^6.0.3", - "sebastian/version": "^6.0.0", - "staabm/side-effects-detector": "^1.0.5" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "classmap-authoritative": true, - "optimize-autoloader": true, - "sort-packages": true - }, - "bin": [ - "phpunit" - ], - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_files" - ], - "files": [ - "tests/_files/deprecation-trigger/trigger_deprecation.php", - "tests/unit/Event/AbstractEventTestCase.php", - "tests/unit/TextUI/AbstractSouceFilterTestCase.php", - "tests/unit/Framework/MockObject/TestDoubleTestCase.php", - "tests/unit/Metadata/Parser/AttributeParserTestCase.php", - "tests/unit/Framework/Assert/assertContainsOnlyArrayTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyBoolTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyCallableTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyFloatTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyInstancesOfTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyIntTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyIterableTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyNullTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyNumericTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyObjectTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyResourceTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyClosedResourceTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyScalarTest.php", - "tests/unit/Framework/Assert/assertContainsOnlyStringTest.php", - "tests/unit/Framework/Assert/assertDirectoryExistsTest.php", - "tests/unit/Framework/Assert/assertFileExistsTest.php", - "tests/unit/Framework/Assert/assertIsNumericTest.php", - "tests/unit/Framework/Assert/assertIsObjectTest.php", - "tests/unit/Framework/Assert/assertIsReadableTest.php", - "tests/unit/Framework/Assert/assertIsResourceTest.php", - "tests/unit/Framework/Assert/assertIsScalarTest.php", - "tests/unit/Framework/Assert/assertIsStringTest.php", - "tests/unit/Framework/Assert/assertIsWritableTest.php", - "tests/unit/Framework/Assert/assertMatchesRegularExpressionTest.php", - "tests/unit/Framework/Assert/assertNullTest.php", - "tests/unit/Framework/Assert/assertSameSizeTest.php", - "tests/unit/Framework/Assert/assertSameTest.php", - "tests/_files/CoveredFunction.php", - "tests/_files/Generator.php", - "tests/_files/NamespaceCoveredFunction.php", - "tests/end-to-end/_files/listing-tests-and-groups/ExampleAbstractTestCase.php" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "12.4-dev" - } - } -} diff --git a/vendor/phpunit/phpunit/composer.lock b/vendor/phpunit/phpunit/composer.lock deleted file mode 100644 index 5ecdc572..00000000 --- a/vendor/phpunit/phpunit/composer.lock +++ /dev/null @@ -1,1599 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "348d5216685bebd9b47e9a0f2fd6b0f5", - "packages": [ - { - "name": "myclabs/deep-copy", - "version": "1.13.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2025-08-01T08:46:24+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" - }, - "time": "2025-08-13T20:13:15+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "12.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "reference": "67e8aed88f93d0e6e1cb7effe1a2dfc2fee6022c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^5.6.1", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0", - "phpunit/php-text-template": "^5.0", - "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.0.3", - "sebastian/lines-of-code": "^4.0", - "sebastian/version": "^6.0", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.3.7" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "12.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.4.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", - "type": "tidelift" - } - ], - "time": "2025-09-24T13:44:41+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/961bc913d42fe24a257bfff826a5068079ac7782", - "reference": "961bc913d42fe24a257bfff826a5068079ac7782", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:37+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:58+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:59:16+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "8.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:59:38+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", - "type": "tidelift" - } - ], - "time": "2025-09-14T09:36:45+00:00" - }, - { - "name": "sebastian/comparator", - "version": "7.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dc904b4bb3ab070865fa4068cd84f3da8b945148", - "reference": "dc904b4bb3ab070865fa4068cd84f3da8b945148", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.2" - }, - "suggest": { - "ext-bcmath": "For comparing BcMath\\Number objects" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", - "type": "tidelift" - } - ], - "time": "2025-08-20T11:27:00+00:00" - }, - { - "name": "sebastian/complexity", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:55:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "7.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:55:46+00:00" - }, - { - "name": "sebastian/environment", - "version": "8.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "https://github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", - "type": "tidelift" - } - ], - "time": "2025-08-12T14:11:56+00:00" - }, - { - "name": "sebastian/exporter", - "version": "7.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", - "type": "tidelift" - } - ], - "time": "2025-09-24T06:16:11+00:00" - }, - { - "name": "sebastian/global-state", - "version": "8.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", - "type": "tidelift" - } - ], - "time": "2025-08-29T11:29:25+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:57:28+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "7.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "shasum": "" - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:57:48+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "5.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T04:58:17+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "7.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", - "type": "tidelift" - } - ], - "time": "2025-08-13T04:44:59+00:00" - }, - { - "name": "sebastian/type", - "version": "6.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/sebastian/type", - "type": "tidelift" - } - ], - "time": "2025-08-09T06:57:12+00:00" - }, - { - "name": "sebastian/version", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2025-02-07T05:00:38+00:00" - }, - { - "name": "staabm/side-effects-detector", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/staabm/side-effects-detector.git", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", - "reference": "d8334211a140ce329c13726d4a715adbddd0a163", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.6", - "phpunit/phpunit": "^9.6.21", - "symfony/var-dumper": "^5.4.43", - "tomasvotruba/type-coverage": "1.0.0", - "tomasvotruba/unused-public": "1.0.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A static analysis tool to detect side effects in PHP code", - "keywords": [ - "static analysis" - ], - "support": { - "issues": "https://github.com/staabm/side-effects-detector/issues", - "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" - }, - "funding": [ - { - "url": "https://github.com/staabm", - "type": "github" - } - ], - "time": "2024-10-20T05:08:20+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": {}, - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=8.3", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*" - }, - "platform-dev": {}, - "platform-overrides": { - "php": "8.3.0" - }, - "plugin-api-version": "2.6.0" -} diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit deleted file mode 100644 index 84afaf14..00000000 --- a/vendor/phpunit/phpunit/phpunit +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (!version_compare(PHP_VERSION, PHP_VERSION, '=')) { - fwrite( - STDERR, - sprintf( - '%s declares an invalid value for PHP_VERSION.' . PHP_EOL . - 'This breaks fundamental functionality such as version_compare().' . PHP_EOL . - 'Please use a different PHP interpreter.' . PHP_EOL, - - PHP_BINARY - ) - ); - - die(1); -} - -if (version_compare('8.3.0', PHP_VERSION, '>')) { - fwrite( - STDERR, - sprintf( - 'This version of PHPUnit requires PHP >= 8.3.' . PHP_EOL . - 'You are using PHP %s (%s).' . PHP_EOL, - PHP_VERSION, - PHP_BINARY - ) - ); - - die(1); -} - -if (!ini_get('date.timezone')) { - ini_set('date.timezone', 'UTC'); -} - -if (isset($GLOBALS['_composer_autoload_path'])) { - define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']); - - unset($GLOBALS['_composer_autoload_path']); -} else { - foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) { - if (file_exists($file)) { - define('PHPUNIT_COMPOSER_INSTALL', $file); - - break; - } - } - - unset($file); -} - -if (!defined('PHPUNIT_COMPOSER_INSTALL')) { - fwrite( - STDERR, - 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL . - ' composer install' . PHP_EOL . PHP_EOL . - 'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL - ); - - die(1); -} - -require PHPUNIT_COMPOSER_INSTALL; - -$requiredExtensions = ['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter']; - -$unavailableExtensions = array_filter( - $requiredExtensions, - static function ($extension) { - return !extension_loaded($extension); - } -); - -// Workaround for https://github.com/sebastianbergmann/phpunit/issues/5662 -if (!function_exists('ctype_alnum')) { - $unavailableExtensions[] = 'ctype'; -} - -if ([] !== $unavailableExtensions) { - fwrite( - STDERR, - sprintf( - 'PHPUnit requires the "%s" extensions, but the "%s" %s not available.' . PHP_EOL, - implode('", "', $requiredExtensions), - implode('", "', $unavailableExtensions), - count($unavailableExtensions) === 1 ? 'extension is' : 'extensions are' - ) - ); - - die(1); -} - -unset($requiredExtensions, $unavailableExtensions); - -exit((new PHPUnit\TextUI\Application)->run($_SERVER['argv'])); diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd deleted file mode 100644 index 8a7ce622..00000000 --- a/vendor/phpunit/phpunit/phpunit.xsd +++ /dev/null @@ -1,348 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.4 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.0.xsd b/vendor/phpunit/phpunit/schema/10.0.xsd deleted file mode 100644 index 480d54de..00000000 --- a/vendor/phpunit/phpunit/schema/10.0.xsd +++ /dev/null @@ -1,284 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.0 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.1.xsd b/vendor/phpunit/phpunit/schema/10.1.xsd deleted file mode 100644 index 1b190c21..00000000 --- a/vendor/phpunit/phpunit/schema/10.1.xsd +++ /dev/null @@ -1,312 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.1 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.2.xsd b/vendor/phpunit/phpunit/schema/10.2.xsd deleted file mode 100644 index 269b7a3a..00000000 --- a/vendor/phpunit/phpunit/schema/10.2.xsd +++ /dev/null @@ -1,319 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.2 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.3.xsd b/vendor/phpunit/phpunit/schema/10.3.xsd deleted file mode 100644 index 03a54ee0..00000000 --- a/vendor/phpunit/phpunit/schema/10.3.xsd +++ /dev/null @@ -1,321 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.3 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.4.xsd b/vendor/phpunit/phpunit/schema/10.4.xsd deleted file mode 100644 index bd22b2ca..00000000 --- a/vendor/phpunit/phpunit/schema/10.4.xsd +++ /dev/null @@ -1,322 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.4 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/10.5.xsd b/vendor/phpunit/phpunit/schema/10.5.xsd deleted file mode 100644 index 284820b0..00000000 --- a/vendor/phpunit/phpunit/schema/10.5.xsd +++ /dev/null @@ -1,327 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 10.5 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.0.xsd b/vendor/phpunit/phpunit/schema/11.0.xsd deleted file mode 100644 index a6e7cb8c..00000000 --- a/vendor/phpunit/phpunit/schema/11.0.xsd +++ /dev/null @@ -1,323 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.0 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.1.xsd b/vendor/phpunit/phpunit/schema/11.1.xsd deleted file mode 100644 index 6172e834..00000000 --- a/vendor/phpunit/phpunit/schema/11.1.xsd +++ /dev/null @@ -1,333 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.1 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.2.xsd b/vendor/phpunit/phpunit/schema/11.2.xsd deleted file mode 100644 index d7c7dcac..00000000 --- a/vendor/phpunit/phpunit/schema/11.2.xsd +++ /dev/null @@ -1,331 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.2 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.3.xsd b/vendor/phpunit/phpunit/schema/11.3.xsd deleted file mode 100644 index 3b30de4d..00000000 --- a/vendor/phpunit/phpunit/schema/11.3.xsd +++ /dev/null @@ -1,335 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.3 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.4.xsd b/vendor/phpunit/phpunit/schema/11.4.xsd deleted file mode 100644 index 52db3630..00000000 --- a/vendor/phpunit/phpunit/schema/11.4.xsd +++ /dev/null @@ -1,334 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.4 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/11.5.xsd b/vendor/phpunit/phpunit/schema/11.5.xsd deleted file mode 100644 index ec022711..00000000 --- a/vendor/phpunit/phpunit/schema/11.5.xsd +++ /dev/null @@ -1,339 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.5 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/12.0.xsd b/vendor/phpunit/phpunit/schema/12.0.xsd deleted file mode 100644 index c993640f..00000000 --- a/vendor/phpunit/phpunit/schema/12.0.xsd +++ /dev/null @@ -1,335 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.0 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/12.1.xsd b/vendor/phpunit/phpunit/schema/12.1.xsd deleted file mode 100644 index 51f225d4..00000000 --- a/vendor/phpunit/phpunit/schema/12.1.xsd +++ /dev/null @@ -1,339 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.1 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/12.2.xsd b/vendor/phpunit/phpunit/schema/12.2.xsd deleted file mode 100644 index 9303b643..00000000 --- a/vendor/phpunit/phpunit/schema/12.2.xsd +++ /dev/null @@ -1,347 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.2 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/12.3.xsd b/vendor/phpunit/phpunit/schema/12.3.xsd deleted file mode 100644 index 73e7c214..00000000 --- a/vendor/phpunit/phpunit/schema/12.3.xsd +++ /dev/null @@ -1,348 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.3 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/8.5.xsd b/vendor/phpunit/phpunit/schema/8.5.xsd deleted file mode 100644 index 75e22289..00000000 --- a/vendor/phpunit/phpunit/schema/8.5.xsd +++ /dev/null @@ -1,319 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 8.5 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.0.xsd b/vendor/phpunit/phpunit/schema/9.0.xsd deleted file mode 100644 index 6db04c09..00000000 --- a/vendor/phpunit/phpunit/schema/9.0.xsd +++ /dev/null @@ -1,315 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.0 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.1.xsd b/vendor/phpunit/phpunit/schema/9.1.xsd deleted file mode 100644 index b10d30b4..00000000 --- a/vendor/phpunit/phpunit/schema/9.1.xsd +++ /dev/null @@ -1,317 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.0 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.2.xsd b/vendor/phpunit/phpunit/schema/9.2.xsd deleted file mode 100644 index d770e8b0..00000000 --- a/vendor/phpunit/phpunit/schema/9.2.xsd +++ /dev/null @@ -1,317 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.2 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.3.xsd b/vendor/phpunit/phpunit/schema/9.3.xsd deleted file mode 100644 index 638f663a..00000000 --- a/vendor/phpunit/phpunit/schema/9.3.xsd +++ /dev/null @@ -1,327 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.3 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.4.xsd b/vendor/phpunit/phpunit/schema/9.4.xsd deleted file mode 100644 index 75a91e83..00000000 --- a/vendor/phpunit/phpunit/schema/9.4.xsd +++ /dev/null @@ -1,328 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.4 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/schema/9.5.xsd b/vendor/phpunit/phpunit/schema/9.5.xsd deleted file mode 100644 index eabefac3..00000000 --- a/vendor/phpunit/phpunit/schema/9.5.xsd +++ /dev/null @@ -1,330 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.5 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/CollectingDispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/CollectingDispatcher.php deleted file mode 100644 index e3e9462e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/CollectingDispatcher.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use PHPUnit\Runner\DeprecationCollector\Facade as DeprecationCollector; -use PHPUnit\Runner\DeprecationCollector\TestTriggeredDeprecationSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CollectingDispatcher implements Dispatcher -{ - private EventCollection $events; - private DirectDispatcher $isolatedDirectDispatcher; - - public function __construct(DirectDispatcher $directDispatcher) - { - $this->isolatedDirectDispatcher = $directDispatcher; - $this->events = new EventCollection; - - $this->isolatedDirectDispatcher->registerSubscriber(new TestTriggeredDeprecationSubscriber(DeprecationCollector::collector())); - } - - public function dispatch(Event $event): void - { - $this->events->add($event); - - try { - $this->isolatedDirectDispatcher->dispatch($event); - } catch (UnknownEventTypeException) { - // Do nothing. - } - } - - public function flush(): EventCollection - { - $events = $this->events; - - $this->events = new EventCollection; - - return $events; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php deleted file mode 100644 index 6895facb..00000000 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/DeferringDispatcher.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DeferringDispatcher implements SubscribableDispatcher -{ - private readonly SubscribableDispatcher $dispatcher; - private EventCollection $events; - private bool $recording = true; - - public function __construct(SubscribableDispatcher $dispatcher) - { - $this->dispatcher = $dispatcher; - $this->events = new EventCollection; - } - - public function registerTracer(Tracer\Tracer $tracer): void - { - $this->dispatcher->registerTracer($tracer); - } - - public function registerSubscriber(Subscriber $subscriber): void - { - $this->dispatcher->registerSubscriber($subscriber); - } - - public function dispatch(Event $event): void - { - if ($this->recording) { - $this->events->add($event); - - return; - } - - $this->dispatcher->dispatch($event); - } - - public function flush(): void - { - $this->recording = false; - - foreach ($this->events as $event) { - $this->dispatcher->dispatch($event); - } - - $this->events = new EventCollection; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php deleted file mode 100644 index b5cbc8e3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use const PHP_EOL; -use function array_key_exists; -use function dirname; -use function sprintf; -use function str_starts_with; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DirectDispatcher implements SubscribableDispatcher -{ - private readonly TypeMap $typeMap; - - /** - * @var array> - */ - private array $subscribers = []; - - /** - * @var list - */ - private array $tracers = []; - - public function __construct(TypeMap $map) - { - $this->typeMap = $map; - } - - public function registerTracer(Tracer\Tracer $tracer): void - { - $this->tracers[] = $tracer; - } - - /** - * @throws MapError - * @throws UnknownSubscriberTypeException - */ - public function registerSubscriber(Subscriber $subscriber): void - { - if (!$this->typeMap->isKnownSubscriberType($subscriber)) { - throw new UnknownSubscriberTypeException( - sprintf( - 'Subscriber "%s" does not implement any known interface - did you forget to register it?', - $subscriber::class, - ), - ); - } - - $eventClassName = $this->typeMap->map($subscriber); - - if (!array_key_exists($eventClassName, $this->subscribers)) { - $this->subscribers[$eventClassName] = []; - } - - $this->subscribers[$eventClassName][] = $subscriber; - } - - /** - * @throws Throwable - * @throws UnknownEventTypeException - */ - public function dispatch(Event $event): void - { - $eventClassName = $event::class; - - if (!$this->typeMap->isKnownEventType($event)) { - throw new UnknownEventTypeException( - sprintf( - 'Unknown event type "%s"', - $eventClassName, - ), - ); - } - - foreach ($this->tracers as $tracer) { - try { - $tracer->trace($event); - // @codeCoverageIgnoreStart - } catch (Throwable $t) { - $this->handleThrowable($t); - } - // @codeCoverageIgnoreEnd - } - - if (!array_key_exists($eventClassName, $this->subscribers)) { - return; - } - - foreach ($this->subscribers[$eventClassName] as $subscriber) { - try { - /** @phpstan-ignore method.notFound */ - $subscriber->notify($event); - } catch (Throwable $t) { - $this->handleThrowable($t); - } - } - } - - /** - * @throws Throwable - */ - public function handleThrowable(Throwable $t): void - { - if ($this->isThrowableFromThirdPartySubscriber($t)) { - Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Exception in third-party event subscriber: %s%s%s', - $t->getMessage(), - PHP_EOL, - $t->getTraceAsString(), - ), - ); - - return; - } - - // @codeCoverageIgnoreStart - throw $t; - // @codeCoverageIgnoreEnd - } - - private function isThrowableFromThirdPartySubscriber(Throwable $t): bool - { - return !str_starts_with($t->getFile(), dirname(__DIR__, 2)); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/Dispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/Dispatcher.php deleted file mode 100644 index e7086539..00000000 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/Dispatcher.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Dispatcher -{ - /** - * @throws UnknownEventTypeException - */ - public function dispatch(Event $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/SubscribableDispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/SubscribableDispatcher.php deleted file mode 100644 index c4393da1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/SubscribableDispatcher.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface SubscribableDispatcher extends Dispatcher -{ - /** - * @throws UnknownSubscriberTypeException - */ - public function registerSubscriber(Subscriber $subscriber): void; - - public function registerTracer(Tracer\Tracer $tracer): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php deleted file mode 100644 index bf18513d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php +++ /dev/null @@ -1,1463 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use function assert; -use function memory_reset_peak_usage; -use function preg_match; -use PHPUnit\Event\Code\ClassMethod; -use PHPUnit\Event\Code\ComparisonFailure; -use PHPUnit\Event\Code\IssueTrigger\IssueTrigger; -use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\TestMethodBuilder; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Test\DataProviderMethodCalled; -use PHPUnit\Event\Test\DataProviderMethodFinished; -use PHPUnit\Event\TestSuite\Filtered as TestSuiteFiltered; -use PHPUnit\Event\TestSuite\Finished as TestSuiteFinished; -use PHPUnit\Event\TestSuite\Loaded as TestSuiteLoaded; -use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped; -use PHPUnit\Event\TestSuite\Sorted as TestSuiteSorted; -use PHPUnit\Event\TestSuite\Started as TestSuiteStarted; -use PHPUnit\Event\TestSuite\TestSuite; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\IgnorePhpunitWarnings; -use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\TextUI\Configuration\Configuration; -use SebastianBergmann\Comparator\Comparator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DispatchingEmitter implements Emitter -{ - private readonly Dispatcher $dispatcher; - private readonly Telemetry\System $system; - private readonly Telemetry\Snapshot $startSnapshot; - private Telemetry\Snapshot $previousSnapshot; - - public function __construct(Dispatcher $dispatcher, Telemetry\System $system) - { - $this->dispatcher = $dispatcher; - $this->system = $system; - - $this->startSnapshot = $system->snapshot(); - $this->previousSnapshot = $this->startSnapshot; - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function applicationStarted(): void - { - $this->dispatcher->dispatch( - new Application\Started( - $this->telemetryInfo(), - new Runtime\Runtime, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerStarted(): void - { - $this->dispatcher->dispatch( - new TestRunner\Started( - $this->telemetryInfo(), - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerConfigured(Configuration $configuration): void - { - $this->dispatcher->dispatch( - new TestRunner\Configured( - $this->telemetryInfo(), - $configuration, - ), - ); - } - - /** - * @param non-empty-string $filename - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerBootstrapFinished(string $filename): void - { - $this->dispatcher->dispatch( - new TestRunner\BootstrapFinished( - $this->telemetryInfo(), - $filename, - ), - ); - } - - /** - * @param non-empty-string $filename - * @param non-empty-string $name - * @param non-empty-string $version - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerLoadedExtensionFromPhar(string $filename, string $name, string $version): void - { - $this->dispatcher->dispatch( - new TestRunner\ExtensionLoadedFromPhar( - $this->telemetryInfo(), - $filename, - $name, - $version, - ), - ); - } - - /** - * @param class-string $className - * @param array $parameters - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerBootstrappedExtension(string $className, array $parameters): void - { - $this->dispatcher->dispatch( - new TestRunner\ExtensionBootstrapped( - $this->telemetryInfo(), - $className, - $parameters, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function dataProviderMethodCalled(ClassMethod $testMethod, ClassMethod $dataProviderMethod): void - { - $this->dispatcher->dispatch( - new DataProviderMethodCalled( - $this->telemetryInfo(), - $testMethod, - $dataProviderMethod, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function dataProviderMethodFinished(ClassMethod $testMethod, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new DataProviderMethodFinished( - $this->telemetryInfo(), - $testMethod, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteLoaded(TestSuite $testSuite): void - { - $this->dispatcher->dispatch( - new TestSuiteLoaded( - $this->telemetryInfo(), - $testSuite, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteFiltered(TestSuite $testSuite): void - { - $this->dispatcher->dispatch( - new TestSuiteFiltered( - $this->telemetryInfo(), - $testSuite, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteSorted(int $executionOrder, int $executionOrderDefects, bool $resolveDependencies): void - { - $this->dispatcher->dispatch( - new TestSuiteSorted( - $this->telemetryInfo(), - $executionOrder, - $executionOrderDefects, - $resolveDependencies, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerEventFacadeSealed(): void - { - $this->dispatcher->dispatch( - new TestRunner\EventFacadeSealed( - $this->telemetryInfo(), - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerExecutionStarted(TestSuite $testSuite): void - { - $this->dispatcher->dispatch( - new TestRunner\ExecutionStarted( - $this->telemetryInfo(), - $testSuite, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerDisabledGarbageCollection(): void - { - $this->dispatcher->dispatch( - new TestRunner\GarbageCollectionDisabled($this->telemetryInfo()), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerTriggeredGarbageCollection(): void - { - $this->dispatcher->dispatch( - new TestRunner\GarbageCollectionTriggered($this->telemetryInfo()), - ); - } - - public function childProcessStarted(): void - { - $this->dispatcher->dispatch( - new TestRunner\ChildProcessStarted($this->telemetryInfo()), - ); - } - - public function childProcessErrored(): void - { - $this->dispatcher->dispatch( - new TestRunner\ChildProcessErrored($this->telemetryInfo()), - ); - } - - public function childProcessFinished(string $stdout, string $stderr): void - { - $this->dispatcher->dispatch( - new TestRunner\ChildProcessFinished( - $this->telemetryInfo(), - $stdout, - $stderr, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteSkipped(TestSuite $testSuite, string $message): void - { - $this->dispatcher->dispatch( - new TestSuiteSkipped( - $this->telemetryInfo(), - $testSuite, - $message, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteStarted(TestSuite $testSuite): void - { - $this->dispatcher->dispatch( - new TestSuiteStarted( - $this->telemetryInfo(), - $testSuite, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPreparationStarted(Code\Test $test): void - { - $this->dispatcher->dispatch( - new Test\PreparationStarted( - $this->telemetryInfo(), - $test, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPreparationErrored(Code\Test $test, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PreparationErrored( - $this->telemetryInfo(), - $test, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPreparationFailed(Code\Test $test, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PreparationFailed( - $this->telemetryInfo(), - $test, - $throwable, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\BeforeFirstTestMethodCalled( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\BeforeFirstTestMethodErrored( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeFirstTestMethodFailed(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\BeforeFirstTestMethodFailed( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\BeforeFirstTestMethodFinished( - $this->telemetryInfo(), - $testClassName, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeTestMethodCalled(TestMethod $test, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\BeforeTestMethodCalled( - $this->telemetryInfo(), - $test, - $calledMethod, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeTestMethodErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\BeforeTestMethodErrored( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeTestMethodFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\BeforeTestMethodFailed( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function beforeTestMethodFinished(TestMethod $test, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\BeforeTestMethodFinished( - $this->telemetryInfo(), - $test, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function preConditionCalled(TestMethod $test, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\PreConditionCalled( - $this->telemetryInfo(), - $test, - $calledMethod, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function preConditionErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PreConditionErrored( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function preConditionFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PreConditionFailed( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function preConditionFinished(TestMethod $test, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\PreConditionFinished( - $this->telemetryInfo(), - $test, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPrepared(Code\Test $test): void - { - memory_reset_peak_usage(); - - $this->dispatcher->dispatch( - new Test\Prepared( - $this->telemetryInfo(), - $test, - ), - ); - } - - /** - * @param class-string $className - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRegisteredComparator(string $className): void - { - $this->dispatcher->dispatch( - new Test\ComparatorRegistered( - $this->telemetryInfo(), - $className, - ), - ); - } - - /** - * @param class-string $className - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testCreatedMockObject(string $className): void - { - $this->dispatcher->dispatch( - new Test\MockObjectCreated( - $this->telemetryInfo(), - $className, - ), - ); - } - - /** - * @param list $interfaces - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testCreatedMockObjectForIntersectionOfInterfaces(array $interfaces): void - { - $this->dispatcher->dispatch( - new Test\MockObjectForIntersectionOfInterfacesCreated( - $this->telemetryInfo(), - $interfaces, - ), - ); - } - - /** - * @param class-string $className - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testCreatedPartialMockObject(string $className, string ...$methodNames): void - { - $this->dispatcher->dispatch( - new Test\PartialMockObjectCreated( - $this->telemetryInfo(), - $className, - ...$methodNames, - ), - ); - } - - /** - * @param class-string $className - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testCreatedStub(string $className): void - { - $this->dispatcher->dispatch( - new Test\TestStubCreated( - $this->telemetryInfo(), - $className, - ), - ); - } - - /** - * @param list $interfaces - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testCreatedStubForIntersectionOfInterfaces(array $interfaces): void - { - $this->dispatcher->dispatch( - new Test\TestStubForIntersectionOfInterfacesCreated( - $this->telemetryInfo(), - $interfaces, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testErrored(Code\Test $test, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\Errored( - $this->telemetryInfo(), - $test, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testFailed(Code\Test $test, Throwable $throwable, ?ComparisonFailure $comparisonFailure): void - { - $this->dispatcher->dispatch( - new Test\Failed( - $this->telemetryInfo(), - $test, - $throwable, - $comparisonFailure, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPassed(Code\Test $test): void - { - $this->dispatcher->dispatch( - new Test\Passed( - $this->telemetryInfo(), - $test, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testConsideredRisky(Code\Test $test, string $message): void - { - $this->dispatcher->dispatch( - new Test\ConsideredRisky( - $this->telemetryInfo(), - $test, - $message, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testMarkedAsIncomplete(Code\Test $test, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\MarkedIncomplete( - $this->telemetryInfo(), - $test, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSkipped(Code\Test $test, string $message): void - { - $this->dispatcher->dispatch( - new Test\Skipped( - $this->telemetryInfo(), - $test, - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws NoTestCaseObjectOnCallStackException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpunitDeprecation(?Code\Test $test, string $message): void - { - if ($test === null) { - $test = TestMethodBuilder::fromCallStack(); - } - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - if ($test->metadata()->isIgnorePhpunitDeprecations()->isNotEmpty()) { - return; - } - } - - $this->dispatcher->dispatch( - new Test\PhpunitDeprecationTriggered( - $this->telemetryInfo(), - $test, - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws NoTestCaseObjectOnCallStackException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpunitNotice(?Code\Test $test, string $message): void - { - if ($test === null) { - $test = TestMethodBuilder::fromCallStack(); - } - - $this->dispatcher->dispatch( - new Test\PhpunitNoticeTriggered( - $this->telemetryInfo(), - $test, - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger): void - { - $this->dispatcher->dispatch( - new Test\PhpDeprecationTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - $ignoredByTest, - $trigger, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $stackTrace - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger, string $stackTrace): void - { - $this->dispatcher->dispatch( - new Test\DeprecationTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - $ignoredByTest, - $trigger, - $stackTrace, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredError(Code\Test $test, string $message, string $file, int $line, bool $suppressed): void - { - $this->dispatcher->dispatch( - new Test\ErrorTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void - { - $this->dispatcher->dispatch( - new Test\NoticeTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void - { - $this->dispatcher->dispatch( - new Test\PhpNoticeTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void - { - $this->dispatcher->dispatch( - new Test\WarningTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - ), - ); - } - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void - { - $this->dispatcher->dispatch( - new Test\PhpWarningTriggered( - $this->telemetryInfo(), - $test, - $message, - $file, - $line, - $suppressed, - $ignoredByBaseline, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpunitError(Code\Test $test, string $message): void - { - $this->dispatcher->dispatch( - new Test\PhpunitErrorTriggered( - $this->telemetryInfo(), - $test, - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testTriggeredPhpunitWarning(Code\Test $test, string $message): void - { - $ignoredByTest = false; - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - $metadata = Registry::parser()->forMethod($test->className(), $test->methodName())->isIgnorePhpunitWarnings()->asArray(); - - if (isset($metadata[0])) { - assert($metadata[0] instanceof IgnorePhpunitWarnings); - - $messagePattern = $metadata[0]->messagePattern(); - - if ($messagePattern === null || (bool) preg_match('{' . $messagePattern . '}', $message)) { - $ignoredByTest = true; - } - } - } - - $this->dispatcher->dispatch( - new Test\PhpunitWarningTriggered( - $this->telemetryInfo(), - $test, - $message, - $ignoredByTest, - ), - ); - } - - /** - * @param non-empty-string $output - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testPrintedUnexpectedOutput(string $output): void - { - $this->dispatcher->dispatch( - new Test\PrintedUnexpectedOutput( - $this->telemetryInfo(), - $output, - ), - ); - } - - /** - * @param non-empty-string $additionalInformation - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testProvidedAdditionalInformation(TestMethod $test, string $additionalInformation): void - { - $this->dispatcher->dispatch( - new Test\AdditionalInformationProvided( - $this->telemetryInfo(), - $test, - $additionalInformation, - ), - ); - } - - /** - * @param non-negative-int $numberOfAssertionsPerformed - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testFinished(Code\Test $test, int $numberOfAssertionsPerformed): void - { - $this->dispatcher->dispatch( - new Test\Finished( - $this->telemetryInfo(), - $test, - $numberOfAssertionsPerformed, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function postConditionCalled(TestMethod $test, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\PostConditionCalled( - $this->telemetryInfo(), - $test, - $calledMethod, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function postConditionErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PostConditionErrored( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function postConditionFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\PostConditionFailed( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function postConditionFinished(TestMethod $test, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\PostConditionFinished( - $this->telemetryInfo(), - $test, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterTestMethodCalled(TestMethod $test, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\AfterTestMethodCalled( - $this->telemetryInfo(), - $test, - $calledMethod, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterTestMethodErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\AfterTestMethodErrored( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterTestMethodFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\AfterTestMethodFailed( - $this->telemetryInfo(), - $test, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterTestMethodFinished(TestMethod $test, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\AfterTestMethodFinished( - $this->telemetryInfo(), - $test, - ...$calledMethods, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void - { - $this->dispatcher->dispatch( - new Test\AfterLastTestMethodCalled( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\AfterLastTestMethodErrored( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterLastTestMethodFailed(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void - { - $this->dispatcher->dispatch( - new Test\AfterLastTestMethodFailed( - $this->telemetryInfo(), - $testClassName, - $calledMethod, - $throwable, - ), - ); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function afterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void - { - $this->dispatcher->dispatch( - new Test\AfterLastTestMethodFinished( - $this->telemetryInfo(), - $testClassName, - ...$calledMethods, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testSuiteFinished(TestSuite $testSuite): void - { - $this->dispatcher->dispatch( - new TestSuiteFinished( - $this->telemetryInfo(), - $testSuite, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerStartedStaticAnalysisForCodeCoverage(): void - { - $this->dispatcher->dispatch( - new TestRunner\StaticAnalysisForCodeCoverageStarted( - $this->telemetryInfo(), - ), - ); - } - - /** - * @param non-negative-int $cacheHits - * @param non-negative-int $cacheMisses - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerFinishedStaticAnalysisForCodeCoverage(int $cacheHits, int $cacheMisses): void - { - $this->dispatcher->dispatch( - new TestRunner\StaticAnalysisForCodeCoverageFinished( - $this->telemetryInfo(), - $cacheHits, - $cacheMisses, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerTriggeredPhpunitDeprecation(string $message): void - { - try { - if (TestMethodBuilder::fromCallStack()->metadata()->isIgnorePhpunitDeprecations()->isNotEmpty()) { - return; - } - } catch (NoTestCaseObjectOnCallStackException) { - } - - $this->dispatcher->dispatch( - new TestRunner\DeprecationTriggered( - $this->telemetryInfo(), - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerTriggeredPhpunitNotice(string $message): void - { - $this->dispatcher->dispatch( - new TestRunner\NoticeTriggered( - $this->telemetryInfo(), - $message, - ), - ); - } - - /** - * @param non-empty-string $message - * - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerTriggeredPhpunitWarning(string $message): void - { - $this->dispatcher->dispatch( - new TestRunner\WarningTriggered( - $this->telemetryInfo(), - $message, - ), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerEnabledGarbageCollection(): void - { - $this->dispatcher->dispatch( - new TestRunner\GarbageCollectionEnabled($this->telemetryInfo()), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerExecutionAborted(): void - { - $this->dispatcher->dispatch( - new TestRunner\ExecutionAborted($this->telemetryInfo()), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerExecutionFinished(): void - { - $this->dispatcher->dispatch( - new TestRunner\ExecutionFinished($this->telemetryInfo()), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function testRunnerFinished(): void - { - $this->dispatcher->dispatch( - new TestRunner\Finished($this->telemetryInfo()), - ); - } - - /** - * @throws InvalidArgumentException - * @throws UnknownEventTypeException - */ - public function applicationFinished(int $shellExitCode): void - { - $this->dispatcher->dispatch( - new Application\Finished( - $this->telemetryInfo(), - $shellExitCode, - ), - ); - } - - /** - * @throws InvalidArgumentException - */ - private function telemetryInfo(): Telemetry\Info - { - $current = $this->system->snapshot(); - - $info = new Telemetry\Info( - $current, - $current->time()->duration($this->startSnapshot->time()), - $current->memoryUsage()->diff($this->startSnapshot->memoryUsage()), - $current->time()->duration($this->previousSnapshot->time()), - $current->memoryUsage()->diff($this->previousSnapshot->memoryUsage()), - ); - - $this->previousSnapshot = $current; - - return $info; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php deleted file mode 100644 index eb9d75cc..00000000 --- a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use PHPUnit\Event\Code\ClassMethod; -use PHPUnit\Event\Code\ComparisonFailure; -use PHPUnit\Event\Code\IssueTrigger\IssueTrigger; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\TestSuite\TestSuite; -use PHPUnit\Framework\TestCase; -use PHPUnit\TextUI\Configuration\Configuration; -use SebastianBergmann\Comparator\Comparator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Emitter -{ - public function applicationStarted(): void; - - public function testRunnerStarted(): void; - - public function testRunnerConfigured(Configuration $configuration): void; - - /** - * @param non-empty-string $filename - */ - public function testRunnerBootstrapFinished(string $filename): void; - - /** - * @param non-empty-string $filename - * @param non-empty-string $name - * @param non-empty-string $version - */ - public function testRunnerLoadedExtensionFromPhar(string $filename, string $name, string $version): void; - - /** - * @param class-string $className - * @param array $parameters - */ - public function testRunnerBootstrappedExtension(string $className, array $parameters): void; - - public function dataProviderMethodCalled(ClassMethod $testMethod, ClassMethod $dataProviderMethod): void; - - public function dataProviderMethodFinished(ClassMethod $testMethod, ClassMethod ...$calledMethods): void; - - public function testSuiteLoaded(TestSuite $testSuite): void; - - public function testSuiteFiltered(TestSuite $testSuite): void; - - public function testSuiteSorted(int $executionOrder, int $executionOrderDefects, bool $resolveDependencies): void; - - public function testRunnerEventFacadeSealed(): void; - - public function testRunnerExecutionStarted(TestSuite $testSuite): void; - - public function testRunnerDisabledGarbageCollection(): void; - - public function testRunnerTriggeredGarbageCollection(): void; - - /** - * @param non-empty-string $message - */ - public function testSuiteSkipped(TestSuite $testSuite, string $message): void; - - public function testSuiteStarted(TestSuite $testSuite): void; - - public function testPreparationStarted(Code\Test $test): void; - - public function testPreparationErrored(Code\Test $test, Throwable $throwable): void; - - public function testPreparationFailed(Code\Test $test, Throwable $throwable): void; - - /** - * @param class-string $testClassName - */ - public function beforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; - - /** - * @param class-string $testClassName - */ - public function beforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void; - - /** - * @param class-string $testClassName - */ - public function beforeFirstTestMethodFailed(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void; - - /** - * @param class-string $testClassName - */ - public function beforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; - - public function beforeTestMethodCalled(TestMethod $test, ClassMethod $calledMethod): void; - - public function beforeTestMethodErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function beforeTestMethodFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function beforeTestMethodFinished(TestMethod $test, ClassMethod ...$calledMethods): void; - - public function preConditionCalled(TestMethod $test, ClassMethod $calledMethod): void; - - public function preConditionErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function preConditionFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function preConditionFinished(TestMethod $test, ClassMethod ...$calledMethods): void; - - public function testPrepared(Code\Test $test): void; - - /** - * @param class-string $className - */ - public function testRegisteredComparator(string $className): void; - - /** - * @param class-string $className - */ - public function testCreatedMockObject(string $className): void; - - /** - * @param list $interfaces - */ - public function testCreatedMockObjectForIntersectionOfInterfaces(array $interfaces): void; - - /** - * @param class-string $className - */ - public function testCreatedPartialMockObject(string $className, string ...$methodNames): void; - - /** - * @param class-string $className - */ - public function testCreatedStub(string $className): void; - - /** - * @param list $interfaces - */ - public function testCreatedStubForIntersectionOfInterfaces(array $interfaces): void; - - public function testErrored(Code\Test $test, Throwable $throwable): void; - - public function testFailed(Code\Test $test, Throwable $throwable, ?ComparisonFailure $comparisonFailure): void; - - public function testPassed(Code\Test $test): void; - - /** - * @param non-empty-string $message - */ - public function testConsideredRisky(Code\Test $test, string $message): void; - - public function testMarkedAsIncomplete(Code\Test $test, Throwable $throwable): void; - - /** - * @param non-empty-string $message - */ - public function testSkipped(Code\Test $test, string $message): void; - - /** - * @param non-empty-string $message - */ - public function testTriggeredPhpunitDeprecation(?Code\Test $test, string $message): void; - - /** - * @param non-empty-string $message - */ - public function testTriggeredPhpunitNotice(?Code\Test $test, string $message): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredPhpDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $stackTrace - */ - public function testTriggeredDeprecation(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger, string $stackTrace): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredError(Code\Test $test, string $message, string $file, int $line, bool $suppressed): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredPhpNotice(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function testTriggeredPhpWarning(Code\Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline): void; - - /** - * @param non-empty-string $message - */ - public function testTriggeredPhpunitError(Code\Test $test, string $message): void; - - /** - * @param non-empty-string $message - */ - public function testTriggeredPhpunitWarning(Code\Test $test, string $message): void; - - /** - * @param non-empty-string $output - */ - public function testPrintedUnexpectedOutput(string $output): void; - - /** - * @param non-empty-string $additionalInformation - */ - public function testProvidedAdditionalInformation(TestMethod $test, string $additionalInformation): void; - - /** - * @param non-negative-int $numberOfAssertionsPerformed - */ - public function testFinished(Code\Test $test, int $numberOfAssertionsPerformed): void; - - public function postConditionCalled(TestMethod $test, ClassMethod $calledMethod): void; - - public function postConditionErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function postConditionFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function postConditionFinished(TestMethod $test, ClassMethod ...$calledMethods): void; - - public function afterTestMethodCalled(TestMethod $test, ClassMethod $calledMethod): void; - - public function afterTestMethodErrored(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function afterTestMethodFailed(TestMethod $test, ClassMethod $calledMethod, Throwable $throwable): void; - - public function afterTestMethodFinished(TestMethod $test, ClassMethod ...$calledMethods): void; - - /** - * @param class-string $testClassName - */ - public function afterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; - - /** - * @param class-string $testClassName - */ - public function afterLastTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void; - - /** - * @param class-string $testClassName - */ - public function afterLastTestMethodFailed(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void; - - /** - * @param class-string $testClassName - */ - public function afterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; - - public function testSuiteFinished(TestSuite $testSuite): void; - - public function childProcessStarted(): void; - - public function childProcessErrored(): void; - - public function childProcessFinished(string $stdout, string $stderr): void; - - public function testRunnerStartedStaticAnalysisForCodeCoverage(): void; - - /** - * @param non-negative-int $cacheHits - * @param non-negative-int $cacheMisses - */ - public function testRunnerFinishedStaticAnalysisForCodeCoverage(int $cacheHits, int $cacheMisses): void; - - /** - * @param non-empty-string $message - */ - public function testRunnerTriggeredPhpunitDeprecation(string $message): void; - - /** - * @param non-empty-string $message - */ - public function testRunnerTriggeredPhpunitNotice(string $message): void; - - /** - * @param non-empty-string $message - */ - public function testRunnerTriggeredPhpunitWarning(string $message): void; - - public function testRunnerEnabledGarbageCollection(): void; - - public function testRunnerExecutionAborted(): void; - - public function testRunnerExecutionFinished(): void; - - public function testRunnerFinished(): void; - - public function applicationFinished(int $shellExitCode): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Application/Finished.php b/vendor/phpunit/phpunit/src/Event/Events/Application/Finished.php deleted file mode 100644 index 6e94da2a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Application/Finished.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Application; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Finished implements Event -{ - private Telemetry\Info $telemetryInfo; - private int $shellExitCode; - - public function __construct(Telemetry\Info $telemetryInfo, int $shellExitCode) - { - $this->telemetryInfo = $telemetryInfo; - $this->shellExitCode = $shellExitCode; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function shellExitCode(): int - { - return $this->shellExitCode; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'PHPUnit Finished (Shell Exit Code: %d)', - $this->shellExitCode, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php deleted file mode 100644 index 1e759776..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Application; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FinishedSubscriber extends Subscriber -{ - public function notify(Finished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Application/Started.php b/vendor/phpunit/phpunit/src/Event/Events/Application/Started.php deleted file mode 100644 index a9aa959a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Application/Started.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Application; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Runtime\Runtime; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Started implements Event -{ - private Telemetry\Info $telemetryInfo; - private Runtime $runtime; - - public function __construct(Telemetry\Info $telemetryInfo, Runtime $runtime) - { - $this->telemetryInfo = $telemetryInfo; - $this->runtime = $runtime; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function runtime(): Runtime - { - return $this->runtime; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'PHPUnit Started (%s)', - $this->runtime->asString(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Application/StartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Application/StartedSubscriber.php deleted file mode 100644 index f2ebee2f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Application/StartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Application; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface StartedSubscriber extends Subscriber -{ - public function notify(Started $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Event.php b/vendor/phpunit/phpunit/src/Event/Events/Event.php deleted file mode 100644 index 443ca729..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Event.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Event -{ - public function telemetryInfo(): Telemetry\Info; - - /** - * @return non-empty-string - */ - public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/EventCollection.php b/vendor/phpunit/phpunit/src/Event/Events/EventCollection.php deleted file mode 100644 index 7c691269..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/EventCollection.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class EventCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $events = []; - - public function add(Event ...$events): void - { - foreach ($events as $event) { - $this->events[] = $event; - } - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->events; - } - - public function count(): int - { - return count($this->events); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } - - public function isNotEmpty(): bool - { - return $this->count() > 0; - } - - public function getIterator(): EventCollectionIterator - { - return new EventCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/EventCollectionIterator.php b/vendor/phpunit/phpunit/src/Event/Events/EventCollectionIterator.php deleted file mode 100644 index d121dea6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/EventCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class EventCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $events; - private int $position = 0; - - public function __construct(EventCollection $events) - { - $this->events = $events->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->events); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Event - { - return $this->events[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvided.php b/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvided.php deleted file mode 100644 index d8f819ee..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvided.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AdditionalInformationProvided implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestMethod $test; - - /** - * @var non-empty-string - */ - private string $additionalInformation; - - /** - * @param non-empty-string $additionalInformation - */ - public function __construct(Telemetry\Info $telemetryInfo, TestMethod $test, string $additionalInformation) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->additionalInformation = $additionalInformation; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): TestMethod - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function additionalInformation(): string - { - return $this->additionalInformation; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Provided Additional Information%s%s', - PHP_EOL, - $this->additionalInformation, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvidedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvidedSubscriber.php deleted file mode 100644 index 7d175c59..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/AdditionalInformationProvidedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AdditionalInformationProvidedSubscriber extends Subscriber -{ - public function notify(AdditionalInformationProvided $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegistered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegistered.php deleted file mode 100644 index 9db33d5e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegistered.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use SebastianBergmann\Comparator\Comparator; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ComparatorRegistered implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(Telemetry\Info $telemetryInfo, string $className) - { - $this->telemetryInfo = $telemetryInfo; - $this->className = $className; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Comparator Registered (%s)', - $this->className, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegisteredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegisteredSubscriber.php deleted file mode 100644 index 10ba78e4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/ComparatorRegisteredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ComparatorRegisteredSubscriber extends Subscriber -{ - public function notify(ComparatorRegistered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php deleted file mode 100644 index 2c875a8c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalled.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodCalled implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'After Last Test Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalledSubscriber.php deleted file mode 100644 index 08530ab7..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterLastTestMethodCalledSubscriber extends Subscriber -{ - public function notify(AfterLastTestMethodCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php deleted file mode 100644 index ecdb7a15..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErrored.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'After Last Test Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErroredSubscriber.php deleted file mode 100644 index b994fdeb..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterLastTestMethodErroredSubscriber extends Subscriber -{ - public function notify(AfterLastTestMethodErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailed.php deleted file mode 100644 index b22146ea..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailed.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'After Last Test Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailedSubscriber.php deleted file mode 100644 index 3b011bd9..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterLastTestMethodFailedSubscriber extends Subscriber -{ - public function notify(AfterLastTestMethodFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php deleted file mode 100644 index d8a5a11f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinished.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - - /** - * @var list - */ - private array $calledMethods; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'After Last Test Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinishedSubscriber.php deleted file mode 100644 index 0a366b0d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterLastTestMethodFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterLastTestMethodFinishedSubscriber extends Subscriber -{ - public function notify(AfterLastTestMethodFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php deleted file mode 100644 index 93c4e12c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalled.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestMethodCalled implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'After Test Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php deleted file mode 100644 index 3e72fc91..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterTestMethodCalledSubscriber extends Subscriber -{ - public function notify(AfterTestMethodCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErrored.php deleted file mode 100644 index fd277e2d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErrored.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestMethodErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'After Test Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErroredSubscriber.php deleted file mode 100644 index 622f9162..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterTestMethodErroredSubscriber extends Subscriber -{ - public function notify(AfterTestMethodErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailed.php deleted file mode 100644 index e405066f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailed.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestMethodFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'After Test Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailedSubscriber.php deleted file mode 100644 index 16134322..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterTestMethodFailedSubscriber extends Subscriber -{ - public function notify(AfterTestMethodFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php deleted file mode 100644 index f897198e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestMethodFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - - /** - * @var list - */ - private array $calledMethods; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'After Test Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php deleted file mode 100644 index 5e566889..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface AfterTestMethodFinishedSubscriber extends Subscriber -{ - public function notify(AfterTestMethodFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php deleted file mode 100644 index b08eb8b9..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodCalled implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Before First Test Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php deleted file mode 100644 index a0d4281f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeFirstTestMethodCalledSubscriber extends Subscriber -{ - public function notify(BeforeFirstTestMethodCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php deleted file mode 100644 index a2e37b33..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Before First Test Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErroredSubscriber.php deleted file mode 100644 index 9a1b8754..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeFirstTestMethodErroredSubscriber extends Subscriber -{ - public function notify(BeforeFirstTestMethodErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailed.php deleted file mode 100644 index 33e669a4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailed.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Before First Test Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailedSubscriber.php deleted file mode 100644 index 4e0b7eff..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeFirstTestMethodFailedSubscriber extends Subscriber -{ - public function notify(BeforeFirstTestMethodFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinished.php deleted file mode 100644 index 87230a67..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinished.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Framework\TestCase; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodFinished implements Event -{ - private Telemetry\Info$telemetryInfo; - - /** - * @var class-string - */ - private string $testClassName; - - /** - * @var list - */ - private array $calledMethods; - - /** - * @param class-string $testClassName - */ - public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->testClassName = $testClassName; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function testClassName(): string - { - return $this->testClassName; - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'Before First Test Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinishedSubscriber.php deleted file mode 100644 index c9f18064..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeFirstTestMethodFinishedSubscriber extends Subscriber -{ - public function notify(BeforeFirstTestMethodFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalled.php deleted file mode 100644 index 2927a685..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalled.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestMethodCalled implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Before Test Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalledSubscriber.php deleted file mode 100644 index 5f4e180e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeTestMethodCalledSubscriber extends Subscriber -{ - public function notify(BeforeTestMethodCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErrored.php deleted file mode 100644 index 7e18a0c6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErrored.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestMethodErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Before Test Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErroredSubscriber.php deleted file mode 100644 index e53771c4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeTestMethodErroredSubscriber extends Subscriber -{ - public function notify(BeforeTestMethodErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailed.php deleted file mode 100644 index 95b46e41..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailed.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestMethodFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Before Test Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailedSubscriber.php deleted file mode 100644 index 0f9f071c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeTestMethodFailedSubscriber extends Subscriber -{ - public function notify(BeforeTestMethodFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinished.php deleted file mode 100644 index 971ad06b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinished.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestMethodFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - - /** - * @var list - */ - private array $calledMethods; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'Before Test Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinishedSubscriber.php deleted file mode 100644 index 2a6c758c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeTestMethodFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BeforeTestMethodFinishedSubscriber extends Subscriber -{ - public function notify(BeforeTestMethodFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalled.php deleted file mode 100644 index 2035f643..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalled.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PostConditionCalled implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Post Condition Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalledSubscriber.php deleted file mode 100644 index 2c135f50..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PostConditionCalledSubscriber extends Subscriber -{ - public function notify(PostConditionCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErrored.php deleted file mode 100644 index 29cfe0d6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErrored.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PostConditionErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Post Condition Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErroredSubscriber.php deleted file mode 100644 index 7bd2c54c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PostConditionErroredSubscriber extends Subscriber -{ - public function notify(PostConditionErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailed.php deleted file mode 100644 index cb486897..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailed.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PostConditionFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Post Condition Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailedSubscriber.php deleted file mode 100644 index e6ff7557..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PostConditionFailedSubscriber extends Subscriber -{ - public function notify(PostConditionFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinished.php deleted file mode 100644 index 0910a2a8..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinished.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PostConditionFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - - /** - * @var list - */ - private array $calledMethods; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'Post Condition Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinishedSubscriber.php deleted file mode 100644 index f24d9480..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PostConditionFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PostConditionFinishedSubscriber extends Subscriber -{ - public function notify(PostConditionFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalled.php deleted file mode 100644 index 80a10ee1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalled.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreConditionCalled implements Event -{ - private Telemetry\Info$telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Pre Condition Method Called (%s::%s)', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalledSubscriber.php deleted file mode 100644 index 431dfcc4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreConditionCalledSubscriber extends Subscriber -{ - public function notify(PreConditionCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErrored.php deleted file mode 100644 index f2773d98..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErrored.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreConditionErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Pre Condition Method Errored (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErroredSubscriber.php deleted file mode 100644 index 3465040b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreConditionErroredSubscriber extends Subscriber -{ - public function notify(PreConditionErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailed.php deleted file mode 100644 index bf94de21..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailed.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreConditionFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - private Code\ClassMethod $calledMethod; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod $calledMethod, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethod = $calledMethod; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - public function calledMethod(): Code\ClassMethod - { - return $this->calledMethod; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Pre Condition Method Failed (%s::%s)%s', - $this->calledMethod->className(), - $this->calledMethod->methodName(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailedSubscriber.php deleted file mode 100644 index 26ce7cdc..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreConditionFailedSubscriber extends Subscriber -{ - public function notify(PreConditionFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinished.php deleted file mode 100644 index 8a708ee0..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinished.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreConditionFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\TestMethod $test; - - /** - * @var list - */ - private array $calledMethods; - - public function __construct(Telemetry\Info $telemetryInfo, Code\TestMethod $test, Code\ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\TestMethod - { - return $this->test; - } - - /** - * @return class-string - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6140 - */ - public function testClassName(): string - { - return $this->test->className(); - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = 'Pre Condition Method Finished:'; - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinishedSubscriber.php deleted file mode 100644 index 9c499407..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/HookMethod/PreConditionFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreConditionFinishedSubscriber extends Subscriber -{ - public function notify(PreConditionFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRisky.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRisky.php deleted file mode 100644 index 306c04e7..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRisky.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ConsideredRisky implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Considered Risky (%s)%s%s', - $this->test->id(), - PHP_EOL, - $this->message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRiskySubscriber.php deleted file mode 100644 index a0c714a9..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ConsideredRiskySubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ConsideredRiskySubscriber extends Subscriber -{ - public function notify(ConsideredRisky $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggered.php deleted file mode 100644 index 09ec56fc..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggered.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\IssueTrigger\IssueTrigger; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DeprecationTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - private bool $ignoredByTest; - private IssueTrigger $trigger; - - /** - * @var non-empty-string - */ - private string $stackTrace; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $stackTrace - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger, string $stackTrace) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - $this->ignoredByTest = $ignoredByTest; - $this->trigger = $trigger; - $this->stackTrace = $stackTrace; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - public function ignoredByTest(): bool - { - return $this->ignoredByTest; - } - - public function trigger(): IssueTrigger - { - return $this->trigger; - } - - /** - * @return non-empty-string - */ - public function stackTrace(): string - { - return $this->stackTrace; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id(), $this->trigger->asString()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByTest) { - $details[] = 'ignored by test'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered Deprecation (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggeredSubscriber.php deleted file mode 100644 index e166dbed..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/DeprecationTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface DeprecationTriggeredSubscriber extends Subscriber -{ - public function notify(DeprecationTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggered.php deleted file mode 100644 index 7faefc63..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggered.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ErrorTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - return sprintf( - 'Test Triggered Error (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggeredSubscriber.php deleted file mode 100644 index 901d8855..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/ErrorTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ErrorTriggeredSubscriber extends Subscriber -{ - public function notify(ErrorTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php deleted file mode 100644 index 237e1f18..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class NoticeTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered Notice (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php deleted file mode 100644 index 95230d0f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface NoticeTriggeredSubscriber extends Subscriber -{ - public function notify(NoticeTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php deleted file mode 100644 index 5b9878ad..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\IssueTrigger\IssueTrigger; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpDeprecationTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - private bool $ignoredByTest; - private IssueTrigger $trigger; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline, bool $ignoredByTest, IssueTrigger $trigger) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - $this->ignoredByTest = $ignoredByTest; - $this->trigger = $trigger; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - public function ignoredByTest(): bool - { - return $this->ignoredByTest; - } - - public function trigger(): IssueTrigger - { - return $this->trigger; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id(), $this->trigger->asString()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByTest) { - $details[] = 'ignored by test'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered PHP Deprecation (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggeredSubscriber.php deleted file mode 100644 index 06159a7c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpDeprecationTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpDeprecationTriggeredSubscriber extends Subscriber -{ - public function notify(PhpDeprecationTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggered.php deleted file mode 100644 index ad976cfc..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggered.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpNoticeTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered PHP Notice (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggeredSubscriber.php deleted file mode 100644 index 98649bda..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpNoticeTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpNoticeTriggeredSubscriber extends Subscriber -{ - public function notify(PhpNoticeTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggered.php deleted file mode 100644 index 3d65125f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggered.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpWarningTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered PHP Warning (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggeredSubscriber.php deleted file mode 100644 index 3638ba1a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpWarningTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpWarningTriggeredSubscriber extends Subscriber -{ - public function notify(PhpWarningTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php deleted file mode 100644 index 4e1603f3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpunitDeprecationTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Triggered PHPUnit Deprecation (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggeredSubscriber.php deleted file mode 100644 index f6b3a239..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitDeprecationTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpunitDeprecationTriggeredSubscriber extends Subscriber -{ - public function notify(PhpunitDeprecationTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggered.php deleted file mode 100644 index abd5e8a1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggered.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use function trim; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpunitErrorTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = trim($this->message); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Triggered PHPUnit Error (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggeredSubscriber.php deleted file mode 100644 index e94d1dde..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitErrorTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpunitErrorTriggeredSubscriber extends Subscriber -{ - public function notify(PhpunitErrorTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggered.php deleted file mode 100644 index 33984ba4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggered.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use function trim; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpunitNoticeTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = trim($this->message); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Triggered PHPUnit Notice (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggeredSubscriber.php deleted file mode 100644 index 0935c6dd..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitNoticeTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpunitNoticeTriggeredSubscriber extends Subscriber -{ - public function notify(PhpunitNoticeTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggered.php deleted file mode 100644 index 75ef4894..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggered.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpunitWarningTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - private bool $ignoredByTest; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, bool $ignoredByTest) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->ignoredByTest = $ignoredByTest; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - public function ignoredByTest(): bool - { - return $this->ignoredByTest; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->ignoredByTest) { - $details[] = 'ignored by test'; - } - - return sprintf( - 'Test Triggered PHPUnit Warning (%s)%s', - implode(', ', $details), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggeredSubscriber.php deleted file mode 100644 index 72149b2c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/PhpunitWarningTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PhpunitWarningTriggeredSubscriber extends Subscriber -{ - public function notify(PhpunitWarningTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggered.php deleted file mode 100644 index 7b3e313b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggered.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function implode; -use function sprintf; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class WarningTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private Test $test; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - private bool $suppressed; - private bool $ignoredByBaseline; - - /** - * @param non-empty-string $message - * @param non-empty-string $file - * @param positive-int $line - */ - public function __construct(Telemetry\Info $telemetryInfo, Test $test, string $message, string $file, int $line, bool $suppressed, bool $ignoredByBaseline) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->suppressed = $suppressed; - $this->ignoredByBaseline = $ignoredByBaseline; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - public function wasSuppressed(): bool - { - return $this->suppressed; - } - - public function ignoredByBaseline(): bool - { - return $this->ignoredByBaseline; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - $details = [$this->test->id()]; - - if ($this->suppressed) { - $details[] = 'suppressed using operator'; - } - - if ($this->ignoredByBaseline) { - $details[] = 'ignored by baseline'; - } - - return sprintf( - 'Test Triggered Warning (%s) in %s:%d%s', - implode(', ', $details), - $this->file, - $this->line, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggeredSubscriber.php deleted file mode 100644 index 8eb66648..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Issue/WarningTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface WarningTriggeredSubscriber extends Subscriber -{ - public function notify(WarningTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalled.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalled.php deleted file mode 100644 index 5631e1cf..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalled.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code\ClassMethod; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry\Info; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataProviderMethodCalled implements Event -{ - private Info $telemetryInfo; - private ClassMethod $testMethod; - private ClassMethod $dataProviderMethod; - - public function __construct(Info $telemetryInfo, ClassMethod $testMethod, ClassMethod $dataProviderMethod) - { - $this->telemetryInfo = $telemetryInfo; - $this->testMethod = $testMethod; - $this->dataProviderMethod = $dataProviderMethod; - } - - public function telemetryInfo(): Info - { - return $this->telemetryInfo; - } - - public function testMethod(): ClassMethod - { - return $this->testMethod; - } - - public function dataProviderMethod(): ClassMethod - { - return $this->dataProviderMethod; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Data Provider Method Called (%s::%s for test method %s::%s)', - $this->dataProviderMethod->className(), - $this->dataProviderMethod->methodName(), - $this->testMethod->className(), - $this->testMethod->methodName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalledSubscriber.php deleted file mode 100644 index 5f7d4013..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodCalledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface DataProviderMethodCalledSubscriber extends Subscriber -{ - public function notify(DataProviderMethodCalled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinished.php deleted file mode 100644 index ec267799..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinished.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code\ClassMethod; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataProviderMethodFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private ClassMethod $testMethod; - - /** - * @var list - */ - private array $calledMethods; - - public function __construct(Telemetry\Info $telemetryInfo, ClassMethod $testMethod, ClassMethod ...$calledMethods) - { - $this->telemetryInfo = $telemetryInfo; - $this->testMethod = $testMethod; - $this->calledMethods = $calledMethods; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testMethod(): ClassMethod - { - return $this->testMethod; - } - - /** - * @return list - */ - public function calledMethods(): array - { - return $this->calledMethods; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $buffer = sprintf( - 'Data Provider Method Finished for %s::%s:', - $this->testMethod->className(), - $this->testMethod->methodName(), - ); - - foreach ($this->calledMethods as $calledMethod) { - $buffer .= sprintf( - PHP_EOL . '- %s::%s', - $calledMethod->className(), - $calledMethod->methodName(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinishedSubscriber.php deleted file mode 100644 index 624f8921..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/DataProviderMethodFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface DataProviderMethodFinishedSubscriber extends Subscriber -{ - public function notify(DataProviderMethodFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Finished.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Finished.php deleted file mode 100644 index 3cc9a52f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Finished.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Finished implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - - /** - * @var non-negative-int - */ - private int $numberOfAssertionsPerformed; - - /** - * @param non-negative-int $numberOfAssertionsPerformed - */ - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, int $numberOfAssertionsPerformed) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->numberOfAssertionsPerformed = $numberOfAssertionsPerformed; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - /** - * @return non-negative-int - */ - public function numberOfAssertionsPerformed(): int - { - return $this->numberOfAssertionsPerformed; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Finished (%s)', - $this->test->id(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/FinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/FinishedSubscriber.php deleted file mode 100644 index 5751e3df..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/FinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FinishedSubscriber extends Subscriber -{ - public function notify(Finished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErrored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErrored.php deleted file mode 100644 index 866bf5f1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErrored.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreparationErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Preparation Errored (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErroredSubscriber.php deleted file mode 100644 index 2cb43d2e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreparationErroredSubscriber extends Subscriber -{ - public function notify(PreparationErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailed.php deleted file mode 100644 index 7a8b1d67..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailed.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreparationFailed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->throwable->message(); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Preparation Failed (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailedSubscriber.php deleted file mode 100644 index da20f11e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationFailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreparationFailedSubscriber extends Subscriber -{ - public function notify(PreparationFailed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStarted.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStarted.php deleted file mode 100644 index 7c548b08..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStarted.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreparationStarted implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Preparation Started (%s)', - $this->test->id(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStartedSubscriber.php deleted file mode 100644 index f13296b4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparationStartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreparationStartedSubscriber extends Subscriber -{ - public function notify(PreparationStarted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Prepared.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Prepared.php deleted file mode 100644 index d83f1d59..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/Prepared.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Prepared implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Prepared (%s)', - $this->test->id(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparedSubscriber.php deleted file mode 100644 index f53e227f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Lifecycle/PreparedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PreparedSubscriber extends Subscriber -{ - public function notify(Prepared $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php deleted file mode 100644 index ef068498..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Errored.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use function trim; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Errored implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = trim($this->throwable->message()); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Errored (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/ErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/ErroredSubscriber.php deleted file mode 100644 index 42dd5b24..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/ErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ErroredSubscriber extends Subscriber -{ - public function notify(Errored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Failed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Failed.php deleted file mode 100644 index bcc5867f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Failed.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use function trim; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\ComparisonFailure; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Failed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private Throwable $throwable; - private ?ComparisonFailure $comparisonFailure; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable, ?ComparisonFailure $comparisonFailure) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->throwable = $throwable; - $this->comparisonFailure = $comparisonFailure; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @phpstan-assert-if-true !null $this->comparisonFailure - */ - public function hasComparisonFailure(): bool - { - return $this->comparisonFailure !== null; - } - - /** - * @throws NoComparisonFailureException - */ - public function comparisonFailure(): ComparisonFailure - { - if ($this->comparisonFailure === null) { - throw new NoComparisonFailureException; - } - - return $this->comparisonFailure; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = trim($this->throwable->message()); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Failed (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/FailedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/FailedSubscriber.php deleted file mode 100644 index 8da6a85f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/FailedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FailedSubscriber extends Subscriber -{ - public function notify(Failed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncomplete.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncomplete.php deleted file mode 100644 index a69b48a4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncomplete.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use function trim; -use PHPUnit\Event\Code; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MarkedIncomplete implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private Throwable $throwable; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, Throwable $throwable) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->throwable = $throwable; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function throwable(): Throwable - { - return $this->throwable; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = trim($this->throwable->message()); - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Marked Incomplete (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php deleted file mode 100644 index ff0acd86..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MarkedIncompleteSubscriber extends Subscriber -{ - public function notify(MarkedIncomplete $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Passed.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Passed.php deleted file mode 100644 index 38f2d981..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Passed.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Passed implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Passed (%s)', - $this->test->id(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/PassedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/PassedSubscriber.php deleted file mode 100644 index 4a567381..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/PassedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PassedSubscriber extends Subscriber -{ - public function notify(Passed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php deleted file mode 100644 index fe605fff..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Code; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Skipped implements Event -{ - private Telemetry\Info $telemetryInfo; - private Code\Test $test; - private string $message; - - public function __construct(Telemetry\Info $telemetryInfo, Code\Test $test, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->test = $test; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function test(): Code\Test - { - return $this->test; - } - - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - $message = $this->message; - - if ($message !== '') { - $message = PHP_EOL . $message; - } - - return sprintf( - 'Test Skipped (%s)%s', - $this->test->id(), - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php deleted file mode 100644 index 5fd48ac6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedSubscriber extends Subscriber -{ - public function notify(Skipped $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php b/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php deleted file mode 100644 index 4a0ceab3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutput.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PrintedUnexpectedOutput implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-empty-string - */ - private string $output; - - /** - * @param non-empty-string $output - */ - public function __construct(Telemetry\Info $telemetryInfo, string $output) - { - $this->telemetryInfo = $telemetryInfo; - $this->output = $output; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function output(): string - { - return $this->output; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Printed Unexpected Output%s%s', - PHP_EOL, - $this->output, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php deleted file mode 100644 index ee201572..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PrintedUnexpectedOutputSubscriber extends Subscriber -{ - public function notify(PrintedUnexpectedOutput $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php deleted file mode 100644 index 8e91237c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MockObjectCreated implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(Telemetry\Info $telemetryInfo, string $className) - { - $this->telemetryInfo = $telemetryInfo; - $this->className = $className; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Mock Object Created (%s)', - $this->className, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php deleted file mode 100644 index 8ad2f176..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MockObjectCreatedSubscriber extends Subscriber -{ - public function notify(MockObjectCreated $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php deleted file mode 100644 index 3548189e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function implode; -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MockObjectForIntersectionOfInterfacesCreated implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var list - */ - private array $interfaces; - - /** - * @param list $interfaces - */ - public function __construct(Telemetry\Info $telemetryInfo, array $interfaces) - { - $this->telemetryInfo = $telemetryInfo; - $this->interfaces = $interfaces; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return list - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Mock Object Created (%s)', - implode('&', $this->interfaces), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php deleted file mode 100644 index 5b345b56..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MockObjectForIntersectionOfInterfacesCreatedSubscriber extends Subscriber -{ - public function notify(MockObjectForIntersectionOfInterfacesCreated $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreated.php deleted file mode 100644 index 62574781..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreated.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PartialMockObjectCreated implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $className; - - /** - * @var list - */ - private array $methodNames; - - /** - * @param class-string $className - */ - public function __construct(Telemetry\Info $telemetryInfo, string $className, string ...$methodNames) - { - $this->telemetryInfo = $telemetryInfo; - $this->className = $className; - $this->methodNames = $methodNames; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return list - */ - public function methodNames(): array - { - return $this->methodNames; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Partial Mock Object Created (%s)', - $this->className, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreatedSubscriber.php deleted file mode 100644 index e7640741..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/PartialMockObjectCreatedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface PartialMockObjectCreatedSubscriber extends Subscriber -{ - public function notify(PartialMockObjectCreated $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php deleted file mode 100644 index 667fbad4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestStubCreated implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(Telemetry\Info $telemetryInfo, string $className) - { - $this->telemetryInfo = $telemetryInfo; - $this->className = $className; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Stub Created (%s)', - $this->className, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php deleted file mode 100644 index 6b5deaf3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface TestStubCreatedSubscriber extends Subscriber -{ - public function notify(TestStubCreated $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php deleted file mode 100644 index bba93d9e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use function implode; -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestStubForIntersectionOfInterfacesCreated implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var list - */ - private array $interfaces; - - /** - * @param list $interfaces - */ - public function __construct(Telemetry\Info $telemetryInfo, array $interfaces) - { - $this->telemetryInfo = $telemetryInfo; - $this->interfaces = $interfaces; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return list - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Stub Created (%s)', - implode('&', $this->interfaces), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreatedSubscriber.php deleted file mode 100644 index aec6f66c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreatedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface TestStubForIntersectionOfInterfacesCreatedSubscriber extends Subscriber -{ - public function notify(TestStubForIntersectionOfInterfacesCreated $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinished.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinished.php deleted file mode 100644 index 8e46a00a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinished.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BootstrapFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-empty-string - */ - private string $filename; - - /** - * @param non-empty-string $filename - */ - public function __construct(Telemetry\Info $telemetryInfo, string $filename) - { - $this->telemetryInfo = $telemetryInfo; - $this->filename = $filename; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function filename(): string - { - return $this->filename; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Bootstrap Finished (%s)', - $this->filename, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinishedSubscriber.php deleted file mode 100644 index 749648ec..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/BootstrapFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface BootstrapFinishedSubscriber extends Subscriber -{ - public function notify(BootstrapFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErrored.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErrored.php deleted file mode 100644 index 2cb96422..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErrored.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessErrored implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Child Process Errored'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErroredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErroredSubscriber.php deleted file mode 100644 index 6ced5798..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessErroredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ChildProcessErroredSubscriber extends Subscriber -{ - public function notify(ChildProcessErrored $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinished.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinished.php deleted file mode 100644 index 705a0c63..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinished.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - private string $stdout; - private string $stderr; - - public function __construct(Telemetry\Info $telemetryInfo, string $stdout, string $stderr) - { - $this->telemetryInfo = $telemetryInfo; - $this->stdout = $stdout; - $this->stderr = $stderr; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function stdout(): string - { - return $this->stdout; - } - - public function stderr(): string - { - return $this->stderr; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Child Process Finished'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinishedSubscriber.php deleted file mode 100644 index 45fefa18..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ChildProcessFinishedSubscriber extends Subscriber -{ - public function notify(ChildProcessFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStarted.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStarted.php deleted file mode 100644 index 2c20471e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStarted.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessStarted implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Child Process Started'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStartedSubscriber.php deleted file mode 100644 index 4ba549ce..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ChildProcessStartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ChildProcessStartedSubscriber extends Subscriber -{ - public function notify(ChildProcessStarted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Configured.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Configured.php deleted file mode 100644 index e0d14360..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Configured.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\TextUI\Configuration\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Configured implements Event -{ - private Telemetry\Info $telemetryInfo; - private Configuration $configuration; - - public function __construct(Telemetry\Info $telemetryInfo, Configuration $configuration) - { - $this->telemetryInfo = $telemetryInfo; - $this->configuration = $configuration; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function configuration(): Configuration - { - return $this->configuration; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Configured'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ConfiguredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ConfiguredSubscriber.php deleted file mode 100644 index 0b58f70b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ConfiguredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ConfiguredSubscriber extends Subscriber -{ - public function notify(Configured $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggered.php deleted file mode 100644 index 5cfef8f7..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggered.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DeprecationTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Runner Triggered Deprecation (%s)', - $this->message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggeredSubscriber.php deleted file mode 100644 index 627ffbd0..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/DeprecationTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface DeprecationTriggeredSubscriber extends Subscriber -{ - public function notify(DeprecationTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealed.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealed.php deleted file mode 100644 index bd4f5f60..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealed.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class EventFacadeSealed implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Event Facade Sealed'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealedSubscriber.php deleted file mode 100644 index 4d0d3d01..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/EventFacadeSealedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface EventFacadeSealedSubscriber extends Subscriber -{ - public function notify(EventFacadeSealed $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAborted.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAborted.php deleted file mode 100644 index 6107e099..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAborted.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionAborted implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Execution Aborted'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAbortedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAbortedSubscriber.php deleted file mode 100644 index 00397cca..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionAbortedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ExecutionAbortedSubscriber extends Subscriber -{ - public function notify(ExecutionAborted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinished.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinished.php deleted file mode 100644 index 25789fe7..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinished.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Execution Finished'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinishedSubscriber.php deleted file mode 100644 index 9945fc77..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ExecutionFinishedSubscriber extends Subscriber -{ - public function notify(ExecutionFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStarted.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStarted.php deleted file mode 100644 index e38a2a4d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStarted.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; -use PHPUnit\Event\TestSuite\TestSuite; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionStarted implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Runner Execution Started (%d test%s)', - $this->testSuite->count(), - $this->testSuite->count() !== 1 ? 's' : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStartedSubscriber.php deleted file mode 100644 index 532f4409..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExecutionStartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ExecutionStartedSubscriber extends Subscriber -{ - public function notify(ExecutionStarted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrapped.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrapped.php deleted file mode 100644 index 4ae1a6d5..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrapped.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExtensionBootstrapped implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var class-string - */ - private string $className; - - /** - * @var array - */ - private array $parameters; - - /** - * @param class-string $className - * @param array $parameters - */ - public function __construct(Telemetry\Info $telemetryInfo, string $className, array $parameters) - { - $this->telemetryInfo = $telemetryInfo; - $this->className = $className; - $this->parameters = $parameters; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return array - */ - public function parameters(): array - { - return $this->parameters; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Extension Bootstrapped (%s)', - $this->className, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrappedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrappedSubscriber.php deleted file mode 100644 index c4c7d55c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionBootstrappedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ExtensionBootstrappedSubscriber extends Subscriber -{ - public function notify(ExtensionBootstrapped $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPhar.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPhar.php deleted file mode 100644 index 2ce358d5..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPhar.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExtensionLoadedFromPhar implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-empty-string - */ - private string $filename; - - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $version; - - /** - * @param non-empty-string $filename - * @param non-empty-string $name - * @param non-empty-string $version - */ - public function __construct(Telemetry\Info $telemetryInfo, string $filename, string $name, string $version) - { - $this->telemetryInfo = $telemetryInfo; - $this->filename = $filename; - $this->name = $name; - $this->version = $version; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function filename(): string - { - return $this->filename; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function version(): string - { - return $this->version; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Extension Loaded from PHAR (%s %s)', - $this->name, - $this->version, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPharSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPharSubscriber.php deleted file mode 100644 index fc7c2b0a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/ExtensionLoadedFromPharSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ExtensionLoadedFromPharSubscriber extends Subscriber -{ - public function notify(ExtensionLoadedFromPhar $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Finished.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Finished.php deleted file mode 100644 index 2abc685b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Finished.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Finished implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Finished'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/FinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/FinishedSubscriber.php deleted file mode 100644 index 6efc622d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/FinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FinishedSubscriber extends Subscriber -{ - public function notify(Finished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabled.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabled.php deleted file mode 100644 index 4324a5c1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabled.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GarbageCollectionDisabled implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Disabled Garbage Collection'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabledSubscriber.php deleted file mode 100644 index bb7e224f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionDisabledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface GarbageCollectionDisabledSubscriber extends Subscriber -{ - public function notify(GarbageCollectionDisabled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabled.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabled.php deleted file mode 100644 index 1c4e0888..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabled.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GarbageCollectionEnabled implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Enabled Garbage Collection'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabledSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabledSubscriber.php deleted file mode 100644 index 437eddc2..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionEnabledSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface GarbageCollectionEnabledSubscriber extends Subscriber -{ - public function notify(GarbageCollectionEnabled $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggered.php deleted file mode 100644 index d6a1ce64..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggered.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GarbageCollectionTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Triggered Garbage Collection'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggeredSubscriber.php deleted file mode 100644 index 8b941c53..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/GarbageCollectionTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface GarbageCollectionTriggeredSubscriber extends Subscriber -{ - public function notify(GarbageCollectionTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggered.php deleted file mode 100644 index a5bfa04f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggered.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class NoticeTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - private string $message; - - public function __construct(Telemetry\Info $telemetryInfo, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Runner Triggered Notice (%s)', - $this->message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggeredSubscriber.php deleted file mode 100644 index be76b2c6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/NoticeTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface NoticeTriggeredSubscriber extends Subscriber -{ - public function notify(NoticeTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Started.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Started.php deleted file mode 100644 index a5840110..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/Started.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Started implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Runner Started'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StartedSubscriber.php deleted file mode 100644 index 34240703..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface StartedSubscriber extends Subscriber -{ - public function notify(Started $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinished.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinished.php deleted file mode 100644 index d484528e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinished.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class StaticAnalysisForCodeCoverageFinished implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-negative-int - */ - private int $cacheHits; - - /** - * @var non-negative-int - */ - private int $cacheMisses; - - /** - * @param non-negative-int $cacheHits - * @param non-negative-int $cacheMisses - */ - public function __construct(Telemetry\Info $telemetryInfo, int $cacheHits, int $cacheMisses) - { - $this->telemetryInfo = $telemetryInfo; - $this->cacheHits = $cacheHits; - $this->cacheMisses = $cacheMisses; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-negative-int - */ - public function cacheHits(): int - { - return $this->cacheHits; - } - - /** - * @return non-negative-int - */ - public function cacheMisses(): int - { - return $this->cacheMisses; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Static Analysis for Code Coverage Finished (%d cache hits, %d cache misses)', - $this->cacheHits, - $this->cacheMisses, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinishedSubscriber.php deleted file mode 100644 index eaf4f348..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageFinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface StaticAnalysisForCodeCoverageFinishedSubscriber extends Subscriber -{ - public function notify(StaticAnalysisForCodeCoverageFinished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStarted.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStarted.php deleted file mode 100644 index d1210972..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStarted.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class StaticAnalysisForCodeCoverageStarted implements Event -{ - private Telemetry\Info $telemetryInfo; - - public function __construct(Telemetry\Info $telemetryInfo) - { - $this->telemetryInfo = $telemetryInfo; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Static Analysis for Code Coverage Started'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStartedSubscriber.php deleted file mode 100644 index 642bf712..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/StaticAnalysisForCodeCoverageStartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface StaticAnalysisForCodeCoverageStartedSubscriber extends Subscriber -{ - public function notify(StaticAnalysisForCodeCoverageStarted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggered.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggered.php deleted file mode 100644 index e9df01be..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggered.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class WarningTriggered implements Event -{ - private Telemetry\Info $telemetryInfo; - - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - */ - public function __construct(Telemetry\Info $telemetryInfo, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Runner Triggered Warning (%s)', - $this->message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggeredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggeredSubscriber.php deleted file mode 100644 index 9afdd18f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestRunner/WarningTriggeredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestRunner; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface WarningTriggeredSubscriber extends Subscriber -{ - public function notify(WarningTriggered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Filtered.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Filtered.php deleted file mode 100644 index 96d626ce..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Filtered.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Filtered implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Suite Filtered (%d test%s)', - $this->testSuite->count(), - $this->testSuite->count() !== 1 ? 's' : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FilteredSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FilteredSubscriber.php deleted file mode 100644 index 6bba3ad4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FilteredSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FilteredSubscriber extends Subscriber -{ - public function notify(Filtered $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Finished.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Finished.php deleted file mode 100644 index a24ca869..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Finished.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Finished implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Suite Finished (%s, %d test%s)', - $this->testSuite->name(), - $this->testSuite->count(), - $this->testSuite->count() !== 1 ? 's' : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FinishedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FinishedSubscriber.php deleted file mode 100644 index 463c6213..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/FinishedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface FinishedSubscriber extends Subscriber -{ - public function notify(Finished $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Loaded.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Loaded.php deleted file mode 100644 index d278c0dd..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Loaded.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Loaded implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Suite Loaded (%d test%s)', - $this->testSuite->count(), - $this->testSuite->count() !== 1 ? 's' : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/LoadedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/LoadedSubscriber.php deleted file mode 100644 index e43886c4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/LoadedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface LoadedSubscriber extends Subscriber -{ - public function notify(Loaded $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Skipped.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Skipped.php deleted file mode 100644 index efe9c1ff..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Skipped.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Skipped implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - private string $message; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite, string $message) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - $this->message = $message; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - public function message(): string - { - return $this->message; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Suite Skipped (%s, %s)', - $this->testSuite->name(), - $this->message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SkippedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SkippedSubscriber.php deleted file mode 100644 index 30f509fc..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SkippedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedSubscriber extends Subscriber -{ - public function notify(Skipped $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Sorted.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Sorted.php deleted file mode 100644 index a73461db..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Sorted.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Sorted implements Event -{ - private Telemetry\Info $telemetryInfo; - private int $executionOrder; - private int $executionOrderDefects; - private bool $resolveDependencies; - - public function __construct(Telemetry\Info $telemetryInfo, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies) - { - $this->telemetryInfo = $telemetryInfo; - $this->executionOrder = $executionOrder; - $this->executionOrderDefects = $executionOrderDefects; - $this->resolveDependencies = $resolveDependencies; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function executionOrder(): int - { - return $this->executionOrder; - } - - public function executionOrderDefects(): int - { - return $this->executionOrderDefects; - } - - public function resolveDependencies(): bool - { - return $this->resolveDependencies; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return 'Test Suite Sorted'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SortedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SortedSubscriber.php deleted file mode 100644 index 481eabb0..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/SortedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface SortedSubscriber extends Subscriber -{ - public function notify(Sorted $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Started.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Started.php deleted file mode 100644 index 36fee1f0..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/Started.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function sprintf; -use PHPUnit\Event\Event; -use PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Started implements Event -{ - private Telemetry\Info $telemetryInfo; - private TestSuite $testSuite; - - public function __construct(Telemetry\Info $telemetryInfo, TestSuite $testSuite) - { - $this->telemetryInfo = $telemetryInfo; - $this->testSuite = $testSuite; - } - - public function telemetryInfo(): Telemetry\Info - { - return $this->telemetryInfo; - } - - public function testSuite(): TestSuite - { - return $this->testSuite; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return sprintf( - 'Test Suite Started (%s, %d test%s)', - $this->testSuite->name(), - $this->testSuite->count(), - $this->testSuite->count() !== 1 ? 's' : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/StartedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/TestSuite/StartedSubscriber.php deleted file mode 100644 index 66c4e1b2..00000000 --- a/vendor/phpunit/phpunit/src/Event/Events/TestSuite/StartedSubscriber.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Subscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface StartedSubscriber extends Subscriber -{ - public function notify(Started $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/EventAlreadyAssignedException.php b/vendor/phpunit/phpunit/src/Event/Exception/EventAlreadyAssignedException.php deleted file mode 100644 index a7dba264..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/EventAlreadyAssignedException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class EventAlreadyAssignedException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/EventFacadeIsSealedException.php b/vendor/phpunit/phpunit/src/Event/Exception/EventFacadeIsSealedException.php deleted file mode 100644 index 96bf949d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/EventFacadeIsSealedException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class EventFacadeIsSealedException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/Exception.php b/vendor/phpunit/phpunit/src/Event/Exception/Exception.php deleted file mode 100644 index 25bf06c6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/InvalidArgumentException.php b/vendor/phpunit/phpunit/src/Event/Exception/InvalidArgumentException.php deleted file mode 100644 index 3fb060cf..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/InvalidEventException.php b/vendor/phpunit/phpunit/src/Event/Exception/InvalidEventException.php deleted file mode 100644 index 05290372..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/InvalidEventException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidEventException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/InvalidSubscriberException.php b/vendor/phpunit/phpunit/src/Event/Exception/InvalidSubscriberException.php deleted file mode 100644 index d12deb7f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/InvalidSubscriberException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidSubscriberException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/MapError.php b/vendor/phpunit/phpunit/src/Event/Exception/MapError.php deleted file mode 100644 index b97a18e6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/MapError.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class MapError extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php b/vendor/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php deleted file mode 100644 index f9926772..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Test; - -use PHPUnit\Event\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class NoComparisonFailureException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php b/vendor/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php deleted file mode 100644 index b17a4d15..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -use PHPUnit\Event\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class NoDataSetFromDataProviderException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/NoPreviousThrowableException.php b/vendor/phpunit/phpunit/src/Event/Exception/NoPreviousThrowableException.php deleted file mode 100644 index e339323c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/NoPreviousThrowableException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class NoPreviousThrowableException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/NoTestCaseObjectOnCallStackException.php b/vendor/phpunit/phpunit/src/Event/Exception/NoTestCaseObjectOnCallStackException.php deleted file mode 100644 index 35b4c25a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/NoTestCaseObjectOnCallStackException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use PHPUnit\Event\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoTestCaseObjectOnCallStackException extends RuntimeException implements Exception -{ - public function __construct() - { - parent::__construct('Cannot find TestCase object on call stack'); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/RuntimeException.php b/vendor/phpunit/phpunit/src/Event/Exception/RuntimeException.php deleted file mode 100644 index 2a444db2..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/SubscriberTypeAlreadyRegisteredException.php b/vendor/phpunit/phpunit/src/Event/Exception/SubscriberTypeAlreadyRegisteredException.php deleted file mode 100644 index ebbbd3fa..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/SubscriberTypeAlreadyRegisteredException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class SubscriberTypeAlreadyRegisteredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventException.php b/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventException.php deleted file mode 100644 index 0c121147..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownEventException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventTypeException.php b/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventTypeException.php deleted file mode 100644 index ab9432de..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/UnknownEventTypeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownEventTypeException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberException.php b/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberException.php deleted file mode 100644 index b9aaedb1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownSubscriberException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberTypeException.php b/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberTypeException.php deleted file mode 100644 index d44ff0e9..00000000 --- a/vendor/phpunit/phpunit/src/Event/Exception/UnknownSubscriberTypeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownSubscriberTypeException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Facade.php b/vendor/phpunit/phpunit/src/Event/Facade.php deleted file mode 100644 index 6348fc43..00000000 --- a/vendor/phpunit/phpunit/src/Event/Facade.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use function assert; -use function interface_exists; -use PHPUnit\Event\Telemetry\HRTime; -use PHPUnit\Event\Telemetry\SystemGarbageCollectorStatusProvider; -use PHPUnit\Runner\DeprecationCollector\Facade as DeprecationCollector; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - private static ?self $instance = null; - private Emitter $emitter; - private ?TypeMap $typeMap = null; - private ?DeferringDispatcher $deferringDispatcher = null; - private bool $sealed = false; - - public static function instance(): self - { - if (self::$instance === null) { - self::$instance = new self; - } - - return self::$instance; - } - - public static function emitter(): Emitter - { - return self::instance()->emitter; - } - - public function __construct() - { - $this->emitter = $this->createDispatchingEmitter(); - } - - /** - * @throws EventFacadeIsSealedException - * @throws UnknownSubscriberTypeException - */ - public function registerSubscribers(Subscriber ...$subscribers): void - { - foreach ($subscribers as $subscriber) { - $this->registerSubscriber($subscriber); - } - } - - /** - * @throws EventFacadeIsSealedException - * @throws UnknownSubscriberTypeException - */ - public function registerSubscriber(Subscriber $subscriber): void - { - if ($this->sealed) { - throw new EventFacadeIsSealedException; - } - - $this->deferredDispatcher()->registerSubscriber($subscriber); - } - - /** - * @throws EventFacadeIsSealedException - */ - public function registerTracer(Tracer\Tracer $tracer): void - { - if ($this->sealed) { - throw new EventFacadeIsSealedException; - } - - $this->deferredDispatcher()->registerTracer($tracer); - } - - /** - * @codeCoverageIgnore - * - * @noinspection PhpUnused - */ - public function initForIsolation(HRTime $offset): CollectingDispatcher - { - DeprecationCollector::initForIsolation(); - - $dispatcher = new CollectingDispatcher( - new DirectDispatcher($this->typeMap()), - ); - - $this->emitter = new DispatchingEmitter( - $dispatcher, - new Telemetry\System( - new Telemetry\SystemStopWatchWithOffset($offset), - new Telemetry\SystemMemoryMeter, - new SystemGarbageCollectorStatusProvider, - ), - ); - - $this->sealed = true; - - return $dispatcher; - } - - public function forward(EventCollection $events): void - { - $dispatcher = $this->deferredDispatcher(); - - foreach ($events as $event) { - $dispatcher->dispatch($event); - } - } - - public function seal(): void - { - $this->deferredDispatcher()->flush(); - - $this->sealed = true; - - $this->emitter->testRunnerEventFacadeSealed(); - } - - private function createDispatchingEmitter(): DispatchingEmitter - { - return new DispatchingEmitter( - $this->deferredDispatcher(), - $this->createTelemetrySystem(), - ); - } - - private function createTelemetrySystem(): Telemetry\System - { - return new Telemetry\System( - new Telemetry\SystemStopWatch, - new Telemetry\SystemMemoryMeter, - new SystemGarbageCollectorStatusProvider, - ); - } - - private function deferredDispatcher(): DeferringDispatcher - { - if ($this->deferringDispatcher === null) { - $this->deferringDispatcher = new DeferringDispatcher( - new DirectDispatcher($this->typeMap()), - ); - } - - return $this->deferringDispatcher; - } - - private function typeMap(): TypeMap - { - if ($this->typeMap === null) { - $typeMap = new TypeMap; - - $this->registerDefaultTypes($typeMap); - - $this->typeMap = $typeMap; - } - - return $this->typeMap; - } - - private function registerDefaultTypes(TypeMap $typeMap): void - { - $defaultEvents = [ - Application\Started::class, - Application\Finished::class, - - Test\DataProviderMethodCalled::class, - Test\DataProviderMethodFinished::class, - Test\MarkedIncomplete::class, - Test\AfterLastTestMethodCalled::class, - Test\AfterLastTestMethodErrored::class, - Test\AfterLastTestMethodFailed::class, - Test\AfterLastTestMethodFinished::class, - Test\AfterTestMethodCalled::class, - Test\AfterTestMethodErrored::class, - Test\AfterTestMethodFailed::class, - Test\AfterTestMethodFinished::class, - Test\BeforeFirstTestMethodCalled::class, - Test\BeforeFirstTestMethodErrored::class, - Test\BeforeFirstTestMethodFailed::class, - Test\BeforeFirstTestMethodFinished::class, - Test\BeforeTestMethodCalled::class, - Test\BeforeTestMethodErrored::class, - Test\BeforeTestMethodFailed::class, - Test\BeforeTestMethodFinished::class, - Test\AdditionalInformationProvided::class, - Test\ComparatorRegistered::class, - Test\ConsideredRisky::class, - Test\DeprecationTriggered::class, - Test\Errored::class, - Test\ErrorTriggered::class, - Test\Failed::class, - Test\Finished::class, - Test\NoticeTriggered::class, - Test\Passed::class, - Test\PhpDeprecationTriggered::class, - Test\PhpNoticeTriggered::class, - Test\PhpunitDeprecationTriggered::class, - Test\PhpunitNoticeTriggered::class, - Test\PhpunitErrorTriggered::class, - Test\PhpunitWarningTriggered::class, - Test\PhpWarningTriggered::class, - Test\PostConditionCalled::class, - Test\PostConditionErrored::class, - Test\PostConditionFailed::class, - Test\PostConditionFinished::class, - Test\PreConditionCalled::class, - Test\PreConditionErrored::class, - Test\PreConditionFailed::class, - Test\PreConditionFinished::class, - Test\PreparationStarted::class, - Test\Prepared::class, - Test\PreparationErrored::class, - Test\PreparationFailed::class, - Test\PrintedUnexpectedOutput::class, - Test\Skipped::class, - Test\WarningTriggered::class, - - Test\MockObjectCreated::class, - Test\MockObjectForIntersectionOfInterfacesCreated::class, - Test\PartialMockObjectCreated::class, - Test\TestStubCreated::class, - Test\TestStubForIntersectionOfInterfacesCreated::class, - - TestRunner\BootstrapFinished::class, - TestRunner\Configured::class, - TestRunner\EventFacadeSealed::class, - TestRunner\ExecutionAborted::class, - TestRunner\ExecutionFinished::class, - TestRunner\ExecutionStarted::class, - TestRunner\ExtensionLoadedFromPhar::class, - TestRunner\ExtensionBootstrapped::class, - TestRunner\Finished::class, - TestRunner\Started::class, - TestRunner\DeprecationTriggered::class, - TestRunner\NoticeTriggered::class, - TestRunner\WarningTriggered::class, - TestRunner\GarbageCollectionDisabled::class, - TestRunner\GarbageCollectionTriggered::class, - TestRunner\GarbageCollectionEnabled::class, - TestRunner\ChildProcessStarted::class, - TestRunner\ChildProcessErrored::class, - TestRunner\ChildProcessFinished::class, - TestRunner\StaticAnalysisForCodeCoverageFinished::class, - TestRunner\StaticAnalysisForCodeCoverageStarted::class, - - TestSuite\Filtered::class, - TestSuite\Finished::class, - TestSuite\Loaded::class, - TestSuite\Skipped::class, - TestSuite\Sorted::class, - TestSuite\Started::class, - ]; - - foreach ($defaultEvents as $eventClass) { - $subscriberInterface = $eventClass . 'Subscriber'; - - assert(interface_exists($subscriberInterface)); - - $typeMap->addMapping($subscriberInterface, $eventClass); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Subscriber.php b/vendor/phpunit/phpunit/src/Event/Subscriber.php deleted file mode 100644 index e0455c02..00000000 --- a/vendor/phpunit/phpunit/src/Event/Subscriber.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Subscriber -{ -} diff --git a/vendor/phpunit/phpunit/src/Event/Tracer.php b/vendor/phpunit/phpunit/src/Event/Tracer.php deleted file mode 100644 index 3b029fdf..00000000 --- a/vendor/phpunit/phpunit/src/Event/Tracer.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Tracer; - -use PHPUnit\Event\Event; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Tracer -{ - public function trace(Event $event): void; -} diff --git a/vendor/phpunit/phpunit/src/Event/TypeMap.php b/vendor/phpunit/phpunit/src/Event/TypeMap.php deleted file mode 100644 index e525e446..00000000 --- a/vendor/phpunit/phpunit/src/Event/TypeMap.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event; - -use function array_key_exists; -use function class_exists; -use function class_implements; -use function in_array; -use function interface_exists; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TypeMap -{ - /** - * @var array - */ - private array $mapping = []; - - /** - * @param class-string $subscriberInterface - * @param class-string $eventClass - * - * @throws EventAlreadyAssignedException - * @throws InvalidEventException - * @throws InvalidSubscriberException - * @throws SubscriberTypeAlreadyRegisteredException - * @throws UnknownEventException - * @throws UnknownSubscriberException - */ - public function addMapping(string $subscriberInterface, string $eventClass): void - { - $this->ensureSubscriberInterfaceExists($subscriberInterface); - $this->ensureSubscriberInterfaceExtendsInterface($subscriberInterface); - $this->ensureEventClassExists($eventClass); - $this->ensureEventClassImplementsEventInterface($eventClass); - $this->ensureSubscriberWasNotAlreadyRegistered($subscriberInterface); - $this->ensureEventWasNotAlreadyAssigned($eventClass); - - $this->mapping[$subscriberInterface] = $eventClass; - } - - public function isKnownSubscriberType(Subscriber $subscriber): bool - { - foreach (class_implements($subscriber) as $interface) { - if (array_key_exists($interface, $this->mapping)) { - return true; - } - } - - return false; - } - - public function isKnownEventType(Event $event): bool - { - return in_array($event::class, $this->mapping, true); - } - - /** - * @throws MapError - * - * @return class-string - */ - public function map(Subscriber $subscriber): string - { - foreach (class_implements($subscriber) as $interface) { - if (array_key_exists($interface, $this->mapping)) { - return $this->mapping[$interface]; - } - } - - throw new MapError( - sprintf( - 'Subscriber "%s" does not implement a known interface', - $subscriber::class, - ), - ); - } - - /** - * @param class-string $subscriberInterface - * - * @throws UnknownSubscriberException - */ - private function ensureSubscriberInterfaceExists(string $subscriberInterface): void - { - if (!interface_exists($subscriberInterface)) { - throw new UnknownSubscriberException( - sprintf( - 'Subscriber "%s" does not exist or is not an interface', - $subscriberInterface, - ), - ); - } - } - - /** - * @param class-string $eventClass - * - * @throws UnknownEventException - */ - private function ensureEventClassExists(string $eventClass): void - { - if (!class_exists($eventClass)) { - throw new UnknownEventException( - sprintf( - 'Event class "%s" does not exist', - $eventClass, - ), - ); - } - } - - /** - * @param class-string $subscriberInterface - * - * @throws InvalidSubscriberException - */ - private function ensureSubscriberInterfaceExtendsInterface(string $subscriberInterface): void - { - if (!in_array(Subscriber::class, class_implements($subscriberInterface), true)) { - throw new InvalidSubscriberException( - sprintf( - 'Subscriber "%s" does not extend Subscriber interface', - $subscriberInterface, - ), - ); - } - } - - /** - * @param class-string $eventClass - * - * @throws InvalidEventException - */ - private function ensureEventClassImplementsEventInterface(string $eventClass): void - { - if (!in_array(Event::class, class_implements($eventClass), true)) { - throw new InvalidEventException( - sprintf( - 'Event "%s" does not implement Event interface', - $eventClass, - ), - ); - } - } - - /** - * @param class-string $subscriberInterface - * - * @throws SubscriberTypeAlreadyRegisteredException - */ - private function ensureSubscriberWasNotAlreadyRegistered(string $subscriberInterface): void - { - if (array_key_exists($subscriberInterface, $this->mapping)) { - throw new SubscriberTypeAlreadyRegisteredException( - sprintf( - 'Subscriber type "%s" already registered', - $subscriberInterface, - ), - ); - } - } - - /** - * @param class-string $eventClass - * - * @throws EventAlreadyAssignedException - */ - private function ensureEventWasNotAlreadyAssigned(string $eventClass): void - { - if (in_array($eventClass, $this->mapping, true)) { - throw new EventAlreadyAssignedException( - sprintf( - 'Event "%s" already assigned', - $eventClass, - ), - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/ClassMethod.php b/vendor/phpunit/phpunit/src/Event/Value/ClassMethod.php deleted file mode 100644 index 2a94033a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/ClassMethod.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ClassMethod -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailure.php b/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailure.php deleted file mode 100644 index c31f93e6..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailure.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ComparisonFailure -{ - private string $expected; - private string $actual; - private string $diff; - - public function __construct(string $expected, string $actual, string $diff) - { - $this->expected = $expected; - $this->actual = $actual; - $this->diff = $diff; - } - - public function expected(): string - { - return $this->expected; - } - - public function actual(): string - { - return $this->actual; - } - - public function diff(): string - { - return $this->diff; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailureBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailureBuilder.php deleted file mode 100644 index 53fe0d09..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/ComparisonFailureBuilder.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use function is_bool; -use function is_scalar; -use function print_r; -use PHPUnit\Framework\ExpectationFailedException; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ComparisonFailureBuilder -{ - public static function from(Throwable $t): ?ComparisonFailure - { - if (!$t instanceof ExpectationFailedException) { - return null; - } - - if ($t->getComparisonFailure() === null) { - return null; - } - - $expectedAsString = $t->getComparisonFailure()->getExpectedAsString(); - - if ($expectedAsString === '') { - $expectedAsString = self::mapScalarValueToString($t->getComparisonFailure()->getExpected()); - } - - $actualAsString = $t->getComparisonFailure()->getActualAsString(); - - if ($actualAsString === '') { - $actualAsString = self::mapScalarValueToString($t->getComparisonFailure()->getActual()); - } - - return new ComparisonFailure( - $expectedAsString, - $actualAsString, - $t->getComparisonFailure()->getDiff(), - ); - } - - private static function mapScalarValueToString(mixed $value): string - { - if ($value === null) { - return 'null'; - } - - if (is_bool($value)) { - return $value ? 'true' : 'false'; - } - - if (is_scalar($value)) { - return print_r($value, true); - } - - return ''; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Runtime/OperatingSystem.php b/vendor/phpunit/phpunit/src/Event/Value/Runtime/OperatingSystem.php deleted file mode 100644 index 508d809f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Runtime/OperatingSystem.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Runtime; - -use const PHP_OS; -use const PHP_OS_FAMILY; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class OperatingSystem -{ - private string $operatingSystem; - private string $operatingSystemFamily; - - public function __construct() - { - $this->operatingSystem = PHP_OS; - $this->operatingSystemFamily = PHP_OS_FAMILY; - } - - public function operatingSystem(): string - { - return $this->operatingSystem; - } - - public function operatingSystemFamily(): string - { - return $this->operatingSystemFamily; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHP.php b/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHP.php deleted file mode 100644 index 46004f98..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHP.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Runtime; - -use const PHP_EXTRA_VERSION; -use const PHP_MAJOR_VERSION; -use const PHP_MINOR_VERSION; -use const PHP_RELEASE_VERSION; -use const PHP_SAPI; -use const PHP_VERSION; -use const PHP_VERSION_ID; -use function array_merge; -use function get_loaded_extensions; -use function sort; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PHP -{ - private string $version; - private int $versionId; - private int $majorVersion; - private int $minorVersion; - private int $releaseVersion; - private string $extraVersion; - private string $sapi; - - /** - * @var list - */ - private array $extensions; - - public function __construct() - { - $this->version = PHP_VERSION; - $this->versionId = PHP_VERSION_ID; - $this->majorVersion = PHP_MAJOR_VERSION; - $this->minorVersion = PHP_MINOR_VERSION; - $this->releaseVersion = PHP_RELEASE_VERSION; - $this->extraVersion = PHP_EXTRA_VERSION; - $this->sapi = PHP_SAPI; - - $extensions = array_merge( - get_loaded_extensions(true), - get_loaded_extensions(), - ); - - sort($extensions); - - $this->extensions = $extensions; - } - - public function version(): string - { - return $this->version; - } - - public function sapi(): string - { - return $this->sapi; - } - - public function majorVersion(): int - { - return $this->majorVersion; - } - - public function minorVersion(): int - { - return $this->minorVersion; - } - - public function releaseVersion(): int - { - return $this->releaseVersion; - } - - public function extraVersion(): string - { - return $this->extraVersion; - } - - public function versionId(): int - { - return $this->versionId; - } - - /** - * @return list - */ - public function extensions(): array - { - return $this->extensions; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHPUnit.php b/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHPUnit.php deleted file mode 100644 index 7f85133d..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Runtime/PHPUnit.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Runtime; - -use PHPUnit\Runner\Version; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PHPUnit -{ - private string $versionId; - private string $releaseSeries; - - public function __construct() - { - $this->versionId = Version::id(); - $this->releaseSeries = Version::series(); - } - - public function versionId(): string - { - return $this->versionId; - } - - public function releaseSeries(): string - { - return $this->releaseSeries; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Runtime/Runtime.php b/vendor/phpunit/phpunit/src/Event/Value/Runtime/Runtime.php deleted file mode 100644 index 552ec988..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Runtime/Runtime.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Runtime; - -use function sprintf; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Runtime -{ - private OperatingSystem $operatingSystem; - private PHP $php; - private PHPUnit $phpunit; - - public function __construct() - { - $this->operatingSystem = new OperatingSystem; - $this->php = new PHP; - $this->phpunit = new PHPUnit; - } - - public function asString(): string - { - $php = $this->php(); - - return sprintf( - 'PHPUnit %s using PHP %s (%s) on %s', - $this->phpunit()->versionId(), - $php->version(), - $php->sapi(), - $this->operatingSystem()->operatingSystem(), - ); - } - - public function operatingSystem(): OperatingSystem - { - return $this->operatingSystem; - } - - public function php(): PHP - { - return $this->php; - } - - public function phpunit(): PHPUnit - { - return $this->phpunit; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php deleted file mode 100644 index 230150a1..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Duration.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function floor; -use function sprintf; -use PHPUnit\Event\InvalidArgumentException; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Duration -{ - private int $seconds; - private int $nanoseconds; - - /** - * @throws InvalidArgumentException - */ - public static function fromSecondsAndNanoseconds(int $seconds, int $nanoseconds): self - { - return new self( - $seconds, - $nanoseconds, - ); - } - - /** - * @throws InvalidArgumentException - */ - private function __construct(int $seconds, int $nanoseconds) - { - $this->ensureNotNegative($seconds, 'seconds'); - $this->ensureNotNegative($nanoseconds, 'nanoseconds'); - $this->ensureNanoSecondsInRange($nanoseconds); - - $this->seconds = $seconds; - $this->nanoseconds = $nanoseconds; - } - - public function seconds(): int - { - return $this->seconds; - } - - public function nanoseconds(): int - { - return $this->nanoseconds; - } - - public function asFloat(): float - { - return $this->seconds() + ($this->nanoseconds() / 1000000000); - } - - public function asString(): string - { - $seconds = $this->seconds(); - $minutes = 0; - $hours = 0; - - if ($seconds > 60 * 60) { - $hours = floor($seconds / 60 / 60); - $seconds -= ($hours * 60 * 60); - } - - if ($seconds > 60) { - $minutes = floor($seconds / 60); - $seconds -= ($minutes * 60); - } - - return sprintf( - '%02d:%02d:%02d.%09d', - $hours, - $minutes, - $seconds, - $this->nanoseconds(), - ); - } - - public function equals(self $other): bool - { - return $this->seconds === $other->seconds && - $this->nanoseconds === $other->nanoseconds; - } - - public function isLessThan(self $other): bool - { - if ($this->seconds < $other->seconds) { - return true; - } - - if ($this->seconds > $other->seconds) { - return false; - } - - return $this->nanoseconds < $other->nanoseconds; - } - - public function isGreaterThan(self $other): bool - { - if ($this->seconds > $other->seconds) { - return true; - } - - if ($this->seconds < $other->seconds) { - return false; - } - - return $this->nanoseconds > $other->nanoseconds; - } - - /** - * @throws InvalidArgumentException - */ - private function ensureNotNegative(int $value, string $type): void - { - if ($value < 0) { - throw new InvalidArgumentException( - sprintf( - 'Value for %s must not be negative.', - $type, - ), - ); - } - } - - /** - * @throws InvalidArgumentException - */ - private function ensureNanoSecondsInRange(int $nanoseconds): void - { - if ($nanoseconds > 999999999) { - throw new InvalidArgumentException( - 'Value for nanoseconds must not be greater than 999999999.', - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php deleted file mode 100644 index f8bb77a7..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GarbageCollectorStatus -{ - private int $runs; - private int $collected; - private int $threshold; - private int $roots; - private float $applicationTime; - private float $collectorTime; - private float $destructorTime; - private float $freeTime; - private bool $running; - private bool $protected; - private bool $full; - private int $bufferSize; - - public function __construct(int $runs, int $collected, int $threshold, int $roots, float $applicationTime, float $collectorTime, float $destructorTime, float $freeTime, bool $running, bool $protected, bool $full, int $bufferSize) - { - $this->runs = $runs; - $this->collected = $collected; - $this->threshold = $threshold; - $this->roots = $roots; - $this->applicationTime = $applicationTime; - $this->collectorTime = $collectorTime; - $this->destructorTime = $destructorTime; - $this->freeTime = $freeTime; - $this->running = $running; - $this->protected = $protected; - $this->full = $full; - $this->bufferSize = $bufferSize; - } - - public function runs(): int - { - return $this->runs; - } - - public function collected(): int - { - return $this->collected; - } - - public function threshold(): int - { - return $this->threshold; - } - - public function roots(): int - { - return $this->roots; - } - - public function applicationTime(): float - { - return $this->applicationTime; - } - - public function collectorTime(): float - { - return $this->collectorTime; - } - - public function destructorTime(): float - { - return $this->destructorTime; - } - - public function freeTime(): float - { - return $this->freeTime; - } - - public function isRunning(): bool - { - return $this->running; - } - - public function isProtected(): bool - { - return $this->protected; - } - - public function isFull(): bool - { - return $this->full; - } - - public function bufferSize(): int - { - return $this->bufferSize; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatusProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatusProvider.php deleted file mode 100644 index 09bede2e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatusProvider.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface GarbageCollectorStatusProvider -{ - public function status(): GarbageCollectorStatus; -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php deleted file mode 100644 index 8a7b97eb..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/HRTime.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function sprintf; -use PHPUnit\Event\InvalidArgumentException; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class HRTime -{ - private int $seconds; - private int $nanoseconds; - - /** - * @throws InvalidArgumentException - */ - public static function fromSecondsAndNanoseconds(int $seconds, int $nanoseconds): self - { - return new self( - $seconds, - $nanoseconds, - ); - } - - /** - * @throws InvalidArgumentException - */ - private function __construct(int $seconds, int $nanoseconds) - { - $this->ensureNotNegative($seconds, 'seconds'); - $this->ensureNotNegative($nanoseconds, 'nanoseconds'); - $this->ensureNanoSecondsInRange($nanoseconds); - - $this->seconds = $seconds; - $this->nanoseconds = $nanoseconds; - } - - public function seconds(): int - { - return $this->seconds; - } - - public function nanoseconds(): int - { - return $this->nanoseconds; - } - - public function duration(self $start): Duration - { - $seconds = $this->seconds - $start->seconds(); - $nanoseconds = $this->nanoseconds - $start->nanoseconds(); - - if ($nanoseconds < 0) { - $seconds--; - - $nanoseconds += 1000000000; - } - - if ($seconds < 0) { - return Duration::fromSecondsAndNanoseconds(0, 0); - } - - return Duration::fromSecondsAndNanoseconds( - $seconds, - $nanoseconds, - ); - } - - /** - * @throws InvalidArgumentException - */ - private function ensureNotNegative(int $value, string $type): void - { - if ($value < 0) { - throw new InvalidArgumentException( - sprintf( - 'Value for %s must not be negative.', - $type, - ), - ); - } - } - - /** - * @throws InvalidArgumentException - */ - private function ensureNanoSecondsInRange(int $nanoseconds): void - { - if ($nanoseconds > 999999999) { - throw new InvalidArgumentException( - 'Value for nanoseconds must not be greater than 999999999.', - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Info.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Info.php deleted file mode 100644 index a0d0a99f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Info.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function sprintf; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Info -{ - private Snapshot $current; - private Duration $durationSinceStart; - private MemoryUsage $memorySinceStart; - private Duration $durationSincePrevious; - private MemoryUsage $memorySincePrevious; - - public function __construct(Snapshot $current, Duration $durationSinceStart, MemoryUsage $memorySinceStart, Duration $durationSincePrevious, MemoryUsage $memorySincePrevious) - { - $this->current = $current; - $this->durationSinceStart = $durationSinceStart; - $this->memorySinceStart = $memorySinceStart; - $this->durationSincePrevious = $durationSincePrevious; - $this->memorySincePrevious = $memorySincePrevious; - } - - public function time(): HRTime - { - return $this->current->time(); - } - - public function memoryUsage(): MemoryUsage - { - return $this->current->memoryUsage(); - } - - public function peakMemoryUsage(): MemoryUsage - { - return $this->current->peakMemoryUsage(); - } - - public function durationSinceStart(): Duration - { - return $this->durationSinceStart; - } - - public function memoryUsageSinceStart(): MemoryUsage - { - return $this->memorySinceStart; - } - - public function durationSincePrevious(): Duration - { - return $this->durationSincePrevious; - } - - public function memoryUsageSincePrevious(): MemoryUsage - { - return $this->memorySincePrevious; - } - - public function garbageCollectorStatus(): GarbageCollectorStatus - { - return $this->current->garbageCollectorStatus(); - } - - public function asString(): string - { - return sprintf( - '[%s / %s] [%d bytes]', - $this->durationSinceStart()->asString(), - $this->durationSincePrevious()->asString(), - $this->peakMemoryUsage()->bytes(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php deleted file mode 100644 index 4d116ff3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface MemoryMeter -{ - public function memoryUsage(): MemoryUsage; - - public function peakMemoryUsage(): MemoryUsage; -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php deleted file mode 100644 index 8ace32ea..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MemoryUsage -{ - private int $bytes; - - public static function fromBytes(int $bytes): self - { - return new self($bytes); - } - - private function __construct(int $bytes) - { - $this->bytes = $bytes; - } - - public function bytes(): int - { - return $this->bytes; - } - - public function diff(self $other): self - { - return self::fromBytes($this->bytes - $other->bytes); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php deleted file mode 100644 index 0f00f5d8..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Snapshot -{ - private HRTime $time; - private MemoryUsage $memoryUsage; - private MemoryUsage $peakMemoryUsage; - private GarbageCollectorStatus $garbageCollectorStatus; - - public function __construct(HRTime $time, MemoryUsage $memoryUsage, MemoryUsage $peakMemoryUsage, GarbageCollectorStatus $garbageCollectorStatus) - { - $this->time = $time; - $this->memoryUsage = $memoryUsage; - $this->peakMemoryUsage = $peakMemoryUsage; - $this->garbageCollectorStatus = $garbageCollectorStatus; - } - - public function time(): HRTime - { - return $this->time; - } - - public function memoryUsage(): MemoryUsage - { - return $this->memoryUsage; - } - - public function peakMemoryUsage(): MemoryUsage - { - return $this->peakMemoryUsage; - } - - public function garbageCollectorStatus(): GarbageCollectorStatus - { - return $this->garbageCollectorStatus; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php deleted file mode 100644 index 07ce5227..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface StopWatch -{ - public function current(): HRTime; -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/System.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/System.php deleted file mode 100644 index 0a178363..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/System.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class System -{ - private StopWatch $stopWatch; - private MemoryMeter $memoryMeter; - private GarbageCollectorStatusProvider $garbageCollectorStatusProvider; - - public function __construct(StopWatch $stopWatch, MemoryMeter $memoryMeter, GarbageCollectorStatusProvider $garbageCollectorStatusProvider) - { - $this->stopWatch = $stopWatch; - $this->memoryMeter = $memoryMeter; - $this->garbageCollectorStatusProvider = $garbageCollectorStatusProvider; - } - - public function snapshot(): Snapshot - { - return new Snapshot( - $this->stopWatch->current(), - $this->memoryMeter->memoryUsage(), - $this->memoryMeter->peakMemoryUsage(), - $this->garbageCollectorStatusProvider->status(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php deleted file mode 100644 index 3f33d690..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function gc_status; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class SystemGarbageCollectorStatusProvider implements GarbageCollectorStatusProvider -{ - public function status(): GarbageCollectorStatus - { - $status = gc_status(); - - return new GarbageCollectorStatus( - $status['runs'], - $status['collected'], - $status['threshold'], - $status['roots'], - $status['application_time'], - $status['collector_time'], - $status['destructor_time'], - $status['free_time'], - $status['running'], - $status['protected'], - $status['full'], - $status['buffer_size'], - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php deleted file mode 100644 index 16d895a9..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function memory_get_peak_usage; -use function memory_get_usage; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class SystemMemoryMeter implements MemoryMeter -{ - public function memoryUsage(): MemoryUsage - { - return MemoryUsage::fromBytes(memory_get_usage()); - } - - public function peakMemoryUsage(): MemoryUsage - { - return MemoryUsage::fromBytes(memory_get_peak_usage()); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php deleted file mode 100644 index a57c1032..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function hrtime; -use PHPUnit\Event\InvalidArgumentException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class SystemStopWatch implements StopWatch -{ - /** - * @throws InvalidArgumentException - */ - public function current(): HRTime - { - return HRTime::fromSecondsAndNanoseconds(...hrtime()); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php deleted file mode 100644 index d27fd98c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Telemetry; - -use function hrtime; -use PHPUnit\Event\InvalidArgumentException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ -final class SystemStopWatchWithOffset implements StopWatch -{ - private ?HRTime $offset; - - public function __construct(HRTime $offset) - { - $this->offset = $offset; - } - - /** - * @throws InvalidArgumentException - */ - public function current(): HRTime - { - if ($this->offset !== null) { - $offset = $this->offset; - - $this->offset = null; - - return $offset; - } - - return HRTime::fromSecondsAndNanoseconds(...hrtime()); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/DirectTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/DirectTrigger.php deleted file mode 100644 index bbb3c66a..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/DirectTrigger.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class DirectTrigger extends IssueTrigger -{ - /** - * Your own code triggers an issue in third-party code. - */ - public function isDirect(): true - { - return true; - } - - public function asString(): string - { - return 'issue triggered by first-party code calling into third-party code'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IndirectTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IndirectTrigger.php deleted file mode 100644 index 81f76b45..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IndirectTrigger.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IndirectTrigger extends IssueTrigger -{ - /** - * Third-party code triggers an issue either in your own code or in third-party code. - */ - public function isIndirect(): true - { - return true; - } - - public function asString(): string - { - return 'issue triggered by third-party code'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IssueTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IssueTrigger.php deleted file mode 100644 index 93e42c72..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/IssueTrigger.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class IssueTrigger -{ - public static function test(): TestTrigger - { - return new TestTrigger; - } - - public static function self(): SelfTrigger - { - return new SelfTrigger; - } - - public static function direct(): DirectTrigger - { - return new DirectTrigger; - } - - public static function indirect(): IndirectTrigger - { - return new IndirectTrigger; - } - - public static function unknown(): UnknownTrigger - { - return new UnknownTrigger; - } - - final private function __construct() - { - } - - /** - * Your test code triggers an issue. - * - * @phpstan-assert-if-true TestTrigger $this - */ - public function isTest(): bool - { - return false; - } - - /** - * Your own code triggers an issue in your own code. - * - * @phpstan-assert-if-true SelfTrigger $this - */ - public function isSelf(): bool - { - return false; - } - - /** - * Your own code triggers an issue in third-party code. - * - * @phpstan-assert-if-true DirectTrigger $this - */ - public function isDirect(): bool - { - return false; - } - - /** - * Third-party code triggers an issue either in your own code or in third-party code. - * - * @phpstan-assert-if-true IndirectTrigger $this - */ - public function isIndirect(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UnknownTrigger $this - */ - public function isUnknown(): bool - { - return false; - } - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/SelfTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/SelfTrigger.php deleted file mode 100644 index e569e72f..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/SelfTrigger.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class SelfTrigger extends IssueTrigger -{ - /** - * Your own code triggers an issue in your own code. - */ - public function isSelf(): true - { - return true; - } - - public function asString(): string - { - return 'issue triggered by first-party code calling into first-party code'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/TestTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/TestTrigger.php deleted file mode 100644 index 4768baca..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/TestTrigger.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TestTrigger extends IssueTrigger -{ - /** - * Your test code triggers an issue. - */ - public function isTest(): true - { - return true; - } - - public function asString(): string - { - return 'issue triggered by test code'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/UnknownTrigger.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/UnknownTrigger.php deleted file mode 100644 index 61f81148..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Issue/UnknownTrigger.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code\IssueTrigger; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownTrigger extends IssueTrigger -{ - public function isUnknown(): true - { - return true; - } - - public function asString(): string - { - return 'unknown if issue was triggered in first-party code or third-party code'; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Phpt.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Phpt.php deleted file mode 100644 index 65a3aec8..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Phpt.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Phpt extends Test -{ - public function isPhpt(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function id(): string - { - return $this->file(); - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->file(); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/Test.php b/vendor/phpunit/phpunit/src/Event/Value/Test/Test.php deleted file mode 100644 index 43ed73eb..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/Test.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Test -{ - /** - * @var non-empty-string - */ - private string $file; - - /** - * @param non-empty-string $file - */ - public function __construct(string $file) - { - $this->file = $file; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @phpstan-assert-if-true TestMethod $this - */ - public function isTestMethod(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Phpt $this - */ - public function isPhpt(): bool - { - return false; - } - - /** - * @return non-empty-string - */ - abstract public function id(): string; - - /** - * @return non-empty-string - */ - abstract public function name(): string; -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollection.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollection.php deleted file mode 100644 index 1924b64b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollection.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $tests; - - /** - * @param list $tests - */ - public static function fromArray(array $tests): self - { - return new self(...$tests); - } - - private function __construct(Test ...$tests) - { - $this->tests = $tests; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->tests; - } - - public function count(): int - { - return count($this->tests); - } - - public function getIterator(): TestCollectionIterator - { - return new TestCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollectionIterator.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollectionIterator.php deleted file mode 100644 index 7c96f340..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TestCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $tests; - private int $position = 0; - - public function __construct(TestCollection $tests) - { - $this->tests = $tests->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->tests); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Test - { - return $this->tests[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php deleted file mode 100644 index 981fd9e4..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataFromDataProvider extends TestData -{ - private int|string $dataSetName; - private string $dataAsStringForResultOutput; - - public static function from(int|string $dataSetName, string $data, string $dataAsStringForResultOutput): self - { - return new self($dataSetName, $data, $dataAsStringForResultOutput); - } - - protected function __construct(int|string $dataSetName, string $data, string $dataAsStringForResultOutput) - { - $this->dataSetName = $dataSetName; - $this->dataAsStringForResultOutput = $dataAsStringForResultOutput; - - parent::__construct($data); - } - - public function dataSetName(): int|string - { - return $this->dataSetName; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function dataAsStringForResultOutput(): string - { - return $this->dataAsStringForResultOutput; - } - - public function isFromDataProvider(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php deleted file mode 100644 index 9fbf17eb..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataFromTestDependency extends TestData -{ - public static function from(string $data): self - { - return new self($data); - } - - public function isFromTestDependency(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php deleted file mode 100644 index 89344480..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class TestData -{ - private string $data; - - protected function __construct(string $data) - { - $this->data = $data; - } - - public function data(): string - { - return $this->data; - } - - /** - * @phpstan-assert-if-true DataFromDataProvider $this - */ - public function isFromDataProvider(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DataFromTestDependency $this - */ - public function isFromTestDependency(): bool - { - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php deleted file mode 100644 index 460f0c0c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestDataCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $data; - private ?DataFromDataProvider $fromDataProvider; - - /** - * @param list $data - */ - public static function fromArray(array $data): self - { - return new self(...$data); - } - - private function __construct(TestData ...$data) - { - $fromDataProvider = null; - - foreach ($data as $_data) { - if ($_data->isFromDataProvider()) { - $fromDataProvider = $_data; - } - } - - $this->data = $data; - $this->fromDataProvider = $fromDataProvider; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->data; - } - - public function count(): int - { - return count($this->data); - } - - /** - * @phpstan-assert-if-true !null $this->fromDataProvider - */ - public function hasDataFromDataProvider(): bool - { - return $this->fromDataProvider !== null; - } - - /** - * @throws NoDataSetFromDataProviderException - */ - public function dataFromDataProvider(): DataFromDataProvider - { - if (!$this->hasDataFromDataProvider()) { - throw new NoDataSetFromDataProviderException; - } - - return $this->fromDataProvider; - } - - public function getIterator(): TestDataCollectionIterator - { - return new TestDataCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollectionIterator.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollectionIterator.php deleted file mode 100644 index aebed66c..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestData; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TestDataCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $data; - private int $position = 0; - - public function __construct(TestDataCollection $data) - { - $this->data = $data->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->data); - } - - public function key(): int - { - return $this->position; - } - - public function current(): TestData - { - return $this->data[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestDox.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestDox.php deleted file mode 100644 index 53604dbf..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestDox.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestDox -{ - private string $prettifiedClassName; - private string $prettifiedMethodName; - private string $prettifiedAndColorizedMethodName; - - public function __construct(string $prettifiedClassName, string $prettifiedMethodName, string $prettifiedAndColorizedMethodName) - { - $this->prettifiedClassName = $prettifiedClassName; - $this->prettifiedMethodName = $prettifiedMethodName; - $this->prettifiedAndColorizedMethodName = $prettifiedAndColorizedMethodName; - } - - public function prettifiedClassName(): string - { - return $this->prettifiedClassName; - } - - public function prettifiedMethodName(bool $colorize = false): string - { - if ($colorize) { - return $this->prettifiedAndColorizedMethodName; - } - - return $this->prettifiedMethodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php deleted file mode 100644 index 532dde00..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestDoxBuilder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use PHPUnit\Framework\TestCase; -use PHPUnit\Logging\TestDox\NamePrettifier; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDoxBuilder -{ - private static ?NamePrettifier $namePrettifier = null; - - public static function fromTestCase(TestCase $testCase): TestDox - { - $prettifier = self::namePrettifier(); - - return new TestDox( - $prettifier->prettifyTestClassName($testCase::class), - $prettifier->prettifyTestCase($testCase, false), - $prettifier->prettifyTestCase($testCase, true), - ); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function fromClassNameAndMethodName(string $className, string $methodName): TestDox - { - $prettifier = self::namePrettifier(); - - $prettifiedMethodName = $prettifier->prettifyTestMethodName($methodName); - - return new TestDox( - $prettifier->prettifyTestClassName($className), - $prettifiedMethodName, - $prettifiedMethodName, - ); - } - - private static function namePrettifier(): NamePrettifier - { - if (self::$namePrettifier === null) { - self::$namePrettifier = new NamePrettifier; - } - - return self::$namePrettifier; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethod.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethod.php deleted file mode 100644 index 4c972645..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethod.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use function is_int; -use function sprintf; -use PHPUnit\Event\TestData\TestDataCollection; -use PHPUnit\Metadata\MetadataCollection; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMethod extends Test -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @var non-negative-int - */ - private int $line; - private TestDox $testDox; - private MetadataCollection $metadata; - private TestDataCollection $testData; - - /** - * @param class-string $className - * @param non-empty-string $methodName - * @param non-empty-string $file - * @param non-negative-int $line - */ - public function __construct(string $className, string $methodName, string $file, int $line, TestDox $testDox, MetadataCollection $metadata, TestDataCollection $testData) - { - parent::__construct($file); - - $this->className = $className; - $this->methodName = $methodName; - $this->line = $line; - $this->testDox = $testDox; - $this->metadata = $metadata; - $this->testData = $testData; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - /** - * @return non-negative-int - */ - public function line(): int - { - return $this->line; - } - - public function testDox(): TestDox - { - return $this->testDox; - } - - public function metadata(): MetadataCollection - { - return $this->metadata; - } - - public function testData(): TestDataCollection - { - return $this->testData; - } - - public function isTestMethod(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function id(): string - { - $buffer = $this->className . '::' . $this->methodName; - - if ($this->testData()->hasDataFromDataProvider()) { - $buffer .= '#' . $this->testData->dataFromDataProvider()->dataSetName(); - } - - return $buffer; - } - - /** - * @return non-empty-string - */ - public function nameWithClass(): string - { - return $this->className . '::' . $this->name(); - } - - /** - * @return non-empty-string - */ - public function name(): string - { - if (!$this->testData->hasDataFromDataProvider()) { - return $this->methodName; - } - - $dataSetName = $this->testData->dataFromDataProvider()->dataSetName(); - - if (is_int($dataSetName)) { - $dataSetName = sprintf( - ' with data set #%d', - $dataSetName, - ); - } else { - $dataSetName = sprintf( - ' with data set "%s"', - $dataSetName, - ); - } - - return $this->methodName . $dataSetName; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php deleted file mode 100644 index dc1a32ef..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Test/TestMethodBuilder.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use function is_numeric; -use PHPUnit\Event\TestData\DataFromDataProvider; -use PHPUnit\Event\TestData\DataFromTestDependency; -use PHPUnit\Event\TestData\TestDataCollection; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Util\Exporter; -use PHPUnit\Util\Reflection; -use PHPUnit\Util\Test as TestUtil; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMethodBuilder -{ - public static function fromTestCase(TestCase $testCase, bool $useTestCaseForTestDox = true): TestMethod - { - $methodName = $testCase->name(); - $location = Reflection::sourceLocationFor($testCase::class, $methodName); - - if ($useTestCaseForTestDox) { - $testDox = TestDoxBuilder::fromTestCase($testCase); - } else { - $testDox = TestDoxBuilder::fromClassNameAndMethodName($testCase::class, $testCase->name()); - } - - return new TestMethod( - $testCase::class, - $methodName, - $location['file'], - $location['line'], - $testDox, - MetadataRegistry::parser()->forClassAndMethod($testCase::class, $methodName), - self::dataFor($testCase), - ); - } - - /** - * @throws NoTestCaseObjectOnCallStackException - */ - public static function fromCallStack(): TestMethod - { - return TestUtil::currentTestCase()->valueObjectForEvents(); - } - - private static function dataFor(TestCase $testCase): TestDataCollection - { - $testData = []; - - if ($testCase->usesDataProvider()) { - $dataSetName = $testCase->dataName(); - - if (is_numeric($dataSetName)) { - $dataSetName = (int) $dataSetName; - } - - $testData[] = DataFromDataProvider::from( - $dataSetName, - Exporter::shortenedRecursiveExport($testCase->providedData()), - $testCase->dataSetAsStringWithData(), - ); - } - - if ($testCase->hasDependencyInput()) { - $testData[] = DataFromTestDependency::from( - Exporter::shortenedRecursiveExport($testCase->dependencyInput()), - ); - } - - return TestDataCollection::fromArray($testData); - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuite.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuite.php deleted file mode 100644 index 783de57b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuite.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Code\TestCollection; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class TestSuite -{ - /** - * @var non-empty-string - */ - private string $name; - private int $count; - private TestCollection $tests; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name, int $size, TestCollection $tests) - { - $this->name = $name; - $this->count = $size; - $this->tests = $tests; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - public function count(): int - { - return $this->count; - } - - public function tests(): TestCollection - { - return $this->tests; - } - - /** - * @phpstan-assert-if-true TestSuiteWithName $this - */ - public function isWithName(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TestSuiteForTestClass $this - */ - public function isForTestClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TestSuiteForTestMethodWithDataProvider $this - */ - public function isForTestMethodWithDataProvider(): bool - { - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php deleted file mode 100644 index 3192636b..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use function assert; -use function class_exists; -use function count; -use function explode; -use function method_exists; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Code\TestCollection; -use PHPUnit\Event\RuntimeException; -use PHPUnit\Framework\DataProviderTestSuite; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite as FrameworkTestSuite; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use ReflectionClass; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteBuilder -{ - /** - * @throws RuntimeException - */ - public static function from(FrameworkTestSuite $testSuite): TestSuite - { - $tests = []; - - self::process($testSuite, $tests); - - if ($testSuite instanceof DataProviderTestSuite) { - assert(count(explode('::', $testSuite->name())) === 2); - [$className, $methodName] = explode('::', $testSuite->name()); - - assert(class_exists($className)); - assert($methodName !== '' && method_exists($className, $methodName)); - - $reflector = new ReflectionMethod($className, $methodName); - - $file = $reflector->getFileName(); - $line = $reflector->getStartLine(); - - assert($file !== false); - assert($line !== false); - - return new TestSuiteForTestMethodWithDataProvider( - $testSuite->name(), - $testSuite->count(), - TestCollection::fromArray($tests), - $className, - $methodName, - $file, - $line, - ); - } - - if ($testSuite->isForTestClass()) { - $testClassName = $testSuite->name(); - - assert(class_exists($testClassName)); - - $reflector = new ReflectionClass($testClassName); - - $file = $reflector->getFileName(); - $line = $reflector->getStartLine(); - - assert($file !== false); - assert($line !== false); - - return new TestSuiteForTestClass( - $testClassName, - $testSuite->count(), - TestCollection::fromArray($tests), - $file, - $line, - ); - } - - return new TestSuiteWithName( - $testSuite->name(), - $testSuite->count(), - TestCollection::fromArray($tests), - ); - } - - /** - * @param list $tests - */ - private static function process(FrameworkTestSuite $testSuite, array &$tests): void - { - foreach ($testSuite->getIterator() as $test) { - if ($test instanceof FrameworkTestSuite) { - self::process($test, $tests); - - continue; - } - - if ($test instanceof TestCase || $test instanceof PhptTestCase) { - $tests[] = $test->valueObjectForEvents(); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestClass.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestClass.php deleted file mode 100644 index 34ad9d5e..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestClass.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Code\TestCollection; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteForTestClass extends TestSuite -{ - /** - * @var class-string - */ - private string $className; - private string $file; - private int $line; - - /** - * @param class-string $name - */ - public function __construct(string $name, int $size, TestCollection $tests, string $file, int $line) - { - parent::__construct($name, $size, $tests); - - $this->className = $name; - $this->file = $file; - $this->line = $line; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - public function file(): string - { - return $this->file; - } - - public function line(): int - { - return $this->line; - } - - public function isForTestClass(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestMethodWithDataProvider.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestMethodWithDataProvider.php deleted file mode 100644 index 67a94391..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteForTestMethodWithDataProvider.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -use PHPUnit\Event\Code\TestCollection; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteForTestMethodWithDataProvider extends TestSuite -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - private string $file; - private int $line; - - /** - * @param non-empty-string $name - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $name, int $size, TestCollection $tests, string $className, string $methodName, string $file, int $line) - { - parent::__construct($name, $size, $tests); - - $this->className = $className; - $this->methodName = $methodName; - $this->file = $file; - $this->line = $line; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function file(): string - { - return $this->file; - } - - public function line(): int - { - return $this->line; - } - - public function isForTestMethodWithDataProvider(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteWithName.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteWithName.php deleted file mode 100644 index 4823fb26..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteWithName.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\TestSuite; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteWithName extends TestSuite -{ - public function isWithName(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/Throwable.php b/vendor/phpunit/phpunit/src/Event/Value/Throwable.php deleted file mode 100644 index e48cf1a3..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/Throwable.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use const PHP_EOL; -use PHPUnit\Event\NoPreviousThrowableException; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Throwable -{ - /** - * @var class-string - */ - private string $className; - private string $message; - private string $description; - private string $stackTrace; - private ?Throwable $previous; - - /** - * @param class-string $className - */ - public function __construct(string $className, string $message, string $description, string $stackTrace, ?self $previous) - { - $this->className = $className; - $this->message = $message; - $this->description = $description; - $this->stackTrace = $stackTrace; - $this->previous = $previous; - } - - /** - * @throws NoPreviousThrowableException - */ - public function asString(): string - { - $buffer = $this->description(); - - if ($this->stackTrace() !== '') { - $buffer .= PHP_EOL . $this->stackTrace(); - } - - if ($this->hasPrevious()) { - $buffer .= PHP_EOL . 'Caused by' . PHP_EOL . $this->previous()->asString(); - } - - return $buffer; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - public function message(): string - { - return $this->message; - } - - public function description(): string - { - return $this->description; - } - - public function stackTrace(): string - { - return $this->stackTrace; - } - - /** - * @phpstan-assert-if-true !null $this->previous - */ - public function hasPrevious(): bool - { - return $this->previous !== null; - } - - /** - * @throws NoPreviousThrowableException - */ - public function previous(): self - { - if ($this->previous === null) { - throw new NoPreviousThrowableException; - } - - return $this->previous; - } -} diff --git a/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php deleted file mode 100644 index 7db4beea..00000000 --- a/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Event\Code; - -use PHPUnit\Event\NoPreviousThrowableException; -use PHPUnit\Framework\Exception; -use PHPUnit\Util\Filter; -use PHPUnit\Util\ThrowableToStringMapper; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ThrowableBuilder -{ - /** - * @throws Exception - * @throws NoPreviousThrowableException - */ - public static function from(\Throwable $t): Throwable - { - $previous = $t->getPrevious(); - - if ($previous !== null) { - $previous = self::from($previous); - } - - return new Throwable( - $t::class, - $t->getMessage(), - ThrowableToStringMapper::map($t), - Filter::stackTraceFromThrowableAsString($t, false), - $previous, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Exception.php b/vendor/phpunit/phpunit/src/Exception.php deleted file mode 100644 index 7a8302e2..00000000 --- a/vendor/phpunit/phpunit/src/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php deleted file mode 100644 index 91f940af..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Assert.php +++ /dev/null @@ -1,3250 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function array_combine; -use function array_intersect_key; -use function class_exists; -use function count; -use function file_get_contents; -use function interface_exists; -use function is_bool; -use function sprintf; -use ArrayAccess; -use Countable; -use Generator; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\Constraint\ArrayHasKey; -use PHPUnit\Framework\Constraint\Callback; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\Count; -use PHPUnit\Framework\Constraint\DirectoryExists; -use PHPUnit\Framework\Constraint\FileExists; -use PHPUnit\Framework\Constraint\GreaterThan; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEmpty; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\Constraint\IsEqualCanonicalizing; -use PHPUnit\Framework\Constraint\IsEqualIgnoringCase; -use PHPUnit\Framework\Constraint\IsEqualWithDelta; -use PHPUnit\Framework\Constraint\IsFalse; -use PHPUnit\Framework\Constraint\IsFinite; -use PHPUnit\Framework\Constraint\IsIdentical; -use PHPUnit\Framework\Constraint\IsInfinite; -use PHPUnit\Framework\Constraint\IsInstanceOf; -use PHPUnit\Framework\Constraint\IsJson; -use PHPUnit\Framework\Constraint\IsList; -use PHPUnit\Framework\Constraint\IsNan; -use PHPUnit\Framework\Constraint\IsNull; -use PHPUnit\Framework\Constraint\IsReadable; -use PHPUnit\Framework\Constraint\IsTrue; -use PHPUnit\Framework\Constraint\IsType; -use PHPUnit\Framework\Constraint\IsWritable; -use PHPUnit\Framework\Constraint\JsonMatches; -use PHPUnit\Framework\Constraint\LessThan; -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\Constraint\LogicalOr; -use PHPUnit\Framework\Constraint\LogicalXor; -use PHPUnit\Framework\Constraint\ObjectEquals; -use PHPUnit\Framework\Constraint\ObjectHasProperty; -use PHPUnit\Framework\Constraint\RegularExpression; -use PHPUnit\Framework\Constraint\SameSize; -use PHPUnit\Framework\Constraint\StringContains; -use PHPUnit\Framework\Constraint\StringEndsWith; -use PHPUnit\Framework\Constraint\StringEqualsStringIgnoringLineEndings; -use PHPUnit\Framework\Constraint\StringMatchesFormatDescription; -use PHPUnit\Framework\Constraint\StringStartsWith; -use PHPUnit\Framework\Constraint\TraversableContainsEqual; -use PHPUnit\Framework\Constraint\TraversableContainsIdentical; -use PHPUnit\Framework\Constraint\TraversableContainsOnly; -use PHPUnit\Util\Xml\Loader as XmlLoader; -use PHPUnit\Util\Xml\XmlException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Assert -{ - private static int $count = 0; - - /** - * Asserts that two arrays are equal while only considering a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeConsidered - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayIsEqualToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = ''): void - { - $filteredExpected = []; - - foreach ($keysToBeConsidered as $key) { - if (isset($expected[$key])) { - $filteredExpected[$key] = $expected[$key]; - } - } - - $filteredActual = []; - - foreach ($keysToBeConsidered as $key) { - if (isset($actual[$key])) { - $filteredActual[$key] = $actual[$key]; - } - } - - self::assertEquals($filteredExpected, $filteredActual, $message); - } - - /** - * Asserts that two arrays are equal while ignoring a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeIgnored - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayIsEqualToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = ''): void - { - foreach ($keysToBeIgnored as $key) { - unset($expected[$key], $actual[$key]); - } - - self::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two arrays are identical while only considering a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeConsidered - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = ''): void - { - $keysToBeConsidered = array_combine($keysToBeConsidered, $keysToBeConsidered); - $expected = array_intersect_key($expected, $keysToBeConsidered); - $actual = array_intersect_key($actual, $keysToBeConsidered); - - self::assertSame($expected, $actual, $message); - } - - /** - * Asserts that two arrays are equal while ignoring a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeIgnored - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayIsIdenticalToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = ''): void - { - foreach ($keysToBeIgnored as $key) { - unset($expected[$key], $actual[$key]); - } - - self::assertSame($expected, $actual, $message); - } - - /** - * Asserts that an array has a specified key. - * - * @param array|ArrayAccess $array - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayHasKey(mixed $key, array|ArrayAccess $array, string $message = ''): void - { - $constraint = new ArrayHasKey($key); - - self::assertThat($array, $constraint, $message); - } - - /** - * Asserts that an array does not have a specified key. - * - * @param array|ArrayAccess $array - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertArrayNotHasKey(mixed $key, array|ArrayAccess $array, string $message = ''): void - { - $constraint = new LogicalNot( - new ArrayHasKey($key), - ); - - self::assertThat($array, $constraint, $message); - } - - /** - * @phpstan-assert list $array - * - * @throws ExpectationFailedException - */ - final public static function assertIsList(mixed $array, string $message = ''): void - { - self::assertThat( - $array, - new IsList, - $message, - ); - } - - /** - * Asserts that a haystack contains a needle. - * - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertContains(mixed $needle, iterable $haystack, string $message = ''): void - { - $constraint = new TraversableContainsIdentical($needle); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsEquals(mixed $needle, iterable $haystack, string $message = ''): void - { - $constraint = new TraversableContainsEqual($needle); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a haystack does not contain a needle. - * - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertNotContains(mixed $needle, iterable $haystack, string $message = ''): void - { - $constraint = new LogicalNot( - new TraversableContainsIdentical($needle), - ); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertNotContainsEquals(mixed $needle, iterable $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new TraversableContainsEqual($needle)); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a haystack contains only values of a given type. - * - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 - */ - final public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - if ($isNativeType === null) { - $isNativeType = self::isNativeType($type); - } - - if ($isNativeType) { - $replacement = match ($type) { - 'array' => 'assertContainsOnlyArray', - 'bool' => 'assertContainsOnlyBool', - 'boolean' => 'assertContainsOnlyBool', - 'callable' => 'assertContainsOnlyCallable', - 'double' => 'assertContainsOnlyFloat', - 'float' => 'assertContainsOnlyFloat', - 'int' => 'assertContainsOnlyInt', - 'integer' => 'assertContainsOnlyInt', - 'iterable' => 'assertContainsOnlyIterable', - 'null' => 'assertContainsOnlyNull', - 'numeric' => 'assertContainsOnlyNumeric', - 'object' => 'assertContainsOnlyObject', - 'real' => 'assertContainsOnlyFloat', - 'resource' => 'assertContainsOnlyResource', - 'resource (closed)' => 'assertContainsOnlyClosedResource', - 'scalar' => 'assertContainsOnlyScalar', - 'string' => 'assertContainsOnlyString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' . - 'Please use %s($haystack) instead of assertContainsOnly(\'%s\', $haystack).', - $replacement, - $type, - ), - ); - - $constraint = TraversableContainsOnly::forNativeType(self::mapNativeType($type)); - } else { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertContainsOnly() is deprecated and will be removed in PHPUnit 13. ' . - 'Please use assertContainsOnlyInstancesOf(\'%s\', $haystack) instead of assertContainsOnly(\'%s\', $haystack).', - $type, - $type, - ), - ); - - /** @phpstan-ignore argument.type */ - $constraint = TraversableContainsOnly::forClassOrInterface($type); - } - - self::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a haystack contains only values of type array. - * - * @phpstan-assert iterable> $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyArray(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Array, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type bool. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyBool(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Bool, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type callable. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyCallable(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Callable, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type float. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyFloat(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Float, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type int. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyInt(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Int, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type iterable. - * - * @phpstan-assert iterable> $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyIterable(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Iterable, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type null. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyNull(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Null, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type numeric. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyNumeric(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Numeric, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type object. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyObject(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Object, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type resource. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyResource(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Resource, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type closed resource. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyClosedResource(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::ClosedResource, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type scalar. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyScalar(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Scalar, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only values of type string. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyString(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forNativeType( - NativeType::String, - ), - $message, - ); - } - - /** - * Asserts that a haystack contains only instances of a specified interface or class name. - * - * @template T - * - * @phpstan-assert iterable $haystack - * - * @param class-string $className - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - TraversableContainsOnly::forClassOrInterface($className), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of a given type. - * - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 - */ - final public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - if ($isNativeType === null) { - $isNativeType = self::isNativeType($type); - } - - if ($isNativeType) { - $replacement = match ($type) { - 'array' => 'assertContainsNotOnlyArray', - 'bool' => 'assertContainsNotOnlyBool', - 'boolean' => 'assertContainsNotOnlyBool', - 'callable' => 'assertContainsNotOnlyCallable', - 'double' => 'assertContainsNotOnlyFloat', - 'float' => 'assertContainsNotOnlyFloat', - 'int' => 'assertContainsNotOnlyInt', - 'integer' => 'assertContainsNotOnlyInt', - 'iterable' => 'assertContainsNotOnlyIterable', - 'null' => 'assertContainsNotOnlyNull', - 'numeric' => 'assertContainsNotOnlyNumeric', - 'object' => 'assertContainsNotOnlyObject', - 'real' => 'assertContainsNotOnlyFloat', - 'resource' => 'assertContainsNotOnlyResource', - 'resource (closed)' => 'assertContainsNotOnlyClosedResource', - 'scalar' => 'assertContainsNotOnlyScalar', - 'string' => 'assertContainsNotOnlyString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' . - 'Please use %s($haystack) instead of assertNotContainsOnly(\'%s\', $haystack).', - $replacement, - $type, - ), - ); - - $constraint = TraversableContainsOnly::forNativeType(self::mapNativeType($type)); - } else { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 13. ' . - 'Please use assertContainsNotOnlyInstancesOf(\'%s\', $haystack) instead of assertNotContainsOnly(\'%s\', $haystack).', - $type, - $type, - ), - ); - - /** @phpstan-ignore argument.type */ - $constraint = TraversableContainsOnly::forClassOrInterface($type); - } - - self::assertThat( - $haystack, - new LogicalNot($constraint), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type array. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyArray(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Array, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type bool. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyBool(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Bool, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type callable. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyCallable(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Callable, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type float. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyFloat(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Float, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type int. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyInt(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Int, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type iterable. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyIterable(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Iterable, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type null. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyNull(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Null, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type numeric. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyNumeric(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Numeric, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type object. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyObject(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Object, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type resource. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyResource(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Resource, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type closed resource. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyClosedResource(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::ClosedResource, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type scalar. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyScalar(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Scalar, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only values of type string. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyString(iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::String, - ), - ), - $message, - ); - } - - /** - * Asserts that a haystack does not contain only instances of a specified interface or class name. - * - * @param class-string $className - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - */ - final public static function assertContainsNotOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - self::assertThat( - $haystack, - new LogicalNot( - TraversableContainsOnly::forClassOrInterface($className), - ), - $message, - ); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertCount(int $expectedCount, Countable|iterable $haystack, string $message = ''): void - { - if ($haystack instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$haystack'); - } - - self::assertThat( - $haystack, - new Count($expectedCount), - $message, - ); - } - - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertNotCount(int $expectedCount, Countable|iterable $haystack, string $message = ''): void - { - if ($haystack instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$haystack'); - } - - $constraint = new LogicalNot( - new Count($expectedCount), - ); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that two variables are equal. - * - * @throws ExpectationFailedException - */ - final public static function assertEquals(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new IsEqual($expected); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new IsEqualCanonicalizing($expected); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new IsEqualIgnoringCase($expected); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are equal (with delta). - * - * @throws ExpectationFailedException - */ - final public static function assertEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = ''): void - { - $constraint = new IsEqualWithDelta( - $expected, - $delta, - ); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal. - * - * @throws ExpectationFailedException - */ - final public static function assertNotEquals(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqual($expected), - ); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertNotEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqualCanonicalizing($expected), - ); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertNotEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqualIgnoringCase($expected), - ); - - self::assertThat($actual, $constraint, $message); - } - - /** - * Asserts that two variables are not equal (with delta). - * - * @throws ExpectationFailedException - */ - final public static function assertNotEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = ''): void - { - $constraint = new LogicalNot( - new IsEqualWithDelta( - $expected, - $delta, - ), - ); - - self::assertThat($actual, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - self::assertThat( - $actual, - self::objectEquals($expected, $method), - $message, - ); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertObjectNotEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - self::assertThat( - $actual, - self::logicalNot( - self::objectEquals($expected, $method), - ), - $message, - ); - } - - /** - * Asserts that a variable is empty. - * - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertEmpty(mixed $actual, string $message = ''): void - { - if ($actual instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$actual'); - } - - self::assertThat($actual, self::isEmpty(), $message); - } - - /** - * Asserts that a variable is not empty. - * - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertNotEmpty(mixed $actual, string $message = ''): void - { - if ($actual instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$actual'); - } - - self::assertThat($actual, self::logicalNot(self::isEmpty()), $message); - } - - /** - * Asserts that a value is greater than another value. - * - * @throws ExpectationFailedException - */ - final public static function assertGreaterThan(mixed $minimum, mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::greaterThan($minimum), $message); - } - - /** - * Asserts that a value is greater than or equal to another value. - * - * @throws ExpectationFailedException - */ - final public static function assertGreaterThanOrEqual(mixed $minimum, mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - self::greaterThanOrEqual($minimum), - $message, - ); - } - - /** - * Asserts that a value is smaller than another value. - * - * @throws ExpectationFailedException - */ - final public static function assertLessThan(mixed $maximum, mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::lessThan($maximum), $message); - } - - /** - * Asserts that a value is smaller than or equal to another value. - * - * @throws ExpectationFailedException - */ - final public static function assertLessThanOrEqual(mixed $maximum, mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::lessThanOrEqual($maximum), $message); - } - - /** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws ExpectationFailedException - */ - final public static function assertFileEquals(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new IsEqual(file_get_contents($expected)); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is equal to the contents of another - * file (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new IsEqualCanonicalizing( - file_get_contents($expected), - ); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is equal to the contents of another - * file (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new IsEqualIgnoringCase(file_get_contents($expected)); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is not equal to the contents of - * another file. - * - * @throws ExpectationFailedException - */ - final public static function assertFileNotEquals(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new LogicalNot( - new IsEqual(file_get_contents($expected)), - ); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is not equal to the contents of another - * file (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new LogicalNot( - new IsEqualCanonicalizing(file_get_contents($expected)), - ); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of one file is not equal to the contents of another - * file (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void - { - self::assertFileExists($expected, $message); - self::assertFileExists($actual, $message); - - $constraint = new LogicalNot( - new IsEqualIgnoringCase(file_get_contents($expected)), - ); - - self::assertThat(file_get_contents($actual), $constraint, $message); - } - - /** - * Asserts that the contents of a string is equal - * to the contents of a file. - * - * @throws ExpectationFailedException - */ - final public static function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new IsEqual(file_get_contents($expectedFile)); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is equal - * to the contents of a file (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new IsEqualCanonicalizing(file_get_contents($expectedFile)); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is equal - * to the contents of a file (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new IsEqualIgnoringCase(file_get_contents($expectedFile)); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is not equal - * to the contents of a file. - * - * @throws ExpectationFailedException - */ - final public static function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new LogicalNot( - new IsEqual(file_get_contents($expectedFile)), - ); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is not equal - * to the contents of a file (canonicalizing). - * - * @throws ExpectationFailedException - */ - final public static function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new LogicalNot( - new IsEqualCanonicalizing(file_get_contents($expectedFile)), - ); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that the contents of a string is not equal - * to the contents of a file (ignoring case). - * - * @throws ExpectationFailedException - */ - final public static function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $constraint = new LogicalNot( - new IsEqualIgnoringCase(file_get_contents($expectedFile)), - ); - - self::assertThat($actualString, $constraint, $message); - } - - /** - * Asserts that a file/dir is readable. - * - * @throws ExpectationFailedException - */ - final public static function assertIsReadable(string $filename, string $message = ''): void - { - self::assertThat($filename, new IsReadable, $message); - } - - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws ExpectationFailedException - */ - final public static function assertIsNotReadable(string $filename, string $message = ''): void - { - self::assertThat($filename, new LogicalNot(new IsReadable), $message); - } - - /** - * Asserts that a file/dir exists and is writable. - * - * @throws ExpectationFailedException - */ - final public static function assertIsWritable(string $filename, string $message = ''): void - { - self::assertThat($filename, new IsWritable, $message); - } - - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - */ - final public static function assertIsNotWritable(string $filename, string $message = ''): void - { - self::assertThat($filename, new LogicalNot(new IsWritable), $message); - } - - /** - * Asserts that a directory exists. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryExists(string $directory, string $message = ''): void - { - self::assertThat($directory, new DirectoryExists, $message); - } - - /** - * Asserts that a directory does not exist. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void - { - self::assertThat($directory, new LogicalNot(new DirectoryExists), $message); - } - - /** - * Asserts that a directory exists and is readable. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryIsReadable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsReadable($directory, $message); - } - - /** - * Asserts that a directory exists and is not readable. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryIsNotReadable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsNotReadable($directory, $message); - } - - /** - * Asserts that a directory exists and is writable. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryIsWritable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsWritable($directory, $message); - } - - /** - * Asserts that a directory exists and is not writable. - * - * @throws ExpectationFailedException - */ - final public static function assertDirectoryIsNotWritable(string $directory, string $message = ''): void - { - self::assertDirectoryExists($directory, $message); - self::assertIsNotWritable($directory, $message); - } - - /** - * Asserts that a file exists. - * - * @throws ExpectationFailedException - */ - final public static function assertFileExists(string $filename, string $message = ''): void - { - self::assertThat($filename, new FileExists, $message); - } - - /** - * Asserts that a file does not exist. - * - * @throws ExpectationFailedException - */ - final public static function assertFileDoesNotExist(string $filename, string $message = ''): void - { - self::assertThat($filename, new LogicalNot(new FileExists), $message); - } - - /** - * Asserts that a file exists and is readable. - * - * @throws ExpectationFailedException - */ - final public static function assertFileIsReadable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsReadable($file, $message); - } - - /** - * Asserts that a file exists and is not readable. - * - * @throws ExpectationFailedException - */ - final public static function assertFileIsNotReadable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsNotReadable($file, $message); - } - - /** - * Asserts that a file exists and is writable. - * - * @throws ExpectationFailedException - */ - final public static function assertFileIsWritable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsWritable($file, $message); - } - - /** - * Asserts that a file exists and is not writable. - * - * @throws ExpectationFailedException - */ - final public static function assertFileIsNotWritable(string $file, string $message = ''): void - { - self::assertFileExists($file, $message); - self::assertIsNotWritable($file, $message); - } - - /** - * Asserts that a condition is true. - * - * @throws ExpectationFailedException - * - * @phpstan-assert true $condition - */ - final public static function assertTrue(mixed $condition, string $message = ''): void - { - self::assertThat($condition, self::isTrue(), $message); - } - - /** - * Asserts that a condition is not true. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !true $condition - */ - final public static function assertNotTrue(mixed $condition, string $message = ''): void - { - self::assertThat($condition, self::logicalNot(self::isTrue()), $message); - } - - /** - * Asserts that a condition is false. - * - * @throws ExpectationFailedException - * - * @phpstan-assert false $condition - */ - final public static function assertFalse(mixed $condition, string $message = ''): void - { - self::assertThat($condition, self::isFalse(), $message); - } - - /** - * Asserts that a condition is not false. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !false $condition - */ - final public static function assertNotFalse(mixed $condition, string $message = ''): void - { - self::assertThat($condition, self::logicalNot(self::isFalse()), $message); - } - - /** - * Asserts that a variable is null. - * - * @throws ExpectationFailedException - * - * @phpstan-assert null $actual - */ - final public static function assertNull(mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::isNull(), $message); - } - - /** - * Asserts that a variable is not null. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !null $actual - */ - final public static function assertNotNull(mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::logicalNot(self::isNull()), $message); - } - - /** - * Asserts that a variable is finite. - * - * @throws ExpectationFailedException - */ - final public static function assertFinite(mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::isFinite(), $message); - } - - /** - * Asserts that a variable is infinite. - * - * @throws ExpectationFailedException - */ - final public static function assertInfinite(mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::isInfinite(), $message); - } - - /** - * Asserts that a variable is nan. - * - * @throws ExpectationFailedException - */ - final public static function assertNan(mixed $actual, string $message = ''): void - { - self::assertThat($actual, self::isNan(), $message); - } - - /** - * Asserts that an object has a specified property. - * - * @throws ExpectationFailedException - */ - final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void - { - self::assertThat( - $object, - new ObjectHasProperty($propertyName), - $message, - ); - } - - /** - * Asserts that an object does not have a specified property. - * - * @throws ExpectationFailedException - */ - final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void - { - self::assertThat( - $object, - new LogicalNot( - new ObjectHasProperty($propertyName), - ), - $message, - ); - } - - /** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @template ExpectedType - * - * @param ExpectedType $expected - * - * @throws ExpectationFailedException - * - * @phpstan-assert =ExpectedType $actual - */ - final public static function assertSame(mixed $expected, mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsIdentical($expected), - $message, - ); - } - - /** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. - * - * @throws ExpectationFailedException - */ - final public static function assertNotSame(mixed $expected, mixed $actual, string $message = ''): void - { - if (is_bool($expected) && is_bool($actual)) { - self::assertNotEquals($expected, $actual, $message); - } - - self::assertThat( - $actual, - new LogicalNot( - new IsIdentical($expected), - ), - $message, - ); - } - - /** - * Asserts that a variable is of a given type. - * - * @template ExpectedType of object - * - * @param class-string $expected - * - * @throws Exception - * @throws ExpectationFailedException - * @throws UnknownClassOrInterfaceException - * - * @phpstan-assert =ExpectedType $actual - */ - final public static function assertInstanceOf(string $expected, mixed $actual, string $message = ''): void - { - if (!class_exists($expected) && !interface_exists($expected)) { - throw new UnknownClassOrInterfaceException($expected); - } - - self::assertThat( - $actual, - new IsInstanceOf($expected), - $message, - ); - } - - /** - * Asserts that a variable is not of a given type. - * - * @template ExpectedType of object - * - * @param class-string $expected - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !ExpectedType $actual - */ - final public static function assertNotInstanceOf(string $expected, mixed $actual, string $message = ''): void - { - if (!class_exists($expected) && !interface_exists($expected)) { - throw new UnknownClassOrInterfaceException($expected); - } - - self::assertThat( - $actual, - new LogicalNot( - new IsInstanceOf($expected), - ), - $message, - ); - } - - /** - * Asserts that a variable is of type array. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert array $actual - */ - final public static function assertIsArray(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Array), - $message, - ); - } - - /** - * Asserts that a variable is of type bool. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert bool $actual - */ - final public static function assertIsBool(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Bool), - $message, - ); - } - - /** - * Asserts that a variable is of type float. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert float $actual - */ - final public static function assertIsFloat(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Float), - $message, - ); - } - - /** - * Asserts that a variable is of type int. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert int $actual - */ - final public static function assertIsInt(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Int), - $message, - ); - } - - /** - * Asserts that a variable is of type numeric. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert numeric $actual - */ - final public static function assertIsNumeric(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Numeric), - $message, - ); - } - - /** - * Asserts that a variable is of type object. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert object $actual - */ - final public static function assertIsObject(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Object), - $message, - ); - } - - /** - * Asserts that a variable is of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert resource $actual - */ - final public static function assertIsResource(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Resource), - $message, - ); - } - - /** - * Asserts that a variable is of type resource and is closed. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert resource $actual - */ - final public static function assertIsClosedResource(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::ClosedResource), - $message, - ); - } - - /** - * Asserts that a variable is of type string. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert string $actual - */ - final public static function assertIsString(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::String), - $message, - ); - } - - /** - * Asserts that a variable is of type scalar. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert scalar $actual - */ - final public static function assertIsScalar(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Scalar), - $message, - ); - } - - /** - * Asserts that a variable is of type callable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert callable $actual - */ - final public static function assertIsCallable(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Callable), - $message, - ); - } - - /** - * Asserts that a variable is of type iterable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert iterable $actual - */ - final public static function assertIsIterable(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new IsType(NativeType::Iterable), - $message, - ); - } - - /** - * Asserts that a variable is not of type array. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !array $actual - */ - final public static function assertIsNotArray(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Array)), - $message, - ); - } - - /** - * Asserts that a variable is not of type bool. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !bool $actual - */ - final public static function assertIsNotBool(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Bool)), - $message, - ); - } - - /** - * Asserts that a variable is not of type float. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !float $actual - */ - final public static function assertIsNotFloat(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Float)), - $message, - ); - } - - /** - * Asserts that a variable is not of type int. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !int $actual - */ - final public static function assertIsNotInt(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Int)), - $message, - ); - } - - /** - * Asserts that a variable is not of type numeric. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !numeric $actual - */ - final public static function assertIsNotNumeric(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Numeric)), - $message, - ); - } - - /** - * Asserts that a variable is not of type object. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !object $actual - */ - final public static function assertIsNotObject(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Object)), - $message, - ); - } - - /** - * Asserts that a variable is not of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !resource $actual - */ - final public static function assertIsNotResource(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Resource)), - $message, - ); - } - - /** - * Asserts that a variable is not of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !resource $actual - */ - final public static function assertIsNotClosedResource(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::ClosedResource)), - $message, - ); - } - - /** - * Asserts that a variable is not of type string. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !string $actual - */ - final public static function assertIsNotString(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::String)), - $message, - ); - } - - /** - * Asserts that a variable is not of type scalar. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !scalar $actual - */ - final public static function assertIsNotScalar(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Scalar)), - $message, - ); - } - - /** - * Asserts that a variable is not of type callable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !callable $actual - */ - final public static function assertIsNotCallable(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Callable)), - $message, - ); - } - - /** - * Asserts that a variable is not of type iterable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !iterable $actual - */ - final public static function assertIsNotIterable(mixed $actual, string $message = ''): void - { - self::assertThat( - $actual, - new LogicalNot(new IsType(NativeType::Iterable)), - $message, - ); - } - - /** - * Asserts that a string matches a given regular expression. - * - * @throws ExpectationFailedException - */ - final public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void - { - self::assertThat($string, new RegularExpression($pattern), $message); - } - - /** - * Asserts that a string does not match a given regular expression. - * - * @throws ExpectationFailedException - */ - final public static function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void - { - self::assertThat( - $string, - new LogicalNot( - new RegularExpression($pattern), - ), - $message, - ); - } - - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = ''): void - { - if ($expected instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$expected'); - } - - if ($actual instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$actual'); - } - - self::assertThat( - $actual, - new SameSize($expected), - $message, - ); - } - - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - */ - final public static function assertNotSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = ''): void - { - if ($expected instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$expected'); - } - - if ($actual instanceof Generator) { - throw GeneratorNotSupportedException::fromParameterName('$actual'); - } - - self::assertThat( - $actual, - new LogicalNot( - new SameSize($expected), - ), - $message, - ); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertStringContainsStringIgnoringLineEndings(string $needle, string $haystack, string $message = ''): void - { - self::assertThat($haystack, new StringContains($needle, false, true), $message); - } - - /** - * Asserts that two strings are equal except for line endings. - * - * @throws ExpectationFailedException - */ - final public static function assertStringEqualsStringIgnoringLineEndings(string $expected, string $actual, string $message = ''): void - { - self::assertThat($actual, new StringEqualsStringIgnoringLineEndings($expected), $message); - } - - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - */ - final public static function assertFileMatchesFormat(string $format, string $actualFile, string $message = ''): void - { - self::assertFileExists($actualFile, $message); - - self::assertThat( - file_get_contents($actualFile), - new StringMatchesFormatDescription($format), - $message, - ); - } - - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - */ - final public static function assertFileMatchesFormatFile(string $formatFile, string $actualFile, string $message = ''): void - { - self::assertFileExists($formatFile, $message); - self::assertFileExists($actualFile, $message); - - $formatDescription = file_get_contents($formatFile); - - self::assertIsString($formatDescription); - - self::assertThat( - file_get_contents($actualFile), - new StringMatchesFormatDescription($formatDescription), - $message, - ); - } - - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - */ - final public static function assertStringMatchesFormat(string $format, string $string, string $message = ''): void - { - self::assertThat($string, new StringMatchesFormatDescription($format), $message); - } - - /** - * Asserts that a string matches a given format file. - * - * @throws ExpectationFailedException - */ - final public static function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - self::assertFileExists($formatFile, $message); - - $formatDescription = file_get_contents($formatFile); - - self::assertIsString($formatDescription); - - self::assertThat( - $string, - new StringMatchesFormatDescription( - $formatDescription, - ), - $message, - ); - } - - /** - * Asserts that a string starts with a given prefix. - * - * @param non-empty-string $prefix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - */ - final public static function assertStringStartsWith(string $prefix, string $string, string $message = ''): void - { - self::assertThat($string, new StringStartsWith($prefix), $message); - } - - /** - * Asserts that a string starts not with a given prefix. - * - * @param non-empty-string $prefix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - */ - final public static function assertStringStartsNotWith(string $prefix, string $string, string $message = ''): void - { - self::assertThat( - $string, - new LogicalNot( - new StringStartsWith($prefix), - ), - $message, - ); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void - { - $constraint = new StringContains($needle); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - $constraint = new StringContains($needle, true); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new StringContains($needle)); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * @throws ExpectationFailedException - */ - final public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - $constraint = new LogicalNot(new StringContains($needle, true)); - - self::assertThat($haystack, $constraint, $message); - } - - /** - * Asserts that a string ends with a given suffix. - * - * @param non-empty-string $suffix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - */ - final public static function assertStringEndsWith(string $suffix, string $string, string $message = ''): void - { - self::assertThat($string, new StringEndsWith($suffix), $message); - } - - /** - * Asserts that a string ends not with a given suffix. - * - * @param non-empty-string $suffix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - */ - final public static function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void - { - self::assertThat( - $string, - new LogicalNot( - new StringEndsWith($suffix), - ), - $message, - ); - } - - /** - * Asserts that two XML files are equal. - * - * @throws Exception - * @throws ExpectationFailedException - * @throws XmlException - */ - final public static function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - $expected = (new XmlLoader)->loadFile($expectedFile); - $actual = (new XmlLoader)->loadFile($actualFile); - - self::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML files are not equal. - * - * @throws \PHPUnit\Util\Exception - * @throws ExpectationFailedException - */ - final public static function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - $expected = (new XmlLoader)->loadFile($expectedFile); - $actual = (new XmlLoader)->loadFile($actualFile); - - self::assertNotEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are equal. - * - * @throws ExpectationFailedException - * @throws XmlException - */ - final public static function assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml, string $message = ''): void - { - $expected = (new XmlLoader)->loadFile($expectedFile); - $actual = (new XmlLoader)->load($actualXml); - - self::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are not equal. - * - * @throws ExpectationFailedException - * @throws XmlException - */ - final public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml, string $message = ''): void - { - $expected = (new XmlLoader)->loadFile($expectedFile); - $actual = (new XmlLoader)->load($actualXml); - - self::assertNotEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are equal. - * - * @throws ExpectationFailedException - * @throws XmlException - */ - final public static function assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml, string $message = ''): void - { - $expected = (new XmlLoader)->load($expectedXml); - $actual = (new XmlLoader)->load($actualXml); - - self::assertEquals($expected, $actual, $message); - } - - /** - * Asserts that two XML documents are not equal. - * - * @throws ExpectationFailedException - * @throws XmlException - */ - final public static function assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml, string $message = ''): void - { - $expected = (new XmlLoader)->load($expectedXml); - $actual = (new XmlLoader)->load($actualXml); - - self::assertNotEquals($expected, $actual, $message); - } - - /** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws ExpectationFailedException - */ - final public static function assertThat(mixed $value, Constraint $constraint, string $message = ''): void - { - self::$count += count($constraint); - - $constraint->evaluate($value, $message); - } - - /** - * Asserts that a string is a valid JSON string. - * - * @throws ExpectationFailedException - */ - final public static function assertJson(string $actual, string $message = ''): void - { - self::assertThat($actual, self::isJson(), $message); - } - - /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - self::assertJson($expectedJson, $message); - self::assertJson($actualJson, $message); - - self::assertThat($actualJson, new JsonMatches($expectedJson), $message); - } - - /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - self::assertJson($expectedJson, $message); - self::assertJson($actualJson, $message); - - self::assertThat( - $actualJson, - new LogicalNot( - new JsonMatches($expectedJson), - ), - $message, - ); - } - - /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $expectedJson = file_get_contents($expectedFile); - - self::assertIsString($expectedJson); - self::assertJson($expectedJson, $message); - self::assertJson($actualJson, $message); - - self::assertThat($actualJson, new JsonMatches($expectedJson), $message); - } - - /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $expectedJson = file_get_contents($expectedFile); - - self::assertIsString($expectedJson); - self::assertJson($expectedJson, $message); - self::assertJson($actualJson, $message); - - self::assertThat( - $actualJson, - new LogicalNot( - new JsonMatches($expectedJson), - ), - $message, - ); - } - - /** - * Asserts that two JSON files are equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $expectedJson = file_get_contents($expectedFile); - - self::assertIsString($expectedJson); - self::assertJson($expectedJson, $message); - - self::assertFileExists($actualFile, $message); - - $actualJson = file_get_contents($actualFile); - - self::assertIsString($actualJson); - self::assertJson($actualJson, $message); - - self::assertThat($actualJson, new JsonMatches($expectedJson), $message); - } - - /** - * Asserts that two JSON files are not equal. - * - * @throws ExpectationFailedException - */ - final public static function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - self::assertFileExists($expectedFile, $message); - - $expectedJson = file_get_contents($expectedFile); - - self::assertIsString($expectedJson); - self::assertJson($expectedJson, $message); - - self::assertFileExists($actualFile, $message); - - $actualJson = file_get_contents($actualFile); - - self::assertIsString($actualJson); - self::assertJson($actualJson, $message); - - self::assertThat($actualJson, self::logicalNot(new JsonMatches($expectedJson)), $message); - } - - /** - * @throws Exception - */ - final public static function logicalAnd(mixed ...$constraints): LogicalAnd - { - return LogicalAnd::fromConstraints(...$constraints); - } - - final public static function logicalOr(mixed ...$constraints): LogicalOr - { - return LogicalOr::fromConstraints(...$constraints); - } - - final public static function logicalNot(Constraint $constraint): LogicalNot - { - return new LogicalNot($constraint); - } - - final public static function logicalXor(mixed ...$constraints): LogicalXor - { - return LogicalXor::fromConstraints(...$constraints); - } - - final public static function anything(): IsAnything - { - return new IsAnything; - } - - final public static function isTrue(): IsTrue - { - return new IsTrue; - } - - /** - * @template CallbackInput of mixed - * - * @param callable(CallbackInput $callback): bool $callback - * - * @return Callback - */ - final public static function callback(callable $callback): Callback - { - return new Callback($callback); - } - - final public static function isFalse(): IsFalse - { - return new IsFalse; - } - - final public static function isJson(): IsJson - { - return new IsJson; - } - - final public static function isNull(): IsNull - { - return new IsNull; - } - - final public static function isFinite(): IsFinite - { - return new IsFinite; - } - - final public static function isInfinite(): IsInfinite - { - return new IsInfinite; - } - - final public static function isNan(): IsNan - { - return new IsNan; - } - - final public static function containsEqual(mixed $value): TraversableContainsEqual - { - return new TraversableContainsEqual($value); - } - - final public static function containsIdentical(mixed $value): TraversableContainsIdentical - { - return new TraversableContainsIdentical($value); - } - - /** - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * - * @throws Exception - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6060 - */ - final public static function containsOnly(string $type): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(self::mapNativeType($type)); - } - - final public static function containsOnlyArray(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Array); - } - - final public static function containsOnlyBool(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Bool); - } - - final public static function containsOnlyCallable(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Callable); - } - - final public static function containsOnlyFloat(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Float); - } - - final public static function containsOnlyInt(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Int); - } - - final public static function containsOnlyIterable(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Iterable); - } - - final public static function containsOnlyNull(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Null); - } - - final public static function containsOnlyNumeric(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Numeric); - } - - final public static function containsOnlyObject(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Object); - } - - final public static function containsOnlyResource(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Resource); - } - - final public static function containsOnlyClosedResource(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::ClosedResource); - } - - final public static function containsOnlyScalar(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::Scalar); - } - - final public static function containsOnlyString(): TraversableContainsOnly - { - return TraversableContainsOnly::forNativeType(NativeType::String); - } - - /** - * @param class-string $className - * - * @throws Exception - */ - final public static function containsOnlyInstancesOf(string $className): TraversableContainsOnly - { - return TraversableContainsOnly::forClassOrInterface($className); - } - - final public static function arrayHasKey(mixed $key): ArrayHasKey - { - return new ArrayHasKey($key); - } - - final public static function isList(): IsList - { - return new IsList; - } - - final public static function equalTo(mixed $value): IsEqual - { - return new IsEqual($value); - } - - final public static function equalToCanonicalizing(mixed $value): IsEqualCanonicalizing - { - return new IsEqualCanonicalizing($value); - } - - final public static function equalToIgnoringCase(mixed $value): IsEqualIgnoringCase - { - return new IsEqualIgnoringCase($value); - } - - final public static function equalToWithDelta(mixed $value, float $delta): IsEqualWithDelta - { - return new IsEqualWithDelta($value, $delta); - } - - final public static function isEmpty(): IsEmpty - { - return new IsEmpty; - } - - final public static function isWritable(): IsWritable - { - return new IsWritable; - } - - final public static function isReadable(): IsReadable - { - return new IsReadable; - } - - final public static function directoryExists(): DirectoryExists - { - return new DirectoryExists; - } - - final public static function fileExists(): FileExists - { - return new FileExists; - } - - final public static function greaterThan(mixed $value): GreaterThan - { - return new GreaterThan($value); - } - - final public static function greaterThanOrEqual(mixed $value): LogicalOr - { - return self::logicalOr( - new IsEqual($value), - new GreaterThan($value), - ); - } - - final public static function identicalTo(mixed $value): IsIdentical - { - return new IsIdentical($value); - } - - /** - * @throws UnknownClassOrInterfaceException - */ - final public static function isInstanceOf(string $className): IsInstanceOf - { - return new IsInstanceOf($className); - } - - final public static function isArray(): IsType - { - return new IsType(NativeType::Array); - } - - final public static function isBool(): IsType - { - return new IsType(NativeType::Bool); - } - - final public static function isCallable(): IsType - { - return new IsType(NativeType::Callable); - } - - final public static function isFloat(): IsType - { - return new IsType(NativeType::Float); - } - - final public static function isInt(): IsType - { - return new IsType(NativeType::Int); - } - - final public static function isIterable(): IsType - { - return new IsType(NativeType::Iterable); - } - - final public static function isNumeric(): IsType - { - return new IsType(NativeType::Numeric); - } - - final public static function isObject(): IsType - { - return new IsType(NativeType::Object); - } - - final public static function isResource(): IsType - { - return new IsType(NativeType::Resource); - } - - final public static function isClosedResource(): IsType - { - return new IsType(NativeType::ClosedResource); - } - - final public static function isScalar(): IsType - { - return new IsType(NativeType::Scalar); - } - - final public static function isString(): IsType - { - return new IsType(NativeType::String); - } - - /** - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * - * @throws UnknownNativeTypeException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6053 - */ - final public static function isType(string $type): IsType - { - $constraint = new IsType(self::mapNativeType($type)); - - $replacement = match ($type) { - 'array' => 'isArray', - 'bool' => 'isBool', - 'boolean' => 'isBool', - 'callable' => 'isCallable', - 'double' => 'isFloat', - 'float' => 'isFloat', - 'int' => 'isInt', - 'integer' => 'isInt', - 'iterable' => 'isIterable', - 'null' => 'isNull', - 'numeric' => 'isNumeric', - 'object' => 'isObject', - 'real' => 'isFloat', - 'resource' => 'isResource', - 'resource (closed)' => 'isClosedResource', - 'scalar' => 'isScalar', - 'string' => 'isString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'isType(\'%s\') is deprecated and will be removed in PHPUnit 13. ' . - 'Please use the %s() method instead.', - $type, - $replacement, - ), - ); - - return $constraint; - } - - final public static function lessThan(mixed $value): LessThan - { - return new LessThan($value); - } - - final public static function lessThanOrEqual(mixed $value): LogicalOr - { - return self::logicalOr( - new IsEqual($value), - new LessThan($value), - ); - } - - final public static function matchesRegularExpression(string $pattern): RegularExpression - { - return new RegularExpression($pattern); - } - - final public static function matches(string $string): StringMatchesFormatDescription - { - return new StringMatchesFormatDescription($string); - } - - /** - * @param non-empty-string $prefix - * - * @throws InvalidArgumentException - */ - final public static function stringStartsWith(string $prefix): StringStartsWith - { - return new StringStartsWith($prefix); - } - - final public static function stringContains(string $string, bool $case = true): StringContains - { - return new StringContains($string, $case); - } - - /** - * @param non-empty-string $suffix - * - * @throws InvalidArgumentException - */ - final public static function stringEndsWith(string $suffix): StringEndsWith - { - return new StringEndsWith($suffix); - } - - final public static function stringEqualsStringIgnoringLineEndings(string $string): StringEqualsStringIgnoringLineEndings - { - return new StringEqualsStringIgnoringLineEndings($string); - } - - final public static function countOf(int $count): Count - { - return new Count($count); - } - - final public static function objectEquals(object $object, string $method = 'equals'): ObjectEquals - { - return new ObjectEquals($object, $method); - } - - /** - * Fails a test with the given message. - * - * @throws AssertionFailedError - */ - final public static function fail(string $message = ''): never - { - self::$count++; - - throw new AssertionFailedError($message); - } - - /** - * Mark the test as incomplete. - * - * @throws IncompleteTestError - */ - final public static function markTestIncomplete(string $message = ''): never - { - throw new IncompleteTestError($message); - } - - /** - * Mark the test as skipped. - * - * @throws SkippedWithMessageException - */ - final public static function markTestSkipped(string $message = ''): never - { - throw new SkippedWithMessageException($message); - } - - /** - * Return the current assertion count. - */ - final public static function getCount(): int - { - return self::$count; - } - - /** - * Reset the assertion counter. - */ - final public static function resetCount(): void - { - self::$count = 0; - } - - private static function isNativeType(string $type): bool - { - return $type === 'array' || - $type === 'bool' || - $type === 'boolean' || - $type === 'callable' || - $type === 'double' || - $type === 'float' || - $type === 'int' || - $type === 'integer' || - $type === 'iterable' || - $type === 'null' || - $type === 'numeric' || - $type === 'object' || - $type === 'real' || - $type === 'resource' || - $type === 'resource (closed)' || - $type === 'scalar' || - $type === 'string'; - } - - /** - * @throws UnknownNativeTypeException - */ - private static function mapNativeType(string $type): NativeType - { - if (!self::isNativeType($type)) { - throw new UnknownNativeTypeException($type); - } - - /** @phpstan-ignore match.unhandled */ - return match ($type) { - 'array' => NativeType::Array, - 'bool' => NativeType::Bool, - 'boolean' => NativeType::Bool, - 'callable' => NativeType::Callable, - 'double' => NativeType::Float, - 'float' => NativeType::Float, - 'int' => NativeType::Int, - 'integer' => NativeType::Int, - 'iterable' => NativeType::Iterable, - 'null' => NativeType::Null, - 'numeric' => NativeType::Numeric, - 'object' => NativeType::Object, - 'real' => NativeType::Float, - 'resource' => NativeType::Resource, - 'resource (closed)' => NativeType::ClosedResource, - 'scalar' => NativeType::Scalar, - 'string' => NativeType::String, - }; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php deleted file mode 100644 index 0645fd26..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php +++ /dev/null @@ -1,3440 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function func_get_args; -use function function_exists; -use ArrayAccess; -use Countable; -use PHPUnit\Framework\Constraint\ArrayHasKey; -use PHPUnit\Framework\Constraint\Callback; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\Count; -use PHPUnit\Framework\Constraint\DirectoryExists; -use PHPUnit\Framework\Constraint\FileExists; -use PHPUnit\Framework\Constraint\GreaterThan; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEmpty; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\Constraint\IsEqualCanonicalizing; -use PHPUnit\Framework\Constraint\IsEqualIgnoringCase; -use PHPUnit\Framework\Constraint\IsEqualWithDelta; -use PHPUnit\Framework\Constraint\IsFalse; -use PHPUnit\Framework\Constraint\IsFinite; -use PHPUnit\Framework\Constraint\IsIdentical; -use PHPUnit\Framework\Constraint\IsInfinite; -use PHPUnit\Framework\Constraint\IsInstanceOf; -use PHPUnit\Framework\Constraint\IsJson; -use PHPUnit\Framework\Constraint\IsList; -use PHPUnit\Framework\Constraint\IsNan; -use PHPUnit\Framework\Constraint\IsNull; -use PHPUnit\Framework\Constraint\IsReadable; -use PHPUnit\Framework\Constraint\IsTrue; -use PHPUnit\Framework\Constraint\IsType; -use PHPUnit\Framework\Constraint\IsWritable; -use PHPUnit\Framework\Constraint\LessThan; -use PHPUnit\Framework\Constraint\LogicalAnd; -use PHPUnit\Framework\Constraint\LogicalNot; -use PHPUnit\Framework\Constraint\LogicalOr; -use PHPUnit\Framework\Constraint\LogicalXor; -use PHPUnit\Framework\Constraint\ObjectEquals; -use PHPUnit\Framework\Constraint\RegularExpression; -use PHPUnit\Framework\Constraint\StringContains; -use PHPUnit\Framework\Constraint\StringEndsWith; -use PHPUnit\Framework\Constraint\StringEqualsStringIgnoringLineEndings; -use PHPUnit\Framework\Constraint\StringMatchesFormatDescription; -use PHPUnit\Framework\Constraint\StringStartsWith; -use PHPUnit\Framework\Constraint\TraversableContainsEqual; -use PHPUnit\Framework\Constraint\TraversableContainsIdentical; -use PHPUnit\Framework\Constraint\TraversableContainsOnly; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount as AnyInvokedCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount as InvokedAtLeastCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce as InvokedAtLeastOnceMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; -use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; -use PHPUnit\Util\Xml\XmlException; -use Throwable; - -if (!function_exists('PHPUnit\Framework\assertArrayIsEqualToArrayOnlyConsideringListOfKeys')) { - /** - * Asserts that two arrays are equal while only considering a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeConsidered - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayIsEqualToArrayOnlyConsideringListOfKeys - */ - function assertArrayIsEqualToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = ''): void - { - Assert::assertArrayIsEqualToArrayOnlyConsideringListOfKeys(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertArrayIsEqualToArrayIgnoringListOfKeys')) { - /** - * Asserts that two arrays are equal while ignoring a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeIgnored - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayIsEqualToArrayIgnoringListOfKeys - */ - function assertArrayIsEqualToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = ''): void - { - Assert::assertArrayIsEqualToArrayIgnoringListOfKeys(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys')) { - /** - * Asserts that two arrays are identical while only considering a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeConsidered - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys - */ - function assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = ''): void - { - Assert::assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertArrayIsIdenticalToArrayIgnoringListOfKeys')) { - /** - * Asserts that two arrays are equal while ignoring a list of keys. - * - * @param array $expected - * @param array $actual - * @param non-empty-list $keysToBeIgnored - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayIsIdenticalToArrayIgnoringListOfKeys - */ - function assertArrayIsIdenticalToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = ''): void - { - Assert::assertArrayIsIdenticalToArrayIgnoringListOfKeys(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertArrayHasKey')) { - /** - * Asserts that an array has a specified key. - * - * @param array|ArrayAccess $array - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayHasKey - */ - function assertArrayHasKey(mixed $key, array|ArrayAccess $array, string $message = ''): void - { - Assert::assertArrayHasKey(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertArrayNotHasKey')) { - /** - * Asserts that an array does not have a specified key. - * - * @param array|ArrayAccess $array - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertArrayNotHasKey - */ - function assertArrayNotHasKey(mixed $key, array|ArrayAccess $array, string $message = ''): void - { - Assert::assertArrayNotHasKey(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsList')) { - /** - * @phpstan-assert list $array - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsList - */ - function assertIsList(mixed $array, string $message = ''): void - { - Assert::assertIsList(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContains')) { - /** - * Asserts that a haystack contains a needle. - * - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContains - */ - function assertContains(mixed $needle, iterable $haystack, string $message = ''): void - { - Assert::assertContains(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsEquals')) { - /** - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsEquals - */ - function assertContainsEquals(mixed $needle, iterable $haystack, string $message = ''): void - { - Assert::assertContainsEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotContains')) { - /** - * Asserts that a haystack does not contain a needle. - * - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotContains - */ - function assertNotContains(mixed $needle, iterable $haystack, string $message = ''): void - { - Assert::assertNotContains(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotContainsEquals')) { - /** - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotContainsEquals - */ - function assertNotContainsEquals(mixed $needle, iterable $haystack, string $message = ''): void - { - Assert::assertNotContainsEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnly')) { - /** - * Asserts that a haystack contains only values of a given type. - * - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnly - */ - function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - Assert::assertContainsOnly(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyArray')) { - /** - * Asserts that a haystack contains only values of type array. - * - * @phpstan-assert iterable> $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyArray - */ - function assertContainsOnlyArray(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyBool')) { - /** - * Asserts that a haystack contains only values of type bool. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyBool - */ - function assertContainsOnlyBool(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyCallable')) { - /** - * Asserts that a haystack contains only values of type callable. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyCallable - */ - function assertContainsOnlyCallable(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyFloat')) { - /** - * Asserts that a haystack contains only values of type float. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyFloat - */ - function assertContainsOnlyFloat(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyInt')) { - /** - * Asserts that a haystack contains only values of type int. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyInt - */ - function assertContainsOnlyInt(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyIterable')) { - /** - * Asserts that a haystack contains only values of type iterable. - * - * @phpstan-assert iterable> $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyIterable - */ - function assertContainsOnlyIterable(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyNull')) { - /** - * Asserts that a haystack contains only values of type null. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyNull - */ - function assertContainsOnlyNull(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyNumeric')) { - /** - * Asserts that a haystack contains only values of type numeric. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyNumeric - */ - function assertContainsOnlyNumeric(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyObject')) { - /** - * Asserts that a haystack contains only values of type object. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyObject - */ - function assertContainsOnlyObject(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyResource')) { - /** - * Asserts that a haystack contains only values of type resource. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyResource - */ - function assertContainsOnlyResource(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyClosedResource')) { - /** - * Asserts that a haystack contains only values of type closed resource. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyClosedResource - */ - function assertContainsOnlyClosedResource(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyScalar')) { - /** - * Asserts that a haystack contains only values of type scalar. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyScalar - */ - function assertContainsOnlyScalar(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyString')) { - /** - * Asserts that a haystack contains only values of type string. - * - * @phpstan-assert iterable $haystack - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyString - */ - function assertContainsOnlyString(iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsOnlyInstancesOf')) { - /** - * Asserts that a haystack contains only instances of a specified interface or class name. - * - * @template T - * - * @phpstan-assert iterable $haystack - * - * @param class-string $className - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsOnlyInstancesOf - */ - function assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - Assert::assertContainsOnlyInstancesOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotContainsOnly')) { - /** - * Asserts that a haystack does not contain only values of a given type. - * - * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotContainsOnly - */ - function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void - { - Assert::assertNotContainsOnly(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyArray')) { - /** - * Asserts that a haystack does not contain only values of type array. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyArray - */ - function assertContainsNotOnlyArray(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyBool')) { - /** - * Asserts that a haystack does not contain only values of type bool. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyBool - */ - function assertContainsNotOnlyBool(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyCallable')) { - /** - * Asserts that a haystack does not contain only values of type callable. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyCallable - */ - function assertContainsNotOnlyCallable(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyFloat')) { - /** - * Asserts that a haystack does not contain only values of type float. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyFloat - */ - function assertContainsNotOnlyFloat(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyInt')) { - /** - * Asserts that a haystack does not contain only values of type int. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyInt - */ - function assertContainsNotOnlyInt(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyIterable')) { - /** - * Asserts that a haystack does not contain only values of type iterable. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyIterable - */ - function assertContainsNotOnlyIterable(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyNull')) { - /** - * Asserts that a haystack does not contain only values of type null. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyNull - */ - function assertContainsNotOnlyNull(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyNumeric')) { - /** - * Asserts that a haystack does not contain only values of type numeric. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyNumeric - */ - function assertContainsNotOnlyNumeric(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyObject')) { - /** - * Asserts that a haystack does not contain only values of type object. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyObject - */ - function assertContainsNotOnlyObject(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyResource')) { - /** - * Asserts that a haystack does not contain only values of type resource. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyResource - */ - function assertContainsNotOnlyResource(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyClosedResource')) { - /** - * Asserts that a haystack does not contain only values of type closed resource. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyClosedResource - */ - function assertContainsNotOnlyClosedResource(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyScalar')) { - /** - * Asserts that a haystack does not contain only values of type scalar. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyScalar - */ - function assertContainsNotOnlyScalar(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyString')) { - /** - * Asserts that a haystack does not contain only values of type string. - * - * @param iterable $haystack - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyString - */ - function assertContainsNotOnlyString(iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertContainsNotOnlyInstancesOf')) { - /** - * Asserts that a haystack does not contain only instances of a specified interface or class name. - * - * @param class-string $className - * @param iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertContainsNotOnlyInstancesOf - */ - function assertContainsNotOnlyInstancesOf(string $className, iterable $haystack, string $message = ''): void - { - Assert::assertContainsNotOnlyInstancesOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertCount')) { - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertCount - */ - function assertCount(int $expectedCount, Countable|iterable $haystack, string $message = ''): void - { - Assert::assertCount(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotCount')) { - /** - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param Countable|iterable $haystack - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotCount - */ - function assertNotCount(int $expectedCount, Countable|iterable $haystack, string $message = ''): void - { - Assert::assertNotCount(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertEquals')) { - /** - * Asserts that two variables are equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEquals - */ - function assertEquals(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertEqualsCanonicalizing')) { - /** - * Asserts that two variables are equal (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEqualsCanonicalizing - */ - function assertEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertEqualsCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertEqualsIgnoringCase')) { - /** - * Asserts that two variables are equal (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEqualsIgnoringCase - */ - function assertEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertEqualsIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertEqualsWithDelta')) { - /** - * Asserts that two variables are equal (with delta). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEqualsWithDelta - */ - function assertEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = ''): void - { - Assert::assertEqualsWithDelta(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotEquals')) { - /** - * Asserts that two variables are not equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotEquals - */ - function assertNotEquals(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertNotEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotEqualsCanonicalizing')) { - /** - * Asserts that two variables are not equal (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotEqualsCanonicalizing - */ - function assertNotEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertNotEqualsCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotEqualsIgnoringCase')) { - /** - * Asserts that two variables are not equal (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotEqualsIgnoringCase - */ - function assertNotEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertNotEqualsIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotEqualsWithDelta')) { - /** - * Asserts that two variables are not equal (with delta). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotEqualsWithDelta - */ - function assertNotEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = ''): void - { - Assert::assertNotEqualsWithDelta(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertObjectEquals')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertObjectEquals - */ - function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - Assert::assertObjectEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertObjectNotEquals')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertObjectNotEquals - */ - function assertObjectNotEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - Assert::assertObjectNotEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertEmpty')) { - /** - * Asserts that a variable is empty. - * - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertEmpty - */ - function assertEmpty(mixed $actual, string $message = ''): void - { - Assert::assertEmpty(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotEmpty')) { - /** - * Asserts that a variable is not empty. - * - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotEmpty - */ - function assertNotEmpty(mixed $actual, string $message = ''): void - { - Assert::assertNotEmpty(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertGreaterThan')) { - /** - * Asserts that a value is greater than another value. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertGreaterThan - */ - function assertGreaterThan(mixed $minimum, mixed $actual, string $message = ''): void - { - Assert::assertGreaterThan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertGreaterThanOrEqual')) { - /** - * Asserts that a value is greater than or equal to another value. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertGreaterThanOrEqual - */ - function assertGreaterThanOrEqual(mixed $minimum, mixed $actual, string $message = ''): void - { - Assert::assertGreaterThanOrEqual(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertLessThan')) { - /** - * Asserts that a value is smaller than another value. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertLessThan - */ - function assertLessThan(mixed $maximum, mixed $actual, string $message = ''): void - { - Assert::assertLessThan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertLessThanOrEqual')) { - /** - * Asserts that a value is smaller than or equal to another value. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertLessThanOrEqual - */ - function assertLessThanOrEqual(mixed $maximum, mixed $actual, string $message = ''): void - { - Assert::assertLessThanOrEqual(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileEquals')) { - /** - * Asserts that the contents of one file is equal to the contents of another - * file. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileEquals - */ - function assertFileEquals(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileEqualsCanonicalizing')) { - /** - * Asserts that the contents of one file is equal to the contents of another - * file (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileEqualsCanonicalizing - */ - function assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileEqualsCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileEqualsIgnoringCase')) { - /** - * Asserts that the contents of one file is equal to the contents of another - * file (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileEqualsIgnoringCase - */ - function assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileEqualsIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileNotEquals')) { - /** - * Asserts that the contents of one file is not equal to the contents of - * another file. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileNotEquals - */ - function assertFileNotEquals(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileNotEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileNotEqualsCanonicalizing')) { - /** - * Asserts that the contents of one file is not equal to the contents of another - * file (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileNotEqualsCanonicalizing - */ - function assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileNotEqualsCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileNotEqualsIgnoringCase')) { - /** - * Asserts that the contents of one file is not equal to the contents of another - * file (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileNotEqualsIgnoringCase - */ - function assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = ''): void - { - Assert::assertFileNotEqualsIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEqualsFile')) { - /** - * Asserts that the contents of a string is equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEqualsFile - */ - function assertStringEqualsFile(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringEqualsFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEqualsFileCanonicalizing')) { - /** - * Asserts that the contents of a string is equal - * to the contents of a file (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEqualsFileCanonicalizing - */ - function assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringEqualsFileCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEqualsFileIgnoringCase')) { - /** - * Asserts that the contents of a string is equal - * to the contents of a file (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEqualsFileIgnoringCase - */ - function assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringEqualsFileIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFile')) { - /** - * Asserts that the contents of a string is not equal - * to the contents of a file. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringNotEqualsFile - */ - function assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringNotEqualsFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileCanonicalizing')) { - /** - * Asserts that the contents of a string is not equal - * to the contents of a file (canonicalizing). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringNotEqualsFileCanonicalizing - */ - function assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringNotEqualsFileCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileIgnoringCase')) { - /** - * Asserts that the contents of a string is not equal - * to the contents of a file (ignoring case). - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringNotEqualsFileIgnoringCase - */ - function assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = ''): void - { - Assert::assertStringNotEqualsFileIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsReadable')) { - /** - * Asserts that a file/dir is readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsReadable - */ - function assertIsReadable(string $filename, string $message = ''): void - { - Assert::assertIsReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotReadable')) { - /** - * Asserts that a file/dir exists and is not readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotReadable - */ - function assertIsNotReadable(string $filename, string $message = ''): void - { - Assert::assertIsNotReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsWritable')) { - /** - * Asserts that a file/dir exists and is writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsWritable - */ - function assertIsWritable(string $filename, string $message = ''): void - { - Assert::assertIsWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotWritable')) { - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotWritable - */ - function assertIsNotWritable(string $filename, string $message = ''): void - { - Assert::assertIsNotWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryExists')) { - /** - * Asserts that a directory exists. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryExists - */ - function assertDirectoryExists(string $directory, string $message = ''): void - { - Assert::assertDirectoryExists(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryDoesNotExist')) { - /** - * Asserts that a directory does not exist. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryDoesNotExist - */ - function assertDirectoryDoesNotExist(string $directory, string $message = ''): void - { - Assert::assertDirectoryDoesNotExist(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryIsReadable')) { - /** - * Asserts that a directory exists and is readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryIsReadable - */ - function assertDirectoryIsReadable(string $directory, string $message = ''): void - { - Assert::assertDirectoryIsReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotReadable')) { - /** - * Asserts that a directory exists and is not readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryIsNotReadable - */ - function assertDirectoryIsNotReadable(string $directory, string $message = ''): void - { - Assert::assertDirectoryIsNotReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryIsWritable')) { - /** - * Asserts that a directory exists and is writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryIsWritable - */ - function assertDirectoryIsWritable(string $directory, string $message = ''): void - { - Assert::assertDirectoryIsWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotWritable')) { - /** - * Asserts that a directory exists and is not writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDirectoryIsNotWritable - */ - function assertDirectoryIsNotWritable(string $directory, string $message = ''): void - { - Assert::assertDirectoryIsNotWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileExists')) { - /** - * Asserts that a file exists. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileExists - */ - function assertFileExists(string $filename, string $message = ''): void - { - Assert::assertFileExists(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileDoesNotExist')) { - /** - * Asserts that a file does not exist. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileDoesNotExist - */ - function assertFileDoesNotExist(string $filename, string $message = ''): void - { - Assert::assertFileDoesNotExist(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileIsReadable')) { - /** - * Asserts that a file exists and is readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileIsReadable - */ - function assertFileIsReadable(string $file, string $message = ''): void - { - Assert::assertFileIsReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileIsNotReadable')) { - /** - * Asserts that a file exists and is not readable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileIsNotReadable - */ - function assertFileIsNotReadable(string $file, string $message = ''): void - { - Assert::assertFileIsNotReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileIsWritable')) { - /** - * Asserts that a file exists and is writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileIsWritable - */ - function assertFileIsWritable(string $file, string $message = ''): void - { - Assert::assertFileIsWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileIsNotWritable')) { - /** - * Asserts that a file exists and is not writable. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileIsNotWritable - */ - function assertFileIsNotWritable(string $file, string $message = ''): void - { - Assert::assertFileIsNotWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertTrue')) { - /** - * Asserts that a condition is true. - * - * @throws ExpectationFailedException - * - * @phpstan-assert true $condition - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertTrue - */ - function assertTrue(mixed $condition, string $message = ''): void - { - Assert::assertTrue(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotTrue')) { - /** - * Asserts that a condition is not true. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !true $condition - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotTrue - */ - function assertNotTrue(mixed $condition, string $message = ''): void - { - Assert::assertNotTrue(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFalse')) { - /** - * Asserts that a condition is false. - * - * @throws ExpectationFailedException - * - * @phpstan-assert false $condition - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFalse - */ - function assertFalse(mixed $condition, string $message = ''): void - { - Assert::assertFalse(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotFalse')) { - /** - * Asserts that a condition is not false. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !false $condition - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotFalse - */ - function assertNotFalse(mixed $condition, string $message = ''): void - { - Assert::assertNotFalse(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNull')) { - /** - * Asserts that a variable is null. - * - * @throws ExpectationFailedException - * - * @phpstan-assert null $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNull - */ - function assertNull(mixed $actual, string $message = ''): void - { - Assert::assertNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotNull')) { - /** - * Asserts that a variable is not null. - * - * @throws ExpectationFailedException - * - * @phpstan-assert !null $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotNull - */ - function assertNotNull(mixed $actual, string $message = ''): void - { - Assert::assertNotNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFinite')) { - /** - * Asserts that a variable is finite. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFinite - */ - function assertFinite(mixed $actual, string $message = ''): void - { - Assert::assertFinite(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertInfinite')) { - /** - * Asserts that a variable is infinite. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertInfinite - */ - function assertInfinite(mixed $actual, string $message = ''): void - { - Assert::assertInfinite(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNan')) { - /** - * Asserts that a variable is nan. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNan - */ - function assertNan(mixed $actual, string $message = ''): void - { - Assert::assertNan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertObjectHasProperty')) { - /** - * Asserts that an object has a specified property. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertObjectHasProperty - */ - function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void - { - Assert::assertObjectHasProperty(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertObjectNotHasProperty')) { - /** - * Asserts that an object does not have a specified property. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertObjectNotHasProperty - */ - function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void - { - Assert::assertObjectNotHasProperty(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertSame')) { - /** - * Asserts that two variables have the same type and value. - * Used on objects, it asserts that two variables reference - * the same object. - * - * @template ExpectedType - * - * @param ExpectedType $expected - * - * @throws ExpectationFailedException - * - * @phpstan-assert =ExpectedType $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertSame - */ - function assertSame(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertSame(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotSame')) { - /** - * Asserts that two variables do not have the same type and value. - * Used on objects, it asserts that two variables do not reference - * the same object. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotSame - */ - function assertNotSame(mixed $expected, mixed $actual, string $message = ''): void - { - Assert::assertNotSame(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertInstanceOf')) { - /** - * Asserts that a variable is of a given type. - * - * @template ExpectedType of object - * - * @param class-string $expected - * - * @throws Exception - * @throws ExpectationFailedException - * @throws UnknownClassOrInterfaceException - * - * @phpstan-assert =ExpectedType $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertInstanceOf - */ - function assertInstanceOf(string $expected, mixed $actual, string $message = ''): void - { - Assert::assertInstanceOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotInstanceOf')) { - /** - * Asserts that a variable is not of a given type. - * - * @template ExpectedType of object - * - * @param class-string $expected - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !ExpectedType $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotInstanceOf - */ - function assertNotInstanceOf(string $expected, mixed $actual, string $message = ''): void - { - Assert::assertNotInstanceOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsArray')) { - /** - * Asserts that a variable is of type array. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert array $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsArray - */ - function assertIsArray(mixed $actual, string $message = ''): void - { - Assert::assertIsArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsBool')) { - /** - * Asserts that a variable is of type bool. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert bool $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsBool - */ - function assertIsBool(mixed $actual, string $message = ''): void - { - Assert::assertIsBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsFloat')) { - /** - * Asserts that a variable is of type float. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert float $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsFloat - */ - function assertIsFloat(mixed $actual, string $message = ''): void - { - Assert::assertIsFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsInt')) { - /** - * Asserts that a variable is of type int. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert int $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsInt - */ - function assertIsInt(mixed $actual, string $message = ''): void - { - Assert::assertIsInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNumeric')) { - /** - * Asserts that a variable is of type numeric. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert numeric $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNumeric - */ - function assertIsNumeric(mixed $actual, string $message = ''): void - { - Assert::assertIsNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsObject')) { - /** - * Asserts that a variable is of type object. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert object $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsObject - */ - function assertIsObject(mixed $actual, string $message = ''): void - { - Assert::assertIsObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsResource')) { - /** - * Asserts that a variable is of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert resource $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsResource - */ - function assertIsResource(mixed $actual, string $message = ''): void - { - Assert::assertIsResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsClosedResource')) { - /** - * Asserts that a variable is of type resource and is closed. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert resource $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsClosedResource - */ - function assertIsClosedResource(mixed $actual, string $message = ''): void - { - Assert::assertIsClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsString')) { - /** - * Asserts that a variable is of type string. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert string $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsString - */ - function assertIsString(mixed $actual, string $message = ''): void - { - Assert::assertIsString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsScalar')) { - /** - * Asserts that a variable is of type scalar. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert scalar $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsScalar - */ - function assertIsScalar(mixed $actual, string $message = ''): void - { - Assert::assertIsScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsCallable')) { - /** - * Asserts that a variable is of type callable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert callable $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsCallable - */ - function assertIsCallable(mixed $actual, string $message = ''): void - { - Assert::assertIsCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsIterable')) { - /** - * Asserts that a variable is of type iterable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert iterable $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsIterable - */ - function assertIsIterable(mixed $actual, string $message = ''): void - { - Assert::assertIsIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotArray')) { - /** - * Asserts that a variable is not of type array. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !array $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotArray - */ - function assertIsNotArray(mixed $actual, string $message = ''): void - { - Assert::assertIsNotArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotBool')) { - /** - * Asserts that a variable is not of type bool. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !bool $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotBool - */ - function assertIsNotBool(mixed $actual, string $message = ''): void - { - Assert::assertIsNotBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotFloat')) { - /** - * Asserts that a variable is not of type float. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !float $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotFloat - */ - function assertIsNotFloat(mixed $actual, string $message = ''): void - { - Assert::assertIsNotFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotInt')) { - /** - * Asserts that a variable is not of type int. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !int $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotInt - */ - function assertIsNotInt(mixed $actual, string $message = ''): void - { - Assert::assertIsNotInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotNumeric')) { - /** - * Asserts that a variable is not of type numeric. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !numeric $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotNumeric - */ - function assertIsNotNumeric(mixed $actual, string $message = ''): void - { - Assert::assertIsNotNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotObject')) { - /** - * Asserts that a variable is not of type object. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !object $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotObject - */ - function assertIsNotObject(mixed $actual, string $message = ''): void - { - Assert::assertIsNotObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotResource')) { - /** - * Asserts that a variable is not of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !resource $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotResource - */ - function assertIsNotResource(mixed $actual, string $message = ''): void - { - Assert::assertIsNotResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotClosedResource')) { - /** - * Asserts that a variable is not of type resource. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !resource $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotClosedResource - */ - function assertIsNotClosedResource(mixed $actual, string $message = ''): void - { - Assert::assertIsNotClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotString')) { - /** - * Asserts that a variable is not of type string. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !string $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotString - */ - function assertIsNotString(mixed $actual, string $message = ''): void - { - Assert::assertIsNotString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotScalar')) { - /** - * Asserts that a variable is not of type scalar. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !scalar $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotScalar - */ - function assertIsNotScalar(mixed $actual, string $message = ''): void - { - Assert::assertIsNotScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotCallable')) { - /** - * Asserts that a variable is not of type callable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !callable $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotCallable - */ - function assertIsNotCallable(mixed $actual, string $message = ''): void - { - Assert::assertIsNotCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertIsNotIterable')) { - /** - * Asserts that a variable is not of type iterable. - * - * @throws Exception - * @throws ExpectationFailedException - * - * @phpstan-assert !iterable $actual - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertIsNotIterable - */ - function assertIsNotIterable(mixed $actual, string $message = ''): void - { - Assert::assertIsNotIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertMatchesRegularExpression')) { - /** - * Asserts that a string matches a given regular expression. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertMatchesRegularExpression - */ - function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void - { - Assert::assertMatchesRegularExpression(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertDoesNotMatchRegularExpression')) { - /** - * Asserts that a string does not match a given regular expression. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertDoesNotMatchRegularExpression - */ - function assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = ''): void - { - Assert::assertDoesNotMatchRegularExpression(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertSameSize')) { - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertSameSize - */ - function assertSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = ''): void - { - Assert::assertSameSize(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertNotSameSize')) { - /** - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) - * is not the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * - * @throws Exception - * @throws ExpectationFailedException - * @throws GeneratorNotSupportedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotSameSize - */ - function assertNotSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = ''): void - { - Assert::assertNotSameSize(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringContainsStringIgnoringLineEndings')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringContainsStringIgnoringLineEndings - */ - function assertStringContainsStringIgnoringLineEndings(string $needle, string $haystack, string $message = ''): void - { - Assert::assertStringContainsStringIgnoringLineEndings(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEqualsStringIgnoringLineEndings')) { - /** - * Asserts that two strings are equal except for line endings. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEqualsStringIgnoringLineEndings - */ - function assertStringEqualsStringIgnoringLineEndings(string $expected, string $actual, string $message = ''): void - { - Assert::assertStringEqualsStringIgnoringLineEndings(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileMatchesFormat')) { - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileMatchesFormat - */ - function assertFileMatchesFormat(string $format, string $actualFile, string $message = ''): void - { - Assert::assertFileMatchesFormat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertFileMatchesFormatFile')) { - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertFileMatchesFormatFile - */ - function assertFileMatchesFormatFile(string $formatFile, string $actualFile, string $message = ''): void - { - Assert::assertFileMatchesFormatFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringMatchesFormat')) { - /** - * Asserts that a string matches a given format string. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringMatchesFormat - */ - function assertStringMatchesFormat(string $format, string $string, string $message = ''): void - { - Assert::assertStringMatchesFormat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringMatchesFormatFile')) { - /** - * Asserts that a string matches a given format file. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringMatchesFormatFile - */ - function assertStringMatchesFormatFile(string $formatFile, string $string, string $message = ''): void - { - Assert::assertStringMatchesFormatFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringStartsWith')) { - /** - * Asserts that a string starts with a given prefix. - * - * @param non-empty-string $prefix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringStartsWith - */ - function assertStringStartsWith(string $prefix, string $string, string $message = ''): void - { - Assert::assertStringStartsWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringStartsNotWith')) { - /** - * Asserts that a string starts not with a given prefix. - * - * @param non-empty-string $prefix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringStartsNotWith - */ - function assertStringStartsNotWith(string $prefix, string $string, string $message = ''): void - { - Assert::assertStringStartsNotWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringContainsString')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringContainsString - */ - function assertStringContainsString(string $needle, string $haystack, string $message = ''): void - { - Assert::assertStringContainsString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringContainsStringIgnoringCase')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringContainsStringIgnoringCase - */ - function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - Assert::assertStringContainsStringIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringNotContainsString')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringNotContainsString - */ - function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void - { - Assert::assertStringNotContainsString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringNotContainsStringIgnoringCase')) { - /** - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringNotContainsStringIgnoringCase - */ - function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void - { - Assert::assertStringNotContainsStringIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEndsWith')) { - /** - * Asserts that a string ends with a given suffix. - * - * @param non-empty-string $suffix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEndsWith - */ - function assertStringEndsWith(string $suffix, string $string, string $message = ''): void - { - Assert::assertStringEndsWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertStringEndsNotWith')) { - /** - * Asserts that a string ends not with a given suffix. - * - * @param non-empty-string $suffix - * - * @throws ExpectationFailedException - * @throws InvalidArgumentException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertStringEndsNotWith - */ - function assertStringEndsNotWith(string $suffix, string $string, string $message = ''): void - { - Assert::assertStringEndsNotWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlFileEqualsXmlFile')) { - /** - * Asserts that two XML files are equal. - * - * @throws Exception - * @throws ExpectationFailedException - * @throws XmlException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlFileEqualsXmlFile - */ - function assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - Assert::assertXmlFileEqualsXmlFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlFileNotEqualsXmlFile')) { - /** - * Asserts that two XML files are not equal. - * - * @throws \PHPUnit\Util\Exception - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlFileNotEqualsXmlFile - */ - function assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = ''): void - { - Assert::assertXmlFileNotEqualsXmlFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlFile')) { - /** - * Asserts that two XML documents are equal. - * - * @throws ExpectationFailedException - * @throws XmlException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlStringEqualsXmlFile - */ - function assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml, string $message = ''): void - { - Assert::assertXmlStringEqualsXmlFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlFile')) { - /** - * Asserts that two XML documents are not equal. - * - * @throws ExpectationFailedException - * @throws XmlException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlStringNotEqualsXmlFile - */ - function assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml, string $message = ''): void - { - Assert::assertXmlStringNotEqualsXmlFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlString')) { - /** - * Asserts that two XML documents are equal. - * - * @throws ExpectationFailedException - * @throws XmlException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlStringEqualsXmlString - */ - function assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml, string $message = ''): void - { - Assert::assertXmlStringEqualsXmlString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlString')) { - /** - * Asserts that two XML documents are not equal. - * - * @throws ExpectationFailedException - * @throws XmlException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertXmlStringNotEqualsXmlString - */ - function assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml, string $message = ''): void - { - Assert::assertXmlStringNotEqualsXmlString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertThat')) { - /** - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertThat - */ - function assertThat(mixed $value, Constraint $constraint, string $message = ''): void - { - Assert::assertThat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJson')) { - /** - * Asserts that a string is a valid JSON string. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJson - */ - function assertJson(string $actual, string $message = ''): void - { - Assert::assertJson(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonString')) { - /** - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringEqualsJsonString - */ - function assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - Assert::assertJsonStringEqualsJsonString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonString')) { - /** - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringNotEqualsJsonString - */ - function assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = ''): void - { - Assert::assertJsonStringNotEqualsJsonString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonFile')) { - /** - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringEqualsJsonFile - */ - function assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - Assert::assertJsonStringEqualsJsonFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonFile')) { - /** - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonStringNotEqualsJsonFile - */ - function assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = ''): void - { - Assert::assertJsonStringNotEqualsJsonFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonFileEqualsJsonFile')) { - /** - * Asserts that two JSON files are equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonFileEqualsJsonFile - */ - function assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - Assert::assertJsonFileEqualsJsonFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\assertJsonFileNotEqualsJsonFile')) { - /** - * Asserts that two JSON files are not equal. - * - * @throws ExpectationFailedException - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertJsonFileNotEqualsJsonFile - */ - function assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = ''): void - { - Assert::assertJsonFileNotEqualsJsonFile(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\logicalAnd')) { - function logicalAnd(mixed ...$constraints): LogicalAnd - { - return Assert::logicalAnd(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\logicalOr')) { - function logicalOr(mixed ...$constraints): LogicalOr - { - return Assert::logicalOr(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\logicalNot')) { - function logicalNot(Constraint $constraint): LogicalNot - { - return Assert::logicalNot(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\logicalXor')) { - function logicalXor(mixed ...$constraints): LogicalXor - { - return Assert::logicalXor(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\anything')) { - function anything(): IsAnything - { - return Assert::anything(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isTrue')) { - function isTrue(): IsTrue - { - return Assert::isTrue(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isFalse')) { - function isFalse(): IsFalse - { - return Assert::isFalse(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isJson')) { - function isJson(): IsJson - { - return Assert::isJson(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isNull')) { - function isNull(): IsNull - { - return Assert::isNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isFinite')) { - function isFinite(): IsFinite - { - return Assert::isFinite(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isInfinite')) { - function isInfinite(): IsInfinite - { - return Assert::isInfinite(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isNan')) { - function isNan(): IsNan - { - return Assert::isNan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsEqual')) { - function containsEqual(mixed $value): TraversableContainsEqual - { - return Assert::containsEqual(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsIdentical')) { - function containsIdentical(mixed $value): TraversableContainsIdentical - { - return Assert::containsIdentical(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnly')) { - function containsOnly(string $type): TraversableContainsOnly - { - return Assert::containsOnly(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyArray')) { - function containsOnlyArray(): TraversableContainsOnly - { - return Assert::containsOnlyArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyBool')) { - function containsOnlyBool(): TraversableContainsOnly - { - return Assert::containsOnlyBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyCallable')) { - function containsOnlyCallable(): TraversableContainsOnly - { - return Assert::containsOnlyCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyFloat')) { - function containsOnlyFloat(): TraversableContainsOnly - { - return Assert::containsOnlyFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyInt')) { - function containsOnlyInt(): TraversableContainsOnly - { - return Assert::containsOnlyInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyIterable')) { - function containsOnlyIterable(): TraversableContainsOnly - { - return Assert::containsOnlyIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyNull')) { - function containsOnlyNull(): TraversableContainsOnly - { - return Assert::containsOnlyNull(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyNumeric')) { - function containsOnlyNumeric(): TraversableContainsOnly - { - return Assert::containsOnlyNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyObject')) { - function containsOnlyObject(): TraversableContainsOnly - { - return Assert::containsOnlyObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyResource')) { - function containsOnlyResource(): TraversableContainsOnly - { - return Assert::containsOnlyResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyClosedResource')) { - function containsOnlyClosedResource(): TraversableContainsOnly - { - return Assert::containsOnlyClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyScalar')) { - function containsOnlyScalar(): TraversableContainsOnly - { - return Assert::containsOnlyScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyString')) { - function containsOnlyString(): TraversableContainsOnly - { - return Assert::containsOnlyString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\containsOnlyInstancesOf')) { - function containsOnlyInstancesOf(string $className): TraversableContainsOnly - { - return Assert::containsOnlyInstancesOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\arrayHasKey')) { - function arrayHasKey(mixed $key): ArrayHasKey - { - return Assert::arrayHasKey(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isList')) { - function isList(): IsList - { - return Assert::isList(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\equalTo')) { - function equalTo(mixed $value): IsEqual - { - return Assert::equalTo(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\equalToCanonicalizing')) { - function equalToCanonicalizing(mixed $value): IsEqualCanonicalizing - { - return Assert::equalToCanonicalizing(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\equalToIgnoringCase')) { - function equalToIgnoringCase(mixed $value): IsEqualIgnoringCase - { - return Assert::equalToIgnoringCase(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\equalToWithDelta')) { - function equalToWithDelta(mixed $value, float $delta): IsEqualWithDelta - { - return Assert::equalToWithDelta(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isEmpty')) { - function isEmpty(): IsEmpty - { - return Assert::isEmpty(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isWritable')) { - function isWritable(): IsWritable - { - return Assert::isWritable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isReadable')) { - function isReadable(): IsReadable - { - return Assert::isReadable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\directoryExists')) { - function directoryExists(): DirectoryExists - { - return Assert::directoryExists(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\fileExists')) { - function fileExists(): FileExists - { - return Assert::fileExists(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\greaterThan')) { - function greaterThan(mixed $value): GreaterThan - { - return Assert::greaterThan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\greaterThanOrEqual')) { - function greaterThanOrEqual(mixed $value): LogicalOr - { - return Assert::greaterThanOrEqual(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\identicalTo')) { - function identicalTo(mixed $value): IsIdentical - { - return Assert::identicalTo(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isInstanceOf')) { - function isInstanceOf(string $className): IsInstanceOf - { - return Assert::isInstanceOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isArray')) { - function isArray(): IsType - { - return Assert::isArray(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isBool')) { - function isBool(): IsType - { - return Assert::isBool(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isCallable')) { - function isCallable(): IsType - { - return Assert::isCallable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isFloat')) { - function isFloat(): IsType - { - return Assert::isFloat(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isInt')) { - function isInt(): IsType - { - return Assert::isInt(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isIterable')) { - function isIterable(): IsType - { - return Assert::isIterable(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isNumeric')) { - function isNumeric(): IsType - { - return Assert::isNumeric(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isObject')) { - function isObject(): IsType - { - return Assert::isObject(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isResource')) { - function isResource(): IsType - { - return Assert::isResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isClosedResource')) { - function isClosedResource(): IsType - { - return Assert::isClosedResource(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isScalar')) { - function isScalar(): IsType - { - return Assert::isScalar(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isString')) { - function isString(): IsType - { - return Assert::isString(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\isType')) { - function isType(string $type): IsType - { - return Assert::isType(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\lessThan')) { - function lessThan(mixed $value): LessThan - { - return Assert::lessThan(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\lessThanOrEqual')) { - function lessThanOrEqual(mixed $value): LogicalOr - { - return Assert::lessThanOrEqual(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\matchesRegularExpression')) { - function matchesRegularExpression(string $pattern): RegularExpression - { - return Assert::matchesRegularExpression(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\matches')) { - function matches(string $string): StringMatchesFormatDescription - { - return Assert::matches(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\stringStartsWith')) { - function stringStartsWith(string $prefix): StringStartsWith - { - return Assert::stringStartsWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\stringContains')) { - function stringContains(string $string, bool $case = true): StringContains - { - return Assert::stringContains(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\stringEndsWith')) { - function stringEndsWith(string $suffix): StringEndsWith - { - return Assert::stringEndsWith(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\stringEqualsStringIgnoringLineEndings')) { - function stringEqualsStringIgnoringLineEndings(string $string): StringEqualsStringIgnoringLineEndings - { - return Assert::stringEqualsStringIgnoringLineEndings(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\countOf')) { - function countOf(int $count): Count - { - return Assert::countOf(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\objectEquals')) { - function objectEquals(object $object, string $method = 'equals'): ObjectEquals - { - return Assert::objectEquals(...func_get_args()); - } -} - -if (!function_exists('PHPUnit\Framework\callback')) { - /** - * @template CallbackInput of mixed - * - * @param callable(CallbackInput $callback): bool $callback - * - * @return Callback - */ - function callback(callable $callback): Callback - { - return Assert::callback($callback); - } -} - -if (!function_exists('PHPUnit\Framework\any')) { - /** - * Returns a matcher that matches when the method is executed - * zero or more times. - */ - function any(): AnyInvokedCountMatcher - { - return new AnyInvokedCountMatcher; - } -} - -if (!function_exists('PHPUnit\Framework\never')) { - /** - * Returns a matcher that matches when the method is never executed. - */ - function never(): InvokedCountMatcher - { - return new InvokedCountMatcher(0); - } -} - -if (!function_exists('PHPUnit\Framework\atLeast')) { - /** - * Returns a matcher that matches when the method is executed - * at least N times. - */ - function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher - { - return new InvokedAtLeastCountMatcher( - $requiredInvocations, - ); - } -} - -if (!function_exists('PHPUnit\Framework\atLeastOnce')) { - /** - * Returns a matcher that matches when the method is executed at least once. - */ - function atLeastOnce(): InvokedAtLeastOnceMatcher - { - return new InvokedAtLeastOnceMatcher; - } -} - -if (!function_exists('PHPUnit\Framework\once')) { - /** - * Returns a matcher that matches when the method is executed exactly once. - */ - function once(): InvokedCountMatcher - { - return new InvokedCountMatcher(1); - } -} - -if (!function_exists('PHPUnit\Framework\exactly')) { - /** - * Returns a matcher that matches when the method is executed - * exactly $count times. - */ - function exactly(int $count): InvokedCountMatcher - { - return new InvokedCountMatcher($count); - } -} - -if (!function_exists('PHPUnit\Framework\atMost')) { - /** - * Returns a matcher that matches when the method is executed - * at most N times. - */ - function atMost(int $allowedInvocations): InvokedAtMostCountMatcher - { - return new InvokedAtMostCountMatcher($allowedInvocations); - } -} - -if (!function_exists('PHPUnit\Framework\throwException')) { - function throwException(Throwable $exception): ExceptionStub - { - return new ExceptionStub($exception); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/After.php b/vendor/phpunit/phpunit/src/Framework/Attributes/After.php deleted file mode 100644 index 6d36d291..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/After.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class After -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/AfterClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/AfterClass.php deleted file mode 100644 index d4a9d6f4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/AfterClass.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class AfterClass -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/BackupGlobals.php b/vendor/phpunit/phpunit/src/Framework/Attributes/BackupGlobals.php deleted file mode 100644 index f9526ca2..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/BackupGlobals.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class BackupGlobals -{ - private bool $enabled; - - public function __construct(bool $enabled) - { - $this->enabled = $enabled; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php b/vendor/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php deleted file mode 100644 index e633cf88..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class BackupStaticProperties -{ - private bool $enabled; - - public function __construct(bool $enabled) - { - $this->enabled = $enabled; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Before.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Before.php deleted file mode 100644 index c2af00b7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Before.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class Before -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php deleted file mode 100644 index 2bb5a07b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class BeforeClass -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClass.php deleted file mode 100644 index 2cf0b2dd..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php deleted file mode 100644 index 486fc5b0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversClassesThatExtendClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php deleted file mode 100644 index 69bcd846..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversClassesThatImplementInterface -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - public function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php deleted file mode 100644 index 3b58b191..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversFunction -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param non-empty-string $functionName - */ - public function __construct(string $functionName) - { - $this->functionName = $functionName; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php deleted file mode 100644 index 4181239b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversMethod -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php deleted file mode 100644 index 50d82b99..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversNamespace -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - public function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php deleted file mode 100644 index 33ce31f3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class CoversNothing -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php deleted file mode 100644 index 89927855..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversTrait -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param trait-string $traitName - */ - public function __construct(string $traitName) - { - $this->traitName = $traitName; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DataProvider.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DataProvider.php deleted file mode 100644 index fc4a822f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DataProvider.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DataProvider -{ - /** - * @var non-empty-string - */ - private string $methodName; - private bool $validateArgumentCount; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName, bool $validateArgumentCount = true) - { - $this->methodName = $methodName; - $this->validateArgumentCount = $validateArgumentCount; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function validateArgumentCount(): bool - { - return $this->validateArgumentCount; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DataProviderExternal.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DataProviderExternal.php deleted file mode 100644 index e1f11ab1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DataProviderExternal.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DataProviderExternal -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - private bool $validateArgumentCount; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName, bool $validateArgumentCount = true) - { - $this->className = $className; - $this->methodName = $methodName; - $this->validateArgumentCount = $validateArgumentCount; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function validateArgumentCount(): bool - { - return $this->validateArgumentCount; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Depends.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Depends.php deleted file mode 100644 index 1375ae5b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Depends.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class Depends -{ - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternal.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternal.php deleted file mode 100644 index c2f9e39f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternal.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsExternal -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingDeepClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingDeepClone.php deleted file mode 100644 index d71452b8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingDeepClone.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsExternalUsingDeepClone -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingShallowClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingShallowClone.php deleted file mode 100644 index 9fb8fbf7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsExternalUsingShallowClone.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsExternalUsingShallowClone -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClass.php deleted file mode 100644 index 14465c77..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsOnClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingDeepClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingDeepClone.php deleted file mode 100644 index dc46c39d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingDeepClone.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsOnClassUsingDeepClone -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingShallowClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingShallowClone.php deleted file mode 100644 index 5201f045..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsOnClassUsingShallowClone.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsOnClassUsingShallowClone -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingDeepClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingDeepClone.php deleted file mode 100644 index 173188ec..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingDeepClone.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsUsingDeepClone -{ - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingShallowClone.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingShallowClone.php deleted file mode 100644 index 8aff52a3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DependsUsingShallowClone.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class DependsUsingShallowClone -{ - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DisableReturnValueGenerationForTestDoubles.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DisableReturnValueGenerationForTestDoubles.php deleted file mode 100644 index 2709f569..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DisableReturnValueGenerationForTestDoubles.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class DisableReturnValueGenerationForTestDoubles -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/DoesNotPerformAssertions.php b/vendor/phpunit/phpunit/src/Framework/Attributes/DoesNotPerformAssertions.php deleted file mode 100644 index f193e5af..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/DoesNotPerformAssertions.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class DoesNotPerformAssertions -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php b/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php deleted file mode 100644 index 5d1ac72c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class ExcludeGlobalVariableFromBackup -{ - /** - * @var non-empty-string - */ - private string $globalVariableName; - - /** - * @param non-empty-string $globalVariableName - */ - public function __construct(string $globalVariableName) - { - $this->globalVariableName = $globalVariableName; - } - - /** - * @return non-empty-string - */ - public function globalVariableName(): string - { - return $this->globalVariableName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php b/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php deleted file mode 100644 index ea572549..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class ExcludeStaticPropertyFromBackup -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $propertyName; - - /** - * @param class-string $className - * @param non-empty-string $propertyName - */ - public function __construct(string $className, string $propertyName) - { - $this->className = $className; - $this->propertyName = $propertyName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function propertyName(): string - { - return $this->propertyName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Group.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Group.php deleted file mode 100644 index 5a6942bb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Group.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class Group -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name) - { - $this->name = $name; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php b/vendor/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php deleted file mode 100644 index d137edd7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class IgnoreDeprecations -{ - /** @var null|non-empty-string */ - private ?string $messagePattern; - - /** - * @param null|non-empty-string $messagePattern - */ - public function __construct(null|string $messagePattern = null) - { - $this->messagePattern = $messagePattern; - } - - /** - * @return null|non-empty-string - */ - public function messagePattern(): ?string - { - return $this->messagePattern; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php b/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php deleted file mode 100644 index 1cebec04..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class IgnorePhpunitDeprecations -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitWarnings.php b/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitWarnings.php deleted file mode 100644 index af1d22bd..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitWarnings.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class IgnorePhpunitWarnings -{ - /** @var null|non-empty-string */ - private ?string $messagePattern; - - /** - * @param null|non-empty-string $messagePattern - */ - public function __construct(null|string $messagePattern = null) - { - $this->messagePattern = $messagePattern; - } - - /** - * @return null|non-empty-string - */ - public function messagePattern(): ?string - { - return $this->messagePattern; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Large.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Large.php deleted file mode 100644 index a751a934..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Large.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class Large -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Medium.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Medium.php deleted file mode 100644 index debc4b0d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Medium.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class Medium -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/PostCondition.php b/vendor/phpunit/phpunit/src/Framework/Attributes/PostCondition.php deleted file mode 100644 index 8eb40fe0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/PostCondition.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class PostCondition -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/PreCondition.php b/vendor/phpunit/phpunit/src/Framework/Attributes/PreCondition.php deleted file mode 100644 index 5f47fc59..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/PreCondition.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class PreCondition -{ - private int $priority; - - public function __construct(int $priority = 0) - { - $this->priority = $priority; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php b/vendor/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php deleted file mode 100644 index fcd9c637..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class PreserveGlobalState -{ - private bool $enabled; - - public function __construct(bool $enabled) - { - $this->enabled = $enabled; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php deleted file mode 100644 index 7e460b99..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresEnvironmentVariable -{ - private string $environmentVariableName; - private null|string $value; - - public function __construct(string $environmentVariableName, null|string $value = null) - { - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php deleted file mode 100644 index e358bdf1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresFunction -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param non-empty-string $functionName - */ - public function __construct(string $functionName) - { - $this->functionName = $functionName; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php deleted file mode 100644 index 713c1ee9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresMethod -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php deleted file mode 100644 index 066d7d3c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class RequiresOperatingSystem -{ - /** - * @var non-empty-string - */ - private string $regularExpression; - - /** - * @param non-empty-string $regularExpression - */ - public function __construct(string $regularExpression) - { - $this->regularExpression = $regularExpression; - } - - /** - * @return non-empty-string - */ - public function regularExpression(): string - { - return $this->regularExpression; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystemFamily.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystemFamily.php deleted file mode 100644 index 088ba85c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystemFamily.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class RequiresOperatingSystemFamily -{ - /** - * @var non-empty-string - */ - private string $operatingSystemFamily; - - /** - * @param non-empty-string $operatingSystemFamily - */ - public function __construct(string $operatingSystemFamily) - { - $this->operatingSystemFamily = $operatingSystemFamily; - } - - /** - * @return non-empty-string - */ - public function operatingSystemFamily(): string - { - return $this->operatingSystemFamily; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhp.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhp.php deleted file mode 100644 index 94fbe51b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhp.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class RequiresPhp -{ - /** - * @var non-empty-string - */ - private string $versionRequirement; - - /** - * @param non-empty-string $versionRequirement - */ - public function __construct(string $versionRequirement) - { - $this->versionRequirement = $versionRequirement; - } - - /** - * @return non-empty-string - */ - public function versionRequirement(): string - { - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpExtension.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpExtension.php deleted file mode 100644 index 61a81ec4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpExtension.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresPhpExtension -{ - /** - * @var non-empty-string - */ - private string $extension; - - /** - * @var null|non-empty-string - */ - private ?string $versionRequirement; - - /** - * @param non-empty-string $extension - * @param null|non-empty-string $versionRequirement - */ - public function __construct(string $extension, ?string $versionRequirement = null) - { - $this->extension = $extension; - $this->versionRequirement = $versionRequirement; - } - - /** - * @return non-empty-string - */ - public function extension(): string - { - return $this->extension; - } - - /** - * @return null|non-empty-string - */ - public function versionRequirement(): ?string - { - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunit.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunit.php deleted file mode 100644 index 8b26405b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunit.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class RequiresPhpunit -{ - /** - * @var non-empty-string - */ - private string $versionRequirement; - - /** - * @param non-empty-string $versionRequirement - */ - public function __construct(string $versionRequirement) - { - $this->versionRequirement = $versionRequirement; - } - - /** - * @return non-empty-string - */ - public function versionRequirement(): string - { - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunitExtension.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunitExtension.php deleted file mode 100644 index 9b6a164f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresPhpunitExtension.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; -use PHPUnit\Runner\Extension\Extension; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresPhpunitExtension -{ - /** - * @var class-string - */ - private string $extensionClass; - - /** - * @param class-string $extensionClass - */ - public function __construct(string $extensionClass) - { - $this->extensionClass = $extensionClass; - } - - /** - * @return class-string - */ - public function extensionClass(): string - { - return $this->extensionClass; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresSetting.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresSetting.php deleted file mode 100644 index 86828dd0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresSetting.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresSetting -{ - /** - * @var non-empty-string - */ - private string $setting; - - /** - * @var non-empty-string - */ - private string $value; - - /** - * @param non-empty-string $setting - * @param non-empty-string $value - */ - public function __construct(string $setting, string $value) - { - $this->setting = $setting; - $this->value = $value; - } - - /** - * @return non-empty-string - */ - public function setting(): string - { - return $this->setting; - } - - /** - * @return non-empty-string - */ - public function value(): string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RunClassInSeparateProcess.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RunClassInSeparateProcess.php deleted file mode 100644 index 56bed4ba..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RunClassInSeparateProcess.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6284 - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class RunClassInSeparateProcess -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RunInSeparateProcess.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RunInSeparateProcess.php deleted file mode 100644 index 740d6f38..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RunInSeparateProcess.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class RunInSeparateProcess -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RunTestsInSeparateProcesses.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RunTestsInSeparateProcesses.php deleted file mode 100644 index 0f8d4320..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RunTestsInSeparateProcesses.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class RunTestsInSeparateProcesses -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Small.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Small.php deleted file mode 100644 index 5ef284ab..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Small.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS)] -final readonly class Small -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Test.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Test.php deleted file mode 100644 index a15f7f55..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Test.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class Test -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDox.php b/vendor/phpunit/phpunit/src/Framework/Attributes/TestDox.php deleted file mode 100644 index b0478506..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDox.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] -final readonly class TestDox -{ - /** - * @var non-empty-string - */ - private string $text; - - /** - * @param non-empty-string $text - */ - public function __construct(string $text) - { - $this->text = $text; - } - - /** - * @return non-empty-string - */ - public function text(): string - { - return $this->text; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatter.php b/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatter.php deleted file mode 100644 index 0456d843..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatter.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class TestDoxFormatter -{ - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatterExternal.php b/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatterExternal.php deleted file mode 100644 index de5cf701..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/TestDoxFormatterExternal.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class TestDoxFormatterExternal -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/TestWith.php b/vendor/phpunit/phpunit/src/Framework/Attributes/TestWith.php deleted file mode 100644 index b5c33a43..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/TestWith.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class TestWith -{ - /** - * @var array - */ - private array $data; - - /** - * @var ?non-empty-string - */ - private ?string $name; - - /** - * @param array $data - * @param ?non-empty-string $name - */ - public function __construct(array $data, ?string $name = null) - { - $this->data = $data; - $this->name = $name; - } - - /** - * @return array - */ - public function data(): array - { - return $this->data; - } - - /** - * @return ?non-empty-string - */ - public function name(): ?string - { - return $this->name; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php b/vendor/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php deleted file mode 100644 index bfe9c092..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class TestWithJson -{ - /** - * @var non-empty-string - */ - private string $json; - - /** - * @var ?non-empty-string - */ - private ?string $name; - - /** - * @param non-empty-string $json - * @param ?non-empty-string $name - */ - public function __construct(string $json, ?string $name = null) - { - $this->json = $json; - $this->name = $name; - } - - /** - * @return non-empty-string - */ - public function json(): string - { - return $this->json; - } - - /** - * @return ?non-empty-string - */ - public function name(): ?string - { - return $this->name; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/Ticket.php b/vendor/phpunit/phpunit/src/Framework/Attributes/Ticket.php deleted file mode 100644 index e463247e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/Ticket.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class Ticket -{ - /** - * @var non-empty-string - */ - private string $text; - - /** - * @param non-empty-string $text - */ - public function __construct(string $text) - { - $this->text = $text; - } - - /** - * @return non-empty-string - */ - public function text(): string - { - return $this->text; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClass.php deleted file mode 100644 index f7078bce..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php deleted file mode 100644 index d1aa73fa..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesClassesThatExtendClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php deleted file mode 100644 index 0f2241c8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesClassesThatImplementInterface -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - public function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php deleted file mode 100644 index 12cc408b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesFunction -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param non-empty-string $functionName - */ - public function __construct(string $functionName) - { - $this->functionName = $functionName; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php deleted file mode 100644 index b1ee19b5..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesMethod -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php deleted file mode 100644 index ad929cdb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesNamespace -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - public function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php deleted file mode 100644 index 469e79c6..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesTrait -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param trait-string $traitName - */ - public function __construct(string $traitName) - { - $this->traitName = $traitName; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/WithEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Framework/Attributes/WithEnvironmentVariable.php deleted file mode 100644 index 6d8e2d30..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/WithEnvironmentVariable.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class WithEnvironmentVariable -{ - /** - * @var non-empty-string - */ - private string $environmentVariableName; - private null|string $value; - - /** - * @param non-empty-string $environmentVariableName - */ - public function __construct(string $environmentVariableName, null|string $value = null) - { - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - /** - * @return non-empty-string - */ - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php b/vendor/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php deleted file mode 100644 index a10f0fc2..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_METHOD)] -final readonly class WithoutErrorHandler -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php deleted file mode 100644 index 5846cf19..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsFalse extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is false'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $other === false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php deleted file mode 100644 index be589523..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsTrue extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is true'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $other === true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php deleted file mode 100644 index 8646f5a1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use Closure; -use ReflectionFunction; - -/** - * @template CallbackInput of mixed - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Callback extends Constraint -{ - /** - * @var callable(CallbackInput): bool - */ - private readonly mixed $callback; - - /** - * @param callable(CallbackInput $input): bool $callback - */ - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is accepted by specified callback'; - } - - public function isVariadic(): bool - { - return (new ReflectionFunction(Closure::fromCallable($this->callback)))->isVariadic(); - } - - /** - * Evaluates the constraint for parameter $value. Returns true if the - * constraint is met, false otherwise. - * - * @param CallbackInput $other - */ - protected function matches(mixed $other): bool - { - if ($this->isVariadic()) { - return ($this->callback)(...$other); - } - - return ($this->callback)($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php deleted file mode 100644 index 2ec012a0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function count; -use function is_countable; -use function iterator_count; -use function sprintf; -use EmptyIterator; -use Generator; -use Iterator; -use IteratorAggregate; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\GeneratorNotSupportedException; -use Traversable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -class Count extends Constraint -{ - private readonly int $expectedCount; - - public function __construct(int $expected) - { - $this->expectedCount = $expected; - } - - public function toString(): string - { - return sprintf( - 'count matches %d', - $this->expectedCount, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws Exception - */ - protected function matches(mixed $other): bool - { - return $this->expectedCount === $this->getCountOf($other); - } - - /** - * @throws Exception - */ - protected function getCountOf(mixed $other): ?int - { - if (is_countable($other)) { - return count($other); - } - - if ($other instanceof EmptyIterator) { - return 0; - } - - if ($other instanceof Traversable) { - while ($other instanceof IteratorAggregate) { - try { - $other = $other->getIterator(); - } catch (\Exception $e) { - throw new Exception( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } - - $iterator = $other; - - if ($iterator instanceof Generator) { - throw new GeneratorNotSupportedException; - } - - if (!$iterator instanceof Iterator) { - return iterator_count($iterator); - } - - $key = $iterator->key(); - $count = iterator_count($iterator); - - // Manually rewind $iterator to previous key, since iterator_count - // moves pointer. - if ($key !== null) { - $iterator->rewind(); - - while ($iterator->valid() && $key !== $iterator->key()) { - $iterator->next(); - } - } - - return $count; - } - - return null; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @throws Exception - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - 'actual size %d matches expected size %d', - (int) $this->getCountOf($other), - $this->expectedCount, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php deleted file mode 100644 index 7b252dd9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class GreaterThan extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is greater than ' . Exporter::export($this->value); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $this->value < $other; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php deleted file mode 100644 index 31942d9f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function count; -use function gettype; -use function sprintf; -use function str_starts_with; -use Countable; -use EmptyIterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEmpty extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is empty'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if ($other instanceof EmptyIterator) { - return true; - } - - if ($other instanceof Countable) { - return count($other) === 0; - } - - /** @phpstan-ignore empty.notAllowed */ - return empty($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - $type = gettype($other); - - return sprintf( - '%s %s %s', - str_starts_with($type, 'a') || str_starts_with($type, 'o') ? 'an' : 'a', - $type, - $this->toString(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php deleted file mode 100644 index 122dd734..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LessThan extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is less than ' . Exporter::export($this->value); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $this->value > $other; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php deleted file mode 100644 index a2417a28..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use Countable; -use PHPUnit\Framework\Exception; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class SameSize extends Count -{ - /** - * @param Countable|iterable $expected - * - * @throws Exception - */ - public function __construct(Countable|iterable $expected) - { - parent::__construct((int) $this->getCountOf($expected)); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php deleted file mode 100644 index 2f7028d7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php +++ /dev/null @@ -1,296 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function assert; -use function gettype; -use function is_int; -use function is_object; -use function sprintf; -use function str_replace; -use function strpos; -use function strtolower; -use function substr; -use Countable; -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Util\Exporter; -use ReflectionObject; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Constraint implements Countable, SelfDescribing -{ - /** - * @template A - * - * @param A $actual - * - * @return A - */ - final public function __invoke(mixed $actual): mixed - { - Assert::assertThat($actual, $this); - - return $actual; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool - { - $success = false; - - if ($this->matches($other)) { - $success = true; - } - - if ($returnResult) { - return $success; - } - - if (!$success) { - $this->fail($other, $description); - } - - return null; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return 1; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - */ - protected function matches(mixed $other): bool - { - return false; - } - - /** - * Throws an exception for the given compared value and test description. - * - * @throws ExpectationFailedException - */ - protected function fail(mixed $other, string $description, ?ComparisonFailure $comparisonFailure = null): never - { - $failureDescription = sprintf( - 'Failed asserting that %s.', - $this->failureDescription($other), - ); - - $additionalFailureDescription = $this->additionalFailureDescription($other); - - if ($additionalFailureDescription !== '') { - $failureDescription .= "\n" . $additionalFailureDescription; - } - - if ($description !== '') { - $failureDescription = $description . "\n" . $failureDescription; - } - - throw new ExpectationFailedException( - $failureDescription, - $comparisonFailure, - ); - } - - /** - * Return additional failure description where needed. - * - * The function can be overridden to provide additional failure - * information like a diff - */ - protected function additionalFailureDescription(mixed $other): string - { - return ''; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * To provide additional failure information additionalFailureDescription - * can be used. - */ - protected function failureDescription(mixed $other): string - { - return Exporter::export($other) . ' ' . $this->toString(); - } - - /** - * Returns a custom string representation of the constraint object when it - * appears in context of an $operator expression. - * - * The purpose of this method is to provide meaningful descriptive string - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct strings in this context. - * - * The method shall return empty string, when it does not handle - * customization by itself. - */ - protected function toStringInContext(Operator $operator, mixed $role): string - { - return ''; - } - - /** - * Returns the description of the failure when this constraint appears in - * context of an $operator expression. - * - * The purpose of this method is to provide meaningful failure description - * in context of operators such as LogicalNot. Native PHPUnit constraints - * are supported out of the box by LogicalNot, but externally developed - * ones had no way to provide correct messages in this context. - * - * The method shall return empty string, when it does not handle - * customization by itself. - */ - protected function failureDescriptionInContext(Operator $operator, mixed $role, mixed $other): string - { - $string = $this->toStringInContext($operator, $role); - - if ($string === '') { - return ''; - } - - return Exporter::export($other) . ' ' . $string; - } - - /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * Returns $this for terminal constraints and for operators that start - * non-reducible sub-expression, or the nearest descendant of $this that - * starts a non-reducible sub-expression. - * - * A constraint expression may be modelled as a tree with non-terminal - * nodes (operators) and terminal nodes. For example: - * - * LogicalOr (operator, non-terminal) - * + LogicalAnd (operator, non-terminal) - * | + IsType('int') (terminal) - * | + GreaterThan(10) (terminal) - * + LogicalNot (operator, non-terminal) - * + IsType('array') (terminal) - * - * A degenerate sub-expression is a part of the tree, that effectively does - * not contribute to the evaluation of the expression it appears in. An example - * of degenerate sub-expression is a BinaryOperator constructed with single - * operand or nested BinaryOperators, each with single operand. An - * expression involving a degenerate sub-expression is equivalent to a - * reduced expression with the degenerate sub-expression removed, for example - * - * LogicalAnd (operator) - * + LogicalOr (degenerate operator) - * | + LogicalAnd (degenerate operator) - * | + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * is equivalent to - * - * LogicalAnd (operator) - * + IsType('int') (terminal) - * + GreaterThan(10) (terminal) - * - * because the subexpression - * - * + LogicalOr - * + LogicalAnd - * + - - * - * is degenerate. Calling reduce() on the LogicalOr object above, as well - * as on LogicalAnd, shall return the IsType('int') instance. - * - * Other specific reductions can be implemented, for example cascade of - * LogicalNot operators - * - * + LogicalNot - * + LogicalNot - * +LogicalNot - * + IsTrue - * - * can be reduced to - * - * LogicalNot - * + IsTrue - */ - protected function reduce(): self - { - return $this; - } - - /** - * @return non-empty-string - */ - protected function valueToTypeStringFragment(mixed $value): string - { - if (is_object($value)) { - $reflector = new ReflectionObject($value); - - if ($reflector->isAnonymous()) { - $name = str_replace('class@anonymous', '', $reflector->getName()); - - $length = strpos($name, '$'); - - assert(is_int($length)); - - $name = substr($name, 0, $length); - - return 'an instance of anonymous class created at ' . $name . ' '; - } - - return 'an instance of class ' . $reflector->getName() . ' '; - } - - $type = strtolower(gettype($value)); - - if ($type === 'double') { - $type = 'float'; - } - - if ($type === 'resource (closed)') { - $type = 'closed resource'; - } - - return match ($type) { - 'array', 'integer' => 'an ' . $type . ' ', - 'boolean', 'closed resource', 'float', 'resource', 'string' => 'a ' . $type . ' ', - 'null' => 'null ', - default => 'a value of ' . $type . ' ', - }; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php deleted file mode 100644 index 2051bfce..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_string; -use function sprintf; -use function str_contains; -use function trim; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Exporter; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqual extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): bool - { - // If $this->value and $other are identical, they are also equal. - // This is the most common path and will allow us to skip - // initialization of all the comparators. - if ($this->value === $other) { - return true; - } - - $comparatorFactory = ComparatorFactory::getInstance(); - - try { - $comparator = $comparatorFactory->getComparatorFor( - $this->value, - $other, - ); - - $comparator->assertEquals( - $this->value, - $other, - ); - } catch (ComparisonFailure $f) { - if ($returnResult) { - return false; - } - - throw new ExpectationFailedException( - trim($description . "\n" . $f->getMessage()), - $f, - ); - } - - return true; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $delta = ''; - - if (is_string($this->value)) { - if (str_contains($this->value, "\n")) { - return 'is equal to '; - } - - return sprintf( - "is equal to '%s'", - $this->value, - ); - } - - return sprintf( - 'is equal to %s%s', - Exporter::export($this->value), - $delta, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php deleted file mode 100644 index b826464d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_string; -use function sprintf; -use function str_contains; -use function trim; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Exporter; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqualCanonicalizing extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): bool - { - // If $this->value and $other are identical, they are also equal. - // This is the most common path and will allow us to skip - // initialization of all the comparators. - if ($this->value === $other) { - return true; - } - - $comparatorFactory = ComparatorFactory::getInstance(); - - try { - $comparator = $comparatorFactory->getComparatorFor( - $this->value, - $other, - ); - - $comparator->assertEquals( - $this->value, - $other, - 0.0, - true, - ); - } catch (ComparisonFailure $f) { - if ($returnResult) { - return false; - } - - throw new ExpectationFailedException( - trim($description . "\n" . $f->getMessage()), - $f, - ); - } - - return true; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - if (is_string($this->value)) { - if (str_contains($this->value, "\n")) { - return 'is equal to '; - } - - return sprintf( - "is equal to '%s'", - $this->value, - ); - } - - return sprintf( - 'is equal to %s', - Exporter::export($this->value), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php deleted file mode 100644 index c7b2c31d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_string; -use function sprintf; -use function str_contains; -use function trim; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Exporter; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqualIgnoringCase extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): bool - { - // If $this->value and $other are identical, they are also equal. - // This is the most common path and will allow us to skip - // initialization of all the comparators. - if ($this->value === $other) { - return true; - } - - $comparatorFactory = ComparatorFactory::getInstance(); - - try { - $comparator = $comparatorFactory->getComparatorFor( - $this->value, - $other, - ); - - $comparator->assertEquals( - $this->value, - $other, - 0.0, - false, - true, - ); - } catch (ComparisonFailure $f) { - if ($returnResult) { - return false; - } - - throw new ExpectationFailedException( - trim($description . "\n" . $f->getMessage()), - $f, - ); - } - - return true; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - if (is_string($this->value)) { - if (str_contains($this->value, "\n")) { - return 'is equal to '; - } - - return sprintf( - "is equal to '%s'", - $this->value, - ); - } - - return sprintf( - 'is equal to %s', - Exporter::export($this->value), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php deleted file mode 100644 index 7f18b5bb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function sprintf; -use function trim; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Exporter; -use SebastianBergmann\Comparator\ComparisonFailure; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsEqualWithDelta extends Constraint -{ - private readonly mixed $value; - private readonly float $delta; - - public function __construct(mixed $value, float $delta) - { - $this->value = $value; - $this->delta = $delta; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): bool - { - // If $this->value and $other are identical, they are also equal. - // This is the most common path and will allow us to skip - // initialization of all the comparators. - if ($this->value === $other) { - return true; - } - - $comparatorFactory = ComparatorFactory::getInstance(); - - try { - $comparator = $comparatorFactory->getComparatorFor( - $this->value, - $other, - ); - - $comparator->assertEquals( - $this->value, - $other, - $this->delta, - ); - } catch (ComparisonFailure $f) { - if ($returnResult) { - return false; - } - - throw new ExpectationFailedException( - trim($description . "\n" . $f->getMessage()), - $f, - ); - } - - return true; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'is equal to %s with delta <%F>', - Exporter::export($this->value), - $this->delta, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php deleted file mode 100644 index a84f6eb9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function sprintf; -use PHPUnit\Util\Filter; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends Constraint -{ - private readonly string $className; - - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'exception of type "%s"', - $this->className, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $other instanceof $this->className; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @throws \PHPUnit\Framework\Exception - */ - protected function failureDescription(mixed $other): string - { - if ($other === null) { - return sprintf( - 'exception of type "%s" is thrown', - $this->className, - ); - } - - $message = ''; - - if ($other instanceof Throwable) { - $message = '. Message was: "' . $other->getMessage() . '" at' - . "\n" . Filter::stackTraceFromThrowableAsString($other); - } - - return sprintf( - 'exception of type "%s" matches expected exception "%s"%s', - $other::class, - $this->className, - $message, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php deleted file mode 100644 index 666f7337..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function sprintf; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionCode extends Constraint -{ - private readonly int|string $expectedCode; - - public function __construct(int|string $expected) - { - $this->expectedCode = $expected; - } - - public function toString(): string - { - return 'exception code is ' . $this->expectedCode; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return (string) $other === (string) $this->expectedCode; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - '%s is equal to expected exception code %s', - Exporter::export($other), - Exporter::export($this->expectedCode), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageIsOrContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageIsOrContains.php deleted file mode 100644 index ae920903..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageIsOrContains.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function sprintf; -use function str_contains; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionMessageIsOrContains extends Constraint -{ - private readonly string $expectedMessage; - - public function __construct(string $expectedMessage) - { - $this->expectedMessage = $expectedMessage; - } - - public function toString(): string - { - if ($this->expectedMessage === '') { - return 'exception message is empty'; - } - - return 'exception message contains ' . Exporter::export($this->expectedMessage); - } - - protected function matches(mixed $other): bool - { - if ($this->expectedMessage === '') { - return $other === ''; - } - - return str_contains((string) $other, $this->expectedMessage); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - if ($this->expectedMessage === '') { - return sprintf( - "exception message is empty but is '%s'", - $other, - ); - } - - return sprintf( - "exception message '%s' contains '%s'", - $other, - $this->expectedMessage, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageMatchesRegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageMatchesRegularExpression.php deleted file mode 100644 index 611af037..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageMatchesRegularExpression.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function preg_match; -use function sprintf; -use Exception; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExceptionMessageMatchesRegularExpression extends Constraint -{ - private readonly string $regularExpression; - - public function __construct(string $regularExpression) - { - $this->regularExpression = $regularExpression; - } - - public function toString(): string - { - return 'exception message matches ' . Exporter::export($this->regularExpression); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws \PHPUnit\Framework\Exception - * @throws Exception - */ - protected function matches(mixed $other): bool - { - $match = @preg_match($this->regularExpression, (string) $other); - - if ($match === false) { - throw new \PHPUnit\Framework\Exception( - sprintf( - 'Invalid expected exception message regular expression given: %s', - $this->regularExpression, - ), - ); - } - - return $match === 1; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - "exception message '%s' matches '%s'", - $other, - $this->regularExpression, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php deleted file mode 100644 index 83b991e1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_dir; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class DirectoryExists extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'directory exists'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_dir($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - 'directory "%s" exists', - $other, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php deleted file mode 100644 index cfc3b1b6..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function file_exists; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class FileExists extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'file exists'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return file_exists($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - 'file "%s" exists', - $other, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php deleted file mode 100644 index 1a32546c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_readable; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsReadable extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is readable'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_readable($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - '"%s" is readable', - $other, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php deleted file mode 100644 index 24e94f82..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_writable; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsWritable extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is writable'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_writable($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - '"%s" is writable', - $other, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php deleted file mode 100644 index 85df5f92..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsAnything extends Constraint -{ - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool - { - return $returnResult ? true : null; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is anything'; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return 0; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php deleted file mode 100644 index 03ba16f7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function explode; -use function gettype; -use function is_array; -use function is_object; -use function is_string; -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\Exporter; -use SebastianBergmann\Comparator\ComparisonFailure; -use UnitEnum; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsIdentical extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): ?bool - { - $success = $this->value === $other; - - if ($returnResult) { - return $success; - } - - if (!$success) { - $f = null; - - // if both values are strings, make sure a diff is generated - if (is_string($this->value) && is_string($other)) { - $f = new ComparisonFailure( - $this->value, - $other, - sprintf("'%s'", $this->value), - sprintf("'%s'", $other), - ); - } - - // if both values are array or enums, make sure a diff is generated - if ((is_array($this->value) && is_array($other)) || ($this->value instanceof UnitEnum && $other instanceof UnitEnum)) { - $f = new ComparisonFailure( - $this->value, - $other, - Exporter::export($this->value), - Exporter::export($other), - ); - } - - $this->fail($other, $description, $f); - } - - return null; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - if (is_object($this->value)) { - return 'is identical to an object of class "' . - $this->value::class . '"'; - } - - return 'is identical to ' . Exporter::export($this->value); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - if (is_object($this->value) && is_object($other)) { - return 'two variables reference the same object'; - } - - if (explode(' ', gettype($this->value), 2)[0] === 'resource' && explode(' ', gettype($other), 2)[0] === 'resource') { - return 'two variables reference the same resource'; - } - - if (is_string($this->value) && is_string($other)) { - return 'two strings are identical'; - } - - if (is_array($this->value) && is_array($other)) { - return 'two arrays are identical'; - } - - return parent::failureDescription($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php deleted file mode 100644 index 3fd6736a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function json_decode; -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Util\InvalidJsonException; -use PHPUnit\Util\Json; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class JsonMatches extends Constraint -{ - private readonly string $value; - - public function __construct(string $value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the object. - */ - public function toString(): string - { - return sprintf( - 'matches JSON string "%s"', - $this->value, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * This method can be overridden to implement the evaluation algorithm. - */ - protected function matches(mixed $other): bool - { - [$error, $recodedOther] = Json::canonicalize($other); - - if ($error) { - return false; - } - - [$error, $recodedValue] = Json::canonicalize($this->value); - - if ($error) { - return false; - } - - return $recodedOther === $recodedValue; - } - - /** - * Throws an exception for the given compared value and test description. - * - * @throws ExpectationFailedException - * @throws InvalidJsonException - */ - protected function fail(mixed $other, string $description, ?ComparisonFailure $comparisonFailure = null): never - { - if ($comparisonFailure === null) { - [$error, $recodedOther] = Json::canonicalize($other); - - if ($error) { - parent::fail($other, $description); - } - - [$error, $recodedValue] = Json::canonicalize($this->value); - - if ($error) { - parent::fail($other, $description); - } - - $comparisonFailure = new ComparisonFailure( - json_decode($this->value), - json_decode($other), - Json::prettify($recodedValue), - Json::prettify($recodedOther), - 'Failed asserting that two json values are equal.', - ); - } - - parent::fail($other, $description, $comparisonFailure); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php deleted file mode 100644 index b70de503..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_finite; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsFinite extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is finite'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_finite($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php deleted file mode 100644 index dbf4803b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_infinite; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsInfinite extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is infinite'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_infinite($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php deleted file mode 100644 index f9c47219..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_nan; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsNan extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is nan'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return is_nan($other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php deleted file mode 100644 index 2c78ea42..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function assert; -use function count; -use function is_object; -use PHPUnit\Framework\ActualValueIsNotAnObjectException; -use PHPUnit\Framework\ComparisonMethodDoesNotAcceptParameterTypeException; -use PHPUnit\Framework\ComparisonMethodDoesNotDeclareBoolReturnTypeException; -use PHPUnit\Framework\ComparisonMethodDoesNotDeclareExactlyOneParameterException; -use PHPUnit\Framework\ComparisonMethodDoesNotDeclareParameterTypeException; -use PHPUnit\Framework\ComparisonMethodDoesNotExistException; -use ReflectionNamedType; -use ReflectionObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ObjectEquals extends Constraint -{ - private readonly object $expected; - private readonly string $method; - - public function __construct(object $object, string $method = 'equals') - { - $this->expected = $object; - $this->method = $method; - } - - public function toString(): string - { - return 'two objects are equal'; - } - - /** - * @throws ActualValueIsNotAnObjectException - * @throws ComparisonMethodDoesNotAcceptParameterTypeException - * @throws ComparisonMethodDoesNotDeclareBoolReturnTypeException - * @throws ComparisonMethodDoesNotDeclareExactlyOneParameterException - * @throws ComparisonMethodDoesNotDeclareParameterTypeException - * @throws ComparisonMethodDoesNotExistException - */ - protected function matches(mixed $other): bool - { - if (!is_object($other)) { - throw new ActualValueIsNotAnObjectException; - } - - $object = new ReflectionObject($other); - - if (!$object->hasMethod($this->method)) { - throw new ComparisonMethodDoesNotExistException( - $other::class, - $this->method, - ); - } - - $method = $object->getMethod($this->method); - - if (!$method->hasReturnType()) { - throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( - $other::class, - $this->method, - ); - } - - $returnType = $method->getReturnType(); - - if (!$returnType instanceof ReflectionNamedType) { - throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( - $other::class, - $this->method, - ); - } - - if ($returnType->allowsNull()) { - throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( - $other::class, - $this->method, - ); - } - - if ($returnType->getName() !== 'bool') { - throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( - $other::class, - $this->method, - ); - } - - if ($method->getNumberOfParameters() !== 1 || $method->getNumberOfRequiredParameters() !== 1) { - throw new ComparisonMethodDoesNotDeclareExactlyOneParameterException( - $other::class, - $this->method, - ); - } - - assert(count($method->getParameters()) > 0); - $parameter = $method->getParameters()[0]; - - if (!$parameter->hasType()) { - throw new ComparisonMethodDoesNotDeclareParameterTypeException( - $other::class, - $this->method, - ); - } - - $type = $parameter->getType(); - - if (!$type instanceof ReflectionNamedType) { - throw new ComparisonMethodDoesNotDeclareParameterTypeException( - $other::class, - $this->method, - ); - } - - $typeName = $type->getName(); - - if ($typeName === 'self') { - $typeName = $other::class; - } - - if (!$this->expected instanceof $typeName) { - throw new ComparisonMethodDoesNotAcceptParameterTypeException( - $other::class, - $this->method, - $this->expected::class, - ); - } - - /** @phpstan-ignore method.dynamicName */ - return $other->{$this->method}($this->expected); - } - - protected function failureDescription(mixed $other): string - { - return $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php deleted file mode 100644 index 74c40c75..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function gettype; -use function is_object; -use function sprintf; -use ReflectionObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ObjectHasProperty extends Constraint -{ - private readonly string $propertyName; - - public function __construct(string $propertyName) - { - $this->propertyName = $propertyName; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'has property "%s"', - $this->propertyName, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @param mixed $other value or object to evaluate - */ - protected function matches(mixed $other): bool - { - if (!is_object($other)) { - return false; - } - - return (new ReflectionObject($other))->hasProperty($this->propertyName); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - * - * @param mixed $other evaluated value or object - */ - protected function failureDescription(mixed $other): string - { - if (is_object($other)) { - return sprintf( - 'object of class "%s" %s', - $other::class, - $this->toString(), - ); - } - - return sprintf( - '"%s" (%s) %s', - $other, - gettype($other), - $this->toString(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php deleted file mode 100644 index feb6d040..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function array_map; -use function count; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class BinaryOperator extends Operator -{ - /** - * @var list - */ - private readonly array $constraints; - - protected function __construct(mixed ...$constraints) - { - $this->constraints = array_map( - fn (mixed $constraint): Constraint => $this->checkConstraint($constraint), - $constraints, - ); - } - - /** - * Returns the number of operands (constraints). - */ - final public function arity(): int - { - return count($this->constraints); - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $reduced = $this->reduce(); - - if ($reduced !== $this) { - return $reduced->toString(); - } - - $text = ''; - - foreach ($this->constraints as $key => $constraint) { - $constraint = $constraint->reduce(); - - $text .= $this->constraintToString($constraint, $key); - } - - return $text; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - $count = 0; - - foreach ($this->constraints as $constraint) { - $count += count($constraint); - } - - return $count; - } - - /** - * @return list - */ - final protected function constraints(): array - { - return $this->constraints; - } - - /** - * Returns true if the $constraint needs to be wrapped with braces. - */ - final protected function constraintNeedsParentheses(Constraint $constraint): bool - { - return $this->arity() > 1 && parent::constraintNeedsParentheses($constraint); - } - - /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * See Constraint::reduce() for more. - */ - protected function reduce(): Constraint - { - if (count($this->constraints) === 1 && $this->constraints[0] instanceof Operator) { - return $this->constraints[0]->reduce(); - } - - return parent::reduce(); - } - - /** - * Returns string representation of given operand in context of this operator. - */ - private function constraintToString(Constraint $constraint, int $position): string - { - $prefix = ''; - - if ($position > 0) { - $prefix = (' ' . $this->operator() . ' '); - } - - if ($this->constraintNeedsParentheses($constraint)) { - return $prefix . '( ' . $constraint->toString() . ' )'; - } - - $string = $constraint->toStringInContext($this, $position); - - if ($string === '') { - $string = $constraint->toString(); - } - - return $prefix . $string; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php deleted file mode 100644 index e0a00a0e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalAnd extends BinaryOperator -{ - public static function fromConstraints(mixed ...$constraints): self - { - return new self(...$constraints); - } - - /** - * Returns the name of this operator. - */ - public function operator(): string - { - return 'and'; - } - - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int - { - return 22; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - foreach ($this->constraints() as $constraint) { - if (!$constraint->evaluate($other, '', true)) { - return false; - } - } - - return [] !== $this->constraints(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php deleted file mode 100644 index 22426090..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function array_map; -use function count; -use function preg_match; -use function preg_quote; -use function preg_replace; -use PHPUnit\Framework\ExpectationFailedException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalNot extends UnaryOperator -{ - public static function negate(string $string): string - { - $positives = [ - 'contains ', - 'exists', - 'has ', - 'is ', - 'are ', - 'matches ', - 'starts with ', - 'ends with ', - 'reference ', - 'not not ', - ]; - - $negatives = [ - 'does not contain ', - 'does not exist', - 'does not have ', - 'is not ', - 'are not ', - 'does not match ', - 'starts not with ', - 'ends not with ', - 'don\'t reference ', - 'not ', - ]; - - preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); - - if (count($matches) === 0) { - preg_match('/(\'[\w\W]*\')([\w\W]*)(\'[\w\W]*\')/i', $string, $matches); - } - - $positives = array_map( - static fn (string $s) => '/\\b' . preg_quote($s, '/') . '/', - $positives, - ); - - if (count($matches) >= 3) { - $nonInput = $matches[2]; - - $negatedString = preg_replace( - '/' . preg_quote($nonInput, '/') . '/', - preg_replace( - $positives, - $negatives, - $nonInput, - ), - $string, - ); - } else { - $negatedString = preg_replace( - $positives, - $negatives, - $string, - ); - } - - return $negatedString; - } - - /** - * Returns the name of this operator. - */ - public function operator(): string - { - return 'not'; - } - - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int - { - return 5; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws ExpectationFailedException - */ - protected function matches(mixed $other): bool - { - return !$this->constraint()->evaluate($other, '', true); - } - - /** - * Applies additional transformation to strings returned by toString() or - * failureDescription(). - */ - protected function transformString(string $string): string - { - return self::negate($string); - } - - /** - * Reduces the sub-expression starting at $this by skipping degenerate - * sub-expression and returns first descendant constraint that starts - * a non-reducible sub-expression. - * - * See Constraint::reduce() for more. - */ - protected function reduce(): Constraint - { - $constraint = $this->constraint(); - - if ($constraint instanceof self) { - return $constraint->constraint()->reduce(); - } - - return parent::reduce(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php deleted file mode 100644 index cbd87b9c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalOr extends BinaryOperator -{ - public static function fromConstraints(mixed ...$constraints): self - { - return new self(...$constraints); - } - - /** - * Returns the name of this operator. - */ - public function operator(): string - { - return 'or'; - } - - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - public function precedence(): int - { - return 24; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - public function matches(mixed $other): bool - { - foreach ($this->constraints() as $constraint) { - if ($constraint->evaluate($other, '', true)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php deleted file mode 100644 index 3b40a126..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function array_reduce; -use function array_shift; -use PHPUnit\Framework\ExpectationFailedException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class LogicalXor extends BinaryOperator -{ - public static function fromConstraints(mixed ...$constraints): self - { - return new self(...$constraints); - } - - /** - * Returns the name of this operator. - */ - public function operator(): string - { - return 'xor'; - } - - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php. - */ - public function precedence(): int - { - return 23; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - * - * @throws ExpectationFailedException - */ - public function matches(mixed $other): bool - { - $constraints = $this->constraints(); - - $initial = array_shift($constraints); - - if ($initial === null) { - return false; - } - - return array_reduce( - $constraints, - static fn (?bool $matches, Constraint $constraint): bool => $matches xor $constraint->evaluate($other, '', true), - $initial->evaluate($other, '', true), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php deleted file mode 100644 index 1195156e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class Operator extends Constraint -{ - /** - * Returns the name of this operator. - */ - abstract public function operator(): string; - - /** - * Returns this operator's precedence. - * - * @see https://www.php.net/manual/en/language.operators.precedence.php - */ - abstract public function precedence(): int; - - /** - * Returns the number of operands. - */ - abstract public function arity(): int; - - /** - * Validates $constraint argument. - */ - protected function checkConstraint(mixed $constraint): Constraint - { - if (!$constraint instanceof Constraint) { - return new IsEqual($constraint); - } - - return $constraint; - } - - /** - * Returns true if the $constraint needs to be wrapped with braces. - */ - protected function constraintNeedsParentheses(Constraint $constraint): bool - { - return $constraint instanceof self && - $constraint->arity() > 1 && - $this->precedence() <= $constraint->precedence(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php deleted file mode 100644 index d6ac6e3f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function count; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class UnaryOperator extends Operator -{ - private readonly Constraint $constraint; - - public function __construct(mixed $constraint) - { - $this->constraint = $this->checkConstraint($constraint); - } - - /** - * Returns the number of operands (constraints). - */ - public function arity(): int - { - return 1; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $reduced = $this->reduce(); - - if ($reduced !== $this) { - return $reduced->toString(); - } - - $constraint = $this->constraint->reduce(); - - if ($this->constraintNeedsParentheses($constraint)) { - return $this->operator() . '( ' . $constraint->toString() . ' )'; - } - - $string = $constraint->toStringInContext($this, 0); - - if ($string === '') { - return $this->transformString($constraint->toString()); - } - - return $string; - } - - /** - * Counts the number of constraint elements. - */ - public function count(): int - { - return count($this->constraint); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - $reduced = $this->reduce(); - - if ($reduced !== $this) { - return $reduced->failureDescription($other); - } - - $constraint = $this->constraint->reduce(); - - if ($this->constraintNeedsParentheses($constraint)) { - return $this->operator() . '( ' . $constraint->failureDescription($other) . ' )'; - } - - $string = $constraint->failureDescriptionInContext($this, 0, $other); - - if ($string === '') { - return $this->transformString($constraint->failureDescription($other)); - } - - return $string; - } - - /** - * Transforms string returned by the member constraint's toString() or - * failureDescription() such that it reflects constraint's participation in - * this expression. - * - * The method may be overwritten in a subclass to apply default - * transformation in case the operand constraint does not provide its own - * custom strings via toStringInContext() or failureDescriptionInContext(). - */ - protected function transformString(string $string): string - { - return $string; - } - - /** - * Provides access to $this->constraint for subclasses. - */ - final protected function constraint(): Constraint - { - return $this->constraint; - } - - /** - * Returns true if the $constraint needs to be wrapped with parentheses. - */ - protected function constraintNeedsParentheses(Constraint $constraint): bool - { - $constraint = $constraint->reduce(); - - return $constraint instanceof self || parent::constraintNeedsParentheses($constraint); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php deleted file mode 100644 index 582b58e8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use const JSON_ERROR_CTRL_CHAR; -use const JSON_ERROR_DEPTH; -use const JSON_ERROR_NONE; -use const JSON_ERROR_STATE_MISMATCH; -use const JSON_ERROR_SYNTAX; -use const JSON_ERROR_UTF8; -use function is_string; -use function json_decode; -use function json_last_error; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsJson extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is valid JSON'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if (!is_string($other) || $other === '') { - return false; - } - - json_decode($other); - - if (json_last_error() !== JSON_ERROR_NONE) { - return false; - } - - return true; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - if (!is_string($other)) { - return $this->valueToTypeStringFragment($other) . 'is valid JSON'; - } - - if ($other === '') { - return 'an empty string is valid JSON'; - } - - return sprintf( - 'a string is valid JSON (%s)', - $this->determineJsonError($other), - ); - } - - private function determineJsonError(string $json): string - { - json_decode($json); - - return match (json_last_error()) { - JSON_ERROR_NONE => '', - JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', - JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', - JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', - JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', - JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', - default => 'Unknown error', - }; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php deleted file mode 100644 index 03b0e4ea..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function preg_match; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class RegularExpression extends Constraint -{ - private readonly string $pattern; - - public function __construct(string $pattern) - { - $this->pattern = $pattern; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'matches PCRE pattern "%s"', - $this->pattern, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return preg_match($this->pattern, $other) > 0; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php deleted file mode 100644 index 0f801a60..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_string; -use function mb_detect_encoding; -use function mb_stripos; -use function mb_strtolower; -use function sprintf; -use function str_contains; -use function strlen; -use function strtr; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringContains extends Constraint -{ - private readonly string $needle; - private readonly bool $ignoreCase; - private readonly bool $ignoreLineEndings; - - public function __construct(string $needle, bool $ignoreCase = false, bool $ignoreLineEndings = false) - { - if ($ignoreLineEndings) { - $needle = $this->normalizeLineEndings($needle); - } - - $this->needle = $needle; - $this->ignoreCase = $ignoreCase; - $this->ignoreLineEndings = $ignoreLineEndings; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - $needle = $this->needle; - - if ($this->ignoreCase) { - $needle = mb_strtolower($this->needle, 'UTF-8'); - } - - return sprintf( - 'contains "%s" [%s](length: %s)', - $needle, - $this->detectedEncoding($needle), - strlen($needle), - ); - } - - public function failureDescription(mixed $other): string - { - $stringifiedHaystack = Exporter::export($other); - $haystackEncoding = $this->detectedEncoding($other); - $haystackLength = $this->haystackLength($other); - - $haystackInformation = sprintf( - '%s [%s](length: %s) ', - $stringifiedHaystack, - $haystackEncoding, - $haystackLength, - ); - - $needleInformation = $this->toString(); - - return $haystackInformation . $needleInformation; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - $haystack = $other; - - if ('' === $this->needle) { - return true; - } - - if (!is_string($haystack)) { - return false; - } - - if ($this->ignoreLineEndings) { - $haystack = $this->normalizeLineEndings($haystack); - } - - if ($this->ignoreCase) { - /* - * We must use the multibyte-safe version, so we can accurately compare non-latin uppercase characters with - * their lowercase equivalents. - */ - return mb_stripos($haystack, $this->needle, 0, 'UTF-8') !== false; - } - - /* - * Use the non-multibyte safe functions to see if the string is contained in $other. - * - * This function is very fast, and we don't care about the character position in the string. - * - * Additionally, we want this method to be binary safe, so we can check if some binary data is in other binary - * data. - */ - return str_contains($haystack, $this->needle); - } - - private function detectedEncoding(mixed $other): string - { - if ($this->ignoreCase) { - return 'Encoding ignored'; - } - - if (!is_string($other)) { - return 'Encoding detection failed'; - } - - $detectedEncoding = mb_detect_encoding($other, null, true); - - if ($detectedEncoding === false) { - return 'Encoding detection failed'; - } - - return $detectedEncoding; - } - - private function haystackLength(mixed $haystack): int - { - if (!is_string($haystack)) { - return 0; - } - - if ($this->ignoreLineEndings) { - $haystack = $this->normalizeLineEndings($haystack); - } - - return strlen($haystack); - } - - private function normalizeLineEndings(string $string): string - { - return strtr( - $string, - [ - "\r\n" => "\n", - "\r" => "\n", - ], - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php deleted file mode 100644 index 1dd43b84..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function str_ends_with; -use PHPUnit\Framework\EmptyStringException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringEndsWith extends Constraint -{ - private readonly string $suffix; - - /** - * @throws EmptyStringException - */ - public function __construct(string $suffix) - { - if ($suffix === '') { - throw new EmptyStringException; - } - - $this->suffix = $suffix; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'ends with "' . $this->suffix . '"'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return str_ends_with((string) $other, $this->suffix); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEqualsStringIgnoringLineEndings.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEqualsStringIgnoringLineEndings.php deleted file mode 100644 index 56c59943..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEqualsStringIgnoringLineEndings.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function sprintf; -use function strtr; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringEqualsStringIgnoringLineEndings extends Constraint -{ - private readonly string $string; - - public function __construct(string $string) - { - $this->string = $this->normalizeLineEndings($string); - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'is equal to "%s" ignoring line endings', - $this->string, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $this->string === $this->normalizeLineEndings((string) $other); - } - - private function normalizeLineEndings(string $string): string - { - return strtr( - $string, - [ - "\r\n" => "\n", - "\r" => "\n", - ], - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php deleted file mode 100644 index 4df81715..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use const DIRECTORY_SEPARATOR; -use const PHP_EOL; -use function explode; -use function implode; -use function preg_match; -use function preg_quote; -use function preg_replace; -use function strtr; -use SebastianBergmann\Diff\Differ; -use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringMatchesFormatDescription extends Constraint -{ - private readonly string $formatDescription; - - public function __construct(string $formatDescription) - { - $this->formatDescription = $formatDescription; - } - - public function toString(): string - { - return 'matches format description:' . PHP_EOL . $this->formatDescription; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - $other = $this->convertNewlines($other); - - $matches = preg_match( - $this->regularExpressionForFormatDescription( - $this->convertNewlines($this->formatDescription), - ), - $other, - ); - - return $matches > 0; - } - - protected function failureDescription(mixed $other): string - { - return 'string matches format description'; - } - - /** - * Returns a cleaned up diff. - * - * The expected string can contain placeholders like %s and %d. - * By using 'diff' such placeholders compared to the real output will - * always be different, although we don't want to show them as different. - * This method removes the expected differences by figuring out if a difference - * is allowed by the use of a placeholder. - * - * The problem here are %A and %a multiline placeholders since we look at the - * expected and actual output line by line. If differences allowed by those placeholders - * stretch over multiple lines they will still end up in the final diff. - * And since they mess up the line sync between the expected and actual output - * all following allowed changes will not be detected/removed anymore. - */ - protected function additionalFailureDescription(mixed $other): string - { - $from = explode("\n", $this->formatDescription); - $to = explode("\n", $this->convertNewlines($other)); - - foreach ($from as $index => $line) { - // is the expected output line different from the actual output line - if (isset($to[$index]) && $line !== $to[$index]) { - $line = $this->regularExpressionForFormatDescription($line); - - // if the difference is allowed by a placeholder - // overwrite the expected line with the actual line to prevent it from showing up in the diff - if (preg_match($line, $to[$index]) > 0) { - $from[$index] = $to[$index]; - } - } - } - - $from = implode("\n", $from); - $to = implode("\n", $to); - - return $this->differ()->diff($from, $to); - } - - private function regularExpressionForFormatDescription(string $string): string - { - $string = strtr( - preg_quote($string, '/'), - [ - '%%' => '%', - '%e' => preg_quote(DIRECTORY_SEPARATOR, '/'), - '%s' => '[^\r\n]+', - '%S' => '[^\r\n]*', - '%a' => '.+?', - '%A' => '.*?', - '%w' => '\s*', - '%i' => '[+-]?\d+', - '%d' => '\d+', - '%x' => '[0-9a-fA-F]+', - '%f' => '[+-]?(?:\d+|(?=\.\d))(?:\.\d+)?(?:[Ee][+-]?\d+)?', - '%c' => '.', - '%0' => '\x00', - ], - ); - - return '/^' . $string . '$/s'; - } - - private function convertNewlines(string $text): string - { - return preg_replace('/\r\n/', "\n", $text); - } - - private function differ(): Differ - { - return new Differ(new UnifiedDiffOutputBuilder("--- Expected\n+++ Actual\n")); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php deleted file mode 100644 index eee545c7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function str_starts_with; -use PHPUnit\Framework\EmptyStringException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class StringStartsWith extends Constraint -{ - private readonly string $prefix; - - /** - * @throws EmptyStringException - */ - public function __construct(string $prefix) - { - if ($prefix === '') { - throw new EmptyStringException; - } - - $this->prefix = $prefix; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'starts with "' . $this->prefix . '"'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return str_starts_with((string) $other, $this->prefix); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php deleted file mode 100644 index fa8d2744..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function array_key_exists; -use function is_array; -use ArrayAccess; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ArrayHasKey extends Constraint -{ - private readonly mixed $key; - - public function __construct(mixed $key) - { - $this->key = $key; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'has the key ' . Exporter::export($this->key); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if (is_array($other)) { - return array_key_exists($this->key, $other); - } - - if ($other instanceof ArrayAccess) { - return $other->offsetExists($this->key); - } - - return false; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return 'an array ' . $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/IsList.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/IsList.php deleted file mode 100644 index f6ac3061..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/IsList.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function array_is_list; -use function is_array; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsList extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is a list'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if (!is_array($other)) { - return false; - } - - return array_is_list($other); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return $this->valueToTypeStringFragment($other) . $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php deleted file mode 100644 index 6f1a298b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function is_array; -use function sprintf; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TraversableContains extends Constraint -{ - private readonly mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'contains ' . Exporter::export($this->value); - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return sprintf( - '%s %s', - is_array($other) ? 'an array' : 'a traversable', - $this->toString(), - ); - } - - protected function value(): mixed - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php deleted file mode 100644 index f8983516..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use SplObjectStorage; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsEqual extends TraversableContains -{ - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if ($other instanceof SplObjectStorage) { - return $other->offsetExists($this->value()); - } - - foreach ($other as $element) { - /** @phpstan-ignore equal.notAllowed */ - if ($this->value() == $element) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php deleted file mode 100644 index b4e29537..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use SplObjectStorage; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsIdentical extends TraversableContains -{ - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - if ($other instanceof SplObjectStorage) { - return $other->offsetExists($this->value()); - } - - foreach ($other as $element) { - if ($this->value() === $element) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php deleted file mode 100644 index 50da87f2..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\NativeType; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class TraversableContainsOnly extends Constraint -{ - private readonly Constraint $constraint; - private readonly string $type; - - public static function forNativeType(NativeType $type): self - { - return new self(new IsType($type), $type->value); - } - - /** - * @param class-string $type - */ - public static function forClassOrInterface(string $type): self - { - return new self(new IsInstanceOf($type), $type); - } - - private function __construct(IsInstanceOf|IsType $constraint, string $type) - { - $this->constraint = $constraint; - $this->type = $type; - } - - /** - * Evaluates the constraint for parameter $other. - * - * If $returnResult is set to false (the default), an exception is thrown - * in case of a failure. null is returned otherwise. - * - * If $returnResult is true, the result of the evaluation is returned as - * a boolean value instead: true in case of success, false in case of a - * failure. - * - * @throws ExpectationFailedException - */ - public function evaluate(mixed $other, string $description = '', bool $returnResult = false): bool - { - $success = true; - - foreach ($other as $item) { - if (!$this->constraint->evaluate($item, '', true)) { - $success = false; - - break; - } - } - - if (!$success && !$returnResult) { - $this->fail($other, $description); - } - - return $success; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'contains only values of type "' . $this->type . '"'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php deleted file mode 100644 index df7ebf1e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function class_exists; -use function interface_exists; -use function sprintf; -use PHPUnit\Framework\UnknownClassOrInterfaceException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsInstanceOf extends Constraint -{ - /** - * @var class-string - */ - private readonly string $name; - - /** - * @var 'class'|'interface' - */ - private readonly string $type; - - /** - * @throws UnknownClassOrInterfaceException - */ - public function __construct(string $name) - { - if (class_exists($name)) { - $this->type = 'class'; - } elseif (interface_exists($name)) { - $this->type = 'interface'; - } else { - throw new UnknownClassOrInterfaceException($name); - } - - $this->name = $name; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'is an instance of %s %s', - $this->type, - $this->name, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $other instanceof $this->name; - } - - /** - * Returns the description of the failure. - * - * The beginning of failure messages is "Failed asserting that" in most - * cases. This method should return the second part of that sentence. - */ - protected function failureDescription(mixed $other): string - { - return $this->valueToTypeStringFragment($other) . $this->toString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php deleted file mode 100644 index 37c89f7a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsNull extends Constraint -{ - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return 'is null'; - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - return $other === null; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php deleted file mode 100644 index c2bff8ed..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Constraint; - -use function gettype; -use function is_array; -use function is_bool; -use function is_callable; -use function is_float; -use function is_int; -use function is_iterable; -use function is_numeric; -use function is_object; -use function is_scalar; -use function is_string; -use function sprintf; -use PHPUnit\Framework\NativeType; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class IsType extends Constraint -{ - private readonly NativeType $type; - - public function __construct(NativeType $type) - { - $this->type = $type; - } - - /** - * Returns a string representation of the constraint. - */ - public function toString(): string - { - return sprintf( - 'is of type %s', - $this->type->value, - ); - } - - /** - * Evaluates the constraint for parameter $other. Returns true if the - * constraint is met, false otherwise. - */ - protected function matches(mixed $other): bool - { - switch ($this->type) { - case NativeType::Numeric: - return is_numeric($other); - - case NativeType::Int: - return is_int($other); - - case NativeType::Float: - return is_float($other); - - case NativeType::String: - return is_string($other); - - case NativeType::Bool: - return is_bool($other); - - case NativeType::Null: - return null === $other; - - case NativeType::Array: - return is_array($other); - - case NativeType::Object: - return is_object($other); - - case NativeType::Resource: - $type = gettype($other); - - return $type === 'resource' || $type === 'resource (closed)'; - - case NativeType::ClosedResource: - return gettype($other) === 'resource (closed)'; - - case NativeType::Scalar: - return is_scalar($other); - - case NativeType::Callable: - return is_callable($other); - - case NativeType::Iterable: - return is_iterable($other); - - default: - return false; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php b/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php deleted file mode 100644 index 262530b7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function assert; -use function class_exists; -use function count; -use function explode; -use PHPUnit\Framework\TestSize\TestSize; -use PHPUnit\Metadata\Api\Groups; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DataProviderTestSuite extends TestSuite -{ - /** - * @var list - */ - private array $dependencies = []; - - /** - * @var ?non-empty-list - */ - private ?array $providedTests = null; - - /** - * @param list $dependencies - */ - public function setDependencies(array $dependencies): void - { - $this->dependencies = $dependencies; - - foreach ($this->tests() as $test) { - if (!$test instanceof TestCase) { - continue; - } - - $test->setDependencies($dependencies); - } - } - - /** - * @return non-empty-list - */ - public function provides(): array - { - if ($this->providedTests === null) { - $this->providedTests = [new ExecutionOrderDependency($this->name())]; - } - - return $this->providedTests; - } - - /** - * @return list - */ - public function requires(): array - { - // A DataProviderTestSuite does not have to traverse its child tests - // as these are inherited and cannot reference dataProvider rows directly - return $this->dependencies; - } - - /** - * Returns the size of each test created using the data provider(s). - */ - public function size(): TestSize - { - assert(count(explode('::', $this->name())) === 2); - [$className, $methodName] = explode('::', $this->name()); - - assert(class_exists($className)); - assert($methodName !== ''); - - return (new Groups)->size($className, $methodName); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php b/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php deleted file mode 100644 index 6bd59c4a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class AssertionFailedError extends Exception implements SelfDescribing -{ - /** - * Wrapper for getMessage() which is declared as final. - */ - public function toString(): string - { - return $this->getMessage(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/EmptyStringException.php b/vendor/phpunit/phpunit/src/Framework/Exception/EmptyStringException.php deleted file mode 100644 index f5980cd7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/EmptyStringException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class EmptyStringException extends InvalidArgumentException -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ErrorLogNotWritableException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ErrorLogNotWritableException.php deleted file mode 100644 index 602a3e49..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ErrorLogNotWritableException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorLogNotWritableException extends Exception -{ - public function __construct() - { - parent::__construct('Could not create writable file for error_log()'); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php deleted file mode 100644 index fb45f47d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function array_keys; -use function get_object_vars; -use function is_int; -use function sprintf; -use RuntimeException; -use Throwable; - -/** - * Base class for all PHPUnit Framework exceptions. - * - * Ensures that exceptions thrown during a test run do not leave stray - * references behind. - * - * Every Exception contains a stack trace. Each stack frame contains the 'args' - * of the called function. The function arguments can contain references to - * instantiated objects. The references prevent the objects from being - * destructed (until test results are eventually printed), so memory cannot be - * freed up. - * - * With enabled process isolation, test results are serialized in the child - * process and unserialized in the parent process. The stack trace of Exceptions - * may contain objects that cannot be serialized or unserialized (e.g., PDO - * connections). Unserializing user-space objects from the child process into - * the parent would break the intended encapsulation of process isolation. - * - * @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class Exception extends RuntimeException implements \PHPUnit\Exception -{ - /** - * @var list - */ - protected array $serializableTrace; - - public function __construct(string $message = '', int|string $code = 0, ?Throwable $previous = null) - { - /** - * @see https://github.com/sebastianbergmann/phpunit/issues/5965 - */ - if (!is_int($code)) { - $message .= sprintf( - ' (exception code: %s)', - $code, - ); - - $code = 0; - } - - parent::__construct($message, $code, $previous); - - $this->serializableTrace = $this->getTrace(); - - foreach (array_keys($this->serializableTrace) as $key) { - unset($this->serializableTrace[$key]['args']); - } - } - - public function __serialize(): array - { - return get_object_vars($this); - } - - /** - * Returns the serializable trace (without 'args'). - * - * @return list - */ - public function getSerializableTrace(): array - { - return $this->serializableTrace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php deleted file mode 100644 index c46a27be..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Exception; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Exception for expectations which failed their check. - * - * The exception contains the error message and optionally a - * SebastianBergmann\Comparator\ComparisonFailure which is used to - * generate diff output of the failed expectations. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ExpectationFailedException extends AssertionFailedError -{ - protected ?ComparisonFailure $comparisonFailure = null; - - public function __construct(string $message, ?ComparisonFailure $comparisonFailure = null, ?Exception $previous = null) - { - $this->comparisonFailure = $comparisonFailure; - - parent::__construct($message, 0, $previous); - } - - public function getComparisonFailure(): ?ComparisonFailure - { - return $this->comparisonFailure; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/GeneratorNotSupportedException.php b/vendor/phpunit/phpunit/src/Framework/Exception/GeneratorNotSupportedException.php deleted file mode 100644 index b3b17953..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/GeneratorNotSupportedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class GeneratorNotSupportedException extends InvalidArgumentException -{ - public static function fromParameterName(string $parameterName): self - { - return new self( - sprintf( - 'Passing an argument of type Generator for the %s parameter is not supported', - $parameterName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTest.php b/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTest.php deleted file mode 100644 index 4492ef22..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTest.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface IncompleteTest extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTestError.php b/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTestError.php deleted file mode 100644 index a45564da..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Incomplete/IncompleteTestError.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompleteTestError extends AssertionFailedError implements IncompleteTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php deleted file mode 100644 index 700abf03..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class InvalidArgumentException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php deleted file mode 100644 index b7aa4ae8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDataProviderException extends Exception -{ - private ?string $providerLabel = null; - - public static function forException(Throwable $e, string $providerLabel): self - { - $exception = new self( - $e->getMessage(), - $e->getCode(), - $e, - ); - $exception->providerLabel = $providerLabel; - - return $exception; - } - - public function getProviderLabel(): ?string - { - return $this->providerLabel; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDependencyException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDependencyException.php deleted file mode 100644 index 8a636fd4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidDependencyException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDependencyException extends AssertionFailedError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php b/vendor/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php deleted file mode 100644 index e59df81d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoChildTestSuiteException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ActualValueIsNotAnObjectException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ActualValueIsNotAnObjectException.php deleted file mode 100644 index 258b940a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ActualValueIsNotAnObjectException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ActualValueIsNotAnObjectException extends Exception -{ - public function __construct() - { - parent::__construct( - 'Actual value is not an object', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotAcceptParameterTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotAcceptParameterTypeException.php deleted file mode 100644 index 74d00a17..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotAcceptParameterTypeException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotAcceptParameterTypeException extends Exception -{ - public function __construct(string $className, string $methodName, string $type) - { - parent::__construct( - sprintf( - '%s is not an accepted argument type for comparison method %s::%s().', - $type, - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php deleted file mode 100644 index 62dc7e8c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends Exception -{ - public function __construct(string $className, string $methodName) - { - parent::__construct( - sprintf( - 'Comparison method %s::%s() does not declare bool return type.', - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php deleted file mode 100644 index d5760744..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends Exception -{ - public function __construct(string $className, string $methodName) - { - parent::__construct( - sprintf( - 'Comparison method %s::%s() does not declare exactly one parameter.', - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareParameterTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareParameterTypeException.php deleted file mode 100644 index 65718682..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotDeclareParameterTypeException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotDeclareParameterTypeException extends Exception -{ - public function __construct(string $className, string $methodName) - { - parent::__construct( - sprintf( - 'Parameter of comparison method %s::%s() does not have a declared type.', - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotExistException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotExistException.php deleted file mode 100644 index 94590b51..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ObjectEquals/ComparisonMethodDoesNotExistException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ComparisonMethodDoesNotExistException extends Exception -{ - public function __construct(string $className, string $methodName) - { - parent::__construct( - sprintf( - 'Comparison method %s::%s() does not exist.', - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/PhptAssertionFailedError.php b/vendor/phpunit/phpunit/src/Framework/Exception/PhptAssertionFailedError.php deleted file mode 100644 index 3742abbb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/PhptAssertionFailedError.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhptAssertionFailedError extends AssertionFailedError -{ - private readonly string $syntheticFile; - private readonly int $syntheticLine; - - /** - * @var list - */ - private readonly array $syntheticTrace; - private readonly string $diff; - - /** - * @param list $trace - */ - public function __construct(string $message, int $code, string $file, int $line, array $trace, string $diff) - { - parent::__construct($message, $code); - - $this->syntheticFile = $file; - $this->syntheticLine = $line; - $this->syntheticTrace = $trace; - $this->diff = $diff; - } - - public function syntheticFile(): string - { - return $this->syntheticFile; - } - - public function syntheticLine(): int - { - return $this->syntheticLine; - } - - /** - * @return list - */ - public function syntheticTrace(): array - { - return $this->syntheticTrace; - } - - public function diff(): string - { - return $this->diff; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ProcessIsolationException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ProcessIsolationException.php deleted file mode 100644 index e59c9c60..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ProcessIsolationException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ProcessIsolationException extends Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTest.php b/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTest.php deleted file mode 100644 index ab2f6749..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTest.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface SkippedTest extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTestSuiteError.php b/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTestSuiteError.php deleted file mode 100644 index d3a4788b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedTestSuiteError.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedTestSuiteError extends AssertionFailedError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedWithMessageException.php b/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedWithMessageException.php deleted file mode 100644 index d09a760a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Skipped/SkippedWithMessageException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SkippedWithMessageException extends AssertionFailedError implements SkippedTest -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php b/vendor/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php deleted file mode 100644 index 6a10f97f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownClassOrInterfaceException extends InvalidArgumentException -{ - public function __construct(string $name) - { - parent::__construct( - sprintf( - 'Class or interface "%s" does not exist', - $name, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php deleted file mode 100644 index 09da4609..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownNativeTypeException extends InvalidArgumentException -{ - public function __construct(string $type) - { - parent::__construct( - sprintf( - 'Native type "%s" is not known', - $type, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php b/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php deleted file mode 100644 index 896d2560..00000000 --- a/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function array_filter; -use function array_map; -use function array_values; -use function assert; -use function count; -use function explode; -use function in_array; -use function str_contains; -use PHPUnit\Metadata\DependsOnClass; -use PHPUnit\Metadata\DependsOnMethod; -use Stringable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExecutionOrderDependency implements Stringable -{ - private string $className = ''; - private string $methodName = ''; - private readonly bool $shallowClone; - private readonly bool $deepClone; - - public static function invalid(): self - { - return new self( - '', - '', - false, - false, - ); - } - - public static function forClass(DependsOnClass $metadata): self - { - return new self( - $metadata->className(), - 'class', - $metadata->deepClone(), - $metadata->shallowClone(), - ); - } - - public static function forMethod(DependsOnMethod $metadata): self - { - return new self( - $metadata->className(), - $metadata->methodName(), - $metadata->deepClone(), - $metadata->shallowClone(), - ); - } - - /** - * @param list $dependencies - * - * @return list - */ - public static function filterInvalid(array $dependencies): array - { - return array_values( - array_filter( - $dependencies, - static fn (self $d) => $d->isValid(), - ), - ); - } - - /** - * @param list $existing - * @param list $additional - * - * @return list - */ - public static function mergeUnique(array $existing, array $additional): array - { - $existingTargets = array_map( - static fn (ExecutionOrderDependency $dependency) => $dependency->getTarget(), - $existing, - ); - - foreach ($additional as $dependency) { - $additionalTarget = $dependency->getTarget(); - - if (in_array($additionalTarget, $existingTargets, true)) { - continue; - } - - $existingTargets[] = $additionalTarget; - $existing[] = $dependency; - } - - return $existing; - } - - /** - * @param list $left - * @param list $right - * - * @return list - */ - public static function diff(array $left, array $right): array - { - if ($right === []) { - return $left; - } - - if ($left === []) { - return []; - } - - $diff = []; - $rightTargets = array_map( - static fn (ExecutionOrderDependency $dependency) => $dependency->getTarget(), - $right, - ); - - foreach ($left as $dependency) { - if (in_array($dependency->getTarget(), $rightTargets, true)) { - continue; - } - - $diff[] = $dependency; - } - - return $diff; - } - - public function __construct(string $classOrCallableName, ?string $methodName = null, bool $deepClone = false, bool $shallowClone = false) - { - $this->deepClone = $deepClone; - $this->shallowClone = $shallowClone; - - if ($classOrCallableName === '') { - return; - } - - if (str_contains($classOrCallableName, '::')) { - assert(count(explode('::', $classOrCallableName)) === 2); - [$this->className, $this->methodName] = explode('::', $classOrCallableName); - } else { - $this->className = $classOrCallableName; - $this->methodName = $methodName !== null && $methodName !== '' ? $methodName : 'class'; - } - } - - public function __toString(): string - { - return $this->getTarget(); - } - - /** - * @phpstan-assert-if-true non-empty-string $this->getTarget() - */ - public function isValid(): bool - { - // Invalid dependencies can be declared and are skipped by the runner - return $this->className !== '' && $this->methodName !== ''; - } - - public function shallowClone(): bool - { - return $this->shallowClone; - } - - public function deepClone(): bool - { - return $this->deepClone; - } - - public function targetIsClass(): bool - { - return $this->methodName === 'class'; - } - - public function getTarget(): string - { - return $this->isValid() - ? $this->className . '::' . $this->methodName - : ''; - } - - public function getTargetClassName(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php deleted file mode 100644 index 7cce22c3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use SebastianBergmann\Type\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ConfigurableMethod -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var array - */ - private array $defaultParameterValues; - - /** - * @var non-negative-int - */ - private int $numberOfParameters; - private Type $returnType; - - /** - * @param non-empty-string $name - * @param array $defaultParameterValues - * @param non-negative-int $numberOfParameters - */ - public function __construct(string $name, array $defaultParameterValues, int $numberOfParameters, Type $returnType) - { - $this->name = $name; - $this->defaultParameterValues = $defaultParameterValues; - $this->numberOfParameters = $numberOfParameters; - $this->returnType = $returnType; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return array - */ - public function defaultParameterValues(): array - { - return $this->defaultParameterValues; - } - - /** - * @return non-negative-int - */ - public function numberOfParameters(): int - { - return $this->numberOfParameters; - } - - public function mayReturn(mixed $value): bool - { - return $this->returnType->isAssignable(Type::fromValue($value, false)); - } - - public function returnTypeDeclaration(): string - { - return $this->returnType->asString(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php deleted file mode 100644 index e8ddadda..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BadMethodCallException extends \BadMethodCallException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php deleted file mode 100644 index 6cb399e5..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $type, string $methodName) - { - parent::__construct( - sprintf( - 'Trying to configure method "%s" with onlyMethods(), but it does not exist in class "%s"', - $methodName, - $type, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php deleted file mode 100644 index f7994f20..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php deleted file mode 100644 index faf8a498..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function get_debug_type; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(ConfigurableMethod $method, mixed $value) - { - parent::__construct( - sprintf( - 'Method %s may not return value of type %s, its declared return type is "%s"', - $method->name(), - get_debug_type($value), - $method->returnTypeDeclaration(), - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php deleted file mode 100644 index 8bf8967b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $id) - { - parent::__construct( - sprintf( - 'No builder found for match builder identification <%s>', - $id, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php deleted file mode 100644 index de62b867..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $id) - { - parent::__construct( - sprintf( - 'Matcher with id <%s> is already registered', - $id, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php deleted file mode 100644 index 4d39b5d9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $method) - { - parent::__construct( - sprintf( - 'Trying to configure method "%s" which cannot be configured because it does not exist, has not been specified, is final, or is static', - $method, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php deleted file mode 100644 index e4a37592..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct() - { - parent::__construct('Method name is already configured'); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php deleted file mode 100644 index 25c11341..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameNotConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct() - { - parent::__construct('Method name is not configured'); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php deleted file mode 100644 index fba96cf4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodParametersAlreadyConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct() - { - parent::__construct('Method parameters already configured'); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php deleted file mode 100644 index 3e565cea..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class NeverReturningMethodException extends RuntimeException implements Exception -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function __construct(string $className, string $methodName) - { - parent::__construct( - sprintf( - 'Method %s::%s() is declared to never return', - $className, - $methodName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php deleted file mode 100644 index c4b18165..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoMoreReturnValuesConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(Invocation $invocation, int $numberOfConfiguredReturnValues) - { - parent::__construct( - sprintf( - 'Only %d return values have been configured for %s::%s()', - $numberOfConfiguredReturnValues, - $invocation->className(), - $invocation->methodName(), - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php deleted file mode 100644 index cf193f10..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(Invocation $invocation) - { - parent::__construct( - sprintf( - 'No return value is configured for %s::%s() and return value generation is disabled', - $invocation->className(), - $invocation->methodName(), - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php deleted file mode 100644 index b99a903e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php deleted file mode 100644 index 3d88c72e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function class_exists; -use PHPUnit\Framework\MockObject\ConfigurableMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DoubledClass -{ - private string $classCode; - - /** - * @var class-string - */ - private string $mockName; - - /** - * @var list - */ - private array $configurableMethods; - - /** - * @param class-string $mockName - * @param list $configurableMethods - */ - public function __construct(string $classCode, string $mockName, array $configurableMethods) - { - $this->classCode = $classCode; - $this->mockName = $mockName; - $this->configurableMethods = $configurableMethods; - } - - /** - * @return class-string - */ - public function generate(): string - { - if (!class_exists($this->mockName, false)) { - eval($this->classCode); - } - - return $this->mockName; - } - - public function classCode(): string - { - return $this->classCode; - } - - /** - * @return list - */ - public function configurableMethods(): array - { - return $this->configurableMethods; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php deleted file mode 100644 index 09006b25..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php +++ /dev/null @@ -1,395 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function array_key_exists; -use function assert; -use function count; -use function explode; -use function implode; -use function is_object; -use function is_string; -use function preg_match; -use function preg_replace; -use function str_contains; -use function strlen; -use function strpos; -use function substr; -use function substr_count; -use function trim; -use function var_export; -use ReflectionMethod; -use ReflectionParameter; -use SebastianBergmann\Type\ReflectionMapper; -use SebastianBergmann\Type\Type; -use SebastianBergmann\Type\UnknownType; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DoubledMethod -{ - use TemplateLoader; - - /** - * @var class-string - */ - private readonly string $className; - - /** - * @var non-empty-string - */ - private readonly string $methodName; - private readonly string $modifier; - private readonly string $argumentsForDeclaration; - private readonly string $argumentsForCall; - private readonly Type $returnType; - private readonly string $reference; - private readonly bool $static; - private readonly ?string $deprecation; - - /** - * @var array - */ - private readonly array $defaultParameterValues; - - /** - * @var non-negative-int - */ - private readonly int $numberOfParameters; - - /** - * @throws ReflectionException - * @throws RuntimeException - */ - public static function fromReflection(ReflectionMethod $method): self - { - if ($method->isPrivate()) { - $modifier = 'private'; - } elseif ($method->isProtected()) { - $modifier = 'protected'; - } else { - $modifier = 'public'; - } - - if ($method->isStatic()) { - $modifier .= ' static'; - } - - if ($method->returnsReference()) { - $reference = '&'; - } else { - $reference = ''; - } - - $docComment = $method->getDocComment(); - - if (is_string($docComment) && - preg_match('#\*[ \t]*+@deprecated[ \t]*+(.*?)\r?+\n[ \t]*+\*(?:[ \t]*+@|/$)#s', $docComment, $deprecation) > 0 - ) { - $deprecation = trim(preg_replace('#[ \t]*\r?\n[ \t]*+\*[ \t]*+#', ' ', $deprecation[1])); - } else { - $deprecation = null; - } - - return new self( - $method->getDeclaringClass()->getName(), - $method->getName(), - $modifier, - self::methodParametersForDeclaration($method), - self::methodParametersForCall($method), - self::methodParametersDefaultValues($method), - count($method->getParameters()), - (new ReflectionMapper)->fromReturnType($method), - $reference, - $method->isStatic(), - $deprecation, - ); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function fromName(string $className, string $methodName): self - { - return new self( - $className, - $methodName, - 'public', - '', - '', - [], - 0, - new UnknownType, - '', - false, - null, - ); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - * @param array $defaultParameterValues - * @param non-negative-int $numberOfParameters - */ - private function __construct(string $className, string $methodName, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, array $defaultParameterValues, int $numberOfParameters, Type $returnType, string $reference, bool $static, ?string $deprecation) - { - $this->className = $className; - $this->methodName = $methodName; - $this->modifier = $modifier; - $this->argumentsForDeclaration = $argumentsForDeclaration; - $this->argumentsForCall = $argumentsForCall; - $this->defaultParameterValues = $defaultParameterValues; - $this->numberOfParameters = $numberOfParameters; - $this->returnType = $returnType; - $this->reference = $reference; - $this->static = $static; - $this->deprecation = $deprecation; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - /** - * @throws RuntimeException - */ - public function generateCode(): string - { - if ($this->static) { - $templateFile = 'doubled_static_method.tpl'; - } else { - $templateFile = 'doubled_method.tpl'; - } - - $deprecation = $this->deprecation; - $returnResult = ''; - - if (!$this->returnType->isNever() && !$this->returnType->isVoid()) { - $returnResult = <<<'EOT' - - - return $__phpunit_result; -EOT; - } - - if (null !== $this->deprecation) { - $deprecation = "The {$this->className}::{$this->methodName} method is deprecated ({$this->deprecation})."; - $deprecationTemplate = $this->loadTemplate('deprecation.tpl'); - - $deprecationTemplate->setVar( - [ - 'deprecation' => var_export($deprecation, true), - ], - ); - - $deprecation = $deprecationTemplate->render(); - } - - $template = $this->loadTemplate($templateFile); - - $argumentsCount = 0; - - if (str_contains($this->argumentsForCall, '...')) { - $argumentsCount = null; - } elseif ($this->argumentsForCall !== '') { - $argumentsCount = substr_count($this->argumentsForCall, ',') + 1; - } - - $returnDeclaration = ''; - $returnTypeAsString = $this->returnType->asString(); - - if ($returnTypeAsString !== '') { - $returnDeclaration = ': ' . $returnTypeAsString; - } - - $template->setVar( - [ - 'arguments_decl' => $this->argumentsForDeclaration, - 'arguments_call' => $this->argumentsForCall, - 'return_declaration' => $returnDeclaration, - 'return_type' => $this->returnType->asString(), - 'arguments_count' => (string) $argumentsCount, - 'class_name' => $this->className, - 'method_name' => $this->methodName, - 'modifier' => $this->modifier, - 'reference' => $this->reference, - 'deprecation' => $deprecation, - 'return_result' => $returnResult, - ], - ); - - return $template->render(); - } - - public function returnType(): Type - { - return $this->returnType; - } - - /** - * @return array - */ - public function defaultParameterValues(): array - { - return $this->defaultParameterValues; - } - - /** - * @return non-negative-int - */ - public function numberOfParameters(): int - { - return $this->numberOfParameters; - } - - /** - * Returns the parameters of a function or method. - * - * @throws RuntimeException - */ - private static function methodParametersForDeclaration(ReflectionMethod $method): string - { - $parameters = []; - $types = (new ReflectionMapper)->fromParameterTypes($method); - - foreach ($method->getParameters() as $i => $parameter) { - $name = '$' . $parameter->getName(); - - /* Note: PHP extensions may use empty names for reference arguments - * or "..." for methods taking a variable number of arguments. - */ - if ($name === '$' || $name === '$...') { - $name = '$arg' . $i; - } - - $default = ''; - $reference = ''; - $typeDeclaration = ''; - - assert(array_key_exists($i, $types)); - - if (!$types[$i]->type()->isUnknown()) { - $typeDeclaration = $types[$i]->type()->asString() . ' '; - } - - if ($parameter->isPassedByReference()) { - $reference = '&'; - } - - if ($parameter->isVariadic()) { - $name = '...' . $name; - } elseif ($parameter->isDefaultValueAvailable()) { - $default = ' = ' . self::exportDefaultValue($parameter); - } elseif ($parameter->isOptional()) { - $default = ' = null'; - } - - $parameters[] = $typeDeclaration . $reference . $name . $default; - } - - return implode(', ', $parameters); - } - - /** - * Returns the parameters of a function or method. - * - * @throws ReflectionException - */ - private static function methodParametersForCall(ReflectionMethod $method): string - { - $parameters = []; - - foreach ($method->getParameters() as $i => $parameter) { - $name = '$' . $parameter->getName(); - - /* Note: PHP extensions may use empty names for reference arguments - * or "..." for methods taking a variable number of arguments. - */ - if ($name === '$' || $name === '$...') { - $name = '$arg' . $i; - } - - if ($parameter->isVariadic()) { - continue; - } - - if ($parameter->isPassedByReference()) { - $parameters[] = '&' . $name; - } else { - $parameters[] = $name; - } - } - - return implode(', ', $parameters); - } - - /** - * @throws ReflectionException - */ - private static function exportDefaultValue(ReflectionParameter $parameter): string - { - try { - $defaultValue = $parameter->getDefaultValue(); - - if (!is_object($defaultValue)) { - return var_export($defaultValue, true); - } - - $parameterAsString = $parameter->__toString(); - - return explode( - ' = ', - substr( - substr( - $parameterAsString, - strpos($parameterAsString, ' ') + strlen(' '), - ), - 0, - -2, - ), - )[1]; - // @codeCoverageIgnoreStart - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - // @codeCoverageIgnoreEnd - } - - /** - * @return array - */ - private static function methodParametersDefaultValues(ReflectionMethod $method): array - { - $result = []; - - foreach ($method->getParameters() as $i => $parameter) { - if (!$parameter->isDefaultValueAvailable()) { - continue; - } - - $result[$i] = $parameter->getDefaultValue(); - } - - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php deleted file mode 100644 index 6a2d29f4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function array_key_exists; -use function array_values; -use function strtolower; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DoubledMethodSet -{ - /** - * @var array - */ - private array $methods = []; - - public function addMethods(DoubledMethod ...$methods): void - { - foreach ($methods as $method) { - $this->methods[strtolower($method->methodName())] = $method; - } - } - - /** - * @return list - */ - public function asArray(): array - { - return array_values($this->methods); - } - - public function hasMethod(string $methodName): bool - { - return array_key_exists(strtolower($methodName), $this->methods); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php deleted file mode 100644 index e2cde18b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsEnumerationException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $className) - { - parent::__construct( - sprintf( - 'Class "%s" is an enumeration and cannot be doubled', - $className, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php deleted file mode 100644 index f10100b9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsFinalException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $className) - { - parent::__construct( - sprintf( - 'Class "%s" is declared "final" and cannot be doubled', - $className, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php deleted file mode 100644 index b18ed4f5..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function array_diff_assoc; -use function array_unique; -use function implode; -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DuplicateMethodException extends \PHPUnit\Framework\Exception implements Exception -{ - /** - * @param list $methods - */ - public function __construct(array $methods) - { - parent::__construct( - sprintf( - 'Cannot double using a method list that contains duplicates: "%s" (duplicate: "%s")', - implode(', ', $methods), - implode(', ', array_unique(array_diff_assoc($methods, array_unique($methods)))), - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php deleted file mode 100644 index 8d62606f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use PHPUnit\Framework\MockObject\Exception as BaseException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends BaseException -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php deleted file mode 100644 index 32296ce3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidMethodNameException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $method) - { - parent::__construct( - sprintf( - 'Cannot double method with invalid name "%s"', - $method, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php deleted file mode 100644 index 78586fe1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNamedMethodException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct() - { - parent::__construct('Doubling interfaces (or classes) that have a method named "method" is not supported.'); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php deleted file mode 100644 index eec81c06..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NameAlreadyInUseException extends \PHPUnit\Framework\Exception implements Exception -{ - /** - * @param class-string|trait-string $name - */ - public function __construct(string $name) - { - parent::__construct( - sprintf( - 'The name "%s" is already in use', - $name, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php deleted file mode 100644 index f4a84f18..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReflectionException extends \PHPUnit\Framework\Exception implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php deleted file mode 100644 index eed41c37..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \PHPUnit\Framework\Exception implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownInterfaceException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownInterfaceException.php deleted file mode 100644 index 95f03e73..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownInterfaceException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownInterfaceException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $interfaceName) - { - parent::__construct( - sprintf( - 'Interface "%s" does not exist', - $interfaceName, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php deleted file mode 100644 index cd1e1e07..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnknownTypeException extends \PHPUnit\Framework\Exception implements Exception -{ - public function __construct(string $type) - { - parent::__construct( - sprintf( - 'Class or interface "%s" does not exist', - $type, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php deleted file mode 100644 index 4a50ccb0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php +++ /dev/null @@ -1,889 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use const PHP_EOL; -use const PHP_VERSION; -use function array_merge; -use function array_pop; -use function array_unique; -use function assert; -use function class_exists; -use function count; -use function explode; -use function implode; -use function in_array; -use function interface_exists; -use function is_array; -use function md5; -use function mt_rand; -use function preg_match; -use function serialize; -use function sort; -use function sprintf; -use function substr; -use function trait_exists; -use function version_compare; -use Exception; -use Iterator; -use IteratorAggregate; -use PHPUnit\Framework\MockObject\ConfigurableMethod; -use PHPUnit\Framework\MockObject\DoubledCloneMethod; -use PHPUnit\Framework\MockObject\Method; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\MockObject\MockObjectApi; -use PHPUnit\Framework\MockObject\MockObjectInternal; -use PHPUnit\Framework\MockObject\ProxiedCloneMethod; -use PHPUnit\Framework\MockObject\Stub; -use PHPUnit\Framework\MockObject\StubApi; -use PHPUnit\Framework\MockObject\StubInternal; -use PHPUnit\Framework\MockObject\TestDoubleState; -use PropertyHookType; -use ReflectionClass; -use ReflectionMethod; -use ReflectionObject; -use SebastianBergmann\Type\ReflectionMapper; -use SebastianBergmann\Type\Type; -use Throwable; -use Traversable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Generator -{ - use TemplateLoader; - - /** - * @var null|non-empty-array - */ - private static ?array $excludedMethodNames = null; - - /** - * @var array - */ - private static array $cache = []; - - /** - * Returns a test double for the specified class. - * - * @param class-string $type - * @param ?list $methods - * @param array $arguments - * - * @throws ClassIsEnumerationException - * @throws ClassIsFinalException - * @throws DuplicateMethodException - * @throws InvalidMethodNameException - * @throws NameAlreadyInUseException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTypeException - */ - public function testDouble(string $type, bool $mockObject, ?array $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $returnValueGeneration = true): MockObject|Stub - { - if ($type === Traversable::class) { - $type = Iterator::class; - } - - $this->ensureKnownType($type); - $this->ensureValidMethods($methods); - $this->ensureNameForTestDoubleClassIsAvailable($mockClassName); - - $mock = $this->generate( - $type, - $mockObject, - $methods, - $mockClassName, - $callOriginalClone, - ); - - $object = $this->instantiate( - $mock, - $callOriginalConstructor, - $arguments, - $returnValueGeneration, - ); - - assert($object instanceof $type); - - if ($mockObject) { - assert($object instanceof MockObject); - } else { - assert($object instanceof Stub); - } - - return $object; - } - - /** - * @param list $interfaces - * - * @throws RuntimeException - * @throws UnknownInterfaceException - */ - public function testDoubleForInterfaceIntersection(array $interfaces, bool $mockObject, bool $returnValueGeneration = true): MockObject|Stub - { - if (count($interfaces) < 2) { - throw new RuntimeException('At least two interfaces must be specified'); - } - - foreach ($interfaces as $interface) { - if (!interface_exists($interface)) { - throw new UnknownInterfaceException($interface); - } - } - - sort($interfaces); - - $methods = []; - - foreach ($interfaces as $interface) { - $methods = array_merge($methods, $this->namesOfMethodsIn($interface)); - } - - if (count(array_unique($methods)) < count($methods)) { - throw new RuntimeException('Interfaces must not declare the same method'); - } - - $unqualifiedNames = []; - - foreach ($interfaces as $interface) { - $parts = explode('\\', $interface); - $unqualifiedNames[] = array_pop($parts); - } - - sort($unqualifiedNames); - - do { - $intersectionName = sprintf( - 'Intersection_%s_%s', - implode('_', $unqualifiedNames), - substr(md5((string) mt_rand()), 0, 8), - ); - } while (interface_exists($intersectionName, false)); - - $template = $this->loadTemplate('intersection.tpl'); - - $template->setVar( - [ - 'intersection' => $intersectionName, - 'interfaces' => implode(', ', $interfaces), - ], - ); - - eval($template->render()); - - assert(interface_exists($intersectionName)); - - return $this->testDouble( - $intersectionName, - $mockObject, - returnValueGeneration: $returnValueGeneration, - ); - } - - /** - * @param class-string $type - * @param ?list $methods - * - * @throws ClassIsEnumerationException - * @throws ClassIsFinalException - * @throws ReflectionException - * @throws RuntimeException - * - * @todo This method is only public because it is used to test generated code in PHPT tests - * - * @see https://github.com/sebastianbergmann/phpunit/issues/5476 - */ - public function generate(string $type, bool $mockObject, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true): DoubledClass - { - if ($mockClassName !== '') { - return $this->generateCodeForTestDoubleClass( - $type, - $mockObject, - $methods, - $mockClassName, - $callOriginalClone, - ); - } - - $key = md5( - $type . - ($mockObject ? 'MockObject' : 'TestStub') . - serialize($methods) . - serialize($callOriginalClone), - ); - - if (!isset(self::$cache[$key])) { - self::$cache[$key] = $this->generateCodeForTestDoubleClass( - $type, - $mockObject, - $methods, - $mockClassName, - $callOriginalClone, - ); - } - - return self::$cache[$key]; - } - - /** - * @param class-string $className - * - * @throws ReflectionException - * - * @return list - */ - private function mockClassMethods(string $className): array - { - $class = $this->reflectClass($className); - $methods = []; - - foreach ($class->getMethods() as $method) { - if (($method->isPublic() || $method->isAbstract()) && $this->canMethodBeDoubled($method)) { - $methods[] = DoubledMethod::fromReflection($method); - } - } - - return $methods; - } - - /** - * @param class-string $interfaceName - * - * @throws ReflectionException - * - * @return list - */ - private function userDefinedInterfaceMethods(string $interfaceName): array - { - $interface = $this->reflectClass($interfaceName); - $methods = []; - - foreach ($interface->getMethods() as $method) { - if (!$method->isUserDefined()) { - continue; - } - - $methods[] = $method; - } - - return $methods; - } - - /** - * @param array $arguments - * - * @throws ReflectionException - * @throws RuntimeException - */ - private function instantiate(DoubledClass $mockClass, bool $callOriginalConstructor = false, array $arguments = [], bool $returnValueGeneration = true): object - { - $className = $mockClass->generate(); - - try { - $object = (new ReflectionClass($className))->newInstanceWithoutConstructor(); - // @codeCoverageIgnoreStart - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - // @codeCoverageIgnoreEnd - } - - $reflector = new ReflectionObject($object); - - /** - * @noinspection PhpUnhandledExceptionInspection - */ - $reflector->getProperty('__phpunit_state')->setValue( - $object, - new TestDoubleState($mockClass->configurableMethods(), $returnValueGeneration), - ); - - if ($callOriginalConstructor && $reflector->getConstructor() !== null) { - try { - $reflector->getConstructor()->invokeArgs($object, $arguments); - // @codeCoverageIgnoreStart - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - // @codeCoverageIgnoreEnd - } - } - - return $object; - } - - /** - * @param class-string $type - * @param ?list $explicitMethods - * - * @throws ClassIsEnumerationException - * @throws ClassIsFinalException - * @throws MethodNamedMethodException - * @throws ReflectionException - * @throws RuntimeException - */ - private function generateCodeForTestDoubleClass(string $type, bool $mockObject, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone): DoubledClass - { - $classTemplate = $this->loadTemplate('test_double_class.tpl'); - $additionalInterfaces = []; - $doubledCloneMethod = false; - $proxiedCloneMethod = false; - $isClass = false; - $isReadonly = false; - $isInterface = false; - $mockMethods = new DoubledMethodSet; - $testDoubleClassPrefix = $mockObject ? 'MockObject_' : 'TestStub_'; - - $_mockClassName = $this->generateClassName( - $type, - $mockClassName, - $testDoubleClassPrefix, - ); - - if (class_exists($_mockClassName['fullClassName'])) { - $isClass = true; - } elseif (interface_exists($_mockClassName['fullClassName'])) { - $isInterface = true; - } - - $class = $this->reflectClass($_mockClassName['fullClassName']); - - if ($class->isEnum()) { - throw new ClassIsEnumerationException($_mockClassName['fullClassName']); - } - - if ($class->isFinal()) { - throw new ClassIsFinalException($_mockClassName['fullClassName']); - } - - if ($class->isReadOnly()) { - $isReadonly = true; - } - - // @see https://github.com/sebastianbergmann/phpunit/issues/2995 - if ($isInterface && $class->implementsInterface(Throwable::class)) { - $actualClassName = Exception::class; - $additionalInterfaces[] = $class->getName(); - $isInterface = false; - $class = $this->reflectClass($actualClassName); - - foreach ($this->userDefinedInterfaceMethods($_mockClassName['fullClassName']) as $method) { - $methodName = $method->getName(); - - if ($class->hasMethod($methodName)) { - $classMethod = $class->getMethod($methodName); - - if (!$this->canMethodBeDoubled($classMethod)) { - continue; - } - } - - $mockMethods->addMethods( - DoubledMethod::fromReflection($method), - ); - } - - $_mockClassName = $this->generateClassName( - $actualClassName, - $_mockClassName['className'], - $testDoubleClassPrefix, - ); - } - - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103 - if ($isInterface && $class->implementsInterface(Traversable::class) && - !$class->implementsInterface(Iterator::class) && - !$class->implementsInterface(IteratorAggregate::class)) { - $additionalInterfaces[] = Iterator::class; - - $mockMethods->addMethods( - ...$this->mockClassMethods(Iterator::class), - ); - } - - if ($class->hasMethod('__clone')) { - $cloneMethod = $class->getMethod('__clone'); - - if (!$cloneMethod->isFinal()) { - if ($callOriginalClone && !$isInterface) { - $proxiedCloneMethod = true; - } else { - $doubledCloneMethod = true; - } - } - } else { - $doubledCloneMethod = true; - } - - if ($isClass && $explicitMethods === []) { - $mockMethods->addMethods( - ...$this->mockClassMethods($_mockClassName['fullClassName']), - ); - } - - if ($isInterface && ($explicitMethods === [] || $explicitMethods === null)) { - $mockMethods->addMethods( - ...$this->interfaceMethods($_mockClassName['fullClassName']), - ); - } - - if (is_array($explicitMethods)) { - foreach ($explicitMethods as $methodName) { - if ($class->hasMethod($methodName)) { - $method = $class->getMethod($methodName); - - if ($this->canMethodBeDoubled($method)) { - $mockMethods->addMethods( - DoubledMethod::fromReflection($method), - ); - } - } else { - $mockMethods->addMethods( - DoubledMethod::fromName( - $_mockClassName['fullClassName'], - $methodName, - ), - ); - } - } - } - - $propertiesWithHooks = $this->properties($class); - $configurableMethods = $this->configurableMethods($mockMethods, $propertiesWithHooks); - - $mockedMethods = ''; - - foreach ($mockMethods->asArray() as $mockMethod) { - $mockedMethods .= $mockMethod->generateCode(); - } - - /** @var trait-string[] $traits */ - $traits = [StubApi::class]; - - if ($mockObject) { - $traits[] = MockObjectApi::class; - } - - if ($mockMethods->hasMethod('method') || $class->hasMethod('method')) { - throw new MethodNamedMethodException; - } - - $traits[] = Method::class; - - if ($doubledCloneMethod) { - $traits[] = DoubledCloneMethod::class; - } elseif ($proxiedCloneMethod) { - $traits[] = ProxiedCloneMethod::class; - } - - $useStatements = ''; - - foreach ($traits as $trait) { - $useStatements .= sprintf( - ' use %s;' . PHP_EOL, - $trait, - ); - } - - unset($traits); - - $classTemplate->setVar( - [ - 'class_declaration' => $this->generateTestDoubleClassDeclaration( - $mockObject, - $_mockClassName, - $isInterface, - $additionalInterfaces, - $isReadonly, - ), - 'use_statements' => $useStatements, - 'mock_class_name' => $_mockClassName['className'], - 'methods' => $mockedMethods, - 'property_hooks' => (new HookedPropertyGenerator)->generate( - $_mockClassName['className'], - $propertiesWithHooks, - ), - ], - ); - - return new DoubledClass( - $classTemplate->render(), - $_mockClassName['className'], - $configurableMethods, - ); - } - - /** - * @param class-string $type - * - * @return array{className: class-string, originalClassName: class-string, fullClassName: class-string, namespaceName: string} - */ - private function generateClassName(string $type, string $className, string $prefix): array - { - if ($type[0] === '\\') { - $type = substr($type, 1); - } - - $classNameParts = explode('\\', $type); - - if (count($classNameParts) > 1) { - $type = array_pop($classNameParts); - $namespaceName = implode('\\', $classNameParts); - $fullClassName = $namespaceName . '\\' . $type; - } else { - $namespaceName = ''; - $fullClassName = $type; - } - - if ($className === '') { - do { - $className = $prefix . $type . '_' . - substr(md5((string) mt_rand()), 0, 8); - } while (class_exists($className, false)); - } - - return [ - 'className' => $className, - 'originalClassName' => $type, - 'fullClassName' => $fullClassName, - 'namespaceName' => $namespaceName, - ]; - } - - /** - * @param array{className: non-empty-string, originalClassName: non-empty-string, fullClassName: non-empty-string, namespaceName: string} $mockClassName - * @param list $additionalInterfaces - */ - private function generateTestDoubleClassDeclaration(bool $mockObject, array $mockClassName, bool $isInterface, array $additionalInterfaces, bool $isReadonly): string - { - if ($mockObject) { - $additionalInterfaces[] = MockObjectInternal::class; - } else { - $additionalInterfaces[] = StubInternal::class; - } - - if ($isReadonly) { - $buffer = 'readonly class '; - } else { - $buffer = 'class '; - } - - $interfaces = implode(', ', $additionalInterfaces); - - if ($isInterface) { - $buffer .= sprintf( - '%s implements %s', - $mockClassName['className'], - $interfaces, - ); - - if (!in_array($mockClassName['originalClassName'], $additionalInterfaces, true)) { - $buffer .= ', '; - - if ($mockClassName['namespaceName'] !== '') { - $buffer .= $mockClassName['namespaceName'] . '\\'; - } - - $buffer .= $mockClassName['originalClassName']; - } - } else { - $buffer .= sprintf( - '%s extends %s%s implements %s', - $mockClassName['className'], - $mockClassName['namespaceName'] !== '' ? $mockClassName['namespaceName'] . '\\' : '', - $mockClassName['originalClassName'], - $interfaces, - ); - } - - return $buffer; - } - - private function canMethodBeDoubled(ReflectionMethod $method): bool - { - if ($method->isConstructor()) { - return false; - } - - if ($method->isDestructor()) { - return false; - } - - if ($method->isFinal()) { - return false; - } - - if ($method->isPrivate()) { - return false; - } - - return !$this->isMethodNameExcluded($method->getName()); - } - - private function isMethodNameExcluded(string $name): bool - { - if (self::$excludedMethodNames === null) { - self::$excludedMethodNames = [ - '__CLASS__' => true, - '__DIR__' => true, - '__FILE__' => true, - '__FUNCTION__' => true, - '__LINE__' => true, - '__METHOD__' => true, - '__NAMESPACE__' => true, - '__TRAIT__' => true, - '__clone' => true, - '__halt_compiler' => true, - ]; - - if (version_compare(PHP_VERSION, '8.5', '>=')) { - self::$excludedMethodNames['__sleep'] = true; - self::$excludedMethodNames['__wakeup'] = true; - } - } - - return isset(self::$excludedMethodNames[$name]); - } - - /** - * @throws UnknownTypeException - */ - private function ensureKnownType(string $type): void - { - if (!class_exists($type) && !interface_exists($type)) { - throw new UnknownTypeException($type); - } - } - - /** - * @param ?list $methods - * - * @throws DuplicateMethodException - * @throws InvalidMethodNameException - */ - private function ensureValidMethods(?array $methods): void - { - if ($methods === null) { - return; - } - - foreach ($methods as $method) { - if (!preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', (string) $method)) { - throw new InvalidMethodNameException((string) $method); - } - } - - if ($methods !== array_unique($methods)) { - throw new DuplicateMethodException($methods); - } - } - - /** - * @throws NameAlreadyInUseException - * @throws ReflectionException - */ - private function ensureNameForTestDoubleClassIsAvailable(string $className): void - { - if ($className === '') { - return; - } - - if (class_exists($className, false) || - interface_exists($className, false) || - trait_exists($className, false)) { - throw new NameAlreadyInUseException($className); - } - } - - /** - * @param class-string $className - * - * @throws ReflectionException - * - * @phpstan-ignore missingType.generics, throws.unusedType - */ - private function reflectClass(string $className): ReflectionClass - { - try { - $class = new ReflectionClass($className); - - // @codeCoverageIgnoreStart - /** @phpstan-ignore catch.neverThrown */ - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - // @codeCoverageIgnoreEnd - - return $class; - } - - /** - * @param class-string $classOrInterfaceName - * - * @throws ReflectionException - * - * @return list - */ - private function namesOfMethodsIn(string $classOrInterfaceName): array - { - $class = $this->reflectClass($classOrInterfaceName); - $methods = []; - - foreach ($class->getMethods() as $method) { - if ($method->isPublic() || $method->isAbstract()) { - $methods[] = $method->getName(); - } - } - - return $methods; - } - - /** - * @param class-string $interfaceName - * - * @throws ReflectionException - * - * @return list - */ - private function interfaceMethods(string $interfaceName): array - { - $class = $this->reflectClass($interfaceName); - $methods = []; - - foreach ($class->getMethods() as $method) { - $methods[] = DoubledMethod::fromReflection($method); - } - - return $methods; - } - - /** - * @param list $propertiesWithHooks - * - * @return list - */ - private function configurableMethods(DoubledMethodSet $methods, array $propertiesWithHooks): array - { - $configurable = []; - - foreach ($methods->asArray() as $method) { - $configurable[] = new ConfigurableMethod( - $method->methodName(), - $method->defaultParameterValues(), - $method->numberOfParameters(), - $method->returnType(), - ); - } - - foreach ($propertiesWithHooks as $property) { - if ($property->hasGetHook()) { - $configurable[] = new ConfigurableMethod( - sprintf( - '$%s::get', - $property->name(), - ), - [], - 0, - $property->type(), - ); - } - - if ($property->hasSetHook()) { - $configurable[] = new ConfigurableMethod( - sprintf( - '$%s::set', - $property->name(), - ), - [], - 1, - Type::fromName('void', false), - ); - } - } - - return $configurable; - } - - /** - * @param ?ReflectionClass $class - * - * @return list - */ - private function properties(?ReflectionClass $class): array - { - if (version_compare('8.4.1', PHP_VERSION, '>')) { - // @codeCoverageIgnoreStart - return []; - // @codeCoverageIgnoreEnd - } - - if ($class === null) { - return []; - } - - $mapper = new ReflectionMapper; - $properties = []; - - foreach ($class->getProperties() as $property) { - if (!$property->isPublic()) { - continue; - } - - if ($property->isFinal()) { - continue; - } - - if (!$property->hasHooks()) { - continue; - } - - $hasGetHook = false; - $hasSetHook = false; - - if ($property->hasHook(PropertyHookType::Get) && - !$property->getHook(PropertyHookType::Get)->isFinal()) { - $hasGetHook = true; - } - - if ($property->hasHook(PropertyHookType::Set) && - !$property->getHook(PropertyHookType::Set)->isFinal()) { - $hasSetHook = true; - } - - if (!$hasGetHook && !$hasSetHook) { - continue; - } - - $properties[] = new HookedProperty( - $property->getName(), - $mapper->fromPropertyType($property), - $hasGetHook, - $hasSetHook, - ); - } - - return $properties; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php deleted file mode 100644 index e43d589d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use SebastianBergmann\Type\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class HookedProperty -{ - /** - * @var non-empty-string - */ - private string $name; - private Type $type; - private bool $getHook; - private bool $setHook; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name, Type $type, bool $getHook, bool $setHook) - { - $this->name = $name; - $this->type = $type; - $this->getHook = $getHook; - $this->setHook = $setHook; - } - - public function name(): string - { - return $this->name; - } - - public function type(): Type - { - return $this->type; - } - - public function hasGetHook(): bool - { - return $this->getHook; - } - - public function hasSetHook(): bool - { - return $this->setHook; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php deleted file mode 100644 index 4fcff6c8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HookedPropertyGenerator -{ - /** - * @param class-string $className - * @param list $properties - */ - public function generate(string $className, array $properties): string - { - $code = ''; - - foreach ($properties as $property) { - $code .= sprintf( - <<<'EOT' - - public %s $%s { -EOT, - $property->type()->asString(), - $property->name(), - ); - - if ($property->hasGetHook()) { - $code .= sprintf( - <<<'EOT' - - get { - return $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '%s', '$%s::get', [], '%s', $this - ) - ); - } - -EOT, - $className, - $property->name(), - $property->type()->asString(), - ); - } - - if ($property->hasSetHook()) { - $code .= sprintf( - <<<'EOT' - - set (%s $value) { - $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '%s', '$%s::set', [$value], 'void', $this - ) - ); - } - -EOT, - $property->type()->asString(), - $className, - $property->name(), - ); - } - - $code .= <<<'EOT' - } - -EOT; - } - - return $code; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php deleted file mode 100644 index 8106ce59..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Generator; - -use SebastianBergmann\Template\Template; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait TemplateLoader -{ - /** - * @var array - */ - private static array $templates = []; - - private function loadTemplate(string $template): Template - { - $filename = __DIR__ . '/templates/' . $template; - - if (!isset(self::$templates[$filename])) { - self::$templates[$filename] = new Template($filename); - } - - return self::$templates[$filename]; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/deprecation.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/deprecation.tpl deleted file mode 100644 index 5bf06f52..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/deprecation.tpl +++ /dev/null @@ -1,2 +0,0 @@ - - @trigger_error({deprecation}, E_USER_DEPRECATED); diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl deleted file mode 100644 index bb6fb761..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl +++ /dev/null @@ -1,35 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - {{deprecation} - $__phpunit_definedVariables = get_defined_vars(); - $__phpunit_namedVariadicParameters = []; - - foreach ($__phpunit_definedVariables as $__phpunit_definedVariableName => $__phpunit_definedVariableValue) { - if ((new ReflectionParameter([__CLASS__, __FUNCTION__], $__phpunit_definedVariableName))->isVariadic()) { - foreach ($__phpunit_definedVariableValue as $__phpunit_key => $__phpunit_namedValue) { - if (is_string($__phpunit_key)) { - $__phpunit_namedVariadicParameters[$__phpunit_key] = $__phpunit_namedValue; - } - } - } - } - - $__phpunit_arguments = [{arguments_call}]; - $__phpunit_count = func_num_args(); - - if ({arguments_count} !== null && $__phpunit_count > {arguments_count}) { - $__phpunit_arguments_tmp = func_get_args(); - - for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { - $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; - } - } - - $__phpunit_arguments = array_merge($__phpunit_arguments, $__phpunit_namedVariadicParameters); - - $__phpunit_result = $this->__phpunit_getInvocationHandler()->invoke( - new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this - ) - );{return_result} - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_static_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_static_method.tpl deleted file mode 100644 index 5e5cf23c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_static_method.tpl +++ /dev/null @@ -1,5 +0,0 @@ - - {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} - { - throw new \PHPUnit\Framework\MockObject\BadMethodCallException('Static method "{method_name}" cannot be invoked on mock object'); - } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/intersection.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/intersection.tpl deleted file mode 100644 index 75cd27a6..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/intersection.tpl +++ /dev/null @@ -1,5 +0,0 @@ -declare(strict_types=1); - -interface {intersection} extends {interfaces} -{ -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl deleted file mode 100644 index 5d015e3f..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl +++ /dev/null @@ -1,5 +0,0 @@ -declare(strict_types=1); - -{class_declaration} -{ -{use_statements}{property_hooks}{methods}} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php deleted file mode 100644 index 02620db5..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function array_merge; -use function assert; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException; -use PHPUnit\Framework\MockObject\Generator\ClassIsFinalException; -use PHPUnit\Framework\MockObject\Generator\DuplicateMethodException; -use PHPUnit\Framework\MockObject\Generator\Generator; -use PHPUnit\Framework\MockObject\Generator\InvalidMethodNameException; -use PHPUnit\Framework\MockObject\Generator\NameAlreadyInUseException; -use PHPUnit\Framework\MockObject\Generator\ReflectionException; -use PHPUnit\Framework\MockObject\Generator\RuntimeException; -use PHPUnit\Framework\MockObject\Generator\UnknownTypeException; -use PHPUnit\Framework\TestCase; -use ReflectionClass; - -/** - * @template MockedType - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class MockBuilder -{ - private readonly TestCase $testCase; - - /** - * @var class-string|trait-string - */ - private readonly string $type; - - /** - * @var list - */ - private array $methods = []; - private bool $emptyMethodsArray = false; - - /** - * @var ?class-string - */ - private ?string $mockClassName = null; - - /** - * @var array - */ - private array $constructorArgs = []; - private bool $originalConstructor = true; - private bool $originalClone = true; - private bool $returnValueGeneration = true; - private readonly Generator $generator; - - /** - * @param class-string|trait-string $type - */ - public function __construct(TestCase $testCase, string $type) - { - $this->testCase = $testCase; - $this->type = $type; - $this->generator = new Generator; - } - - /** - * Creates a mock object using a fluent interface. - * - * @throws ClassIsEnumerationException - * @throws ClassIsFinalException - * @throws DuplicateMethodException - * @throws InvalidArgumentException - * @throws InvalidMethodNameException - * @throws NameAlreadyInUseException - * @throws ReflectionException - * @throws RuntimeException - * @throws UnknownTypeException - * - * @return MockedType&MockObject - */ - public function getMock(): MockObject - { - $object = $this->generator->testDouble( - $this->type, - true, - !$this->emptyMethodsArray ? $this->methods : null, - $this->constructorArgs, - $this->mockClassName ?? '', - $this->originalConstructor, - $this->originalClone, - $this->returnValueGeneration, - ); - - assert($object instanceof $this->type); - assert($object instanceof MockObject); - - $this->testCase->registerMockObject($object); - - return $object; - } - - /** - * Specifies the subset of methods to mock, requiring each to exist in the class. - * - * @param list $methods - * - * @throws CannotUseOnlyMethodsException - * @throws ReflectionException - * - * @return $this - */ - public function onlyMethods(array $methods): self - { - if ($methods === []) { - $this->emptyMethodsArray = true; - - return $this; - } - - try { - $reflector = new ReflectionClass($this->type); - - // @codeCoverageIgnoreStart - /** @phpstan-ignore catch.neverThrown */ - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - $e->getCode(), - $e, - ); - // @codeCoverageIgnoreEnd - } - - foreach ($methods as $method) { - if (!$reflector->hasMethod($method)) { - throw new CannotUseOnlyMethodsException($this->type, $method); - } - } - - $this->methods = array_merge($this->methods, $methods); - - return $this; - } - - /** - * Specifies the arguments for the constructor. - * - * @param array $arguments - * - * @return $this - */ - public function setConstructorArgs(array $arguments): self - { - $this->constructorArgs = $arguments; - - return $this; - } - - /** - * Specifies the name for the mock class. - * - * @param class-string $name - * - * @return $this - */ - public function setMockClassName(string $name): self - { - $this->mockClassName = $name; - - return $this; - } - - /** - * Disables the invocation of the original constructor. - * - * @return $this - */ - public function disableOriginalConstructor(): self - { - $this->originalConstructor = false; - - return $this; - } - - /** - * Enables the invocation of the original constructor. - * - * @return $this - */ - public function enableOriginalConstructor(): self - { - $this->originalConstructor = true; - - return $this; - } - - /** - * Disables the invocation of the original clone constructor. - * - * @return $this - */ - public function disableOriginalClone(): self - { - $this->originalClone = false; - - return $this; - } - - /** - * Enables the invocation of the original clone constructor. - * - * @return $this - */ - public function enableOriginalClone(): self - { - $this->originalClone = true; - - return $this; - } - - /** - * @return $this - */ - public function enableAutoReturnValueGeneration(): self - { - $this->returnValueGeneration = true; - - return $this; - } - - /** - * @return $this - */ - public function disableAutoReturnValueGeneration(): self - { - $this->returnValueGeneration = false; - - return $this; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php deleted file mode 100644 index 4da35c0c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait DoubledCloneMethod -{ - public function __clone(): void - { - $this->__phpunit_state = clone $this->__phpunit_state; - - $this->__phpunit_state()->cloneInvocationHandler(); - } - - abstract public function __phpunit_state(): TestDoubleState; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php deleted file mode 100644 index c9b4e42e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait Method -{ - abstract public function __phpunit_getInvocationHandler(): InvocationHandler; - - public function method(Constraint|PropertyHook|string $constraint): InvocationStubber - { - return $this - ->__phpunit_getInvocationHandler() - ->expects(new AnyInvokedCount) - ->method($constraint); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php deleted file mode 100644 index a7369567..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait MockObjectApi -{ - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_hasMatchers(): bool - { - return $this->__phpunit_getInvocationHandler()->hasMatchers(); - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_verify(bool $unsetInvocationMocker = true): void - { - $this->__phpunit_getInvocationHandler()->verify(); - - if ($unsetInvocationMocker) { - $this->__phpunit_unsetInvocationMocker(); - } - } - - abstract public function __phpunit_state(): TestDoubleState; - - abstract public function __phpunit_getInvocationHandler(): InvocationHandler; - - abstract public function __phpunit_unsetInvocationMocker(): void; - - public function expects(InvocationOrder $matcher): InvocationStubber - { - return $this->__phpunit_getInvocationHandler()->expects($matcher); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php deleted file mode 100644 index 88797884..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait ProxiedCloneMethod -{ - public function __clone(): void - { - $this->__phpunit_state = clone $this->__phpunit_state; - - $this->__phpunit_state()->cloneInvocationHandler(); - - parent::__clone(); - } - - abstract public function __phpunit_state(): TestDoubleState; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/StubApi.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/StubApi.php deleted file mode 100644 index faba8d40..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/StubApi.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This trait is not covered by the backward compatibility promise for PHPUnit - */ -trait StubApi -{ - private readonly TestDoubleState $__phpunit_state; - - public function __phpunit_state(): TestDoubleState - { - return $this->__phpunit_state; - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_getInvocationHandler(): InvocationHandler - { - return $this->__phpunit_state()->invocationHandler(); - } - - /** @noinspection MagicMethodsValidityInspection */ - public function __phpunit_unsetInvocationMocker(): void - { - $this->__phpunit_state()->unsetInvocationHandler(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php deleted file mode 100644 index 93b10c14..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDoubleState -{ - /** - * @var list - */ - private readonly array $configurableMethods; - private readonly bool $generateReturnValues; - private ?InvocationHandler $invocationHandler = null; - - /** - * @param list $configurableMethods - */ - public function __construct(array $configurableMethods, bool $generateReturnValues) - { - $this->configurableMethods = $configurableMethods; - $this->generateReturnValues = $generateReturnValues; - } - - public function invocationHandler(): InvocationHandler - { - if ($this->invocationHandler !== null) { - return $this->invocationHandler; - } - - $this->invocationHandler = new InvocationHandler( - $this->configurableMethods, - $this->generateReturnValues, - ); - - return $this->invocationHandler; - } - - public function cloneInvocationHandler(): void - { - if ($this->invocationHandler === null) { - return; - } - - $this->invocationHandler = clone $this->invocationHandler; - } - - public function unsetInvocationHandler(): void - { - $this->invocationHandler = null; - } - - /** - * @return list - */ - public function configurableMethods(): array - { - return $this->configurableMethods; - } - - public function generateReturnValues(): bool - { - return $this->generateReturnValues; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/InvocationStubber.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/InvocationStubber.php deleted file mode 100644 index 337c82fb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/InvocationStubber.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; -use PHPUnit\Framework\MockObject\Stub\Stub; -use Throwable; - -interface InvocationStubber -{ - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @param Constraint|non-empty-string|PropertyHook $constraint - * - * @return $this - */ - public function method(Constraint|PropertyHook|string $constraint): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @param non-empty-string $id - * - * @return $this - */ - public function id(string $id): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @param non-empty-string $id - * - * @return $this - */ - public function after(string $id): self; - - /** - * @return $this - */ - public function with(mixed ...$arguments): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function withAnyParameters(): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function will(Stub $stub): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturn(mixed $value, mixed ...$nextValues): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturnReference(mixed &$reference): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @param array> $valueMap - * - * @return $this - */ - public function willReturnMap(array $valueMap): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturnArgument(int $argumentIndex): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturnCallback(callable $callback): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturnSelf(): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willReturnOnConsecutiveCalls(mixed ...$values): self; - - /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @return $this - */ - public function willThrowException(Throwable $exception): self; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php deleted file mode 100644 index 0ddc46dc..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface MockObject extends Stub -{ - public function expects(InvocationOrder $invocationRule): InvocationStubber; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php deleted file mode 100644 index 167d2466..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface MockObjectInternal extends MockObject, StubInternal -{ - public function __phpunit_hasMatchers(): bool; - - public function __phpunit_verify(bool $unsetInvocationMocker = true): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php deleted file mode 100644 index 6321c98b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Stub -{ - public function method(Constraint|PropertyHook|string $constraint): InvocationStubber; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php deleted file mode 100644 index 6e428ea5..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface StubInternal extends Stub -{ - public function __phpunit_state(): TestDoubleState; - - public function __phpunit_getInvocationHandler(): InvocationHandler; - - public function __phpunit_unsetInvocationMocker(): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php deleted file mode 100644 index d9e3c3f6..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function array_map; -use function implode; -use function sprintf; -use function str_starts_with; -use function strtolower; -use function substr; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Util\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Invocation implements SelfDescribing -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @var array - */ - private array $parameters; - private string $returnType; - private bool $isReturnTypeNullable; - private MockObjectInternal|StubInternal $object; - - /** - * @param class-string $className - * @param non-empty-string $methodName - * @param array $parameters - */ - public function __construct(string $className, string $methodName, array $parameters, string $returnType, MockObjectInternal|StubInternal $object) - { - $this->className = $className; - $this->methodName = $methodName; - $this->parameters = $parameters; - $this->object = $object; - - if (strtolower($methodName) === '__tostring') { - $returnType = 'string'; - } - - if (str_starts_with($returnType, '?')) { - $returnType = substr($returnType, 1); - $this->isReturnTypeNullable = true; - } else { - $this->isReturnTypeNullable = false; - } - - $this->returnType = $returnType; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - /** - * @return array - */ - public function parameters(): array - { - return $this->parameters; - } - - /** - * @throws Exception - */ - public function generateReturnValue(): mixed - { - if ($this->returnType === 'never') { - throw new NeverReturningMethodException( - $this->className, - $this->methodName, - ); - } - - if ($this->isReturnTypeNullable) { - return null; - } - - return (new ReturnValueGenerator)->generate( - $this->className, - $this->methodName, - $this->object, - $this->returnType, - ); - } - - public function toString(): string - { - return sprintf( - '%s::%s(%s)%s', - $this->className, - $this->methodName, - implode( - ', ', - array_map( - [Exporter::class, 'shortenedExport'], - $this->parameters, - ), - ), - $this->returnType !== '' ? sprintf(': %s', $this->returnType) : '', - ); - } - - public function object(): MockObjectInternal|StubInternal - { - return $this->object; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php deleted file mode 100644 index 50f8283a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function strtolower; -use Exception; -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationHandler -{ - /** - * @var list - */ - private array $matchers = []; - - /** - * @var array - */ - private array $matcherMap = []; - - /** - * @var list - */ - private readonly array $configurableMethods; - private readonly bool $returnValueGeneration; - - /** - * @param list $configurableMethods - */ - public function __construct(array $configurableMethods, bool $returnValueGeneration) - { - $this->configurableMethods = $configurableMethods; - $this->returnValueGeneration = $returnValueGeneration; - } - - public function hasMatchers(): bool - { - foreach ($this->matchers as $matcher) { - if ($matcher->hasMatchers()) { - return true; - } - } - - return false; - } - - /** - * Looks up the match builder with identification $id and returns it. - * - * @param non-empty-string $id - */ - public function lookupMatcher(string $id): ?Matcher - { - return $this->matcherMap[$id] ?? null; - } - - /** - * Registers a matcher with the identification $id. The matcher can later be - * looked up using lookupMatcher() to figure out if it has been invoked. - * - * @param non-empty-string $id - * - * @throws MatcherAlreadyRegisteredException - */ - public function registerMatcher(string $id, Matcher $matcher): void - { - if (isset($this->matcherMap[$id])) { - throw new MatcherAlreadyRegisteredException($id); - } - - $this->matcherMap[$id] = $matcher; - } - - public function expects(InvocationOrder $rule): InvocationStubber - { - $matcher = new Matcher($rule); - $this->addMatcher($matcher); - - return new InvocationStubberImplementation( - $this, - $matcher, - ...$this->configurableMethods, - ); - } - - /** - * @throws \PHPUnit\Framework\MockObject\Exception - * @throws Exception - */ - public function invoke(Invocation $invocation): mixed - { - $exception = null; - $hasReturnValue = false; - $returnValue = null; - - foreach ($this->matchers as $match) { - try { - if ($match->matches($invocation)) { - $value = $match->invoked($invocation); - - if (!$hasReturnValue) { - $returnValue = $value; - $hasReturnValue = true; - } - } - } catch (Exception $e) { - $exception = $e; - } - } - - if ($exception !== null) { - throw $exception; - } - - if ($hasReturnValue) { - return $returnValue; - } - - if (!$this->returnValueGeneration) { - if (strtolower($invocation->methodName()) === '__tostring') { - return ''; - } - - throw new ReturnValueNotConfiguredException($invocation); - } - - return $invocation->generateReturnValue(); - } - - /** - * @throws Throwable - */ - public function verify(): void - { - foreach ($this->matchers as $matcher) { - $matcher->verify(); - } - } - - private function addMatcher(Matcher $matcher): void - { - $this->matchers[] = $matcher; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationStubberImplementation.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationStubberImplementation.php deleted file mode 100644 index 3aca45a2..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationStubberImplementation.php +++ /dev/null @@ -1,330 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function array_flip; -use function array_key_exists; -use function array_map; -use function array_merge; -use function array_pop; -use function assert; -use function count; -use function is_string; -use function range; -use function strtolower; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; -use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls; -use PHPUnit\Framework\MockObject\Stub\Exception; -use PHPUnit\Framework\MockObject\Stub\ReturnArgument; -use PHPUnit\Framework\MockObject\Stub\ReturnCallback; -use PHPUnit\Framework\MockObject\Stub\ReturnReference; -use PHPUnit\Framework\MockObject\Stub\ReturnSelf; -use PHPUnit\Framework\MockObject\Stub\ReturnStub; -use PHPUnit\Framework\MockObject\Stub\ReturnValueMap; -use PHPUnit\Framework\MockObject\Stub\Stub; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvocationStubberImplementation implements InvocationStubber -{ - private readonly InvocationHandler $invocationHandler; - private readonly Matcher $matcher; - - /** - * @var list - */ - private readonly array $configurableMethods; - - /** - * @var ?array - */ - private ?array $configurableMethodNames = null; - - public function __construct(InvocationHandler $handler, Matcher $matcher, ConfigurableMethod ...$configurableMethods) - { - $this->invocationHandler = $handler; - $this->matcher = $matcher; - $this->configurableMethods = $configurableMethods; - } - - /** - * @param Constraint|non-empty-string|PropertyHook $constraint - * - * @throws InvalidArgumentException - * @throws MethodCannotBeConfiguredException - * @throws MethodNameAlreadyConfiguredException - * - * @return $this - */ - public function method(Constraint|PropertyHook|string $constraint): InvocationStubber - { - if ($this->matcher->hasMethodNameRule()) { - throw new MethodNameAlreadyConfiguredException; - } - - if ($constraint instanceof PropertyHook) { - $constraint = $constraint->asString(); - } - - if (is_string($constraint)) { - $this->configurableMethodNames ??= array_flip( - array_map( - static fn (ConfigurableMethod $configurable) => strtolower($configurable->name()), - $this->configurableMethods, - ), - ); - - if (!array_key_exists(strtolower($constraint), $this->configurableMethodNames)) { - throw new MethodCannotBeConfiguredException($constraint); - } - } - - $this->matcher->setMethodNameRule(new Rule\MethodName($constraint)); - - return $this; - } - - /** - * @param non-empty-string $id - * - * @throws MatcherAlreadyRegisteredException - * - * @return $this - */ - public function id(string $id): InvocationStubber - { - $this->invocationHandler->registerMatcher($id, $this->matcher); - - return $this; - } - - /** - * @param non-empty-string $id - * - * @return $this - */ - public function after(string $id): InvocationStubber - { - $this->matcher->setAfterMatchBuilderId($id); - - return $this; - } - - /** - * @throws \PHPUnit\Framework\Exception - * @throws MethodNameNotConfiguredException - * @throws MethodParametersAlreadyConfiguredException - * - * @return $this - */ - public function with(mixed ...$arguments): InvocationStubber - { - $this->ensureParametersCanBeConfigured(); - - $this->matcher->setParametersRule(new Rule\Parameters($arguments)); - - return $this; - } - - /** - * @throws MethodNameNotConfiguredException - * @throws MethodParametersAlreadyConfiguredException - * - * @return $this - */ - public function withAnyParameters(): InvocationStubber - { - $this->ensureParametersCanBeConfigured(); - - $this->matcher->setParametersRule(new Rule\AnyParameters); - - return $this; - } - - /** - * @return $this - */ - public function will(Stub $stub): InvocationStubber - { - $this->matcher->setStub($stub); - - return $this; - } - - /** - * @throws IncompatibleReturnValueException - */ - public function willReturn(mixed $value, mixed ...$nextValues): InvocationStubber - { - if (count($nextValues) === 0) { - $this->ensureTypeOfReturnValues([$value]); - - $stub = $value instanceof Stub ? $value : new ReturnStub($value); - - return $this->will($stub); - } - - $values = array_merge([$value], $nextValues); - - $this->ensureTypeOfReturnValues($values); - - $stub = new ConsecutiveCalls($values); - - return $this->will($stub); - } - - public function willReturnReference(mixed &$reference): InvocationStubber - { - $stub = new ReturnReference($reference); - - return $this->will($stub); - } - - public function willReturnMap(array $valueMap): InvocationStubber - { - $method = $this->configuredMethod(); - - assert($method instanceof ConfigurableMethod); - - $numberOfParameters = $method->numberOfParameters(); - $defaultValues = $method->defaultParameterValues(); - $hasDefaultValues = $defaultValues !== []; - - $_valueMap = []; - - foreach ($valueMap as $mapping) { - $numberOfConfiguredParameters = count($mapping) - 1; - - if ($numberOfConfiguredParameters === $numberOfParameters || !$hasDefaultValues) { - $_valueMap[] = $mapping; - - continue; - } - - $_mapping = []; - $returnValue = array_pop($mapping); - - foreach (range(0, $numberOfParameters - 1) as $i) { - if (array_key_exists($i, $mapping)) { - $_mapping[] = $mapping[$i]; - - continue; - } - - if (array_key_exists($i, $defaultValues)) { - $_mapping[] = $defaultValues[$i]; - } - } - - $_mapping[] = $returnValue; - $_valueMap[] = $_mapping; - } - - $stub = new ReturnValueMap($_valueMap); - - return $this->will($stub); - } - - public function willReturnArgument(int $argumentIndex): InvocationStubber - { - $stub = new ReturnArgument($argumentIndex); - - return $this->will($stub); - } - - public function willReturnCallback(callable $callback): InvocationStubber - { - $stub = new ReturnCallback($callback); - - return $this->will($stub); - } - - public function willReturnSelf(): InvocationStubber - { - $stub = new ReturnSelf; - - return $this->will($stub); - } - - public function willReturnOnConsecutiveCalls(mixed ...$values): InvocationStubber - { - $stub = new ConsecutiveCalls($values); - - return $this->will($stub); - } - - public function willThrowException(Throwable $exception): InvocationStubber - { - $stub = new Exception($exception); - - return $this->will($stub); - } - - /** - * @throws MethodNameNotConfiguredException - * @throws MethodParametersAlreadyConfiguredException - */ - private function ensureParametersCanBeConfigured(): void - { - if (!$this->matcher->hasMethodNameRule()) { - throw new MethodNameNotConfiguredException; - } - - if ($this->matcher->hasParametersRule()) { - throw new MethodParametersAlreadyConfiguredException; - } - } - - private function configuredMethod(): ?ConfigurableMethod - { - $configuredMethod = null; - - foreach ($this->configurableMethods as $configurableMethod) { - if ($this->matcher->methodNameRule()->matchesName($configurableMethod->name())) { - if ($configuredMethod !== null) { - return null; - } - - $configuredMethod = $configurableMethod; - } - } - - return $configuredMethod; - } - - /** - * @param array $values - * - * @throws IncompatibleReturnValueException - */ - private function ensureTypeOfReturnValues(array $values): void - { - $configuredMethod = $this->configuredMethod(); - - if ($configuredMethod === null) { - return; - } - - foreach ($values as $value) { - if (!$configuredMethod->mayReturn($value)) { - throw new IncompatibleReturnValueException( - $configuredMethod, - $value, - ); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php deleted file mode 100644 index f1587f3b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; -use PHPUnit\Framework\MockObject\Rule\AnyParameters; -use PHPUnit\Framework\MockObject\Rule\InvocationOrder; -use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount; -use PHPUnit\Framework\MockObject\Rule\InvokedCount; -use PHPUnit\Framework\MockObject\Rule\MethodName; -use PHPUnit\Framework\MockObject\Rule\ParametersRule; -use PHPUnit\Framework\MockObject\Stub\Stub; -use PHPUnit\Util\ThrowableToStringMapper; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Matcher -{ - private readonly InvocationOrder $invocationRule; - - /** - * @var ?non-empty-string - */ - private ?string $afterMatchBuilderId = null; - private ?MethodName $methodNameRule = null; - private ?ParametersRule $parametersRule = null; - private ?Stub $stub = null; - - public function __construct(InvocationOrder $rule) - { - $this->invocationRule = $rule; - } - - public function hasMatchers(): bool - { - return !$this->invocationRule instanceof AnyInvokedCount; - } - - public function hasMethodNameRule(): bool - { - return $this->methodNameRule !== null; - } - - public function methodNameRule(): MethodName - { - return $this->methodNameRule; - } - - public function setMethodNameRule(MethodName $rule): void - { - $this->methodNameRule = $rule; - } - - public function hasParametersRule(): bool - { - return $this->parametersRule !== null; - } - - public function setParametersRule(ParametersRule $rule): void - { - $this->parametersRule = $rule; - } - - public function setStub(Stub $stub): void - { - $this->stub = $stub; - } - - /** - * @param non-empty-string $id - */ - public function setAfterMatchBuilderId(string $id): void - { - $this->afterMatchBuilderId = $id; - } - - /** - * @throws Exception - * @throws ExpectationFailedException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException - * @throws RuntimeException - */ - public function invoked(Invocation $invocation): mixed - { - if ($this->methodNameRule === null) { - throw new MethodNameNotConfiguredException; - } - - if ($this->afterMatchBuilderId !== null) { - $matcher = $invocation->object() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); - - if ($matcher === null) { - throw new MatchBuilderNotFoundException($this->afterMatchBuilderId); - } - } - - $this->invocationRule->invoked($invocation); - - try { - $this->parametersRule?->apply($invocation); - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - $e->getMessage(), - ), - $e->getComparisonFailure(), - ); - } - - if ($this->stub !== null) { - return $this->stub->invoke($invocation); - } - - return $invocation->generateReturnValue(); - } - - /** - * @throws ExpectationFailedException - * @throws MatchBuilderNotFoundException - * @throws MethodNameNotConfiguredException - * @throws RuntimeException - */ - public function matches(Invocation $invocation): bool - { - if ($this->afterMatchBuilderId !== null) { - $matcher = $invocation->object() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); - - if ($matcher === null) { - throw new MatchBuilderNotFoundException($this->afterMatchBuilderId); - } - - if (!$matcher->invocationRule->hasBeenInvoked()) { - return false; - } - } - - if ($this->methodNameRule === null) { - throw new MethodNameNotConfiguredException; - } - - if (!$this->invocationRule->matches($invocation)) { - return false; - } - - try { - if (!$this->methodNameRule->matches($invocation)) { - return false; - } - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - $e->getMessage(), - ), - $e->getComparisonFailure(), - ); - } - - return true; - } - - /** - * @throws ExpectationFailedException - * @throws MethodNameNotConfiguredException - */ - public function verify(): void - { - if ($this->methodNameRule === null) { - throw new MethodNameNotConfiguredException; - } - - try { - $this->invocationRule->verify(); - - if ($this->parametersRule === null) { - $this->parametersRule = new AnyParameters; - } - - $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; - $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); - $invocationIsAtMost = $this->invocationRule instanceof InvokedAtMostCount; - - if (!$invocationIsAny && !$invocationIsNever && !$invocationIsAtMost) { - $this->parametersRule->verify(); - } - } catch (ExpectationFailedException $e) { - throw new ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s.\n%s", - $this->methodNameRule->toString(), - $this->invocationRule->toString(), - ThrowableToStringMapper::map($e), - ), - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/MethodNameConstraint.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/MethodNameConstraint.php deleted file mode 100644 index bb6bf60b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/MethodNameConstraint.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function sprintf; -use function strtolower; -use PHPUnit\Framework\Constraint\Constraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MethodNameConstraint extends Constraint -{ - private string $methodName; - - public function __construct(string $methodName) - { - $this->methodName = $methodName; - } - - public function toString(): string - { - return sprintf( - 'is "%s"', - $this->methodName, - ); - } - - protected function matches(mixed $other): bool - { - return strtolower($this->methodName) === strtolower((string) $other); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyGetHook.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyGetHook.php deleted file mode 100644 index 14266f55..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyGetHook.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Runtime; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PropertyGetHook extends PropertyHook -{ - /** - * @return non-empty-string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function asString(): string - { - return sprintf( - '$%s::get', - $this->propertyName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyHook.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyHook.php deleted file mode 100644 index a7664f8e..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertyHook.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Runtime; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class PropertyHook -{ - /** - * @var non-empty-string - */ - private string $propertyName; - - /** - * @param non-empty-string $propertyName - */ - public static function get(string $propertyName): PropertyGetHook - { - return new PropertyGetHook($propertyName); - } - - /** - * @param non-empty-string $propertyName - */ - public static function set(string $propertyName): PropertySetHook - { - return new PropertySetHook($propertyName); - } - - /** - * @param non-empty-string $propertyName - */ - protected function __construct(string $propertyName) - { - $this->propertyName = $propertyName; - } - - /** - * @return non-empty-string - */ - public function propertyName(): string - { - return $this->propertyName; - } - - /** - * @return non-empty-string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - abstract public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertySetHook.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertySetHook.php deleted file mode 100644 index 7d4918eb..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/PropertyHook/PropertySetHook.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Runtime; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PropertySetHook extends PropertyHook -{ - /** - * @return non-empty-string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function asString(): string - { - return sprintf( - '$%s::set', - $this->propertyName(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php deleted file mode 100644 index e429bc98..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php +++ /dev/null @@ -1,259 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject; - -use function array_map; -use function explode; -use function in_array; -use function interface_exists; -use function sprintf; -use function str_contains; -use function str_ends_with; -use function str_starts_with; -use function substr; -use PHPUnit\Framework\MockObject\Generator\Generator; -use ReflectionClass; -use ReflectionObject; -use stdClass; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnValueGenerator -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @throws Exception - */ - public function generate(string $className, string $methodName, StubInternal $testStub, string $returnType): mixed - { - $intersection = false; - $union = false; - - if (str_contains($returnType, '|')) { - $types = explode('|', $returnType); - $union = true; - - foreach ($types as $key => $type) { - if (str_starts_with($type, '(') && str_ends_with($type, ')')) { - $types[$key] = substr($type, 1, -1); - } - } - } elseif (str_contains($returnType, '&')) { - $types = explode('&', $returnType); - $intersection = true; - } else { - $types = [$returnType]; - } - - if (!$intersection) { - $lowerTypes = array_map('strtolower', $types); - - if (in_array('', $lowerTypes, true) || - in_array('null', $lowerTypes, true) || - in_array('mixed', $lowerTypes, true) || - in_array('void', $lowerTypes, true)) { - return null; - } - - if (in_array('true', $lowerTypes, true)) { - return true; - } - - if (in_array('false', $lowerTypes, true) || - in_array('bool', $lowerTypes, true)) { - return false; - } - - if (in_array('float', $lowerTypes, true)) { - return 0.0; - } - - if (in_array('int', $lowerTypes, true)) { - return 0; - } - - if (in_array('string', $lowerTypes, true)) { - return ''; - } - - if (in_array('array', $lowerTypes, true)) { - return []; - } - - if (in_array('static', $lowerTypes, true)) { - return $this->newInstanceOf($testStub, $className, $methodName); - } - - if (in_array('object', $lowerTypes, true)) { - return new stdClass; - } - - if (in_array('callable', $lowerTypes, true) || - in_array('closure', $lowerTypes, true)) { - return static function (): void - { - }; - } - - if (in_array('traversable', $lowerTypes, true) || - in_array('generator', $lowerTypes, true) || - in_array('iterable', $lowerTypes, true)) { - $generator = static function (): \Generator - { - yield from []; - }; - - return $generator(); - } - - if (!$union) { - return $this->testDoubleFor($returnType, $className, $methodName); - } - } - - if ($union) { - foreach ($types as $type) { - if (str_contains($type, '&')) { - $_types = explode('&', $type); - - if ($this->onlyInterfaces($_types)) { - return $this->testDoubleForIntersectionOfInterfaces($_types, $className, $methodName); - } - } - } - } - - if ($intersection && $this->onlyInterfaces($types)) { - return $this->testDoubleForIntersectionOfInterfaces($types, $className, $methodName); - } - - $reason = ''; - - if ($union) { - $reason = ' because the declared return type is a union'; - } elseif ($intersection) { - $reason = ' because the declared return type is an intersection'; - } - - throw new RuntimeException( - sprintf( - 'Return value for %s::%s() cannot be generated%s, please configure a return value for this method', - $className, - $methodName, - $reason, - ), - ); - } - - /** - * @param non-empty-list $types - */ - private function onlyInterfaces(array $types): bool - { - foreach ($types as $type) { - if (!interface_exists($type)) { - return false; - } - } - - return true; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @throws RuntimeException - */ - private function newInstanceOf(StubInternal $testStub, string $className, string $methodName): Stub - { - try { - $object = (new ReflectionClass($testStub::class))->newInstanceWithoutConstructor(); - $reflector = new ReflectionObject($object); - - $reflector->getProperty('__phpunit_state')->setValue( - $object, - new TestDoubleState( - $testStub->__phpunit_state()->configurableMethods(), - $testStub->__phpunit_state()->generateReturnValues(), - ), - ); - - return $object; - // @codeCoverageIgnoreStart - } catch (Throwable $t) { - throw new RuntimeException( - sprintf( - 'Return value for %s::%s() cannot be generated: %s', - $className, - $methodName, - $t->getMessage(), - ), - ); - // @codeCoverageIgnoreEnd - } - } - - /** - * @param class-string $type - * @param class-string $className - * @param non-empty-string $methodName - * - * @throws RuntimeException - */ - private function testDoubleFor(string $type, string $className, string $methodName): Stub - { - try { - return (new Generator)->testDouble($type, false, [], [], '', false); - // @codeCoverageIgnoreStart - } catch (Throwable $t) { - throw new RuntimeException( - sprintf( - 'Return value for %s::%s() cannot be generated: %s', - $className, - $methodName, - $t->getMessage(), - ), - ); - // @codeCoverageIgnoreEnd - } - } - - /** - * @param non-empty-list $types - * @param class-string $className - * @param non-empty-string $methodName - * - * @throws RuntimeException - */ - private function testDoubleForIntersectionOfInterfaces(array $types, string $className, string $methodName): Stub - { - try { - return (new Generator)->testDoubleForInterfaceIntersection($types, false); - // @codeCoverageIgnoreStart - } catch (Throwable $t) { - throw new RuntimeException( - sprintf( - 'Return value for %s::%s() cannot be generated: %s', - $className, - $methodName, - $t->getMessage(), - ), - ); - // @codeCoverageIgnoreEnd - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyInvokedCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyInvokedCount.php deleted file mode 100644 index 382f9308..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyInvokedCount.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyInvokedCount extends InvocationOrder -{ - public function toString(): string - { - return 'invoked zero or more times'; - } - - public function verify(): void - { - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyParameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyParameters.php deleted file mode 100644 index 01a54d1b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/AnyParameters.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class AnyParameters implements ParametersRule -{ - public function apply(BaseInvocation $invocation): void - { - } - - public function verify(): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvocationOrder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvocationOrder.php deleted file mode 100644 index c3fb8f29..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvocationOrder.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function count; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Framework\SelfDescribing; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class InvocationOrder implements SelfDescribing -{ - /** - * @var list - */ - private array $invocations = []; - - public function numberOfInvocations(): int - { - return count($this->invocations); - } - - public function hasBeenInvoked(): bool - { - return count($this->invocations) > 0; - } - - final public function invoked(BaseInvocation $invocation): void - { - $this->invocations[] = $invocation; - - $this->invokedDo($invocation); - } - - abstract public function matches(BaseInvocation $invocation): bool; - - abstract public function verify(): void; - - protected function invokedDo(BaseInvocation $invocation): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastCount.php deleted file mode 100644 index a78d933d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastCount.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtLeastCount extends InvocationOrder -{ - private readonly int $requiredInvocations; - - public function __construct(int $requiredInvocations) - { - $this->requiredInvocations = $requiredInvocations; - } - - public function toString(): string - { - return sprintf( - 'invoked at least %d time%s', - $this->requiredInvocations, - $this->requiredInvocations !== 1 ? 's' : '', - ); - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $actualInvocations = $this->numberOfInvocations(); - - if ($actualInvocations < $this->requiredInvocations) { - throw new ExpectationFailedException( - sprintf( - 'Expected invocation at least %d time%s but it occurred %d time%s.', - $this->requiredInvocations, - $this->requiredInvocations !== 1 ? 's' : '', - $actualInvocations, - $actualInvocations !== 1 ? 's' : '', - ), - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastOnce.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastOnce.php deleted file mode 100644 index 91026f53..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtLeastOnce.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtLeastOnce extends InvocationOrder -{ - public function toString(): string - { - return 'invoked at least once'; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $count = $this->numberOfInvocations(); - - if ($count < 1) { - throw new ExpectationFailedException( - 'Expected invocation at least once but it never occurred.', - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtMostCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtMostCount.php deleted file mode 100644 index 0cfda5e1..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedAtMostCount.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedAtMostCount extends InvocationOrder -{ - private readonly int $allowedInvocations; - - public function __construct(int $allowedInvocations) - { - $this->allowedInvocations = $allowedInvocations; - } - - public function toString(): string - { - return sprintf( - 'invoked at most %d time%s', - $this->allowedInvocations, - $this->allowedInvocations !== 1 ? 's' : '', - ); - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $actualInvocations = $this->numberOfInvocations(); - - if ($actualInvocations > $this->allowedInvocations) { - throw new ExpectationFailedException( - sprintf( - 'Expected invocation at most %d time%s but it occurred %d time%s.', - $this->allowedInvocations, - $this->allowedInvocations !== 1 ? 's' : '', - $actualInvocations, - $actualInvocations !== 1 ? 's' : '', - ), - ); - } - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedCount.php deleted file mode 100644 index 3f0e505a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/InvokedCount.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function sprintf; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvokedCount extends InvocationOrder -{ - private readonly int $expectedCount; - - public function __construct(int $expectedCount) - { - $this->expectedCount = $expectedCount; - } - - public function isNever(): bool - { - return $this->expectedCount === 0; - } - - public function toString(): string - { - return sprintf( - 'invoked %d time%s', - $this->expectedCount, - $this->expectedCount !== 1 ? 's' : '', - ); - } - - public function matches(BaseInvocation $invocation): bool - { - return true; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $actualCount = $this->numberOfInvocations(); - - if ($actualCount !== $this->expectedCount) { - throw new ExpectationFailedException( - sprintf( - 'Method was expected to be called %d time%s, actually called %d time%s.', - $this->expectedCount, - $this->expectedCount !== 1 ? 's' : '', - $actualCount, - $actualCount !== 1 ? 's' : '', - ), - ); - } - } - - /** - * @throws ExpectationFailedException - */ - protected function invokedDo(BaseInvocation $invocation): void - { - $count = $this->numberOfInvocations(); - - if ($count > $this->expectedCount) { - $message = $invocation->toString() . ' '; - - $message .= match ($this->expectedCount) { - 0 => 'was not expected to be called.', - 1 => 'was not expected to be called more than once.', - default => sprintf( - 'was not expected to be called more than %d times.', - $this->expectedCount, - ), - }; - - throw new ExpectationFailedException($message); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/MethodName.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/MethodName.php deleted file mode 100644 index 219a8087..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/MethodName.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function is_string; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Framework\MockObject\MethodNameConstraint; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MethodName -{ - private Constraint $constraint; - - /** - * @throws InvalidArgumentException - */ - public function __construct(Constraint|string $constraint) - { - if (is_string($constraint)) { - $constraint = new MethodNameConstraint($constraint); - } - - $this->constraint = $constraint; - } - - public function toString(): string - { - return 'method name ' . $this->constraint->toString(); - } - - /** - * @throws ExpectationFailedException - */ - public function matches(BaseInvocation $invocation): bool - { - return $this->matchesName($invocation->methodName()); - } - - /** - * @throws ExpectationFailedException - */ - public function matchesName(string $methodName): bool - { - return (bool) $this->constraint->evaluate($methodName, '', true); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/Parameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/Parameters.php deleted file mode 100644 index 17df3f0a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/Parameters.php +++ /dev/null @@ -1,154 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use function count; -use function sprintf; -use Exception; -use PHPUnit\Framework\Constraint\Callback; -use PHPUnit\Framework\Constraint\Constraint; -use PHPUnit\Framework\Constraint\IsAnything; -use PHPUnit\Framework\Constraint\IsEqual; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; -use PHPUnit\Util\Test; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Parameters implements ParametersRule -{ - /** - * @var list - */ - private array $parameters = []; - private ?BaseInvocation $invocation = null; - private null|bool|ExpectationFailedException $parameterVerificationResult; - - /** - * @param array $parameters - * - * @throws \PHPUnit\Framework\Exception - */ - public function __construct(array $parameters) - { - foreach ($parameters as $parameter) { - if (!$parameter instanceof Constraint) { - $parameter = new IsEqual( - $parameter, - ); - } - - $this->parameters[] = $parameter; - } - } - - /** - * @throws Exception - */ - public function apply(BaseInvocation $invocation): void - { - $this->invocation = $invocation; - $this->parameterVerificationResult = null; - - try { - $this->parameterVerificationResult = $this->doVerify(); - } catch (ExpectationFailedException $e) { - $this->parameterVerificationResult = $e; - - throw $this->parameterVerificationResult; - } - } - - /** - * Checks if the invocation $invocation matches the current rules. If it - * does the rule will get the invoked() method called which should check - * if an expectation is met. - * - * @throws ExpectationFailedException - */ - public function verify(): void - { - $this->doVerify(); - } - - /** - * @throws ExpectationFailedException - */ - private function doVerify(): bool - { - if (isset($this->parameterVerificationResult)) { - return $this->guardAgainstDuplicateEvaluationOfParameterConstraints(); - } - - if ($this->invocation === null) { - throw new ExpectationFailedException('Doubled method does not exist.'); - } - - if (count($this->invocation->parameters()) < count($this->parameters)) { - $message = 'Parameter count for invocation %s is too low.'; - - // The user called `->with($this->anything())`, but may have meant - // `->withAnyParameters()`. - // - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/199 - if (count($this->parameters) === 1 && - $this->parameters[0]::class === IsAnything::class) { - $message .= "\nTo allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead."; - } - - $this->incrementAssertionCount(); - - throw new ExpectationFailedException( - sprintf($message, $this->invocation->toString()), - ); - } - - foreach ($this->parameters as $i => $parameter) { - if ($parameter instanceof Callback && $parameter->isVariadic()) { - $other = $this->invocation->parameters(); - } else { - $other = $this->invocation->parameters()[$i]; - } - - $this->incrementAssertionCount(); - - $parameter->evaluate( - $other, - sprintf( - 'Parameter %s for invocation %s does not match expected value.', - $i, - $this->invocation->toString(), - ), - ); - } - - return true; - } - - /** - * @throws ExpectationFailedException - */ - private function guardAgainstDuplicateEvaluationOfParameterConstraints(): bool - { - if ($this->parameterVerificationResult instanceof ExpectationFailedException) { - throw $this->parameterVerificationResult; - } - - return (bool) $this->parameterVerificationResult; - } - - private function incrementAssertionCount(): void - { - Test::currentTestCase()->addToAssertionCount(1); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/ParametersRule.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/ParametersRule.php deleted file mode 100644 index 03cfe2a4..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Rule/ParametersRule.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Rule; - -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface ParametersRule -{ - /** - * @throws ExpectationFailedException if the invocation violates the rule - */ - public function apply(BaseInvocation $invocation): void; - - public function verify(): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ConsecutiveCalls.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ConsecutiveCalls.php deleted file mode 100644 index b518f1cf..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ConsecutiveCalls.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use function array_shift; -use function count; -use PHPUnit\Framework\MockObject\Invocation; -use PHPUnit\Framework\MockObject\NoMoreReturnValuesConfiguredException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConsecutiveCalls implements Stub -{ - /** - * @var array - */ - private array $stack; - private int $numberOfConfiguredReturnValues; - - /** - * @param array $stack - */ - public function __construct(array $stack) - { - $this->stack = $stack; - $this->numberOfConfiguredReturnValues = count($stack); - } - - /** - * @throws NoMoreReturnValuesConfiguredException - */ - public function invoke(Invocation $invocation): mixed - { - if ($this->stack === []) { - throw new NoMoreReturnValuesConfiguredException( - $invocation, - $this->numberOfConfiguredReturnValues, - ); - } - - $value = array_shift($this->stack); - - if ($value instanceof Stub) { - $value = $value->invoke($invocation); - } - - return $value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php deleted file mode 100644 index ce0a6804..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Exception.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Exception implements Stub -{ - private Throwable $exception; - - public function __construct(Throwable $exception) - { - $this->exception = $exception; - } - - /** - * @throws Throwable - */ - public function invoke(Invocation $invocation): never - { - throw $this->exception; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnArgument.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnArgument.php deleted file mode 100644 index daca5099..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnArgument.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ReturnArgument implements Stub -{ - private int $argumentIndex; - - public function __construct(int $argumentIndex) - { - $this->argumentIndex = $argumentIndex; - } - - public function invoke(Invocation $invocation): mixed - { - return $invocation->parameters()[$this->argumentIndex] ?? null; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php deleted file mode 100644 index 4e4cd531..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use function call_user_func_array; -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnCallback implements Stub -{ - /** - * @var callable - */ - private $callback; - - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - public function invoke(Invocation $invocation): mixed - { - return call_user_func_array($this->callback, $invocation->parameters()); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnReference.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnReference.php deleted file mode 100644 index 448df452..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnReference.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnReference implements Stub -{ - private mixed $reference; - - public function __construct(mixed &$reference) - { - $this->reference = &$reference; - } - - public function invoke(Invocation $invocation): mixed - { - return $this->reference; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnSelf.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnSelf.php deleted file mode 100644 index 4101d71a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnSelf.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; -use PHPUnit\Framework\MockObject\RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ReturnSelf implements Stub -{ - /** - * @throws RuntimeException - */ - public function invoke(Invocation $invocation): object - { - return $invocation->object(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnStub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnStub.php deleted file mode 100644 index a2d881c3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnStub.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ReturnStub implements Stub -{ - private mixed $value; - - public function __construct(mixed $value) - { - $this->value = $value; - } - - public function invoke(Invocation $invocation): mixed - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnValueMap.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnValueMap.php deleted file mode 100644 index c54abc35..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnValueMap.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use function array_pop; -use function count; -use function is_array; -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ReturnValueMap implements Stub -{ - /** - * @var array - */ - private array $valueMap; - - /** - * @param array $valueMap - */ - public function __construct(array $valueMap) - { - $this->valueMap = $valueMap; - } - - public function invoke(Invocation $invocation): mixed - { - $parameterCount = count($invocation->parameters()); - - foreach ($this->valueMap as $map) { - if (!is_array($map) || $parameterCount !== (count($map) - 1)) { - continue; - } - - $return = array_pop($map); - - if ($invocation->parameters() === $map) { - return $return; - } - } - - return null; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Stub.php deleted file mode 100644 index 46d9e53a..00000000 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/Stub.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\MockObject\Stub; - -use PHPUnit\Framework\MockObject\Invocation; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Stub -{ - /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. - */ - public function invoke(Invocation $invocation): mixed; -} diff --git a/vendor/phpunit/phpunit/src/Framework/NativeType.php b/vendor/phpunit/phpunit/src/Framework/NativeType.php deleted file mode 100644 index 0220e884..00000000 --- a/vendor/phpunit/phpunit/src/Framework/NativeType.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -enum NativeType: string -{ - case Array = 'array'; - case Bool = 'bool'; - case Callable = 'callable'; - case ClosedResource = 'resource (closed)'; - case Float = 'float'; - case Int = 'int'; - case Iterable = 'iterable'; - case Null = 'null'; - case Numeric = 'numeric'; - case Object = 'object'; - case Resource = 'resource'; - case Scalar = 'scalar'; - case String = 'string'; -} diff --git a/vendor/phpunit/phpunit/src/Framework/Reorderable.php b/vendor/phpunit/phpunit/src/Framework/Reorderable.php deleted file mode 100644 index 10f6e943..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Reorderable.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Reorderable -{ - public function sortId(): string; - - /** - * @return list - */ - public function provides(): array; - - /** - * @return list - */ - public function requires(): array; -} diff --git a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php b/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php deleted file mode 100644 index bdf91a4d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface SelfDescribing -{ - /** - * Returns a string representation of the object. - */ - public function toString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/Test.php b/vendor/phpunit/phpunit/src/Framework/Test.php deleted file mode 100644 index b3e862f7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/Test.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use Countable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Test extends Countable -{ - public function run(): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php deleted file mode 100644 index 56f75fc7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php +++ /dev/null @@ -1,308 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function array_merge; -use function assert; -use function sprintf; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Metadata\Api\DataProvider; -use PHPUnit\Metadata\Api\Groups; -use PHPUnit\Metadata\Api\ProvidedData; -use PHPUnit\Metadata\Api\Requirements; -use PHPUnit\Metadata\BackupGlobals; -use PHPUnit\Metadata\BackupStaticProperties; -use PHPUnit\Metadata\ExcludeGlobalVariableFromBackup; -use PHPUnit\Metadata\ExcludeStaticPropertyFromBackup; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Metadata\PreserveGlobalState; -use PHPUnit\Runner\ErrorHandler; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use ReflectionClass; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestBuilder -{ - /** - * @param ReflectionClass $theClass - * @param non-empty-string $methodName - * @param list $groups - * - * @throws InvalidDataProviderException - */ - public function build(ReflectionClass $theClass, string $methodName, array $groups = []): Test - { - $className = $theClass->getName(); - - $data = null; - - if ($this->requirementsSatisfied($className, $methodName)) { - try { - ErrorHandler::instance()->enterTestCaseContext($className, $methodName); - - $data = (new DataProvider)->providedData($className, $methodName); - } finally { - ErrorHandler::instance()->leaveTestCaseContext(); - } - } - - if ($data !== null) { - return $this->buildDataProviderTestSuite( - $methodName, - $className, - $data, - $this->shouldTestMethodBeRunInSeparateProcess($className, $methodName), - $this->shouldGlobalStateBePreserved($className, $methodName), - $this->shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess($className), - $this->backupSettings($className, $methodName), - $groups, - ); - } - - $test = new $className($methodName); - - $this->configureTestCase( - $test, - $this->shouldTestMethodBeRunInSeparateProcess($className, $methodName), - $this->shouldGlobalStateBePreserved($className, $methodName), - $this->shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess($className), - $this->backupSettings($className, $methodName), - ); - - return $test; - } - - /** - * @param non-empty-string $methodName - * @param class-string $className - * @param array $data - * @param array{backupGlobals: ?bool, backupGlobalsExcludeList: list, backupStaticProperties: ?bool, backupStaticPropertiesExcludeList: array>} $backupSettings - * @param list $groups - */ - private function buildDataProviderTestSuite(string $methodName, string $className, array $data, bool $runTestInSeparateProcess, ?bool $preserveGlobalState, bool $runClassInSeparateProcess, array $backupSettings, array $groups): DataProviderTestSuite - { - $dataProviderTestSuite = DataProviderTestSuite::empty( - $className . '::' . $methodName, - ); - - $groups = array_merge( - $groups, - (new Groups)->groups($className, $methodName), - ); - - foreach ($data as $_dataName => $_data) { - $_test = new $className($methodName); - - $_test->setData($_dataName, $_data->value()); - - $this->configureTestCase( - $_test, - $runTestInSeparateProcess, - $preserveGlobalState, - $runClassInSeparateProcess, - $backupSettings, - ); - - $dataProviderTestSuite->addTest($_test, $groups); - } - - return $dataProviderTestSuite; - } - - /** - * @param array{backupGlobals: ?bool, backupGlobalsExcludeList: list, backupStaticProperties: ?bool, backupStaticPropertiesExcludeList: array>} $backupSettings - */ - private function configureTestCase(TestCase $test, bool $runTestInSeparateProcess, ?bool $preserveGlobalState, bool $runClassInSeparateProcess, array $backupSettings): void - { - if ($runTestInSeparateProcess) { - $test->setRunTestInSeparateProcess(true); - } - - if ($runClassInSeparateProcess) { - $test->setRunClassInSeparateProcess(true); - } - - if ($preserveGlobalState !== null) { - $test->setPreserveGlobalState($preserveGlobalState); - } - - if ($backupSettings['backupGlobals'] !== null) { - $test->setBackupGlobals($backupSettings['backupGlobals']); - } else { - $test->setBackupGlobals(ConfigurationRegistry::get()->backupGlobals()); - } - - $test->setBackupGlobalsExcludeList($backupSettings['backupGlobalsExcludeList']); - - if ($backupSettings['backupStaticProperties'] !== null) { - $test->setBackupStaticProperties($backupSettings['backupStaticProperties']); - } else { - $test->setBackupStaticProperties(ConfigurationRegistry::get()->backupStaticProperties()); - } - - $test->setBackupStaticPropertiesExcludeList($backupSettings['backupStaticPropertiesExcludeList']); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @return array{backupGlobals: ?bool, backupGlobalsExcludeList: list, backupStaticProperties: ?bool, backupStaticPropertiesExcludeList: array>} - */ - private function backupSettings(string $className, string $methodName): array - { - $metadataForClass = MetadataRegistry::parser()->forClass($className); - $metadataForMethod = MetadataRegistry::parser()->forMethod($className, $methodName); - $metadataForClassAndMethod = MetadataRegistry::parser()->forClassAndMethod($className, $methodName); - - $backupGlobals = null; - $backupGlobalsExcludeList = []; - - if ($metadataForMethod->isBackupGlobals()->isNotEmpty()) { - $metadata = $metadataForMethod->isBackupGlobals()->asArray()[0]; - - assert($metadata instanceof BackupGlobals); - - if ($metadata->enabled()) { - $backupGlobals = true; - } - } elseif ($metadataForClass->isBackupGlobals()->isNotEmpty()) { - $metadata = $metadataForClass->isBackupGlobals()->asArray()[0]; - - assert($metadata instanceof BackupGlobals); - - if ($metadata->enabled()) { - $backupGlobals = true; - } - } - - foreach ($metadataForClassAndMethod->isExcludeGlobalVariableFromBackup() as $metadata) { - assert($metadata instanceof ExcludeGlobalVariableFromBackup); - - $backupGlobalsExcludeList[] = $metadata->globalVariableName(); - } - - $backupStaticProperties = null; - $backupStaticPropertiesExcludeList = []; - - if ($metadataForMethod->isBackupStaticProperties()->isNotEmpty()) { - $metadata = $metadataForMethod->isBackupStaticProperties()->asArray()[0]; - - assert($metadata instanceof BackupStaticProperties); - - if ($metadata->enabled()) { - $backupStaticProperties = true; - } - } elseif ($metadataForClass->isBackupStaticProperties()->isNotEmpty()) { - $metadata = $metadataForClass->isBackupStaticProperties()->asArray()[0]; - - assert($metadata instanceof BackupStaticProperties); - - if ($metadata->enabled()) { - $backupStaticProperties = true; - } - } - - foreach ($metadataForClassAndMethod->isExcludeStaticPropertyFromBackup() as $metadata) { - assert($metadata instanceof ExcludeStaticPropertyFromBackup); - - if (!isset($backupStaticPropertiesExcludeList[$metadata->className()])) { - $backupStaticPropertiesExcludeList[$metadata->className()] = []; - } - - $backupStaticPropertiesExcludeList[$metadata->className()][] = $metadata->propertyName(); - } - - return [ - 'backupGlobals' => $backupGlobals, - 'backupGlobalsExcludeList' => $backupGlobalsExcludeList, - 'backupStaticProperties' => $backupStaticProperties, - 'backupStaticPropertiesExcludeList' => $backupStaticPropertiesExcludeList, - ]; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - private function shouldGlobalStateBePreserved(string $className, string $methodName): ?bool - { - $metadataForMethod = MetadataRegistry::parser()->forMethod($className, $methodName); - - if ($metadataForMethod->isPreserveGlobalState()->isNotEmpty()) { - $metadata = $metadataForMethod->isPreserveGlobalState()->asArray()[0]; - - assert($metadata instanceof PreserveGlobalState); - - return $metadata->enabled(); - } - - $metadataForClass = MetadataRegistry::parser()->forClass($className); - - if ($metadataForClass->isPreserveGlobalState()->isNotEmpty()) { - $metadata = $metadataForClass->isPreserveGlobalState()->asArray()[0]; - - assert($metadata instanceof PreserveGlobalState); - - return $metadata->enabled(); - } - - return null; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - private function shouldTestMethodBeRunInSeparateProcess(string $className, string $methodName): bool - { - if (MetadataRegistry::parser()->forClass($className)->isRunTestsInSeparateProcesses()->isNotEmpty()) { - return true; - } - - if (MetadataRegistry::parser()->forMethod($className, $methodName)->isRunInSeparateProcess()->isNotEmpty()) { - return true; - } - - return false; - } - - /** - * @param class-string $className - */ - private function shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess(string $className): bool - { - $result = MetadataRegistry::parser()->forClass($className)->isRunClassInSeparateProcess()->isNotEmpty(); - - if ($result) { - EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation( - sprintf( - 'Class %s uses the #[RunClassInSeparateProcess]. This attribute is deprecated and will be removed in PHPUnit 13', - $className, - ), - ); - } - - return $result; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - private function requirementsSatisfied(string $className, string $methodName): bool - { - return (new Requirements)->requirementsNotSatisfiedFor($className, $methodName) === []; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php deleted file mode 100644 index cb77c905..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ /dev/null @@ -1,2495 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use const PHP_EOL; -use function array_keys; -use function array_merge; -use function array_reverse; -use function array_values; -use function assert; -use function chdir; -use function class_exists; -use function clearstatcache; -use function count; -use function defined; -use function error_clear_last; -use function explode; -use function fclose; -use function getcwd; -use function implode; -use function in_array; -use function ini_get; -use function ini_set; -use function is_array; -use function is_callable; -use function is_int; -use function is_object; -use function is_string; -use function is_writable; -use function libxml_clear_errors; -use function method_exists; -use function ob_end_clean; -use function ob_get_clean; -use function ob_get_contents; -use function ob_get_level; -use function ob_start; -use function preg_match; -use function preg_replace; -use function putenv; -use function restore_error_handler; -use function restore_exception_handler; -use function set_error_handler; -use function set_exception_handler; -use function sprintf; -use function str_contains; -use function stream_get_contents; -use function stream_get_meta_data; -use function tmpfile; -use function trim; -use AssertionError; -use DeepCopy\DeepCopy; -use PHPUnit\Event; -use PHPUnit\Event\NoPreviousThrowableException; -use PHPUnit\Framework\Constraint\Exception as ExceptionConstraint; -use PHPUnit\Framework\Constraint\ExceptionCode; -use PHPUnit\Framework\Constraint\ExceptionMessageIsOrContains; -use PHPUnit\Framework\Constraint\ExceptionMessageMatchesRegularExpression; -use PHPUnit\Framework\MockObject\Exception as MockObjectException; -use PHPUnit\Framework\MockObject\Generator\Generator as MockGenerator; -use PHPUnit\Framework\MockObject\MockBuilder; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\MockObject\MockObjectInternal; -use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount as AnyInvokedCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount as InvokedAtLeastCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce as InvokedAtLeastOnceMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMatcher; -use PHPUnit\Framework\MockObject\Rule\InvokedCount; -use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; -use PHPUnit\Framework\MockObject\Stub; -use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; -use PHPUnit\Framework\TestSize\TestSize; -use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\Metadata\Api\Groups; -use PHPUnit\Metadata\Api\HookMethods; -use PHPUnit\Metadata\Api\Requirements; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Metadata\WithEnvironmentVariable; -use PHPUnit\Runner\BackedUpEnvironmentVariable; -use PHPUnit\Runner\DeprecationCollector\Facade as DeprecationCollector; -use PHPUnit\Runner\HookMethodCollection; -use PHPUnit\Runner\ShutdownHandler; -use PHPUnit\TestRunner\TestResult\PassedTests; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use PHPUnit\Util\Exporter; -use PHPUnit\Util\Test as TestUtil; -use ReflectionClass; -use ReflectionException; -use ReflectionObject; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Comparator\Factory as ComparatorFactory; -use SebastianBergmann\Diff\Differ; -use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder; -use SebastianBergmann\GlobalState\ExcludeList as GlobalStateExcludeList; -use SebastianBergmann\GlobalState\Restorer; -use SebastianBergmann\GlobalState\Snapshot; -use SebastianBergmann\Invoker\TimeoutException; -use SebastianBergmann\ObjectEnumerator\Enumerator; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract class TestCase extends Assert implements Reorderable, SelfDescribing, Test -{ - private ?bool $backupGlobals = null; - - /** - * @var list - */ - private array $backupGlobalsExcludeList = []; - private ?bool $backupStaticProperties = null; - - /** - * @var array> - */ - private array $backupStaticPropertiesExcludeList = []; - private ?Snapshot $snapshot = null; - - /** - * @var list - */ - private ?array $backupGlobalErrorHandlers = null; - - /** - * @var list - */ - private ?array $backupGlobalExceptionHandlers = null; - private ?bool $runClassInSeparateProcess = null; - private ?bool $runTestInSeparateProcess = null; - private bool $preserveGlobalState = false; - private bool $inIsolation = false; - private ?string $expectedException = null; - private ?string $expectedExceptionMessage = null; - private ?string $expectedExceptionMessageRegExp = null; - private null|int|string $expectedExceptionCode = null; - - /** - * @var list - */ - private array $backupEnvironmentVariables = []; - - /** - * @var list - */ - private array $providedTests = []; - - /** - * @var array - */ - private array $data = []; - private int|string $dataName = ''; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @var list - */ - private array $groups = []; - - /** - * @var list - */ - private array $dependencies = []; - - /** - * @var array> - */ - private array $dependencyInput = []; - - /** - * @var list - */ - private array $mockObjects = []; - private TestStatus $status; - - /** - * @var 0|positive-int - */ - private int $numberOfAssertionsPerformed = 0; - private mixed $testResult = null; - private string $output = ''; - private ?string $outputExpectedRegex = null; - private ?string $outputExpectedString = null; - private bool $outputBufferingActive = false; - private int $outputBufferingLevel; - private bool $outputRetrievedForAssertion = false; - private bool $doesNotPerformAssertions = false; - private bool $expectErrorLog = false; - - /** - * @var list - */ - private array $customComparators = []; - private ?Event\Code\TestMethod $testValueObjectForEvents = null; - private bool $wasPrepared = false; - - /** - * @var array - */ - private array $failureTypes = []; - - /** - * @var list - */ - private array $expectedUserDeprecationMessage = []; - - /** - * @var list - */ - private array $expectedUserDeprecationMessageRegularExpression = []; - - /** - * @var false|resource - */ - private mixed $errorLogCapture = false; - private false|string $previousErrorLogTarget = false; - - /** - * @param non-empty-string $name - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function __construct(string $name) - { - $this->methodName = $name; - $this->status = TestStatus::unknown(); - - if (is_callable($this->sortId(), true)) { - $this->providedTests = [new ExecutionOrderDependency($this->sortId())]; - } - } - - /** - * This method is called before the first test of this test class is run. - * - * @codeCoverageIgnore - */ - public static function setUpBeforeClass(): void - { - } - - /** - * This method is called after the last test of this test class is run. - * - * @codeCoverageIgnore - */ - public static function tearDownAfterClass(): void - { - } - - /** - * This method is called before each test. - * - * @codeCoverageIgnore - */ - protected function setUp(): void - { - } - - /** - * Performs assertions shared by all tests of a test case. - * - * This method is called between setUp() and test. - * - * @codeCoverageIgnore - */ - protected function assertPreConditions(): void - { - } - - /** - * Performs assertions shared by all tests of a test case. - * - * This method is called between test and tearDown(). - * - * @codeCoverageIgnore - */ - protected function assertPostConditions(): void - { - } - - /** - * This method is called after each test. - * - * @codeCoverageIgnore - */ - protected function tearDown(): void - { - } - - /** - * Returns a string representation of the test case. - * - * @throws Exception - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function toString(): string - { - $buffer = sprintf( - '%s::%s', - (new ReflectionClass($this))->getName(), - $this->methodName, - ); - - return $buffer . $this->dataSetAsStringWithData(); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function count(): int - { - return 1; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function status(): TestStatus - { - return $this->status; - } - - /** - * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\Util\Exception - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\Template\InvalidArgumentException - * @throws Exception - * @throws NoPreviousThrowableException - * @throws ProcessIsolationException - * @throws UnintentionallyCoveredCodeException - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function run(): void - { - if (!$this->handleDependencies()) { - return; - } - - if (!$this->shouldRunInSeparateProcess() || $this->requirementsNotSatisfied()) { - try { - ShutdownHandler::setMessage(sprintf('Fatal error: Premature end of PHP process when running %s.', $this->toString())); - (new TestRunner)->run($this); - } finally { - ShutdownHandler::resetMessage(); - } - - return; - } - - IsolatedTestRunnerRegistry::run( - $this, - $this->runClassInSeparateProcess && !$this->runTestInSeparateProcess, - $this->preserveGlobalState, - $this->requiresXdebug(), - ); - } - - /** - * @return list - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function groups(): array - { - return $this->groups; - } - - /** - * @param list $groups - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setGroups(array $groups): void - { - $this->groups = $groups; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function nameWithDataSet(): string - { - return $this->methodName . $this->dataSetAsString(); - } - - /** - * @return non-empty-string - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function name(): string - { - return $this->methodName; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function size(): TestSize - { - return (new Groups)->size( - static::class, - $this->methodName, - ); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @phpstan-assert-if-true non-empty-string $this->output() - */ - final public function hasUnexpectedOutput(): bool - { - if ($this->output === '') { - return false; - } - - if ($this->expectsOutput()) { - return false; - } - - return true; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function output(): string - { - if (!$this->outputBufferingActive) { - return $this->output; - } - - return (string) ob_get_contents(); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function doesNotPerformAssertions(): bool - { - return $this->doesNotPerformAssertions; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function expectsOutput(): bool - { - return $this->hasExpectationOnOutput() || $this->outputRetrievedForAssertion; - } - - /** - * @throws Throwable - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function runBare(): void - { - $emitter = Event\Facade::emitter(); - - error_clear_last(); - clearstatcache(); - - $emitter->testPreparationStarted( - $this->valueObjectForEvents(), - ); - - $this->snapshotGlobalState(); - $this->snapshotGlobalErrorExceptionHandlers(); - $this->handleEnvironmentVariables(); - $this->startOutputBuffering(); - - $hookMethods = (new HookMethods)->hookMethods(static::class); - $hasMetRequirements = false; - $this->numberOfAssertionsPerformed = 0; - $currentWorkingDirectory = getcwd(); - - try { - $this->checkRequirements(); - $hasMetRequirements = true; - - if ($this->inIsolation) { - // @codeCoverageIgnoreStart - $this->invokeBeforeClassHookMethods($hookMethods, $emitter); - // @codeCoverageIgnoreEnd - } - - if (method_exists(static::class, $this->methodName) && - MetadataRegistry::parser()->forClassAndMethod(static::class, $this->methodName)->isDoesNotPerformAssertions()->isNotEmpty()) { - $this->doesNotPerformAssertions = true; - } - - $this->invokeBeforeTestHookMethods($hookMethods, $emitter); - $this->invokePreConditionHookMethods($hookMethods, $emitter); - - $emitter->testPrepared( - $this->valueObjectForEvents(), - ); - - $this->wasPrepared = true; - $this->testResult = $this->runTest(); - - $this->verifyDeprecationExpectations(); - $this->verifyMockObjects(); - $this->invokePostConditionHookMethods($hookMethods, $emitter); - - $this->status = TestStatus::success(); - } catch (IncompleteTest $e) { - $this->status = TestStatus::incomplete($e->getMessage()); - - $emitter->testMarkedAsIncomplete( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } catch (SkippedTest $e) { - $this->status = TestStatus::skipped($e->getMessage()); - - $emitter->testSkipped( - $this->valueObjectForEvents(), - $e->getMessage(), - ); - } catch (AssertionError|AssertionFailedError $e) { - $this->handleExceptionFromInvokedCountMockObjectRule($e); - - if (!$this->wasPrepared) { - $this->wasPrepared = true; - - $emitter->testPreparationFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } - - $this->status = TestStatus::failure($e->getMessage()); - - $emitter->testFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - Event\Code\ComparisonFailureBuilder::from($e), - ); - } catch (TimeoutException $e) { - } catch (Throwable $_e) { - if ($this->isRegisteredFailure($_e)) { - $this->status = TestStatus::failure($_e->getMessage()); - - $emitter->testFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($_e), - null, - ); - } else { - $e = $this->transformException($_e); - - $this->status = TestStatus::error($e->getMessage()); - - if (!$this->wasPrepared) { - if ($e instanceof AssertionFailedError) { - $emitter->testPreparationFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } else { - $emitter->testPreparationErrored( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } - } - - $emitter->testErrored( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } - } - - $outputBufferingStopped = false; - - if (!isset($e) && - $this->hasExpectationOnOutput() && - $this->stopOutputBuffering()) { - $outputBufferingStopped = true; - - $this->performAssertionsOnOutput(); - } - - try { - $this->mockObjects = []; - - /** @phpstan-ignore catch.neverThrown */ - } catch (Throwable $e) { - Event\Facade::emitter()->testErrored( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - ); - } - - // Tear down the fixture. An exception raised in tearDown() will be - // caught and passed on when no exception was raised before. - try { - if ($hasMetRequirements) { - $this->invokeAfterTestHookMethods($hookMethods, $emitter); - - if ($this->inIsolation) { - // @codeCoverageIgnoreStart - $this->invokeAfterClassHookMethods($hookMethods, $emitter); - // @codeCoverageIgnoreEnd - } - } - } catch (AssertionError|AssertionFailedError $e) { - $this->status = TestStatus::failure($e->getMessage()); - - $emitter->testFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - Event\Code\ComparisonFailureBuilder::from($e), - ); - } catch (Throwable $exceptionRaisedDuringTearDown) { - if (!isset($e) || $e instanceof SkippedWithMessageException) { - $this->status = TestStatus::error($exceptionRaisedDuringTearDown->getMessage()); - $e = $exceptionRaisedDuringTearDown; - - $emitter->testErrored( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($exceptionRaisedDuringTearDown), - ); - } - } - - if (!isset($e) && !isset($_e)) { - $emitter->testPassed( - $this->valueObjectForEvents(), - ); - - if (!$this->usesDataProvider()) { - PassedTests::instance()->testMethodPassed( - $this->valueObjectForEvents(), - $this->testResult, - ); - } - } - - if (!$outputBufferingStopped) { - $this->stopOutputBuffering(); - } - - clearstatcache(); - - if ($currentWorkingDirectory !== false && $currentWorkingDirectory !== getcwd()) { - chdir($currentWorkingDirectory); - } - - $this->restoreEnvironmentVariables(); - $this->restoreGlobalErrorExceptionHandlers(); - $this->restoreGlobalState(); - $this->unregisterCustomComparators(); - libxml_clear_errors(); - - $this->testValueObjectForEvents = null; - - if (isset($e)) { - $this->onNotSuccessfulTest($e); - } - } - - /** - * @param list $dependencies - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setDependencies(array $dependencies): void - { - $this->dependencies = $dependencies; - } - - /** - * @param array> $dependencyInput - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ - final public function setDependencyInput(array $dependencyInput): void - { - $this->dependencyInput = $dependencyInput; - } - - /** - * @return array> - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function dependencyInput(): array - { - return $this->dependencyInput; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function hasDependencyInput(): bool - { - return $this->dependencyInput !== []; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setBackupGlobals(bool $backupGlobals): void - { - $this->backupGlobals = $backupGlobals; - } - - /** - * @param list $backupGlobalsExcludeList - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setBackupGlobalsExcludeList(array $backupGlobalsExcludeList): void - { - $this->backupGlobalsExcludeList = $backupGlobalsExcludeList; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setBackupStaticProperties(bool $backupStaticProperties): void - { - $this->backupStaticProperties = $backupStaticProperties; - } - - /** - * @param array> $backupStaticPropertiesExcludeList - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setBackupStaticPropertiesExcludeList(array $backupStaticPropertiesExcludeList): void - { - $this->backupStaticPropertiesExcludeList = $backupStaticPropertiesExcludeList; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setRunTestInSeparateProcess(bool $runTestInSeparateProcess): void - { - if ($this->runTestInSeparateProcess === null) { - $this->runTestInSeparateProcess = $runTestInSeparateProcess; - } - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setRunClassInSeparateProcess(bool $runClassInSeparateProcess): void - { - $this->runClassInSeparateProcess = $runClassInSeparateProcess; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setPreserveGlobalState(bool $preserveGlobalState): void - { - $this->preserveGlobalState = $preserveGlobalState; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ - final public function setInIsolation(bool $inIsolation): void - { - $this->inIsolation = $inIsolation; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ - final public function result(): mixed - { - return $this->testResult; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setResult(mixed $result): void - { - $this->testResult = $result; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function registerMockObject(MockObject $mockObject): void - { - assert($mockObject instanceof MockObjectInternal); - - $this->mockObjects[] = $mockObject; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function addToAssertionCount(int $count): void - { - $this->numberOfAssertionsPerformed += $count; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @return 0|positive-int - */ - final public function numberOfAssertionsPerformed(): int - { - return $this->numberOfAssertionsPerformed; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function usesDataProvider(): bool - { - return $this->data !== []; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function dataName(): int|string - { - return $this->dataName; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function dataSetAsString(): string - { - if ($this->data !== []) { - if (is_int($this->dataName)) { - return sprintf(' with data set #%s', $this->dataName); - } - - return sprintf(' with data set "%s"', $this->dataName); - } - - return ''; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function dataSetAsStringWithData(): string - { - if ($this->data === []) { - return ''; - } - - return sprintf( - '%s with data (%s)', - $this->dataSetAsFilterString(), - Exporter::shortenedRecursiveExport($this->data), - ); - } - - /** - * @return array - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function providedData(): array - { - return $this->data; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function sortId(): string - { - $id = $this->methodName; - - if (!str_contains($id, '::')) { - $id = static::class . '::' . $id; - } - - if ($this->usesDataProvider()) { - $id .= $this->dataSetAsString(); - } - - return $id; - } - - /** - * @return list - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function provides(): array - { - return $this->providedTests; - } - - /** - * @return list - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function requires(): array - { - return $this->dependencies; - } - - /** - * @param array $data - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function setData(int|string $dataName, array $data): void - { - $this->dataName = $dataName; - $this->data = $data; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function valueObjectForEvents(): Event\Code\TestMethod - { - if ($this->testValueObjectForEvents !== null) { - return $this->testValueObjectForEvents; - } - - $this->testValueObjectForEvents = Event\Code\TestMethodBuilder::fromTestCase($this); - - return $this->testValueObjectForEvents; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - final public function wasPrepared(): bool - { - return $this->wasPrepared; - } - - /** - * Returns a matcher that matches when the method is executed - * zero or more times. - */ - final protected function any(): AnyInvokedCountMatcher - { - return new AnyInvokedCountMatcher; - } - - /** - * Returns a matcher that matches when the method is never executed. - */ - final protected function never(): InvokedCountMatcher - { - return new InvokedCountMatcher(0); - } - - /** - * Returns a matcher that matches when the method is executed - * at least N times. - */ - final protected function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher - { - return new InvokedAtLeastCountMatcher( - $requiredInvocations, - ); - } - - /** - * Returns a matcher that matches when the method is executed at least once. - */ - final protected function atLeastOnce(): InvokedAtLeastOnceMatcher - { - return new InvokedAtLeastOnceMatcher; - } - - /** - * Returns a matcher that matches when the method is executed exactly once. - */ - final protected function once(): InvokedCountMatcher - { - return new InvokedCountMatcher(1); - } - - /** - * Returns a matcher that matches when the method is executed - * exactly $count times. - */ - final protected function exactly(int $count): InvokedCountMatcher - { - return new InvokedCountMatcher($count); - } - - /** - * Returns a matcher that matches when the method is executed - * at most N times. - */ - final protected function atMost(int $allowedInvocations): InvokedAtMostCountMatcher - { - return new InvokedAtMostCountMatcher($allowedInvocations); - } - - final protected function throwException(Throwable $exception): ExceptionStub - { - return new ExceptionStub($exception); - } - - final protected function getActualOutputForAssertion(): string - { - $this->outputRetrievedForAssertion = true; - - return $this->output(); - } - - final protected function expectOutputRegex(string $expectedRegex): void - { - $this->outputExpectedRegex = $expectedRegex; - } - - final protected function expectOutputString(string $expectedString): void - { - $this->outputExpectedString = $expectedString; - } - - final protected function expectErrorLog(): void - { - $this->expectErrorLog = true; - } - - /** - * @param class-string $exception - */ - final protected function expectException(string $exception): void - { - $this->expectedException = $exception; - } - - final protected function expectExceptionCode(int|string $code): void - { - $this->expectedExceptionCode = $code; - } - - final protected function expectExceptionMessage(string $message): void - { - $this->expectedExceptionMessage = $message; - } - - final protected function expectExceptionMessageMatches(string $regularExpression): void - { - $this->expectedExceptionMessageRegExp = $regularExpression; - } - - /** - * Sets up an expectation for an exception to be raised by the code under test. - * Information for expected exception class, expected exception message, and - * expected exception code are retrieved from a given Exception object. - */ - final protected function expectExceptionObject(\Exception $exception): void - { - $this->expectException($exception::class); - $this->expectExceptionMessage($exception->getMessage()); - $this->expectExceptionCode($exception->getCode()); - } - - final protected function expectNotToPerformAssertions(): void - { - $this->doesNotPerformAssertions = true; - } - - /** - * @param non-empty-string $expectedUserDeprecationMessage - */ - final protected function expectUserDeprecationMessage(string $expectedUserDeprecationMessage): void - { - $this->expectedUserDeprecationMessage[] = $expectedUserDeprecationMessage; - } - - /** - * @param non-empty-string $expectedUserDeprecationMessageRegularExpression - */ - final protected function expectUserDeprecationMessageMatches(string $expectedUserDeprecationMessageRegularExpression): void - { - $this->expectedUserDeprecationMessageRegularExpression[] = $expectedUserDeprecationMessageRegularExpression; - } - - /** - * Returns a builder object to create mock objects using a fluent interface. - * - * @template RealInstanceType of object - * - * @param class-string $className - * - * @return MockBuilder - */ - final protected function getMockBuilder(string $className): MockBuilder - { - return new MockBuilder($this, $className); - } - - final protected function registerComparator(Comparator $comparator): void - { - ComparatorFactory::getInstance()->register($comparator); - - Event\Facade::emitter()->testRegisteredComparator($comparator::class); - - $this->customComparators[] = $comparator; - } - - /** - * @param class-string $classOrInterface - */ - final protected function registerFailureType(string $classOrInterface): void - { - $this->failureTypes[$classOrInterface] = true; - } - - /** - * Creates a mock object for the specified interface or class. - * - * @template RealInstanceType of object - * - * @param class-string $type - * - * @throws InvalidArgumentException - * @throws MockObjectException - * @throws NoPreviousThrowableException - * - * @return MockObject&RealInstanceType - */ - final protected function createMock(string $type): MockObject - { - $mock = (new MockGenerator)->testDouble( - $type, - true, - callOriginalConstructor: false, - callOriginalClone: false, - returnValueGeneration: self::generateReturnValuesForTestDoubles(), - ); - - assert($mock instanceof $type); - assert($mock instanceof MockObject); - - $this->registerMockObject($mock); - - Event\Facade::emitter()->testCreatedMockObject($type); - - return $mock; - } - - /** - * @param list $interfaces - * - * @throws MockObjectException - */ - final protected function createMockForIntersectionOfInterfaces(array $interfaces): MockObject - { - $mock = (new MockGenerator)->testDoubleForInterfaceIntersection( - $interfaces, - true, - returnValueGeneration: self::generateReturnValuesForTestDoubles(), - ); - - assert($mock instanceof MockObject); - - $this->registerMockObject($mock); - - Event\Facade::emitter()->testCreatedMockObjectForIntersectionOfInterfaces($interfaces); - - return $mock; - } - - /** - * Creates (and configures) a mock object for the specified interface or class. - * - * @template RealInstanceType of object - * - * @param class-string $type - * @param array $configuration - * - * @throws InvalidArgumentException - * @throws MockObjectException - * @throws NoPreviousThrowableException - * - * @return MockObject&RealInstanceType - */ - final protected function createConfiguredMock(string $type, array $configuration): MockObject - { - $o = $this->createMock($type); - - foreach ($configuration as $method => $return) { - $o->method($method)->willReturn($return); - } - - return $o; - } - - /** - * Creates a partial mock object for the specified interface or class. - * - * @param class-string $type - * @param list $methods - * - * @template RealInstanceType of object - * - * @throws InvalidArgumentException - * @throws MockObjectException - * - * @return MockObject&RealInstanceType - */ - final protected function createPartialMock(string $type, array $methods): MockObject - { - $mockBuilder = $this->getMockBuilder($type) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->onlyMethods($methods); - - if (!self::generateReturnValuesForTestDoubles()) { - $mockBuilder->disableAutoReturnValueGeneration(); - } - - $partialMock = $mockBuilder->getMock(); - - Event\Facade::emitter()->testCreatedPartialMockObject( - $type, - ...$methods, - ); - - return $partialMock; - } - - /** - * @param non-empty-string $additionalInformation - */ - final protected function provideAdditionalInformation(string $additionalInformation): void - { - Event\Facade::emitter()->testProvidedAdditionalInformation( - $this->valueObjectForEvents(), - $additionalInformation, - ); - } - - protected function transformException(Throwable $t): Throwable - { - return $t; - } - - /** - * This method is called when a test method did not execute successfully. - * - * @throws Throwable - */ - protected function onNotSuccessfulTest(Throwable $t): never - { - throw $t; - } - - /** - * Returns the data set as a string compatible with the --filter CLI option. - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - private function dataSetAsFilterString(): string - { - if ($this->data !== []) { - if (is_int($this->dataName)) { - return sprintf('#%d', $this->dataName); - } - - return sprintf('@%s', $this->dataName); - } - - return ''; - } - - /** - * @throws AssertionFailedError - * @throws Exception - * @throws ExpectationFailedException - * @throws Throwable - */ - private function runTest(): mixed - { - $testArguments = array_merge($this->data, array_values($this->dependencyInput)); - - $this->startErrorLogCapture(); - - try { - /** @phpstan-ignore method.dynamicName */ - $testResult = $this->{$this->methodName}(...$testArguments); - - $this->verifyErrorLogExpectation(); - } catch (Throwable $exception) { - $this->handleErrorLogError(); - - if (!$this->shouldExceptionExpectationsBeVerified($exception)) { - throw $exception; - } - - $this->verifyExceptionExpectations($exception); - - return null; - } finally { - $this->stopErrorLogCapture(); - } - - $this->expectedExceptionWasNotRaised(); - - return $testResult; - } - - private function stripDateFromErrorLog(string $log): string - { - // https://github.com/php/php-src/blob/c696087e323263e941774ebbf902ac249774ec9f/main/main.c#L905 - return preg_replace('/\[\d+-\w+-\d+ \d+:\d+:\d+ [^\r\n[\]]+?\] /', '', $log); - } - - /** - * @throws ExpectationFailedException - */ - private function verifyDeprecationExpectations(): void - { - foreach ($this->expectedUserDeprecationMessage as $deprecationExpectation) { - $this->numberOfAssertionsPerformed++; - - if (!in_array($deprecationExpectation, DeprecationCollector::deprecations(), true)) { - throw new ExpectationFailedException( - sprintf( - 'Expected deprecation with message "%s" was not triggered', - $deprecationExpectation, - ), - ); - } - } - - foreach ($this->expectedUserDeprecationMessageRegularExpression as $deprecationExpectation) { - $this->numberOfAssertionsPerformed++; - - $expectedDeprecationTriggered = false; - - foreach (DeprecationCollector::deprecations() as $deprecation) { - if (@preg_match($deprecationExpectation, $deprecation) > 0) { - $expectedDeprecationTriggered = true; - - break; - } - } - - if (!$expectedDeprecationTriggered) { - throw new ExpectationFailedException( - sprintf( - 'Expected deprecation with message matching regular expression "%s" was not triggered', - $deprecationExpectation, - ), - ); - } - } - } - - /** - * @throws Throwable - */ - private function verifyMockObjects(): void - { - foreach ($this->mockObjects as $mockObject) { - if ($mockObject->__phpunit_hasMatchers()) { - $this->numberOfAssertionsPerformed++; - } - - $mockObject->__phpunit_verify( - $this->shouldInvocationMockerBeReset($mockObject), - ); - } - } - - /** - * @throws SkippedTest - */ - private function checkRequirements(): void - { - if ($this->methodName === '' || !method_exists($this, $this->methodName)) { - return; - } - - $missingRequirements = (new Requirements)->requirementsNotSatisfiedFor( - static::class, - $this->methodName, - ); - - if ($missingRequirements !== []) { - $this->markTestSkipped(implode(PHP_EOL, $missingRequirements)); - } - } - - private function handleDependencies(): bool - { - if ([] === $this->dependencies || $this->inIsolation) { - return true; - } - - $passedTests = PassedTests::instance(); - - foreach ($this->dependencies as $dependency) { - if (!$dependency->isValid()) { - $this->markErrorForInvalidDependency(); - - return false; - } - - if ($dependency->targetIsClass()) { - $dependencyClassName = $dependency->getTargetClassName(); - - if (!class_exists($dependencyClassName)) { - $this->markErrorForInvalidDependency($dependency); - - return false; - } - - if (!$passedTests->hasTestClassPassed($dependencyClassName)) { - $this->markSkippedForMissingDependency($dependency); - - return false; - } - - continue; - } - - $dependencyTarget = $dependency->getTarget(); - - if (!$passedTests->hasTestMethodPassed($dependencyTarget)) { - if (!$this->isCallableTestMethod($dependencyTarget)) { - $this->markErrorForInvalidDependency($dependency); - } else { - $this->markSkippedForMissingDependency($dependency); - } - - return false; - } - - if ($passedTests->isGreaterThan($dependencyTarget, $this->size())) { - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - 'This test depends on a test that is larger than itself', - ); - - return true; - } - - if (!$passedTests->hasReturnValue($dependencyTarget)) { - return true; - } - - $returnValue = $passedTests->returnValue($dependencyTarget); - - if ($dependency->deepClone()) { - $deepCopy = new DeepCopy; - $deepCopy->skipUncloneable(false); - - $this->dependencyInput[$dependencyTarget] = $deepCopy->copy($returnValue); - } elseif ($dependency->shallowClone()) { - $this->dependencyInput[$dependencyTarget] = clone $returnValue; - } else { - $this->dependencyInput[$dependencyTarget] = $returnValue; - } - } - - $this->testValueObjectForEvents = null; - - return true; - } - - /** - * @throws Exception - * @throws NoPreviousThrowableException - */ - private function markErrorForInvalidDependency(?ExecutionOrderDependency $dependency = null): void - { - $message = 'This test has an invalid dependency'; - - if ($dependency !== null) { - $message = sprintf( - 'This test depends on "%s" which does not exist', - $dependency->targetIsClass() ? $dependency->getTargetClassName() : $dependency->getTarget(), - ); - } - - $exception = new InvalidDependencyException($message); - - Event\Facade::emitter()->testErrored( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($exception), - ); - - $this->status = TestStatus::error($message); - } - - private function markSkippedForMissingDependency(ExecutionOrderDependency $dependency): void - { - $message = sprintf( - 'This test depends on "%s" to pass', - $dependency->getTarget(), - ); - - Event\Facade::emitter()->testSkipped( - $this->valueObjectForEvents(), - $message, - ); - - $this->status = TestStatus::skipped($message); - } - - private function startOutputBuffering(): void - { - ob_start(); - - $this->outputBufferingActive = true; - $this->outputBufferingLevel = ob_get_level(); - } - - private function stopOutputBuffering(): bool - { - $bufferingLevel = ob_get_level(); - - if ($bufferingLevel !== $this->outputBufferingLevel) { - if ($bufferingLevel > $this->outputBufferingLevel) { - $message = 'Test code or tested code did not close its own output buffers'; - } else { - $message = 'Test code or tested code closed output buffers other than its own'; - } - - while (ob_get_level() >= $this->outputBufferingLevel) { - ob_end_clean(); - } - - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - $message, - ); - - return false; - } - - $this->output = ob_get_clean(); - - $this->outputBufferingActive = false; - $this->outputBufferingLevel = ob_get_level(); - - return true; - } - - private function snapshotGlobalErrorExceptionHandlers(): void - { - $this->backupGlobalErrorHandlers = $this->activeErrorHandlers(); - $this->backupGlobalExceptionHandlers = $this->activeExceptionHandlers(); - } - - private function restoreGlobalErrorExceptionHandlers(): void - { - $activeErrorHandlers = $this->activeErrorHandlers(); - $activeExceptionHandlers = $this->activeExceptionHandlers(); - - $message = null; - - if ($activeErrorHandlers !== $this->backupGlobalErrorHandlers) { - if (count($activeErrorHandlers) > count($this->backupGlobalErrorHandlers)) { - if (!$this->inIsolation) { - $message = 'Test code or tested code did not remove its own error handlers'; - } - } else { - $message = 'Test code or tested code removed error handlers other than its own'; - } - - foreach ($activeErrorHandlers as $handler) { - restore_error_handler(); - } - - foreach ($this->backupGlobalErrorHandlers as $handler) { - set_error_handler($handler); - } - } - - if ($message !== null) { - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - $message, - ); - } - - $message = null; - - if ($activeExceptionHandlers !== $this->backupGlobalExceptionHandlers) { - if (count($activeExceptionHandlers) > count($this->backupGlobalExceptionHandlers)) { - if (!$this->inIsolation) { - $message = 'Test code or tested code did not remove its own exception handlers'; - } - } else { - $message = 'Test code or tested code removed exception handlers other than its own'; - } - - foreach ($activeExceptionHandlers as $handler) { - restore_exception_handler(); - } - - foreach ($this->backupGlobalExceptionHandlers as $handler) { - set_exception_handler($handler); - } - } - - $this->backupGlobalErrorHandlers = null; - $this->backupGlobalExceptionHandlers = null; - - if ($message !== null) { - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - $message, - ); - } - } - - /** - * @return list - */ - private function activeErrorHandlers(): array - { - $activeErrorHandlers = []; - - while (true) { - $previousHandler = set_error_handler(static fn () => false); - - restore_error_handler(); - - if ($previousHandler === null) { - break; - } - - $activeErrorHandlers[] = $previousHandler; - - restore_error_handler(); - } - - $activeErrorHandlers = array_reverse($activeErrorHandlers); - $invalidErrorHandlerStack = false; - - foreach ($activeErrorHandlers as $handler) { - if (!is_callable($handler)) { - $invalidErrorHandlerStack = true; - - continue; - } - - set_error_handler($handler); - } - - if ($invalidErrorHandlerStack) { - $message = 'At least one error handler is not callable outside the scope it was registered in'; - - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - $message, - ); - } - - return $activeErrorHandlers; - } - - /** - * @return list - */ - private function activeExceptionHandlers(): array - { - $res = []; - - while (true) { - $previousHandler = set_exception_handler(static fn () => null); - restore_exception_handler(); - - if ($previousHandler === null) { - break; - } - $res[] = $previousHandler; - restore_exception_handler(); - } - $res = array_reverse($res); - - foreach ($res as $handler) { - set_exception_handler($handler); - } - - return $res; - } - - private function snapshotGlobalState(): void - { - if ($this->runTestInSeparateProcess || $this->inIsolation || - (!$this->backupGlobals && !$this->backupStaticProperties)) { - return; - } - - $snapshot = $this->createGlobalStateSnapshot($this->backupGlobals === true); - - $this->snapshot = $snapshot; - } - - private function restoreGlobalState(): void - { - if (!$this->snapshot instanceof Snapshot) { - return; - } - - if (ConfigurationRegistry::get()->beStrictAboutChangesToGlobalState()) { - $this->compareGlobalStateSnapshots( - $this->snapshot, - $this->createGlobalStateSnapshot($this->backupGlobals === true), - ); - } - - $restorer = new Restorer; - - if ($this->backupGlobals) { - $restorer->restoreGlobalVariables($this->snapshot); - } - - if ($this->backupStaticProperties) { - $restorer->restoreStaticProperties($this->snapshot); - } - - $this->snapshot = null; - } - - private function createGlobalStateSnapshot(bool $backupGlobals): Snapshot - { - $excludeList = new GlobalStateExcludeList; - - foreach ($this->backupGlobalsExcludeList as $globalVariable) { - $excludeList->addGlobalVariable($globalVariable); - } - - if (!defined('PHPUNIT_TESTSUITE')) { - $excludeList->addClassNamePrefix('PHPUnit'); - $excludeList->addClassNamePrefix('SebastianBergmann\CodeCoverage'); - $excludeList->addClassNamePrefix('SebastianBergmann\FileIterator'); - $excludeList->addClassNamePrefix('SebastianBergmann\Invoker'); - $excludeList->addClassNamePrefix('SebastianBergmann\Template'); - $excludeList->addClassNamePrefix('SebastianBergmann\Timer'); - $excludeList->addStaticProperty(ComparatorFactory::class, 'instance'); - - foreach ($this->backupStaticPropertiesExcludeList as $class => $properties) { - foreach ($properties as $property) { - $excludeList->addStaticProperty($class, $property); - } - } - } - - return new Snapshot( - $excludeList, - $backupGlobals, - (bool) $this->backupStaticProperties, - false, - false, - false, - false, - false, - false, - false, - ); - } - - private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after): void - { - $backupGlobals = $this->backupGlobals === null || $this->backupGlobals; - - if ($backupGlobals) { - $this->compareGlobalStateSnapshotPart( - $before->globalVariables(), - $after->globalVariables(), - "--- Global variables before the test\n+++ Global variables after the test\n", - ); - - $this->compareGlobalStateSnapshotPart( - $before->superGlobalVariables(), - $after->superGlobalVariables(), - "--- Super-global variables before the test\n+++ Super-global variables after the test\n", - ); - } - - if ($this->backupStaticProperties) { - $this->compareGlobalStateSnapshotPart( - $before->staticProperties(), - $after->staticProperties(), - "--- Static properties before the test\n+++ Static properties after the test\n", - ); - } - } - - /** - * @param array $before - * @param array $after - */ - private function compareGlobalStateSnapshotPart(array $before, array $after, string $header): void - { - if ($before !== $after) { - $differ = new Differ(new UnifiedDiffOutputBuilder($header)); - - Event\Facade::emitter()->testConsideredRisky( - $this->valueObjectForEvents(), - 'This test modified global state but was not expected to do so' . PHP_EOL . - trim( - $differ->diff( - Exporter::export($before), - Exporter::export($after), - ), - ), - ); - } - } - - private function handleEnvironmentVariables(): void - { - $withEnvironmentVariables = MetadataRegistry::parser()->forClassAndMethod(static::class, $this->methodName)->isWithEnvironmentVariable(); - - $environmentVariables = []; - - foreach ($withEnvironmentVariables as $metadata) { - assert($metadata instanceof WithEnvironmentVariable); - - $environmentVariables[$metadata->environmentVariableName()] = $metadata->value(); - } - - foreach ($environmentVariables as $environmentVariableName => $environmentVariableValue) { - $this->backupEnvironmentVariables = [...$this->backupEnvironmentVariables, ...BackedUpEnvironmentVariable::create($environmentVariableName)]; - - if ($environmentVariableValue === null) { - unset($_ENV[$environmentVariableName]); - putenv($environmentVariableName); - } else { - $_ENV[$environmentVariableName] = $environmentVariableValue; - putenv("{$environmentVariableName}={$environmentVariableValue}"); - } - } - } - - private function restoreEnvironmentVariables(): void - { - foreach ($this->backupEnvironmentVariables as $backupEnvironmentVariable) { - $backupEnvironmentVariable->restore(); - } - - $this->backupEnvironmentVariables = []; - } - - private function shouldInvocationMockerBeReset(MockObject $mock): bool - { - $enumerator = new Enumerator; - - if (in_array($mock, $enumerator->enumerate($this->dependencyInput), true)) { - return false; - } - - if (!is_array($this->testResult) && !is_object($this->testResult)) { - return true; - } - - return !in_array($mock, $enumerator->enumerate($this->testResult), true); - } - - private function unregisterCustomComparators(): void - { - $factory = ComparatorFactory::getInstance(); - - foreach ($this->customComparators as $comparator) { - $factory->unregister($comparator); - } - - $this->customComparators = []; - } - - /** - * @throws Exception - */ - private function shouldExceptionExpectationsBeVerified(Throwable $throwable): bool - { - $result = false; - - if ($this->expectedException !== null || $this->expectedExceptionCode !== null || $this->expectedExceptionMessage !== null || $this->expectedExceptionMessageRegExp !== null) { - $result = true; - } - - if ($throwable instanceof Exception) { - $result = false; - } - - if (is_string($this->expectedException)) { - try { - $reflector = new ReflectionClass($this->expectedException); - // @codeCoverageIgnoreStart - } catch (ReflectionException $e) { - throw new Exception( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - // @codeCoverageIgnoreEnd - - if ($this->expectedException === 'PHPUnit\Framework\Exception' || - $this->expectedException === '\PHPUnit\Framework\Exception' || - $reflector->isSubclassOf(Exception::class)) { - $result = true; - } - } - - return $result; - } - - private function shouldRunInSeparateProcess(): bool - { - if ($this->inIsolation) { - return false; - } - - if ($this->runTestInSeparateProcess) { - return true; - } - - if ($this->runClassInSeparateProcess) { - return true; - } - - return ConfigurationRegistry::get()->processIsolation(); - } - - private function isCallableTestMethod(string $dependency): bool - { - [$className, $methodName] = explode('::', $dependency); - - if (!class_exists($className)) { - return false; - } - - $class = new ReflectionClass($className); - - if (!$class->isSubclassOf(__CLASS__)) { - return false; - } - - if (!$class->hasMethod($methodName)) { - return false; - } - - return TestUtil::isTestMethod( - $class->getMethod($methodName), - ); - } - - /** - * @throws Exception - * @throws ExpectationFailedException - * @throws NoPreviousThrowableException - */ - private function performAssertionsOnOutput(): void - { - try { - if ($this->outputExpectedRegex !== null) { - $this->assertMatchesRegularExpression($this->outputExpectedRegex, $this->output); - } elseif ($this->outputExpectedString !== null) { - $this->assertSame($this->outputExpectedString, $this->output); - } - } catch (ExpectationFailedException $e) { - $this->status = TestStatus::failure($e->getMessage()); - - Event\Facade::emitter()->testFailed( - $this->valueObjectForEvents(), - Event\Code\ThrowableBuilder::from($e), - Event\Code\ComparisonFailureBuilder::from($e), - ); - - throw $e; - } - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - * - * @codeCoverageIgnore - */ - private function invokeBeforeClassHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['beforeClass'], - $emitter, - 'beforeFirstTestMethodCalled', - 'beforeFirstTestMethodErrored', - 'beforeFirstTestMethodFailed', - 'beforeFirstTestMethodFinished', - false, - ); - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - */ - private function invokeBeforeTestHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['before'], - $emitter, - 'beforeTestMethodCalled', - 'beforeTestMethodErrored', - 'beforeTestMethodFailed', - 'beforeTestMethodFinished', - ); - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - */ - private function invokePreConditionHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['preCondition'], - $emitter, - 'preConditionCalled', - 'preConditionErrored', - 'preConditionFailed', - 'preConditionFinished', - ); - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - */ - private function invokePostConditionHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['postCondition'], - $emitter, - 'postConditionCalled', - 'postConditionErrored', - 'postConditionFailed', - 'postConditionFinished', - ); - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - */ - private function invokeAfterTestHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['after'], - $emitter, - 'afterTestMethodCalled', - 'afterTestMethodErrored', - 'afterTestMethodFailed', - 'afterTestMethodFinished', - ); - } - - /** - * @param array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} $hookMethods - * - * @throws Throwable - * - * @codeCoverageIgnore - */ - private function invokeAfterClassHookMethods(array $hookMethods, Event\Emitter $emitter): void - { - $this->invokeHookMethods( - $hookMethods['afterClass'], - $emitter, - 'afterLastTestMethodCalled', - 'afterLastTestMethodErrored', - 'afterLastTestMethodFailed', - 'afterLastTestMethodFinished', - false, - ); - } - - /** - * @param 'afterLastTestMethodCalled'|'afterTestMethodCalled'|'beforeFirstTestMethodCalled'|'beforeTestMethodCalled'|'postConditionCalled'|'preConditionCalled' $calledMethod - * @param 'afterLastTestMethodErrored'|'afterTestMethodErrored'|'beforeFirstTestMethodErrored'|'beforeTestMethodErrored'|'postConditionErrored'|'preConditionErrored' $erroredMethod - * @param 'afterLastTestMethodFailed'|'afterTestMethodFailed'|'beforeFirstTestMethodFailed'|'beforeTestMethodFailed'|'postConditionFailed'|'preConditionFailed' $failedMethod - * @param 'afterLastTestMethodFinished'|'afterTestMethodFinished'|'beforeFirstTestMethodFinished'|'beforeTestMethodFinished'|'postConditionFinished'|'preConditionFinished' $finishedMethod - * - * @throws Throwable - */ - private function invokeHookMethods(HookMethodCollection $hookMethods, Event\Emitter $emitter, string $calledMethod, string $erroredMethod, string $failedMethod, string $finishedMethod, bool $forTestCase = true): void - { - if ($forTestCase) { - $test = $this->valueObjectForEvents(); - } else { - $test = static::class; - } - - $methodsInvoked = []; - - foreach ($hookMethods->methodNamesSortedByPriority() as $methodName) { - if ($this->methodDoesNotExistOrIsDeclaredInTestCase($methodName)) { - continue; - } - - $methodInvoked = new Event\Code\ClassMethod( - static::class, - $methodName, - ); - - try { - /** @phpstan-ignore method.dynamicName */ - $this->{$methodName}(); - } catch (Throwable $t) { - } - - /** @phpstan-ignore method.dynamicName */ - $emitter->{$calledMethod}( - $test, - $methodInvoked - ); - - $methodsInvoked[] = $methodInvoked; - - if (isset($t) && !$t instanceof SkippedTest) { - if ($t instanceof AssertionFailedError) { - $method = $failedMethod; - } else { - $method = $erroredMethod; - } - - /** @phpstan-ignore method.dynamicName */ - $emitter->{$method}( - $test, - $methodInvoked, - Event\Code\ThrowableBuilder::from($t), - ); - - break; - } - } - - if ($methodsInvoked !== []) { - /** @phpstan-ignore method.dynamicName */ - $emitter->{$finishedMethod}( - $test, - ...$methodsInvoked - ); - } - - if (isset($t)) { - throw $t; - } - } - - /** - * @param non-empty-string $methodName - */ - private function methodDoesNotExistOrIsDeclaredInTestCase(string $methodName): bool - { - $reflector = new ReflectionObject($this); - - return !$reflector->hasMethod($methodName) || - $reflector->getMethod($methodName)->getDeclaringClass()->getName() === self::class; - } - - /** - * @throws ExpectationFailedException - */ - private function verifyExceptionExpectations(\Exception|Throwable $exception): void - { - if ($this->expectedException !== null) { - $this->assertThat( - $exception, - new ExceptionConstraint( - $this->expectedException, - ), - ); - } - - if ($this->expectedExceptionMessage !== null) { - $this->assertThat( - $exception->getMessage(), - new ExceptionMessageIsOrContains( - $this->expectedExceptionMessage, - ), - ); - } - - if ($this->expectedExceptionMessageRegExp !== null) { - $this->assertThat( - $exception->getMessage(), - new ExceptionMessageMatchesRegularExpression( - $this->expectedExceptionMessageRegExp, - ), - ); - } - - if ($this->expectedExceptionCode !== null) { - $this->assertThat( - $exception->getCode(), - new ExceptionCode( - $this->expectedExceptionCode, - ), - ); - } - } - - /** - * @throws AssertionFailedError - */ - private function expectedExceptionWasNotRaised(): void - { - if ($this->expectedException !== null) { - $this->assertThat( - null, - new ExceptionConstraint($this->expectedException), - ); - } elseif ($this->expectedExceptionMessage !== null) { - $this->numberOfAssertionsPerformed++; - - throw new AssertionFailedError( - sprintf( - 'Failed asserting that exception with message "%s" is thrown', - $this->expectedExceptionMessage, - ), - ); - } elseif ($this->expectedExceptionMessageRegExp !== null) { - $this->numberOfAssertionsPerformed++; - - throw new AssertionFailedError( - sprintf( - 'Failed asserting that exception with message matching "%s" is thrown', - $this->expectedExceptionMessageRegExp, - ), - ); - } elseif ($this->expectedExceptionCode !== null) { - $this->numberOfAssertionsPerformed++; - - throw new AssertionFailedError( - sprintf( - 'Failed asserting that exception with code "%s" is thrown', - $this->expectedExceptionCode, - ), - ); - } - } - - private function isRegisteredFailure(Throwable $t): bool - { - foreach (array_keys($this->failureTypes) as $failureType) { - if ($t instanceof $failureType) { - return true; - } - } - - return false; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - private function hasExpectationOnOutput(): bool - { - return is_string($this->outputExpectedString) || is_string($this->outputExpectedRegex); - } - - private function requirementsNotSatisfied(): bool - { - return (new Requirements)->requirementsNotSatisfiedFor(static::class, $this->methodName) !== []; - } - - private function requiresXdebug(): bool - { - return (new Requirements)->requiresXdebug(static::class, $this->methodName); - } - - /** - * @see https://github.com/sebastianbergmann/phpunit/issues/6095 - */ - private function handleExceptionFromInvokedCountMockObjectRule(Throwable $t): void - { - if (!$t instanceof ExpectationFailedException) { - return; - } - - $trace = $t->getTrace(); - - if (isset($trace[0]['class']) && $trace[0]['class'] === InvokedCount::class) { - $this->numberOfAssertionsPerformed++; - } - } - - private function startErrorLogCapture(): void - { - if (ini_get('display_errors') === '0') { - ShutdownHandler::setMessage( - 'Fatal error: Premature end of PHPUnit\'s PHP process. Use display_errors=On to see the error message.', - ); - } - - $errorLogCapture = tmpfile(); - - if ($errorLogCapture === false) { - return; - } - - $capturePath = stream_get_meta_data($errorLogCapture)['uri']; - - if (!@is_writable($capturePath)) { - return; - } - - $this->errorLogCapture = $errorLogCapture; - $this->previousErrorLogTarget = ini_set('error_log', $capturePath); - } - - /** - * @throws ErrorLogNotWritableException - */ - private function verifyErrorLogExpectation(): void - { - if ($this->errorLogCapture === false) { - if ($this->expectErrorLog) { - throw new ErrorLogNotWritableException; - } - - return; - } - - $errorLogOutput = stream_get_contents($this->errorLogCapture); - - if ($this->expectErrorLog) { - $this->assertNotEmpty($errorLogOutput, 'error_log() was not called'); - - return; - } - - if ($errorLogOutput === false) { - return; - } - - print $this->stripDateFromErrorLog($errorLogOutput); - } - - private function handleErrorLogError(): void - { - if ($this->errorLogCapture === false) { - return; - } - - if ($this->expectErrorLog) { - return; - } - - $errorLogOutput = stream_get_contents($this->errorLogCapture); - - if ($errorLogOutput !== false) { - print $this->stripDateFromErrorLog($errorLogOutput); - } - } - - private function stopErrorLogCapture(): void - { - if ($this->errorLogCapture === false) { - return; - } - - ShutdownHandler::resetMessage(); - - fclose($this->errorLogCapture); - - $this->errorLogCapture = false; - - if ($this->previousErrorLogTarget === false) { - return; - } - - ini_set('error_log', $this->previousErrorLogTarget); - - $this->previousErrorLogTarget = false; - } - - /** - * Creates a test stub for the specified interface or class. - * - * @template RealInstanceType of object - * - * @param class-string $type - * - * @throws InvalidArgumentException - * @throws MockObjectException - * @throws NoPreviousThrowableException - * - * @return RealInstanceType&Stub - */ - final protected static function createStub(string $type): Stub - { - $stub = (new MockGenerator)->testDouble( - $type, - false, - callOriginalConstructor: false, - callOriginalClone: false, - returnValueGeneration: self::generateReturnValuesForTestDoubles(), - ); - - Event\Facade::emitter()->testCreatedStub($type); - - assert($stub instanceof $type); - assert($stub instanceof Stub); - - return $stub; - } - - /** - * @param list $interfaces - * - * @throws MockObjectException - */ - final protected static function createStubForIntersectionOfInterfaces(array $interfaces): Stub - { - $stub = (new MockGenerator)->testDoubleForInterfaceIntersection( - $interfaces, - false, - returnValueGeneration: self::generateReturnValuesForTestDoubles(), - ); - - Event\Facade::emitter()->testCreatedStubForIntersectionOfInterfaces($interfaces); - - return $stub; - } - - /** - * Creates (and configures) a test stub for the specified interface or class. - * - * @template RealInstanceType of object - * - * @param class-string $type - * @param array $configuration - * - * @throws InvalidArgumentException - * @throws MockObjectException - * @throws NoPreviousThrowableException - * - * @return RealInstanceType&Stub - */ - final protected static function createConfiguredStub(string $type, array $configuration): Stub - { - $o = self::createStub($type); - - foreach ($configuration as $method => $return) { - $o->method($method)->willReturn($return); - } - - return $o; - } - - private static function generateReturnValuesForTestDoubles(): bool - { - return MetadataRegistry::parser()->forClass(static::class)->isDisableReturnValueGenerationForTestDoubles()->isEmpty(); - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/ChildProcessResultProcessor.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/ChildProcessResultProcessor.php deleted file mode 100644 index af487c19..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/ChildProcessResultProcessor.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function assert; -use function trim; -use function unserialize; -use PHPUnit\Event\Code\TestMethodBuilder; -use PHPUnit\Event\Code\ThrowableBuilder; -use PHPUnit\Event\Emitter; -use PHPUnit\Event\Facade; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\TestRunner\TestResult\PassedTests; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessResultProcessor -{ - private Facade $eventFacade; - private Emitter $emitter; - private PassedTests $passedTests; - private CodeCoverage $codeCoverage; - - public function __construct(Facade $eventFacade, Emitter $emitter, PassedTests $passedTests, CodeCoverage $codeCoverage) - { - $this->eventFacade = $eventFacade; - $this->emitter = $emitter; - $this->passedTests = $passedTests; - $this->codeCoverage = $codeCoverage; - } - - public function process(Test $test, string $serializedProcessResult, string $stderr): void - { - if ($stderr !== '') { - $exception = new Exception(trim($stderr)); - - assert($test instanceof TestCase); - - $this->emitter->testErrored( - TestMethodBuilder::fromTestCase($test), - ThrowableBuilder::from($exception), - ); - - return; - } - - $childResult = @unserialize($serializedProcessResult); - - if ($childResult === false) { - $this->emitter->childProcessErrored(); - - $exception = new AssertionFailedError('Test was run in child process and ended unexpectedly'); - - assert($test instanceof TestCase); - - $this->emitter->testErrored( - TestMethodBuilder::fromTestCase($test), - ThrowableBuilder::from($exception), - ); - - $this->emitter->testFinished( - TestMethodBuilder::fromTestCase($test), - 0, - ); - - return; - } - - $this->eventFacade->forward($childResult->events); - $this->passedTests->import($childResult->passedTests); - - assert($test instanceof TestCase); - - $test->setResult($childResult->testResult); - $test->addToAssertionCount($childResult->numAssertions); - - if (!$this->codeCoverage->isActive()) { - return; - } - - // @codeCoverageIgnoreStart - if (!$childResult->codeCoverage instanceof \SebastianBergmann\CodeCoverage\CodeCoverage) { - return; - } - - CodeCoverage::instance()->codeCoverage()->merge( - $childResult->codeCoverage, - ); - // @codeCoverageIgnoreEnd - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunner.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunner.php deleted file mode 100644 index e7c5104d..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunner.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface IsolatedTestRunner -{ - public function run(TestCase $test, bool $runEntireClass, bool $preserveGlobalState, bool $requiresXdebug): void; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunnerRegistry.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunnerRegistry.php deleted file mode 100644 index f2a54150..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/IsolatedTestRunnerRegistry.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IsolatedTestRunnerRegistry -{ - private static ?IsolatedTestRunner $runner = null; - - public static function run(TestCase $test, bool $runEntireClass, bool $preserveGlobalState, bool $requiresXdebug): void - { - if (self::$runner === null) { - self::$runner = new SeparateProcessTestRunner; - } - - self::$runner->run($test, $runEntireClass, $preserveGlobalState, $requiresXdebug); - } - - public static function set(IsolatedTestRunner $runner): void - { - self::$runner = $runner; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php deleted file mode 100644 index 15bdcd94..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function assert; -use function defined; -use function get_include_path; -use function hrtime; -use function serialize; -use function sys_get_temp_dir; -use function tempnam; -use function unlink; -use function unserialize; -use function var_export; -use PHPUnit\Event\NoPreviousThrowableException; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use PHPUnit\Util\GlobalState; -use PHPUnit\Util\PHP\Job; -use PHPUnit\Util\PHP\JobRunnerRegistry; -use ReflectionClass; -use SebastianBergmann\Template\InvalidArgumentException; -use SebastianBergmann\Template\Template; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SeparateProcessTestRunner implements IsolatedTestRunner -{ - /** - * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\Util\Exception - * @throws Exception - * @throws InvalidArgumentException - * @throws NoPreviousThrowableException - * @throws ProcessIsolationException - */ - public function run(TestCase $test, bool $runEntireClass, bool $preserveGlobalState, bool $requiresXdebug): void - { - $class = new ReflectionClass($test); - - if ($runEntireClass) { - $template = new Template( - __DIR__ . '/templates/class.tpl', - ); - } else { - $template = new Template( - __DIR__ . '/templates/method.tpl', - ); - } - - $bootstrap = ''; - $constants = ''; - $globals = ''; - $includedFiles = ''; - $iniSettings = ''; - - if (ConfigurationRegistry::get()->hasBootstrap()) { - $bootstrap = ConfigurationRegistry::get()->bootstrap(); - } - - if ($preserveGlobalState) { - $constants = GlobalState::getConstantsAsString(); - $globals = GlobalState::getGlobalsAsString(); - $includedFiles = GlobalState::getIncludedFilesAsString(); - $iniSettings = GlobalState::getIniSettingsAsString(); - } - - $coverage = CodeCoverage::instance()->isActive() ? 'true' : 'false'; - - if (defined('PHPUNIT_COMPOSER_INSTALL')) { - $composerAutoload = var_export(PHPUNIT_COMPOSER_INSTALL, true); - } else { - $composerAutoload = '\'\''; - } - - if (defined('__PHPUNIT_PHAR__')) { - $phar = var_export(__PHPUNIT_PHAR__, true); - } else { - $phar = '\'\''; - } - - $data = var_export(serialize($test->providedData()), true); - $dataName = var_export($test->dataName(), true); - $dependencyInput = var_export(serialize($test->dependencyInput()), true); - $includePath = var_export(get_include_path(), true); - // must do these fixes because TestCaseMethod.tpl has unserialize('{data}') in it, and we can't break BC - // the lines above used to use addcslashes() rather than var_export(), which breaks null byte escape sequences - $data = "'." . $data . ".'"; - $dataName = "'.(" . $dataName . ").'"; - $dependencyInput = "'." . $dependencyInput . ".'"; - $includePath = "'." . $includePath . ".'"; - $offset = hrtime(); - $serializedConfiguration = $this->saveConfigurationForChildProcess(); - $processResultFile = tempnam(sys_get_temp_dir(), 'phpunit_'); - - $file = $class->getFileName(); - - assert($file !== false); - - $var = [ - 'bootstrap' => $bootstrap, - 'composerAutoload' => $composerAutoload, - 'phar' => $phar, - 'filename' => $file, - 'className' => $class->getName(), - 'collectCodeCoverageInformation' => $coverage, - 'data' => $data, - 'dataName' => $dataName, - 'dependencyInput' => $dependencyInput, - 'constants' => $constants, - 'globals' => $globals, - 'include_path' => $includePath, - 'included_files' => $includedFiles, - 'iniSettings' => $iniSettings, - 'name' => $test->name(), - 'offsetSeconds' => (string) $offset[0], - 'offsetNanoseconds' => (string) $offset[1], - 'serializedConfiguration' => $serializedConfiguration, - 'processResultFile' => $processResultFile, - ]; - - if (!$runEntireClass) { - $var['methodName'] = $test->name(); - } - - $template->setVar($var); - - $code = $template->render(); - - assert($code !== ''); - - JobRunnerRegistry::runTestJob(new Job($code, requiresXdebug: $requiresXdebug), $processResultFile, $test); - - @unlink($serializedConfiguration); - } - - /** - * @throws ProcessIsolationException - */ - private function saveConfigurationForChildProcess(): string - { - $path = tempnam(sys_get_temp_dir(), 'phpunit_'); - - if ($path === false) { - throw new ProcessIsolationException; - } - - if (!ConfigurationRegistry::saveTo($path)) { - throw new ProcessIsolationException; - } - - return $path; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php deleted file mode 100644 index e6cf03f6..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php +++ /dev/null @@ -1,395 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use const PHP_EOL; -use function array_diff_assoc; -use function array_intersect; -use function array_unique; -use function assert; -use function extension_loaded; -use function sprintf; -use function xdebug_is_debugger_active; -use AssertionError; -use PHPUnit\Event\Facade; -use PHPUnit\Metadata\Api\CodeCoverage as CodeCoverageMetadataApi; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\Runner\ErrorHandler; -use PHPUnit\Runner\Exception; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use SebastianBergmann\CodeCoverage\Exception as CodeCoverageException; -use SebastianBergmann\CodeCoverage\InvalidArgumentException; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; -use SebastianBergmann\Invoker\Invoker; -use SebastianBergmann\Invoker\TimeoutException; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestRunner -{ - private ?bool $timeLimitCanBeEnforced = null; - private readonly Configuration $configuration; - - public function __construct() - { - $this->configuration = ConfigurationRegistry::get(); - } - - /** - * @throws Exception - * @throws InvalidArgumentException - * @throws UnintentionallyCoveredCodeException - */ - public function run(TestCase $test): void - { - Assert::resetCount(); - - $codeCoverageMetadataApi = new CodeCoverageMetadataApi; - - $coversTargets = $codeCoverageMetadataApi->coversTargets( - $test::class, - $test->name(), - ); - - $usesTargets = $codeCoverageMetadataApi->usesTargets( - $test::class, - $test->name(), - ); - - $shouldCodeCoverageBeCollected = $codeCoverageMetadataApi->shouldCodeCoverageBeCollectedFor($test); - - $this->performSanityChecks($test, $coversTargets, $usesTargets, $shouldCodeCoverageBeCollected); - - $error = false; - $failure = false; - $incomplete = false; - $risky = false; - $skipped = false; - - if ($this->shouldErrorHandlerBeUsed($test)) { - ErrorHandler::instance()->enable($test); - } - - $collectCodeCoverage = CodeCoverage::instance()->isActive() && - $shouldCodeCoverageBeCollected; - - if ($collectCodeCoverage) { - CodeCoverage::instance()->start($test); - } - - try { - if ($this->canTimeLimitBeEnforced() && - $this->shouldTimeLimitBeEnforced($test)) { - $risky = $this->runTestWithTimeout($test); - } else { - $test->runBare(); - } - } catch (AssertionFailedError $e) { - $failure = true; - - if ($e instanceof IncompleteTestError) { - $incomplete = true; - } elseif ($e instanceof SkippedTest) { - $skipped = true; - } - } catch (AssertionError $e) { - $test->addToAssertionCount(1); - - $failure = true; - $frame = $e->getTrace()[0]; - - assert(isset($frame['file'])); - assert(isset($frame['line'])); - - $e = new AssertionFailedError( - sprintf( - '%s in %s:%s', - $e->getMessage(), - $frame['file'], - $frame['line'], - ), - ); - } catch (Throwable $e) { - $error = true; - } - - $test->addToAssertionCount(Assert::getCount()); - - if ($this->configuration->reportUselessTests() && - !$test->doesNotPerformAssertions() && - $test->numberOfAssertionsPerformed() === 0) { - $risky = true; - } - - if (!$error && !$failure && !$incomplete && !$skipped && !$risky && - $this->configuration->requireCoverageMetadata() && - !$this->hasCoverageMetadata($test::class, $test->name())) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - 'This test does not define a code coverage target but is expected to do so', - ); - - $risky = true; - } - - if ($collectCodeCoverage) { - $append = !$risky && !$incomplete && !$skipped; - - if (!$append) { - $coversTargets = false; - $usesTargets = null; - } - - try { - CodeCoverage::instance()->stop( - $append, - $coversTargets, - $usesTargets, - ); - } catch (UnintentionallyCoveredCodeException $cce) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - 'This test executed code that is not listed as code to be covered or used:' . - PHP_EOL . - $cce->getMessage(), - ); - } catch (CodeCoverageException $cce) { - $error = true; - - $e = $e ?? $cce; - } - } - - ErrorHandler::instance()->disable(); - - if (!$error && - !$incomplete && - !$skipped && - $this->configuration->reportUselessTests() && - !$test->doesNotPerformAssertions() && - $test->numberOfAssertionsPerformed() === 0) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - 'This test did not perform any assertions', - ); - } - - if ($test->doesNotPerformAssertions() && - $test->numberOfAssertionsPerformed() > 0) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - sprintf( - 'This test is not expected to perform assertions but performed %d assertion%s', - $test->numberOfAssertionsPerformed(), - $test->numberOfAssertionsPerformed() > 1 ? 's' : '', - ), - ); - } - - if ($test->hasUnexpectedOutput()) { - Facade::emitter()->testPrintedUnexpectedOutput($test->output()); - } - - if ($this->configuration->disallowTestOutput() && $test->hasUnexpectedOutput()) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - sprintf( - 'Test code or tested code printed unexpected output: %s', - $test->output(), - ), - ); - } - - if ($test->wasPrepared()) { - Facade::emitter()->testFinished( - $test->valueObjectForEvents(), - $test->numberOfAssertionsPerformed(), - ); - } - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - private function hasCoverageMetadata(string $className, string $methodName): bool - { - foreach (MetadataRegistry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversNamespace()) { - return true; - } - - if ($metadata->isCoversTrait()) { - return true; - } - - if ($metadata->isCoversClass()) { - return true; - } - - if ($metadata->isCoversClassesThatExtendClass()) { - return true; - } - - if ($metadata->isCoversClassesThatImplementInterface()) { - return true; - } - - if ($metadata->isCoversMethod()) { - return true; - } - - if ($metadata->isCoversFunction()) { - return true; - } - - if ($metadata->isCoversNothing()) { - return true; - } - } - - return false; - } - - private function canTimeLimitBeEnforced(): bool - { - if ($this->timeLimitCanBeEnforced !== null) { - return $this->timeLimitCanBeEnforced; - } - - $this->timeLimitCanBeEnforced = (new Invoker)->canInvokeWithTimeout(); - - return $this->timeLimitCanBeEnforced; - } - - private function shouldTimeLimitBeEnforced(TestCase $test): bool - { - if (!$this->configuration->enforceTimeLimit()) { - return false; - } - - if (!(($this->configuration->defaultTimeLimit() > 0 || $test->size()->isKnown()))) { - return false; - } - - if (extension_loaded('xdebug') && xdebug_is_debugger_active()) { - return false; - } - - return true; - } - - /** - * @throws Throwable - */ - private function runTestWithTimeout(TestCase $test): bool - { - $_timeout = $this->configuration->defaultTimeLimit(); - $testSize = $test->size(); - - if ($testSize->isSmall()) { - $_timeout = $this->configuration->timeoutForSmallTests(); - } elseif ($testSize->isMedium()) { - $_timeout = $this->configuration->timeoutForMediumTests(); - } elseif ($testSize->isLarge()) { - $_timeout = $this->configuration->timeoutForLargeTests(); - } - - try { - (new Invoker)->invoke([$test, 'runBare'], [], $_timeout); - } catch (TimeoutException) { - Facade::emitter()->testConsideredRisky( - $test->valueObjectForEvents(), - sprintf( - 'This test was aborted after %d second%s', - $_timeout, - $_timeout !== 1 ? 's' : '', - ), - ); - - return true; - } - - return false; - } - - private function shouldErrorHandlerBeUsed(TestCase $test): bool - { - if (MetadataRegistry::parser()->forMethod($test::class, $test->name())->isWithoutErrorHandler()->isNotEmpty()) { - return false; - } - - return true; - } - - private function performSanityChecks(TestCase $test, TargetCollection $coversTargets, TargetCollection $usesTargets, bool $shouldCodeCoverageBeCollected): void - { - if (!$shouldCodeCoverageBeCollected) { - if ($coversTargets->isNotEmpty() || $usesTargets->isNotEmpty()) { - Facade::emitter()->testTriggeredPhpunitWarning( - $test->valueObjectForEvents(), - '#[Covers*] and #[Uses*] attributes do not have an effect when the #[CoversNothing] attribute is used', - ); - } - } - - $coversAsString = []; - $usesAsString = []; - - foreach ($coversTargets as $coversTarget) { - $coversAsString[] = $coversTarget->description(); - } - - foreach ($usesTargets as $usesTarget) { - $usesAsString[] = $usesTarget->description(); - } - - $coversDuplicates = array_unique(array_diff_assoc($coversAsString, array_unique($coversAsString))); - $usesDuplicates = array_unique(array_diff_assoc($usesAsString, array_unique($usesAsString))); - $coversAndUses = array_intersect($coversAsString, $usesAsString); - - foreach ($coversDuplicates as $target) { - Facade::emitter()->testTriggeredPhpunitWarning( - $test->valueObjectForEvents(), - sprintf( - '%s is targeted multiple times by the same "Covers" attribute', - $target, - ), - ); - } - - foreach ($usesDuplicates as $target) { - Facade::emitter()->testTriggeredPhpunitWarning( - $test->valueObjectForEvents(), - sprintf( - '%s is targeted multiple times by the same "Uses" attribute', - $target, - ), - ); - } - - foreach ($coversAndUses as $target) { - Facade::emitter()->testTriggeredPhpunitWarning( - $test->valueObjectForEvents(), - sprintf( - '%s is targeted by both "Covers" and "Uses" attributes', - $target, - ), - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl deleted file mode 100644 index 5edd7ee2..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl +++ /dev/null @@ -1,137 +0,0 @@ -initForIsolation( - PHPUnit\Event\Telemetry\HRTime::fromSecondsAndNanoseconds( - {offsetSeconds}, - {offsetNanoseconds} - ), - ); - - require_once '{filename}'; - - $configuration = ConfigurationRegistry::get(); - - if ({collectCodeCoverageInformation}) { - CodeCoverage::instance()->init($configuration, CodeCoverageFilterRegistry::instance(), true); - } - - $deprecationTriggers = [ - 'functions' => [], - 'methods' => [], - ]; - - foreach ($configuration->source()->deprecationTriggers()['functions'] as $function) { - $deprecationTriggers['functions'][] = $function; - } - - foreach ($configuration->source()->deprecationTriggers()['methods'] as $method) { - [$className, $methodName] = explode('::', $method); - - $deprecationTriggers['methods'][] = [ - 'className' => $className, - 'methodName' => $methodName, - ]; - } - - ErrorHandler::instance()->useDeprecationTriggers($deprecationTriggers); - - $test = new {className}('{name}'); - - $test->setData('{dataName}', unserialize('{data}')); - $test->setDependencyInput(unserialize('{dependencyInput}')); - $test->setInIsolation(true); - - ob_end_clean(); - - $test->run(); - - $output = ''; - - if (!$test->expectsOutput()) { - $output = $test->output(); - } - - ini_set('xdebug.scream', '0'); - - // Not every STDOUT target stream is rewindable - @rewind(STDOUT); - - if ($stdout = @stream_get_contents(STDOUT)) { - $output = $stdout . $output; - $streamMetaData = stream_get_meta_data(STDOUT); - - if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) { - @ftruncate(STDOUT, 0); - @rewind(STDOUT); - } - } - - file_put_contents( - '{processResultFile}', - serialize( - (object)[ - 'testResult' => $test->result(), - 'codeCoverage' => {collectCodeCoverageInformation} ? CodeCoverage::instance()->codeCoverage() : null, - 'numAssertions' => $test->numberOfAssertionsPerformed(), - 'output' => $output, - 'events' => $dispatcher->flush(), - 'passedTests' => PassedTests::instance() - ] - ) - ); -} - -function __phpunit_error_handler($errno, $errstr, $errfile, $errline) -{ - return true; -} - -set_error_handler('__phpunit_error_handler'); - -{constants} -{included_files} -{globals} - -restore_error_handler(); - -ConfigurationRegistry::loadFrom('{serializedConfiguration}'); -(new PhpHandler)->handle(ConfigurationRegistry::get()->php()); - -if ('{bootstrap}' !== '') { - require_once '{bootstrap}'; -} - -__phpunit_run_isolated_test(); diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl deleted file mode 100644 index 8d4f3843..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl +++ /dev/null @@ -1,137 +0,0 @@ -initForIsolation( - PHPUnit\Event\Telemetry\HRTime::fromSecondsAndNanoseconds( - {offsetSeconds}, - {offsetNanoseconds} - ), - ); - - require_once '{filename}'; - - $configuration = ConfigurationRegistry::get(); - - if ({collectCodeCoverageInformation}) { - CodeCoverage::instance()->init($configuration, CodeCoverageFilterRegistry::instance(), true); - } - - $deprecationTriggers = [ - 'functions' => [], - 'methods' => [], - ]; - - foreach ($configuration->source()->deprecationTriggers()['functions'] as $function) { - $deprecationTriggers['functions'][] = $function; - } - - foreach ($configuration->source()->deprecationTriggers()['methods'] as $method) { - [$className, $methodName] = explode('::', $method); - - $deprecationTriggers['methods'][] = [ - 'className' => $className, - 'methodName' => $methodName, - ]; - } - - ErrorHandler::instance()->useDeprecationTriggers($deprecationTriggers); - - $test = new {className}('{methodName}'); - - $test->setData('{dataName}', unserialize('{data}')); - $test->setDependencyInput(unserialize('{dependencyInput}')); - $test->setInIsolation(true); - - ob_end_clean(); - - $test->run(); - - $output = ''; - - if (!$test->expectsOutput()) { - $output = $test->output(); - } - - ini_set('xdebug.scream', '0'); - - // Not every STDOUT target stream is rewindable - @rewind(STDOUT); - - if ($stdout = @stream_get_contents(STDOUT)) { - $output = $stdout . $output; - $streamMetaData = stream_get_meta_data(STDOUT); - - if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) { - @ftruncate(STDOUT, 0); - @rewind(STDOUT); - } - } - - file_put_contents( - '{processResultFile}', - serialize( - (object)[ - 'testResult' => $test->result(), - 'codeCoverage' => {collectCodeCoverageInformation} ? CodeCoverage::instance()->codeCoverage() : null, - 'numAssertions' => $test->numberOfAssertionsPerformed(), - 'output' => $output, - 'events' => $dispatcher->flush(), - 'passedTests' => PassedTests::instance() - ] - ) - ); -} - -function __phpunit_error_handler($errno, $errstr, $errfile, $errline) -{ - return true; -} - -set_error_handler('__phpunit_error_handler'); - -{constants} -{included_files} -{globals} - -restore_error_handler(); - -ConfigurationRegistry::loadFrom('{serializedConfiguration}'); -(new PhpHandler)->handle(ConfigurationRegistry::get()->php()); - -if ('{bootstrap}' !== '') { - require_once '{bootstrap}'; -} - -__phpunit_run_isolated_test(); diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/Known.php b/vendor/phpunit/phpunit/src/Framework/TestSize/Known.php deleted file mode 100644 index a61a05a0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/Known.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -abstract readonly class Known extends TestSize -{ - public function isKnown(): true - { - return true; - } - - abstract public function isGreaterThan(self $other): bool; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/Large.php b/vendor/phpunit/phpunit/src/Framework/TestSize/Large.php deleted file mode 100644 index 71a254ed..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/Large.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Large extends Known -{ - public function isLarge(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return !$other->isLarge(); - } - - public function asString(): string - { - return 'large'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/Medium.php b/vendor/phpunit/phpunit/src/Framework/TestSize/Medium.php deleted file mode 100644 index beb57446..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/Medium.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Medium extends Known -{ - public function isMedium(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return $other->isSmall(); - } - - public function asString(): string - { - return 'medium'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/Small.php b/vendor/phpunit/phpunit/src/Framework/TestSize/Small.php deleted file mode 100644 index 76bdec64..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/Small.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Small extends Known -{ - public function isSmall(): true - { - return true; - } - - public function isGreaterThan(TestSize $other): bool - { - return false; - } - - public function asString(): string - { - return 'small'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/TestSize.php b/vendor/phpunit/phpunit/src/Framework/TestSize/TestSize.php deleted file mode 100644 index c341d8b9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/TestSize.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -abstract readonly class TestSize -{ - public static function unknown(): self - { - return new Unknown; - } - - public static function small(): self - { - return new Small; - } - - public static function medium(): self - { - return new Medium; - } - - public static function large(): self - { - return new Large; - } - - /** - * @phpstan-assert-if-true Known $this - */ - public function isKnown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Unknown $this - */ - public function isUnknown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Small $this - */ - public function isSmall(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Medium $this - */ - public function isMedium(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Large $this - */ - public function isLarge(): bool - { - return false; - } - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSize/Unknown.php b/vendor/phpunit/phpunit/src/Framework/TestSize/Unknown.php deleted file mode 100644 index daf1e7d3..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSize/Unknown.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestSize; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Unknown extends TestSize -{ - public function isUnknown(): true - { - return true; - } - - public function asString(): string - { - return 'unknown'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php deleted file mode 100644 index 0bc4957c..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Deprecation extends Known -{ - public function isDeprecation(): true - { - return true; - } - - public function asInt(): int - { - return 4; - } - - public function asString(): string - { - return 'deprecation'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php deleted file mode 100644 index 35e368e8..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Error extends Known -{ - public function isError(): true - { - return true; - } - - public function asInt(): int - { - return 8; - } - - public function asString(): string - { - return 'error'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php deleted file mode 100644 index ec5996c9..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Failure extends Known -{ - public function isFailure(): true - { - return true; - } - - public function asInt(): int - { - return 7; - } - - public function asString(): string - { - return 'failure'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php deleted file mode 100644 index 92f86fba..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Incomplete extends Known -{ - public function isIncomplete(): true - { - return true; - } - - public function asInt(): int - { - return 2; - } - - public function asString(): string - { - return 'incomplete'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php deleted file mode 100644 index 4d9e5e8b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Known extends TestStatus -{ - public function isKnown(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php deleted file mode 100644 index be9bd4c0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Notice extends Known -{ - public function isNotice(): true - { - return true; - } - - public function asInt(): int - { - return 3; - } - - public function asString(): string - { - return 'notice'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php deleted file mode 100644 index 63bde297..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Risky extends Known -{ - public function isRisky(): true - { - return true; - } - - public function asInt(): int - { - return 5; - } - - public function asString(): string - { - return 'risky'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php deleted file mode 100644 index 9539e9e0..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Skipped extends Known -{ - public function isSkipped(): true - { - return true; - } - - public function asInt(): int - { - return 1; - } - - public function asString(): string - { - return 'skipped'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php deleted file mode 100644 index 78915051..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Success extends Known -{ - public function isSuccess(): true - { - return true; - } - - public function asInt(): int - { - return 0; - } - - public function asString(): string - { - return 'success'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php deleted file mode 100644 index 81870826..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class TestStatus -{ - private string $message; - - public static function from(int $status): self - { - return match ($status) { - 0 => self::success(), - 1 => self::skipped(), - 2 => self::incomplete(), - 3 => self::notice(), - 4 => self::deprecation(), - 5 => self::risky(), - 6 => self::warning(), - 7 => self::failure(), - 8 => self::error(), - default => self::unknown(), - }; - } - - public static function unknown(): self - { - return new Unknown; - } - - public static function success(): self - { - return new Success; - } - - public static function skipped(string $message = ''): self - { - return new Skipped($message); - } - - public static function incomplete(string $message = ''): self - { - return new Incomplete($message); - } - - public static function notice(string $message = ''): self - { - return new Notice($message); - } - - public static function deprecation(string $message = ''): self - { - return new Deprecation($message); - } - - public static function failure(string $message = ''): self - { - return new Failure($message); - } - - public static function error(string $message = ''): self - { - return new Error($message); - } - - public static function warning(string $message = ''): self - { - return new Warning($message); - } - - public static function risky(string $message = ''): self - { - return new Risky($message); - } - - private function __construct(string $message = '') - { - $this->message = $message; - } - - /** - * @phpstan-assert-if-true Known $this - */ - public function isKnown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Unknown $this - */ - public function isUnknown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Success $this - */ - public function isSuccess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Skipped $this - */ - public function isSkipped(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Incomplete $this - */ - public function isIncomplete(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Notice $this - */ - public function isNotice(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Deprecation $this - */ - public function isDeprecation(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Failure $this - */ - public function isFailure(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Error $this - */ - public function isError(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Warning $this - */ - public function isWarning(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Risky $this - */ - public function isRisky(): bool - { - return false; - } - - public function message(): string - { - return $this->message; - } - - public function isMoreImportantThan(self $other): bool - { - return $this->asInt() > $other->asInt(); - } - - abstract public function asInt(): int; - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php deleted file mode 100644 index a5c1309b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Unknown extends TestStatus -{ - public function isUnknown(): true - { - return true; - } - - public function asInt(): int - { - return -1; - } - - public function asString(): string - { - return 'unknown'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php deleted file mode 100644 index c091262b..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Warning extends Known -{ - public function isWarning(): true - { - return true; - } - - public function asInt(): int - { - return 6; - } - - public function asString(): string - { - return 'warning'; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php deleted file mode 100644 index acf9e2b7..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ /dev/null @@ -1,758 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use const PHP_EOL; -use function array_merge; -use function array_pop; -use function array_reverse; -use function assert; -use function call_user_func; -use function class_exists; -use function count; -use function implode; -use function is_callable; -use function is_file; -use function is_subclass_of; -use function sprintf; -use function str_ends_with; -use function str_starts_with; -use function trim; -use Iterator; -use IteratorAggregate; -use PHPUnit\Event; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\NoPreviousThrowableException; -use PHPUnit\Metadata\Api\Dependencies; -use PHPUnit\Metadata\Api\Groups; -use PHPUnit\Metadata\Api\HookMethods; -use PHPUnit\Metadata\Api\Requirements; -use PHPUnit\Metadata\MetadataCollection; -use PHPUnit\Runner\Exception as RunnerException; -use PHPUnit\Runner\Filter\Factory; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use PHPUnit\Runner\TestSuiteLoader; -use PHPUnit\TestRunner\TestResult\Facade as TestResultFacade; -use PHPUnit\Util\Filter; -use PHPUnit\Util\Reflection; -use PHPUnit\Util\Test as TestUtil; -use ReflectionClass; -use ReflectionMethod; -use SebastianBergmann\CodeCoverage\InvalidArgumentException; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; -use Throwable; - -/** - * @template-implements IteratorAggregate - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -class TestSuite implements IteratorAggregate, Reorderable, Test -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var array> - */ - private array $groups = []; - - /** - * @var ?list - */ - private ?array $requiredTests = null; - - /** - * @var list - */ - private array $tests = []; - - /** - * @var ?list - */ - private ?array $providedTests = null; - private ?Factory $iteratorFilter = null; - private bool $wasRun = false; - - /** - * @param non-empty-string $name - */ - public static function empty(string $name): static - { - return new static($name); - } - - /** - * @param ReflectionClass $class - * @param list $groups - */ - public static function fromClassReflector(ReflectionClass $class, array $groups = []): static - { - $testSuite = new static($class->getName()); - - foreach (Reflection::publicMethodsDeclaredDirectlyInTestClass($class) as $method) { - if (!TestUtil::isTestMethod($method)) { - continue; - } - - if ((new HookMethods)->isHookMethod($method)) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Method %s::%s() cannot be used both as a hook method and as a test method', - $class->getName(), - $method->getName(), - ), - ); - - continue; - } - - $testSuite->addTestMethod($class, $method, $groups); - } - - if ($testSuite->isEmpty()) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'No tests found in class "%s".', - $class->getName(), - ), - ); - } - - return $testSuite; - } - - /** - * @param non-empty-string $name - */ - final private function __construct(string $name) - { - $this->name = $name; - } - - /** - * Adds a test to the suite. - * - * @param list $groups - */ - public function addTest(Test $test, array $groups = []): void - { - if ($test instanceof self) { - $this->tests[] = $test; - - $this->clearCaches(); - - return; - } - - assert($test instanceof TestCase || $test instanceof PhptTestCase); - - $this->tests[] = $test; - - $this->clearCaches(); - - if ($this->containsOnlyVirtualGroups($groups)) { - $groups[] = 'default'; - } - - if ($test instanceof TestCase) { - $id = $test->valueObjectForEvents()->id(); - - $test->setGroups($groups); - } else { - $id = $test->valueObjectForEvents()->id(); - } - - foreach ($groups as $group) { - if (!isset($this->groups[$group])) { - $this->groups[$group] = [$id]; - } else { - $this->groups[$group][] = $id; - } - } - } - - /** - * Adds the tests from the given class to the suite. - * - * @param ReflectionClass $testClass - * @param list $groups - * - * @throws Exception - */ - public function addTestSuite(ReflectionClass $testClass, array $groups = []): void - { - if ($testClass->isAbstract()) { - throw new Exception( - sprintf( - 'Class %s is abstract', - $testClass->getName(), - ), - ); - } - - if (!$testClass->isSubclassOf(TestCase::class)) { - throw new Exception( - sprintf( - 'Class %s is not a subclass of %s', - $testClass->getName(), - TestCase::class, - ), - ); - } - - $this->addTest(self::fromClassReflector($testClass, $groups), $groups); - } - - /** - * Wraps both addTest() and addTestSuite - * as well as the separate import statements for the user's convenience. - * - * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit\Framework\WarningTestCase will be created instead, - * leaving the current test run untouched. - * - * @param list $groups - * - * @throws Exception - */ - public function addTestFile(string $filename, array $groups = []): void - { - try { - if (str_ends_with($filename, '.phpt') && is_file($filename)) { - $this->addTest(new PhptTestCase($filename)); - } else { - $this->addTestSuite( - (new TestSuiteLoader)->load($filename), - $groups, - ); - } - } catch (RunnerException $e) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - $e->getMessage(), - ); - } - } - - /** - * Wrapper for addTestFile() that adds multiple test files. - * - * @param iterable $fileNames - * - * @throws Exception - */ - public function addTestFiles(iterable $fileNames): void - { - foreach ($fileNames as $filename) { - $this->addTestFile((string) $filename); - } - } - - /** - * Counts the number of test cases that will be run by this test. - */ - public function count(): int - { - $numTests = 0; - - foreach ($this as $test) { - $numTests += count($test); - } - - return $numTests; - } - - public function isEmpty(): bool - { - foreach ($this as $test) { - if (count($test) !== 0) { - return false; - } - } - - return true; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return array> - */ - public function groups(): array - { - return $this->groups; - } - - /** - * @return list - */ - public function collect(): array - { - $tests = []; - - foreach ($this as $test) { - if ($test instanceof self) { - $tests = array_merge($tests, $test->collect()); - - continue; - } - - assert($test instanceof TestCase || $test instanceof PhptTestCase); - - $tests[] = $test; - } - - return $tests; - } - - /** - * @throws Event\RuntimeException - * @throws Exception - * @throws InvalidArgumentException - * @throws NoPreviousThrowableException - * @throws UnintentionallyCoveredCodeException - */ - public function run(): void - { - if ($this->wasRun) { - // @codeCoverageIgnoreStart - throw new Exception('The tests aggregated by this TestSuite were already run'); - // @codeCoverageIgnoreEnd - } - - $this->wasRun = true; - - if ($this->isEmpty()) { - return; - } - - $emitter = Event\Facade::emitter(); - $testSuiteValueObjectForEvents = Event\TestSuite\TestSuiteBuilder::from($this); - - $emitter->testSuiteStarted($testSuiteValueObjectForEvents); - - if (!$this->invokeMethodsBeforeFirstTest($emitter, $testSuiteValueObjectForEvents)) { - return; - } - - /** @var list $tests */ - $tests = []; - - foreach ($this as $test) { - $tests[] = $test; - } - - $tests = array_reverse($tests); - - $this->tests = []; - $this->groups = []; - - while (($test = array_pop($tests)) !== null) { - if (TestResultFacade::shouldStop()) { - $emitter->testRunnerExecutionAborted(); - - break; - } - - $test->run(); - } - - $this->invokeMethodsAfterLastTest($emitter); - - $emitter->testSuiteFinished($testSuiteValueObjectForEvents); - } - - /** - * Returns the tests as an enumeration. - * - * @return list - */ - public function tests(): array - { - return $this->tests; - } - - /** - * Set tests of the test suite. - * - * @param list $tests - */ - public function setTests(array $tests): void - { - $this->tests = $tests; - } - - /** - * Mark the test suite as skipped. - * - * @throws SkippedTestSuiteError - */ - public function markTestSuiteSkipped(string $message = ''): never - { - throw new SkippedTestSuiteError($message); - } - - /** - * Returns an iterator for this test suite. - */ - public function getIterator(): Iterator - { - $iterator = new TestSuiteIterator($this); - - if ($this->iteratorFilter !== null) { - $iterator = $this->iteratorFilter->factory($iterator, $this); - } - - return $iterator; - } - - public function injectFilter(Factory $filter): void - { - $this->iteratorFilter = $filter; - - foreach ($this as $test) { - if ($test instanceof self) { - $test->injectFilter($filter); - } - } - } - - /** - * @return list - */ - public function provides(): array - { - if ($this->providedTests === null) { - $this->providedTests = []; - - if (is_callable($this->sortId(), true)) { - $this->providedTests[] = new ExecutionOrderDependency($this->sortId()); - } - - foreach ($this->tests as $test) { - if (!$test instanceof Reorderable) { - // @codeCoverageIgnoreStart - continue; - // @codeCoverageIgnoreEnd - } - - $this->providedTests = ExecutionOrderDependency::mergeUnique($this->providedTests, $test->provides()); - } - } - - return $this->providedTests; - } - - /** - * @return list - */ - public function requires(): array - { - if ($this->requiredTests === null) { - $this->requiredTests = []; - - foreach ($this->tests as $test) { - if (!$test instanceof Reorderable) { - // @codeCoverageIgnoreStart - continue; - // @codeCoverageIgnoreEnd - } - - $this->requiredTests = ExecutionOrderDependency::mergeUnique( - ExecutionOrderDependency::filterInvalid($this->requiredTests), - $test->requires(), - ); - } - - $this->requiredTests = ExecutionOrderDependency::diff($this->requiredTests, $this->provides()); - } - - return $this->requiredTests; - } - - public function sortId(): string - { - return $this->name() . '::class'; - } - - /** - * @phpstan-assert-if-true class-string $this->name - */ - public function isForTestClass(): bool - { - return class_exists($this->name, false) && is_subclass_of($this->name, TestCase::class); - } - - /** - * @param ReflectionClass $class - * @param list $groups - * - * @throws Exception - */ - protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method, array $groups): void - { - $className = $class->getName(); - $methodName = $method->getName(); - - try { - $test = (new TestBuilder)->build($class, $methodName, $groups); - } catch (InvalidDataProviderException $e) { - if ($e->getProviderLabel() === null) { - $message = sprintf( - "The data provider specified for %s::%s is invalid\n%s", - $className, - $methodName, - $this->exceptionToString($e), - ); - } else { - $message = sprintf( - "The data provider %s specified for %s::%s is invalid\n%s", - $e->getProviderLabel(), - $className, - $methodName, - $this->exceptionToString($e), - ); - } - - Event\Facade::emitter()->testTriggeredPhpunitError( - new TestMethod( - $className, - $methodName, - $class->getFileName(), - $method->getStartLine(), - Event\Code\TestDoxBuilder::fromClassNameAndMethodName( - $className, - $methodName, - ), - MetadataCollection::fromArray([]), - Event\TestData\TestDataCollection::fromArray([]), - ), - $message, - ); - - return; - } - - if ($test instanceof TestCase || $test instanceof DataProviderTestSuite) { - $test->setDependencies( - Dependencies::dependencies($class->getName(), $methodName), - ); - } - - $this->addTest( - $test, - array_merge( - $groups, - (new Groups)->groups($class->getName(), $methodName), - ), - ); - } - - private function clearCaches(): void - { - $this->providedTests = null; - $this->requiredTests = null; - } - - /** - * @param list $groups - */ - private function containsOnlyVirtualGroups(array $groups): bool - { - foreach ($groups as $group) { - if (!str_starts_with($group, '__phpunit_')) { - return false; - } - } - - return true; - } - - private function methodDoesNotExistOrIsDeclaredInTestCase(string $methodName): bool - { - $reflector = new ReflectionClass($this->name); - - return !$reflector->hasMethod($methodName) || - $reflector->getMethod($methodName)->getDeclaringClass()->getName() === TestCase::class; - } - - /** - * @throws Exception - */ - private function exceptionToString(InvalidDataProviderException $e): string - { - $message = $e->getMessage(); - - if (trim($message) === '') { - $message = ''; - } - - return sprintf( - "%s\n%s", - $message, - Filter::stackTraceFromThrowableAsString($e), - ); - } - - /** - * @throws Exception - * @throws NoPreviousThrowableException - */ - private function invokeMethodsBeforeFirstTest(Event\Emitter $emitter, Event\TestSuite\TestSuite $testSuiteValueObjectForEvents): bool - { - if (!$this->isForTestClass()) { - return true; - } - - $methods = (new HookMethods)->hookMethods($this->name)['beforeClass']->methodNamesSortedByPriority(); - $calledMethods = []; - $emitCalledEvent = true; - $result = true; - - foreach ($methods as $method) { - if ($this->methodDoesNotExistOrIsDeclaredInTestCase($method)) { - continue; - } - - $calledMethod = new Event\Code\ClassMethod( - $this->name, - $method, - ); - - try { - $missingRequirements = (new Requirements)->requirementsNotSatisfiedFor($this->name, $method); - - if ($missingRequirements !== []) { - $emitCalledEvent = false; - - $this->markTestSuiteSkipped(implode(PHP_EOL, $missingRequirements)); - } - - call_user_func([$this->name, $method]); - } catch (Throwable $t) { - } - - if ($emitCalledEvent) { - $emitter->beforeFirstTestMethodCalled( - $this->name, - $calledMethod, - ); - - $calledMethods[] = $calledMethod; - } - - if (isset($t) && $t instanceof SkippedTest) { - $emitter->testSuiteSkipped( - $testSuiteValueObjectForEvents, - $t->getMessage(), - ); - - return false; - } - - if (isset($t)) { - if ($t instanceof AssertionFailedError) { - $emitter->beforeFirstTestMethodFailed( - $this->name, - $calledMethod, - Event\Code\ThrowableBuilder::from($t), - ); - } else { - $emitter->beforeFirstTestMethodErrored( - $this->name, - $calledMethod, - Event\Code\ThrowableBuilder::from($t), - ); - } - - $result = false; - } - } - - if ($calledMethods !== []) { - $emitter->beforeFirstTestMethodFinished( - $this->name, - ...$calledMethods, - ); - } - - if (!$result) { - $emitter->testSuiteFinished($testSuiteValueObjectForEvents); - } - - return $result; - } - - private function invokeMethodsAfterLastTest(Event\Emitter $emitter): void - { - if (!$this->isForTestClass()) { - return; - } - - $methods = (new HookMethods)->hookMethods($this->name)['afterClass']->methodNamesSortedByPriority(); - $calledMethods = []; - - foreach ($methods as $method) { - if ($this->methodDoesNotExistOrIsDeclaredInTestCase($method)) { - continue; - } - - $calledMethod = new Event\Code\ClassMethod( - $this->name, - $method, - ); - - try { - call_user_func([$this->name, $method]); - } catch (Throwable $t) { - } - - $emitter->afterLastTestMethodCalled( - $this->name, - $calledMethod, - ); - - $calledMethods[] = $calledMethod; - - if (isset($t)) { - if ($t instanceof AssertionFailedError) { - $emitter->afterLastTestMethodFailed( - $this->name, - $calledMethod, - Event\Code\ThrowableBuilder::from($t), - ); - } else { - $emitter->afterLastTestMethodErrored( - $this->name, - $calledMethod, - Event\Code\ThrowableBuilder::from($t), - ); - } - } - } - - if ($calledMethods !== []) { - $emitter->afterLastTestMethodFinished( - $this->name, - ...$calledMethods, - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php b/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php deleted file mode 100644 index 3cbf4311..00000000 --- a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework; - -use function assert; -use function count; -use RecursiveIterator; - -/** - * @template-implements RecursiveIterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteIterator implements RecursiveIterator -{ - private int $position = 0; - - /** - * @var list - */ - private readonly array $tests; - - public function __construct(TestSuite $testSuite) - { - $this->tests = $testSuite->tests(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->tests); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Test - { - return $this->tests[$this->position]; - } - - public function next(): void - { - $this->position++; - } - - /** - * @throws NoChildTestSuiteException - */ - public function getChildren(): self - { - if (!$this->hasChildren()) { - throw new NoChildTestSuiteException( - 'The current item is not a TestSuite instance and therefore does not have any children.', - ); - } - - $current = $this->current(); - - assert($current instanceof TestSuite); - - return new self($current); - } - - public function hasChildren(): bool - { - return $this->valid() && $this->current() instanceof TestSuite; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/EventLogger.php b/vendor/phpunit/phpunit/src/Logging/EventLogger.php deleted file mode 100644 index 738f3037..00000000 --- a/vendor/phpunit/phpunit/src/Logging/EventLogger.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging; - -use const FILE_APPEND; -use const LOCK_EX; -use const PHP_EOL; -use const PHP_OS_FAMILY; -use function file_put_contents; -use function implode; -use function preg_split; -use function str_repeat; -use function strlen; -use PHPUnit\Event\Event; -use PHPUnit\Event\Tracer\Tracer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class EventLogger implements Tracer -{ - private string $path; - private bool $includeTelemetryInfo; - - public function __construct(string $path, bool $includeTelemetryInfo) - { - $this->path = $path; - $this->includeTelemetryInfo = $includeTelemetryInfo; - } - - public function trace(Event $event): void - { - $telemetryInfo = $this->telemetryInfo($event); - $indentation = PHP_EOL . str_repeat(' ', strlen($telemetryInfo)); - $flags = FILE_APPEND; - - if (!(PHP_OS_FAMILY === 'Windows' || PHP_OS_FAMILY === 'Darwin') || - $this->path !== 'php://stdout') { - $flags |= LOCK_EX; - } - - $lines = preg_split('/\r\n|\r|\n/', $event->asString()); - - if ($lines === false) { - $lines = []; - } - - file_put_contents( - $this->path, - $telemetryInfo . implode($indentation, $lines) . PHP_EOL, - $flags, - ); - } - - private function telemetryInfo(Event $event): string - { - if (!$this->includeTelemetryInfo) { - return ''; - } - - return $event->telemetryInfo()->asString() . ' '; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php b/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php deleted file mode 100644 index 14a71b76..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php +++ /dev/null @@ -1,462 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use const PHP_EOL; -use function assert; -use function basename; -use function is_int; -use function sprintf; -use function str_replace; -use function trim; -use DOMDocument; -use DOMElement; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Facade; -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Telemetry\HRTime; -use PHPUnit\Event\Telemetry\Info; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\PreparationStarted; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PrintedUnexpectedOutput; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\TextUI\Output\Printer; -use PHPUnit\Util\Xml; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class JunitXmlLogger -{ - private readonly Printer $printer; - private DOMDocument $document; - private DOMElement $root; - - /** - * @var array - */ - private array $testSuites = []; - - /** - * @var array - */ - private array $testSuiteTests = [0]; - - /** - * @var array - */ - private array $testSuiteAssertions = [0]; - - /** - * @var array - */ - private array $testSuiteErrors = [0]; - - /** - * @var array - */ - private array $testSuiteFailures = [0]; - - /** - * @var array - */ - private array $testSuiteSkipped = [0]; - - /** - * @var array - */ - private array $testSuiteTimes = [0.0]; - private int $testSuiteLevel = 0; - private ?DOMElement $currentTestCase = null; - private ?HRTime $time = null; - private bool $prepared = false; - private bool $preparationFailed = false; - private ?string $unexpectedOutput = null; - - public function __construct(Printer $printer, Facade $facade) - { - $this->printer = $printer; - - $this->registerSubscribers($facade); - $this->createDocument(); - } - - public function flush(): void - { - $xml = $this->document->saveXML(); - - if ($xml === false) { - $xml = ''; - } - - $this->printer->print($xml); - $this->printer->flush(); - } - - public function testSuiteStarted(Started $event): void - { - $testSuite = $this->document->createElement('testsuite'); - $testSuite->setAttribute('name', $event->testSuite()->name()); - - if ($event->testSuite()->isForTestClass()) { - $testSuite->setAttribute('file', $event->testSuite()->file()); - } - - if ($this->testSuiteLevel > 0) { - $this->testSuites[$this->testSuiteLevel]->appendChild($testSuite); - } else { - $this->root->appendChild($testSuite); - } - - $this->testSuiteLevel++; - $this->testSuites[$this->testSuiteLevel] = $testSuite; - $this->testSuiteTests[$this->testSuiteLevel] = 0; - $this->testSuiteAssertions[$this->testSuiteLevel] = 0; - $this->testSuiteErrors[$this->testSuiteLevel] = 0; - $this->testSuiteFailures[$this->testSuiteLevel] = 0; - $this->testSuiteSkipped[$this->testSuiteLevel] = 0; - $this->testSuiteTimes[$this->testSuiteLevel] = 0.0; - } - - public function testSuiteFinished(): void - { - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'tests', - (string) $this->testSuiteTests[$this->testSuiteLevel], - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'assertions', - (string) $this->testSuiteAssertions[$this->testSuiteLevel], - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'errors', - (string) $this->testSuiteErrors[$this->testSuiteLevel], - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'failures', - (string) $this->testSuiteFailures[$this->testSuiteLevel], - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'skipped', - (string) $this->testSuiteSkipped[$this->testSuiteLevel], - ); - - $this->testSuites[$this->testSuiteLevel]->setAttribute( - 'time', - sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]), - ); - - if ($this->testSuiteLevel > 1) { - $this->testSuiteTests[$this->testSuiteLevel - 1] += $this->testSuiteTests[$this->testSuiteLevel]; - $this->testSuiteAssertions[$this->testSuiteLevel - 1] += $this->testSuiteAssertions[$this->testSuiteLevel]; - $this->testSuiteErrors[$this->testSuiteLevel - 1] += $this->testSuiteErrors[$this->testSuiteLevel]; - $this->testSuiteFailures[$this->testSuiteLevel - 1] += $this->testSuiteFailures[$this->testSuiteLevel]; - $this->testSuiteSkipped[$this->testSuiteLevel - 1] += $this->testSuiteSkipped[$this->testSuiteLevel]; - $this->testSuiteTimes[$this->testSuiteLevel - 1] += $this->testSuiteTimes[$this->testSuiteLevel]; - } - - $this->testSuiteLevel--; - } - - /** - * @throws InvalidArgumentException - */ - public function testPreparationStarted(PreparationStarted $event): void - { - $this->createTestCase($event); - - $this->preparationFailed = false; - } - - public function testPreparationErrored(): void - { - $this->preparationFailed = true; - } - - public function testPreparationFailed(): void - { - $this->preparationFailed = true; - } - - public function testPrepared(): void - { - $this->prepared = true; - } - - public function testPrintedUnexpectedOutput(PrintedUnexpectedOutput $event): void - { - $this->unexpectedOutput = $event->output(); - } - - /** - * @throws InvalidArgumentException - */ - public function testFinished(Finished $event): void - { - if (!$this->prepared || $this->preparationFailed) { - return; - } - - $this->handleFinish($event->telemetryInfo(), $event->numberOfAssertionsPerformed()); - } - - /** - * @throws InvalidArgumentException - */ - public function testMarkedIncomplete(MarkedIncomplete $event): void - { - $this->handleIncompleteOrSkipped($event); - } - - /** - * @throws InvalidArgumentException - */ - public function testSkipped(Skipped $event): void - { - $this->handleIncompleteOrSkipped($event); - } - - /** - * @throws InvalidArgumentException - */ - public function testErrored(Errored $event): void - { - $this->handleFault($event, 'error'); - - $this->testSuiteErrors[$this->testSuiteLevel]++; - } - - /** - * @throws InvalidArgumentException - */ - public function testFailed(Failed $event): void - { - $this->handleFault($event, 'failure'); - - $this->testSuiteFailures[$this->testSuiteLevel]++; - } - - /** - * @throws InvalidArgumentException - */ - private function handleFinish(Info $telemetryInfo, int $numberOfAssertionsPerformed): void - { - assert($this->currentTestCase !== null); - assert($this->time !== null); - - $time = $telemetryInfo->time()->duration($this->time)->asFloat(); - - $this->testSuiteAssertions[$this->testSuiteLevel] += $numberOfAssertionsPerformed; - - $this->currentTestCase->setAttribute( - 'assertions', - (string) $numberOfAssertionsPerformed, - ); - - $this->currentTestCase->setAttribute( - 'time', - sprintf('%F', $time), - ); - - if ($this->unexpectedOutput !== null) { - $systemOut = $this->document->createElement( - 'system-out', - Xml::prepareString($this->unexpectedOutput), - ); - - $this->currentTestCase->appendChild($systemOut); - } - - $this->testSuites[$this->testSuiteLevel]->appendChild( - $this->currentTestCase, - ); - - $this->testSuiteTests[$this->testSuiteLevel]++; - $this->testSuiteTimes[$this->testSuiteLevel] += $time; - - $this->currentTestCase = null; - $this->time = null; - $this->preparationFailed = false; - $this->prepared = false; - $this->unexpectedOutput = null; - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new TestSuiteStartedSubscriber($this), - new TestSuiteFinishedSubscriber($this), - new TestPreparationStartedSubscriber($this), - new TestPreparationErroredSubscriber($this), - new TestPreparationFailedSubscriber($this), - new TestPreparedSubscriber($this), - new TestPrintedUnexpectedOutputSubscriber($this), - new TestFinishedSubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestSkippedSubscriber($this), - new TestRunnerExecutionFinishedSubscriber($this), - ); - } - - private function createDocument(): void - { - $this->document = new DOMDocument('1.0', 'UTF-8'); - $this->document->formatOutput = true; - - $this->root = $this->document->createElement('testsuites'); - $this->document->appendChild($this->root); - } - - /** - * @throws InvalidArgumentException - */ - private function handleFault(Errored|Failed $event, string $type): void - { - if (!$this->prepared) { - $this->createTestCase($event); - } - - assert($this->currentTestCase !== null); - - $buffer = $this->testAsString($event->test()); - - $throwable = $event->throwable(); - $buffer .= trim( - $throwable->description() . PHP_EOL . - $throwable->stackTrace(), - ); - - $fault = $this->document->createElement( - $type, - Xml::prepareString($buffer), - ); - - $fault->setAttribute('type', $throwable->className()); - - $this->currentTestCase->appendChild($fault); - - if (!$this->prepared) { - $this->handleFinish($event->telemetryInfo(), 0); - } - } - - /** - * @throws InvalidArgumentException - */ - private function handleIncompleteOrSkipped(MarkedIncomplete|Skipped $event): void - { - if (!$this->prepared) { - $this->createTestCase($event); - } - - assert($this->currentTestCase !== null); - - $skipped = $this->document->createElement('skipped'); - - $this->currentTestCase->appendChild($skipped); - - $this->testSuiteSkipped[$this->testSuiteLevel]++; - - if (!$this->prepared) { - $this->handleFinish($event->telemetryInfo(), 0); - } - } - - /** - * @throws InvalidArgumentException - */ - private function testAsString(Test $test): string - { - if ($test->isPhpt()) { - return basename($test->file()); - } - - assert($test instanceof TestMethod); - - return sprintf( - '%s::%s%s', - $test->className(), - $this->name($test), - PHP_EOL, - ); - } - - /** - * @throws InvalidArgumentException - */ - private function name(Test $test): string - { - if ($test->isPhpt()) { - return basename($test->file()); - } - - assert($test instanceof TestMethod); - - if (!$test->testData()->hasDataFromDataProvider()) { - return $test->methodName(); - } - - $dataSetName = $test->testData()->dataFromDataProvider()->dataSetName(); - - if (is_int($dataSetName)) { - return sprintf( - '%s with data set #%d', - $test->methodName(), - $dataSetName, - ); - } - - return sprintf( - '%s with data set "%s"', - $test->methodName(), - $dataSetName, - ); - } - - /** - * @throws InvalidArgumentException - * - * @phpstan-assert !null $this->currentTestCase - */ - private function createTestCase(Errored|Failed|MarkedIncomplete|PreparationStarted|Prepared|Skipped $event): void - { - $testCase = $this->document->createElement('testcase'); - - $test = $event->test(); - - $testCase->setAttribute('name', $this->name($test)); - $testCase->setAttribute('file', $test->file()); - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - $testCase->setAttribute('line', (string) $test->line()); - $testCase->setAttribute('class', $test->className()); - $testCase->setAttribute('classname', str_replace('\\', '.', $test->className())); - } - - $this->currentTestCase = $testCase; - $this->time = $event->telemetryInfo()->time(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php deleted file mode 100644 index b81f30da..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private JunitXmlLogger $logger; - - public function __construct(JunitXmlLogger $logger) - { - $this->logger = $logger; - } - - protected function logger(): JunitXmlLogger - { - return $this->logger; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index 114b1c84..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Errored $event): void - { - $this->logger()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index e8050784..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Failed $event): void - { - $this->logger()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 55aed8c6..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->logger()->testFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index 8732af9d..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(MarkedIncomplete $event): void - { - $this->logger()->testMarkedIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationErroredSubscriber.php deleted file mode 100644 index c6fb388f..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\PreparationErrored; -use PHPUnit\Event\Test\PreparationErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparationErroredSubscriber extends Subscriber implements PreparationErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(PreparationErrored $event): void - { - $this->logger()->testPreparationErrored(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php deleted file mode 100644 index 456466a1..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\PreparationFailed; -use PHPUnit\Event\Test\PreparationFailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparationFailedSubscriber extends Subscriber implements PreparationFailedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(PreparationFailed $event): void - { - $this->logger()->testPreparationFailed(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php deleted file mode 100644 index 8d24d655..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\PreparationStarted; -use PHPUnit\Event\Test\PreparationStartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparationStartedSubscriber extends Subscriber implements PreparationStartedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(PreparationStarted $event): void - { - $this->logger()->testPreparationStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index 2a80b8af..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Prepared $event): void - { - $this->logger()->testPrepared(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPrintedUnexpectedOutputSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPrintedUnexpectedOutputSubscriber.php deleted file mode 100644 index 186bf150..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPrintedUnexpectedOutputSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\Test\PrintedUnexpectedOutput; -use PHPUnit\Event\Test\PrintedUnexpectedOutputSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPrintedUnexpectedOutputSubscriber extends Subscriber implements PrintedUnexpectedOutputSubscriber -{ - public function notify(PrintedUnexpectedOutput $event): void - { - $this->logger()->testPrintedUnexpectedOutput($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php deleted file mode 100644 index 00617621..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\TestRunner\ExecutionFinished; -use PHPUnit\Event\TestRunner\ExecutionFinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerExecutionFinishedSubscriber extends Subscriber implements ExecutionFinishedSubscriber -{ - public function notify(ExecutionFinished $event): void - { - $this->logger()->flush(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index c6ee84ac..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->logger()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteFinishedSubscriber.php deleted file mode 100644 index 47691770..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\TestSuite\Finished; -use PHPUnit\Event\TestSuite\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->logger()->testSuiteFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteStartedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteStartedSubscriber.php deleted file mode 100644 index 30e350d3..00000000 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSuiteStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\JUnit; - -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\Event\TestSuite\StartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteStartedSubscriber extends Subscriber implements StartedSubscriber -{ - public function notify(Started $event): void - { - $this->logger()->testSuiteStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/CannotOpenUriForWritingException.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/CannotOpenUriForWritingException.php deleted file mode 100644 index a8ad7eba..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/CannotOpenUriForWritingException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use RuntimeException; - -final class CannotOpenUriForWritingException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/Exception.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/Exception.php deleted file mode 100644 index 30766ae9..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Exception/Exception.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -interface Exception extends \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/InfrastructureInformationProvider.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/InfrastructureInformationProvider.php deleted file mode 100644 index c02b6c26..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/InfrastructureInformationProvider.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use const DIRECTORY_SEPARATOR; -use const PHP_OS_FAMILY; -use function assert; -use function explode; -use function fclose; -use function function_exists; -use function getenv; -use function gethostname; -use function is_resource; -use function php_uname; -use function posix_geteuid; -use function posix_getpwuid; -use function preg_split; -use function proc_close; -use function proc_open; -use function str_contains; -use function str_replace; -use function str_starts_with; -use function stream_get_contents; -use function trim; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class InfrastructureInformationProvider -{ - /** - * @return non-empty-string - */ - public function operatingSystem(): string - { - return php_uname(); - } - - /** - * @return non-empty-string - */ - public function hostName(): string - { - $candidate = gethostname(); - - if ($candidate === false) { - return 'unknown'; - } - - $candidate = trim($candidate); - - if ($candidate === '') { - return 'unknown'; - } - - return $candidate; - } - - /** - * @return non-empty-string - */ - public function userName(): string - { - if (function_exists('posix_getpwuid') && function_exists('posix_geteuid')) { - $candidate = trim(posix_getpwuid(posix_geteuid())['name']); - } elseif (PHP_OS_FAMILY === 'Windows') { - $candidate = trim((string) getenv('USERNAME')); - } - - if (!isset($candidate) || $candidate === '') { - return 'unknown'; - } - - return $candidate; - } - - /** - * @return array{originUrl: non-empty-string, branch: non-empty-string, commit: non-empty-string, clean: bool, status: string}|false - */ - public function gitInformation(): array|false - { - $buffer = $this->executeGitCommand('remote show -n'); - - if ($buffer === false) { - return false; - } - - if (!str_contains($buffer, 'origin')) { - return false; - } - - $buffer = $this->executeGitCommand('remote show -n origin'); - - if ($buffer === false) { - return false; - } - - $lines = preg_split("/\r\n|\n|\r/", $buffer); - - if (!isset($lines[1]) || !str_starts_with($lines[1], ' Fetch URL: ')) { - return false; - } - - $originUrl = trim(str_replace(' Fetch URL: ', '', $lines[1])); - - if (str_contains($originUrl, '@')) { - $originUrl = explode('@', $originUrl)[1]; - } - - $branch = $this->executeGitCommand('symbolic-ref --short HEAD'); - - if ($branch === false) { - return false; - } - - $commit = $this->executeGitCommand('rev-parse HEAD'); - - if ($commit === false) { - return false; - } - - $status = $this->executeGitCommand('status --porcelain'); - - if ($status === false) { - return false; - } - - return [ - 'originUrl' => $originUrl, - 'branch' => $branch, - 'commit' => $commit, - 'clean' => $status === '', - 'status' => $status, - ]; - } - - /** - * @return false|non-empty-string - */ - private function executeGitCommand(string $command): false|string - { - $command = 'git ' . $command; - - if (DIRECTORY_SEPARATOR === '/') { - $command = 'LC_ALL=en_US.UTF-8 ' . $command; - } - - $process = @proc_open( - $command, - [ - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ], - $pipes, - ); - - if (!is_resource($process)) { - return false; - } - - assert(isset($pipes[1]) && is_resource($pipes[1])); - assert(isset($pipes[2]) && is_resource($pipes[2])); - - $result = trim((string) stream_get_contents($pipes[1])); - - fclose($pipes[1]); - fclose($pipes[2]); - - $returnCode = proc_close($process); - - if ($returnCode !== 0) { - return false; - } - - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/OtrXmlLogger.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/OtrXmlLogger.php deleted file mode 100644 index fe45f740..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/OtrXmlLogger.php +++ /dev/null @@ -1,472 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use const PHP_VERSION; -use const ZEND_THREAD_SAFE; -use function array_pop; -use function assert; -use function count; -use function error_get_last; -use function str_replace; -use DateTimeImmutable; -use DateTimeZone; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\AfterLastTestMethodFailed; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailed; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\PreparationErrored; -use PHPUnit\Event\Test\PreparationFailed; -use PHPUnit\Event\Test\Prepared as TestStarted; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped; -use PHPUnit\Event\TestSuite\Started as TestSuiteStarted; -use PHPUnit\Event\TestSuite\TestSuiteForTestClass; -use XMLWriter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class OtrXmlLogger -{ - private readonly XMLWriter $writer; - - /** - * @var non-negative-int - */ - private int $idSequence = 0; - - /** - * @var ?positive-int - */ - private ?int $parentId = null; - - /** - * @var list - */ - private array $parentIdStack = []; - - /** - * @var ?positive-int - */ - private ?int $testId = null; - private ?Throwable $parentErrored = null; - private ?Throwable $parentFailed = null; - private bool $alreadyFinished = false; - private bool $includeGitInformation; - - /** - * @param non-empty-string $uri - * - * @throws CannotOpenUriForWritingException - */ - public function __construct(Facade $facade, string $uri, bool $includeGitInformation) - { - $this->writer = new XMLWriter; - - if (@$this->writer->openUri($uri) === false) { - throw new CannotOpenUriForWritingException( - str_replace('XMLWriter::openUri(): ', '', error_get_last()['message']), - ); - } - - $this->writer->setIndent(true); - - $this->registerSubscribers($facade); - - $this->includeGitInformation = $includeGitInformation; - } - - public function testRunnerStarted(): void - { - $infrastructure = new InfrastructureInformationProvider; - $gitInformation = false; - - if ($this->includeGitInformation) { - $gitInformation = $infrastructure->gitInformation(); - } - - $this->writer->startDocument(); - - $this->writer->startElement('e:events'); - $this->writer->writeAttribute('xmlns', 'https://schemas.opentest4j.org/reporting/core/0.2.0'); - $this->writer->writeAttribute('xmlns:e', 'https://schemas.opentest4j.org/reporting/events/0.2.0'); - - if ($gitInformation !== false) { - $this->writer->writeAttribute('xmlns:git', 'https://schemas.opentest4j.org/reporting/git/0.2.0'); - } - - $this->writer->writeAttribute('xmlns:php', 'https://schema.phpunit.de/otr/php/0.0.1'); - $this->writer->writeAttribute('xmlns:phpunit', 'https://schema.phpunit.de/otr/phpunit/0.0.1'); - - $this->writer->startElement('infrastructure'); - $this->writer->writeElement('hostName', $infrastructure->hostName()); - $this->writer->writeElement('userName', $infrastructure->userName()); - $this->writer->writeElement('operatingSystem', $infrastructure->operatingSystem()); - - $this->writer->writeElement('php:phpVersion', PHP_VERSION); - $this->writer->writeElement('php:threadModel', ZEND_THREAD_SAFE ? 'ZTS' : 'NTS'); - - if ($gitInformation !== false) { - $this->writer->startElement('git:repository'); - $this->writer->writeAttribute('originUrl', $gitInformation['originUrl']); - $this->writer->endElement(); - - $this->writer->writeElement('git:branch', $gitInformation['branch']); - $this->writer->writeElement('git:commit', $gitInformation['commit']); - - $this->writer->startElement('git:status'); - $this->writer->writeAttribute('clean', $gitInformation['clean'] === true ? 'true' : 'false'); - $this->writer->writeCdata($gitInformation['status']); - $this->writer->endElement(); - } - - $this->writer->endElement(); - - $this->writer->flush(); - } - - public function testRunnerFinished(): void - { - $this->writer->endDocument(); - - $this->writer->flush(); - } - - public function testSuiteStarted(TestSuiteStarted $event): void - { - $id = $this->nextId(); - - $this->writer->startElement('e:started'); - $this->writer->writeAttribute('id', (string) $id); - - if ($this->parentId !== null) { - $this->writer->writeAttribute('parentId', (string) $this->parentId); - } - - $testSuite = $event->testSuite(); - - $this->writer->writeAttribute('name', $testSuite->name()); - $this->writer->writeAttribute('time', $this->timestamp()); - - if ($testSuite->isForTestClass()) { - assert($testSuite instanceof TestSuiteForTestClass); - - $this->writer->startElement('sources'); - - $this->writer->startElement('fileSource'); - $this->writer->writeAttribute('path', $testSuite->file()); - $this->writer->startElement('filePosition'); - $this->writer->writeAttribute('line', (string) $testSuite->line()); - $this->writer->endElement(); - $this->writer->endElement(); - - $this->writer->startElement('phpunit:classSource'); - $this->writer->writeAttribute('className', $testSuite->className()); - $this->writer->endElement(); - - $this->writer->endElement(); - } - - $this->writer->endElement(); - - $this->writer->flush(); - - $this->parentId = $id; - $this->parentIdStack[] = $id; - } - - public function testSuiteSkipped(TestSuiteSkipped $event): void - { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->parentId); - $this->writer->writeAttribute('time', $this->timestamp()); - - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', 'SKIPPED'); - $this->writer->writeElement('reason', $event->message()); - $this->writer->endElement(); - - $this->writer->endElement(); - - $this->writer->flush(); - - $this->reduceTestSuiteLevel(); - } - - public function testSuiteFinished(): void - { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->parentId); - $this->writer->writeAttribute('time', $this->timestamp()); - - if ($this->parentErrored !== null) { - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', 'ERRORED'); - $this->writer->writeElement('reason', $this->parentErrored->message()); - $this->writeThrowable($this->parentErrored, false); - $this->writer->endElement(); - } elseif ($this->parentFailed !== null) { - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', 'FAILED'); - $this->writer->writeElement('reason', $this->parentFailed->message()); - $this->writeThrowable($this->parentFailed, true); - $this->writer->endElement(); - } - - $this->writer->endElement(); - - $this->writer->flush(); - - $this->parentErrored = null; - $this->parentFailed = null; - - $this->reduceTestSuiteLevel(); - } - - public function testPrepared(PreparationErrored|PreparationFailed|TestStarted $event): void - { - $this->testId = $this->nextId(); - - $this->writeTestStarted( - $event->test(), - $this->testId, - $this->parentId, - ); - } - - public function testFinished(): void - { - if (!$this->alreadyFinished) { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->testId); - $this->writer->writeAttribute('time', $this->timestamp()); - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', Status::Successful->value); - $this->writer->endElement(); - $this->writer->endElement(); - } - - $this->alreadyFinished = false; - $this->testId = null; - } - - public function testFailed(Failed $event): void - { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->testId); - $this->writer->writeAttribute('time', $this->timestamp()); - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', Status::Failed->value); - - $this->writer->writeElement('reason', $event->throwable()->message()); - $this->writeThrowable($event->throwable(), true); - - $this->writer->endElement(); - $this->writer->endElement(); - - $this->writer->flush(); - - $this->alreadyFinished = true; - } - - public function testErrored(Errored $event): void - { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->testId); - $this->writer->writeAttribute('time', $this->timestamp()); - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', Status::Errored->value); - - $this->writer->writeElement('reason', $event->throwable()->message()); - $this->writeThrowable($event->throwable(), false); - - $this->writer->endElement(); - $this->writer->endElement(); - - $this->writer->flush(); - - $this->alreadyFinished = true; - } - - public function testSkipped(Skipped $event): void - { - if ($this->testId === null) { - $this->testId = $this->nextId(); - - $this->writeTestStarted( - $event->test(), - $this->testId, - $this->parentId, - ); - } - - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->testId); - $this->writer->writeAttribute('time', $this->timestamp()); - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', Status::Skipped->value); - - $this->writer->writeElement('reason', $event->message()); - - $this->writer->endElement(); - $this->writer->endElement(); - - $this->writer->flush(); - - $this->alreadyFinished = true; - } - - public function markTestIncomplete(MarkedIncomplete $event): void - { - $this->writer->startElement('e:finished'); - $this->writer->writeAttribute('id', (string) $this->testId); - $this->writer->writeAttribute('time', $this->timestamp()); - $this->writer->startElement('result'); - $this->writer->writeAttribute('status', Status::Aborted->value); - - $this->writer->writeElement('reason', $event->throwable()->message()); - $this->writeThrowable($event->throwable(), false); - - $this->writer->endElement(); - $this->writer->endElement(); - - $this->writer->flush(); - - $this->alreadyFinished = true; - } - - public function parentErrored(AfterLastTestMethodErrored|BeforeFirstTestMethodErrored $event): void - { - $this->parentErrored = $event->throwable(); - } - - public function parentFailed(AfterLastTestMethodFailed|BeforeFirstTestMethodFailed $event): void - { - $this->parentFailed = $event->throwable(); - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new TestRunnerStartedSubscriber($this), - new TestSuiteStartedSubscriber($this), - new TestSuiteSkippedSubscriber($this), - new BeforeFirstTestMethodErroredSubscriber($this), - new BeforeFirstTestMethodFailedSubscriber($this), - new AfterLastTestMethodErroredSubscriber($this), - new AfterLastTestMethodFailedSubscriber($this), - new TestPreparationErroredSubscriber($this), - new TestPreparationFailedSubscriber($this), - new TestPreparedSubscriber($this), - new TestAbortedSubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestSkippedSubscriber($this), - new TestFinishedSubscriber($this), - new TestSuiteFinishedSubscriber($this), - new TestRunnerFinishedSubscriber($this), - ); - } - - /** - * @param positive-int $id - * @param ?positive-int $parentId - */ - private function writeTestStarted(Test $test, int $id, ?int $parentId): void - { - $this->writer->startElement('e:started'); - $this->writer->writeAttribute('id', (string) $id); - - if ($parentId !== null) { - $this->writer->writeAttribute('parentId', (string) $parentId); - } - - $this->writer->writeAttribute('name', $test->name()); - $this->writer->writeAttribute('time', $this->timestamp()); - - $this->writer->startElement('sources'); - - $this->writer->startElement('fileSource'); - $this->writer->writeAttribute('path', $test->file()); - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - $this->writer->startElement('filePosition'); - $this->writer->writeAttribute('line', (string) $test->line()); - $this->writer->endElement(); - } - - $this->writer->endElement(); - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - $this->writer->startElement('phpunit:methodSource'); - $this->writer->writeAttribute('className', $test->className()); - $this->writer->writeAttribute('methodName', $test->methodName()); - $this->writer->endElement(); - } - - $this->writer->endElement(); - - $this->writer->endElement(); - - $this->writer->flush(); - } - - private function writeThrowable(Throwable $throwable, bool $assertionError): void - { - $this->writer->startElement('phpunit:throwable'); - $this->writer->writeAttribute('type', $throwable->className()); - $this->writer->writeAttribute('assertionError', $assertionError ? 'true' : 'false'); - $this->writer->writeCdata($throwable->asString()); - $this->writer->endElement(); - } - - /** - * @return non-empty-string - */ - private function timestamp(): string - { - return (new DateTimeImmutable('now', new DateTimeZone('UTC')))->format('Y-m-d\TH:i:s.u\Z'); - } - - /** - * @return positive-int - */ - private function nextId(): int - { - return ++$this->idSequence; - } - - private function reduceTestSuiteLevel(): void - { - array_pop($this->parentIdStack); - - if ($this->parentIdStack !== []) { - $this->parentId = $this->parentIdStack[count($this->parentIdStack) - 1]; - - return; - } - - $this->parentId = null; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Status.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Status.php deleted file mode 100644 index 4ff399b2..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Status.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This enumeration is not covered by the backward compatibility promise for PHPUnit - */ -enum Status: string -{ - case Aborted = 'ABORTED'; - case Errored = 'ERRORED'; - case Failed = 'FAILED'; - case Skipped = 'SKIPPED'; - case Successful = 'SUCCESSFUL'; -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodErroredSubscriber.php deleted file mode 100644 index 5b31f11c..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\AfterLastTestMethodErroredSubscriber as AfterLastTestMethodErroredSubscriberInterface; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodErroredSubscriber extends Subscriber implements AfterLastTestMethodErroredSubscriberInterface -{ - /** - * @throws InvalidArgumentException - */ - public function notify(AfterLastTestMethodErrored $event): void - { - $this->logger()->parentErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodFailedSubscriber.php deleted file mode 100644 index 340d26d7..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/AfterLastTestMethodFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\AfterLastTestMethodFailed; -use PHPUnit\Event\Test\AfterLastTestMethodFailedSubscriber as AfterLastTestMethodFailedSubscriberInterface; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterLastTestMethodFailedSubscriber extends Subscriber implements AfterLastTestMethodFailedSubscriberInterface -{ - /** - * @throws InvalidArgumentException - */ - public function notify(AfterLastTestMethodFailed $event): void - { - $this->logger()->parentFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodErroredSubscriber.php deleted file mode 100644 index 3fb8c1ef..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErroredSubscriber as BeforeFirstTestMethodErroredSubscriberInterface; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodErroredSubscriber extends Subscriber implements BeforeFirstTestMethodErroredSubscriberInterface -{ - /** - * @throws InvalidArgumentException - */ - public function notify(BeforeFirstTestMethodErrored $event): void - { - $this->logger()->parentErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodFailedSubscriber.php deleted file mode 100644 index fad858cf..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/BeforeFirstTestMethodFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailed; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailedSubscriber as BeforeFirstTestMethodFailedSubscriberInterface; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeFirstTestMethodFailedSubscriber extends Subscriber implements BeforeFirstTestMethodFailedSubscriberInterface -{ - /** - * @throws InvalidArgumentException - */ - public function notify(BeforeFirstTestMethodFailed $event): void - { - $this->logger()->parentFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/Subscriber.php deleted file mode 100644 index 84b71de6..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private OtrXmlLogger $logger; - - public function __construct(OtrXmlLogger $logger) - { - $this->logger = $logger; - } - - protected function logger(): OtrXmlLogger - { - return $this->logger; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestAbortedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestAbortedSubscriber.php deleted file mode 100644 index 31376214..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestAbortedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestAbortedSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(MarkedIncomplete $event): void - { - $this->logger()->markTestIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index 1a8a40be..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Errored $event): void - { - $this->logger()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index 0b0caf97..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Failed $event): void - { - $this->logger()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index d05de8b5..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->logger()->testFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationErroredSubscriber.php deleted file mode 100644 index 6fb72562..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\PreparationErrored; -use PHPUnit\Event\Test\PreparationErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparationErroredSubscriber extends Subscriber implements PreparationErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(PreparationErrored $event): void - { - $this->logger()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationFailedSubscriber.php deleted file mode 100644 index f0167508..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparationFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\PreparationFailed; -use PHPUnit\Event\Test\PreparationFailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparationFailedSubscriber extends Subscriber implements PreparationFailedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(PreparationFailed $event): void - { - $this->logger()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index 9138f142..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Prepared $event): void - { - $this->logger()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerFinishedSubscriber.php deleted file mode 100644 index d690ba56..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestRunner\ExecutionFinished; -use PHPUnit\Event\TestRunner\ExecutionFinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerFinishedSubscriber extends Subscriber implements ExecutionFinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(ExecutionFinished $event): void - { - $this->logger()->testRunnerFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerStartedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerStartedSubscriber.php deleted file mode 100644 index 6aba01c9..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestRunnerStartedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\Application\Started; -use PHPUnit\Event\Application\StartedSubscriber; -use PHPUnit\Event\InvalidArgumentException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerStartedSubscriber extends Subscriber implements StartedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Started $event): void - { - $this->logger()->testRunnerStarted(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index 32e67ca8..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->logger()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteFinishedSubscriber.php deleted file mode 100644 index 16ebf626..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestSuite\Finished; -use PHPUnit\Event\TestSuite\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->logger()->testSuiteFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteSkippedSubscriber.php deleted file mode 100644 index 58691b61..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteSkippedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestSuite\Skipped; -use PHPUnit\Event\TestSuite\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->logger()->testSuiteSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteStartedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteStartedSubscriber.php deleted file mode 100644 index 78678012..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/Subscriber/TestSuiteStartedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\OpenTestReporting; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\Event\TestSuite\StartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteStartedSubscriber extends Subscriber implements StartedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Started $event): void - { - $this->logger()->testSuiteStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/core-0.2.0.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/core-0.2.0.xsd deleted file mode 100644 index 170e20ca..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/core-0.2.0.xsd +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The media type of the file content, e.g. 'text/plain' or 'application/json', - see https://www.iana.org/assignments/media-types/media-types.xhtml. - For text files, the charset should be specified in the 'charset' attribute, - e.g. 'text/plain; charset=utf-8'. - - - - - - - - - - - - - - Typically 'stdout' or 'stderr' but may also be used for attaching other log output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/events-0.2.0.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/events-0.2.0.xsd deleted file mode 100644 index e5c37ccc..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/events-0.2.0.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/git-0.2.0.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/git-0.2.0.xsd deleted file mode 100644 index 1a1dd6d6..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/git-0.2.0.xsd +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - the URL of the 'origin' remote of the Git repository - - - - - - - - - - - - - - - - - - - - the branch the HEAD commit is pointing to, if any - - - - - - - - - - - - the commit hash - - - - - - - - - - - - the output of `git status --porcelain`, potentially empty - - - - - whether the working directory clean contains no changes or untracked files - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/otr.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/otr.xsd deleted file mode 100644 index 982dac4d..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/otr.xsd +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/php.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/php.xsd deleted file mode 100644 index f880345d..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/php.xsd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/phpunit.xsd b/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/phpunit.xsd deleted file mode 100644 index 0a0c00ed..00000000 --- a/vendor/phpunit/phpunit/src/Logging/OpenTestReporting/schema/phpunit.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/Subscriber.php deleted file mode 100644 index b1ad46d8..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private TeamCityLogger $logger; - - public function __construct(TeamCityLogger $logger) - { - $this->logger = $logger; - } - - protected function logger(): TeamCityLogger - { - return $this->logger; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestConsideredRiskySubscriber.php deleted file mode 100644 index 9482ccb2..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestConsideredRiskySubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\ConsideredRiskySubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestConsideredRiskySubscriber extends Subscriber implements ConsideredRiskySubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(ConsideredRisky $event): void - { - $this->logger()->testConsideredRisky($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index 4ce8d0cb..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Errored $event): void - { - $this->logger()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index 8d8caa63..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Failed $event): void - { - $this->logger()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 6b4bef3d..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->logger()->testFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index b38d54c4..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(MarkedIncomplete $event): void - { - $this->logger()->testMarkedIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index 85476a05..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->logger()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestRunnerExecutionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestRunnerExecutionFinishedSubscriber.php deleted file mode 100644 index 824ea424..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestRunnerExecutionFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\TestRunner\ExecutionFinished; -use PHPUnit\Event\TestRunner\ExecutionFinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerExecutionFinishedSubscriber extends Subscriber implements ExecutionFinishedSubscriber -{ - public function notify(ExecutionFinished $event): void - { - $this->logger()->flush(); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index 0f55795f..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->logger()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteBeforeFirstTestMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteBeforeFirstTestMethodErroredSubscriber.php deleted file mode 100644 index 25459197..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteBeforeFirstTestMethodErroredSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteBeforeFirstTestMethodErroredSubscriber extends Subscriber implements BeforeFirstTestMethodErroredSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(BeforeFirstTestMethodErrored $event): void - { - $this->logger()->beforeFirstTestMethodErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteFinishedSubscriber.php deleted file mode 100644 index 71889d8c..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\TestSuite\Finished; -use PHPUnit\Event\TestSuite\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->logger()->testSuiteFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteSkippedSubscriber.php deleted file mode 100644 index 2d6a3f3d..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteSkippedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestSuite\Skipped; -use PHPUnit\Event\TestSuite\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->logger()->testSuiteSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteStartedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteStartedSubscriber.php deleted file mode 100644 index 7caba60b..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/Subscriber/TestSuiteStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\Event\TestSuite\StartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteStartedSubscriber extends Subscriber implements StartedSubscriber -{ - public function notify(Started $event): void - { - $this->logger()->testSuiteStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php b/vendor/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php deleted file mode 100644 index 9a56fc38..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php +++ /dev/null @@ -1,418 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TeamCity; - -use function assert; -use function getmypid; -use function ini_get; -use function is_a; -use function round; -use function sprintf; -use function str_replace; -use function stripos; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Event; -use PHPUnit\Event\Facade; -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Telemetry\HRTime; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\TestSuite\Finished as TestSuiteFinished; -use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped; -use PHPUnit\Event\TestSuite\Started as TestSuiteStarted; -use PHPUnit\Event\TestSuite\TestSuiteForTestClass; -use PHPUnit\Event\TestSuite\TestSuiteForTestMethodWithDataProvider; -use PHPUnit\Framework\Exception as FrameworkException; -use PHPUnit\TextUI\Output\Printer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TeamCityLogger -{ - private readonly Printer $printer; - private bool $isSummaryTestCountPrinted = false; - private ?HRTime $time = null; - private ?int $flowId = null; - - public function __construct(Printer $printer, Facade $facade) - { - $this->printer = $printer; - - $this->registerSubscribers($facade); - $this->setFlowId(); - } - - public function testSuiteStarted(TestSuiteStarted $event): void - { - $testSuite = $event->testSuite(); - - if (!$this->isSummaryTestCountPrinted) { - $this->isSummaryTestCountPrinted = true; - - $this->writeMessage( - 'testCount', - ['count' => $testSuite->count()], - ); - } - - $parameters = ['name' => $testSuite->name()]; - - if ($testSuite->isForTestClass()) { - assert($testSuite instanceof TestSuiteForTestClass); - - $parameters['locationHint'] = sprintf( - 'php_qn://%s::\\%s', - $testSuite->file(), - $testSuite->name(), - ); - } elseif ($testSuite->isForTestMethodWithDataProvider()) { - assert($testSuite instanceof TestSuiteForTestMethodWithDataProvider); - - $parameters['locationHint'] = sprintf( - 'php_qn://%s::\\%s', - $testSuite->file(), - $testSuite->name(), - ); - - $parameters['name'] = $testSuite->methodName(); - } - - $this->writeMessage('testSuiteStarted', $parameters); - } - - public function testSuiteFinished(TestSuiteFinished $event): void - { - $testSuite = $event->testSuite(); - - $parameters = ['name' => $testSuite->name()]; - - if ($testSuite->isForTestMethodWithDataProvider()) { - assert($testSuite instanceof TestSuiteForTestMethodWithDataProvider); - - $parameters['name'] = $testSuite->methodName(); - } - - $this->writeMessage('testSuiteFinished', $parameters); - } - - public function testPrepared(Prepared $event): void - { - $test = $event->test(); - - $parameters = [ - 'name' => $test->name(), - ]; - - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - $parameters['locationHint'] = sprintf( - 'php_qn://%s::\\%s::%s', - $test->file(), - $test->className(), - $test->name(), - ); - } - - $this->writeMessage('testStarted', $parameters); - - $this->time = $event->telemetryInfo()->time(); - } - - /** - * @throws InvalidArgumentException - */ - public function testMarkedIncomplete(MarkedIncomplete $event): void - { - if ($this->time === null) { - // @codeCoverageIgnoreStart - $this->time = $event->telemetryInfo()->time(); - // @codeCoverageIgnoreEnd - } - - $this->writeMessage( - 'testIgnored', - [ - 'name' => $event->test()->name(), - 'message' => $event->throwable()->message(), - 'details' => $this->details($event->throwable()), - 'duration' => $this->duration($event), - ], - ); - } - - /** - * @throws InvalidArgumentException - */ - public function testSkipped(Skipped $event): void - { - if ($this->time === null) { - $this->time = $event->telemetryInfo()->time(); - } - - $parameters = [ - 'name' => $event->test()->name(), - 'message' => $event->message(), - ]; - - $parameters['duration'] = $this->duration($event); - - $this->writeMessage('testIgnored', $parameters); - } - - /** - * @throws InvalidArgumentException - */ - public function testSuiteSkipped(TestSuiteSkipped $event): void - { - if ($this->time === null) { - $this->time = $event->telemetryInfo()->time(); - } - - $parameters = [ - 'name' => $event->testSuite()->name(), - 'message' => $event->message(), - ]; - - $parameters['duration'] = $this->duration($event); - - $this->writeMessage('testIgnored', $parameters); - $this->writeMessage('testSuiteFinished', $parameters); - } - - /** - * @throws InvalidArgumentException - */ - public function beforeFirstTestMethodErrored(BeforeFirstTestMethodErrored $event): void - { - if ($this->time === null) { - $this->time = $event->telemetryInfo()->time(); - } - - $parameters = [ - 'name' => $event->testClassName(), - 'message' => $this->message($event->throwable()), - 'details' => $this->details($event->throwable()), - 'duration' => $this->duration($event), - ]; - - $this->writeMessage('testFailed', $parameters); - $this->writeMessage('testSuiteFinished', $parameters); - } - - /** - * @throws InvalidArgumentException - */ - public function testErrored(Errored $event): void - { - if ($this->time === null) { - $this->time = $event->telemetryInfo()->time(); - } - - $this->writeMessage( - 'testFailed', - [ - 'name' => $event->test()->name(), - 'message' => $this->message($event->throwable()), - 'details' => $this->details($event->throwable()), - 'duration' => $this->duration($event), - ], - ); - } - - /** - * @throws InvalidArgumentException - */ - public function testFailed(Failed $event): void - { - if ($this->time === null) { - // @codeCoverageIgnoreStart - $this->time = $event->telemetryInfo()->time(); - // @codeCoverageIgnoreEnd - } - - $parameters = [ - 'name' => $event->test()->name(), - 'message' => $this->message($event->throwable()), - 'details' => $this->details($event->throwable()), - 'duration' => $this->duration($event), - ]; - - if ($event->hasComparisonFailure()) { - $parameters['type'] = 'comparisonFailure'; - $parameters['actual'] = $event->comparisonFailure()->actual(); - $parameters['expected'] = $event->comparisonFailure()->expected(); - } - - $this->writeMessage('testFailed', $parameters); - } - - /** - * @throws InvalidArgumentException - */ - public function testConsideredRisky(ConsideredRisky $event): void - { - if ($this->time === null) { - // @codeCoverageIgnoreStart - $this->time = $event->telemetryInfo()->time(); - // @codeCoverageIgnoreEnd - } - - $this->writeMessage( - 'testFailed', - [ - 'name' => $event->test()->name(), - 'message' => $event->message(), - 'details' => '', - 'duration' => $this->duration($event), - ], - ); - } - - /** - * @throws InvalidArgumentException - */ - public function testFinished(Finished $event): void - { - $this->writeMessage( - 'testFinished', - [ - 'name' => $event->test()->name(), - 'duration' => $this->duration($event), - ], - ); - - $this->time = null; - } - - public function flush(): void - { - $this->printer->flush(); - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new TestSuiteStartedSubscriber($this), - new TestSuiteFinishedSubscriber($this), - new TestPreparedSubscriber($this), - new TestFinishedSubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestSkippedSubscriber($this), - new TestSuiteSkippedSubscriber($this), - new TestConsideredRiskySubscriber($this), - new TestRunnerExecutionFinishedSubscriber($this), - new TestSuiteBeforeFirstTestMethodErroredSubscriber($this), - ); - } - - private function setFlowId(): void - { - if (stripos(ini_get('disable_functions'), 'getmypid') === false) { - $this->flowId = getmypid(); - } - } - - /** - * @param array $parameters - */ - private function writeMessage(string $eventName, array $parameters = []): void - { - $this->printer->print( - sprintf( - '##teamcity[%s', - $eventName, - ), - ); - - if ($this->flowId !== null) { - $parameters['flowId'] = $this->flowId; - } - - foreach ($parameters as $key => $value) { - $this->printer->print( - sprintf( - " %s='%s'", - $key, - $this->escape((string) $value), - ), - ); - } - - $this->printer->print("]\n"); - } - - /** - * @throws InvalidArgumentException - */ - private function duration(Event $event): int - { - if ($this->time === null) { - // @codeCoverageIgnoreStart - return 0; - // @codeCoverageIgnoreEnd - } - - return (int) round($event->telemetryInfo()->time()->duration($this->time)->asFloat() * 1000); - } - - private function escape(string $string): string - { - return str_replace( - ['|', "'", "\n", "\r", ']', '['], - ['||', "|'", '|n', '|r', '|]', '|['], - $string, - ); - } - - private function message(Throwable $throwable): string - { - if (is_a($throwable->className(), FrameworkException::class, true)) { - return $throwable->message(); - } - - $buffer = $throwable->className(); - - if ($throwable->message() !== '') { - $buffer .= ': ' . $throwable->message(); - } - - return $buffer; - } - - private function details(Throwable $throwable): string - { - $buffer = $throwable->stackTrace(); - - while ($throwable->hasPrevious()) { - $throwable = $throwable->previous(); - - $buffer .= sprintf( - "\nCaused by\n%s\n%s", - $throwable->description(), - $throwable->stackTrace(), - ); - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php b/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php deleted file mode 100644 index 3d74d593..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class HtmlRenderer -{ - private const string PAGE_HEADER = <<<'EOT' - - - - - Test Documentation - - - -EOT; - private const string CLASS_HEADER = <<<'EOT' - -

          %s

          -
            - -EOT; - private const string CLASS_FOOTER = <<<'EOT' -
          -EOT; - private const string PAGE_FOOTER = <<<'EOT' - - - -EOT; - - /** - * @param array $tests - */ - public function render(array $tests): string - { - $buffer = self::PAGE_HEADER; - - foreach ($tests as $prettifiedClassName => $_tests) { - $buffer .= sprintf( - self::CLASS_HEADER, - $prettifiedClassName, - ); - - foreach ($this->reduce($_tests) as $prettifiedMethodName => $outcome) { - $buffer .= sprintf( - "
        • %s
        • \n", - $outcome, - $prettifiedMethodName, - ); - } - - $buffer .= self::CLASS_FOOTER; - } - - return $buffer . self::PAGE_FOOTER; - } - - /** - * @return array - */ - private function reduce(TestResultCollection $tests): array - { - $result = []; - - foreach ($tests as $test) { - $prettifiedMethodName = $test->test()->testDox()->prettifiedMethodName(); - - if (!isset($result[$prettifiedMethodName])) { - $result[$prettifiedMethodName] = $test->status()->isSuccess() ? 'success' : 'defect'; - - continue; - } - - if ($test->status()->isSuccess()) { - continue; - } - - $result[$prettifiedMethodName] = 'defect'; - } - - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php b/vendor/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php deleted file mode 100644 index 99d266c6..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php +++ /dev/null @@ -1,441 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use const PHP_EOL; -use function array_key_exists; -use function array_keys; -use function array_map; -use function array_pop; -use function array_values; -use function assert; -use function class_exists; -use function explode; -use function gettype; -use function implode; -use function is_bool; -use function is_float; -use function is_int; -use function is_object; -use function is_scalar; -use function method_exists; -use function preg_quote; -use function preg_replace; -use function rtrim; -use function sprintf; -use function str_contains; -use function str_ends_with; -use function str_replace; -use function str_starts_with; -use function strlen; -use function strtolower; -use function strtoupper; -use function substr; -use function trim; -use PHPUnit\Event\Code\TestMethodBuilder; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Metadata\TestDox; -use PHPUnit\Metadata\TestDoxFormatter; -use PHPUnit\Util\Color; -use PHPUnit\Util\Exporter; -use PHPUnit\Util\Filter; -use ReflectionEnum; -use ReflectionMethod; -use ReflectionObject; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NamePrettifier -{ - /** - * @var array - */ - private array $strings = []; - - /** - * @var array - */ - private array $prettifiedTestCases = []; - - /** - * @var array - */ - private array $erroredFormatters = []; - - /** - * @param class-string $className - */ - public function prettifyTestClassName(string $className): string - { - if (class_exists($className)) { - $classLevelTestDox = MetadataRegistry::parser()->forClass($className)->isTestDox(); - - if ($classLevelTestDox->isNotEmpty()) { - $classLevelTestDox = $classLevelTestDox->asArray()[0]; - - assert($classLevelTestDox instanceof TestDox); - - return $classLevelTestDox->text(); - } - } - - $parts = explode('\\', $className); - $className = array_pop($parts); - - if (str_ends_with($className, 'Test')) { - $className = substr($className, 0, strlen($className) - strlen('Test')); - } - - if (str_starts_with($className, 'Tests')) { - $className = substr($className, strlen('Tests')); - } elseif (str_starts_with($className, 'Test')) { - $className = substr($className, strlen('Test')); - } - - if ($className === '') { - $className = 'UnnamedTests'; - } - - if ($parts !== []) { - $parts[] = $className; - $fullyQualifiedName = implode('\\', $parts); - } else { - $fullyQualifiedName = $className; - } - - $result = preg_replace('/(?<=[[:lower:]])(?=[[:upper:]])/u', ' ', $className); - - if ($fullyQualifiedName !== $className) { - return $result . ' (' . $fullyQualifiedName . ')'; - } - - return $result; - } - - // NOTE: this method is on a hot path and very performance sensitive. change with care. - public function prettifyTestMethodName(string $name): string - { - if ($name === '') { - return ''; - } - - $string = rtrim($name, '0123456789'); - - if (array_key_exists($string, $this->strings)) { - $name = $string; - } elseif ($string === $name) { - $this->strings[$string] = 1; - } - - if (str_starts_with($name, 'test_')) { - $name = substr($name, 5); - } elseif (str_starts_with($name, 'test')) { - $name = substr($name, 4); - } - - if ($name === '') { - return ''; - } - - $name[0] = strtoupper($name[0]); - - $noUnderscore = str_replace('_', ' ', $name); - - if ($noUnderscore !== $name) { - return trim($noUnderscore); - } - - $wasNumeric = false; - - $buffer = ''; - - $len = strlen($name); - - for ($i = 0; $i < $len; $i++) { - if ($i > 0 && $name[$i] >= 'A' && $name[$i] <= 'Z') { - $buffer .= ' ' . strtolower($name[$i]); - } else { - $isNumeric = $name[$i] >= '0' && $name[$i] <= '9'; - - if (!$wasNumeric && $isNumeric) { - $buffer .= ' '; - $wasNumeric = true; - } - - if ($wasNumeric && !$isNumeric) { - $wasNumeric = false; - } - - $buffer .= $name[$i]; - } - } - - return trim($buffer); - } - - public function prettifyTestCase(TestCase $test, bool $colorize): string - { - $key = $test::class . '#' . $test->name(); - - if ($test->usesDataProvider()) { - $key .= '#' . $test->dataName(); - } - - if ($colorize) { - $key .= '#colorize'; - } - - if (isset($this->prettifiedTestCases[$key])) { - return $this->prettifiedTestCases[$key]; - } - - $metadataCollection = MetadataRegistry::parser()->forMethod($test::class, $test->name()); - $testDox = $metadataCollection->isTestDox()->isMethodLevel(); - $callback = $metadataCollection->isTestDoxFormatter(); - $isCustomized = false; - - if ($testDox->isNotEmpty()) { - $testDox = $testDox->asArray()[0]; - - assert($testDox instanceof TestDox); - - [$result, $isCustomized] = $this->processTestDox($test, $testDox, $colorize); - } elseif ($callback->isNotEmpty()) { - $callback = $callback->asArray()[0]; - - assert($callback instanceof TestDoxFormatter); - - [$result, $isCustomized] = $this->processTestDoxFormatter($test, $callback); - } else { - $result = $this->prettifyTestMethodName($test->name()); - } - - if (!$isCustomized && $test->usesDataProvider()) { - $result .= $this->prettifyDataSet($test, $colorize); - } - - $this->prettifiedTestCases[$key] = $result; - - return $result; - } - - public function prettifyDataSet(TestCase $test, bool $colorize): string - { - if (!$colorize) { - return $test->dataSetAsString(); - } - - if (is_int($test->dataName())) { - return Color::dim(' with data set ') . Color::colorize('fg-cyan', (string) $test->dataName()); - } - - return Color::dim(' with ') . Color::colorize('fg-cyan', Color::visualizeWhitespace($test->dataName())); - } - - /** - * @return array - */ - private function mapTestMethodParameterNamesToProvidedDataValues(TestCase $test, bool $colorize): array - { - assert(method_exists($test, $test->name())); - - /** @noinspection PhpUnhandledExceptionInspection */ - $reflector = new ReflectionMethod($test::class, $test->name()); - - $providedData = []; - $providedDataValues = array_values($test->providedData()); - $i = 0; - - $providedData['$_dataName'] = $test->dataName(); - - foreach ($reflector->getParameters() as $parameter) { - if (!array_key_exists($i, $providedDataValues) && $parameter->isDefaultValueAvailable()) { - $providedDataValues[$i] = $parameter->getDefaultValue(); - } - - $value = $providedDataValues[$i++] ?? null; - - if (is_object($value)) { - $value = $this->objectToString($value); - } - - if (!is_scalar($value)) { - $value = gettype($value); - - if ($value === 'NULL') { - $value = 'null'; - } - } - - if (is_bool($value) || is_int($value) || is_float($value)) { - $value = Exporter::export($value); - } - - if ($value === '') { - if ($colorize) { - $value = Color::colorize('dim,underlined', 'empty'); - } else { - $value = "''"; - } - } - - $providedData['$' . $parameter->getName()] = str_replace('$', '\\$', $value); - } - - if ($colorize) { - $providedData = array_map( - static fn (mixed $value) => Color::colorize('fg-cyan', Color::visualizeWhitespace((string) $value, true)), - $providedData, - ); - } - - return $providedData; - } - - /** - * @return non-empty-string - */ - private function objectToString(object $value): string - { - $reflector = new ReflectionObject($value); - - if ($reflector->isEnum()) { - $enumReflector = new ReflectionEnum($value); - - if ($enumReflector->isBacked()) { - return (string) $value->value; - } - - return $value->name; - } - - if ($reflector->hasMethod('__toString')) { - return $value->__toString(); - } - - return $value::class; - } - - /** - * @return array{0: string, 1: bool} - */ - private function processTestDox(TestCase $test, TestDox $testDox, bool $colorize): array - { - $placeholdersUsed = false; - - $result = $testDox->text(); - - if (str_contains($result, '$')) { - $annotation = $result; - $providedData = $this->mapTestMethodParameterNamesToProvidedDataValues($test, $colorize); - - $variables = array_map( - static fn (string $variable): string => sprintf( - '/%s(?=\b)/', - preg_quote($variable, '/'), - ), - array_keys($providedData), - ); - - $result = preg_replace($variables, $providedData, $annotation); - - $placeholdersUsed = true; - } - - return [$result, $placeholdersUsed]; - } - - /** - * @return array{0: string, 1: bool} - */ - private function processTestDoxFormatter(TestCase $test, TestDoxFormatter $formatter): array - { - $className = $formatter->className(); - $methodName = $formatter->methodName(); - $formatterIdentifier = $className . '::' . $methodName; - - if (isset($this->erroredFormatters[$formatterIdentifier])) { - return [$this->prettifyTestMethodName($test->name()), false]; - } - - if (!method_exists($className, $methodName)) { - EventFacade::emitter()->testTriggeredPhpunitError( - TestMethodBuilder::fromTestCase($test, false), - sprintf( - 'Method %s::%s() cannot be used as a TestDox formatter because it does not exist', - $className, - $methodName, - ), - ); - - $this->erroredFormatters[$formatterIdentifier] = true; - - return [$this->prettifyTestMethodName($test->name()), false]; - } - - $reflector = new ReflectionMethod($className, $methodName); - - if (!$reflector->isPublic()) { - EventFacade::emitter()->testTriggeredPhpunitError( - TestMethodBuilder::fromTestCase($test, false), - sprintf( - 'Method %s::%s() cannot be used as a TestDox formatter because it is not public', - $className, - $methodName, - ), - ); - - $this->erroredFormatters[$formatterIdentifier] = true; - - return [$this->prettifyTestMethodName($test->name()), false]; - } - - if (!$reflector->isStatic()) { - EventFacade::emitter()->testTriggeredPhpunitError( - TestMethodBuilder::fromTestCase($test, false), - sprintf( - 'Method %s::%s() cannot be used as a TestDox formatter because it is not static', - $className, - $methodName, - ), - ); - - $this->erroredFormatters[$formatterIdentifier] = true; - - return [$this->prettifyTestMethodName($test->name()), false]; - } - - try { - return [$reflector->invokeArgs(null, array_values($test->providedData())), true]; - } catch (Throwable $t) { - EventFacade::emitter()->testTriggeredPhpunitError( - TestMethodBuilder::fromTestCase($test, false), - sprintf( - 'TestDox formatter %s::%s() triggered an error: %s%s%s', - $className, - $methodName, - $t->getMessage(), - PHP_EOL, - Filter::stackTraceFromThrowableAsString($t), - ), - ); - - $this->erroredFormatters[$formatterIdentifier] = true; - - return [$this->prettifyTestMethodName($test->name()), false]; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php b/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php deleted file mode 100644 index db591ca9..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use function sprintf; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PlainTextRenderer -{ - /** - * @param array $tests - */ - public function render(array $tests): string - { - $buffer = ''; - - foreach ($tests as $prettifiedClassName => $_tests) { - $buffer .= $prettifiedClassName . "\n"; - - foreach ($this->reduce($_tests) as $prettifiedMethodName => $outcome) { - $buffer .= sprintf( - ' [%s] %s' . "\n", - $outcome, - $prettifiedMethodName, - ); - } - - $buffer .= "\n"; - } - - return $buffer; - } - - /** - * @return array - */ - private function reduce(TestResultCollection $tests): array - { - $result = []; - - foreach ($tests as $test) { - $prettifiedMethodName = $test->test()->testDox()->prettifiedMethodName(); - - $success = true; - - if ($test->status()->isError() || - $test->status()->isFailure() || - $test->status()->isIncomplete() || - $test->status()->isSkipped()) { - $success = false; - } - - if (!isset($result[$prettifiedMethodName])) { - $result[$prettifiedMethodName] = $success ? 'x' : ' '; - - continue; - } - - if ($success) { - continue; - } - - $result[$prettifiedMethodName] = ' '; - } - - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php deleted file mode 100644 index 41fc465a..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private TestResultCollector $collector; - - public function __construct(TestResultCollector $collector) - { - $this->collector = $collector; - } - - protected function collector(): TestResultCollector - { - return $this->collector; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php deleted file mode 100644 index 150a4863..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\ConsideredRiskySubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestConsideredRiskySubscriber extends Subscriber implements ConsideredRiskySubscriber -{ - public function notify(ConsideredRisky $event): void - { - $this->collector()->testConsideredRisky($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index b210ffa3..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - public function notify(Errored $event): void - { - $this->collector()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index b776227c..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - public function notify(Failed $event): void - { - $this->collector()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 14ddea33..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->collector()->testFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index 7e21545c..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - public function notify(MarkedIncomplete $event): void - { - $this->collector()->testMarkedIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php deleted file mode 100644 index 1eb1a577..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\Passed; -use PHPUnit\Event\Test\PassedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPassedSubscriber extends Subscriber implements PassedSubscriber -{ - public function notify(Passed $event): void - { - $this->collector()->testPassed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index cdaddb09..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->collector()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index 76d7e3bb..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - public function notify(Skipped $event): void - { - $this->collector()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php deleted file mode 100644 index 8e080296..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - public function notify(DeprecationTriggered $event): void - { - $this->collector()->testTriggeredDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php deleted file mode 100644 index 18eff3a9..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\NoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber -{ - public function notify(NoticeTriggered $event): void - { - $this->collector()->testTriggeredNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php deleted file mode 100644 index 082bb3c3..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpDeprecationSubscriber extends Subscriber implements PhpDeprecationTriggeredSubscriber -{ - public function notify(PhpDeprecationTriggered $event): void - { - $this->collector()->testTriggeredPhpDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php deleted file mode 100644 index b743b64a..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpNoticeSubscriber extends Subscriber implements PhpNoticeTriggeredSubscriber -{ - public function notify(PhpNoticeTriggered $event): void - { - $this->collector()->testTriggeredPhpNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php deleted file mode 100644 index 4e9c6ac1..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpWarningSubscriber extends Subscriber implements PhpWarningTriggeredSubscriber -{ - public function notify(PhpWarningTriggered $event): void - { - $this->collector()->testTriggeredPhpWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php deleted file mode 100644 index 4423ff98..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitDeprecationSubscriber extends Subscriber implements PhpunitDeprecationTriggeredSubscriber -{ - public function notify(PhpunitDeprecationTriggered $event): void - { - $this->collector()->testTriggeredPhpunitDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php deleted file mode 100644 index e4e90f18..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitErrorSubscriber extends Subscriber implements PhpunitErrorTriggeredSubscriber -{ - public function notify(PhpunitErrorTriggered $event): void - { - $this->collector()->testTriggeredPhpunitError($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php deleted file mode 100644 index 72cb8af2..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitWarningSubscriber extends Subscriber implements PhpunitWarningTriggeredSubscriber -{ - public function notify(PhpunitWarningTriggered $event): void - { - $this->collector()->testTriggeredPhpunitWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php deleted file mode 100644 index d44f4005..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\Test\WarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber -{ - public function notify(WarningTriggered $event): void - { - $this->collector()->testTriggeredWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php deleted file mode 100644 index 2648a0db..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Framework\TestStatus\TestStatus; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestResult -{ - private TestMethod $test; - private TestStatus $status; - private ?Throwable $throwable; - - public function __construct(TestMethod $test, TestStatus $status, ?Throwable $throwable) - { - $this->test = $test; - $this->status = $status; - $this->throwable = $throwable; - } - - public function test(): TestMethod - { - return $this->test; - } - - public function status(): TestStatus - { - return $this->status; - } - - /** - * @phpstan-assert-if-true !null $this->throwable - */ - public function hasThrowable(): bool - { - return $this->throwable !== null; - } - - public function throwable(): ?Throwable - { - return $this->throwable; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php deleted file mode 100644 index 5c4a4d64..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestResultCollection implements IteratorAggregate -{ - /** - * @var list - */ - private array $testResults; - - /** - * @param list $testResults - */ - public static function fromArray(array $testResults): self - { - return new self(...$testResults); - } - - private function __construct(TestResult ...$testResults) - { - $this->testResults = $testResults; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->testResults; - } - - public function getIterator(): TestResultCollectionIterator - { - return new TestResultCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php deleted file mode 100644 index cf8ae7ac..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestResultCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $testResults; - private int $position = 0; - - public function __construct(TestResultCollection $testResults) - { - $this->testResults = $testResults->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->testResults); - } - - public function key(): int - { - return $this->position; - } - - public function current(): TestResult - { - return $this->testResults[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php deleted file mode 100644 index bdf03480..00000000 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php +++ /dev/null @@ -1,383 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Logging\TestDox; - -use function array_merge; -use function assert; -use function is_subclass_of; -use function ksort; -use function uksort; -use function usort; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Facade; -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\Passed; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\Logging\TestDox\TestResult as TestDoxTestMethod; -use PHPUnit\TestRunner\IssueFilter; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestResultCollector -{ - private readonly IssueFilter $issueFilter; - - /** - * @var array> - */ - private array $tests = []; - private ?TestStatus $status = null; - private ?Throwable $throwable = null; - private bool $prepared = false; - - public function __construct(Facade $facade, IssueFilter $issueFilter) - { - $this->issueFilter = $issueFilter; - - $this->registerSubscribers($facade); - } - - /** - * @return array - */ - public function testMethodsGroupedByClass(): array - { - $result = []; - - foreach ($this->tests as $prettifiedClassName => $tests) { - $testsByDeclaringClass = []; - - foreach ($tests as $test) { - $declaringClassName = (new ReflectionMethod($test->test()->className(), $test->test()->methodName()))->getDeclaringClass()->getName(); - - if (!isset($testsByDeclaringClass[$declaringClassName])) { - $testsByDeclaringClass[$declaringClassName] = []; - } - - $testsByDeclaringClass[$declaringClassName][] = $test; - } - - foreach ($testsByDeclaringClass as $declaringClassName) { - usort( - $declaringClassName, - static function (TestDoxTestMethod $a, TestDoxTestMethod $b): int - { - return $a->test()->line() <=> $b->test()->line(); - }, - ); - } - - uksort( - $testsByDeclaringClass, - /** - * @param class-string $a - * @param class-string $b - */ - static function (string $a, string $b): int - { - if (is_subclass_of($b, $a)) { - return -1; - } - - if (is_subclass_of($a, $b)) { - return 1; - } - - return 0; - }, - ); - - $tests = []; - - foreach ($testsByDeclaringClass as $_tests) { - $tests = array_merge($tests, $_tests); - } - - $result[$prettifiedClassName] = TestResultCollection::fromArray($tests); - } - - ksort($result); - - return $result; - } - - public function testPrepared(Prepared $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->status = TestStatus::unknown(); - $this->throwable = null; - $this->prepared = true; - } - - public function testErrored(Errored $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->status = TestStatus::error($event->throwable()->message()); - $this->throwable = $event->throwable(); - - if (!$this->prepared) { - $test = $event->test(); - - assert($test instanceof TestMethod); - - $this->process($test); - } - } - - public function testFailed(Failed $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->status = TestStatus::failure($event->throwable()->message()); - $this->throwable = $event->throwable(); - } - - public function testPassed(Passed $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::success()); - } - - public function testSkipped(Skipped $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::skipped($event->message())); - } - - public function testMarkedIncomplete(MarkedIncomplete $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::incomplete($event->throwable()->message())); - - $this->throwable = $event->throwable(); - } - - public function testConsideredRisky(ConsideredRisky $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::risky()); - } - - public function testTriggeredDeprecation(DeprecationTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testTriggeredNotice(NoticeTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::notice()); - } - - public function testTriggeredWarning(WarningTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testTriggeredPhpNotice(PhpNoticeTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::notice()); - } - - public function testTriggeredPhpWarning(PhpWarningTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event, true)) { - return; - } - - if ($event->ignoredByBaseline()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - public function testTriggeredPhpunitDeprecation(PhpunitDeprecationTriggered $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testTriggeredPhpunitError(PhpunitErrorTriggered $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $this->updateTestStatus(TestStatus::error()); - } - - public function testTriggeredPhpunitWarning(PhpunitWarningTriggered $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - if ($event->ignoredByTest()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - /** - * @throws InvalidArgumentException - */ - public function testFinished(Finished $event): void - { - if (!$event->test()->isTestMethod()) { - return; - } - - $test = $event->test(); - - assert($test instanceof TestMethod); - - $this->process($test); - - $this->status = null; - $this->throwable = null; - $this->prepared = false; - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new TestConsideredRiskySubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestFinishedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestPassedSubscriber($this), - new TestPreparedSubscriber($this), - new TestSkippedSubscriber($this), - new TestTriggeredDeprecationSubscriber($this), - new TestTriggeredNoticeSubscriber($this), - new TestTriggeredPhpDeprecationSubscriber($this), - new TestTriggeredPhpNoticeSubscriber($this), - new TestTriggeredPhpunitDeprecationSubscriber($this), - new TestTriggeredPhpunitErrorSubscriber($this), - new TestTriggeredPhpunitWarningSubscriber($this), - new TestTriggeredPhpWarningSubscriber($this), - new TestTriggeredWarningSubscriber($this), - ); - } - - private function updateTestStatus(TestStatus $status): void - { - if ($this->status !== null && - $this->status->isMoreImportantThan($status)) { - return; - } - - $this->status = $status; - } - - private function process(TestMethod $test): void - { - if (!isset($this->tests[$test->testDox()->prettifiedClassName()])) { - $this->tests[$test->testDox()->prettifiedClassName()] = []; - } - - $this->tests[$test->testDox()->prettifiedClassName()][] = new TestDoxTestMethod( - $test, - $this->status, - $this->throwable, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/After.php b/vendor/phpunit/phpunit/src/Metadata/After.php deleted file mode 100644 index 14413639..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/After.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class After extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isAfter(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/AfterClass.php b/vendor/phpunit/phpunit/src/Metadata/AfterClass.php deleted file mode 100644 index 7dcb96fd..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/AfterClass.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterClass extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isAfterClass(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php b/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php deleted file mode 100644 index f6d0a9ce..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use function assert; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\CoversClass; -use PHPUnit\Metadata\CoversClassesThatExtendClass; -use PHPUnit\Metadata\CoversClassesThatImplementInterface; -use PHPUnit\Metadata\CoversFunction; -use PHPUnit\Metadata\CoversMethod; -use PHPUnit\Metadata\CoversNamespace; -use PHPUnit\Metadata\CoversTrait; -use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\Metadata\UsesClass; -use PHPUnit\Metadata\UsesClassesThatExtendClass; -use PHPUnit\Metadata\UsesClassesThatImplementInterface; -use PHPUnit\Metadata\UsesFunction; -use PHPUnit\Metadata\UsesMethod; -use PHPUnit\Metadata\UsesNamespace; -use PHPUnit\Metadata\UsesTrait; -use SebastianBergmann\CodeCoverage\Test\Target\Target; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CodeCoverage -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function coversTargets(string $className, string $methodName): TargetCollection - { - $targets = []; - - foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversNamespace()) { - assert($metadata instanceof CoversNamespace); - - $targets[] = Target::forNamespace($metadata->namespace()); - } - - if ($metadata->isCoversClass()) { - assert($metadata instanceof CoversClass); - - $targets[] = Target::forClass($metadata->className()); - } - - if ($metadata->isCoversClassesThatExtendClass()) { - assert($metadata instanceof CoversClassesThatExtendClass); - - $targets[] = Target::forClassesThatExtendClass($metadata->className()); - } - - if ($metadata->isCoversClassesThatImplementInterface()) { - assert($metadata instanceof CoversClassesThatImplementInterface); - - $targets[] = Target::forClassesThatImplementInterface($metadata->interfaceName()); - } - - if ($metadata->isCoversMethod()) { - assert($metadata instanceof CoversMethod); - - $targets[] = Target::forMethod($metadata->className(), $metadata->methodName()); - } - - if ($metadata->isCoversFunction()) { - assert($metadata instanceof CoversFunction); - - $targets[] = Target::forFunction($metadata->functionName()); - } - - if ($metadata->isCoversTrait()) { - assert($metadata instanceof CoversTrait); - - $targets[] = Target::forTrait($metadata->traitName()); - } - } - - return TargetCollection::fromArray($targets); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function usesTargets(string $className, string $methodName): TargetCollection - { - $targets = []; - - foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isUsesNamespace()) { - assert($metadata instanceof UsesNamespace); - - $targets[] = Target::forNamespace($metadata->namespace()); - } - - if ($metadata->isUsesClass()) { - assert($metadata instanceof UsesClass); - - $targets[] = Target::forClass($metadata->className()); - } - - if ($metadata->isUsesClassesThatExtendClass()) { - assert($metadata instanceof UsesClassesThatExtendClass); - - $targets[] = Target::forClassesThatExtendClass($metadata->className()); - } - - if ($metadata->isUsesClassesThatImplementInterface()) { - assert($metadata instanceof UsesClassesThatImplementInterface); - - $targets[] = Target::forClassesThatImplementInterface($metadata->interfaceName()); - } - - if ($metadata->isUsesMethod()) { - assert($metadata instanceof UsesMethod); - - $targets[] = Target::forMethod($metadata->className(), $metadata->methodName()); - } - - if ($metadata->isUsesFunction()) { - assert($metadata instanceof UsesFunction); - - $targets[] = Target::forFunction($metadata->functionName()); - } - - if ($metadata->isUsesTrait()) { - assert($metadata instanceof UsesTrait); - - $targets[] = Target::forTrait($metadata->traitName()); - } - } - - return TargetCollection::fromArray($targets); - } - - public function shouldCodeCoverageBeCollectedFor(TestCase $test): bool - { - $className = $test::class; - $methodName = $test->name(); - $parser = Registry::parser(); - - if ($parser->forMethod($className, $methodName)->isCoversNothing()->isNotEmpty()) { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - $test->valueObjectForEvents(), - 'Using #[CoversNothing] on a test method is deprecated, support for this will be removed in PHPUnit 13', - ); - - return false; - } - - if ($parser->forClass($className)->isCoversNothing()->isNotEmpty()) { - return false; - } - - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php b/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php deleted file mode 100644 index 345672b8..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php +++ /dev/null @@ -1,361 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use function array_key_exists; -use function assert; -use function count; -use function get_debug_type; -use function is_array; -use function is_int; -use function is_iterable; -use function is_string; -use function sprintf; -use PHPUnit\Event; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Framework\InvalidDataProviderException; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\DataProvider as DataProviderMetadata; -use PHPUnit\Metadata\MetadataCollection; -use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; -use PHPUnit\Metadata\TestWith; -use PHPUnit\Util\Test; -use ReflectionMethod; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataProvider -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @throws InvalidDataProviderException - * - * @return ?array - */ - public function providedData(string $className, string $methodName): ?array - { - $metadataCollection = MetadataRegistry::parser()->forMethod($className, $methodName); - $dataProvider = $metadataCollection->isDataProvider(); - $testWith = $metadataCollection->isTestWith(); - - if ($dataProvider->isEmpty() && $testWith->isEmpty()) { - return null; - } - - $testMethod = new ReflectionMethod($className, $methodName); - - if ($dataProvider->isNotEmpty()) { - if ($testWith->isNotEmpty()) { - $this->triggerWarningForMixingOfDataProviderAndTestWith($testMethod); - } - - return $this->dataProvidedByMethods($className, $testMethod, $dataProvider); - } - - return $this->dataProvidedByMetadata($testMethod, $testWith); - } - - /** - * @param class-string $testClassName - * - * @throws InvalidDataProviderException - * - * @return array - */ - private function dataProvidedByMethods(string $testClassName, ReflectionMethod $testMethod, MetadataCollection $dataProvider): array - { - $testMethodValueObject = new Event\Code\ClassMethod( - $testClassName, - $testMethod->getName(), - ); - - $methodsCalled = []; - $result = []; - $testMethodNumberOfParameters = $testMethod->getNumberOfParameters(); - $testMethodIsNonVariadic = !$testMethod->isVariadic(); - - foreach ($dataProvider as $_dataProvider) { - assert($_dataProvider instanceof DataProviderMetadata); - - $providerLabel = $_dataProvider->className() . '::' . $_dataProvider->methodName(); - $dataProviderMethod = new Event\Code\ClassMethod($_dataProvider->className(), $_dataProvider->methodName()); - $validateArgumentCount = $testMethodIsNonVariadic && $_dataProvider->validateArgumentCount(); - - Event\Facade::emitter()->dataProviderMethodCalled( - $testMethodValueObject, - $dataProviderMethod, - ); - - $methodsCalled[] = $dataProviderMethod; - - try { - $method = new ReflectionMethod($_dataProvider->className(), $_dataProvider->methodName()); - $className = $_dataProvider->className(); - $methodName = $_dataProvider->methodName(); - - if (Test::isTestMethod($method)) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Method %s::%s() used by test method %s::%s() is also a test method', - $_dataProvider->className(), - $_dataProvider->methodName(), - $testMethod->getDeclaringClass()->getName(), - $testMethod->getName(), - ), - ); - } - - if (!$method->isPublic()) { - throw new InvalidDataProviderException( - sprintf( - 'Data Provider method %s::%s() is not public', - $className, - $methodName, - ), - ); - } - - if (!$method->isStatic()) { - throw new InvalidDataProviderException( - sprintf( - 'Data Provider method %s::%s() is not static', - $className, - $methodName, - ), - ); - } - - if ($method->getNumberOfParameters() > 0) { - throw new InvalidDataProviderException( - sprintf( - 'Data Provider method %s::%s() expects an argument', - $className, - $methodName, - ), - ); - } - - /** @phpstan-ignore staticMethod.dynamicName */ - $data = $className::$methodName(); - - if (!is_iterable($data)) { - throw new InvalidDataProviderException( - sprintf( - 'Data Provider method %s::%s() does not return an iterable', - $className, - $methodName, - ), - ); - } - } catch (Throwable $e) { - Event\Facade::emitter()->dataProviderMethodFinished( - $testMethodValueObject, - ...$methodsCalled, - ); - - throw InvalidDataProviderException::forException($e, $providerLabel); - } - - foreach ($data as $key => $value) { - if (!is_int($key) && !is_string($key)) { - Event\Facade::emitter()->dataProviderMethodFinished( - $testMethodValueObject, - ...$methodsCalled, - ); - - throw new InvalidDataProviderException( - sprintf( - 'The key must be an integer or a string, %s given', - get_debug_type($key), - ), - ); - } - - if (!is_array($value)) { - Event\Facade::emitter()->dataProviderMethodFinished( - $testMethodValueObject, - ...$methodsCalled, - ); - - throw new InvalidDataProviderException( - sprintf( - 'Data set %s provided by %s is invalid, expected array but got %s', - $this->formatKey($key), - $providerLabel, - get_debug_type($value), - ), - ); - } - - if ($validateArgumentCount && $testMethodNumberOfParameters < count($value)) { - $this->triggerWarningForArgumentCount( - $testMethod, - $this->formatKey($key), - $providerLabel, - count($value), - $testMethodNumberOfParameters, - ); - } - - if (is_int($key)) { - $result[] = new ProvidedData($providerLabel, $value); - - continue; - } - - if (array_key_exists($key, $result)) { - Event\Facade::emitter()->dataProviderMethodFinished( - $testMethodValueObject, - ...$methodsCalled, - ); - - throw new InvalidDataProviderException( - sprintf( - 'The key "%s" has already been defined by provider %s', - $key, - $result[$key]->label(), - ), - ); - } - - $result[$key] = new ProvidedData($providerLabel, $value); - } - } - - Event\Facade::emitter()->dataProviderMethodFinished( - $testMethodValueObject, - ...$methodsCalled, - ); - - if ($result === []) { - throw new InvalidDataProviderException( - 'Empty data set provided by data provider', - ); - } - - return $result; - } - - /** - * @return array - */ - private function dataProvidedByMetadata(ReflectionMethod $testMethod, MetadataCollection $testWith): array - { - $result = []; - - foreach ($testWith as $i => $_testWith) { - assert($_testWith instanceof TestWith); - - $providerLabel = sprintf('TestWith#%s attribute', $i); - - if ($_testWith->hasName()) { - $key = $_testWith->name(); - - if (array_key_exists($key, $result)) { - throw new InvalidDataProviderException( - sprintf( - 'The key "%s" has already been defined by %s', - $key, - $result[$key]->label(), - ), - ); - } - - $result[$key] = new ProvidedData($providerLabel, $_testWith->data()); - } else { - $result[] = new ProvidedData($providerLabel, $_testWith->data()); - } - } - - $testMethodNumberOfParameters = $testMethod->getNumberOfParameters(); - $testMethodIsNonVariadic = !$testMethod->isVariadic(); - - foreach ($result as $key => $providedData) { - $value = $providedData->value(); - - if (!is_array($value)) { - throw new InvalidDataProviderException( - sprintf( - 'Data set %s provided by %s is invalid, expected array but got %s', - $this->formatKey($key), - $providedData->label(), - get_debug_type($value), - ), - ); - } - - if ($testMethodIsNonVariadic && $testMethodNumberOfParameters < count($value)) { - $this->triggerWarningForArgumentCount( - $testMethod, - $this->formatKey($key), - $providedData->label(), - count($value), - $testMethodNumberOfParameters, - ); - } - } - - return $result; - } - - /** - * @param int|non-empty-string $key - * - * @return non-empty-string - */ - private function formatKey(int|string $key): string - { - return is_int($key) ? '#' . $key : '"' . $key . '"'; - } - - private function triggerWarningForMixingOfDataProviderAndTestWith(ReflectionMethod $method): void - { - Event\Facade::emitter()->testTriggeredPhpunitWarning( - $this->testValueObject($method), - 'Mixing #[DataProvider*] and #[TestWith*] attributes is not supported, only the data provided by #[DataProvider*] will be used', - ); - } - - private function triggerWarningForArgumentCount(ReflectionMethod $method, string $key, string $label, int $numberOfValues, int $testMethodNumberOfParameters): void - { - Event\Facade::emitter()->testTriggeredPhpunitWarning( - $this->testValueObject($method), - sprintf( - 'Data set %s provided by %s has more arguments (%d) than the test method accepts (%d)', - $key, - $label, - $numberOfValues, - $testMethodNumberOfParameters, - ), - ); - } - - private function testValueObject(ReflectionMethod $method): TestMethod - { - return new TestMethod( - $method->getDeclaringClass()->getName(), - $method->getName(), - $method->getFileName(), - $method->getStartLine(), - Event\Code\TestDoxBuilder::fromClassNameAndMethodName( - $method->getDeclaringClass()->getName(), - $method->getName(), - ), - MetadataCollection::fromArray([]), - Event\TestData\TestDataCollection::fromArray([]), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/Dependencies.php b/vendor/phpunit/phpunit/src/Metadata/Api/Dependencies.php deleted file mode 100644 index 3ba35568..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/Dependencies.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use function assert; -use PHPUnit\Framework\ExecutionOrderDependency; -use PHPUnit\Metadata\DependsOnClass; -use PHPUnit\Metadata\DependsOnMethod; -use PHPUnit\Metadata\Parser\Registry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Dependencies -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @return list - */ - public static function dependencies(string $className, string $methodName): array - { - $dependencies = []; - - foreach (Registry::parser()->forClassAndMethod($className, $methodName)->isDepends() as $metadata) { - if ($metadata->isDependsOnClass()) { - assert($metadata instanceof DependsOnClass); - - $dependencies[] = ExecutionOrderDependency::forClass($metadata); - - continue; - } - - assert($metadata instanceof DependsOnMethod); - - if ($metadata->methodName() === '') { - $dependencies[] = ExecutionOrderDependency::invalid(); - - continue; - } - - $dependencies[] = ExecutionOrderDependency::forMethod($metadata); - } - - return $dependencies; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php b/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php deleted file mode 100644 index aa2cbf43..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use function array_flip; -use function array_key_exists; -use function array_unique; -use function assert; -use function strtolower; -use function trim; -use PHPUnit\Framework\TestSize\TestSize; -use PHPUnit\Metadata\CoversClass; -use PHPUnit\Metadata\CoversFunction; -use PHPUnit\Metadata\Group; -use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\Metadata\RequiresPhpExtension; -use PHPUnit\Metadata\UsesClass; -use PHPUnit\Metadata\UsesFunction; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Groups -{ - /** - * @var array> - */ - private static array $groupCache = []; - - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @return list - */ - public function groups(string $className, string $methodName, bool $includeVirtual = true): array - { - $key = $className . '::' . $methodName . '::' . $includeVirtual; - - if (array_key_exists($key, self::$groupCache)) { - return self::$groupCache[$key]; - } - - $groups = []; - - foreach (Registry::parser()->forClassAndMethod($className, $methodName)->isGroup() as $group) { - assert($group instanceof Group); - - $groups[] = $group->groupName(); - } - - if (!$includeVirtual) { - return self::$groupCache[$key] = array_unique($groups); - } - - foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversClass()) { - assert($metadata instanceof CoversClass); - - $groups[] = '__phpunit_covers_' . $this->canonicalizeName($metadata->className()); - - continue; - } - - if ($metadata->isCoversFunction()) { - assert($metadata instanceof CoversFunction); - - $groups[] = '__phpunit_covers_' . $this->canonicalizeName($metadata->functionName()); - - continue; - } - - if ($metadata->isUsesClass()) { - assert($metadata instanceof UsesClass); - - $groups[] = '__phpunit_uses_' . $this->canonicalizeName($metadata->className()); - - continue; - } - - if ($metadata->isUsesFunction()) { - assert($metadata instanceof UsesFunction); - - $groups[] = '__phpunit_uses_' . $this->canonicalizeName($metadata->functionName()); - - continue; - } - - if ($metadata->isRequiresPhpExtension()) { - assert($metadata instanceof RequiresPhpExtension); - - $groups[] = '__phpunit_requires_php_extension' . $this->canonicalizeName($metadata->extension()); - } - } - - return self::$groupCache[$key] = array_unique($groups); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function size(string $className, string $methodName): TestSize - { - $groups = array_flip($this->groups($className, $methodName)); - - if (isset($groups['large'])) { - return TestSize::large(); - } - - if (isset($groups['medium'])) { - return TestSize::medium(); - } - - if (isset($groups['small'])) { - return TestSize::small(); - } - - return TestSize::unknown(); - } - - private function canonicalizeName(string $name): string - { - return strtolower(trim($name, '\\')); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/HookMethods.php b/vendor/phpunit/phpunit/src/Metadata/Api/HookMethods.php deleted file mode 100644 index 8981459a..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/HookMethods.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use function assert; -use function class_exists; -use function in_array; -use function strtolower; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\After; -use PHPUnit\Metadata\AfterClass; -use PHPUnit\Metadata\Before; -use PHPUnit\Metadata\BeforeClass; -use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\Metadata\PostCondition; -use PHPUnit\Metadata\PreCondition; -use PHPUnit\Runner\HookMethod; -use PHPUnit\Runner\HookMethodCollection; -use PHPUnit\Util\Reflection; -use ReflectionClass; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HookMethods -{ - /** - * @var array - */ - private static array $hookMethods = []; - - /** - * @param class-string $className - * - * @return array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} - */ - public function hookMethods(string $className): array - { - if (!class_exists($className)) { - return self::emptyHookMethodsArray(); - } - - if (isset(self::$hookMethods[$className])) { - return self::$hookMethods[$className]; - } - - self::$hookMethods[$className] = self::emptyHookMethodsArray(); - - foreach (Reflection::methodsDeclaredDirectlyInTestClass(new ReflectionClass($className)) as $method) { - $methodName = $method->getName(); - $metadata = Registry::parser()->forMethod($className, $methodName); - - if ($method->isStatic()) { - if ($metadata->isBeforeClass()->isNotEmpty()) { - $beforeClass = $metadata->isBeforeClass()->asArray()[0]; - assert($beforeClass instanceof BeforeClass); - - self::$hookMethods[$className]['beforeClass']->add( - new HookMethod($methodName, $beforeClass->priority()), - ); - } - - if ($metadata->isAfterClass()->isNotEmpty()) { - $afterClass = $metadata->isAfterClass()->asArray()[0]; - assert($afterClass instanceof AfterClass); - - self::$hookMethods[$className]['afterClass']->add( - new HookMethod($methodName, $afterClass->priority()), - ); - } - } - - if ($metadata->isBefore()->isNotEmpty()) { - $before = $metadata->isBefore()->asArray()[0]; - assert($before instanceof Before); - - self::$hookMethods[$className]['before']->add( - new HookMethod($methodName, $before->priority()), - ); - } - - if ($metadata->isPreCondition()->isNotEmpty()) { - $preCondition = $metadata->isPreCondition()->asArray()[0]; - assert($preCondition instanceof PreCondition); - - self::$hookMethods[$className]['preCondition']->add( - new HookMethod($methodName, $preCondition->priority()), - ); - } - - if ($metadata->isPostCondition()->isNotEmpty()) { - $postCondition = $metadata->isPostCondition()->asArray()[0]; - assert($postCondition instanceof PostCondition); - - self::$hookMethods[$className]['postCondition']->add( - new HookMethod($methodName, $postCondition->priority()), - ); - } - - if ($metadata->isAfter()->isNotEmpty()) { - $after = $metadata->isAfter()->asArray()[0]; - assert($after instanceof After); - - self::$hookMethods[$className]['after']->add( - new HookMethod($methodName, $after->priority()), - ); - } - } - - return self::$hookMethods[$className]; - } - - public function isHookMethod(ReflectionMethod $method): bool - { - $defaultNames = [ - 'setupbeforeclass', - 'setup', - 'assertpreconditions', - 'assertpostconditions', - 'teardown', - 'teardownafterclass', - ]; - - if (in_array(strtolower($method->getName()), $defaultNames, true)) { - return true; - } - - $metadata = Registry::parser()->forMethod($method->getDeclaringClass()->getName(), $method->getName()); - - return $metadata->isBeforeClass()->isNotEmpty() || - $metadata->isBefore()->isNotEmpty() || - $metadata->isPreCondition()->isNotEmpty() || - $metadata->isPostCondition()->isNotEmpty() || - $metadata->isAfter()->isNotEmpty() || - $metadata->isAfterClass()->isNotEmpty(); - } - - /** - * @return array{beforeClass: HookMethodCollection, before: HookMethodCollection, preCondition: HookMethodCollection, postCondition: HookMethodCollection, after: HookMethodCollection, afterClass: HookMethodCollection} - */ - private function emptyHookMethodsArray(): array - { - return [ - 'beforeClass' => HookMethodCollection::defaultBeforeClass(), - 'before' => HookMethodCollection::defaultBefore(), - 'preCondition' => HookMethodCollection::defaultPreCondition(), - 'postCondition' => HookMethodCollection::defaultPostCondition(), - 'after' => HookMethodCollection::defaultAfter(), - 'afterClass' => HookMethodCollection::defaultAfterClass(), - ]; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/ProvidedData.php b/vendor/phpunit/phpunit/src/Metadata/Api/ProvidedData.php deleted file mode 100644 index 7d21766b..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/ProvidedData.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ProvidedData -{ - /** - * @var non-empty-string - */ - private string $label; - private mixed $value; - - /** - * @param non-empty-string $label - */ - public function __construct(string $label, mixed $value) - { - $this->label = $label; - $this->value = $value; - } - - /** - * @return non-empty-string - */ - public function label(): string - { - return $this->label; - } - - public function value(): mixed - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php b/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php deleted file mode 100644 index c6870ca7..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php +++ /dev/null @@ -1,213 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Api; - -use const PHP_OS; -use const PHP_OS_FAMILY; -use const PHP_VERSION; -use function addcslashes; -use function array_column; -use function array_key_exists; -use function assert; -use function extension_loaded; -use function function_exists; -use function in_array; -use function ini_get; -use function method_exists; -use function phpversion; -use function preg_match; -use function sprintf; -use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\Metadata\RequiresEnvironmentVariable; -use PHPUnit\Metadata\RequiresFunction; -use PHPUnit\Metadata\RequiresMethod; -use PHPUnit\Metadata\RequiresOperatingSystem; -use PHPUnit\Metadata\RequiresOperatingSystemFamily; -use PHPUnit\Metadata\RequiresPhp; -use PHPUnit\Metadata\RequiresPhpExtension; -use PHPUnit\Metadata\RequiresPhpunit; -use PHPUnit\Metadata\RequiresPhpunitExtension; -use PHPUnit\Metadata\RequiresSetting; -use PHPUnit\Runner\Version; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Requirements -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @return list - */ - public function requirementsNotSatisfiedFor(string $className, string $methodName): array - { - $notSatisfied = []; - - foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isRequiresPhp()) { - assert($metadata instanceof RequiresPhp); - - if (!$metadata->versionRequirement()->isSatisfiedBy(PHP_VERSION)) { - $notSatisfied[] = sprintf( - 'PHP %s is required.', - $metadata->versionRequirement()->asString(), - ); - } - } - - if ($metadata->isRequiresPhpExtension()) { - assert($metadata instanceof RequiresPhpExtension); - - $extensionVersion = phpversion($metadata->extension()); - - if ($extensionVersion === false) { - $extensionVersion = ''; - } - - if (!extension_loaded($metadata->extension()) || - ($metadata->hasVersionRequirement() && - !$metadata->versionRequirement()->isSatisfiedBy($extensionVersion))) { - $notSatisfied[] = sprintf( - 'PHP extension %s%s is required.', - $metadata->extension(), - $metadata->hasVersionRequirement() ? (' ' . $metadata->versionRequirement()->asString()) : '', - ); - } - } - - if ($metadata->isRequiresPhpunit()) { - assert($metadata instanceof RequiresPhpunit); - - if (!$metadata->versionRequirement()->isSatisfiedBy(Version::id())) { - $notSatisfied[] = sprintf( - 'PHPUnit %s is required.', - $metadata->versionRequirement()->asString(), - ); - } - } - - if ($metadata->isRequiresPhpunitExtension()) { - assert($metadata instanceof RequiresPhpunitExtension); - - $configuration = ConfigurationRegistry::get(); - - $extensionBootstrappers = array_column($configuration->extensionBootstrappers(), 'className'); - - if ($configuration->noExtensions() || !in_array($metadata->extensionClass(), $extensionBootstrappers, true)) { - $notSatisfied[] = sprintf( - 'PHPUnit extension "%s" is required.', - $metadata->extensionClass(), - ); - } - } - - if ($metadata->isRequiresEnvironmentVariable()) { - assert($metadata instanceof RequiresEnvironmentVariable); - - if (!array_key_exists($metadata->environmentVariableName(), $_ENV) || - $metadata->value() === null && $_ENV[$metadata->environmentVariableName()] === '') { - $notSatisfied[] = sprintf('Environment variable "%s" is required.', $metadata->environmentVariableName()); - - continue; - } - - if ($metadata->value() !== null && $_ENV[$metadata->environmentVariableName()] !== $metadata->value()) { - $notSatisfied[] = sprintf( - 'Environment variable "%s" is required to be "%s".', - $metadata->environmentVariableName(), - $metadata->value(), - ); - } - } - - if ($metadata->isRequiresOperatingSystemFamily()) { - assert($metadata instanceof RequiresOperatingSystemFamily); - - if ($metadata->operatingSystemFamily() !== PHP_OS_FAMILY) { - $notSatisfied[] = sprintf( - 'Operating system %s is required.', - $metadata->operatingSystemFamily(), - ); - } - } - - if ($metadata->isRequiresOperatingSystem()) { - assert($metadata instanceof RequiresOperatingSystem); - - $pattern = sprintf( - '/%s/i', - addcslashes($metadata->operatingSystem(), '/'), - ); - - if (preg_match($pattern, PHP_OS) === 0) { - $notSatisfied[] = sprintf( - 'Operating system %s is required.', - $metadata->operatingSystem(), - ); - } - } - - if ($metadata->isRequiresFunction()) { - assert($metadata instanceof RequiresFunction); - - if (!function_exists($metadata->functionName())) { - $notSatisfied[] = sprintf( - 'Function %s() is required.', - $metadata->functionName(), - ); - } - } - - if ($metadata->isRequiresMethod()) { - assert($metadata instanceof RequiresMethod); - - if (!method_exists($metadata->className(), $metadata->methodName())) { - $notSatisfied[] = sprintf( - 'Method %s::%s() is required.', - $metadata->className(), - $metadata->methodName(), - ); - } - } - - if ($metadata->isRequiresSetting()) { - assert($metadata instanceof RequiresSetting); - - if (ini_get($metadata->setting()) !== $metadata->value()) { - $notSatisfied[] = sprintf( - 'Setting "%s" is required to be "%s".', - $metadata->setting(), - $metadata->value(), - ); - } - } - } - - return $notSatisfied; - } - - public function requiresXdebug(string $className, string $methodName): bool - { - foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isRequiresPhpExtension()) { - if ($metadata->extension() === 'xdebug') { - return true; - } - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php b/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php deleted file mode 100644 index 5d947844..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BackupGlobals extends Metadata -{ - private bool $enabled; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, bool $enabled) - { - parent::__construct($level); - - $this->enabled = $enabled; - } - - public function isBackupGlobals(): true - { - return true; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php b/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php deleted file mode 100644 index a07698ee..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BackupStaticProperties extends Metadata -{ - private bool $enabled; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, bool $enabled) - { - parent::__construct($level); - - $this->enabled = $enabled; - } - - public function isBackupStaticProperties(): true - { - return true; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Before.php b/vendor/phpunit/phpunit/src/Metadata/Before.php deleted file mode 100644 index 08372f76..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Before.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Before extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isBefore(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php b/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php deleted file mode 100644 index c5646320..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeClass extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isBeforeClass(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClass.php b/vendor/phpunit/phpunit/src/Metadata/CoversClass.php deleted file mode 100644 index e573952b..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClass.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversClass extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param int<0, 1> $level - * @param class-string $className - */ - protected function __construct(int $level, string $className) - { - parent::__construct($level); - - $this->className = $className; - } - - public function isCoversClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php deleted file mode 100644 index 7feb40d7..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversClassesThatExtendClass extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param int<0, 1> $level - * @param class-string $className - */ - protected function __construct(int $level, string $className) - { - parent::__construct($level); - - $this->className = $className; - } - - public function isCoversClassesThatExtendClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php deleted file mode 100644 index e980801e..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversClassesThatImplementInterface extends Metadata -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param int<0, 1> $level - * @param class-string $interfaceName - */ - protected function __construct(int $level, string $interfaceName) - { - parent::__construct($level); - - $this->interfaceName = $interfaceName; - } - - public function isCoversClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php b/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php deleted file mode 100644 index 4e953601..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversFunction extends Metadata -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param int<0, 1> $level - * @param non-empty-string $functionName - */ - protected function __construct(int $level, string $functionName) - { - parent::__construct($level); - - $this->functionName = $functionName; - } - - public function isCoversFunction(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php b/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php deleted file mode 100644 index 73092ff7..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversMethod extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - } - - public function isCoversMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php b/vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php deleted file mode 100644 index ef7452a6..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversNamespace extends Metadata -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param int<0, 1> $level - * @param non-empty-string $namespace - */ - protected function __construct(int $level, string $namespace) - { - parent::__construct($level); - - $this->namespace = $namespace; - } - - public function isCoversNamespace(): true - { - return true; - } - - /** - * @return class-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversNothing.php b/vendor/phpunit/phpunit/src/Metadata/CoversNothing.php deleted file mode 100644 index c81e7276..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversNothing.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversNothing extends Metadata -{ - public function isCoversNothing(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php b/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php deleted file mode 100644 index 2cad9dfb..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversTrait extends Metadata -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param 0|1 $level - * @param trait-string $traitName - */ - protected function __construct(int $level, string $traitName) - { - parent::__construct($level); - - $this->traitName = $traitName; - } - - public function isCoversTrait(): true - { - return true; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/DataProvider.php b/vendor/phpunit/phpunit/src/Metadata/DataProvider.php deleted file mode 100644 index ca048bba..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/DataProvider.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DataProvider extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - private bool $validateArgumentCount; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName, bool $validateArgumentCount) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - $this->validateArgumentCount = $validateArgumentCount; - } - - public function isDataProvider(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function validateArgumentCount(): bool - { - return $this->validateArgumentCount; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php b/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php deleted file mode 100644 index fbc40fd1..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DependsOnClass extends Metadata -{ - /** - * @var class-string - */ - private string $className; - private bool $deepClone; - private bool $shallowClone; - - /** - * @param int<0, 1> $level - * @param class-string $className - */ - protected function __construct(int $level, string $className, bool $deepClone, bool $shallowClone) - { - parent::__construct($level); - - $this->className = $className; - $this->deepClone = $deepClone; - $this->shallowClone = $shallowClone; - } - - public function isDependsOnClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - public function deepClone(): bool - { - return $this->deepClone; - } - - public function shallowClone(): bool - { - return $this->shallowClone; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php b/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php deleted file mode 100644 index 82056a99..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DependsOnMethod extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - private bool $deepClone; - private bool $shallowClone; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName, bool $deepClone, bool $shallowClone) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - $this->deepClone = $deepClone; - $this->shallowClone = $shallowClone; - } - - public function isDependsOnMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function deepClone(): bool - { - return $this->deepClone; - } - - public function shallowClone(): bool - { - return $this->shallowClone; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/DisableReturnValueGenerationForTestDoubles.php b/vendor/phpunit/phpunit/src/Metadata/DisableReturnValueGenerationForTestDoubles.php deleted file mode 100644 index 59cf34e2..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/DisableReturnValueGenerationForTestDoubles.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DisableReturnValueGenerationForTestDoubles extends Metadata -{ - public function isDisableReturnValueGenerationForTestDoubles(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/DoesNotPerformAssertions.php b/vendor/phpunit/phpunit/src/Metadata/DoesNotPerformAssertions.php deleted file mode 100644 index e2925c85..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/DoesNotPerformAssertions.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DoesNotPerformAssertions extends Metadata -{ - public function isDoesNotPerformAssertions(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/Exception.php b/vendor/phpunit/phpunit/src/Metadata/Exception/Exception.php deleted file mode 100644 index 5d562f1a..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Exception/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidAttributeException.php b/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidAttributeException.php deleted file mode 100644 index 9158de32..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidAttributeException.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidAttributeException extends RuntimeException implements Exception -{ - /** - * @param non-empty-string $attributeName - * @param non-empty-string $target - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $message - */ - public function __construct(string $attributeName, string $target, string $file, int $line, string $message) - { - parent::__construct( - sprintf( - 'Invalid attribute %s for %s in %s:%d%s%s', - $attributeName, - $target, - $file, - $line, - PHP_EOL, - $message, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php b/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php deleted file mode 100644 index 359f723c..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidVersionRequirementException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php b/vendor/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php deleted file mode 100644 index 299652cf..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class NoVersionRequirementException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php b/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php deleted file mode 100644 index 4f646dbd..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExcludeGlobalVariableFromBackup extends Metadata -{ - /** - * @var non-empty-string - */ - private string $globalVariableName; - - /** - * @param int<0, 1> $level - * @param non-empty-string $globalVariableName - */ - protected function __construct(int $level, string $globalVariableName) - { - parent::__construct($level); - - $this->globalVariableName = $globalVariableName; - } - - public function isExcludeGlobalVariableFromBackup(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function globalVariableName(): string - { - return $this->globalVariableName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php b/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php deleted file mode 100644 index 21725e93..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExcludeStaticPropertyFromBackup extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $propertyName; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $propertyName - */ - protected function __construct(int $level, string $className, string $propertyName) - { - parent::__construct($level); - - $this->className = $className; - $this->propertyName = $propertyName; - } - - public function isExcludeStaticPropertyFromBackup(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function propertyName(): string - { - return $this->propertyName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Group.php b/vendor/phpunit/phpunit/src/Metadata/Group.php deleted file mode 100644 index 2ee2784f..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Group.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Group extends Metadata -{ - /** - * @var non-empty-string - */ - private string $groupName; - - /** - * @param int<0, 1> $level - * @param non-empty-string $groupName - */ - protected function __construct(int $level, string $groupName) - { - parent::__construct($level); - - $this->groupName = $groupName; - } - - public function isGroup(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function groupName(): string - { - return $this->groupName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php b/vendor/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php deleted file mode 100644 index be0f3a37..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IgnoreDeprecations extends Metadata -{ - /** @var null|non-empty-string */ - private ?string $messagePattern; - - /** - * @param int<0, 1> $level - * @param null|non-empty-string $messagePattern - */ - protected function __construct(int $level, null|string $messagePattern) - { - parent::__construct($level); - - $this->messagePattern = $messagePattern; - } - - public function isIgnoreDeprecations(): true - { - return true; - } - - /** - * @return null|non-empty-string - */ - public function messagePattern(): ?string - { - return $this->messagePattern; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php b/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php deleted file mode 100644 index 5abcfa48..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IgnorePhpunitDeprecations extends Metadata -{ - public function isIgnorePhpunitDeprecations(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitWarnings.php b/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitWarnings.php deleted file mode 100644 index e5f6ef52..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/IgnorePhpunitWarnings.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IgnorePhpunitWarnings extends Metadata -{ - /** @var null|non-empty-string */ - private ?string $messagePattern; - - /** - * @param int<0, 1> $level - * @param null|non-empty-string $messagePattern - */ - protected function __construct(int $level, null|string $messagePattern) - { - parent::__construct($level); - - $this->messagePattern = $messagePattern; - } - - public function isIgnorePhpunitWarnings(): true - { - return true; - } - - /** - * @return null|non-empty-string - */ - public function messagePattern(): ?string - { - return $this->messagePattern; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Metadata.php b/vendor/phpunit/phpunit/src/Metadata/Metadata.php deleted file mode 100644 index 01413e64..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Metadata.php +++ /dev/null @@ -1,1010 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use PHPUnit\Metadata\Version\Requirement; -use PHPUnit\Runner\Extension\Extension; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Metadata -{ - private const int CLASS_LEVEL = 0; - private const int METHOD_LEVEL = 1; - - /** - * @var int<0, 1> - */ - private int $level; - - public static function after(int $priority): After - { - return new After(self::METHOD_LEVEL, $priority); - } - - public static function afterClass(int $priority): AfterClass - { - return new AfterClass(self::METHOD_LEVEL, $priority); - } - - public static function backupGlobalsOnClass(bool $enabled): BackupGlobals - { - return new BackupGlobals(self::CLASS_LEVEL, $enabled); - } - - public static function backupGlobalsOnMethod(bool $enabled): BackupGlobals - { - return new BackupGlobals(self::METHOD_LEVEL, $enabled); - } - - public static function backupStaticPropertiesOnClass(bool $enabled): BackupStaticProperties - { - return new BackupStaticProperties(self::CLASS_LEVEL, $enabled); - } - - public static function backupStaticPropertiesOnMethod(bool $enabled): BackupStaticProperties - { - return new BackupStaticProperties(self::METHOD_LEVEL, $enabled); - } - - public static function before(int $priority): Before - { - return new Before(self::METHOD_LEVEL, $priority); - } - - public static function beforeClass(int $priority): BeforeClass - { - return new BeforeClass(self::METHOD_LEVEL, $priority); - } - - /** - * @param non-empty-string $namespace - */ - public static function coversNamespace(string $namespace): CoversNamespace - { - return new CoversNamespace(self::CLASS_LEVEL, $namespace); - } - - /** - * @param class-string $className - */ - public static function coversClass(string $className): CoversClass - { - return new CoversClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $className - */ - public static function coversClassesThatExtendClass(string $className): CoversClassesThatExtendClass - { - return new CoversClassesThatExtendClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $interfaceName - */ - public static function coversClassesThatImplementInterface(string $interfaceName): CoversClassesThatImplementInterface - { - return new CoversClassesThatImplementInterface(self::CLASS_LEVEL, $interfaceName); - } - - /** - * @param trait-string $traitName - */ - public static function coversTrait(string $traitName): CoversTrait - { - return new CoversTrait(self::CLASS_LEVEL, $traitName); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function coversMethod(string $className, string $methodName): CoversMethod - { - return new CoversMethod(self::CLASS_LEVEL, $className, $methodName); - } - - /** - * @param non-empty-string $functionName - */ - public static function coversFunction(string $functionName): CoversFunction - { - return new CoversFunction(self::CLASS_LEVEL, $functionName); - } - - public static function coversNothingOnClass(): CoversNothing - { - return new CoversNothing(self::CLASS_LEVEL); - } - - public static function coversNothingOnMethod(): CoversNothing - { - return new CoversNothing(self::METHOD_LEVEL); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function dataProvider(string $className, string $methodName, bool $validateArgumentCount): DataProvider - { - return new DataProvider(self::METHOD_LEVEL, $className, $methodName, $validateArgumentCount); - } - - /** - * @param class-string $className - */ - public static function dependsOnClass(string $className, bool $deepClone, bool $shallowClone): DependsOnClass - { - return new DependsOnClass(self::METHOD_LEVEL, $className, $deepClone, $shallowClone); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function dependsOnMethod(string $className, string $methodName, bool $deepClone, bool $shallowClone): DependsOnMethod - { - return new DependsOnMethod(self::METHOD_LEVEL, $className, $methodName, $deepClone, $shallowClone); - } - - public static function disableReturnValueGenerationForTestDoubles(): DisableReturnValueGenerationForTestDoubles - { - return new DisableReturnValueGenerationForTestDoubles(self::CLASS_LEVEL); - } - - public static function doesNotPerformAssertionsOnClass(): DoesNotPerformAssertions - { - return new DoesNotPerformAssertions(self::CLASS_LEVEL); - } - - public static function doesNotPerformAssertionsOnMethod(): DoesNotPerformAssertions - { - return new DoesNotPerformAssertions(self::METHOD_LEVEL); - } - - /** - * @param non-empty-string $globalVariableName - */ - public static function excludeGlobalVariableFromBackupOnClass(string $globalVariableName): ExcludeGlobalVariableFromBackup - { - return new ExcludeGlobalVariableFromBackup(self::CLASS_LEVEL, $globalVariableName); - } - - /** - * @param non-empty-string $globalVariableName - */ - public static function excludeGlobalVariableFromBackupOnMethod(string $globalVariableName): ExcludeGlobalVariableFromBackup - { - return new ExcludeGlobalVariableFromBackup(self::METHOD_LEVEL, $globalVariableName); - } - - /** - * @param class-string $className - * @param non-empty-string $propertyName - */ - public static function excludeStaticPropertyFromBackupOnClass(string $className, string $propertyName): ExcludeStaticPropertyFromBackup - { - return new ExcludeStaticPropertyFromBackup(self::CLASS_LEVEL, $className, $propertyName); - } - - /** - * @param class-string $className - * @param non-empty-string $propertyName - */ - public static function excludeStaticPropertyFromBackupOnMethod(string $className, string $propertyName): ExcludeStaticPropertyFromBackup - { - return new ExcludeStaticPropertyFromBackup(self::METHOD_LEVEL, $className, $propertyName); - } - - /** - * @param non-empty-string $groupName - */ - public static function groupOnClass(string $groupName): Group - { - return new Group(self::CLASS_LEVEL, $groupName); - } - - /** - * @param non-empty-string $groupName - */ - public static function groupOnMethod(string $groupName): Group - { - return new Group(self::METHOD_LEVEL, $groupName); - } - - /** - * @param null|non-empty-string $messagePattern - */ - public static function ignoreDeprecationsOnClass(?string $messagePattern = null): IgnoreDeprecations - { - return new IgnoreDeprecations(self::CLASS_LEVEL, $messagePattern); - } - - /** - * @param null|non-empty-string $messagePattern - */ - public static function ignoreDeprecationsOnMethod(?string $messagePattern = null): IgnoreDeprecations - { - return new IgnoreDeprecations(self::METHOD_LEVEL, $messagePattern); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public static function ignorePhpunitDeprecationsOnClass(): IgnorePhpunitDeprecations - { - return new IgnorePhpunitDeprecations(self::CLASS_LEVEL); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public static function ignorePhpunitDeprecationsOnMethod(): IgnorePhpunitDeprecations - { - return new IgnorePhpunitDeprecations(self::METHOD_LEVEL); - } - - public static function postCondition(int $priority): PostCondition - { - return new PostCondition(self::METHOD_LEVEL, $priority); - } - - public static function preCondition(int $priority): PreCondition - { - return new PreCondition(self::METHOD_LEVEL, $priority); - } - - public static function preserveGlobalStateOnClass(bool $enabled): PreserveGlobalState - { - return new PreserveGlobalState(self::CLASS_LEVEL, $enabled); - } - - public static function preserveGlobalStateOnMethod(bool $enabled): PreserveGlobalState - { - return new PreserveGlobalState(self::METHOD_LEVEL, $enabled); - } - - /** - * @param non-empty-string $functionName - */ - public static function requiresFunctionOnClass(string $functionName): RequiresFunction - { - return new RequiresFunction(self::CLASS_LEVEL, $functionName); - } - - /** - * @param non-empty-string $functionName - */ - public static function requiresFunctionOnMethod(string $functionName): RequiresFunction - { - return new RequiresFunction(self::METHOD_LEVEL, $functionName); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function requiresMethodOnClass(string $className, string $methodName): RequiresMethod - { - return new RequiresMethod(self::CLASS_LEVEL, $className, $methodName); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function requiresMethodOnMethod(string $className, string $methodName): RequiresMethod - { - return new RequiresMethod(self::METHOD_LEVEL, $className, $methodName); - } - - /** - * @param non-empty-string $operatingSystem - */ - public static function requiresOperatingSystemOnClass(string $operatingSystem): RequiresOperatingSystem - { - return new RequiresOperatingSystem(self::CLASS_LEVEL, $operatingSystem); - } - - /** - * @param non-empty-string $operatingSystem - */ - public static function requiresOperatingSystemOnMethod(string $operatingSystem): RequiresOperatingSystem - { - return new RequiresOperatingSystem(self::METHOD_LEVEL, $operatingSystem); - } - - /** - * @param non-empty-string $operatingSystemFamily - */ - public static function requiresOperatingSystemFamilyOnClass(string $operatingSystemFamily): RequiresOperatingSystemFamily - { - return new RequiresOperatingSystemFamily(self::CLASS_LEVEL, $operatingSystemFamily); - } - - /** - * @param non-empty-string $operatingSystemFamily - */ - public static function requiresOperatingSystemFamilyOnMethod(string $operatingSystemFamily): RequiresOperatingSystemFamily - { - return new RequiresOperatingSystemFamily(self::METHOD_LEVEL, $operatingSystemFamily); - } - - public static function requiresPhpOnClass(Requirement $versionRequirement): RequiresPhp - { - return new RequiresPhp(self::CLASS_LEVEL, $versionRequirement); - } - - public static function requiresPhpOnMethod(Requirement $versionRequirement): RequiresPhp - { - return new RequiresPhp(self::METHOD_LEVEL, $versionRequirement); - } - - /** - * @param non-empty-string $extension - */ - public static function requiresPhpExtensionOnClass(string $extension, ?Requirement $versionRequirement): RequiresPhpExtension - { - return new RequiresPhpExtension(self::CLASS_LEVEL, $extension, $versionRequirement); - } - - /** - * @param non-empty-string $extension - */ - public static function requiresPhpExtensionOnMethod(string $extension, ?Requirement $versionRequirement): RequiresPhpExtension - { - return new RequiresPhpExtension(self::METHOD_LEVEL, $extension, $versionRequirement); - } - - public static function requiresPhpunitOnClass(Requirement $versionRequirement): RequiresPhpunit - { - return new RequiresPhpunit(self::CLASS_LEVEL, $versionRequirement); - } - - public static function requiresPhpunitOnMethod(Requirement $versionRequirement): RequiresPhpunit - { - return new RequiresPhpunit(self::METHOD_LEVEL, $versionRequirement); - } - - /** - * @param class-string $extensionClass - */ - public static function requiresPhpunitExtensionOnClass(string $extensionClass): RequiresPhpunitExtension - { - return new RequiresPhpunitExtension(self::CLASS_LEVEL, $extensionClass); - } - - /** - * @param class-string $extensionClass - */ - public static function requiresPhpunitExtensionOnMethod(string $extensionClass): RequiresPhpunitExtension - { - return new RequiresPhpunitExtension(self::METHOD_LEVEL, $extensionClass); - } - - public static function requiresEnvironmentVariableOnClass(string $environmentVariableName, null|string $value): RequiresEnvironmentVariable - { - return new RequiresEnvironmentVariable(self::CLASS_LEVEL, $environmentVariableName, $value); - } - - public static function requiresEnvironmentVariableOnMethod(string $environmentVariableName, null|string $value): RequiresEnvironmentVariable - { - return new RequiresEnvironmentVariable(self::METHOD_LEVEL, $environmentVariableName, $value); - } - - public static function withEnvironmentVariableOnClass(string $environmentVariableName, null|string $value): WithEnvironmentVariable - { - return new WithEnvironmentVariable(self::CLASS_LEVEL, $environmentVariableName, $value); - } - - public static function withEnvironmentVariableOnMethod(string $environmentVariableName, null|string $value): WithEnvironmentVariable - { - return new WithEnvironmentVariable(self::METHOD_LEVEL, $environmentVariableName, $value); - } - - /** - * @param non-empty-string $setting - * @param non-empty-string $value - */ - public static function requiresSettingOnClass(string $setting, string $value): RequiresSetting - { - return new RequiresSetting(self::CLASS_LEVEL, $setting, $value); - } - - /** - * @param non-empty-string $setting - * @param non-empty-string $value - */ - public static function requiresSettingOnMethod(string $setting, string $value): RequiresSetting - { - return new RequiresSetting(self::METHOD_LEVEL, $setting, $value); - } - - public static function runClassInSeparateProcess(): RunClassInSeparateProcess - { - return new RunClassInSeparateProcess(self::CLASS_LEVEL); - } - - public static function runTestsInSeparateProcesses(): RunTestsInSeparateProcesses - { - return new RunTestsInSeparateProcesses(self::CLASS_LEVEL); - } - - public static function runInSeparateProcess(): RunInSeparateProcess - { - return new RunInSeparateProcess(self::METHOD_LEVEL); - } - - public static function test(): Test - { - return new Test(self::METHOD_LEVEL); - } - - /** - * @param non-empty-string $text - */ - public static function testDoxOnClass(string $text): TestDox - { - return new TestDox(self::CLASS_LEVEL, $text); - } - - /** - * @param non-empty-string $text - */ - public static function testDoxOnMethod(string $text): TestDox - { - return new TestDox(self::METHOD_LEVEL, $text); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function testDoxFormatter(string $className, string $methodName): TestDoxFormatter - { - return new TestDoxFormatter(self::METHOD_LEVEL, $className, $methodName); - } - - /** - * @param ?non-empty-string $name - */ - public static function testWith(mixed $data, ?string $name = null): TestWith - { - return new TestWith(self::METHOD_LEVEL, $data, $name); - } - - /** - * @param non-empty-string $namespace - */ - public static function usesNamespace(string $namespace): UsesNamespace - { - return new UsesNamespace(self::CLASS_LEVEL, $namespace); - } - - /** - * @param class-string $className - */ - public static function usesClass(string $className): UsesClass - { - return new UsesClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $className - */ - public static function usesClassesThatExtendClass(string $className): UsesClassesThatExtendClass - { - return new UsesClassesThatExtendClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $interfaceName - */ - public static function usesClassesThatImplementInterface(string $interfaceName): UsesClassesThatImplementInterface - { - return new UsesClassesThatImplementInterface(self::CLASS_LEVEL, $interfaceName); - } - - /** - * @param trait-string $traitName - */ - public static function usesTrait(string $traitName): UsesTrait - { - return new UsesTrait(self::CLASS_LEVEL, $traitName); - } - - /** - * @param non-empty-string $functionName - */ - public static function usesFunction(string $functionName): UsesFunction - { - return new UsesFunction(self::CLASS_LEVEL, $functionName); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function usesMethod(string $className, string $methodName): UsesMethod - { - return new UsesMethod(self::CLASS_LEVEL, $className, $methodName); - } - - public static function withoutErrorHandler(): WithoutErrorHandler - { - return new WithoutErrorHandler(self::METHOD_LEVEL); - } - - /** - * @param null|non-empty-string $messagePattern - */ - public static function ignorePhpunitWarnings(?string $messagePattern): IgnorePhpunitWarnings - { - return new IgnorePhpunitWarnings(self::METHOD_LEVEL, $messagePattern); - } - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level) - { - $this->level = $level; - } - - public function isClassLevel(): bool - { - return $this->level === self::CLASS_LEVEL; - } - - public function isMethodLevel(): bool - { - return $this->level === self::METHOD_LEVEL; - } - - /** - * @phpstan-assert-if-true After $this - */ - public function isAfter(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true AfterClass $this - */ - public function isAfterClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true BackupGlobals $this - */ - public function isBackupGlobals(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true BackupStaticProperties $this - */ - public function isBackupStaticProperties(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true BeforeClass $this - */ - public function isBeforeClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Before $this - */ - public function isBefore(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversNamespace $this - */ - public function isCoversNamespace(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversClass $this - */ - public function isCoversClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversClassesThatExtendClass $this - */ - public function isCoversClassesThatExtendClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversClassesThatImplementInterface $this - */ - public function isCoversClassesThatImplementInterface(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversTrait $this - */ - public function isCoversTrait(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversFunction $this - */ - public function isCoversFunction(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversMethod $this - */ - public function isCoversMethod(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversNothing $this - */ - public function isCoversNothing(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DataProvider $this - */ - public function isDataProvider(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DependsOnClass $this - */ - public function isDependsOnClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DependsOnMethod $this - */ - public function isDependsOnMethod(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DisableReturnValueGenerationForTestDoubles $this - */ - public function isDisableReturnValueGenerationForTestDoubles(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true DoesNotPerformAssertions $this - */ - public function isDoesNotPerformAssertions(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true ExcludeGlobalVariableFromBackup $this - */ - public function isExcludeGlobalVariableFromBackup(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true ExcludeStaticPropertyFromBackup $this - */ - public function isExcludeStaticPropertyFromBackup(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Group $this - */ - public function isGroup(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true IgnoreDeprecations $this - */ - public function isIgnoreDeprecations(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true IgnorePhpunitDeprecations $this - * - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isIgnorePhpunitDeprecations(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RunClassInSeparateProcess $this - */ - public function isRunClassInSeparateProcess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RunInSeparateProcess $this - */ - public function isRunInSeparateProcess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RunTestsInSeparateProcesses $this - */ - public function isRunTestsInSeparateProcesses(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true Test $this - */ - public function isTest(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true PreCondition $this - */ - public function isPreCondition(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true PostCondition $this - */ - public function isPostCondition(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true PreserveGlobalState $this - */ - public function isPreserveGlobalState(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresMethod $this - */ - public function isRequiresMethod(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresFunction $this - */ - public function isRequiresFunction(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresOperatingSystem $this - */ - public function isRequiresOperatingSystem(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresOperatingSystemFamily $this - */ - public function isRequiresOperatingSystemFamily(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresPhp $this - */ - public function isRequiresPhp(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresPhpExtension $this - */ - public function isRequiresPhpExtension(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresPhpunit $this - */ - public function isRequiresPhpunit(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresPhpunitExtension $this - */ - public function isRequiresPhpunitExtension(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresEnvironmentVariable $this - */ - public function isRequiresEnvironmentVariable(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true WithEnvironmentVariable $this - */ - public function isWithEnvironmentVariable(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true RequiresSetting $this - */ - public function isRequiresSetting(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TestDox $this - */ - public function isTestDox(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TestDoxFormatter $this - */ - public function isTestDoxFormatter(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TestWith $this - */ - public function isTestWith(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesNamespace $this - */ - public function isUsesNamespace(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesClass $this - */ - public function isUsesClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesClassesThatExtendClass $this - */ - public function isUsesClassesThatExtendClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesClassesThatImplementInterface $this - */ - public function isUsesClassesThatImplementInterface(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesTrait $this - */ - public function isUsesTrait(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesFunction $this - */ - public function isUsesFunction(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesMethod $this - */ - public function isUsesMethod(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true WithoutErrorHandler $this - */ - public function isWithoutErrorHandler(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true IgnorePhpunitWarnings $this - */ - public function isIgnorePhpunitWarnings(): bool - { - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php b/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php deleted file mode 100644 index 621e7b86..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php +++ /dev/null @@ -1,663 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use function array_filter; -use function array_merge; -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MetadataCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $metadata; - - /** - * @param list $metadata - */ - public static function fromArray(array $metadata): self - { - return new self(...$metadata); - } - - private function __construct(Metadata ...$metadata) - { - $this->metadata = $metadata; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->metadata; - } - - public function count(): int - { - return count($this->metadata); - } - - /** - * @phpstan-assert-if-true 0 $this->count() - * @phpstan-assert-if-true array{} $this->asArray() - */ - public function isEmpty(): bool - { - return $this->count() === 0; - } - - /** - * @phpstan-assert-if-true positive-int $this->count() - * @phpstan-assert-if-true non-empty-list $this->asArray() - */ - public function isNotEmpty(): bool - { - return $this->count() > 0; - } - - public function getIterator(): MetadataCollectionIterator - { - return new MetadataCollectionIterator($this); - } - - public function mergeWith(self $other): self - { - return new self( - ...array_merge( - $this->asArray(), - $other->asArray(), - ), - ); - } - - public function isClassLevel(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isClassLevel(), - ), - ); - } - - public function isMethodLevel(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isMethodLevel(), - ), - ); - } - - public function isAfter(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isAfter(), - ), - ); - } - - public function isAfterClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isAfterClass(), - ), - ); - } - - public function isBackupGlobals(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isBackupGlobals(), - ), - ); - } - - public function isBackupStaticProperties(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isBackupStaticProperties(), - ), - ); - } - - public function isBeforeClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isBeforeClass(), - ), - ); - } - - public function isBefore(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isBefore(), - ), - ); - } - - public function isCoversNamespace(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversNamespace(), - ), - ); - } - - public function isCoversClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversClass(), - ), - ); - } - - public function isCoversClassesThatExtendClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversClassesThatExtendClass(), - ), - ); - } - - public function isCoversClassesThatImplementInterface(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversClassesThatImplementInterface(), - ), - ); - } - - public function isCoversTrait(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversTrait(), - ), - ); - } - - public function isCoversFunction(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversFunction(), - ), - ); - } - - public function isCoversMethod(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversMethod(), - ), - ); - } - - public function isExcludeGlobalVariableFromBackup(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isExcludeGlobalVariableFromBackup(), - ), - ); - } - - public function isExcludeStaticPropertyFromBackup(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isExcludeStaticPropertyFromBackup(), - ), - ); - } - - public function isCoversNothing(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversNothing(), - ), - ); - } - - public function isDataProvider(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDataProvider(), - ), - ); - } - - public function isDepends(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDependsOnClass() || $metadata->isDependsOnMethod(), - ), - ); - } - - public function isDependsOnClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDependsOnClass(), - ), - ); - } - - public function isDependsOnMethod(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDependsOnMethod(), - ), - ); - } - - public function isDisableReturnValueGenerationForTestDoubles(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDisableReturnValueGenerationForTestDoubles(), - ), - ); - } - - public function isDoesNotPerformAssertions(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isDoesNotPerformAssertions(), - ), - ); - } - - public function isGroup(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isGroup(), - ), - ); - } - - public function isIgnoreDeprecations(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isIgnoreDeprecations(), - ), - ); - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function isIgnorePhpunitDeprecations(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isIgnorePhpunitDeprecations(), - ), - ); - } - - public function isIgnorePhpunitWarnings(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isIgnorePhpunitWarnings(), - ), - ); - } - - public function isRunClassInSeparateProcess(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRunClassInSeparateProcess(), - ), - ); - } - - public function isRunInSeparateProcess(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRunInSeparateProcess(), - ), - ); - } - - public function isRunTestsInSeparateProcesses(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRunTestsInSeparateProcesses(), - ), - ); - } - - public function isTest(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isTest(), - ), - ); - } - - public function isPreCondition(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isPreCondition(), - ), - ); - } - - public function isPostCondition(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isPostCondition(), - ), - ); - } - - public function isPreserveGlobalState(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isPreserveGlobalState(), - ), - ); - } - - public function isRequiresMethod(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresMethod(), - ), - ); - } - - public function isRequiresFunction(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresFunction(), - ), - ); - } - - public function isRequiresOperatingSystem(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresOperatingSystem(), - ), - ); - } - - public function isRequiresOperatingSystemFamily(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresOperatingSystemFamily(), - ), - ); - } - - public function isRequiresPhp(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresPhp(), - ), - ); - } - - public function isRequiresPhpExtension(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresPhpExtension(), - ), - ); - } - - public function isRequiresPhpunit(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresPhpunit(), - ), - ); - } - - public function isRequiresPhpunitExtension(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresPhpunitExtension(), - ), - ); - } - - public function isRequiresEnvironmentVariable(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresEnvironmentVariable(), - ), - ); - } - - public function isWithEnvironmentVariable(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isWithEnvironmentVariable(), - ), - ); - } - - public function isRequiresSetting(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresSetting(), - ), - ); - } - - public function isTestDox(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isTestDox(), - ), - ); - } - - public function isTestDoxFormatter(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isTestDoxFormatter(), - ), - ); - } - - public function isTestWith(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isTestWith(), - ), - ); - } - - public function isUsesNamespace(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesNamespace(), - ), - ); - } - - public function isUsesClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesClass(), - ), - ); - } - - public function isUsesClassesThatExtendClass(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesClassesThatExtendClass(), - ), - ); - } - - public function isUsesClassesThatImplementInterface(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesClassesThatImplementInterface(), - ), - ); - } - - public function isUsesTrait(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesTrait(), - ), - ); - } - - public function isUsesFunction(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesFunction(), - ), - ); - } - - public function isUsesMethod(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesMethod(), - ), - ); - } - - public function isWithoutErrorHandler(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isWithoutErrorHandler(), - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php b/vendor/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php deleted file mode 100644 index bfe39899..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class MetadataCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $metadata; - private int $position = 0; - - public function __construct(MetadataCollection $metadata) - { - $this->metadata = $metadata->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->metadata); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Metadata - { - return $this->metadata[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php b/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php deleted file mode 100644 index 168ca4e5..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php +++ /dev/null @@ -1,1001 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Parser; - -use const JSON_THROW_ON_ERROR; -use function assert; -use function class_exists; -use function is_numeric; -use function json_decode; -use function method_exists; -use function sprintf; -use function str_starts_with; -use function strtolower; -use function trim; -use Error; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\Attributes\After; -use PHPUnit\Framework\Attributes\AfterClass; -use PHPUnit\Framework\Attributes\BackupGlobals; -use PHPUnit\Framework\Attributes\BackupStaticProperties; -use PHPUnit\Framework\Attributes\Before; -use PHPUnit\Framework\Attributes\BeforeClass; -use PHPUnit\Framework\Attributes\CoversClass; -use PHPUnit\Framework\Attributes\CoversClassesThatExtendClass; -use PHPUnit\Framework\Attributes\CoversClassesThatImplementInterface; -use PHPUnit\Framework\Attributes\CoversFunction; -use PHPUnit\Framework\Attributes\CoversMethod; -use PHPUnit\Framework\Attributes\CoversNamespace; -use PHPUnit\Framework\Attributes\CoversNothing; -use PHPUnit\Framework\Attributes\CoversTrait; -use PHPUnit\Framework\Attributes\DataProvider; -use PHPUnit\Framework\Attributes\DataProviderExternal; -use PHPUnit\Framework\Attributes\Depends; -use PHPUnit\Framework\Attributes\DependsExternal; -use PHPUnit\Framework\Attributes\DependsExternalUsingDeepClone; -use PHPUnit\Framework\Attributes\DependsExternalUsingShallowClone; -use PHPUnit\Framework\Attributes\DependsOnClass; -use PHPUnit\Framework\Attributes\DependsOnClassUsingDeepClone; -use PHPUnit\Framework\Attributes\DependsOnClassUsingShallowClone; -use PHPUnit\Framework\Attributes\DependsUsingDeepClone; -use PHPUnit\Framework\Attributes\DependsUsingShallowClone; -use PHPUnit\Framework\Attributes\DisableReturnValueGenerationForTestDoubles; -use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; -use PHPUnit\Framework\Attributes\ExcludeGlobalVariableFromBackup; -use PHPUnit\Framework\Attributes\ExcludeStaticPropertyFromBackup; -use PHPUnit\Framework\Attributes\Group; -use PHPUnit\Framework\Attributes\IgnoreDeprecations; -use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations; -use PHPUnit\Framework\Attributes\IgnorePhpunitWarnings; -use PHPUnit\Framework\Attributes\Large; -use PHPUnit\Framework\Attributes\Medium; -use PHPUnit\Framework\Attributes\PostCondition; -use PHPUnit\Framework\Attributes\PreCondition; -use PHPUnit\Framework\Attributes\PreserveGlobalState; -use PHPUnit\Framework\Attributes\RequiresEnvironmentVariable; -use PHPUnit\Framework\Attributes\RequiresFunction; -use PHPUnit\Framework\Attributes\RequiresMethod; -use PHPUnit\Framework\Attributes\RequiresOperatingSystem; -use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily; -use PHPUnit\Framework\Attributes\RequiresPhp; -use PHPUnit\Framework\Attributes\RequiresPhpExtension; -use PHPUnit\Framework\Attributes\RequiresPhpunit; -use PHPUnit\Framework\Attributes\RequiresPhpunitExtension; -use PHPUnit\Framework\Attributes\RequiresSetting; -use PHPUnit\Framework\Attributes\RunClassInSeparateProcess; -use PHPUnit\Framework\Attributes\RunInSeparateProcess; -use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; -use PHPUnit\Framework\Attributes\Small; -use PHPUnit\Framework\Attributes\Test; -use PHPUnit\Framework\Attributes\TestDox; -use PHPUnit\Framework\Attributes\TestDoxFormatter; -use PHPUnit\Framework\Attributes\TestDoxFormatterExternal; -use PHPUnit\Framework\Attributes\TestWith; -use PHPUnit\Framework\Attributes\TestWithJson; -use PHPUnit\Framework\Attributes\Ticket; -use PHPUnit\Framework\Attributes\UsesClass; -use PHPUnit\Framework\Attributes\UsesClassesThatExtendClass; -use PHPUnit\Framework\Attributes\UsesClassesThatImplementInterface; -use PHPUnit\Framework\Attributes\UsesFunction; -use PHPUnit\Framework\Attributes\UsesMethod; -use PHPUnit\Framework\Attributes\UsesNamespace; -use PHPUnit\Framework\Attributes\UsesTrait; -use PHPUnit\Framework\Attributes\WithEnvironmentVariable; -use PHPUnit\Framework\Attributes\WithoutErrorHandler; -use PHPUnit\Metadata\InvalidAttributeException; -use PHPUnit\Metadata\Metadata; -use PHPUnit\Metadata\MetadataCollection; -use PHPUnit\Metadata\Version\Requirement; -use ReflectionClass; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AttributeParser implements Parser -{ - /** - * @param class-string $className - */ - public function forClass(string $className): MetadataCollection - { - assert(class_exists($className)); - - $reflector = new ReflectionClass($className); - $result = []; - - $small = false; - $medium = false; - $large = false; - - foreach ($reflector->getAttributes() as $attribute) { - if (!str_starts_with($attribute->getName(), 'PHPUnit\\Framework\\Attributes\\')) { - continue; - } - - if (!class_exists($attribute->getName())) { - continue; - } - - try { - $attributeInstance = $attribute->newInstance(); - } catch (Error $e) { - throw new InvalidAttributeException( - $attribute->getName(), - 'class ' . $className, - $reflector->getFileName(), - $reflector->getStartLine(), - $e->getMessage(), - ); - } - - switch ($attribute->getName()) { - case BackupGlobals::class: - assert($attributeInstance instanceof BackupGlobals); - - $result[] = Metadata::backupGlobalsOnClass($attributeInstance->enabled()); - - break; - - case BackupStaticProperties::class: - assert($attributeInstance instanceof BackupStaticProperties); - - $result[] = Metadata::backupStaticPropertiesOnClass($attributeInstance->enabled()); - - break; - - case CoversNamespace::class: - assert($attributeInstance instanceof CoversNamespace); - - $result[] = Metadata::coversNamespace($attributeInstance->namespace()); - - break; - - case CoversClass::class: - assert($attributeInstance instanceof CoversClass); - - $result[] = Metadata::coversClass($attributeInstance->className()); - - break; - - case CoversClassesThatExtendClass::class: - assert($attributeInstance instanceof CoversClassesThatExtendClass); - - $result[] = Metadata::coversClassesThatExtendClass($attributeInstance->className()); - - break; - - case CoversClassesThatImplementInterface::class: - assert($attributeInstance instanceof CoversClassesThatImplementInterface); - - $result[] = Metadata::coversClassesThatImplementInterface($attributeInstance->interfaceName()); - - break; - - case CoversTrait::class: - assert($attributeInstance instanceof CoversTrait); - - $result[] = Metadata::coversTrait($attributeInstance->traitName()); - - break; - - case CoversFunction::class: - assert($attributeInstance instanceof CoversFunction); - - $result[] = Metadata::coversFunction($attributeInstance->functionName()); - - break; - - case CoversMethod::class: - assert($attributeInstance instanceof CoversMethod); - - $result[] = Metadata::coversMethod( - $attributeInstance->className(), - $attributeInstance->methodName(), - ); - - break; - - case CoversNothing::class: - $result[] = Metadata::coversNothingOnClass(); - - break; - - case DisableReturnValueGenerationForTestDoubles::class: - $result[] = Metadata::disableReturnValueGenerationForTestDoubles(); - - break; - - case DoesNotPerformAssertions::class: - $result[] = Metadata::doesNotPerformAssertionsOnClass(); - - break; - - case ExcludeGlobalVariableFromBackup::class: - assert($attributeInstance instanceof ExcludeGlobalVariableFromBackup); - - $result[] = Metadata::excludeGlobalVariableFromBackupOnClass($attributeInstance->globalVariableName()); - - break; - - case ExcludeStaticPropertyFromBackup::class: - assert($attributeInstance instanceof ExcludeStaticPropertyFromBackup); - - $result[] = Metadata::excludeStaticPropertyFromBackupOnClass( - $attributeInstance->className(), - $attributeInstance->propertyName(), - ); - - break; - - case Group::class: - assert($attributeInstance instanceof Group); - - if (!$this->isSizeGroup($attributeInstance->name(), $className)) { - $result[] = Metadata::groupOnClass($attributeInstance->name()); - } - - break; - - case Small::class: - if (!$medium && !$large) { - $result[] = Metadata::groupOnClass('small'); - - $small = true; - } else { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '#[Small] cannot be combined with #[Medium] or #[Large] for %s', - $this->testAsString($className), - ), - ); - } - - break; - - case Medium::class: - if (!$small && !$large) { - $result[] = Metadata::groupOnClass('medium'); - - $medium = true; - } else { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '#[Medium] cannot be combined with #[Small] or #[Large] for %s', - $this->testAsString($className), - ), - ); - } - - break; - - case Large::class: - if (!$small && !$medium) { - $result[] = Metadata::groupOnClass('large'); - - $large = true; - } else { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '#[Large] cannot be combined with #[Small] or #[Medium] for %s', - $this->testAsString($className), - ), - ); - } - - break; - - case IgnoreDeprecations::class: - assert($attributeInstance instanceof IgnoreDeprecations); - - $result[] = Metadata::ignoreDeprecationsOnClass($attributeInstance->messagePattern()); - - break; - - case IgnorePhpunitDeprecations::class: - assert($attributeInstance instanceof IgnorePhpunitDeprecations); - - $result[] = Metadata::ignorePhpunitDeprecationsOnClass(); - - break; - - case PreserveGlobalState::class: - assert($attributeInstance instanceof PreserveGlobalState); - - $result[] = Metadata::preserveGlobalStateOnClass($attributeInstance->enabled()); - - break; - - case RequiresMethod::class: - assert($attributeInstance instanceof RequiresMethod); - - $result[] = Metadata::requiresMethodOnClass( - $attributeInstance->className(), - $attributeInstance->methodName(), - ); - - break; - - case RequiresFunction::class: - assert($attributeInstance instanceof RequiresFunction); - - $result[] = Metadata::requiresFunctionOnClass($attributeInstance->functionName()); - - break; - - case RequiresOperatingSystem::class: - assert($attributeInstance instanceof RequiresOperatingSystem); - - $result[] = Metadata::requiresOperatingSystemOnClass($attributeInstance->regularExpression()); - - break; - - case RequiresOperatingSystemFamily::class: - assert($attributeInstance instanceof RequiresOperatingSystemFamily); - - $result[] = Metadata::requiresOperatingSystemFamilyOnClass($attributeInstance->operatingSystemFamily()); - - break; - - case RequiresPhp::class: - assert($attributeInstance instanceof RequiresPhp); - - $result[] = Metadata::requiresPhpOnClass( - $this->requirement( - $attributeInstance->versionRequirement(), - $className, - ), - ); - - break; - - case RequiresPhpExtension::class: - assert($attributeInstance instanceof RequiresPhpExtension); - - $versionConstraint = null; - $versionRequirement = $attributeInstance->versionRequirement(); - - if ($versionRequirement !== null) { - $versionConstraint = $this->requirement( - $versionRequirement, - $className, - ); - } - - $result[] = Metadata::requiresPhpExtensionOnClass( - $attributeInstance->extension(), - $versionConstraint, - ); - - break; - - case RequiresPhpunit::class: - assert($attributeInstance instanceof RequiresPhpunit); - - $result[] = Metadata::requiresPhpunitOnClass( - $this->requirement( - $attributeInstance->versionRequirement(), - $className, - ), - ); - - break; - - case RequiresPhpunitExtension::class: - assert($attributeInstance instanceof RequiresPhpunitExtension); - - $result[] = Metadata::requiresPhpunitExtensionOnClass( - $attributeInstance->extensionClass(), - ); - - break; - - case RequiresEnvironmentVariable::class: - assert($attributeInstance instanceof RequiresEnvironmentVariable); - - $result[] = Metadata::requiresEnvironmentVariableOnClass( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - - case WithEnvironmentVariable::class: - assert($attributeInstance instanceof WithEnvironmentVariable); - - $result[] = Metadata::withEnvironmentVariableOnClass( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - - case RequiresSetting::class: - assert($attributeInstance instanceof RequiresSetting); - - $result[] = Metadata::requiresSettingOnClass( - $attributeInstance->setting(), - $attributeInstance->value(), - ); - - break; - - case RunClassInSeparateProcess::class: - $result[] = Metadata::runClassInSeparateProcess(); - - break; - - case RunTestsInSeparateProcesses::class: - $result[] = Metadata::runTestsInSeparateProcesses(); - - break; - - case TestDox::class: - assert($attributeInstance instanceof TestDox); - - $result[] = Metadata::testDoxOnClass($attributeInstance->text()); - - break; - - case Ticket::class: - assert($attributeInstance instanceof Ticket); - - $result[] = Metadata::groupOnClass($attributeInstance->text()); - - break; - - case UsesNamespace::class: - assert($attributeInstance instanceof UsesNamespace); - - $result[] = Metadata::usesNamespace($attributeInstance->namespace()); - - break; - - case UsesClass::class: - assert($attributeInstance instanceof UsesClass); - - $result[] = Metadata::usesClass($attributeInstance->className()); - - break; - - case UsesClassesThatExtendClass::class: - assert($attributeInstance instanceof UsesClassesThatExtendClass); - - $result[] = Metadata::usesClassesThatExtendClass($attributeInstance->className()); - - break; - - case UsesClassesThatImplementInterface::class: - assert($attributeInstance instanceof UsesClassesThatImplementInterface); - - $result[] = Metadata::usesClassesThatImplementInterface($attributeInstance->interfaceName()); - - break; - - case UsesTrait::class: - assert($attributeInstance instanceof UsesTrait); - - $result[] = Metadata::usesTrait($attributeInstance->traitName()); - - break; - - case UsesFunction::class: - assert($attributeInstance instanceof UsesFunction); - - $result[] = Metadata::usesFunction($attributeInstance->functionName()); - - break; - - case UsesMethod::class: - assert($attributeInstance instanceof UsesMethod); - - $result[] = Metadata::usesMethod( - $attributeInstance->className(), - $attributeInstance->methodName(), - ); - - break; - } - } - - return MetadataCollection::fromArray($result); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forMethod(string $className, string $methodName): MetadataCollection - { - assert(class_exists($className)); - assert(method_exists($className, $methodName)); - - $reflector = new ReflectionMethod($className, $methodName); - $result = []; - - foreach ($reflector->getAttributes() as $attribute) { - if (!str_starts_with($attribute->getName(), 'PHPUnit\\Framework\\Attributes\\')) { - continue; - } - - if (!class_exists($attribute->getName())) { - continue; - } - - try { - $attributeInstance = $attribute->newInstance(); - } catch (Error $e) { - throw new InvalidAttributeException( - $attribute->getName(), - 'method ' . $className . '::' . $methodName . '()', - $reflector->getFileName(), - $reflector->getStartLine(), - $e->getMessage(), - ); - } - - switch ($attribute->getName()) { - case After::class: - assert($attributeInstance instanceof After); - - $result[] = Metadata::after($attributeInstance->priority()); - - break; - - case AfterClass::class: - assert($attributeInstance instanceof AfterClass); - - $result[] = Metadata::afterClass($attributeInstance->priority()); - - break; - - case BackupGlobals::class: - assert($attributeInstance instanceof BackupGlobals); - - $result[] = Metadata::backupGlobalsOnMethod($attributeInstance->enabled()); - - break; - - case BackupStaticProperties::class: - assert($attributeInstance instanceof BackupStaticProperties); - - $result[] = Metadata::backupStaticPropertiesOnMethod($attributeInstance->enabled()); - - break; - - case Before::class: - assert($attributeInstance instanceof Before); - - $result[] = Metadata::before($attributeInstance->priority()); - - break; - - case BeforeClass::class: - assert($attributeInstance instanceof BeforeClass); - - $result[] = Metadata::beforeClass($attributeInstance->priority()); - - break; - - case CoversNothing::class: - $result[] = Metadata::coversNothingOnMethod(); - - break; - - case DataProvider::class: - assert($attributeInstance instanceof DataProvider); - - $result[] = Metadata::dataProvider($className, $attributeInstance->methodName(), $attributeInstance->validateArgumentCount()); - - break; - - case DataProviderExternal::class: - assert($attributeInstance instanceof DataProviderExternal); - - $result[] = Metadata::dataProvider($attributeInstance->className(), $attributeInstance->methodName(), $attributeInstance->validateArgumentCount()); - - break; - - case Depends::class: - assert($attributeInstance instanceof Depends); - - $result[] = Metadata::dependsOnMethod($className, $attributeInstance->methodName(), false, false); - - break; - - case DependsUsingDeepClone::class: - assert($attributeInstance instanceof DependsUsingDeepClone); - - $result[] = Metadata::dependsOnMethod($className, $attributeInstance->methodName(), true, false); - - break; - - case DependsUsingShallowClone::class: - assert($attributeInstance instanceof DependsUsingShallowClone); - - $result[] = Metadata::dependsOnMethod($className, $attributeInstance->methodName(), false, true); - - break; - - case DependsExternal::class: - assert($attributeInstance instanceof DependsExternal); - - $result[] = Metadata::dependsOnMethod($attributeInstance->className(), $attributeInstance->methodName(), false, false); - - break; - - case DependsExternalUsingDeepClone::class: - assert($attributeInstance instanceof DependsExternalUsingDeepClone); - - $result[] = Metadata::dependsOnMethod($attributeInstance->className(), $attributeInstance->methodName(), true, false); - - break; - - case DependsExternalUsingShallowClone::class: - assert($attributeInstance instanceof DependsExternalUsingShallowClone); - - $result[] = Metadata::dependsOnMethod($attributeInstance->className(), $attributeInstance->methodName(), false, true); - - break; - - case DependsOnClass::class: - assert($attributeInstance instanceof DependsOnClass); - - $result[] = Metadata::dependsOnClass($attributeInstance->className(), false, false); - - break; - - case DependsOnClassUsingDeepClone::class: - assert($attributeInstance instanceof DependsOnClassUsingDeepClone); - - $result[] = Metadata::dependsOnClass($attributeInstance->className(), true, false); - - break; - - case DependsOnClassUsingShallowClone::class: - assert($attributeInstance instanceof DependsOnClassUsingShallowClone); - - $result[] = Metadata::dependsOnClass($attributeInstance->className(), false, true); - - break; - - case DoesNotPerformAssertions::class: - assert($attributeInstance instanceof DoesNotPerformAssertions); - - $result[] = Metadata::doesNotPerformAssertionsOnMethod(); - - break; - - case ExcludeGlobalVariableFromBackup::class: - assert($attributeInstance instanceof ExcludeGlobalVariableFromBackup); - - $result[] = Metadata::excludeGlobalVariableFromBackupOnMethod($attributeInstance->globalVariableName()); - - break; - - case ExcludeStaticPropertyFromBackup::class: - assert($attributeInstance instanceof ExcludeStaticPropertyFromBackup); - - $result[] = Metadata::excludeStaticPropertyFromBackupOnMethod( - $attributeInstance->className(), - $attributeInstance->propertyName(), - ); - - break; - - case Group::class: - assert($attributeInstance instanceof Group); - - if (!$this->isSizeGroup($attributeInstance->name(), $className, $methodName)) { - $result[] = Metadata::groupOnMethod($attributeInstance->name()); - } - - break; - - case IgnoreDeprecations::class: - assert($attributeInstance instanceof IgnoreDeprecations); - - $result[] = Metadata::ignoreDeprecationsOnMethod($attributeInstance->messagePattern()); - - break; - - case IgnorePhpunitDeprecations::class: - assert($attributeInstance instanceof IgnorePhpunitDeprecations); - - $result[] = Metadata::ignorePhpunitDeprecationsOnMethod(); - - break; - - case PostCondition::class: - assert($attributeInstance instanceof PostCondition); - - $result[] = Metadata::postCondition($attributeInstance->priority()); - - break; - - case PreCondition::class: - assert($attributeInstance instanceof PreCondition); - - $result[] = Metadata::preCondition($attributeInstance->priority()); - - break; - - case PreserveGlobalState::class: - assert($attributeInstance instanceof PreserveGlobalState); - - $result[] = Metadata::preserveGlobalStateOnMethod($attributeInstance->enabled()); - - break; - - case RequiresMethod::class: - assert($attributeInstance instanceof RequiresMethod); - - $result[] = Metadata::requiresMethodOnMethod( - $attributeInstance->className(), - $attributeInstance->methodName(), - ); - - break; - - case RequiresFunction::class: - assert($attributeInstance instanceof RequiresFunction); - - $result[] = Metadata::requiresFunctionOnMethod($attributeInstance->functionName()); - - break; - - case RequiresOperatingSystem::class: - assert($attributeInstance instanceof RequiresOperatingSystem); - - $result[] = Metadata::requiresOperatingSystemOnMethod($attributeInstance->regularExpression()); - - break; - - case RequiresOperatingSystemFamily::class: - assert($attributeInstance instanceof RequiresOperatingSystemFamily); - - $result[] = Metadata::requiresOperatingSystemFamilyOnMethod($attributeInstance->operatingSystemFamily()); - - break; - - case RequiresPhp::class: - assert($attributeInstance instanceof RequiresPhp); - - $result[] = Metadata::requiresPhpOnMethod( - $this->requirement( - $attributeInstance->versionRequirement(), - $className, - $methodName, - ), - ); - - break; - - case RequiresPhpExtension::class: - assert($attributeInstance instanceof RequiresPhpExtension); - - $versionConstraint = null; - $versionRequirement = $attributeInstance->versionRequirement(); - - if ($versionRequirement !== null) { - $versionConstraint = $this->requirement( - $versionRequirement, - $className, - $methodName, - ); - } - - $result[] = Metadata::requiresPhpExtensionOnMethod( - $attributeInstance->extension(), - $versionConstraint, - ); - - break; - - case RequiresPhpunit::class: - assert($attributeInstance instanceof RequiresPhpunit); - - $result[] = Metadata::requiresPhpunitOnMethod( - $this->requirement( - $attributeInstance->versionRequirement(), - $className, - $methodName, - ), - ); - - break; - - case RequiresPhpunitExtension::class: - assert($attributeInstance instanceof RequiresPhpunitExtension); - - $result[] = Metadata::requiresPhpunitExtensionOnMethod( - $attributeInstance->extensionClass(), - ); - - break; - - case RequiresEnvironmentVariable::class: - assert($attributeInstance instanceof RequiresEnvironmentVariable); - - $result[] = Metadata::requiresEnvironmentVariableOnMethod( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - - case WithEnvironmentVariable::class: - assert($attributeInstance instanceof WithEnvironmentVariable); - - $result[] = Metadata::withEnvironmentVariableOnMethod( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - - case RequiresSetting::class: - assert($attributeInstance instanceof RequiresSetting); - - $result[] = Metadata::requiresSettingOnMethod( - $attributeInstance->setting(), - $attributeInstance->value(), - ); - - break; - - case RunInSeparateProcess::class: - $result[] = Metadata::runInSeparateProcess(); - - break; - - case Test::class: - $result[] = Metadata::test(); - - break; - - case TestDox::class: - assert($attributeInstance instanceof TestDox); - - $result[] = Metadata::testDoxOnMethod($attributeInstance->text()); - - break; - - case TestDoxFormatter::class: - assert($attributeInstance instanceof TestDoxFormatter); - - $result[] = Metadata::testDoxFormatter($className, $attributeInstance->methodName()); - - break; - - case TestDoxFormatterExternal::class: - assert($attributeInstance instanceof TestDoxFormatterExternal); - - $result[] = Metadata::testDoxFormatter($attributeInstance->className(), $attributeInstance->methodName()); - - break; - - case TestWith::class: - assert($attributeInstance instanceof TestWith); - - $result[] = Metadata::testWith($attributeInstance->data(), $attributeInstance->name()); - - break; - - case TestWithJson::class: - assert($attributeInstance instanceof TestWithJson); - - $result[] = Metadata::testWith( - json_decode($attributeInstance->json(), true, 512, JSON_THROW_ON_ERROR), - $attributeInstance->name(), - ); - - break; - - case Ticket::class: - assert($attributeInstance instanceof Ticket); - - $result[] = Metadata::groupOnMethod($attributeInstance->text()); - - break; - - case WithoutErrorHandler::class: - assert($attributeInstance instanceof WithoutErrorHandler); - - $result[] = Metadata::withoutErrorHandler(); - - break; - - case IgnorePhpunitWarnings::class: - assert($attributeInstance instanceof IgnorePhpunitWarnings); - - $result[] = Metadata::ignorePhpunitWarnings($attributeInstance->messagePattern()); - - break; - } - } - - return MetadataCollection::fromArray($result); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forClassAndMethod(string $className, string $methodName): MetadataCollection - { - return $this->forClass($className)->mergeWith( - $this->forMethod($className, $methodName), - ); - } - - /** - * @param non-empty-string $groupName - * @param class-string $testClassName - * @param ?non-empty-string $testMethodName - */ - private function isSizeGroup(string $groupName, string $testClassName, ?string $testMethodName = null): bool - { - $_groupName = strtolower(trim($groupName)); - - if ($_groupName !== 'small' && $_groupName !== 'medium' && $_groupName !== 'large') { - return false; - } - - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Group name "%s" is not allowed for %s', - $_groupName, - $this->testAsString($testClassName, $testMethodName), - ), - ); - - return true; - } - - /** - * @param non-empty-string $versionRequirement - * @param class-string $testClassName - * @param ?non-empty-string $testMethodName - */ - private function requirement(string $versionRequirement, string $testClassName, ?string $testMethodName = null): Requirement - { - if (is_numeric(trim($versionRequirement))) { - EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation( - sprintf( - 'Test %s has attribute with version constraint string argument without explicit version comparison operator ("%s")', - $this->testAsString($testClassName, $testMethodName), - $versionRequirement, - ), - ); - } - - return Requirement::from($versionRequirement); - } - - /** - * @param class-string $testClassName - * @param ?non-empty-string $testMethodName - * - * @return non-empty-string - */ - private function testAsString(string $testClassName, ?string $testMethodName = null): string - { - return sprintf( - '%s %s%s%s', - $testMethodName !== null ? 'method' : 'class', - $testClassName, - $testMethodName !== null ? '::' : '', - $testMethodName !== null ? $testMethodName : '', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/CachingParser.php b/vendor/phpunit/phpunit/src/Metadata/Parser/CachingParser.php deleted file mode 100644 index 7c274c15..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/CachingParser.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Parser; - -use function assert; -use function class_exists; -use function method_exists; -use PHPUnit\Metadata\MetadataCollection; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CachingParser implements Parser -{ - private readonly Parser $reader; - - /** - * @var array - */ - private array $classCache = []; - - /** - * @var array - */ - private array $methodCache = []; - - /** - * @var array - */ - private array $classAndMethodCache = []; - - public function __construct(Parser $reader) - { - $this->reader = $reader; - } - - /** - * @param class-string $className - */ - public function forClass(string $className): MetadataCollection - { - assert(class_exists($className)); - - if (isset($this->classCache[$className])) { - return $this->classCache[$className]; - } - - $this->classCache[$className] = $this->reader->forClass($className); - - return $this->classCache[$className]; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forMethod(string $className, string $methodName): MetadataCollection - { - assert(class_exists($className)); - assert(method_exists($className, $methodName)); - - $key = $className . '::' . $methodName; - - if (isset($this->methodCache[$key])) { - return $this->methodCache[$key]; - } - - $this->methodCache[$key] = $this->reader->forMethod($className, $methodName); - - return $this->methodCache[$key]; - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forClassAndMethod(string $className, string $methodName): MetadataCollection - { - $key = $className . '::' . $methodName; - - if (isset($this->classAndMethodCache[$key])) { - return $this->classAndMethodCache[$key]; - } - - $this->classAndMethodCache[$key] = $this->forClass($className)->mergeWith( - $this->forMethod($className, $methodName), - ); - - return $this->classAndMethodCache[$key]; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/Parser.php b/vendor/phpunit/phpunit/src/Metadata/Parser/Parser.php deleted file mode 100644 index edc2d87f..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/Parser.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Parser; - -use PHPUnit\Metadata\MetadataCollection; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Parser -{ - /** - * @param class-string $className - */ - public function forClass(string $className): MetadataCollection; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forMethod(string $className, string $methodName): MetadataCollection; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public function forClassAndMethod(string $className, string $methodName): MetadataCollection; -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php b/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php deleted file mode 100644 index 0b30782e..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Parser; - -/** - * Attribute information is static within a single PHP process. - * It is therefore okay to use a Singleton registry here. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Registry -{ - private static ?Parser $instance = null; - - public static function parser(): Parser - { - return self::$instance ?? self::$instance = self::build(); - } - - private static function build(): Parser - { - return new CachingParser(new AttributeParser); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/PostCondition.php b/vendor/phpunit/phpunit/src/Metadata/PostCondition.php deleted file mode 100644 index d52ae062..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/PostCondition.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PostCondition extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isPostCondition(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/PreCondition.php b/vendor/phpunit/phpunit/src/Metadata/PreCondition.php deleted file mode 100644 index 9243122b..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/PreCondition.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreCondition extends Metadata -{ - private int $priority; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, int $priority) - { - parent::__construct($level); - - $this->priority = $priority; - } - - public function isPreCondition(): true - { - return true; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php b/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php deleted file mode 100644 index f8881191..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PreserveGlobalState extends Metadata -{ - private bool $enabled; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, bool $enabled) - { - parent::__construct($level); - - $this->enabled = $enabled; - } - - public function isPreserveGlobalState(): true - { - return true; - } - - public function enabled(): bool - { - return $this->enabled; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php deleted file mode 100644 index 0888c296..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresEnvironmentVariable extends Metadata -{ - private string $environmentVariableName; - private null|string $value; - - public function __construct(int $level, string $environmentVariableName, null|string $value) - { - parent::__construct($level); - - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - public function isRequiresEnvironmentVariable(): true - { - return true; - } - - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php b/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php deleted file mode 100644 index f66c5180..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresFunction extends Metadata -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param int<0, 1> $level - * @param non-empty-string $functionName - */ - protected function __construct(int $level, string $functionName) - { - parent::__construct($level); - - $this->functionName = $functionName; - } - - public function isRequiresFunction(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php b/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php deleted file mode 100644 index 2ad7fbb9..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresMethod extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - } - - public function isRequiresMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php deleted file mode 100644 index 8719d296..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresOperatingSystem extends Metadata -{ - /** - * @var non-empty-string - */ - private string $operatingSystem; - - /** - * @param int<0, 1> $level - * @param non-empty-string $operatingSystem - */ - public function __construct(int $level, string $operatingSystem) - { - parent::__construct($level); - - $this->operatingSystem = $operatingSystem; - } - - public function isRequiresOperatingSystem(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function operatingSystem(): string - { - return $this->operatingSystem; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php deleted file mode 100644 index 4481dcf8..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresOperatingSystemFamily extends Metadata -{ - /** - * @var non-empty-string - */ - private string $operatingSystemFamily; - - /** - * @param int<0, 1> $level - * @param non-empty-string $operatingSystemFamily - */ - protected function __construct(int $level, string $operatingSystemFamily) - { - parent::__construct($level); - - $this->operatingSystemFamily = $operatingSystemFamily; - } - - public function isRequiresOperatingSystemFamily(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function operatingSystemFamily(): string - { - return $this->operatingSystemFamily; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php deleted file mode 100644 index c64a3962..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use PHPUnit\Metadata\Version\Requirement; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresPhp extends Metadata -{ - private Requirement $versionRequirement; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, Requirement $versionRequirement) - { - parent::__construct($level); - - $this->versionRequirement = $versionRequirement; - } - - public function isRequiresPhp(): true - { - return true; - } - - public function versionRequirement(): Requirement - { - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php deleted file mode 100644 index 5c547ea9..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use PHPUnit\Metadata\Version\Requirement; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresPhpExtension extends Metadata -{ - /** - * @var non-empty-string - */ - private string $extension; - private ?Requirement $versionRequirement; - - /** - * @param int<0, 1> $level - * @param non-empty-string $extension - */ - protected function __construct(int $level, string $extension, ?Requirement $versionRequirement) - { - parent::__construct($level); - - $this->extension = $extension; - $this->versionRequirement = $versionRequirement; - } - - public function isRequiresPhpExtension(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function extension(): string - { - return $this->extension; - } - - /** - * @phpstan-assert-if-true !null $this->versionRequirement - */ - public function hasVersionRequirement(): bool - { - return $this->versionRequirement !== null; - } - - /** - * @throws NoVersionRequirementException - */ - public function versionRequirement(): Requirement - { - if ($this->versionRequirement === null) { - throw new NoVersionRequirementException; - } - - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php deleted file mode 100644 index dc8ae80e..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use PHPUnit\Metadata\Version\Requirement; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresPhpunit extends Metadata -{ - private Requirement $versionRequirement; - - /** - * @param int<0, 1> $level - */ - protected function __construct(int $level, Requirement $versionRequirement) - { - parent::__construct($level); - - $this->versionRequirement = $versionRequirement; - } - - public function isRequiresPhpunit(): true - { - return true; - } - - public function versionRequirement(): Requirement - { - return $this->versionRequirement; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunitExtension.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunitExtension.php deleted file mode 100644 index 726c3b96..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunitExtension.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -use PHPUnit\Runner\Extension\Extension; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresPhpunitExtension extends Metadata -{ - /** - * @var class-string - */ - private string $extensionClass; - - /** - * @param class-string $extensionClass - */ - public function __construct(int $level, string $extensionClass) - { - parent::__construct($level); - - $this->extensionClass = $extensionClass; - } - - public function isRequiresPhpunitExtension(): true - { - return true; - } - - /** - * @return class-string - */ - public function extensionClass(): string - { - return $this->extensionClass; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php b/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php deleted file mode 100644 index 0d0b0230..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresSetting extends Metadata -{ - /** - * @var non-empty-string - */ - private string $setting; - - /** - * @var non-empty-string - */ - private string $value; - - /** - * @param int<0, 1> $level - * @param non-empty-string $setting - * @param non-empty-string $value - */ - protected function __construct(int $level, string $setting, string $value) - { - parent::__construct($level); - - $this->setting = $setting; - $this->value = $value; - } - - public function isRequiresSetting(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function setting(): string - { - return $this->setting; - } - - /** - * @return non-empty-string - */ - public function value(): string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RunClassInSeparateProcess.php b/vendor/phpunit/phpunit/src/Metadata/RunClassInSeparateProcess.php deleted file mode 100644 index 6f7927ce..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RunClassInSeparateProcess.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RunClassInSeparateProcess extends Metadata -{ - public function isRunClassInSeparateProcess(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RunInSeparateProcess.php b/vendor/phpunit/phpunit/src/Metadata/RunInSeparateProcess.php deleted file mode 100644 index dc755219..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RunInSeparateProcess.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RunInSeparateProcess extends Metadata -{ - public function isRunInSeparateProcess(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RunTestsInSeparateProcesses.php b/vendor/phpunit/phpunit/src/Metadata/RunTestsInSeparateProcesses.php deleted file mode 100644 index 3a544a79..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/RunTestsInSeparateProcesses.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RunTestsInSeparateProcesses extends Metadata -{ - public function isRunTestsInSeparateProcesses(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Test.php b/vendor/phpunit/phpunit/src/Metadata/Test.php deleted file mode 100644 index 04007610..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Test.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Test extends Metadata -{ - public function isTest(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/TestDox.php b/vendor/phpunit/phpunit/src/Metadata/TestDox.php deleted file mode 100644 index 6e2944e5..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/TestDox.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestDox extends Metadata -{ - /** - * @var non-empty-string - */ - private string $text; - - /** - * @param int<0, 1> $level - * @param non-empty-string $text - */ - protected function __construct(int $level, string $text) - { - parent::__construct($level); - - $this->text = $text; - } - - public function isTestDox(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function text(): string - { - return $this->text; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/TestDoxFormatter.php b/vendor/phpunit/phpunit/src/Metadata/TestDoxFormatter.php deleted file mode 100644 index a7f055b8..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/TestDoxFormatter.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestDoxFormatter extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - } - - public function isTestDoxFormatter(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/TestWith.php b/vendor/phpunit/phpunit/src/Metadata/TestWith.php deleted file mode 100644 index d704d863..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/TestWith.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestWith extends Metadata -{ - private mixed $data; - - /** - * @var ?non-empty-string - */ - private ?string $name; - - /** - * @param int<0, 1> $level - * @param ?non-empty-string $name - */ - protected function __construct(int $level, mixed $data, ?string $name = null) - { - parent::__construct($level); - - $this->data = $data; - $this->name = $name; - } - - public function isTestWith(): true - { - return true; - } - - public function data(): mixed - { - return $this->data; - } - - /** - * @phpstan-assert-if-true !null $this->name - */ - public function hasName(): bool - { - return $this->name !== null; - } - - /** - * @return ?non-empty-string - */ - public function name(): ?string - { - return $this->name; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClass.php b/vendor/phpunit/phpunit/src/Metadata/UsesClass.php deleted file mode 100644 index edbd03ac..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClass.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesClass extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param int<0, 1> $level - * @param class-string $className - */ - protected function __construct(int $level, string $className) - { - parent::__construct($level); - - $this->className = $className; - } - - public function isUsesClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php deleted file mode 100644 index baddfeb6..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesClassesThatExtendClass extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param int<0, 1> $level - * @param class-string $className - */ - protected function __construct(int $level, string $className) - { - parent::__construct($level); - - $this->className = $className; - } - - public function isUsesClassesThatExtendClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php deleted file mode 100644 index 5cdc6f62..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesClassesThatImplementInterface extends Metadata -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param int<0, 1> $level - * @param class-string $interfaceName - */ - protected function __construct(int $level, string $interfaceName) - { - parent::__construct($level); - - $this->interfaceName = $interfaceName; - } - - public function isUsesClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php b/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php deleted file mode 100644 index ec6cafee..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesFunction extends Metadata -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param int<0, 1> $level - * @param non-empty-string $functionName - */ - public function __construct(int $level, string $functionName) - { - parent::__construct($level); - - $this->functionName = $functionName; - } - - public function isUsesFunction(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php b/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php deleted file mode 100644 index 6fc78f8f..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesMethod extends Metadata -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param int<0, 1> $level - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(int $level, string $className, string $methodName) - { - parent::__construct($level); - - $this->className = $className; - $this->methodName = $methodName; - } - - public function isUsesMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php b/vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php deleted file mode 100644 index f5e5d01e..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesNamespace extends Metadata -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param int<0, 1> $level - * @param non-empty-string $namespace - */ - protected function __construct(int $level, string $namespace) - { - parent::__construct($level); - - $this->namespace = $namespace; - } - - public function isUsesNamespace(): true - { - return true; - } - - /** - * @return class-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php b/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php deleted file mode 100644 index 19490f26..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesTrait extends Metadata -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param 0|1 $level - * @param trait-string $traitName - */ - protected function __construct(int $level, string $traitName) - { - parent::__construct($level); - - $this->traitName = $traitName; - } - - public function isUsesTrait(): true - { - return true; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php b/vendor/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php deleted file mode 100644 index b3b6a1fc..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Version; - -use function version_compare; -use PHPUnit\Util\VersionComparisonOperator; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ComparisonRequirement extends Requirement -{ - private string $version; - private VersionComparisonOperator $operator; - - public function __construct(string $version, VersionComparisonOperator $operator) - { - $this->version = $version; - $this->operator = $operator; - } - - public function isSatisfiedBy(string $version): bool - { - return version_compare($version, $this->version, $this->operator->asString()); - } - - public function asString(): string - { - return $this->operator->asString() . ' ' . $this->version; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php b/vendor/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php deleted file mode 100644 index 10754450..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Version; - -use function preg_replace; -use PharIo\Version\Version; -use PharIo\Version\VersionConstraint; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ConstraintRequirement extends Requirement -{ - private VersionConstraint $constraint; - - public function __construct(VersionConstraint $constraint) - { - $this->constraint = $constraint; - } - - public function isSatisfiedBy(string $version): bool - { - return $this->constraint->complies( - new Version($this->sanitize($version)), - ); - } - - public function asString(): string - { - return $this->constraint->asString(); - } - - private function sanitize(string $version): string - { - return preg_replace( - '/^(\d+\.\d+(?:.\d+)?).*$/', - '$1', - $version, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php b/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php deleted file mode 100644 index 01f98f73..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata\Version; - -use function preg_match; -use PharIo\Version\UnsupportedVersionConstraintException; -use PharIo\Version\VersionConstraintParser; -use PHPUnit\Metadata\InvalidVersionRequirementException; -use PHPUnit\Util\InvalidVersionOperatorException; -use PHPUnit\Util\VersionComparisonOperator; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Requirement -{ - private const string VERSION_COMPARISON = "/(?P!=|<|<=|<>|=|==|>|>=)?\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m"; - - /** - * @throws InvalidVersionOperatorException - * @throws InvalidVersionRequirementException - */ - public static function from(string $versionRequirement): self - { - try { - return new ConstraintRequirement( - (new VersionConstraintParser)->parse( - $versionRequirement, - ), - ); - } catch (UnsupportedVersionConstraintException) { - if (preg_match(self::VERSION_COMPARISON, $versionRequirement, $matches) > 0) { - return new ComparisonRequirement( - $matches['version'], - new VersionComparisonOperator( - $matches['operator'] !== '' ? $matches['operator'] : '>=', - ), - ); - } - } - - throw new InvalidVersionRequirementException; - } - - abstract public function isSatisfiedBy(string $version): bool; - - abstract public function asString(): string; -} diff --git a/vendor/phpunit/phpunit/src/Metadata/WithEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Metadata/WithEnvironmentVariable.php deleted file mode 100644 index cc4d0fe7..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/WithEnvironmentVariable.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class WithEnvironmentVariable extends Metadata -{ - /** - * @var non-empty-string - */ - private string $environmentVariableName; - private null|string $value; - - /** - * @param non-empty-string $environmentVariableName - */ - public function __construct(int $level, string $environmentVariableName, null|string $value) - { - parent::__construct($level); - - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - public function isWithEnvironmentVariable(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/WithoutErrorHandler.php b/vendor/phpunit/phpunit/src/Metadata/WithoutErrorHandler.php deleted file mode 100644 index a8bf0014..00000000 --- a/vendor/phpunit/phpunit/src/Metadata/WithoutErrorHandler.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class WithoutErrorHandler extends Metadata -{ - public function isWithoutErrorHandler(): true - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/BackedUpEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Runner/BackedUpEnvironmentVariable.php deleted file mode 100644 index a62ebe95..00000000 --- a/vendor/phpunit/phpunit/src/Runner/BackedUpEnvironmentVariable.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function getenv; -use function putenv; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BackedUpEnvironmentVariable -{ - private const string FROM_GETENV = 'getenv'; - private const string FROM_SUPERGLOBAL = 'superglobal'; - - /** - * @var self::FROM_GETENV|self::FROM_SUPERGLOBAL - */ - private string $from; - - /** - * @var non-empty-string - */ - private string $name; - private null|string $value; - - /** - * @param non-empty-string $name - * - * @return array{0: self, 1: self} - */ - public static function create(string $name): array - { - $getenv = getenv($name); - - if ($getenv === false) { - $getenv = null; - } - - return [ - new self(self::FROM_SUPERGLOBAL, $name, $_ENV[$name] ?? null), - new self(self::FROM_GETENV, $name, $getenv), - ]; - } - - /** - * @param self::FROM_GETENV|self::FROM_SUPERGLOBAL $from - * @param non-empty-string $name - */ - private function __construct(string $from, string $name, null|string $value) - { - $this->from = $from; - $this->name = $name; - $this->value = $value; - } - - public function restore(): void - { - if ($this->from === self::FROM_GETENV) { - $this->restoreGetEnv(); - } else { - $this->restoreSuperGlobal(); - } - } - - private function restoreGetEnv(): void - { - if ($this->value === null) { - putenv($this->name); - } else { - putenv("{$this->name}={$this->value}"); - } - } - - private function restoreSuperGlobal(): void - { - if ($this->value === null) { - unset($_ENV[$this->name]); - } else { - $_ENV[$this->name] = $this->value; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php deleted file mode 100644 index cffc3791..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Baseline -{ - public const int VERSION = 1; - - /** - * @var array>> - */ - private array $issues = []; - - public function add(Issue $issue): void - { - if (!isset($this->issues[$issue->file()])) { - $this->issues[$issue->file()] = []; - } - - if (!isset($this->issues[$issue->file()][$issue->line()])) { - $this->issues[$issue->file()][$issue->line()] = []; - } - - $this->issues[$issue->file()][$issue->line()][] = $issue; - } - - public function has(Issue $issue): bool - { - if (!isset($this->issues[$issue->file()][$issue->line()])) { - return false; - } - - foreach ($this->issues[$issue->file()][$issue->line()] as $_issue) { - if ($_issue->equals($issue)) { - return true; - } - } - - return false; - } - - /** - * @return array>> - */ - public function groupedByFileAndLine(): array - { - return $this->issues; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotLoadBaselineException.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotLoadBaselineException.php deleted file mode 100644 index c5590136..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotLoadBaselineException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Runner\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotLoadBaselineException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotWriteBaselineException.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotWriteBaselineException.php deleted file mode 100644 index 914a2c34..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/CannotWriteBaselineException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Runner\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotWriteBaselineException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/FileDoesNotHaveLineException.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/FileDoesNotHaveLineException.php deleted file mode 100644 index 20c6ca03..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Exception/FileDoesNotHaveLineException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use function sprintf; -use PHPUnit\Runner\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FileDoesNotHaveLineException extends RuntimeException implements Exception -{ - public function __construct(string $file, int $line) - { - parent::__construct( - sprintf( - 'File "%s" does not have line %d', - $file, - $line, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php deleted file mode 100644 index c5ce074d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Runner\FileDoesNotExistException; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\SourceFilter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Generator -{ - private Baseline $baseline; - private Source $source; - - public function __construct(Facade $facade, Source $source) - { - $facade->registerSubscribers( - new TestTriggeredDeprecationSubscriber($this), - new TestTriggeredNoticeSubscriber($this), - new TestTriggeredPhpDeprecationSubscriber($this), - new TestTriggeredPhpNoticeSubscriber($this), - new TestTriggeredPhpWarningSubscriber($this), - new TestTriggeredWarningSubscriber($this), - ); - - $this->baseline = new Baseline; - $this->source = $source; - } - - public function baseline(): Baseline - { - return $this->baseline; - } - - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function testTriggeredIssue(DeprecationTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event): void - { - if ($event->wasSuppressed() && !$this->isSuppressionIgnored($event)) { - return; - } - - if ($this->restrict($event) && !SourceFilter::instance()->includes($event->file())) { - return; - } - - $this->baseline->add( - Issue::from( - $event->file(), - $event->line(), - null, - $event->message(), - ), - ); - } - - private function restrict(DeprecationTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event): bool - { - if ($event instanceof WarningTriggered || $event instanceof PhpWarningTriggered) { - return $this->source->restrictWarnings(); - } - - if ($event instanceof NoticeTriggered || $event instanceof PhpNoticeTriggered) { - return $this->source->restrictNotices(); - } - - return false; - } - - private function isSuppressionIgnored(DeprecationTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event): bool - { - if ($event instanceof WarningTriggered) { - return $this->source->ignoreSuppressionOfWarnings(); - } - - if ($event instanceof PhpWarningTriggered) { - return $this->source->ignoreSuppressionOfPhpWarnings(); - } - - if ($event instanceof PhpNoticeTriggered) { - return $this->source->ignoreSuppressionOfPhpNotices(); - } - - if ($event instanceof NoticeTriggered) { - return $this->source->ignoreSuppressionOfNotices(); - } - - if ($event instanceof PhpDeprecationTriggered) { - return $this->source->ignoreSuppressionOfPhpDeprecations(); - } - - return $this->source->ignoreSuppressionOfDeprecations(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Issue.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Issue.php deleted file mode 100644 index 869ea26a..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Issue.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use const FILE_IGNORE_NEW_LINES; -use function assert; -use function file; -use function is_file; -use function sha1; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Issue -{ - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var positive-int - */ - private int $line; - - /** - * @var non-empty-string - */ - private string $hash; - - /** - * @var non-empty-string - */ - private string $description; - - /** - * @param non-empty-string $file - * @param positive-int $line - * @param ?non-empty-string $hash - * @param non-empty-string $description - * - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public static function from(string $file, int $line, ?string $hash, string $description): self - { - if ($hash === null) { - $hash = self::calculateHash($file, $line); - } - - return new self($file, $line, $hash, $description); - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $hash - * @param non-empty-string $description - */ - private function __construct(string $file, int $line, string $hash, string $description) - { - $this->file = $file; - $this->line = $line; - $this->hash = $hash; - $this->description = $description; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - /** - * @return non-empty-string - */ - public function hash(): string - { - return $this->hash; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return $this->description; - } - - public function equals(self $other): bool - { - return $this->file() === $other->file() && - $this->line() === $other->line() && - $this->hash() === $other->hash() && - $this->description() === $other->description(); - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - * - * @return non-empty-string - */ - private static function calculateHash(string $file, int $line): string - { - $lines = @file($file, FILE_IGNORE_NEW_LINES); - - if ($lines === false && !is_file($file)) { - throw new FileDoesNotExistException($file); - } - - $key = $line - 1; - - if (!isset($lines[$key])) { - throw new FileDoesNotHaveLineException($file, $line); - } - - $hash = sha1($lines[$key]); - - assert($hash !== ''); - - return $hash; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Reader.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Reader.php deleted file mode 100644 index ce3a194f..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Reader.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use const DIRECTORY_SEPARATOR; -use function assert; -use function dirname; -use function is_file; -use function realpath; -use function sprintf; -use function str_replace; -use function trim; -use DOMElement; -use DOMXPath; -use PHPUnit\Util\Xml\Loader as XmlLoader; -use PHPUnit\Util\Xml\XmlException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Reader -{ - /** - * @param non-empty-string $baselineFile - * - * @throws CannotLoadBaselineException - */ - public function read(string $baselineFile): Baseline - { - if (!is_file($baselineFile)) { - throw new CannotLoadBaselineException( - sprintf( - 'Cannot read baseline %s, file does not exist', - $baselineFile, - ), - ); - } - - try { - $document = (new XmlLoader)->loadFile($baselineFile); - } catch (XmlException $e) { - throw new CannotLoadBaselineException( - sprintf( - 'Cannot read baseline %s: %s', - $baselineFile, - trim($e->getMessage()), - ), - ); - } - - $version = (int) $document->documentElement->getAttribute('version'); - - if ($version !== Baseline::VERSION) { - throw new CannotLoadBaselineException( - sprintf( - 'Cannot read baseline %s, version %d is not supported', - $baselineFile, - $version, - ), - ); - } - - $baseline = new Baseline; - $baselineDirectory = dirname(realpath($baselineFile)); - $xpath = new DOMXPath($document); - - foreach ($xpath->query('file') as $fileElement) { - assert($fileElement instanceof DOMElement); - - $file = $baselineDirectory . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $fileElement->getAttribute('path')); - - foreach ($xpath->query('line', $fileElement) as $lineElement) { - assert($lineElement instanceof DOMElement); - - $line = (int) $lineElement->getAttribute('number'); - $hash = $lineElement->getAttribute('hash'); - - foreach ($xpath->query('issue', $lineElement) as $issueElement) { - assert($issueElement instanceof DOMElement); - - $description = $issueElement->textContent; - - assert($line > 0); - assert($hash !== ''); - assert($description !== ''); - - $baseline->add(Issue::from($file, $line, $hash, $description)); - } - } - } - - return $baseline; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/RelativePathCalculator.php b/vendor/phpunit/phpunit/src/Runner/Baseline/RelativePathCalculator.php deleted file mode 100644 index a05e6bbe..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/RelativePathCalculator.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use function array_fill; -use function array_merge; -use function array_slice; -use function assert; -use function count; -use function explode; -use function implode; -use function str_replace; -use function strpos; -use function substr; -use function trim; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see Copied from https://github.com/phpstan/phpstan-src/blob/1.10.33/src/File/ParentDirectoryRelativePathHelper.php - */ -final readonly class RelativePathCalculator -{ - /** - * @var non-empty-string - */ - private string $baselineDirectory; - - /** - * @param non-empty-string $baselineDirectory - */ - public function __construct(string $baselineDirectory) - { - $this->baselineDirectory = $baselineDirectory; - } - - /** - * @param non-empty-string $filename - * - * @return non-empty-string - */ - public function calculate(string $filename): string - { - $result = implode('/', $this->parts($filename)); - - assert($result !== ''); - - return $result; - } - - /** - * @param non-empty-string $filename - * - * @return list - */ - public function parts(string $filename): array - { - $schemePosition = strpos($filename, '://'); - - if ($schemePosition !== false) { - $filename = substr($filename, $schemePosition + 3); - - assert($filename !== ''); - } - - $parentParts = explode('/', trim(str_replace('\\', '/', $this->baselineDirectory), '/')); - $parentPartsCount = count($parentParts); - $filenameParts = explode('/', trim(str_replace('\\', '/', $filename), '/')); - $filenamePartsCount = count($filenameParts); - - $i = 0; - - for (; $i < $filenamePartsCount; $i++) { - if ($parentPartsCount < $i + 1) { - break; - } - - $parentPath = implode('/', array_slice($parentParts, 0, $i + 1)); - $filenamePath = implode('/', array_slice($filenameParts, 0, $i + 1)); - - if ($parentPath !== $filenamePath) { - break; - } - } - - if ($i === 0) { - return [$filename]; - } - - $dotsCount = $parentPartsCount - $i; - - assert($dotsCount >= 0); - - return array_merge(array_fill(0, $dotsCount, '..'), array_slice($filenameParts, $i)); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/Subscriber.php deleted file mode 100644 index 59ca634b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private Generator $generator; - - public function __construct(Generator $generator) - { - $this->generator = $generator; - } - - protected function generator(): Generator - { - return $this->generator; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredDeprecationSubscriber.php deleted file mode 100644 index 72e26110..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(DeprecationTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredNoticeSubscriber.php deleted file mode 100644 index 288d0eff..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredNoticeSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\NoticeTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(NoticeTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpDeprecationSubscriber.php deleted file mode 100644 index f72095ac..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpDeprecationSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpDeprecationSubscriber extends Subscriber implements PhpDeprecationTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(PhpDeprecationTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpNoticeSubscriber.php deleted file mode 100644 index 9707a46b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpNoticeSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpNoticeSubscriber extends Subscriber implements PhpNoticeTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(PhpNoticeTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpWarningSubscriber.php deleted file mode 100644 index 22af95db..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredPhpWarningSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpWarningSubscriber extends Subscriber implements PhpWarningTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(PhpWarningTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredWarningSubscriber.php deleted file mode 100644 index fd5e0db6..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Subscriber/TestTriggeredWarningSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\Test\WarningTriggeredSubscriber; -use PHPUnit\Runner\FileDoesNotExistException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber -{ - /** - * @throws FileDoesNotExistException - * @throws FileDoesNotHaveLineException - */ - public function notify(WarningTriggered $event): void - { - $this->generator()->testTriggeredIssue($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Writer.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Writer.php deleted file mode 100644 index 7d7d7645..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Writer.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Baseline; - -use function dirname; -use function file_put_contents; -use function is_dir; -use function realpath; -use function sprintf; -use XMLWriter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Writer -{ - /** - * @param non-empty-string $baselineFile - * - * @throws CannotWriteBaselineException - */ - public function write(string $baselineFile, Baseline $baseline): void - { - $normalizedBaselineFile = realpath(dirname($baselineFile)); - - if ($normalizedBaselineFile === false || !is_dir($normalizedBaselineFile)) { - throw new CannotWriteBaselineException(sprintf('Cannot write baseline to "%s".', $baselineFile)); - } - - $pathCalculator = new RelativePathCalculator($normalizedBaselineFile); - - $writer = new XMLWriter; - - $writer->openMemory(); - $writer->setIndent(true); - $writer->startDocument(); - - $writer->startElement('files'); - $writer->writeAttribute('version', (string) Baseline::VERSION); - - foreach ($baseline->groupedByFileAndLine() as $file => $lines) { - $writer->startElement('file'); - $writer->writeAttribute('path', $pathCalculator->calculate($file)); - - foreach ($lines as $line => $issues) { - $writer->startElement('line'); - $writer->writeAttribute('number', (string) $line); - $writer->writeAttribute('hash', $issues[0]->hash()); - - foreach ($issues as $issue) { - $writer->startElement('issue'); - $writer->writeCdata($issue->description()); - $writer->endElement(); - } - - $writer->endElement(); - } - - $writer->endElement(); - } - - $writer->endElement(); - - file_put_contents($baselineFile, $writer->outputMemory()); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php b/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php deleted file mode 100644 index 28620e41..00000000 --- a/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php +++ /dev/null @@ -1,488 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function assert; -use function file_put_contents; -use function sprintf; -use function sys_get_temp_dir; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\TestCase; -use PHPUnit\TextUI\Configuration\CodeCoverageFilterRegistry; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Output\Printer; -use PHPUnit\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Driver\Selector; -use SebastianBergmann\CodeCoverage\Exception as CodeCoverageException; -use SebastianBergmann\CodeCoverage\Filter; -use SebastianBergmann\CodeCoverage\Report\Clover as CloverReport; -use SebastianBergmann\CodeCoverage\Report\Cobertura as CoberturaReport; -use SebastianBergmann\CodeCoverage\Report\Crap4j as Crap4jReport; -use SebastianBergmann\CodeCoverage\Report\Html\Colors; -use SebastianBergmann\CodeCoverage\Report\Html\CustomCssFile; -use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport; -use SebastianBergmann\CodeCoverage\Report\OpenClover as OpenCloverReport; -use SebastianBergmann\CodeCoverage\Report\PHP as PhpReport; -use SebastianBergmann\CodeCoverage\Report\Text as TextReport; -use SebastianBergmann\CodeCoverage\Report\Thresholds; -use SebastianBergmann\CodeCoverage\Report\Xml\Facade as XmlReport; -use SebastianBergmann\CodeCoverage\StaticAnalysis\CacheWarmer; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; -use SebastianBergmann\CodeCoverage\Test\Target\ValidationFailure; -use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize; -use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Timer\NoActiveTimerException; -use SebastianBergmann\Timer\Timer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ -final class CodeCoverage -{ - private static ?self $instance = null; - private ?\SebastianBergmann\CodeCoverage\CodeCoverage $codeCoverage = null; - - /** - * @phpstan-ignore property.internalClass - */ - private ?Driver $driver = null; - private bool $collecting = false; - private ?TestCase $test = null; - private ?Timer $timer = null; - - public static function instance(): self - { - if (self::$instance === null) { - self::$instance = new self; - } - - return self::$instance; - } - - public function init(Configuration $configuration, CodeCoverageFilterRegistry $codeCoverageFilterRegistry, bool $extensionRequiresCodeCoverageCollection): CodeCoverageInitializationStatus - { - $codeCoverageFilterRegistry->init($configuration); - - if (!$configuration->hasCoverageReport() && !$extensionRequiresCodeCoverageCollection) { - return CodeCoverageInitializationStatus::NOT_REQUESTED; - } - - $this->activate($codeCoverageFilterRegistry->get(), $configuration->pathCoverage()); - - if (!$this->isActive()) { - return CodeCoverageInitializationStatus::FAILED; - } - - if ($configuration->hasCoverageCacheDirectory()) { - $coverageCacheDirectory = $configuration->coverageCacheDirectory(); - } else { - $candidate = sys_get_temp_dir() . '/phpunit-code-coverage-cache'; - - if (Filesystem::createDirectory($candidate)) { - $coverageCacheDirectory = $candidate; - } - } - - if (isset($coverageCacheDirectory)) { - $this->codeCoverage()->cacheStaticAnalysis($coverageCacheDirectory); - } - - $this->codeCoverage()->excludeSubclassesOfThisClassFromUnintentionallyCoveredCodeCheck(Comparator::class); - - if ($configuration->strictCoverage()) { - $this->codeCoverage()->enableCheckForUnintentionallyCoveredCode(); - } - - if ($configuration->ignoreDeprecatedCodeUnitsFromCodeCoverage()) { - $this->codeCoverage()->ignoreDeprecatedCode(); - } else { - $this->codeCoverage()->doNotIgnoreDeprecatedCode(); - } - - if ($configuration->disableCodeCoverageIgnore()) { - $this->codeCoverage()->disableAnnotationsForIgnoringCode(); - } else { - $this->codeCoverage()->enableAnnotationsForIgnoringCode(); - } - - if ($configuration->includeUncoveredFiles()) { - $this->codeCoverage()->includeUncoveredFiles(); - } else { - $this->codeCoverage()->excludeUncoveredFiles(); - } - - if ($codeCoverageFilterRegistry->get()->isEmpty()) { - if (!$codeCoverageFilterRegistry->configured()) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - 'No filter is configured, code coverage will not be processed', - ); - } else { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - 'Incorrect filter configuration, code coverage will not be processed', - ); - } - - $this->deactivate(); - } - - if (isset($coverageCacheDirectory) && $configuration->includeUncoveredFiles()) { - EventFacade::emitter()->testRunnerStartedStaticAnalysisForCodeCoverage(); - - /** @phpstan-ignore new.internalClass,method.internalClass */ - $statistics = (new CacheWarmer)->warmCache( - $coverageCacheDirectory, - !$configuration->disableCodeCoverageIgnore(), - $configuration->ignoreDeprecatedCodeUnitsFromCodeCoverage(), - $codeCoverageFilterRegistry->get(), - ); - - EventFacade::emitter()->testRunnerFinishedStaticAnalysisForCodeCoverage( - $statistics['cacheHits'], - $statistics['cacheMisses'], - ); - } - - return CodeCoverageInitializationStatus::SUCCEEDED; - } - - /** - * @phpstan-assert-if-true !null $this->codeCoverage - */ - public function isActive(): bool - { - return $this->codeCoverage !== null; - } - - public function codeCoverage(): \SebastianBergmann\CodeCoverage\CodeCoverage - { - return $this->codeCoverage; - } - - /** - * @return non-empty-string - */ - public function driverNameAndVersion(): string - { - return $this->driver->nameAndVersion(); - } - - public function start(TestCase $test): void - { - if ($this->collecting) { - return; - } - - $size = TestSize::unknown(); - - if ($test->size()->isSmall()) { - $size = TestSize::small(); - } elseif ($test->size()->isMedium()) { - $size = TestSize::medium(); - } elseif ($test->size()->isLarge()) { - $size = TestSize::large(); - } - - $this->test = $test; - - $this->codeCoverage->start( - $test->valueObjectForEvents()->id(), - $size, - ); - - $this->collecting = true; - } - - public function stop(bool $append, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): void - { - if (!$this->collecting) { - return; - } - - $status = TestStatus::unknown(); - - if ($this->test !== null) { - if ($this->test->status()->isSuccess()) { - $status = TestStatus::success(); - } else { - $status = TestStatus::failure(); - } - } - - if ($covers instanceof TargetCollection) { - $result = $this->codeCoverage->validate($covers); - - if ($result->isFailure()) { - assert($result instanceof ValidationFailure); - - EventFacade::emitter()->testTriggeredPhpunitWarning( - $this->test->valueObjectForEvents(), - $result->message(), - ); - - $append = false; - } - } - - if ($uses instanceof TargetCollection) { - $result = $this->codeCoverage->validate($uses); - - if ($result->isFailure()) { - assert($result instanceof ValidationFailure); - - EventFacade::emitter()->testTriggeredPhpunitWarning( - $this->test->valueObjectForEvents(), - $result->message(), - ); - - $append = false; - } - } - - $this->codeCoverage->stop($append, $status, $covers, $uses); - - $this->test = null; - $this->collecting = false; - } - - public function deactivate(): void - { - $this->driver = null; - $this->codeCoverage = null; - $this->test = null; - } - - public function generateReports(Printer $printer, Configuration $configuration): void - { - if (!$this->isActive()) { - return; - } - - if ($configuration->hasCoveragePhp()) { - $this->codeCoverageGenerationStart($printer, 'PHP'); - - try { - $writer = new PhpReport; - $writer->process($this->codeCoverage(), $configuration->coveragePhp()); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageClover()) { - $this->codeCoverageGenerationStart($printer, 'Clover XML'); - - try { - $writer = new CloverReport; - $writer->process($this->codeCoverage(), $configuration->coverageClover(), 'Clover Coverage'); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageOpenClover()) { - $this->codeCoverageGenerationStart($printer, 'OpenClover XML'); - - try { - $writer = new OpenCloverReport; - $writer->process($this->codeCoverage(), $configuration->coverageOpenClover(), 'OpenClover Coverage'); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageCobertura()) { - $this->codeCoverageGenerationStart($printer, 'Cobertura XML'); - - try { - $writer = new CoberturaReport; - $writer->process($this->codeCoverage(), $configuration->coverageCobertura()); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageCrap4j()) { - $this->codeCoverageGenerationStart($printer, 'Crap4J XML'); - - try { - $writer = new Crap4jReport($configuration->coverageCrap4jThreshold()); - $writer->process($this->codeCoverage(), $configuration->coverageCrap4j()); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageHtml()) { - $this->codeCoverageGenerationStart($printer, 'HTML'); - - try { - $customCssFile = CustomCssFile::default(); - - if ($configuration->hasCoverageHtmlCustomCssFile()) { - $customCssFile = CustomCssFile::from($configuration->coverageHtmlCustomCssFile()); - } - - $writer = new HtmlReport( - sprintf( - ' and PHPUnit %s', - Version::id(), - ), - Colors::from( - $configuration->coverageHtmlColorSuccessLow(), - $configuration->coverageHtmlColorSuccessMedium(), - $configuration->coverageHtmlColorSuccessHigh(), - $configuration->coverageHtmlColorWarning(), - $configuration->coverageHtmlColorDanger(), - ), - Thresholds::from( - $configuration->coverageHtmlLowUpperBound(), - $configuration->coverageHtmlHighLowerBound(), - ), - $customCssFile, - ); - - $writer->process($this->codeCoverage(), $configuration->coverageHtml()); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - - if ($configuration->hasCoverageText()) { - $processor = new TextReport( - Thresholds::default(), - $configuration->coverageTextShowUncoveredFiles(), - $configuration->coverageTextShowOnlySummary(), - ); - - $textReport = $processor->process($this->codeCoverage(), $configuration->colors()); - - if ($configuration->coverageText() === 'php://stdout') { - if (!$configuration->noOutput() && !$configuration->debug()) { - $printer->print($textReport); - } - } else { - file_put_contents($configuration->coverageText(), $textReport); - } - } - - if ($configuration->hasCoverageXml()) { - $this->codeCoverageGenerationStart($printer, 'PHPUnit XML'); - - try { - $writer = new XmlReport(Version::id()); - $writer->process($this->codeCoverage(), $configuration->coverageXml()); - - $this->codeCoverageGenerationSucceeded($printer); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($printer, $e); - } - } - } - - private function activate(Filter $filter, bool $pathCoverage): void - { - try { - if ($pathCoverage) { - $this->driver = (new Selector)->forLineAndPathCoverage($filter); - } else { - $this->driver = (new Selector)->forLineCoverage($filter); - } - - $this->codeCoverage = new \SebastianBergmann\CodeCoverage\CodeCoverage( - $this->driver, - $filter, - ); - } catch (CodeCoverageException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - $e->getMessage(), - ); - } - } - - private function codeCoverageGenerationStart(Printer $printer, string $format): void - { - $printer->print( - sprintf( - "\nGenerating code coverage report in %s format ... ", - $format, - ), - ); - - $this->timer()->start(); - } - - /** - * @throws NoActiveTimerException - */ - private function codeCoverageGenerationSucceeded(Printer $printer): void - { - $printer->print( - sprintf( - "done [%s]\n", - $this->timer()->stop()->asString(), - ), - ); - } - - /** - * @throws NoActiveTimerException - */ - private function codeCoverageGenerationFailed(Printer $printer, CodeCoverageException $e): void - { - $printer->print( - sprintf( - "failed [%s]\n%s\n", - $this->timer()->stop()->asString(), - $e->getMessage(), - ), - ); - } - - private function timer(): Timer - { - if ($this->timer === null) { - $this->timer = new Timer; - } - - return $this->timer; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/CodeCoverageInitializationStatus.php b/vendor/phpunit/phpunit/src/Runner/CodeCoverageInitializationStatus.php deleted file mode 100644 index ce895f6e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/CodeCoverageInitializationStatus.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This enumeration is not covered by the backward compatibility promise for PHPUnit - */ -enum CodeCoverageInitializationStatus -{ - case NOT_REQUESTED; - case SUCCEEDED; - case FAILED; -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php deleted file mode 100644 index 575bc2dd..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\TestRunner\IssueFilter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Collector -{ - private readonly IssueFilter $issueFilter; - - /** - * @var list - */ - private array $deprecations = []; - - /** - * @var list - */ - private array $filteredDeprecations = []; - - public function __construct(Facade $facade, IssueFilter $issueFilter) - { - $facade->registerSubscribers( - new TestPreparedSubscriber($this), - new TestTriggeredDeprecationSubscriber($this), - ); - - $this->issueFilter = $issueFilter; - } - - /** - * @return list - */ - public function deprecations(): array - { - return $this->deprecations; - } - - /** - * @return list - */ - public function filteredDeprecations(): array - { - return $this->filteredDeprecations; - } - - public function testPrepared(): void - { - $this->deprecations = []; - } - - public function testTriggeredDeprecation(DeprecationTriggered $event): void - { - $this->deprecations[] = $event->message(); - - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - $this->filteredDeprecations[] = $event->message(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php deleted file mode 100644 index a08fdc64..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -use PHPUnit\Event\EventFacadeIsSealedException; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Event\UnknownSubscriberTypeException; -use PHPUnit\TestRunner\IssueFilter; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - private static null|Collector|InIsolationCollector $collector = null; - private static bool $inIsolation = false; - - public static function init(): void - { - self::collector(); - } - - public static function initForIsolation(): void - { - self::collector(); - - self::$inIsolation = true; - } - - /** - * @return list - */ - public static function deprecations(): array - { - return self::collector()->deprecations(); - } - - /** - * @return list - */ - public static function filteredDeprecations(): array - { - return self::collector()->filteredDeprecations(); - } - - /** - * @throws EventFacadeIsSealedException - * @throws UnknownSubscriberTypeException - */ - public static function collector(): Collector|InIsolationCollector - { - if (self::$collector !== null) { - return self::$collector; - } - - $issueFilter = new IssueFilter( - ConfigurationRegistry::get()->source(), - ); - - if (self::$inIsolation) { - self::$collector = new InIsolationCollector( - $issueFilter, - ); - - return self::$collector; - } - - self::$collector = new Collector( - EventFacade::instance(), - $issueFilter, - ); - - return self::$collector; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/InIsolationCollector.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/InIsolationCollector.php deleted file mode 100644 index 31287622..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/InIsolationCollector.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\TestRunner\IssueFilter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InIsolationCollector -{ - private readonly IssueFilter $issueFilter; - - /** - * @var list - */ - private array $deprecations = []; - - /** - * @var list - */ - private array $filteredDeprecations = []; - - public function __construct(IssueFilter $issueFilter) - { - $this->issueFilter = $issueFilter; - } - - /** - * @return list - */ - public function deprecations(): array - { - return $this->deprecations; - } - - /** - * @return list - */ - public function filteredDeprecations(): array - { - return $this->filteredDeprecations; - } - - public function testTriggeredDeprecation(DeprecationTriggered $event): void - { - $this->deprecations[] = $event->message(); - - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - $this->filteredDeprecations[] = $event->message(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php deleted file mode 100644 index 65af6ab7..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class Subscriber -{ - private readonly Collector|InIsolationCollector $collector; - - public function __construct(Collector|InIsolationCollector $collector) - { - $this->collector = $collector; - } - - protected function collector(): Collector|InIsolationCollector - { - return $this->collector; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index 0e78c31a..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->collector()->testPrepared(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php deleted file mode 100644 index a01f1b61..00000000 --- a/vendor/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\DeprecationCollector; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - public function notify(DeprecationTriggered $event): void - { - $this->collector()->testTriggeredDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php b/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php deleted file mode 100644 index e97d4788..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php +++ /dev/null @@ -1,512 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use const DEBUG_BACKTRACE_IGNORE_ARGS; -use const E_COMPILE_ERROR; -use const E_COMPILE_WARNING; -use const E_CORE_ERROR; -use const E_CORE_WARNING; -use const E_DEPRECATED; -use const E_ERROR; -use const E_NOTICE; -use const E_PARSE; -use const E_RECOVERABLE_ERROR; -use const E_USER_DEPRECATED; -use const E_USER_ERROR; -use const E_USER_NOTICE; -use const E_USER_WARNING; -use const E_WARNING; -use function array_keys; -use function array_values; -use function assert; -use function debug_backtrace; -use function defined; -use function error_reporting; -use function preg_match; -use function restore_error_handler; -use function set_error_handler; -use function sprintf; -use PHPUnit\Event; -use PHPUnit\Event\Code\IssueTrigger\IssueTrigger; -use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\IgnoreDeprecations; -use PHPUnit\Runner\Baseline\Baseline; -use PHPUnit\Runner\Baseline\Issue; -use PHPUnit\TextUI\Configuration\Registry; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\SourceFilter; -use PHPUnit\Util\ExcludeList; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorHandler -{ - private const int UNHANDLEABLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING; - private const int INSUPPRESSIBLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR; - private static ?self $instance = null; - private ?Baseline $baseline = null; - private bool $enabled = false; - private ?int $originalErrorReportingLevel = null; - private readonly Source $source; - - /** - * @var list - */ - private array $globalDeprecations = []; - - /** - * @var array> - */ - private array $testCaseContextDeprecations = []; - private ?string $testCaseContext = null; - - /** - * @var ?array{functions: list, methods: list} - */ - private ?array $deprecationTriggers = null; - - public static function instance(): self - { - return self::$instance ?? self::$instance = new self(Registry::get()->source()); - } - - private function __construct(Source $source) - { - $this->source = $source; - } - - /** - * @throws NoTestCaseObjectOnCallStackException - */ - public function __invoke(int $errorNumber, string $errorString, string $errorFile, int $errorLine): false - { - $suppressed = (error_reporting() & ~self::INSUPPRESSIBLE_LEVELS) === 0; - - if ($suppressed && (new ExcludeList)->isExcluded($errorFile)) { - return false; - } - - /** - * E_STRICT is deprecated since PHP 8.4. - * - * @see https://github.com/sebastianbergmann/phpunit/issues/5956 - */ - if (defined('E_STRICT') && $errorNumber === 2048) { - $errorNumber = E_NOTICE; - } - - $test = Event\Code\TestMethodBuilder::fromCallStack(); - - if ($errorNumber === E_USER_DEPRECATED) { - $deprecationFrame = $this->guessDeprecationFrame(); - $errorFile = $deprecationFrame['file'] ?? $errorFile; - $errorLine = $deprecationFrame['line'] ?? $errorLine; - } - - $ignoredByBaseline = $this->ignoredByBaseline($errorFile, $errorLine, $errorString); - $ignoredByTest = $this->deprecationIgnoredByTest($test, $errorString); - - switch ($errorNumber) { - case E_NOTICE: - Event\Facade::emitter()->testTriggeredPhpNotice( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - ); - - break; - - case E_USER_NOTICE: - Event\Facade::emitter()->testTriggeredNotice( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - ); - - break; - - case E_WARNING: - Event\Facade::emitter()->testTriggeredPhpWarning( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - ); - - break; - - case E_USER_WARNING: - Event\Facade::emitter()->testTriggeredWarning( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - ); - - break; - - case E_DEPRECATED: - Event\Facade::emitter()->testTriggeredPhpDeprecation( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - $ignoredByTest, - $this->trigger($test, false), - ); - - break; - - case E_USER_DEPRECATED: - Event\Facade::emitter()->testTriggeredDeprecation( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - $ignoredByBaseline, - $ignoredByTest, - $this->trigger($test, true), - $this->stackTrace(), - ); - - break; - - case E_USER_ERROR: - Event\Facade::emitter()->testTriggeredError( - $test, - $errorString, - $errorFile, - $errorLine, - $suppressed, - ); - - throw new ErrorException('E_USER_ERROR was triggered'); - - default: - return false; - } - - return false; - } - - public function deprecationHandler(int $errorNumber, string $errorString, string $errorFile, int $errorLine): true - { - if ($this->testCaseContext !== null) { - $this->testCaseContextDeprecations[$this->testCaseContext][] = [$errorNumber, $errorString, $errorFile, $errorLine]; - } else { - $this->globalDeprecations[] = [$errorNumber, $errorString, $errorFile, $errorLine]; - } - - return true; - } - - public function registerDeprecationHandler(): void - { - set_error_handler([self::$instance, 'deprecationHandler'], E_USER_DEPRECATED | E_DEPRECATED); - } - - public function restoreDeprecationHandler(): void - { - restore_error_handler(); - } - - public function enable(TestCase $test): void - { - if ($this->enabled) { - return; - } - - $oldErrorHandler = set_error_handler($this); - - if ($oldErrorHandler !== null) { - restore_error_handler(); - - return; - } - - $this->enabled = true; - $this->originalErrorReportingLevel = error_reporting(); - - $this->triggerGlobalDeprecations($test); - - error_reporting($this->originalErrorReportingLevel & self::UNHANDLEABLE_LEVELS); - } - - public function disable(): void - { - if (!$this->enabled) { - return; - } - - restore_error_handler(); - - error_reporting(error_reporting() | $this->originalErrorReportingLevel); - - $this->enabled = false; - $this->originalErrorReportingLevel = null; - } - - public function useBaseline(Baseline $baseline): void - { - $this->baseline = $baseline; - } - - /** - * @param array{functions: list, methods: list} $deprecationTriggers - */ - public function useDeprecationTriggers(array $deprecationTriggers): void - { - $this->deprecationTriggers = $deprecationTriggers; - } - - public function enterTestCaseContext(string $className, string $methodName): void - { - $this->testCaseContext = $this->testCaseContext($className, $methodName); - } - - public function leaveTestCaseContext(): void - { - $this->testCaseContext = null; - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $description - */ - private function ignoredByBaseline(string $file, int $line, string $description): bool - { - if ($this->baseline === null) { - return false; - } - - return $this->baseline->has(Issue::from($file, $line, null, $description)); - } - - private function trigger(TestMethod $test, bool $filterTrigger): IssueTrigger - { - if (!$this->source->notEmpty()) { - return IssueTrigger::unknown(); - } - - $trace = $this->filteredStackTrace($filterTrigger); - - $triggeredInFirstPartyCode = false; - $triggerCalledFromFirstPartyCode = false; - - if (isset($trace[0]['file'])) { - if ($trace[0]['file'] === $test->file()) { - return IssueTrigger::test(); - } - - if (SourceFilter::instance()->includes($trace[0]['file'])) { - $triggeredInFirstPartyCode = true; - } - } - - if (isset($trace[1]['file']) && - ($trace[1]['file'] === $test->file() || - SourceFilter::instance()->includes($trace[1]['file']))) { - $triggerCalledFromFirstPartyCode = true; - } - - if ($triggerCalledFromFirstPartyCode) { - if ($triggeredInFirstPartyCode) { - return IssueTrigger::self(); - } - - return IssueTrigger::direct(); - } - - return IssueTrigger::indirect(); - } - - /** - * @return list - */ - private function filteredStackTrace(bool $filterDeprecationTriggers): array - { - $trace = $this->errorStackTrace(); - - if ($this->deprecationTriggers === null || !$filterDeprecationTriggers) { - return array_values($trace); - } - - foreach (array_keys($trace) as $frame) { - foreach ($this->deprecationTriggers['functions'] as $function) { - if ($this->frameIsFunction($trace[$frame], $function)) { - unset($trace[$frame]); - - continue 2; - } - } - - foreach ($this->deprecationTriggers['methods'] as $method) { - if ($this->frameIsMethod($trace[$frame], $method)) { - unset($trace[$frame]); - - continue 2; - } - } - } - - return array_values($trace); - } - - /** - * @return ?array{file: non-empty-string, line: positive-int} - */ - private function guessDeprecationFrame(): ?array - { - if ($this->deprecationTriggers === null) { - return null; - } - - $trace = $this->errorStackTrace(); - - foreach ($trace as $frame) { - foreach ($this->deprecationTriggers['functions'] as $function) { - if ($this->frameIsFunction($frame, $function)) { - return $frame; - } - } - - foreach ($this->deprecationTriggers['methods'] as $method) { - if ($this->frameIsMethod($frame, $method)) { - return $frame; - } - } - } - - return null; - } - - /** - * @return list - */ - private function errorStackTrace(): array - { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - - $i = 0; - - do { - unset($trace[$i]); - } while (self::class === ($trace[++$i]['class'] ?? null)); - - return array_values($trace); - } - - /** - * @param array{class? : class-string, function?: non-empty-string} $frame - * @param non-empty-string $function - */ - private function frameIsFunction(array $frame, string $function): bool - { - return !isset($frame['class']) && isset($frame['function']) && $frame['function'] === $function; - } - - /** - * @param array{class? : class-string, function?: non-empty-string} $frame - * @param array{className: class-string, methodName: non-empty-string} $method - */ - private function frameIsMethod(array $frame, array $method): bool - { - return isset($frame['class']) && - $frame['class'] === $method['className'] && - isset($frame['function']) && - $frame['function'] === $method['methodName']; - } - - /** - * @return non-empty-string - */ - private function stackTrace(): string - { - $buffer = ''; - $excludeList = new ExcludeList(true); - - foreach ($this->errorStackTrace() as $frame) { - /** - * @see https://github.com/sebastianbergmann/phpunit/issues/6043 - */ - if (!isset($frame['file'])) { - continue; - } - - if ($excludeList->isExcluded($frame['file'])) { - continue; - } - - $buffer .= sprintf( - "%s:%s\n", - $frame['file'], - $frame['line'] ?? '?', - ); - } - - return $buffer; - } - - private function triggerGlobalDeprecations(TestCase $test): void - { - foreach ($this->globalDeprecations ?? [] as $d) { - $this->__invoke(...$d); - } - - $testCaseContext = $this->testCaseContext($test::class, $test->name()); - - foreach ($this->testCaseContextDeprecations[$testCaseContext] ?? [] as $d) { - $this->__invoke(...$d); - } - } - - private function testCaseContext(string $className, string $methodName): string - { - return "{$className}::{$methodName}"; - } - - private function deprecationIgnoredByTest(TestMethod $test, string $message): bool - { - $metadata = \PHPUnit\Metadata\Parser\Registry::parser()->forClassAndMethod($test->className(), $test->methodName())->isIgnoreDeprecations()->asArray(); - - foreach ($metadata as $metadatum) { - assert($metadatum instanceof IgnoreDeprecations); - - $ignoreDeprecationMessagePattern = $metadatum->messagePattern(); - - if ($ignoreDeprecationMessagePattern === null || - (bool) preg_match('{' . $ignoreDeprecationMessagePattern . '}', $message)) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/ClassCannotBeFoundException.php b/vendor/phpunit/phpunit/src/Runner/Exception/ClassCannotBeFoundException.php deleted file mode 100644 index 701cbb5b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/ClassCannotBeFoundException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassCannotBeFoundException extends RuntimeException implements Exception -{ - public function __construct(string $className, string $file) - { - parent::__construct( - sprintf( - 'Class %s cannot be found in %s', - $className, - $file, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php b/vendor/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php deleted file mode 100644 index c9d5474e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassDoesNotExtendTestCaseException extends RuntimeException implements Exception -{ - public function __construct(string $className, string $file) - { - parent::__construct( - sprintf( - 'Class %s declared in %s does not extend PHPUnit\Framework\TestCase', - $className, - $file, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php b/vendor/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php deleted file mode 100644 index bf947589..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ClassIsAbstractException extends RuntimeException implements Exception -{ - public function __construct(string $className, string $file) - { - parent::__construct( - sprintf( - 'Class %s declared in %s is abstract', - $className, - $file, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/DirectoryDoesNotExistException.php b/vendor/phpunit/phpunit/src/Runner/Exception/DirectoryDoesNotExistException.php deleted file mode 100644 index 626c4225..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/DirectoryDoesNotExistException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DirectoryDoesNotExistException extends RuntimeException implements Exception -{ - public function __construct(string $directory) - { - parent::__construct( - sprintf( - 'Directory "%s" does not exist and could not be created', - $directory, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/ErrorException.php b/vendor/phpunit/phpunit/src/Runner/Exception/ErrorException.php deleted file mode 100644 index 954684e9..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/ErrorException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use Error; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ErrorException extends Error implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/Exception.php b/vendor/phpunit/phpunit/src/Runner/Exception/Exception.php deleted file mode 100644 index ea0cf424..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php b/vendor/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php deleted file mode 100644 index 5b84c785..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FileDoesNotExistException extends RuntimeException implements Exception -{ - public function __construct(string $file) - { - parent::__construct( - sprintf( - 'File "%s" does not exist', - $file, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/InvalidOrderException.php b/vendor/phpunit/phpunit/src/Runner/Exception/InvalidOrderException.php deleted file mode 100644 index 016ec85e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/InvalidOrderException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidOrderException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Exception/ParameterDoesNotExistException.php b/vendor/phpunit/phpunit/src/Runner/Exception/ParameterDoesNotExistException.php deleted file mode 100644 index 5d7a0967..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Exception/ParameterDoesNotExistException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ParameterDoesNotExistException extends RuntimeException implements Exception -{ - public function __construct(string $name) - { - parent::__construct( - sprintf( - 'Parameter "%s" does not exist', - $name, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/Extension.php b/vendor/phpunit/phpunit/src/Runner/Extension/Extension.php deleted file mode 100644 index 35610bc3..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Extension/Extension.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Extension; - -use PHPUnit\TextUI\Configuration\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -interface Extension -{ - public function bootstrap(Configuration $configuration, Facade $facade, ParameterCollection $parameters): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php b/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php deleted file mode 100644 index b9c6c9fa..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Extension; - -use const PHP_EOL; -use function assert; -use function class_exists; -use function class_implements; -use function in_array; -use function sprintf; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\TextUI\Configuration\Configuration; -use ReflectionClass; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExtensionBootstrapper -{ - private Configuration $configuration; - private Facade $facade; - - public function __construct(Configuration $configuration, Facade $facade) - { - $this->configuration = $configuration; - $this->facade = $facade; - } - - /** - * @param non-empty-string $className - * @param array $parameters - */ - public function bootstrap(string $className, array $parameters): void - { - if (!class_exists($className)) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot bootstrap extension because class %s does not exist', - $className, - ), - ); - - return; - } - - if (!in_array(Extension::class, class_implements($className), true)) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot bootstrap extension because class %s does not implement interface %s', - $className, - Extension::class, - ), - ); - - return; - } - - try { - $instance = (new ReflectionClass($className))->newInstance(); - - assert($instance instanceof Extension); - - $instance->bootstrap( - $this->configuration, - $this->facade, - ParameterCollection::fromArray($parameters), - ); - } catch (Throwable $t) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Bootstrapping of extension %s failed: %s%s%s', - $className, - $t->getMessage(), - PHP_EOL, - $t->getTraceAsString(), - ), - ); - - return; - } - - EventFacade::emitter()->testRunnerBootstrappedExtension( - $className, - $parameters, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/Facade.php b/vendor/phpunit/phpunit/src/Runner/Extension/Facade.php deleted file mode 100644 index 910f4e5f..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Extension/Facade.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Extension; - -use PHPUnit\Event\EventFacadeIsSealedException; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Event\Subscriber; -use PHPUnit\Event\Tracer\Tracer; -use PHPUnit\Event\UnknownSubscriberTypeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - private bool $replacesOutput = false; - private bool $replacesProgressOutput = false; - private bool $replacesResultOutput = false; - private bool $requiresCodeCoverageCollection = false; - - /** - * @throws EventFacadeIsSealedException - * @throws UnknownSubscriberTypeException - */ - public function registerSubscribers(Subscriber ...$subscribers): void - { - EventFacade::instance()->registerSubscribers(...$subscribers); - } - - /** - * @throws EventFacadeIsSealedException - * @throws UnknownSubscriberTypeException - */ - public function registerSubscriber(Subscriber $subscriber): void - { - EventFacade::instance()->registerSubscriber($subscriber); - } - - /** - * @throws EventFacadeIsSealedException - */ - public function registerTracer(Tracer $tracer): void - { - EventFacade::instance()->registerTracer($tracer); - } - - public function replaceOutput(): void - { - $this->replacesOutput = true; - } - - public function replacesOutput(): bool - { - return $this->replacesOutput; - } - - public function replaceProgressOutput(): void - { - $this->replacesProgressOutput = true; - } - - public function replacesProgressOutput(): bool - { - return $this->replacesOutput || $this->replacesProgressOutput; - } - - public function replaceResultOutput(): void - { - $this->replacesResultOutput = true; - } - - public function replacesResultOutput(): bool - { - return $this->replacesOutput || $this->replacesResultOutput; - } - - public function requireCodeCoverageCollection(): void - { - $this->requiresCodeCoverageCollection = true; - } - - public function requiresCodeCoverageCollection(): bool - { - return $this->requiresCodeCoverageCollection; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/ParameterCollection.php b/vendor/phpunit/phpunit/src/Runner/Extension/ParameterCollection.php deleted file mode 100644 index fef1c9b1..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Extension/ParameterCollection.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Extension; - -use function array_key_exists; -use PHPUnit\Runner\ParameterDoesNotExistException; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ParameterCollection -{ - /** - * @var array - */ - private array $parameters; - - /** - * @param array $parameters - */ - public static function fromArray(array $parameters): self - { - return new self($parameters); - } - - /** - * @param array $parameters - */ - private function __construct(array $parameters) - { - $this->parameters = $parameters; - } - - public function has(string $name): bool - { - return array_key_exists($name, $this->parameters); - } - - /** - * @throws ParameterDoesNotExistException - */ - public function get(string $name): string - { - if (!$this->has($name)) { - throw new ParameterDoesNotExistException($name); - } - - return $this->parameters[$name]; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php b/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php deleted file mode 100644 index 7f3c4b44..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Extension; - -use function count; -use function explode; -use function extension_loaded; -use function implode; -use function is_file; -use function sprintf; -use function str_contains; -use PharIo\Manifest\ApplicationName; -use PharIo\Manifest\Exception as ManifestException; -use PharIo\Manifest\ManifestLoader; -use PharIo\Version\Version as PharIoVersion; -use PHPUnit\Event; -use PHPUnit\Runner\Version; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PharLoader -{ - /** - * @param non-empty-string $directory - * - * @return list - */ - public function loadPharExtensionsInDirectory(string $directory): array - { - $pharExtensionLoaded = extension_loaded('phar'); - $loadedExtensions = []; - - foreach ((new FileIteratorFacade)->getFilesAsArray($directory, '.phar') as $file) { - if (!$pharExtensionLoaded) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot load extension from %s because the PHAR extension is not available', - $file, - ), - ); - - continue; - } - - if (!is_file('phar://' . $file . '/manifest.xml')) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s is not an extension for PHPUnit', - $file, - ), - ); - - continue; - } - - try { - $applicationName = new ApplicationName('phpunit/phpunit'); - $version = new PharIoVersion($this->phpunitVersion()); - $manifest = ManifestLoader::fromFile('phar://' . $file . '/manifest.xml'); - - if (!$manifest->isExtensionFor($applicationName)) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s is not an extension for PHPUnit', - $file, - ), - ); - - continue; - } - - if (!$manifest->isExtensionFor($applicationName, $version)) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s is not compatible with PHPUnit %s', - $file, - Version::series(), - ), - ); - - continue; - } - } catch (ManifestException $e) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot load extension from %s: %s', - $file, - $e->getMessage(), - ), - ); - - continue; - } - - try { - @require $file; - } catch (Throwable $t) { - Event\Facade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot load extension from %s: %s', - $file, - $t->getMessage(), - ), - ); - - continue; - } - - $loadedExtensions[] = $manifest->getName()->asString() . ' ' . $manifest->getVersion()->getVersionString(); - - Event\Facade::emitter()->testRunnerLoadedExtensionFromPhar( - $file, - $manifest->getName()->asString(), - $manifest->getVersion()->getVersionString(), - ); - } - - return $loadedExtensions; - } - - private function phpunitVersion(): string - { - $version = Version::id(); - - if (!str_contains($version, '-')) { - return $version; - } - - $parts = explode('.', explode('-', $version)[0]); - - if (count($parts) === 2) { - $parts[] = 0; - } - - return implode('.', $parts); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php deleted file mode 100644 index 45296b2d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function in_array; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeGroupFilterIterator extends GroupFilterIterator -{ - /** - * @param non-empty-string $id - * @param list $groupTests - */ - protected function doAccept(string $id, array $groupTests): bool - { - return !in_array($id, $groupTests, true); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php deleted file mode 100644 index ff845931..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeNameFilterIterator extends NameFilterIterator -{ - protected function doAccept(bool $result): bool - { - return !$result; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php deleted file mode 100644 index 0335e25b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function assert; -use FilterIterator; -use Iterator; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestSuite; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Factory -{ - /** - * @var list>>, argument: list|non-empty-string}> - */ - private array $filters = []; - - /** - * @param list $testIds - */ - public function addTestIdFilter(array $testIds): void - { - $this->filters[] = [ - 'className' => TestIdFilterIterator::class, - 'argument' => $testIds, - ]; - } - - /** - * @param list $groups - */ - public function addIncludeGroupFilter(array $groups): void - { - $this->filters[] = [ - 'className' => IncludeGroupFilterIterator::class, - 'argument' => $groups, - ]; - } - - /** - * @param list $groups - */ - public function addExcludeGroupFilter(array $groups): void - { - $this->filters[] = [ - 'className' => ExcludeGroupFilterIterator::class, - 'argument' => $groups, - ]; - } - - /** - * @param non-empty-string $name - */ - public function addIncludeNameFilter(string $name): void - { - $this->filters[] = [ - 'className' => IncludeNameFilterIterator::class, - 'argument' => $name, - ]; - } - - /** - * @param non-empty-string $name - */ - public function addExcludeNameFilter(string $name): void - { - $this->filters[] = [ - 'className' => ExcludeNameFilterIterator::class, - 'argument' => $name, - ]; - } - - /** - * @param Iterator $iterator - * - * @return FilterIterator> - */ - public function factory(Iterator $iterator, TestSuite $suite): FilterIterator - { - foreach ($this->filters as $filter) { - $iterator = new $filter['className']( - $iterator, - $filter['argument'], - $suite, - ); - } - - assert($iterator instanceof FilterIterator); - - return $iterator; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php deleted file mode 100644 index da45211d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function array_merge; -use function array_push; -use function in_array; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use RecursiveFilterIterator; -use RecursiveIterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class GroupFilterIterator extends RecursiveFilterIterator -{ - /** - * @var list - */ - private readonly array $groupTests; - - /** - * @param RecursiveIterator $iterator - * @param list $groups - */ - public function __construct(RecursiveIterator $iterator, array $groups, TestSuite $suite) - { - parent::__construct($iterator); - - $groupTests = []; - - foreach ($suite->groups() as $group => $tests) { - if (in_array($group, $groups, true)) { - $groupTests = array_merge($groupTests, $tests); - - array_push($groupTests, ...$groupTests); - } - } - - $this->groupTests = $groupTests; - } - - public function accept(): bool - { - $test = $this->getInnerIterator()->current(); - - if ($test instanceof TestSuite) { - return true; - } - - if ($test instanceof TestCase || $test instanceof PhptTestCase) { - return $this->doAccept($test->valueObjectForEvents()->id(), $this->groupTests); - } - - return true; - } - - /** - * @param non-empty-string $id - * @param list $groupTests - */ - abstract protected function doAccept(string $id, array $groupTests): bool; -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php deleted file mode 100644 index afdaefda..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function in_array; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncludeGroupFilterIterator extends GroupFilterIterator -{ - /** - * @param non-empty-string $id - * @param list $groupTests - */ - protected function doAccept(string $id, array $groupTests): bool - { - return in_array($id, $groupTests, true); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php deleted file mode 100644 index 9bca65eb..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class IncludeNameFilterIterator extends NameFilterIterator -{ - protected function doAccept(bool $result): bool - { - return $result; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php deleted file mode 100644 index a2fc69b3..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function end; -use function preg_match; -use function sprintf; -use function substr; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use RecursiveFilterIterator; -use RecursiveIterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract class NameFilterIterator extends RecursiveFilterIterator -{ - /** - * @var non-empty-string - */ - private readonly string $regularExpression; - private readonly ?int $dataSetMinimum; - private readonly ?int $dataSetMaximum; - - /** - * @param RecursiveIterator $iterator - * @param non-empty-string $filter - */ - public function __construct(RecursiveIterator $iterator, string $filter) - { - parent::__construct($iterator); - - $preparedFilter = $this->prepareFilter($filter); - - $this->regularExpression = $preparedFilter['regularExpression']; - $this->dataSetMinimum = $preparedFilter['dataSetMinimum']; - $this->dataSetMaximum = $preparedFilter['dataSetMaximum']; - } - - public function accept(): bool - { - $test = $this->getInnerIterator()->current(); - - if ($test instanceof TestSuite) { - return true; - } - - if ($test instanceof PhptTestCase) { - return false; - } - - $name = $test::class . '::' . $test->nameWithDataSet(); - - $accepted = @preg_match($this->regularExpression, $name, $matches) === 1; - - if ($accepted && isset($this->dataSetMaximum)) { - $set = end($matches); - $accepted = $set >= $this->dataSetMinimum && $set <= $this->dataSetMaximum; - } - - return $this->doAccept($accepted); - } - - abstract protected function doAccept(bool $result): bool; - - /** - * @param non-empty-string $filter - * - * @return array{regularExpression: non-empty-string, dataSetMinimum: ?int, dataSetMaximum: ?int} - */ - private function prepareFilter(string $filter): array - { - $dataSetMinimum = null; - $dataSetMaximum = null; - - if (preg_match('/[a-zA-Z0-9]/', substr($filter, 0, 1)) === 1 || @preg_match($filter, '') === false) { - // Handles: - // * testAssertEqualsSucceeds#4 - // * testAssertEqualsSucceeds#4-8 - if (preg_match('/^(.*?)#(\d+)(?:-(\d+))?$/', $filter, $matches)) { - if (isset($matches[3]) && $matches[2] < $matches[3]) { - $filter = sprintf( - '%s.*with data set #(\d+)$', - $matches[1], - ); - - $dataSetMinimum = (int) $matches[2]; - $dataSetMaximum = (int) $matches[3]; - } else { - $filter = sprintf( - '%s.*with data set #%s$', - $matches[1], - $matches[2], - ); - } - } // Handles: - // * testDetermineJsonError@JSON_ERROR_NONE - // * testDetermineJsonError@JSON.* - elseif (preg_match('/^(.*?)@(.+)$/', $filter, $matches)) { - $filter = sprintf( - '%s.*with data set "%s"$', - $matches[1], - $matches[2], - ); - } - - // Do NOT use preg_quote, to keep magic characters. - $filter = sprintf( - '{%s}i', - $filter, - ); - } - - return [ - 'regularExpression' => $filter, - 'dataSetMinimum' => $dataSetMinimum, - 'dataSetMaximum' => $dataSetMaximum, - ]; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php deleted file mode 100644 index 1180de4e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Filter; - -use function in_array; -use PHPUnit\Event\TestData\NoDataSetFromDataProviderException; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use RecursiveFilterIterator; -use RecursiveIterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestIdFilterIterator extends RecursiveFilterIterator -{ - /** - * @var non-empty-list - */ - private readonly array $testIds; - - /** - * @param RecursiveIterator $iterator - * @param non-empty-list $testIds - */ - public function __construct(RecursiveIterator $iterator, array $testIds) - { - parent::__construct($iterator); - - $this->testIds = $testIds; - } - - public function accept(): bool - { - $test = $this->getInnerIterator()->current(); - - if ($test instanceof TestSuite) { - return true; - } - - if (!$test instanceof TestCase && !$test instanceof PhptTestCase) { - return false; - } - - try { - return in_array($test->valueObjectForEvents()->id(), $this->testIds, true); - } catch (NoDataSetFromDataProviderException) { - return false; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/GarbageCollectionHandler.php b/vendor/phpunit/phpunit/src/Runner/GarbageCollection/GarbageCollectionHandler.php deleted file mode 100644 index c6cd2dd3..00000000 --- a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/GarbageCollectionHandler.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\GarbageCollection; - -use function gc_collect_cycles; -use function gc_disable; -use function gc_enable; -use PHPUnit\Event\Facade; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class GarbageCollectionHandler -{ - private readonly Facade $facade; - private readonly int $threshold; - private int $tests = 0; - - public function __construct(Facade $facade, int $threshold) - { - $this->facade = $facade; - $this->threshold = $threshold; - - $this->registerSubscribers(); - } - - public function executionStarted(): void - { - gc_disable(); - - $this->facade->emitter()->testRunnerDisabledGarbageCollection(); - - gc_collect_cycles(); - - $this->facade->emitter()->testRunnerTriggeredGarbageCollection(); - } - - public function executionFinished(): void - { - gc_collect_cycles(); - - $this->facade->emitter()->testRunnerTriggeredGarbageCollection(); - - gc_enable(); - - $this->facade->emitter()->testRunnerEnabledGarbageCollection(); - } - - public function testFinished(): void - { - $this->tests++; - - if ($this->tests === $this->threshold) { - gc_collect_cycles(); - - $this->facade->emitter()->testRunnerTriggeredGarbageCollection(); - - $this->tests = 0; - } - } - - private function registerSubscribers(): void - { - $this->facade->registerSubscribers( - new ExecutionStartedSubscriber($this), - new ExecutionFinishedSubscriber($this), - new TestFinishedSubscriber($this), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php deleted file mode 100644 index 4ff8e113..00000000 --- a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\GarbageCollection; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestRunner\ExecutionFinished; -use PHPUnit\Event\TestRunner\ExecutionFinishedSubscriber as TestRunnerExecutionFinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionFinishedSubscriber extends Subscriber implements TestRunnerExecutionFinishedSubscriber -{ - /** - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function notify(ExecutionFinished $event): void - { - $this->handler()->executionFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionStartedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionStartedSubscriber.php deleted file mode 100644 index 1b99b8b7..00000000 --- a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionStartedSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\GarbageCollection; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\TestRunner\ExecutionStarted; -use PHPUnit\Event\TestRunner\ExecutionStartedSubscriber as TestRunnerExecutionStartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionStartedSubscriber extends Subscriber implements TestRunnerExecutionStartedSubscriber -{ - /** - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function notify(ExecutionStarted $event): void - { - $this->handler()->executionStarted(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/Subscriber.php deleted file mode 100644 index 3c9abce8..00000000 --- a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\GarbageCollection; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private GarbageCollectionHandler $handler; - - public function __construct(GarbageCollectionHandler $handler) - { - $this->handler = $handler; - } - - protected function handler(): GarbageCollectionHandler - { - return $this->handler; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 4ffae389..00000000 --- a/vendor/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\GarbageCollection; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->handler()->testFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethod.php b/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethod.php deleted file mode 100644 index 2442f75e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethod.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class HookMethod -{ - /** - * @var non-empty-string - */ - private string $methodName; - private int $priority; - - /** - * @param non-empty-string $methodName - */ - public function __construct(string $methodName, int $priority) - { - $this->methodName = $methodName; - $this->priority = $priority; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - public function priority(): int - { - return $this->priority; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethodCollection.php b/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethodCollection.php deleted file mode 100644 index a3593fd5..00000000 --- a/vendor/phpunit/phpunit/src/Runner/HookMethod/HookMethodCollection.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function array_map; -use function usort; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class HookMethodCollection -{ - private readonly bool $shouldPrepend; - - /** - * @var non-empty-list - */ - private array $hookMethods; - - public static function defaultBeforeClass(): self - { - return new self(new HookMethod('setUpBeforeClass', 0), true); - } - - public static function defaultBefore(): self - { - return new self(new HookMethod('setUp', 0), true); - } - - public static function defaultPreCondition(): self - { - return new self(new HookMethod('assertPreConditions', 0), true); - } - - public static function defaultPostCondition(): self - { - return new self(new HookMethod('assertPostConditions', 0), false); - } - - public static function defaultAfter(): self - { - return new self(new HookMethod('tearDown', 0), false); - } - - public static function defaultAfterClass(): self - { - return new self(new HookMethod('tearDownAfterClass', 0), false); - } - - private function __construct(HookMethod $default, bool $shouldPrepend) - { - $this->hookMethods = [$default]; - $this->shouldPrepend = $shouldPrepend; - } - - public function add(HookMethod $hookMethod): self - { - if ($this->shouldPrepend) { - $this->hookMethods = [$hookMethod, ...$this->hookMethods]; - } else { - $this->hookMethods[] = $hookMethod; - } - - return $this; - } - - /** - * @return list - */ - public function methodNamesSortedByPriority(): array - { - $hookMethods = $this->hookMethods; - - usort($hookMethods, static fn (HookMethod $a, HookMethod $b) => $b->priority() <=> $a->priority()); - - return array_map( - static fn (HookMethod $hookMethod) => $hookMethod->methodName(), - $hookMethods, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/IssueFilter.php b/vendor/phpunit/phpunit/src/Runner/IssueFilter.php deleted file mode 100644 index 445c15b7..00000000 --- a/vendor/phpunit/phpunit/src/Runner/IssueFilter.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\SourceFilter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IssueFilter -{ - private Source $source; - - public function __construct(Source $source) - { - $this->source = $source; - } - - public function shouldBeProcessed(DeprecationTriggered|ErrorTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event, bool $onlyTestMethods = false): bool - { - if ($onlyTestMethods && !$event->test()->isTestMethod()) { - return false; - } - - if ($event instanceof DeprecationTriggered || $event instanceof PhpDeprecationTriggered) { - if ($event->ignoredByTest()) { - return false; - } - - if ($this->source->ignoreSelfDeprecations() && - ($event->trigger()->isTest() || $event->trigger()->isSelf())) { - return false; - } - - if ($this->source->ignoreDirectDeprecations() && $event->trigger()->isDirect()) { - return false; - } - - if ($this->source->ignoreIndirectDeprecations() && $event->trigger()->isIndirect()) { - return false; - } - - if (!$this->source->ignoreSuppressionOfDeprecations() && $event->wasSuppressed()) { - return false; - } - } - - if ($event instanceof NoticeTriggered) { - if (!$this->source->ignoreSuppressionOfNotices() && $event->wasSuppressed()) { - return false; - } - - if ($this->source->restrictNotices() && !SourceFilter::instance()->includes($event->file())) { - return false; - } - } - - if ($event instanceof PhpNoticeTriggered) { - if (!$this->source->ignoreSuppressionOfPhpNotices() && $event->wasSuppressed()) { - return false; - } - - if ($this->source->restrictNotices() && !SourceFilter::instance()->includes($event->file())) { - return false; - } - } - - if ($event instanceof WarningTriggered) { - if (!$this->source->ignoreSuppressionOfWarnings() && $event->wasSuppressed()) { - return false; - } - - if ($this->source->restrictWarnings() && !SourceFilter::instance()->includes($event->file())) { - return false; - } - } - - if ($event instanceof PhpWarningTriggered) { - if (!$this->source->ignoreSuppressionOfPhpWarnings() && $event->wasSuppressed()) { - return false; - } - - if ($this->source->restrictWarnings() && !SourceFilter::instance()->includes($event->file())) { - return false; - } - } - - if ($event instanceof ErrorTriggered) { - if (!$this->source->ignoreSuppressionOfErrors() && $event->wasSuppressed()) { - return false; - } - } - - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/InvalidPhptFileException.php b/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/InvalidPhptFileException.php deleted file mode 100644 index 07a2953e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/InvalidPhptFileException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use PHPUnit\Runner\Exception as RunnerException; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidPhptFileException extends RuntimeException implements RunnerException -{ -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/PhptExternalFileCannotBeLoadedException.php b/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/PhptExternalFileCannotBeLoadedException.php deleted file mode 100644 index bdee6262..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/PhptExternalFileCannotBeLoadedException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use function sprintf; -use PHPUnit\Runner\Exception as RunnerException; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhptExternalFileCannotBeLoadedException extends RuntimeException implements RunnerException -{ - public function __construct(string $section, string $file) - { - parent::__construct( - sprintf( - 'Could not load --%s-- %s for PHPT file', - $section . '_EXTERNAL', - $file, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/UnsupportedPhptSectionException.php b/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/UnsupportedPhptSectionException.php deleted file mode 100644 index 9079f996..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/Exception/UnsupportedPhptSectionException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use function sprintf; -use PHPUnit\Runner\Exception as RunnerException; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class UnsupportedPhptSectionException extends RuntimeException implements RunnerException -{ - public function __construct(string $section) - { - parent::__construct( - sprintf( - 'PHPUnit does not support PHPT --%s-- sections', - $section, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/Parser.php b/vendor/phpunit/phpunit/src/Runner/Phpt/Parser.php deleted file mode 100644 index 72582d73..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/Parser.php +++ /dev/null @@ -1,213 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use const DIRECTORY_SEPARATOR; -use function assert; -use function dirname; -use function explode; -use function file; -use function file_get_contents; -use function is_file; -use function is_readable; -use function is_string; -use function preg_match; -use function rtrim; -use function str_contains; -use function trim; -use PHPUnit\Runner\Exception; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://qa.php.net/phpt_details.php - */ -final readonly class Parser -{ - /** - * @param non-empty-string $phptFile - * - * @throws Exception - * - * @return array - */ - public function parse(string $phptFile): array - { - $sections = []; - $section = ''; - - $unsupportedSections = [ - 'CGI', - 'COOKIE', - 'DEFLATE_POST', - 'EXPECTHEADERS', - 'EXTENSIONS', - 'GET', - 'GZIP_POST', - 'HEADERS', - 'PHPDBG', - 'POST', - 'POST_RAW', - 'PUT', - 'REDIRECTTEST', - 'REQUEST', - ]; - - $lineNr = 0; - - foreach (file($phptFile) as $line) { - $lineNr++; - - if (preg_match('/^--([_A-Z]+)--/', $line, $result)) { - $section = $result[1]; - $sections[$section] = ''; - $sections[$section . '_offset'] = $lineNr; - - continue; - } - - if ($section === '') { - throw new InvalidPhptFileException; - } - - $sections[$section] .= $line; - } - - if (isset($sections['FILEEOF'])) { - $sections['FILE'] = rtrim($sections['FILEEOF'], "\r\n"); - - unset($sections['FILEEOF']); - } - - $this->parseExternal($phptFile, $sections); - $this->validate($sections); - - foreach ($unsupportedSections as $unsupportedSection) { - if (isset($sections[$unsupportedSection])) { - throw new UnsupportedPhptSectionException($unsupportedSection); - } - } - - return $sections; - } - - /** - * @return array - */ - public function parseEnvSection(string $content): array - { - $env = []; - - foreach (explode("\n", trim($content)) as $e) { - $e = explode('=', trim($e), 2); - - if ($e[0] !== '' && isset($e[1])) { - $env[$e[0]] = $e[1]; - } - } - - return $env; - } - - /** - * @param array|string $content - * @param array|non-empty-string> $ini - * - * @return array|non-empty-string> - */ - public function parseIniSection(array|string $content, array $ini = []): array - { - if (is_string($content)) { - $content = explode("\n", trim($content)); - } - - foreach ($content as $setting) { - if (!str_contains($setting, '=')) { - continue; - } - - $setting = explode('=', $setting, 2); - $name = trim($setting[0]); - $value = trim($setting[1]); - - if ($name === 'extension' || $name === 'zend_extension') { - if (!isset($ini[$name])) { - $ini[$name] = []; - } - - $ini[$name][] = $value; - - continue; - } - - $ini[$name] = $value; - } - - return $ini; - } - - /** - * @param non-empty-string $phptFile - * @param array $sections - * - * @throws Exception - */ - private function parseExternal(string $phptFile, array &$sections): void - { - $allowSections = [ - 'FILE', - 'EXPECT', - 'EXPECTF', - 'EXPECTREGEX', - ]; - - $testDirectory = dirname($phptFile) . DIRECTORY_SEPARATOR; - - foreach ($allowSections as $section) { - if (isset($sections[$section . '_EXTERNAL'])) { - $externalFilename = trim($sections[$section . '_EXTERNAL']); - - if (!is_file($testDirectory . $externalFilename) || - !is_readable($testDirectory . $externalFilename)) { - throw new PhptExternalFileCannotBeLoadedException( - $section, - $testDirectory . $externalFilename, - ); - } - - $contents = file_get_contents($testDirectory . $externalFilename); - - assert($contents !== false && $contents !== ''); - - $sections[$section] = $contents; - } - } - } - - /** - * @param array $sections - * - * @throws InvalidPhptFileException - */ - private function validate(array $sections): void - { - if (!isset($sections['FILE'])) { - throw new InvalidPhptFileException; - } - - if (!isset($sections['EXPECT']) && - !isset($sections['EXPECTF']) && - !isset($sections['EXPECTREGEX'])) { - throw new InvalidPhptFileException; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/Renderer.php b/vendor/phpunit/phpunit/src/Runner/Phpt/Renderer.php deleted file mode 100644 index 0fe1de92..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/Renderer.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use function assert; -use function defined; -use function dirname; -use function file_put_contents; -use function str_replace; -use function var_export; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use SebastianBergmann\Template\InvalidArgumentException; -use SebastianBergmann\Template\Template; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://qa.php.net/phpt_details.php - */ -final readonly class Renderer -{ - /** - * @param non-empty-string $phptFile - * @param non-empty-string $code - * - * @return non-empty-string - */ - public function render(string $phptFile, string $code): string - { - return str_replace( - [ - '__DIR__', - '__FILE__', - ], - [ - "'" . dirname($phptFile) . "'", - "'" . $phptFile . "'", - ], - $code, - ); - } - - /** - * @param non-empty-string $job - * @param array{coverage: non-empty-string, job: non-empty-string} $files - * - * @param-out non-empty-string $job - * - * @throws InvalidArgumentException - */ - public function renderForCoverage(string &$job, bool $pathCoverage, ?string $codeCoverageCacheDirectory, array $files): void - { - $template = new Template( - __DIR__ . '/templates/phpt.tpl', - ); - - $composerAutoload = '\'\''; - - if (defined('PHPUNIT_COMPOSER_INSTALL')) { - $composerAutoload = var_export(PHPUNIT_COMPOSER_INSTALL, true); - } - - $phar = '\'\''; - - if (defined('__PHPUNIT_PHAR__')) { - $phar = var_export(__PHPUNIT_PHAR__, true); - } - - if ($codeCoverageCacheDirectory === null) { - $codeCoverageCacheDirectory = 'null'; - } else { - $codeCoverageCacheDirectory = "'" . $codeCoverageCacheDirectory . "'"; - } - - $bootstrap = ''; - - if (ConfigurationRegistry::get()->hasBootstrap()) { - $bootstrap = ConfigurationRegistry::get()->bootstrap(); - } - - $template->setVar( - [ - 'bootstrap' => $bootstrap, - 'composerAutoload' => $composerAutoload, - 'phar' => $phar, - 'job' => $files['job'], - 'coverageFile' => $files['coverage'], - 'driverMethod' => $pathCoverage ? 'forLineAndPathCoverage' : 'forLineCoverage', - 'codeCoverageCacheDirectory' => $codeCoverageCacheDirectory, - ], - ); - - file_put_contents($files['job'], $job); - - $rendered = $template->render(); - - assert($rendered !== ''); - - $job = $rendered; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/TestCase.php b/vendor/phpunit/phpunit/src/Runner/Phpt/TestCase.php deleted file mode 100644 index ab75397b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/TestCase.php +++ /dev/null @@ -1,709 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\Phpt; - -use const DEBUG_BACKTRACE_IGNORE_ARGS; -use const DIRECTORY_SEPARATOR; -use function array_merge; -use function basename; -use function debug_backtrace; -use function dirname; -use function explode; -use function extension_loaded; -use function file_get_contents; -use function is_array; -use function is_file; -use function ltrim; -use function ob_get_clean; -use function ob_start; -use function preg_match; -use function preg_replace; -use function preg_split; -use function realpath; -use function sprintf; -use function str_contains; -use function str_starts_with; -use function strncasecmp; -use function substr; -use function trim; -use function unlink; -use function unserialize; -use PHPUnit\Event\Code\Phpt; -use PHPUnit\Event\Code\ThrowableBuilder; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Event\NoPreviousThrowableException; -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\ExecutionOrderDependency; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\IncompleteTestError; -use PHPUnit\Framework\PhptAssertionFailedError; -use PHPUnit\Framework\Reorderable; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Framework\Test; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\Runner\Exception; -use PHPUnit\Util\PHP\Job; -use PHPUnit\Util\PHP\JobRunnerRegistry; -use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; -use SebastianBergmann\CodeCoverage\InvalidArgumentException; -use SebastianBergmann\CodeCoverage\ReflectionException; -use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize; -use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus; -use SebastianBergmann\CodeCoverage\TestIdMissingException; -use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; -use staabm\SideEffectsDetector\SideEffect; -use staabm\SideEffectsDetector\SideEffectsDetector; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://qa.php.net/phpt_details.php - */ -final readonly class TestCase implements Reorderable, SelfDescribing, Test -{ - /** - * @var non-empty-string - */ - private string $filename; - - /** - * @param non-empty-string $filename - */ - public function __construct(string $filename) - { - $this->filename = $filename; - } - - public function count(): int - { - return 1; - } - - /** - * @throws \PHPUnit\Framework\Exception - * @throws \SebastianBergmann\Template\InvalidArgumentException - * @throws Exception - * @throws InvalidArgumentException - * @throws NoPreviousThrowableException - * @throws ReflectionException - * @throws TestIdMissingException - * @throws UnintentionallyCoveredCodeException - */ - public function run(): void - { - $emitter = EventFacade::emitter(); - $parser = new Parser; - - $emitter->testPreparationStarted( - $this->valueObjectForEvents(), - ); - - try { - $sections = $parser->parse($this->filename); - } catch (Exception $e) { - $emitter->testPrepared($this->valueObjectForEvents()); - $emitter->testErrored($this->valueObjectForEvents(), ThrowableBuilder::from($e)); - $emitter->testFinished($this->valueObjectForEvents(), 0); - - return; - } - - $code = (new Renderer)->render($this->filename, $sections['FILE']); - $xfail = false; - $environmentVariables = []; - $phpSettings = $parser->parseIniSection($this->settings(CodeCoverage::instance()->isActive())); - $input = null; - $arguments = []; - - $emitter->testPrepared($this->valueObjectForEvents()); - - if (isset($sections['INI'])) { - $phpSettings = $parser->parseIniSection($sections['INI'], $phpSettings); - } - - if (isset($sections['ENV'])) { - $environmentVariables = $parser->parseEnvSection($sections['ENV']); - } - - if ($this->shouldTestBeSkipped($sections, $phpSettings)) { - return; - } - - if (isset($sections['XFAIL'])) { - $xfail = trim($sections['XFAIL']); - } - - if (isset($sections['STDIN'])) { - $input = $sections['STDIN']; - } - - if (isset($sections['ARGS'])) { - $arguments = explode(' ', $sections['ARGS']); - } - - if (CodeCoverage::instance()->isActive()) { - $codeCoverageCacheDirectory = null; - - if (CodeCoverage::instance()->codeCoverage()->cachesStaticAnalysis()) { - $codeCoverageCacheDirectory = CodeCoverage::instance()->codeCoverage()->cacheDirectory(); - } - - (new Renderer)->renderForCoverage( - $code, - CodeCoverage::instance()->codeCoverage()->collectsBranchAndPathCoverage(), - $codeCoverageCacheDirectory, - $this->coverageFiles(), - ); - } - - $jobResult = JobRunnerRegistry::run( - new Job( - $code, - $this->stringifyIni($phpSettings), - $environmentVariables, - $arguments, - $input, - true, - ), - ); - - EventFacade::emitter()->childProcessFinished($jobResult->stdout(), $jobResult->stderr()); - - $output = $jobResult->stdout(); - - if (CodeCoverage::instance()->isActive()) { - $coverage = $this->cleanupForCoverage(); - - CodeCoverage::instance()->codeCoverage()->start($this->filename, TestSize::large()); - - CodeCoverage::instance()->codeCoverage()->append( - $coverage, - $this->filename, - true, - TestStatus::unknown(), - ); - } - - $passed = true; - - try { - $this->assertPhptExpectation($sections, $output); - } catch (AssertionFailedError $e) { - $failure = $e; - - if ($xfail !== false) { - $failure = new IncompleteTestError($xfail, 0, $e); - } elseif ($e instanceof ExpectationFailedException) { - $comparisonFailure = $e->getComparisonFailure(); - - if ($comparisonFailure !== null) { - $diff = $comparisonFailure->getDiff(); - } else { - $diff = $e->getMessage(); - } - - $hint = $this->locationHintFromDiff($diff, $sections); - $trace = array_merge($hint, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); - $failure = new PhptAssertionFailedError( - $e->getMessage(), - 0, - (string) $trace[0]['file'], - (int) $trace[0]['line'], - $trace, - $comparisonFailure !== null ? $diff : '', - ); - } - - if ($failure instanceof IncompleteTestError) { - $emitter->testMarkedAsIncomplete($this->valueObjectForEvents(), ThrowableBuilder::from($failure)); - } else { - $emitter->testFailed($this->valueObjectForEvents(), ThrowableBuilder::from($failure), null); - } - - $passed = false; - } catch (Throwable $t) { - $emitter->testErrored($this->valueObjectForEvents(), ThrowableBuilder::from($t)); - - $passed = false; - } - - if ($passed) { - $emitter->testPassed($this->valueObjectForEvents()); - } - - $this->runClean($sections, CodeCoverage::instance()->isActive()); - - $emitter->testFinished($this->valueObjectForEvents(), 1); - } - - /** - * Returns the name of the test case. - */ - public function getName(): string - { - return $this->toString(); - } - - /** - * Returns a string representation of the test case. - */ - public function toString(): string - { - return $this->filename; - } - - public function sortId(): string - { - return $this->filename; - } - - /** - * @return list - */ - public function provides(): array - { - return []; - } - - /** - * @return list - */ - public function requires(): array - { - return []; - } - - /** - * @internal This method is not covered by the backward compatibility promise for PHPUnit - */ - public function valueObjectForEvents(): Phpt - { - return new Phpt($this->filename); - } - - /** - * @param array $sections - * - * @throws Exception - * @throws ExpectationFailedException - */ - private function assertPhptExpectation(array $sections, string $output): void - { - $assertions = [ - 'EXPECT' => 'assertEquals', - 'EXPECTF' => 'assertStringMatchesFormat', - 'EXPECTREGEX' => 'assertMatchesRegularExpression', - ]; - - $actual = preg_replace('/\r\n/', "\n", trim($output)); - - foreach ($assertions as $sectionName => $sectionAssertion) { - if (isset($sections[$sectionName])) { - $sectionContent = preg_replace('/\r\n/', "\n", trim($sections[$sectionName])); - $expected = $sectionName === 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent; - - /** @phpstan-ignore staticMethod.dynamicName */ - Assert::$sectionAssertion($expected, $actual); - - return; - } - } - - throw new InvalidPhptFileException; - } - - /** - * @param array $sections - * @param array|non-empty-string> $settings - */ - private function shouldTestBeSkipped(array $sections, array $settings): bool - { - if (!isset($sections['SKIPIF'])) { - return false; - } - - $skipIfCode = (new Renderer)->render($this->filename, $sections['SKIPIF']); - - if ($this->shouldRunInSubprocess($sections, $skipIfCode)) { - $jobResult = JobRunnerRegistry::run( - new Job( - $skipIfCode, - $this->stringifyIni($settings), - ), - ); - - $output = $jobResult->stdout(); - - EventFacade::emitter()->childProcessFinished($output, $jobResult->stderr()); - } else { - $output = $this->runCodeInLocalSandbox($skipIfCode); - } - - $this->triggerRunnerWarningOnPhpErrors('SKIPIF', $output); - - if (strncasecmp('skip', ltrim($output), 4) === 0) { - $message = ''; - - if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $skipMatch)) { - $message = substr($skipMatch[1], 2); - } - - EventFacade::emitter()->testSkipped( - $this->valueObjectForEvents(), - $message, - ); - - EventFacade::emitter()->testFinished($this->valueObjectForEvents(), 0); - - return true; - } - - return false; - } - - /** - * @param array $sections - */ - private function shouldRunInSubprocess(array $sections, string $cleanCode): bool - { - if (isset($sections['INI'])) { - // to get per-test INI settings, we need a dedicated subprocess - return true; - } - - $detector = new SideEffectsDetector; - $sideEffects = $detector->getSideEffects($cleanCode); - - if ($sideEffects === []) { - // no side-effects - return false; - } - - foreach ($sideEffects as $sideEffect) { - if ($sideEffect === SideEffect::STANDARD_OUTPUT) { - // stdout is fine, we will catch it using output-buffering - continue; - } - - if ($sideEffect === SideEffect::INPUT_OUTPUT) { - // IO is fine, as it doesn't pollute the main process - continue; - } - - return true; - } - - return false; - } - - private function runCodeInLocalSandbox(string $code): string - { - $code = preg_replace('/^<\?(?:php)?|\?>\s*+$/', '', $code); - $code = preg_replace('/declare\S?\([^)]+\)\S?;/', '', $code); - - // wrap in immediately invoked function to isolate local-side-effects of $code from our own process - $code = '(function() {' . $code . '})();'; - ob_start(); - @eval($code); - - return ob_get_clean(); - } - - /** - * @param array $sections - */ - private function runClean(array $sections, bool $collectCoverage): void - { - if (!isset($sections['CLEAN'])) { - return; - } - - $cleanCode = (new Renderer)->render($this->filename, $sections['CLEAN']); - - if ($this->shouldRunInSubprocess($sections, $cleanCode)) { - $jobResult = JobRunnerRegistry::run( - new Job( - $cleanCode, - $this->settings($collectCoverage), - ), - ); - - $output = $jobResult->stdout(); - - EventFacade::emitter()->childProcessFinished($jobResult->stdout(), $jobResult->stderr()); - } else { - $output = $this->runCodeInLocalSandbox($cleanCode); - } - - $this->triggerRunnerWarningOnPhpErrors('CLEAN', $output); - } - - /** - * @phpstan-ignore return.internalClass - */ - private function cleanupForCoverage(): RawCodeCoverageData - { - /** - * @phpstan-ignore staticMethod.internalClass - */ - $coverage = RawCodeCoverageData::fromXdebugWithoutPathCoverage([]); - $files = $this->coverageFiles(); - - $buffer = false; - - if (is_file($files['coverage'])) { - $buffer = @file_get_contents($files['coverage']); - } - - if ($buffer !== false) { - $coverage = @unserialize($buffer); - - if ($coverage === false) { - /** - * @phpstan-ignore staticMethod.internalClass - */ - $coverage = RawCodeCoverageData::fromXdebugWithoutPathCoverage([]); - } - } - - foreach ($files as $file) { - @unlink($file); - } - - return $coverage; - } - - /** - * @return array{coverage: non-empty-string, job: non-empty-string} - */ - private function coverageFiles(): array - { - $baseDir = dirname(realpath($this->filename)) . DIRECTORY_SEPARATOR; - $basename = basename($this->filename, 'phpt'); - - return [ - 'coverage' => $baseDir . $basename . 'coverage', - 'job' => $baseDir . $basename . 'php', - ]; - } - - /** - * @param array|non-empty-string> $ini - * - * @return list - */ - private function stringifyIni(array $ini): array - { - $settings = []; - - foreach ($ini as $key => $value) { - if (is_array($value)) { - foreach ($value as $val) { - $settings[] = $key . '=' . $val; - } - - continue; - } - - $settings[] = $key . '=' . $value; - } - - return $settings; - } - - /** - * @param array $sections - * - * @return non-empty-list - */ - private function locationHintFromDiff(string $message, array $sections): array - { - $needle = ''; - $previousLine = ''; - $block = 'message'; - - foreach (preg_split('/\r\n|\r|\n/', $message) as $line) { - $line = trim($line); - - if ($block === 'message' && $line === '--- Expected') { - $block = 'expected'; - } - - if ($block === 'expected' && $line === '@@ @@') { - $block = 'diff'; - } - - if ($block === 'diff') { - if (str_starts_with($line, '+')) { - $needle = $this->cleanDiffLine($previousLine); - - break; - } - - if (str_starts_with($line, '-')) { - $needle = $this->cleanDiffLine($line); - - break; - } - } - - if ($line !== '') { - $previousLine = $line; - } - } - - return $this->locationHint($needle, $sections); - } - - private function cleanDiffLine(string $line): string - { - if (preg_match('/^[\-+]([\'\"]?)(.*)\1$/', $line, $matches)) { - $line = $matches[2]; - } - - return $line; - } - - /** - * @param array $sections - * - * @return non-empty-list - */ - private function locationHint(string $needle, array $sections): array - { - $needle = trim($needle); - - if ($needle === '') { - return [[ - 'file' => realpath($this->filename), - 'line' => 1, - ]]; - } - - $search = [ - // 'FILE', - 'EXPECT', - 'EXPECTF', - 'EXPECTREGEX', - ]; - - foreach ($search as $section) { - if (!isset($sections[$section])) { - continue; - } - - if (isset($sections[$section . '_EXTERNAL'])) { - $externalFile = trim($sections[$section . '_EXTERNAL']); - - return [ - [ - 'file' => realpath(dirname($this->filename) . DIRECTORY_SEPARATOR . $externalFile), - 'line' => 1, - ], - [ - 'file' => realpath($this->filename), - 'line' => ($sections[$section . '_EXTERNAL_offset'] ?? 0) + 1, - ], - ]; - } - - $sectionOffset = $sections[$section . '_offset'] ?? 0; - $offset = $sectionOffset + 1; - - foreach (preg_split('/\r\n|\r|\n/', $sections[$section]) as $line) { - if (str_contains($line, $needle)) { - return [ - [ - 'file' => realpath($this->filename), - 'line' => $offset, - ], - ]; - } - - $offset++; - } - } - - return [ - [ - 'file' => realpath($this->filename), - 'line' => 1, - ], - ]; - } - - /** - * @return list - */ - private function settings(bool $collectCoverage): array - { - $settings = [ - 'allow_url_fopen=1', - 'auto_append_file=', - 'auto_prepend_file=', - 'disable_functions=', - 'display_errors=1', - 'docref_ext=.html', - 'docref_root=', - 'error_append_string=', - 'error_prepend_string=', - 'error_reporting=-1', - 'html_errors=0', - 'log_errors=0', - 'open_basedir=', - 'output_buffering=Off', - 'output_handler=', - 'report_zend_debug=0', - ]; - - if (extension_loaded('pcov')) { - if ($collectCoverage) { - $settings[] = 'pcov.enabled=1'; - } else { - $settings[] = 'pcov.enabled=0'; - } - } - - if (extension_loaded('xdebug')) { - if ($collectCoverage) { - $settings[] = 'xdebug.mode=coverage'; - } - } - - return $settings; - } - - private function triggerRunnerWarningOnPhpErrors(string $section, string $output): void - { - if (str_contains($output, 'Parse error:')) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s section triggered a parse error: %s', - $section, - $output, - ), - ); - } - - if (str_contains($output, 'Fatal error:')) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s section triggered a fatal error: %s', - $section, - $output, - ), - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Phpt/templates/phpt.tpl b/vendor/phpunit/phpunit/src/Runner/Phpt/templates/phpt.tpl deleted file mode 100644 index c4251888..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Phpt/templates/phpt.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{driverMethod}($filter), - $filter - ); - - if ({codeCoverageCacheDirectory}) { - $coverage->cacheStaticAnalysis({codeCoverageCacheDirectory}); - } - - $coverage->start(__FILE__); -} - -register_shutdown_function( - function() use ($coverage) { - $output = null; - - if ($coverage) { - $output = $coverage->stop(); - } - - file_put_contents('{coverageFile}', serialize($output)); - } -); - -ob_end_clean(); - -require '{job}'; diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php deleted file mode 100644 index 0d700a9a..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use const DIRECTORY_SEPARATOR; -use const LOCK_EX; -use function array_keys; -use function assert; -use function dirname; -use function file_get_contents; -use function file_put_contents; -use function is_array; -use function is_dir; -use function is_file; -use function json_decode; -use function json_encode; -use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\Runner\DirectoryDoesNotExistException; -use PHPUnit\Runner\Exception; -use PHPUnit\Util\Filesystem; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DefaultResultCache implements ResultCache -{ - private const int VERSION = 2; - private const string DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache'; - private readonly string $cacheFilename; - - /** - * @var array - */ - private array $defects = []; - - /** - * @var array - */ - private array $times = []; - - public function __construct(?string $filepath = null) - { - if ($filepath !== null && is_dir($filepath)) { - $filepath .= DIRECTORY_SEPARATOR . self::DEFAULT_RESULT_CACHE_FILENAME; - } - - $this->cacheFilename = $filepath ?? $_ENV['PHPUNIT_RESULT_CACHE'] ?? self::DEFAULT_RESULT_CACHE_FILENAME; - } - - public function setStatus(ResultCacheId $id, TestStatus $status): void - { - if ($status->isSuccess()) { - return; - } - - $this->defects[$id->asString()] = $status; - } - - public function status(ResultCacheId $id): TestStatus - { - return $this->defects[$id->asString()] ?? TestStatus::unknown(); - } - - public function setTime(ResultCacheId $id, float $time): void - { - $this->times[$id->asString()] = $time; - } - - public function time(ResultCacheId $id): float - { - return $this->times[$id->asString()] ?? 0.0; - } - - public function mergeWith(self $other): void - { - foreach ($other->defects as $id => $defect) { - $this->defects[$id] = $defect; - } - - foreach ($other->times as $id => $time) { - $this->times[$id] = $time; - } - } - - public function load(): void - { - if (!is_file($this->cacheFilename)) { - return; - } - - $contents = file_get_contents($this->cacheFilename); - - if ($contents === false) { - return; - } - - $data = json_decode( - $contents, - true, - ); - - if ($data === null) { - return; - } - - if (!isset($data['version'])) { - return; - } - - if ($data['version'] !== self::VERSION) { - return; - } - - assert(isset($data['defects']) && is_array($data['defects'])); - assert(isset($data['times']) && is_array($data['times'])); - - foreach (array_keys($data['defects']) as $test) { - $data['defects'][$test] = TestStatus::from($data['defects'][$test]); - } - - $this->defects = $data['defects']; - $this->times = $data['times']; - } - - /** - * @throws Exception - */ - public function persist(): void - { - if (!Filesystem::createDirectory(dirname($this->cacheFilename))) { - throw new DirectoryDoesNotExistException(dirname($this->cacheFilename)); - } - - $data = [ - 'version' => self::VERSION, - 'defects' => [], - 'times' => $this->times, - ]; - - foreach ($this->defects as $test => $status) { - $data['defects'][$test] = $status->asInt(); - } - - file_put_contents( - $this->cacheFilename, - json_encode($data), - LOCK_EX, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/NullResultCache.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/NullResultCache.php deleted file mode 100644 index 46417d40..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/NullResultCache.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Framework\TestStatus\TestStatus; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class NullResultCache implements ResultCache -{ - public function setStatus(ResultCacheId $id, TestStatus $status): void - { - } - - public function status(ResultCacheId $id): TestStatus - { - return TestStatus::unknown(); - } - - public function setTime(ResultCacheId $id, float $time): void - { - } - - public function time(ResultCacheId $id): float - { - return 0; - } - - public function load(): void - { - } - - public function persist(): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCache.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCache.php deleted file mode 100644 index a3d62f50..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCache.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Framework\TestStatus\TestStatus; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface ResultCache -{ - public function setStatus(ResultCacheId $id, TestStatus $status): void; - - public function status(ResultCacheId $id): TestStatus; - - public function setTime(ResultCacheId $id, float $time): void; - - public function time(ResultCacheId $id): float; - - public function load(): void; - - public function persist(): void; -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php deleted file mode 100644 index b0b45c6d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheHandler.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use function round; -use PHPUnit\Event\Event; -use PHPUnit\Event\Facade; -use PHPUnit\Event\Telemetry\HRTime; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Framework\InvalidArgumentException; -use PHPUnit\Framework\TestStatus\TestStatus; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ResultCacheHandler -{ - private readonly ResultCache $cache; - private ?HRTime $time = null; - private int $testSuite = 0; - - public function __construct(ResultCache $cache, Facade $facade) - { - $this->cache = $cache; - - $this->registerSubscribers($facade); - } - - public function testSuiteStarted(): void - { - $this->testSuite++; - } - - public function testSuiteFinished(): void - { - $this->testSuite--; - - if ($this->testSuite === 0) { - $this->cache->persist(); - } - } - - public function testPrepared(Prepared $event): void - { - $this->time = $event->telemetryInfo()->time(); - } - - public function testMarkedIncomplete(MarkedIncomplete $event): void - { - $this->cache->setStatus( - ResultCacheId::fromTest($event->test()), - TestStatus::incomplete($event->throwable()->message()), - ); - } - - public function testConsideredRisky(ConsideredRisky $event): void - { - $this->cache->setStatus( - ResultCacheId::fromTest($event->test()), - TestStatus::risky($event->message()), - ); - } - - public function testErrored(Errored $event): void - { - $this->cache->setStatus( - ResultCacheId::fromTest($event->test()), - TestStatus::error($event->throwable()->message()), - ); - } - - public function testFailed(Failed $event): void - { - $this->cache->setStatus( - ResultCacheId::fromTest($event->test()), - TestStatus::failure($event->throwable()->message()), - ); - } - - /** - * @throws \PHPUnit\Event\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function testSkipped(Skipped $event): void - { - $this->cache->setStatus( - ResultCacheId::fromTest($event->test()), - TestStatus::skipped($event->message()), - ); - - $this->cache->setTime(ResultCacheId::fromTest($event->test()), $this->duration($event)); - } - - /** - * @throws \PHPUnit\Event\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function testFinished(Finished $event): void - { - $this->cache->setTime(ResultCacheId::fromTest($event->test()), $this->duration($event)); - - $this->time = null; - } - - /** - * @throws \PHPUnit\Event\InvalidArgumentException - * @throws InvalidArgumentException - */ - private function duration(Event $event): float - { - if ($this->time === null) { - return 0.0; - } - - return round($event->telemetryInfo()->time()->duration($this->time)->asFloat(), 3); - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new TestSuiteStartedSubscriber($this), - new TestSuiteFinishedSubscriber($this), - new TestPreparedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestConsideredRiskySubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestSkippedSubscriber($this), - new TestFinishedSubscriber($this), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheId.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheId.php deleted file mode 100644 index 35a84f28..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/ResultCacheId.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Framework\Reorderable; -use PHPUnit\Framework\TestCase; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ResultCacheId -{ - public static function fromTest(Test $test): self - { - if ($test instanceof TestMethod) { - return new self($test->className() . '::' . $test->name()); - } - - return new self($test->id()); - } - - public static function fromReorderable(Reorderable $reorderable): self - { - return new self($reorderable->sortId()); - } - - /** - * For use in PHPUnit tests only! - * - * @param class-string $class - */ - public static function fromTestClassAndMethodName(string $class, string $methodName): self - { - return new self($class . '::' . $methodName); - } - - private function __construct( - private string $id, - ) { - } - - public function asString(): string - { - return $this->id; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/Subscriber.php deleted file mode 100644 index d64dd9f4..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private ResultCacheHandler $handler; - - public function __construct(ResultCacheHandler $handler) - { - $this->handler = $handler; - } - - protected function handler(): ResultCacheHandler - { - return $this->handler; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestConsideredRiskySubscriber.php deleted file mode 100644 index b2d93401..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestConsideredRiskySubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\ConsideredRiskySubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestConsideredRiskySubscriber extends Subscriber implements ConsideredRiskySubscriber -{ - public function notify(ConsideredRisky $event): void - { - $this->handler()->testConsideredRisky($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index ff34e0d8..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - public function notify(Errored $event): void - { - $this->handler()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index 082fa51b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - public function notify(Failed $event): void - { - $this->handler()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 65f75fcb..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - /** - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function notify(Finished $event): void - { - $this->handler()->testFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index d9c65cf8..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - public function notify(MarkedIncomplete $event): void - { - $this->handler()->testMarkedIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index a92b8277..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->handler()->testPrepared($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index 0e493bdc..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\InvalidArgumentException; -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - /** - * @throws \PHPUnit\Framework\InvalidArgumentException - * @throws InvalidArgumentException - */ - public function notify(Skipped $event): void - { - $this->handler()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteFinishedSubscriber.php deleted file mode 100644 index 1ef0cc3f..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\TestSuite\Finished; -use PHPUnit\Event\TestSuite\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->handler()->testSuiteFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteStartedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteStartedSubscriber.php deleted file mode 100644 index cddedf51..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/Subscriber/TestSuiteStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner\ResultCache; - -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\Event\TestSuite\StartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteStartedSubscriber extends Subscriber implements StartedSubscriber -{ - public function notify(Started $event): void - { - $this->handler()->testSuiteStarted(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/ShutdownHandler.php b/vendor/phpunit/phpunit/src/Runner/ShutdownHandler.php deleted file mode 100644 index faecf088..00000000 --- a/vendor/phpunit/phpunit/src/Runner/ShutdownHandler.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use const PHP_EOL; -use function register_shutdown_function; -use function rtrim; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ShutdownHandler -{ - private static bool $registered = false; - private static string $message = ''; - - public static function setMessage(string $message): void - { - self::register(); - - self::$message = $message; - } - - public static function resetMessage(): void - { - self::$message = ''; - } - - private static function register(): void - { - if (self::$registered) { - return; - } - - self::$registered = true; - - register_shutdown_function( - static function (): void - { - $message = rtrim(self::$message); - - if ($message === '') { - return; - } - - print $message . PHP_EOL; - }, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php deleted file mode 100644 index 5615a0da..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php +++ /dev/null @@ -1,681 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use function array_values; -use function assert; -use function count; -use function implode; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\AfterLastTestMethodFailed; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailed; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitNoticeTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\Skipped as TestSkipped; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\TestRunner\ChildProcessErrored; -use PHPUnit\Event\TestRunner\DeprecationTriggered as TestRunnerDeprecationTriggered; -use PHPUnit\Event\TestRunner\ExecutionStarted; -use PHPUnit\Event\TestRunner\NoticeTriggered as TestRunnerNoticeTriggered; -use PHPUnit\Event\TestRunner\WarningTriggered as TestRunnerWarningTriggered; -use PHPUnit\Event\TestSuite\Finished as TestSuiteFinished; -use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped; -use PHPUnit\Event\TestSuite\Started as TestSuiteStarted; -use PHPUnit\Event\TestSuite\TestSuiteForTestClass; -use PHPUnit\Event\TestSuite\TestSuiteForTestMethodWithDataProvider; -use PHPUnit\TestRunner\IssueFilter; -use PHPUnit\TestRunner\TestResult\Issues\Issue; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Collector -{ - private readonly IssueFilter $issueFilter; - private int $numberOfTests = 0; - private int $numberOfTestsRun = 0; - private int $numberOfAssertions = 0; - private bool $prepared = false; - private bool $childProcessErrored = false; - - /** - * @var non-negative-int - */ - private int $numberOfIssuesIgnoredByBaseline = 0; - - /** - * @var list - */ - private array $testErroredEvents = []; - - /** - * @var list - */ - private array $testFailedEvents = []; - - /** - * @var list - */ - private array $testMarkedIncompleteEvents = []; - - /** - * @var list - */ - private array $testSuiteSkippedEvents = []; - - /** - * @var list - */ - private array $testSkippedEvents = []; - - /** - * @var array> - */ - private array $testConsideredRiskyEvents = []; - - /** - * @var array> - */ - private array $testTriggeredPhpunitDeprecationEvents = []; - - /** - * @var array> - */ - private array $testTriggeredPhpunitErrorEvents = []; - - /** - * @var array> - */ - private array $testTriggeredPhpunitNoticeEvents = []; - - /** - * @var array> - */ - private array $testTriggeredPhpunitWarningEvents = []; - - /** - * @var list - */ - private array $testRunnerTriggeredDeprecationEvents = []; - - /** - * @var list - */ - private array $testRunnerTriggeredNoticeEvents = []; - - /** - * @var list - */ - private array $testRunnerTriggeredWarningEvents = []; - - /** - * @var array - */ - private array $errors = []; - - /** - * @var array - */ - private array $deprecations = []; - - /** - * @var array - */ - private array $notices = []; - - /** - * @var array - */ - private array $warnings = []; - - /** - * @var array - */ - private array $phpDeprecations = []; - - /** - * @var array - */ - private array $phpNotices = []; - - /** - * @var array - */ - private array $phpWarnings = []; - - public function __construct(Facade $facade, IssueFilter $issueFilter) - { - $facade->registerSubscribers( - new ExecutionStartedSubscriber($this), - new TestSuiteSkippedSubscriber($this), - new TestSuiteStartedSubscriber($this), - new TestSuiteFinishedSubscriber($this), - new TestPreparedSubscriber($this), - new TestFinishedSubscriber($this), - new BeforeTestClassMethodErroredSubscriber($this), - new BeforeTestClassMethodFailedSubscriber($this), - new AfterTestClassMethodErroredSubscriber($this), - new AfterTestClassMethodFailedSubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestSkippedSubscriber($this), - new TestConsideredRiskySubscriber($this), - new TestTriggeredDeprecationSubscriber($this), - new TestTriggeredErrorSubscriber($this), - new TestTriggeredNoticeSubscriber($this), - new TestTriggeredPhpDeprecationSubscriber($this), - new TestTriggeredPhpNoticeSubscriber($this), - new TestTriggeredPhpunitDeprecationSubscriber($this), - new TestTriggeredPhpunitErrorSubscriber($this), - new TestTriggeredPhpunitNoticeSubscriber($this), - new TestTriggeredPhpunitWarningSubscriber($this), - new TestTriggeredPhpWarningSubscriber($this), - new TestTriggeredWarningSubscriber($this), - new TestRunnerTriggeredDeprecationSubscriber($this), - new TestRunnerTriggeredNoticeSubscriber($this), - new TestRunnerTriggeredWarningSubscriber($this), - new ChildProcessErroredSubscriber($this), - ); - - $this->issueFilter = $issueFilter; - } - - public function result(): TestResult - { - return new TestResult( - $this->numberOfTests, - $this->numberOfTestsRun, - $this->numberOfAssertions, - $this->testErroredEvents, - $this->testFailedEvents, - $this->testConsideredRiskyEvents, - $this->testSuiteSkippedEvents, - $this->testSkippedEvents, - $this->testMarkedIncompleteEvents, - $this->testTriggeredPhpunitDeprecationEvents, - $this->testTriggeredPhpunitErrorEvents, - $this->testTriggeredPhpunitNoticeEvents, - $this->testTriggeredPhpunitWarningEvents, - $this->testRunnerTriggeredDeprecationEvents, - $this->testRunnerTriggeredNoticeEvents, - $this->testRunnerTriggeredWarningEvents, - array_values($this->errors), - array_values($this->deprecations), - array_values($this->notices), - array_values($this->warnings), - array_values($this->phpDeprecations), - array_values($this->phpNotices), - array_values($this->phpWarnings), - $this->numberOfIssuesIgnoredByBaseline, - ); - } - - public function executionStarted(ExecutionStarted $event): void - { - $this->numberOfTests = $event->testSuite()->count(); - } - - public function testSuiteSkipped(TestSuiteSkipped $event): void - { - $testSuite = $event->testSuite(); - - if (!$testSuite->isForTestClass()) { - return; - } - - $this->testSuiteSkippedEvents[] = $event; - } - - public function testSuiteStarted(TestSuiteStarted $event): void - { - $testSuite = $event->testSuite(); - - if (!$testSuite->isForTestClass()) { - return; - } - } - - public function testSuiteFinished(TestSuiteFinished $event): void - { - $testSuite = $event->testSuite(); - - if ($testSuite->isWithName()) { - return; - } - - if ($testSuite->isForTestMethodWithDataProvider()) { - assert($testSuite instanceof TestSuiteForTestMethodWithDataProvider); - assert(count($testSuite->tests()->asArray()) > 0); - - $test = $testSuite->tests()->asArray()[0]; - - assert($test instanceof TestMethod); - - foreach ($this->testFailedEvents as $testFailedEvent) { - if ($testFailedEvent->test()->isTestMethod() && $testFailedEvent->test()->methodName() === $test->methodName()) { - return; - } - } - - PassedTests::instance()->testMethodPassed($test, null); - - return; - } - - assert($testSuite instanceof TestSuiteForTestClass); - - PassedTests::instance()->testClassPassed($testSuite->className()); - } - - public function testPrepared(): void - { - $this->prepared = true; - } - - public function testFinished(Finished $event): void - { - $this->numberOfAssertions += $event->numberOfAssertionsPerformed(); - - $this->numberOfTestsRun++; - - $this->prepared = false; - $this->childProcessErrored = false; - } - - public function beforeTestClassMethodErrored(BeforeFirstTestMethodErrored $event): void - { - $this->testErroredEvents[] = $event; - - $this->numberOfTestsRun++; - } - - public function beforeTestClassMethodFailed(BeforeFirstTestMethodFailed $event): void - { - $this->testFailedEvents[] = $event; - - $this->numberOfTestsRun++; - } - - public function afterTestClassMethodErrored(AfterLastTestMethodErrored $event): void - { - $this->testErroredEvents[] = $event; - } - - public function afterTestClassMethodFailed(AfterLastTestMethodFailed $event): void - { - $this->testFailedEvents[] = $event; - } - - public function testErrored(Errored $event): void - { - $this->testErroredEvents[] = $event; - - if ($this->childProcessErrored) { - return; - } - - if (!$this->prepared) { - $this->numberOfTestsRun++; - } - } - - public function testFailed(Failed $event): void - { - $this->testFailedEvents[] = $event; - } - - public function testMarkedIncomplete(MarkedIncomplete $event): void - { - $this->testMarkedIncompleteEvents[] = $event; - } - - public function testSkipped(TestSkipped $event): void - { - $this->testSkippedEvents[] = $event; - - if (!$this->prepared) { - $this->numberOfTestsRun++; - } - } - - public function testConsideredRisky(ConsideredRisky $event): void - { - if (!isset($this->testConsideredRiskyEvents[$event->test()->id()])) { - $this->testConsideredRiskyEvents[$event->test()->id()] = []; - } - - $this->testConsideredRiskyEvents[$event->test()->id()][] = $event; - } - - public function testTriggeredDeprecation(DeprecationTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->deprecations[$id])) { - $this->deprecations[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - $event->stackTrace(), - ); - - return; - } - - $this->deprecations[$id]->triggeredBy($event->test()); - } - - public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->phpDeprecations[$id])) { - $this->phpDeprecations[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->phpDeprecations[$id]->triggeredBy($event->test()); - } - - public function testTriggeredPhpunitDeprecation(PhpunitDeprecationTriggered $event): void - { - if (!isset($this->testTriggeredPhpunitDeprecationEvents[$event->test()->id()])) { - $this->testTriggeredPhpunitDeprecationEvents[$event->test()->id()] = []; - } - - $this->testTriggeredPhpunitDeprecationEvents[$event->test()->id()][] = $event; - } - - public function testTriggeredPhpunitNotice(PhpunitNoticeTriggered $event): void - { - if (!isset($this->testTriggeredPhpunitNoticeEvents[$event->test()->id()])) { - $this->testTriggeredPhpunitNoticeEvents[$event->test()->id()] = []; - } - - $this->testTriggeredPhpunitNoticeEvents[$event->test()->id()][] = $event; - } - - public function testTriggeredError(ErrorTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - $id = $this->issueId($event); - - if (!isset($this->errors[$id])) { - $this->errors[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->errors[$id]->triggeredBy($event->test()); - } - - public function testTriggeredNotice(NoticeTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->notices[$id])) { - $this->notices[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->notices[$id]->triggeredBy($event->test()); - } - - public function testTriggeredPhpNotice(PhpNoticeTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->phpNotices[$id])) { - $this->phpNotices[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->phpNotices[$id]->triggeredBy($event->test()); - } - - public function testTriggeredWarning(WarningTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->warnings[$id])) { - $this->warnings[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->warnings[$id]->triggeredBy($event->test()); - } - - public function testTriggeredPhpWarning(PhpWarningTriggered $event): void - { - if (!$this->issueFilter->shouldBeProcessed($event)) { - return; - } - - if ($event->ignoredByBaseline()) { - $this->numberOfIssuesIgnoredByBaseline++; - - return; - } - - $id = $this->issueId($event); - - if (!isset($this->phpWarnings[$id])) { - $this->phpWarnings[$id] = Issue::from( - $event->file(), - $event->line(), - $event->message(), - $event->test(), - ); - - return; - } - - $this->phpWarnings[$id]->triggeredBy($event->test()); - } - - public function testTriggeredPhpunitError(PhpunitErrorTriggered $event): void - { - if (!isset($this->testTriggeredPhpunitErrorEvents[$event->test()->id()])) { - $this->testTriggeredPhpunitErrorEvents[$event->test()->id()] = []; - } - - $this->testTriggeredPhpunitErrorEvents[$event->test()->id()][] = $event; - } - - public function testTriggeredPhpunitWarning(PhpunitWarningTriggered $event): void - { - if ($event->ignoredByTest()) { - return; - } - - if (!isset($this->testTriggeredPhpunitWarningEvents[$event->test()->id()])) { - $this->testTriggeredPhpunitWarningEvents[$event->test()->id()] = []; - } - - $this->testTriggeredPhpunitWarningEvents[$event->test()->id()][] = $event; - } - - public function testRunnerTriggeredDeprecation(TestRunnerDeprecationTriggered $event): void - { - $this->testRunnerTriggeredDeprecationEvents[] = $event; - } - - public function testRunnerTriggeredNotice(TestRunnerNoticeTriggered $event): void - { - $this->testRunnerTriggeredNoticeEvents[] = $event; - } - - public function testRunnerTriggeredWarning(TestRunnerWarningTriggered $event): void - { - $this->testRunnerTriggeredWarningEvents[] = $event; - } - - public function childProcessErrored(ChildProcessErrored $event): void - { - $this->childProcessErrored = true; - } - - public function hasErroredTests(): bool - { - return $this->testErroredEvents !== []; - } - - public function hasFailedTests(): bool - { - return $this->testFailedEvents !== []; - } - - public function hasRiskyTests(): bool - { - return $this->testConsideredRiskyEvents !== []; - } - - public function hasSkippedTests(): bool - { - return $this->testSkippedEvents !== []; - } - - public function hasIncompleteTests(): bool - { - return $this->testMarkedIncompleteEvents !== []; - } - - public function hasDeprecations(): bool - { - return $this->deprecations !== [] || - $this->phpDeprecations !== [] || - $this->testTriggeredPhpunitDeprecationEvents !== [] || - $this->testRunnerTriggeredDeprecationEvents !== []; - } - - public function hasNotices(): bool - { - return $this->notices !== [] || - $this->phpNotices !== []; - } - - public function hasWarnings(): bool - { - return $this->warnings !== [] || - $this->phpWarnings !== [] || - $this->testTriggeredPhpunitWarningEvents !== [] || - $this->testRunnerTriggeredWarningEvents !== []; - } - - /** - * @return non-empty-string - */ - private function issueId(DeprecationTriggered|ErrorTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event): string - { - return implode(':', [$event->file(), $event->line(), $event->message()]); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Facade.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Facade.php deleted file mode 100644 index 4862d686..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Facade.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use function str_contains; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Runner\DeprecationCollector\Facade as DeprecationCollectorFacade; -use PHPUnit\TestRunner\IssueFilter; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - private static ?Collector $collector = null; - - public static function init(): void - { - self::collector(); - } - - public static function result(): TestResult - { - return self::collector()->result(); - } - - public static function shouldStop(): bool - { - $configuration = ConfigurationRegistry::get(); - $collector = self::collector(); - - if (($configuration->stopOnDefect() || $configuration->stopOnError()) && $collector->hasErroredTests()) { - return true; - } - - if (($configuration->stopOnDefect() || $configuration->stopOnFailure()) && $collector->hasFailedTests()) { - return true; - } - - if (($configuration->stopOnDefect() || $configuration->stopOnWarning()) && $collector->hasWarnings()) { - return true; - } - - if (($configuration->stopOnDefect() || $configuration->stopOnRisky()) && $collector->hasRiskyTests()) { - return true; - } - - if (self::stopOnDeprecation($configuration)) { - return true; - } - - if ($configuration->stopOnNotice() && $collector->hasNotices()) { - return true; - } - - if ($configuration->stopOnIncomplete() && $collector->hasIncompleteTests()) { - return true; - } - - if ($configuration->stopOnSkipped() && $collector->hasSkippedTests()) { - return true; - } - - return false; - } - - private static function collector(): Collector - { - if (self::$collector === null) { - $configuration = ConfigurationRegistry::get(); - - self::$collector = new Collector( - EventFacade::instance(), - new IssueFilter($configuration->source()), - ); - } - - return self::$collector; - } - - private static function stopOnDeprecation(Configuration $configuration): bool - { - if (!$configuration->stopOnDeprecation()) { - return false; - } - - $deprecations = DeprecationCollectorFacade::filteredDeprecations(); - - if (!$configuration->hasSpecificDeprecationToStopOn()) { - return $deprecations !== []; - } - - foreach ($deprecations as $deprecation) { - if (str_contains($deprecation, $configuration->specificDeprecationToStopOn())) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Issue.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Issue.php deleted file mode 100644 index 12ade5c3..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Issue.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult\Issues; - -use function array_keys; -use function count; -use PHPUnit\Event\Code\Test; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Issue -{ - /** - * @var non-empty-string - */ - private readonly string $file; - - /** - * @var positive-int - */ - private readonly int $line; - - /** - * @var non-empty-string - */ - private readonly string $description; - - /** - * @var non-empty-array - */ - private array $triggeringTests; - - /** - * @var ?non-empty-string - */ - private ?string $stackTrace; - - /** - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $description - */ - public static function from(string $file, int $line, string $description, Test $triggeringTest, ?string $stackTrace = null): self - { - return new self($file, $line, $description, $triggeringTest, $stackTrace); - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * @param non-empty-string $description - */ - private function __construct(string $file, int $line, string $description, Test $triggeringTest, ?string $stackTrace) - { - $this->file = $file; - $this->line = $line; - $this->description = $description; - $this->stackTrace = $stackTrace; - - $this->triggeringTests = [ - $triggeringTest->id() => [ - 'test' => $triggeringTest, - 'count' => 1, - ], - ]; - } - - public function triggeredBy(Test $test): void - { - if (isset($this->triggeringTests[$test->id()])) { - $this->triggeringTests[$test->id()]['count']++; - - return; - } - - $this->triggeringTests[$test->id()] = [ - 'test' => $test, - 'count' => 1, - ]; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return positive-int - */ - public function line(): int - { - return $this->line; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return $this->description; - } - - /** - * @return non-empty-array - */ - public function triggeringTests(): array - { - return $this->triggeringTests; - } - - /** - * @phpstan-assert-if-true !null $this->stackTrace - */ - public function hasStackTrace(): bool - { - return $this->stackTrace !== null; - } - - /** - * @return ?non-empty-string - */ - public function stackTrace(): ?string - { - return $this->stackTrace; - } - - public function triggeredInTest(): bool - { - return count($this->triggeringTests) === 1 && - $this->file === $this->triggeringTests[array_keys($this->triggeringTests)[0]]['test']->file(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/PassedTests.php b/vendor/phpunit/phpunit/src/Runner/TestResult/PassedTests.php deleted file mode 100644 index 4fad1b5e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/PassedTests.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use function array_merge; -use function assert; -use function explode; -use function in_array; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Framework\TestSize\Known; -use PHPUnit\Framework\TestSize\TestSize; -use PHPUnit\Metadata\Api\Groups; -use ReflectionMethod; -use ReflectionNamedType; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PassedTests -{ - private static ?self $instance = null; - - /** - * @var list - */ - private array $passedTestClasses = []; - - /** - * @var array - */ - private array $passedTestMethods = []; - - public static function instance(): self - { - if (self::$instance !== null) { - return self::$instance; - } - - self::$instance = new self; - - return self::$instance; - } - - /** - * @param class-string $className - */ - public function testClassPassed(string $className): void - { - $this->passedTestClasses[] = $className; - } - - public function testMethodPassed(TestMethod $test, mixed $returnValue): void - { - $size = (new Groups)->size( - $test->className(), - $test->methodName(), - ); - - $this->passedTestMethods[$test->className() . '::' . $test->methodName()] = [ - 'returnValue' => $returnValue, - 'size' => $size, - ]; - } - - public function import(self $other): void - { - $this->passedTestClasses = array_merge( - $this->passedTestClasses, - $other->passedTestClasses, - ); - - $this->passedTestMethods = array_merge( - $this->passedTestMethods, - $other->passedTestMethods, - ); - } - - /** - * @param class-string $className - */ - public function hasTestClassPassed(string $className): bool - { - return in_array($className, $this->passedTestClasses, true); - } - - public function hasTestMethodPassed(string $method): bool - { - return isset($this->passedTestMethods[$method]); - } - - public function isGreaterThan(string $method, TestSize $other): bool - { - if ($other->isUnknown()) { - return false; - } - - assert($other instanceof Known); - - $size = $this->passedTestMethods[$method]['size']; - - if ($size->isUnknown()) { - return false; - } - - assert($size instanceof Known); - - return $size->isGreaterThan($other); - } - - public function hasReturnValue(string $method): bool - { - $returnType = (new ReflectionMethod(...explode('::', $method)))->getReturnType(); - - return !$returnType instanceof ReflectionNamedType || !in_array($returnType->getName(), ['never', 'void'], true); - } - - public function returnValue(string $method): mixed - { - if (isset($this->passedTestMethods[$method])) { - return $this->passedTestMethods[$method]['returnValue']; - } - - return null; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodErroredSubscriber.php deleted file mode 100644 index eb94433b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\AfterLastTestMethodErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestClassMethodErroredSubscriber extends Subscriber implements AfterLastTestMethodErroredSubscriber -{ - public function notify(AfterLastTestMethodErrored $event): void - { - $this->collector()->afterTestClassMethodErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodFailedSubscriber.php deleted file mode 100644 index e207ba1d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/AfterTestClassMethodFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\AfterLastTestMethodFailed; -use PHPUnit\Event\Test\AfterLastTestMethodFailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AfterTestClassMethodFailedSubscriber extends Subscriber implements AfterLastTestMethodFailedSubscriber -{ - public function notify(AfterLastTestMethodFailed $event): void - { - $this->collector()->afterTestClassMethodFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodErroredSubscriber.php deleted file mode 100644 index 1929125e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestClassMethodErroredSubscriber extends Subscriber implements BeforeFirstTestMethodErroredSubscriber -{ - public function notify(BeforeFirstTestMethodErrored $event): void - { - $this->collector()->beforeTestClassMethodErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodFailedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodFailedSubscriber.php deleted file mode 100644 index 0e69855a..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/BeforeTestClassMethodFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\BeforeFirstTestMethodFailed; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestClassMethodFailedSubscriber extends Subscriber implements BeforeFirstTestMethodFailedSubscriber -{ - public function notify(BeforeFirstTestMethodFailed $event): void - { - $this->collector()->beforeTestClassMethodFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ChildProcessErroredSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ChildProcessErroredSubscriber.php deleted file mode 100644 index 3d70d88e..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ChildProcessErroredSubscriber.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestRunner\ChildProcessErrored; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessErroredSubscriber extends Subscriber implements \PHPUnit\Event\TestRunner\ChildProcessErroredSubscriber -{ - public function notify(ChildProcessErrored $event): void - { - $this->collector()->childProcessErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ExecutionStartedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ExecutionStartedSubscriber.php deleted file mode 100644 index b54ae9e7..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/ExecutionStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestRunner\ExecutionStarted; -use PHPUnit\Event\TestRunner\ExecutionStartedSubscriber as TestRunnerExecutionStartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ExecutionStartedSubscriber extends Subscriber implements TestRunnerExecutionStartedSubscriber -{ - public function notify(ExecutionStarted $event): void - { - $this->collector()->executionStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/Subscriber.php deleted file mode 100644 index 36be4941..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private Collector $collector; - - public function __construct(Collector $collector) - { - $this->collector = $collector; - } - - protected function collector(): Collector - { - return $this->collector; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestConsideredRiskySubscriber.php deleted file mode 100644 index 8584fddc..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestConsideredRiskySubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\ConsideredRiskySubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestConsideredRiskySubscriber extends Subscriber implements ConsideredRiskySubscriber -{ - public function notify(ConsideredRisky $event): void - { - $this->collector()->testConsideredRisky($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index a97c21a6..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - public function notify(Errored $event): void - { - $this->collector()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index 118b304c..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - public function notify(Failed $event): void - { - $this->collector()->testFailed($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index 37fe67d0..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->collector()->testFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index c9d13ab5..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - public function notify(MarkedIncomplete $event): void - { - $this->collector()->testMarkedIncomplete($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index 6dd05ca7..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->collector()->testPrepared(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredDeprecationSubscriber.php deleted file mode 100644 index 36b3ea03..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestRunner\DeprecationTriggered; -use PHPUnit\Event\TestRunner\DeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - public function notify(DeprecationTriggered $event): void - { - $this->collector()->testRunnerTriggeredDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredNoticeSubscriber.php deleted file mode 100644 index 8fd9bc4b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestRunner\NoticeTriggered; -use PHPUnit\Event\TestRunner\NoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber -{ - public function notify(NoticeTriggered $event): void - { - $this->collector()->testRunnerTriggeredNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredWarningSubscriber.php deleted file mode 100644 index cc01d5db..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestRunnerTriggeredWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestRunner\WarningTriggered; -use PHPUnit\Event\TestRunner\WarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber -{ - public function notify(WarningTriggered $event): void - { - $this->collector()->testRunnerTriggeredWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index 152db85b..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - public function notify(Skipped $event): void - { - $this->collector()->testSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteFinishedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteFinishedSubscriber.php deleted file mode 100644 index e5f2acac..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestSuite\Finished; -use PHPUnit\Event\TestSuite\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->collector()->testSuiteFinished($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteSkippedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteSkippedSubscriber.php deleted file mode 100644 index 0c7cd7ab..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteSkippedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestSuite\Skipped; -use PHPUnit\Event\TestSuite\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - public function notify(Skipped $event): void - { - $this->collector()->testSuiteSkipped($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteStartedSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteStartedSubscriber.php deleted file mode 100644 index d3cb3bff..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestSuiteStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\TestSuite\Started; -use PHPUnit\Event\TestSuite\StartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteStartedSubscriber extends Subscriber implements StartedSubscriber -{ - public function notify(Started $event): void - { - $this->collector()->testSuiteStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php deleted file mode 100644 index 81e93eb3..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - public function notify(DeprecationTriggered $event): void - { - $this->collector()->testTriggeredDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredErrorSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredErrorSubscriber.php deleted file mode 100644 index 0aef461d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredErrorSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\ErrorTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredErrorSubscriber extends Subscriber implements ErrorTriggeredSubscriber -{ - public function notify(ErrorTriggered $event): void - { - $this->collector()->testTriggeredError($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php deleted file mode 100644 index 67b73c06..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\NoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber -{ - public function notify(NoticeTriggered $event): void - { - $this->collector()->testTriggeredNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php deleted file mode 100644 index 5cd17e3f..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpDeprecationSubscriber extends Subscriber implements PhpDeprecationTriggeredSubscriber -{ - public function notify(PhpDeprecationTriggered $event): void - { - $this->collector()->testTriggeredPhpDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php deleted file mode 100644 index 9af0d320..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpNoticeSubscriber extends Subscriber implements PhpNoticeTriggeredSubscriber -{ - public function notify(PhpNoticeTriggered $event): void - { - $this->collector()->testTriggeredPhpNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php deleted file mode 100644 index 18eaf4f1..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpWarningSubscriber extends Subscriber implements PhpWarningTriggeredSubscriber -{ - public function notify(PhpWarningTriggered $event): void - { - $this->collector()->testTriggeredPhpWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php deleted file mode 100644 index 3475f11a..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitDeprecationSubscriber extends Subscriber implements PhpunitDeprecationTriggeredSubscriber -{ - public function notify(PhpunitDeprecationTriggered $event): void - { - $this->collector()->testTriggeredPhpunitDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php deleted file mode 100644 index 0ceba9ca..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitErrorSubscriber extends Subscriber implements PhpunitErrorTriggeredSubscriber -{ - public function notify(PhpunitErrorTriggered $event): void - { - $this->collector()->testTriggeredPhpunitError($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitNoticeSubscriber.php deleted file mode 100644 index f7ebfd14..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpunitNoticeTriggered; -use PHPUnit\Event\Test\PhpunitNoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitNoticeSubscriber extends Subscriber implements PhpunitNoticeTriggeredSubscriber -{ - public function notify(PhpunitNoticeTriggered $event): void - { - $this->collector()->testTriggeredPhpunitNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php deleted file mode 100644 index 376c4b60..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitWarningSubscriber extends Subscriber implements PhpunitWarningTriggeredSubscriber -{ - public function notify(PhpunitWarningTriggered $event): void - { - $this->collector()->testTriggeredPhpunitWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredWarningSubscriber.php deleted file mode 100644 index d5fe3ed5..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/Subscriber/TestTriggeredWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\Test\WarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber -{ - public function notify(WarningTriggered $event): void - { - $this->collector()->testTriggeredWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestResult/TestResult.php b/vendor/phpunit/phpunit/src/Runner/TestResult/TestResult.php deleted file mode 100644 index f491718f..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestResult/TestResult.php +++ /dev/null @@ -1,647 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TestRunner\TestResult; - -use function count; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\AfterLastTestMethodFailed; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodFailed; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitNoticeTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\Skipped as TestSkipped; -use PHPUnit\Event\TestRunner\DeprecationTriggered as TestRunnerDeprecationTriggered; -use PHPUnit\Event\TestRunner\NoticeTriggered as TestRunnerNoticeTriggered; -use PHPUnit\Event\TestRunner\WarningTriggered as TestRunnerWarningTriggered; -use PHPUnit\Event\TestSuite\Skipped as TestSuiteSkipped; -use PHPUnit\TestRunner\TestResult\Issues\Issue; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestResult -{ - private int $numberOfTests; - private int $numberOfTestsRun; - private int $numberOfAssertions; - - /** - * @var list - */ - private array $testErroredEvents; - - /** - * @var list - */ - private array $testFailedEvents; - - /** - * @var list - */ - private array $testMarkedIncompleteEvents; - - /** - * @var list - */ - private array $testSuiteSkippedEvents; - - /** - * @var list - */ - private array $testSkippedEvents; - - /** - * @var array> - */ - private array $testConsideredRiskyEvents; - - /** - * @var array> - */ - private array $testTriggeredPhpunitDeprecationEvents; - - /** - * @var array> - */ - private array $testTriggeredPhpunitErrorEvents; - - /** - * @var array> - */ - private array $testTriggeredPhpunitNoticeEvents; - - /** - * @var array> - */ - private array $testTriggeredPhpunitWarningEvents; - - /** - * @var list - */ - private array $testRunnerTriggeredDeprecationEvents; - - /** - * @var list - */ - private array $testRunnerTriggeredNoticeEvents; - - /** - * @var list - */ - private array $testRunnerTriggeredWarningEvents; - - /** - * @var list - */ - private array $errors; - - /** - * @var list - */ - private array $deprecations; - - /** - * @var list - */ - private array $notices; - - /** - * @var list - */ - private array $warnings; - - /** - * @var list - */ - private array $phpDeprecations; - - /** - * @var list - */ - private array $phpNotices; - - /** - * @var list - */ - private array $phpWarnings; - - /** - * @var non-negative-int - */ - private int $numberOfIssuesIgnoredByBaseline; - - /** - * @param list $testErroredEvents - * @param list $testFailedEvents - * @param array> $testConsideredRiskyEvents - * @param list $testSuiteSkippedEvents - * @param list $testSkippedEvents - * @param list $testMarkedIncompleteEvents - * @param array> $testTriggeredPhpunitDeprecationEvents - * @param array> $testTriggeredPhpunitErrorEvents - * @param array> $testTriggeredPhpunitNoticeEvents - * @param array> $testTriggeredPhpunitWarningEvents - * @param list $testRunnerTriggeredDeprecationEvents - * @param list $testRunnerTriggeredNoticeEvents - * @param list $testRunnerTriggeredWarningEvents - * @param list $errors - * @param list $deprecations - * @param list $notices - * @param list $warnings - * @param list $phpDeprecations - * @param list $phpNotices - * @param list $phpWarnings - * @param non-negative-int $numberOfIssuesIgnoredByBaseline - */ - public function __construct(int $numberOfTests, int $numberOfTestsRun, int $numberOfAssertions, array $testErroredEvents, array $testFailedEvents, array $testConsideredRiskyEvents, array $testSuiteSkippedEvents, array $testSkippedEvents, array $testMarkedIncompleteEvents, array $testTriggeredPhpunitDeprecationEvents, array $testTriggeredPhpunitErrorEvents, array $testTriggeredPhpunitNoticeEvents, array $testTriggeredPhpunitWarningEvents, array $testRunnerTriggeredDeprecationEvents, array $testRunnerTriggeredNoticeEvents, array $testRunnerTriggeredWarningEvents, array $errors, array $deprecations, array $notices, array $warnings, array $phpDeprecations, array $phpNotices, array $phpWarnings, int $numberOfIssuesIgnoredByBaseline) - { - $this->numberOfTests = $numberOfTests; - $this->numberOfTestsRun = $numberOfTestsRun; - $this->numberOfAssertions = $numberOfAssertions; - $this->testErroredEvents = $testErroredEvents; - $this->testFailedEvents = $testFailedEvents; - $this->testConsideredRiskyEvents = $testConsideredRiskyEvents; - $this->testSuiteSkippedEvents = $testSuiteSkippedEvents; - $this->testSkippedEvents = $testSkippedEvents; - $this->testMarkedIncompleteEvents = $testMarkedIncompleteEvents; - $this->testTriggeredPhpunitDeprecationEvents = $testTriggeredPhpunitDeprecationEvents; - $this->testTriggeredPhpunitErrorEvents = $testTriggeredPhpunitErrorEvents; - $this->testTriggeredPhpunitNoticeEvents = $testTriggeredPhpunitNoticeEvents; - $this->testTriggeredPhpunitWarningEvents = $testTriggeredPhpunitWarningEvents; - $this->testRunnerTriggeredDeprecationEvents = $testRunnerTriggeredDeprecationEvents; - $this->testRunnerTriggeredNoticeEvents = $testRunnerTriggeredNoticeEvents; - $this->testRunnerTriggeredWarningEvents = $testRunnerTriggeredWarningEvents; - $this->errors = $errors; - $this->deprecations = $deprecations; - $this->notices = $notices; - $this->warnings = $warnings; - $this->phpDeprecations = $phpDeprecations; - $this->phpNotices = $phpNotices; - $this->phpWarnings = $phpWarnings; - $this->numberOfIssuesIgnoredByBaseline = $numberOfIssuesIgnoredByBaseline; - } - - public function numberOfTestsRun(): int - { - return $this->numberOfTestsRun; - } - - public function numberOfAssertions(): int - { - return $this->numberOfAssertions; - } - - /** - * @return list - */ - public function testErroredEvents(): array - { - return $this->testErroredEvents; - } - - public function numberOfTestErroredEvents(): int - { - return count($this->testErroredEvents); - } - - public function hasTestErroredEvents(): bool - { - return $this->numberOfTestErroredEvents() > 0; - } - - /** - * @return list - */ - public function testFailedEvents(): array - { - return $this->testFailedEvents; - } - - public function numberOfTestFailedEvents(): int - { - return count($this->testFailedEvents); - } - - public function hasTestFailedEvents(): bool - { - return $this->numberOfTestFailedEvents() > 0; - } - - /** - * @return array> - */ - public function testConsideredRiskyEvents(): array - { - return $this->testConsideredRiskyEvents; - } - - public function numberOfTestsWithTestConsideredRiskyEvents(): int - { - return count($this->testConsideredRiskyEvents); - } - - public function hasTestConsideredRiskyEvents(): bool - { - return $this->numberOfTestsWithTestConsideredRiskyEvents() > 0; - } - - /** - * @return list - */ - public function testSuiteSkippedEvents(): array - { - return $this->testSuiteSkippedEvents; - } - - public function numberOfTestSuiteSkippedEvents(): int - { - return count($this->testSuiteSkippedEvents); - } - - public function hasTestSuiteSkippedEvents(): bool - { - return $this->numberOfTestSuiteSkippedEvents() > 0; - } - - /** - * @return list - */ - public function testSkippedEvents(): array - { - return $this->testSkippedEvents; - } - - public function numberOfTestSkippedEvents(): int - { - return count($this->testSkippedEvents); - } - - public function hasTestSkippedEvents(): bool - { - return $this->numberOfTestSkippedEvents() > 0; - } - - /** - * @return list - */ - public function testMarkedIncompleteEvents(): array - { - return $this->testMarkedIncompleteEvents; - } - - public function numberOfTestMarkedIncompleteEvents(): int - { - return count($this->testMarkedIncompleteEvents); - } - - public function hasTestMarkedIncompleteEvents(): bool - { - return $this->numberOfTestMarkedIncompleteEvents() > 0; - } - - /** - * @return array> - */ - public function testTriggeredPhpunitDeprecationEvents(): array - { - return $this->testTriggeredPhpunitDeprecationEvents; - } - - public function numberOfTestsWithTestTriggeredPhpunitDeprecationEvents(): int - { - return count($this->testTriggeredPhpunitDeprecationEvents); - } - - public function hasTestTriggeredPhpunitDeprecationEvents(): bool - { - return $this->numberOfTestsWithTestTriggeredPhpunitDeprecationEvents() > 0; - } - - /** - * @return array> - */ - public function testTriggeredPhpunitErrorEvents(): array - { - return $this->testTriggeredPhpunitErrorEvents; - } - - public function numberOfTestsWithTestTriggeredPhpunitErrorEvents(): int - { - return count($this->testTriggeredPhpunitErrorEvents); - } - - public function hasTestTriggeredPhpunitErrorEvents(): bool - { - return $this->numberOfTestsWithTestTriggeredPhpunitErrorEvents() > 0; - } - - /** - * @return array> - */ - public function testTriggeredPhpunitNoticeEvents(): array - { - return $this->testTriggeredPhpunitNoticeEvents; - } - - public function numberOfTestsWithTestTriggeredPhpunitNoticeEvents(): int - { - return count($this->testTriggeredPhpunitNoticeEvents); - } - - public function hasTestTriggeredPhpunitNoticeEvents(): bool - { - return $this->numberOfTestsWithTestTriggeredPhpunitNoticeEvents() > 0; - } - - /** - * @return array> - */ - public function testTriggeredPhpunitWarningEvents(): array - { - return $this->testTriggeredPhpunitWarningEvents; - } - - public function numberOfTestsWithTestTriggeredPhpunitWarningEvents(): int - { - return count($this->testTriggeredPhpunitWarningEvents); - } - - public function hasTestTriggeredPhpunitWarningEvents(): bool - { - return $this->numberOfTestsWithTestTriggeredPhpunitWarningEvents() > 0; - } - - /** - * @return list - */ - public function testRunnerTriggeredDeprecationEvents(): array - { - return $this->testRunnerTriggeredDeprecationEvents; - } - - public function numberOfTestRunnerTriggeredDeprecationEvents(): int - { - return count($this->testRunnerTriggeredDeprecationEvents); - } - - public function hasTestRunnerTriggeredDeprecationEvents(): bool - { - return $this->numberOfTestRunnerTriggeredDeprecationEvents() > 0; - } - - /** - * @return list - */ - public function testRunnerTriggeredNoticeEvents(): array - { - return $this->testRunnerTriggeredNoticeEvents; - } - - public function numberOfTestRunnerTriggeredNoticeEvents(): int - { - return count($this->testRunnerTriggeredNoticeEvents); - } - - public function hasTestRunnerTriggeredNoticeEvents(): bool - { - return $this->numberOfTestRunnerTriggeredNoticeEvents() > 0; - } - - /** - * @return list - */ - public function testRunnerTriggeredWarningEvents(): array - { - return $this->testRunnerTriggeredWarningEvents; - } - - public function numberOfTestRunnerTriggeredWarningEvents(): int - { - return count($this->testRunnerTriggeredWarningEvents); - } - - public function hasTestRunnerTriggeredWarningEvents(): bool - { - return $this->numberOfTestRunnerTriggeredWarningEvents() > 0; - } - - public function wasSuccessful(): bool - { - return !$this->hasTestErroredEvents() && - !$this->hasTestFailedEvents() && - !$this->hasTestTriggeredPhpunitErrorEvents(); - } - - public function hasIssues(): bool - { - return $this->hasTestsWithIssues() || - $this->hasTestRunnerTriggeredWarningEvents(); - } - - public function hasTestsWithIssues(): bool - { - return $this->hasRiskyTests() || - $this->hasIncompleteTests() || - $this->hasDeprecations() || - $this->errors !== [] || - $this->hasNotices() || - $this->hasWarnings() || - $this->hasPhpunitNotices() || - $this->hasPhpunitWarnings(); - } - - /** - * @return list - */ - public function errors(): array - { - return $this->errors; - } - - /** - * @return list - */ - public function deprecations(): array - { - return $this->deprecations; - } - - /** - * @return list - */ - public function notices(): array - { - return $this->notices; - } - - /** - * @return list - */ - public function warnings(): array - { - return $this->warnings; - } - - /** - * @return list - */ - public function phpDeprecations(): array - { - return $this->phpDeprecations; - } - - /** - * @return list - */ - public function phpNotices(): array - { - return $this->phpNotices; - } - - /** - * @return list - */ - public function phpWarnings(): array - { - return $this->phpWarnings; - } - - public function hasTests(): bool - { - return $this->numberOfTests > 0; - } - - public function hasErrors(): bool - { - return $this->numberOfErrors() > 0; - } - - public function numberOfErrors(): int - { - return $this->numberOfTestErroredEvents() + - count($this->errors) + - $this->numberOfTestsWithTestTriggeredPhpunitErrorEvents(); - } - - public function hasDeprecations(): bool - { - return $this->numberOfDeprecations() > 0; - } - - public function hasPhpOrUserDeprecations(): bool - { - return $this->numberOfPhpOrUserDeprecations() > 0; - } - - public function numberOfPhpOrUserDeprecations(): int - { - return count($this->deprecations) + - count($this->phpDeprecations); - } - - public function hasPhpunitDeprecations(): bool - { - return $this->numberOfPhpunitDeprecations() > 0; - } - - public function numberOfPhpunitDeprecations(): int - { - return count($this->testTriggeredPhpunitDeprecationEvents) + - count($this->testRunnerTriggeredDeprecationEvents); - } - - public function hasPhpunitWarnings(): bool - { - return $this->numberOfPhpunitWarnings() > 0; - } - - public function numberOfPhpunitWarnings(): int - { - return count($this->testTriggeredPhpunitWarningEvents) + - count($this->testRunnerTriggeredWarningEvents); - } - - public function numberOfDeprecations(): int - { - return count($this->deprecations) + - count($this->phpDeprecations) + - count($this->testTriggeredPhpunitDeprecationEvents) + - count($this->testRunnerTriggeredDeprecationEvents); - } - - public function hasNotices(): bool - { - return $this->numberOfNotices() > 0; - } - - public function numberOfNotices(): int - { - return count($this->notices) + - count($this->phpNotices); - } - - public function hasWarnings(): bool - { - return $this->numberOfWarnings() > 0; - } - - public function numberOfWarnings(): int - { - return count($this->warnings) + - count($this->phpWarnings); - } - - public function hasIncompleteTests(): bool - { - return $this->testMarkedIncompleteEvents !== []; - } - - public function hasRiskyTests(): bool - { - return $this->testConsideredRiskyEvents !== []; - } - - public function hasSkippedTests(): bool - { - return $this->testSkippedEvents !== []; - } - - public function hasIssuesIgnoredByBaseline(): bool - { - return $this->numberOfIssuesIgnoredByBaseline > 0; - } - - /** - * @return non-negative-int - */ - public function numberOfIssuesIgnoredByBaseline(): int - { - return $this->numberOfIssuesIgnoredByBaseline; - } - - public function hasPhpunitNotices(): bool - { - return $this->numberOfPhpunitNotices() > 0; - } - - public function numberOfPhpunitNotices(): int - { - return $this->numberOfTestsWithTestTriggeredPhpunitNoticeEvents() + - $this->numberOfTestRunnerTriggeredNoticeEvents(); - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php deleted file mode 100644 index 3d01964d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function array_diff; -use function basename; -use function get_declared_classes; -use function realpath; -use function str_ends_with; -use function strpos; -use function strtolower; -use function substr; -use PHPUnit\Framework\TestCase; -use ReflectionClass; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteLoader -{ - /** - * @var list - */ - private static array $declaredClasses = []; - - /** - * @var array> - */ - private static array $fileToClassesMap = []; - - /** - * @throws Exception - * - * @return ReflectionClass - */ - public function load(string $suiteClassFile): ReflectionClass - { - $suiteClassFile = realpath($suiteClassFile); - $suiteClassName = $this->classNameFromFileName($suiteClassFile); - $loadedClasses = $this->loadSuiteClassFile($suiteClassFile); - - foreach ($loadedClasses as $className) { - /** @noinspection PhpUnhandledExceptionInspection */ - $class = new ReflectionClass($className); - - if ($class->isAnonymous()) { - continue; - } - - if ($class->getFileName() !== $suiteClassFile) { - continue; - } - - if (!$class->isSubclassOf(TestCase::class)) { - continue; - } - - if (!str_ends_with(strtolower($class->getShortName()), strtolower($suiteClassName))) { - continue; - } - - if (!$class->isAbstract()) { - return $class; - } - - $e = new ClassIsAbstractException($class->getName(), $suiteClassFile); - } - - if (isset($e)) { - throw $e; - } - - foreach ($loadedClasses as $className) { - if (str_ends_with(strtolower($className), strtolower($suiteClassName))) { - throw new ClassDoesNotExtendTestCaseException($className, $suiteClassFile); - } - } - - throw new ClassCannotBeFoundException($suiteClassName, $suiteClassFile); - } - - private function classNameFromFileName(string $suiteClassFile): string - { - $className = basename($suiteClassFile, '.php'); - $dotPos = strpos($className, '.'); - - if ($dotPos !== false) { - $className = substr($className, 0, $dotPos); - } - - return $className; - } - - /** - * @return array - */ - private function loadSuiteClassFile(string $suiteClassFile): array - { - if (isset(self::$fileToClassesMap[$suiteClassFile])) { - return self::$fileToClassesMap[$suiteClassFile]; - } - - if (self::$declaredClasses === []) { - self::$declaredClasses = get_declared_classes(); - } - - require_once $suiteClassFile; - - $loadedClasses = array_diff( - get_declared_classes(), - self::$declaredClasses, - ); - - foreach ($loadedClasses as $loadedClass) { - /** @noinspection PhpUnhandledExceptionInspection */ - $class = new ReflectionClass($loadedClass); - - if (!isset(self::$fileToClassesMap[$class->getFileName()])) { - self::$fileToClassesMap[$class->getFileName()] = []; - } - - self::$fileToClassesMap[$class->getFileName()][] = $class->getName(); - } - - self::$declaredClasses = get_declared_classes(); - - if ($loadedClasses === []) { - return self::$declaredClasses; - } - - return $loadedClasses; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php deleted file mode 100644 index b20ae250..00000000 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php +++ /dev/null @@ -1,363 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function array_diff; -use function array_merge; -use function array_reverse; -use function array_splice; -use function count; -use function in_array; -use function max; -use function shuffle; -use function usort; -use PHPUnit\Framework\DataProviderTestSuite; -use PHPUnit\Framework\Reorderable; -use PHPUnit\Framework\Test; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\ResultCache\NullResultCache; -use PHPUnit\Runner\ResultCache\ResultCache; -use PHPUnit\Runner\ResultCache\ResultCacheId; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestSuiteSorter -{ - public const int ORDER_DEFAULT = 0; - public const int ORDER_RANDOMIZED = 1; - public const int ORDER_REVERSED = 2; - public const int ORDER_DEFECTS_FIRST = 3; - public const int ORDER_DURATION = 4; - public const int ORDER_SIZE = 5; - - /** - * @var non-empty-array - */ - private const array SIZE_SORT_WEIGHT = [ - 'small' => 1, - 'medium' => 2, - 'large' => 3, - 'unknown' => 4, - ]; - - /** - * @var array Associative array of (string => DEFECT_SORT_WEIGHT) elements - */ - private array $defectSortOrder = []; - private readonly ResultCache $cache; - - /** - * @var array A list of normalized names of tests before reordering - */ - private array $originalExecutionOrder = []; - - /** - * @var array A list of normalized names of tests affected by reordering - */ - private array $executionOrder = []; - - public function __construct(?ResultCache $cache = null) - { - $this->cache = $cache ?? new NullResultCache; - } - - /** - * @throws Exception - */ - public function reorderTestsInSuite(Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void - { - $allowedOrders = [ - self::ORDER_DEFAULT, - self::ORDER_REVERSED, - self::ORDER_RANDOMIZED, - self::ORDER_DURATION, - self::ORDER_SIZE, - ]; - - if (!in_array($order, $allowedOrders, true)) { - throw new InvalidOrderException; - } - - $allowedOrderDefects = [ - self::ORDER_DEFAULT, - self::ORDER_DEFECTS_FIRST, - ]; - - if (!in_array($orderDefects, $allowedOrderDefects, true)) { - throw new InvalidOrderException; - } - - if ($isRootTestSuite) { - $this->originalExecutionOrder = $this->calculateTestExecutionOrder($suite); - } - - if ($suite instanceof TestSuite) { - foreach ($suite as $_suite) { - $this->reorderTestsInSuite($_suite, $order, $resolveDependencies, $orderDefects, false); - } - - if ($orderDefects === self::ORDER_DEFECTS_FIRST) { - $this->addSuiteToDefectSortOrder($suite); - } - - $this->sort($suite, $order, $resolveDependencies, $orderDefects); - } - - if ($isRootTestSuite) { - $this->executionOrder = $this->calculateTestExecutionOrder($suite); - } - } - - /** - * @return array - */ - public function getOriginalExecutionOrder(): array - { - return $this->originalExecutionOrder; - } - - /** - * @return array - */ - public function getExecutionOrder(): array - { - return $this->executionOrder; - } - - private function sort(TestSuite $suite, int $order, bool $resolveDependencies, int $orderDefects): void - { - if ($suite->tests() === []) { - return; - } - - if ($order === self::ORDER_REVERSED) { - $suite->setTests($this->reverse($suite->tests())); - } elseif ($order === self::ORDER_RANDOMIZED) { - $suite->setTests($this->randomize($suite->tests())); - } elseif ($order === self::ORDER_DURATION) { - $suite->setTests($this->sortByDuration($suite->tests())); - } elseif ($order === self::ORDER_SIZE) { - $suite->setTests($this->sortBySize($suite->tests())); - } - - if ($orderDefects === self::ORDER_DEFECTS_FIRST) { - $suite->setTests($this->sortDefectsFirst($suite->tests())); - } - - if ($resolveDependencies && !($suite instanceof DataProviderTestSuite)) { - $tests = $suite->tests(); - - /** @noinspection PhpParamsInspection */ - /** @phpstan-ignore argument.type */ - $suite->setTests($this->resolveDependencies($tests)); - } - } - - private function addSuiteToDefectSortOrder(TestSuite $suite): void - { - $max = 0; - - foreach ($suite->tests() as $test) { - if (!$test instanceof Reorderable) { - continue; - } - - $sortId = $test->sortId(); - - if (!isset($this->defectSortOrder[$sortId])) { - $this->defectSortOrder[$sortId] = $this->cache->status(ResultCacheId::fromReorderable($test))->asInt(); - $max = max($max, $this->defectSortOrder[$sortId]); - } - } - - $this->defectSortOrder[$suite->sortId()] = $max; - } - - /** - * @param list $tests - * - * @return list - */ - private function reverse(array $tests): array - { - return array_reverse($tests); - } - - /** - * @param list $tests - * - * @return list - */ - private function randomize(array $tests): array - { - shuffle($tests); - - return $tests; - } - - /** - * @param list $tests - * - * @return list - */ - private function sortDefectsFirst(array $tests): array - { - usort( - $tests, - fn (Test $left, Test $right) => $this->cmpDefectPriorityAndTime($left, $right), - ); - - return $tests; - } - - /** - * @param list $tests - * - * @return list - */ - private function sortByDuration(array $tests): array - { - usort( - $tests, - fn (Test $left, Test $right) => $this->cmpDuration($left, $right), - ); - - return $tests; - } - - /** - * @param list $tests - * - * @return list - */ - private function sortBySize(array $tests): array - { - usort( - $tests, - fn (Test $left, Test $right) => $this->cmpSize($left, $right), - ); - - return $tests; - } - - /** - * Comparator callback function to sort tests for "reach failure as fast as possible". - * - * 1. sort tests by defect weight defined in self::DEFECT_SORT_WEIGHT - * 2. when tests are equally defective, sort the fastest to the front - * 3. do not reorder successful tests - */ - private function cmpDefectPriorityAndTime(Test $a, Test $b): int - { - if (!($a instanceof Reorderable && $b instanceof Reorderable)) { - return 0; - } - - $priorityA = $this->defectSortOrder[$a->sortId()] ?? 0; - $priorityB = $this->defectSortOrder[$b->sortId()] ?? 0; - - if (($priorityB <=> $priorityA) > 0) { - // Sort defect weight descending - return $priorityB <=> $priorityA; - } - - if ($priorityA > 0 || $priorityB > 0) { - return $this->cmpDuration($a, $b); - } - - // do not change execution order - return 0; - } - - /** - * Compares test duration for sorting tests by duration ascending. - */ - private function cmpDuration(Test $a, Test $b): int - { - if (!($a instanceof Reorderable && $b instanceof Reorderable)) { - return 0; - } - - return $this->cache->time(ResultCacheId::fromReorderable($a)) <=> $this->cache->time(ResultCacheId::fromReorderable($b)); - } - - /** - * Compares test size for sorting tests small->medium->large->unknown. - */ - private function cmpSize(Test $a, Test $b): int - { - $sizeA = ($a instanceof TestCase || $a instanceof DataProviderTestSuite) - ? $a->size()->asString() - : 'unknown'; - $sizeB = ($b instanceof TestCase || $b instanceof DataProviderTestSuite) - ? $b->size()->asString() - : 'unknown'; - - return self::SIZE_SORT_WEIGHT[$sizeA] <=> self::SIZE_SORT_WEIGHT[$sizeB]; - } - - /** - * Reorder Tests within a TestCase in such a way as to resolve as many dependencies as possible. - * The algorithm will leave the tests in original running order when it can. - * For more details see the documentation for test dependencies. - * - * Short description of algorithm: - * 1. Pick the next Test from remaining tests to be checked for dependencies. - * 2. If the test has no dependencies: mark done, start again from the top - * 3. If the test has dependencies but none left to do: mark done, start again from the top - * 4. When we reach the end add any leftover tests to the end. These will be marked 'skipped' during execution. - * - * @param array $tests - * - * @return array - */ - private function resolveDependencies(array $tests): array - { - $newTestOrder = []; - $i = 0; - $provided = []; - - do { - if ([] === array_diff($tests[$i]->requires(), $provided)) { - $provided = array_merge($provided, $tests[$i]->provides()); - $newTestOrder = array_merge($newTestOrder, array_splice($tests, $i, 1)); - $i = 0; - } else { - $i++; - } - } while ($tests !== [] && ($i < count($tests))); - - return array_merge($newTestOrder, $tests); - } - - /** - * @return array - */ - private function calculateTestExecutionOrder(Test $suite): array - { - $tests = []; - - if ($suite instanceof TestSuite) { - foreach ($suite->tests() as $test) { - if (!$test instanceof TestSuite && $test instanceof Reorderable) { - $tests[] = $test->sortId(); - } else { - $tests = array_merge($tests, $this->calculateTestExecutionOrder($test)); - } - } - } - - return $tests; - } -} diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php deleted file mode 100644 index 06c3c71d..00000000 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Runner; - -use function array_slice; -use function assert; -use function dirname; -use function explode; -use function implode; -use function str_contains; -use SebastianBergmann\Version as VersionId; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Version -{ - private static string $pharVersion = ''; - private static string $version = ''; - - /** - * @return non-empty-string - */ - public static function id(): string - { - if (self::$pharVersion !== '') { - return self::$pharVersion; - } - - if (self::$version === '') { - self::$version = (new VersionId('12.4.1', dirname(__DIR__, 2)))->asString(); - } - - return self::$version; - } - - /** - * @return non-empty-string - */ - public static function series(): string - { - if (str_contains(self::id(), '-')) { - $version = explode('-', self::id(), 2)[0]; - } else { - $version = self::id(); - } - - return implode('.', array_slice(explode('.', $version), 0, 2)); - } - - /** - * @return positive-int - */ - public static function majorVersionNumber(): int - { - $majorVersion = (int) explode('.', self::series())[0]; - assert($majorVersion > 0); - - return $majorVersion; - } - - /** - * @return non-empty-string - */ - public static function getVersionString(): string - { - return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.'; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Application.php b/vendor/phpunit/phpunit/src/TextUI/Application.php deleted file mode 100644 index e430df7c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Application.php +++ /dev/null @@ -1,862 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use const PHP_EOL; -use const PHP_VERSION; -use function assert; -use function class_exists; -use function defined; -use function dirname; -use function explode; -use function function_exists; -use function is_file; -use function method_exists; -use function printf; -use function realpath; -use function sprintf; -use function str_contains; -use function str_starts_with; -use function trim; -use function unlink; -use PHPUnit\Event\EventFacadeIsSealedException; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Event\UnknownSubscriberTypeException; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Logging\EventLogger; -use PHPUnit\Logging\JUnit\JunitXmlLogger; -use PHPUnit\Logging\OpenTestReporting\CannotOpenUriForWritingException; -use PHPUnit\Logging\OpenTestReporting\OtrXmlLogger; -use PHPUnit\Logging\TeamCity\TeamCityLogger; -use PHPUnit\Logging\TestDox\HtmlRenderer as TestDoxHtmlRenderer; -use PHPUnit\Logging\TestDox\PlainTextRenderer as TestDoxTextRenderer; -use PHPUnit\Logging\TestDox\TestResultCollector as TestDoxResultCollector; -use PHPUnit\Runner\Baseline\CannotLoadBaselineException; -use PHPUnit\Runner\Baseline\Generator as BaselineGenerator; -use PHPUnit\Runner\Baseline\Reader; -use PHPUnit\Runner\Baseline\Writer; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\Runner\CodeCoverageInitializationStatus; -use PHPUnit\Runner\DeprecationCollector\Facade as DeprecationCollector; -use PHPUnit\Runner\DirectoryDoesNotExistException; -use PHPUnit\Runner\ErrorHandler; -use PHPUnit\Runner\Extension\ExtensionBootstrapper; -use PHPUnit\Runner\Extension\Facade as ExtensionFacade; -use PHPUnit\Runner\Extension\PharLoader; -use PHPUnit\Runner\GarbageCollection\GarbageCollectionHandler; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use PHPUnit\Runner\ResultCache\DefaultResultCache; -use PHPUnit\Runner\ResultCache\NullResultCache; -use PHPUnit\Runner\ResultCache\ResultCache; -use PHPUnit\Runner\ResultCache\ResultCacheHandler; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\Runner\Version; -use PHPUnit\TestRunner\IssueFilter; -use PHPUnit\TestRunner\TestResult\Facade as TestResultFacade; -use PHPUnit\TextUI\CliArguments\Builder; -use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration; -use PHPUnit\TextUI\CliArguments\Exception as ArgumentsException; -use PHPUnit\TextUI\CliArguments\XmlConfigurationFileFinder; -use PHPUnit\TextUI\Command\AtLeastVersionCommand; -use PHPUnit\TextUI\Command\CheckPhpConfigurationCommand; -use PHPUnit\TextUI\Command\GenerateConfigurationCommand; -use PHPUnit\TextUI\Command\ListGroupsCommand; -use PHPUnit\TextUI\Command\ListTestFilesCommand; -use PHPUnit\TextUI\Command\ListTestsAsTextCommand; -use PHPUnit\TextUI\Command\ListTestsAsXmlCommand; -use PHPUnit\TextUI\Command\ListTestSuitesCommand; -use PHPUnit\TextUI\Command\MigrateConfigurationCommand; -use PHPUnit\TextUI\Command\Result; -use PHPUnit\TextUI\Command\ShowHelpCommand; -use PHPUnit\TextUI\Command\ShowVersionCommand; -use PHPUnit\TextUI\Command\VersionCheckCommand; -use PHPUnit\TextUI\Command\WarmCodeCoverageCacheCommand; -use PHPUnit\TextUI\Configuration\BootstrapLoader; -use PHPUnit\TextUI\Configuration\BootstrapScriptDoesNotExistException; -use PHPUnit\TextUI\Configuration\BootstrapScriptException; -use PHPUnit\TextUI\Configuration\CodeCoverageFilterRegistry; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\PhpHandler; -use PHPUnit\TextUI\Configuration\Registry; -use PHPUnit\TextUI\Configuration\TestSuiteBuilder; -use PHPUnit\TextUI\Output\DefaultPrinter; -use PHPUnit\TextUI\Output\Facade as OutputFacade; -use PHPUnit\TextUI\Output\Printer; -use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration; -use PHPUnit\TextUI\XmlConfiguration\DefaultConfiguration; -use PHPUnit\TextUI\XmlConfiguration\Loader; -use PHPUnit\Util\Http\PhpDownloader; -use SebastianBergmann\Timer\Timer; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Application -{ - /** - * @param list $argv - */ - public function run(array $argv): int - { - $this->preload(); - - try { - EventFacade::emitter()->applicationStarted(); - - $cliConfiguration = $this->buildCliConfiguration($argv); - $pathToXmlConfigurationFile = (new XmlConfigurationFileFinder)->find($cliConfiguration); - - $this->executeCommandsThatOnlyRequireCliConfiguration($cliConfiguration, $pathToXmlConfigurationFile); - - $xmlConfiguration = $this->loadXmlConfiguration($pathToXmlConfigurationFile); - - $configuration = Registry::init( - $cliConfiguration, - $xmlConfiguration, - ); - - (new PhpHandler)->handle($configuration->php()); - - try { - (new BootstrapLoader)->handle($configuration); - } catch (BootstrapScriptDoesNotExistException|BootstrapScriptException $e) { - $this->exitWithErrorMessage($e->getMessage()); - } - - $this->executeCommandsThatDoNotRequireTheTestSuite($configuration, $cliConfiguration); - - $pharExtensions = null; - $extensionRequiresCodeCoverageCollection = false; - $extensionReplacesOutput = false; - $extensionReplacesProgressOutput = false; - $extensionReplacesResultOutput = false; - - if (!$configuration->noExtensions()) { - if ($configuration->hasPharExtensionDirectory()) { - $pharExtensions = (new PharLoader)->loadPharExtensionsInDirectory( - $configuration->pharExtensionDirectory(), - ); - } - - $bootstrappedExtensions = $this->bootstrapExtensions($configuration); - $extensionRequiresCodeCoverageCollection = $bootstrappedExtensions['requiresCodeCoverageCollection']; - $extensionReplacesOutput = $bootstrappedExtensions['replacesOutput']; - $extensionReplacesProgressOutput = $bootstrappedExtensions['replacesProgressOutput']; - $extensionReplacesResultOutput = $bootstrappedExtensions['replacesResultOutput']; - } - - $printer = OutputFacade::init( - $configuration, - $extensionReplacesProgressOutput, - $extensionReplacesResultOutput, - ); - - if ($configuration->debug()) { - EventFacade::instance()->registerTracer( - new EventLogger( - 'php://stdout', - $configuration->withTelemetry(), - ), - ); - } - - TestResultFacade::init(); - DeprecationCollector::init(); - - $this->registerLogfileWriters($configuration); - - $testDoxResultCollector = $this->testDoxResultCollector($configuration); - - $resultCache = $this->initializeTestResultCache($configuration); - - if ($configuration->controlGarbageCollector()) { - new GarbageCollectionHandler( - EventFacade::instance(), - $configuration->numberOfTestsBeforeGarbageCollection(), - ); - } - - $baselineGenerator = $this->configureBaseline($configuration); - - EventFacade::instance()->seal(); - - ErrorHandler::instance()->registerDeprecationHandler(); - - $testSuite = $this->buildTestSuite($configuration); - - ErrorHandler::instance()->restoreDeprecationHandler(); - - $this->executeCommandsThatRequireTheTestSuite($configuration, $cliConfiguration, $testSuite); - - if ($testSuite->isEmpty() && !$configuration->hasCliArguments() && $configuration->testSuite()->isEmpty()) { - $this->execute(new ShowHelpCommand(Result::FAILURE)); - } - - $coverageInitializationStatus = CodeCoverage::instance()->init( - $configuration, - CodeCoverageFilterRegistry::instance(), - $extensionRequiresCodeCoverageCollection, - ); - - if (!$configuration->debug() && !$extensionReplacesOutput) { - $this->writeRuntimeInformation($printer, $configuration); - $this->writePharExtensionInformation($printer, $pharExtensions); - $this->writeRandomSeedInformation($printer, $configuration); - - $printer->print(PHP_EOL); - } - - $this->configureDeprecationTriggers($configuration); - - $timer = new Timer; - $timer->start(); - - if ($coverageInitializationStatus === CodeCoverageInitializationStatus::NOT_REQUESTED || - $coverageInitializationStatus === CodeCoverageInitializationStatus::SUCCEEDED) { - $runner = new TestRunner; - - $runner->run( - $configuration, - $resultCache, - $testSuite, - ); - } - - $duration = $timer->stop(); - - $testDoxResult = null; - - if (isset($testDoxResultCollector)) { - $testDoxResult = $testDoxResultCollector->testMethodsGroupedByClass(); - } - - if ($testDoxResult !== null && - $configuration->hasLogfileTestdoxHtml()) { - try { - OutputFacade::printerFor($configuration->logfileTestdoxHtml())->print( - (new TestDoxHtmlRenderer)->render($testDoxResult), - ); - } catch (DirectoryDoesNotExistException|InvalidSocketException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot log test results in TestDox HTML format to "%s": %s', - $configuration->logfileTestdoxHtml(), - $e->getMessage(), - ), - ); - } - } - - if ($testDoxResult !== null && - $configuration->hasLogfileTestdoxText()) { - try { - OutputFacade::printerFor($configuration->logfileTestdoxText())->print( - (new TestDoxTextRenderer)->render($testDoxResult), - ); - } catch (DirectoryDoesNotExistException|InvalidSocketException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot log test results in TestDox plain text format to "%s": %s', - $configuration->logfileTestdoxText(), - $e->getMessage(), - ), - ); - } - } - - $result = TestResultFacade::result(); - - if (!$extensionReplacesResultOutput && !$configuration->debug()) { - OutputFacade::printResult( - $result, - $testDoxResult, - $duration, - $configuration->hasSpecificDeprecationToStopOn(), - ); - } - - CodeCoverage::instance()->generateReports($printer, $configuration); - - if (isset($baselineGenerator)) { - (new Writer)->write( - $configuration->generateBaseline(), - $baselineGenerator->baseline(), - ); - - $printer->print( - sprintf( - PHP_EOL . 'Baseline written to %s.' . PHP_EOL, - realpath($configuration->generateBaseline()), - ), - ); - } - - $shellExitCode = (new ShellExitCodeCalculator)->calculate( - $configuration, - $result, - ); - - EventFacade::emitter()->applicationFinished($shellExitCode); - - return $shellExitCode; - // @codeCoverageIgnoreStart - } catch (Throwable $t) { - $this->exitWithCrashMessage($t); - } - // @codeCoverageIgnoreEnd - } - - private function execute(Command\Command $command, bool $requiresResultCollectedFromEvents = false): never - { - $errored = false; - - if ($requiresResultCollectedFromEvents) { - try { - TestResultFacade::init(); - EventFacade::instance()->seal(); - - $resultCollectedFromEvents = TestResultFacade::result(); - - $errored = $resultCollectedFromEvents->hasTestTriggeredPhpunitErrorEvents(); - } catch (EventFacadeIsSealedException|UnknownSubscriberTypeException) { - } - } - - print Version::getVersionString() . PHP_EOL . PHP_EOL; - - if (!$errored) { - $result = $command->execute(); - - print $result->output(); - - exit($result->shellExitCode()); - } - - assert(isset($resultCollectedFromEvents)); - - print 'There were errors:' . PHP_EOL; - - foreach ($resultCollectedFromEvents->testTriggeredPhpunitErrorEvents() as $events) { - foreach ($events as $event) { - print PHP_EOL . trim($event->message()) . PHP_EOL; - } - } - - exit(Result::EXCEPTION); - } - - /** - * @param list $argv - */ - private function buildCliConfiguration(array $argv): CliConfiguration - { - try { - $cliConfiguration = (new Builder)->fromParameters($argv); - } catch (ArgumentsException $e) { - $this->exitWithErrorMessage($e->getMessage()); - } - - return $cliConfiguration; - } - - private function loadXmlConfiguration(false|string $configurationFile): XmlConfiguration - { - if ($configurationFile === false) { - return DefaultConfiguration::create(); - } - - try { - return (new Loader)->load($configurationFile); - } catch (Throwable $e) { - $this->exitWithErrorMessage($e->getMessage()); - } - } - - private function buildTestSuite(Configuration $configuration): TestSuite - { - try { - return (new TestSuiteBuilder)->build($configuration); - } catch (Exception $e) { - $this->exitWithErrorMessage($e->getMessage()); - } - } - - /** - * @return array{requiresCodeCoverageCollection: bool, replacesOutput: bool, replacesProgressOutput: bool, replacesResultOutput: bool} - */ - private function bootstrapExtensions(Configuration $configuration): array - { - $facade = new ExtensionFacade; - - $extensionBootstrapper = new ExtensionBootstrapper( - $configuration, - $facade, - ); - - foreach ($configuration->extensionBootstrappers() as $bootstrapper) { - $extensionBootstrapper->bootstrap( - $bootstrapper['className'], - $bootstrapper['parameters'], - ); - } - - return [ - 'requiresCodeCoverageCollection' => $facade->requiresCodeCoverageCollection(), - 'replacesOutput' => $facade->replacesOutput(), - 'replacesProgressOutput' => $facade->replacesProgressOutput(), - 'replacesResultOutput' => $facade->replacesResultOutput(), - ]; - } - - private function executeCommandsThatOnlyRequireCliConfiguration(CliConfiguration $cliConfiguration, false|string $configurationFile): void - { - if ($cliConfiguration->generateConfiguration()) { - $this->execute(new GenerateConfigurationCommand); - } - - if ($cliConfiguration->migrateConfiguration()) { - if ($configurationFile === false) { - $this->exitWithErrorMessage('No configuration file found to migrate'); - } - - $this->execute(new MigrateConfigurationCommand(realpath($configurationFile))); - } - - if ($cliConfiguration->hasAtLeastVersion()) { - $this->execute(new AtLeastVersionCommand($cliConfiguration->atLeastVersion())); - } - - if ($cliConfiguration->version()) { - $this->execute(new ShowVersionCommand); - } - - if ($cliConfiguration->checkPhpConfiguration()) { - $this->execute(new CheckPhpConfigurationCommand); - } - - if ($cliConfiguration->checkVersion()) { - $this->execute(new VersionCheckCommand(new PhpDownloader, Version::majorVersionNumber(), Version::id())); - } - - if ($cliConfiguration->help()) { - $this->execute(new ShowHelpCommand(Result::SUCCESS)); - } - } - - private function executeCommandsThatDoNotRequireTheTestSuite(Configuration $configuration, CliConfiguration $cliConfiguration): void - { - if ($cliConfiguration->warmCoverageCache()) { - $this->execute(new WarmCodeCoverageCacheCommand($configuration, CodeCoverageFilterRegistry::instance())); - } - } - - private function executeCommandsThatRequireTheTestSuite(Configuration $configuration, CliConfiguration $cliConfiguration, TestSuite $testSuite): void - { - if ($cliConfiguration->listSuites()) { - $this->execute(new ListTestSuitesCommand($testSuite)); - } - - if ($cliConfiguration->listGroups()) { - $this->execute( - new ListGroupsCommand( - $this->filteredTests( - $configuration, - $testSuite, - ), - ), - true, - ); - } - - if ($cliConfiguration->listTests()) { - $this->execute( - new ListTestsAsTextCommand( - $this->filteredTests( - $configuration, - $testSuite, - ), - ), - true, - ); - } - - if ($cliConfiguration->hasListTestsXml()) { - $this->execute( - new ListTestsAsXmlCommand( - $this->filteredTests( - $configuration, - $testSuite, - ), - $cliConfiguration->listTestsXml(), - ), - true, - ); - } - - if ($cliConfiguration->listTestFiles()) { - $this->execute( - new ListTestFilesCommand( - $this->filteredTests( - $configuration, - $testSuite, - ), - ), - true, - ); - } - } - - private function writeRuntimeInformation(Printer $printer, Configuration $configuration): void - { - $printer->print(Version::getVersionString() . PHP_EOL . PHP_EOL); - - $runtime = 'PHP ' . PHP_VERSION; - - if (CodeCoverage::instance()->isActive()) { - $runtime .= ' with ' . CodeCoverage::instance()->driverNameAndVersion(); - } - - $this->writeMessage($printer, 'Runtime', $runtime); - - if ($configuration->hasConfigurationFile()) { - $this->writeMessage( - $printer, - 'Configuration', - $configuration->configurationFile(), - ); - } - } - - /** - * @param ?list $pharExtensions - */ - private function writePharExtensionInformation(Printer $printer, ?array $pharExtensions): void - { - if ($pharExtensions === null) { - return; - } - - foreach ($pharExtensions as $extension) { - $this->writeMessage( - $printer, - 'Extension', - $extension, - ); - } - } - - private function writeMessage(Printer $printer, string $type, string $message): void - { - $printer->print( - sprintf( - "%-15s%s\n", - $type . ':', - $message, - ), - ); - } - - private function writeRandomSeedInformation(Printer $printer, Configuration $configuration): void - { - if ($configuration->executionOrder() === TestSuiteSorter::ORDER_RANDOMIZED) { - $this->writeMessage( - $printer, - 'Random Seed', - (string) $configuration->randomOrderSeed(), - ); - } - } - - private function registerLogfileWriters(Configuration $configuration): void - { - if ($configuration->hasLogEventsText()) { - if (is_file($configuration->logEventsText())) { - unlink($configuration->logEventsText()); - } - - EventFacade::instance()->registerTracer( - new EventLogger( - $configuration->logEventsText(), - false, - ), - ); - } - - if ($configuration->hasLogEventsVerboseText()) { - if (is_file($configuration->logEventsVerboseText())) { - unlink($configuration->logEventsVerboseText()); - } - - EventFacade::instance()->registerTracer( - new EventLogger( - $configuration->logEventsVerboseText(), - true, - ), - ); - } - - if ($configuration->hasLogfileJunit()) { - try { - new JunitXmlLogger( - OutputFacade::printerFor($configuration->logfileJunit()), - EventFacade::instance(), - ); - } catch (DirectoryDoesNotExistException|InvalidSocketException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot log test results in JUnit XML format to "%s": %s', - $configuration->logfileJunit(), - $e->getMessage(), - ), - ); - } - } - - if ($configuration->hasLogfileOtr()) { - try { - new OtrXmlLogger( - EventFacade::instance(), - $configuration->logfileOtr(), - $configuration->includeGitInformationInOtrLogfile(), - ); - } catch (CannotOpenUriForWritingException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot log test results in Open Test Reporting XML format to "%s": %s', - $configuration->logfileOtr(), - $e->getMessage(), - ), - ); - } - } - - if ($configuration->hasLogfileTeamcity()) { - try { - new TeamCityLogger( - DefaultPrinter::from( - $configuration->logfileTeamcity(), - ), - EventFacade::instance(), - ); - } catch (DirectoryDoesNotExistException|InvalidSocketException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot log test results in TeamCity format to "%s": %s', - $configuration->logfileTeamcity(), - $e->getMessage(), - ), - ); - } - } - } - - private function testDoxResultCollector(Configuration $configuration): ?TestDoxResultCollector - { - if ($configuration->hasLogfileTestdoxHtml() || - $configuration->hasLogfileTestdoxText() || - $configuration->outputIsTestDox()) { - return new TestDoxResultCollector( - EventFacade::instance(), - new IssueFilter($configuration->source()), - ); - } - - return null; - } - - private function initializeTestResultCache(Configuration $configuration): ResultCache - { - if ($configuration->cacheResult()) { - $cache = new DefaultResultCache($configuration->testResultCacheFile()); - - new ResultCacheHandler($cache, EventFacade::instance()); - - return $cache; - } - - return new NullResultCache; - } - - private function configureBaseline(Configuration $configuration): ?BaselineGenerator - { - if ($configuration->hasGenerateBaseline()) { - return new BaselineGenerator( - EventFacade::instance(), - $configuration->source(), - ); - } - - if ($configuration->source()->useBaseline()) { - $baselineFile = $configuration->source()->baseline(); - $baseline = null; - - try { - $baseline = (new Reader)->read($baselineFile); - } catch (CannotLoadBaselineException $e) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning($e->getMessage()); - } - - if ($baseline !== null) { - ErrorHandler::instance()->useBaseline($baseline); - } - } - - return null; - } - - /** - * @codeCoverageIgnore - */ - private function exitWithCrashMessage(Throwable $t): never - { - $message = $t->getMessage(); - - if (trim($message) === '') { - $message = '(no message)'; - } - - printf( - '%s%sAn error occurred inside PHPUnit.%s%sMessage: %s', - PHP_EOL, - PHP_EOL, - PHP_EOL, - PHP_EOL, - $message, - ); - - $first = true; - - if ($t->getPrevious() !== null) { - $t = $t->getPrevious(); - } - - do { - printf( - '%s%s: %s:%d%s%s%s%s', - PHP_EOL, - $first ? 'Location' : 'Caused by', - $t->getFile(), - $t->getLine(), - PHP_EOL, - PHP_EOL, - $t->getTraceAsString(), - PHP_EOL, - ); - - $first = false; - } while ($t = $t->getPrevious()); - - exit(Result::CRASH); - } - - private function exitWithErrorMessage(string $message): never - { - print Version::getVersionString() . PHP_EOL . PHP_EOL . $message . PHP_EOL; - - exit(Result::EXCEPTION); - } - - /** - * @return list - */ - private function filteredTests(Configuration $configuration, TestSuite $suite): array - { - (new TestSuiteFilterProcessor)->process($configuration, $suite); - - return $suite->collect(); - } - - private function configureDeprecationTriggers(Configuration $configuration): void - { - $deprecationTriggers = [ - 'functions' => [], - 'methods' => [], - ]; - - foreach ($configuration->source()->deprecationTriggers()['functions'] as $function) { - if (!function_exists($function)) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Function %s cannot be configured as a deprecation trigger because it is not declared', - $function, - ), - ); - - continue; - } - - $deprecationTriggers['functions'][] = $function; - } - - foreach ($configuration->source()->deprecationTriggers()['methods'] as $method) { - if (!str_contains($method, '::')) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - '%s cannot be configured as a deprecation trigger because it is not in ClassName::methodName format', - $method, - ), - ); - - continue; - } - - [$className, $methodName] = explode('::', $method); - - if (!class_exists($className) || !method_exists($className, $methodName)) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Method %s::%s cannot be configured as a deprecation trigger because it is not declared', - $className, - $methodName, - ), - ); - - continue; - } - - $deprecationTriggers['methods'][] = [ - 'className' => $className, - 'methodName' => $methodName, - ]; - } - - ErrorHandler::instance()->useDeprecationTriggers($deprecationTriggers); - } - - private function preload(): void - { - if (!defined('PHPUNIT_COMPOSER_INSTALL')) { - return; - } - - $classMapFile = dirname(PHPUNIT_COMPOSER_INSTALL) . '/composer/autoload_classmap.php'; - - if (!is_file($classMapFile)) { - return; - } - - foreach (require $classMapFile as $codeUnitName => $sourceCodeFile) { - if (!str_starts_with($codeUnitName, 'PHPUnit\\') && - !str_starts_with($codeUnitName, 'SebastianBergmann\\')) { - continue; - } - - if (str_contains($sourceCodeFile, '/tests/')) { - continue; - } - - require_once $sourceCodeFile; - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command/Command.php deleted file mode 100644 index 4194551e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Command.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Command -{ - public function execute(): Result; -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php deleted file mode 100644 index 7bace86c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use function version_compare; -use PHPUnit\Runner\Version; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class AtLeastVersionCommand implements Command -{ - private string $version; - - public function __construct(string $version) - { - $this->version = $version; - } - - public function execute(): Result - { - if (version_compare(Version::id(), $this->version, '>=')) { - return Result::from(); - } - - return Result::from('', Result::FAILURE); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/CheckPhpConfigurationCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/CheckPhpConfigurationCommand.php deleted file mode 100644 index 7f684cc0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/CheckPhpConfigurationCommand.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const E_ALL; -use const PHP_EOL; -use function extension_loaded; -use function in_array; -use function ini_get; -use function max; -use function sprintf; -use function strlen; -use PHPUnit\Runner\Version; -use PHPUnit\Util\Color; -use SebastianBergmann\Environment\Console; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CheckPhpConfigurationCommand implements Command -{ - private bool $colorize; - - public function __construct() - { - $this->colorize = (new Console)->hasColorSupport(); - } - - public function execute(): Result - { - $lines = []; - $shellExitCode = 0; - - foreach ($this->settings() as $name => $setting) { - foreach ($setting['requiredExtensions'] as $extension) { - if (!extension_loaded($extension)) { - // @codeCoverageIgnoreStart - continue 2; - // @codeCoverageIgnoreEnd - } - } - - $actualValue = ini_get($name); - - if (in_array($actualValue, $setting['expectedValues'], true)) { - $check = $this->ok(); - } else { - $check = $this->notOk($actualValue); - $shellExitCode = 1; - } - - $lines[] = [ - sprintf( - '%s = %s', - $name, - $setting['valueForConfiguration'], - ), - $check, - ]; - } - - $maxLength = 0; - - foreach ($lines as $line) { - $maxLength = max($maxLength, strlen($line[0])); - } - - $buffer = sprintf( - 'Checking whether PHP is configured according to https://docs.phpunit.de/en/%s/installation.html#configuring-php-for-development' . PHP_EOL . PHP_EOL, - Version::series(), - ); - - foreach ($lines as $line) { - $buffer .= sprintf( - '%-' . $maxLength . 's ... %s' . PHP_EOL, - $line[0], - $line[1], - ); - } - - return Result::from($buffer, $shellExitCode); - } - - /** - * @return non-empty-string - */ - private function ok(): string - { - if (!$this->colorize) { - return 'ok'; - } - - // @codeCoverageIgnoreStart - return Color::colorizeTextBox('fg-green, bold', 'ok'); - // @codeCoverageIgnoreEnd - } - - /** - * @return non-empty-string - */ - private function notOk(string $actualValue): string - { - $message = sprintf('not ok (%s)', $actualValue); - - if (!$this->colorize) { - return $message; - } - - // @codeCoverageIgnoreStart - return Color::colorizeTextBox('fg-red, bold', $message); - // @codeCoverageIgnoreEnd - } - - /** - * @return non-empty-array, valueForConfiguration: non-empty-string, requiredExtensions: list}> - */ - private function settings(): array - { - return [ - 'display_errors' => [ - 'expectedValues' => ['1'], - 'valueForConfiguration' => 'On', - 'requiredExtensions' => [], - ], - 'display_startup_errors' => [ - 'expectedValues' => ['1'], - 'valueForConfiguration' => 'On', - 'requiredExtensions' => [], - ], - 'error_reporting' => [ - 'expectedValues' => ['-1', (string) E_ALL], - 'valueForConfiguration' => '-1', - 'requiredExtensions' => [], - ], - 'xdebug.show_exception_trace' => [ - 'expectedValues' => ['0'], - 'valueForConfiguration' => '0', - 'requiredExtensions' => ['xdebug'], - ], - 'zend.assertions' => [ - 'expectedValues' => ['1'], - 'valueForConfiguration' => '1', - 'requiredExtensions' => [], - ], - 'assert.exception' => [ - 'expectedValues' => ['1'], - 'valueForConfiguration' => '1', - 'requiredExtensions' => [], - ], - 'memory_limit' => [ - 'expectedValues' => ['-1'], - 'valueForConfiguration' => '-1', - 'requiredExtensions' => [], - ], - ]; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php deleted file mode 100644 index cb1a9ac9..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php +++ /dev/null @@ -1,122 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use const STDIN; -use function assert; -use function defined; -use function fgets; -use function file_put_contents; -use function getcwd; -use function is_file; -use function sprintf; -use function trim; -use PHPUnit\Runner\Version; -use PHPUnit\TextUI\XmlConfiguration\Generator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GenerateConfigurationCommand implements Command -{ - public function execute(): Result - { - $directory = getcwd(); - - print 'Generating phpunit.xml in ' . $directory . PHP_EOL . PHP_EOL; - print 'Bootstrap script (relative to path shown above; default: vendor/autoload.php): '; - - $bootstrapScript = $this->read(); - - print 'Tests directory (relative to path shown above; default: tests): '; - - $testsDirectory = $this->read(); - - print 'Source directory (relative to path shown above; default: src): '; - - $src = $this->read(); - - print 'Cache directory (relative to path shown above; default: .phpunit.cache): '; - - $cacheDirectory = $this->read(); - - if ($bootstrapScript === '') { - $bootstrapScript = 'vendor/autoload.php'; - } - - if ($testsDirectory === '') { - $testsDirectory = 'tests'; - } - - if ($src === '') { - $src = 'src'; - } - - if ($cacheDirectory === '') { - $cacheDirectory = '.phpunit.cache'; - } - - if (defined('PHPUNIT_COMPOSER_INSTALL') && - is_file($directory . '/vendor/phpunit/phpunit/phpunit.xsd')) { - $schemaLocation = 'vendor/phpunit/phpunit/phpunit.xsd'; - } else { - $schemaLocation = sprintf( - 'https://schema.phpunit.de/%s/phpunit.xsd', - Version::series(), - ); - } - - $generator = new Generator; - - $result = @file_put_contents( - $directory . '/phpunit.xml', - $generator->generateDefaultConfiguration( - $schemaLocation, - $bootstrapScript, - $testsDirectory, - $src, - $cacheDirectory, - ), - ); - - if ($result !== false) { - return Result::from( - sprintf( - PHP_EOL . 'Generated phpunit.xml in %s.' . PHP_EOL . - 'Make sure to exclude the %s directory from version control.' . PHP_EOL, - $directory, - $cacheDirectory, - ), - ); - } - - // @codeCoverageIgnoreStart - return Result::from( - sprintf( - PHP_EOL . 'Could not write phpunit.xml in %s.' . PHP_EOL, - $directory, - ), - Result::EXCEPTION, - ); - // @codeCoverageIgnoreEnd - } - - private function read(): string - { - $buffer = fgets(STDIN); - - assert($buffer !== false); - - return trim($buffer); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php deleted file mode 100644 index 94eb1355..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function count; -use function ksort; -use function sprintf; -use function str_starts_with; -use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ListGroupsCommand implements Command -{ - /** - * @var list - */ - private array $tests; - - /** - * @param list $tests - */ - public function __construct(array $tests) - { - $this->tests = $tests; - } - - public function execute(): Result - { - /** @var array $groups */ - $groups = []; - - foreach ($this->tests as $test) { - if ($test instanceof PhptTestCase) { - $_groups = ['default']; - } else { - $_groups = $test->groups(); - } - - foreach ($_groups as $group) { - if (!isset($groups[$group])) { - $groups[$group] = 1; - } else { - $groups[$group]++; - } - } - } - - ksort($groups); - - $buffer = sprintf( - 'Available test group%s:' . PHP_EOL, - count($groups) > 1 ? 's' : '', - ); - - foreach ($groups as $group => $numberOfTests) { - if (str_starts_with((string) $group, '__phpunit_')) { - continue; - } - - $buffer .= sprintf( - ' - %s (%d test%s)' . PHP_EOL, - (string) $group, - $numberOfTests, - $numberOfTests > 1 ? 's' : '', - ); - } - - return Result::from($buffer); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php deleted file mode 100644 index 6d7f875f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function array_unique; -use function assert; -use function sprintf; -use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use ReflectionClass; -use ReflectionException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ListTestFilesCommand implements Command -{ - /** - * @var list - */ - private array $tests; - - /** - * @param list $tests - */ - public function __construct(array $tests) - { - $this->tests = $tests; - } - - /** - * @throws ReflectionException - */ - public function execute(): Result - { - $buffer = 'Available test files:' . PHP_EOL; - - $results = []; - - foreach ($this->tests as $test) { - if ($test instanceof TestCase) { - $name = (new ReflectionClass($test))->getFileName(); - - assert($name !== false); - - $results[] = $name; - - continue; - } - - $results[] = $test->getName(); - } - - foreach (array_unique($results) as $result) { - $buffer .= sprintf( - ' - %s' . PHP_EOL, - $result, - ); - } - - return Result::from($buffer); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php deleted file mode 100644 index 7f5c3b51..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function assert; -use function count; -use function ksort; -use function sprintf; -use PHPUnit\Framework\TestSuite; -use PHPUnit\TextUI\Configuration\Registry; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ListTestSuitesCommand implements Command -{ - private TestSuite $testSuite; - - public function __construct(TestSuite $testSuite) - { - $this->testSuite = $testSuite; - } - - public function execute(): Result - { - /** @var array $suites */ - $suites = []; - - foreach ($this->testSuite->tests() as $test) { - assert($test instanceof TestSuite); - - $suites[$test->name()] = count($test->collect()); - } - - ksort($suites); - - $buffer = $this->warnAboutConflictingOptions(); - - $buffer .= sprintf( - 'Available test suite%s:' . PHP_EOL, - count($suites) > 1 ? 's' : '', - ); - - foreach ($suites as $suite => $numberOfTests) { - $buffer .= sprintf( - ' - %s (%d test%s)' . PHP_EOL, - $suite, - $numberOfTests, - $numberOfTests > 1 ? 's' : '', - ); - } - - return Result::from($buffer); - } - - private function warnAboutConflictingOptions(): string - { - $buffer = ''; - - $configuration = Registry::get(); - - if ($configuration->hasDefaultTestSuite()) { - $buffer .= 'The defaultTestSuite (XML) and --list-suites (CLI) options cannot be combined, only the default test suite is shown' . PHP_EOL; - } - - if ($configuration->includeTestSuites() !== [] && !$configuration->hasDefaultTestSuite()) { - $buffer .= 'The --testsuite and --list-suites options cannot be combined, --testsuite is ignored' . PHP_EOL; - } - - if ($configuration->hasFilter()) { - $buffer .= 'The --filter and --list-suites options cannot be combined, --filter is ignored' . PHP_EOL; - } - - if ($configuration->hasGroups()) { - $buffer .= 'The --group (CLI) and (XML) options cannot be combined with --list-suites, --group and are ignored' . PHP_EOL; - } - - if ($configuration->hasExcludeGroups()) { - $buffer .= 'The --exclude-group (CLI) and (XML) options cannot be combined with --list-suites, --exclude-group and are ignored' . PHP_EOL; - } - - if ($buffer !== '') { - $buffer .= PHP_EOL; - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php deleted file mode 100644 index c3d71b5d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function count; -use function sprintf; -use function str_replace; -use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ListTestsAsTextCommand implements Command -{ - /** - * @var list - */ - private array $tests; - - /** - * @param list $tests - */ - public function __construct(array $tests) - { - $this->tests = $tests; - } - - public function execute(): Result - { - $buffer = sprintf( - 'Available test%s:' . PHP_EOL, - count($this->tests) > 1 ? 's' : '', - ); - - foreach ($this->tests as $test) { - if ($test instanceof TestCase) { - $name = sprintf( - '%s::%s', - $test::class, - str_replace(' with data set ', '', $test->nameWithDataSet()), - ); - } else { - $name = $test->getName(); - } - - $buffer .= sprintf( - ' - %s' . PHP_EOL, - $name, - ); - } - - return Result::from($buffer); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php deleted file mode 100644 index b3d68014..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function assert; -use function file_put_contents; -use function ksort; -use function sprintf; -use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\Phpt\TestCase as PhptTestCase; -use ReflectionClass; -use XMLWriter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ListTestsAsXmlCommand implements Command -{ - /** - * @var list - */ - private array $tests; - private string $filename; - - /** - * @param list $tests - */ - public function __construct(array $tests, string $filename) - { - $this->tests = $tests; - $this->filename = $filename; - } - - public function execute(): Result - { - $writer = new XMLWriter; - - $writer->openMemory(); - $writer->setIndent(true); - $writer->startDocument(); - - $writer->startElement('testSuite'); - $writer->writeAttribute('xmlns', 'https://xml.phpunit.de/testSuite'); - - $writer->startElement('tests'); - - $currentTestClass = null; - $groups = []; - - foreach ($this->tests as $test) { - if ($test instanceof TestCase) { - foreach ($test->groups() as $group) { - if (!isset($groups[$group])) { - $groups[$group] = []; - } - - $groups[$group][] = $test->valueObjectForEvents()->id(); - } - - if ($test::class !== $currentTestClass) { - if ($currentTestClass !== null) { - $writer->endElement(); - } - - $file = (new ReflectionClass($test))->getFileName(); - - assert($file !== false); - - $writer->startElement('testClass'); - $writer->writeAttribute('name', $test::class); - $writer->writeAttribute('file', $file); - - $currentTestClass = $test::class; - } - - $writer->startElement('testMethod'); - $writer->writeAttribute('id', $test->valueObjectForEvents()->id()); - $writer->writeAttribute('name', $test->valueObjectForEvents()->methodName()); - $writer->endElement(); - - continue; - } - - if ($currentTestClass !== null) { - $writer->endElement(); - - $currentTestClass = null; - } - - $writer->startElement('phpt'); - $writer->writeAttribute('file', $test->getName()); - $writer->endElement(); - } - - if ($currentTestClass !== null) { - $writer->endElement(); - } - - $writer->endElement(); - - ksort($groups); - - $writer->startElement('groups'); - - foreach ($groups as $groupName => $testIds) { - $writer->startElement('group'); - $writer->writeAttribute('name', (string) $groupName); - - foreach ($testIds as $testId) { - $writer->startElement('test'); - $writer->writeAttribute('id', $testId); - $writer->endElement(); - } - - $writer->endElement(); - } - - $writer->endElement(); - $writer->endElement(); - - file_put_contents($this->filename, $writer->outputMemory()); - - return Result::from( - sprintf( - 'Wrote list of tests that would have been run to %s' . PHP_EOL, - $this->filename, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php deleted file mode 100644 index 507ff90f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function copy; -use function file_put_contents; -use function sprintf; -use PHPUnit\TextUI\XmlConfiguration\Migrator; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MigrateConfigurationCommand implements Command -{ - private string $filename; - - public function __construct(string $filename) - { - $this->filename = $filename; - } - - public function execute(): Result - { - try { - $migrated = (new Migrator)->migrate($this->filename); - - copy($this->filename, $this->filename . '.bak'); - - file_put_contents($this->filename, $migrated); - - return Result::from( - sprintf( - 'Created backup: %s.bak%sMigrated configuration: %s%s', - $this->filename, - PHP_EOL, - $this->filename, - PHP_EOL, - ), - ); - } catch (Throwable $t) { - return Result::from( - sprintf( - 'Migration of %s failed:%s%s%s', - $this->filename, - PHP_EOL, - $t->getMessage(), - PHP_EOL, - ), - Result::FAILURE, - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowHelpCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowHelpCommand.php deleted file mode 100644 index 1fd04811..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowHelpCommand.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use PHPUnit\TextUI\Help; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ShowHelpCommand implements Command -{ - private int $shellExitCode; - - public function __construct(int $shellExitCode) - { - $this->shellExitCode = $shellExitCode; - } - - public function execute(): Result - { - return Result::from( - (new Help)->generate(), - $this->shellExitCode, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowVersionCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowVersionCommand.php deleted file mode 100644 index 4455a3d2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/ShowVersionCommand.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ShowVersionCommand implements Command -{ - public function execute(): Result - { - return Result::from(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/VersionCheckCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/VersionCheckCommand.php deleted file mode 100644 index 3e076ebe..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/VersionCheckCommand.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function assert; -use function sprintf; -use function version_compare; -use PHPUnit\Util\Http\Downloader; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class VersionCheckCommand implements Command -{ - private Downloader $downloader; - private int $majorVersionNumber; - private string $versionId; - - public function __construct(Downloader $downloader, int $majorVersionNumber, string $versionId) - { - $this->downloader = $downloader; - $this->majorVersionNumber = $majorVersionNumber; - $this->versionId = $versionId; - } - - public function execute(): Result - { - $latestVersion = $this->downloader->download('https://phar.phpunit.de/latest-version-of/phpunit'); - - assert($latestVersion !== false); - - $latestCompatibleVersion = $this->downloader->download('https://phar.phpunit.de/latest-version-of/phpunit-' . $this->majorVersionNumber); - - $notLatest = version_compare($latestVersion, $this->versionId, '>'); - $notLatestCompatible = false; - - if ($latestCompatibleVersion !== false) { - $notLatestCompatible = version_compare($latestCompatibleVersion, $this->versionId, '>'); - } - - if (!$notLatest && !$notLatestCompatible) { - return Result::from( - 'You are using the latest version of PHPUnit.' . PHP_EOL, - ); - } - - $buffer = 'You are not using the latest version of PHPUnit.' . PHP_EOL; - - if ($notLatestCompatible) { - $buffer .= sprintf( - 'The latest version compatible with PHPUnit %s is PHPUnit %s.' . PHP_EOL, - $this->versionId, - $latestCompatibleVersion, - ); - } - - if ($notLatest) { - $buffer .= sprintf( - 'The latest version is PHPUnit %s.' . PHP_EOL, - $latestVersion, - ); - } - - return Result::from($buffer, Result::FAILURE); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php deleted file mode 100644 index 7d1afafe..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/WarmCodeCoverageCacheCommand.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -use const PHP_EOL; -use function printf; -use PHPUnit\TextUI\Configuration\CodeCoverageFilterRegistry; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\NoCoverageCacheDirectoryException; -use SebastianBergmann\CodeCoverage\StaticAnalysis\CacheWarmer; -use SebastianBergmann\Timer\NoActiveTimerException; -use SebastianBergmann\Timer\Timer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ -final readonly class WarmCodeCoverageCacheCommand implements Command -{ - private Configuration $configuration; - private CodeCoverageFilterRegistry $codeCoverageFilterRegistry; - - public function __construct(Configuration $configuration, CodeCoverageFilterRegistry $codeCoverageFilterRegistry) - { - $this->configuration = $configuration; - $this->codeCoverageFilterRegistry = $codeCoverageFilterRegistry; - } - - /** - * @throws NoActiveTimerException - * @throws NoCoverageCacheDirectoryException - */ - public function execute(): Result - { - if (!$this->configuration->hasCoverageCacheDirectory()) { - return Result::from( - 'Cache for static analysis has not been configured' . PHP_EOL, - Result::FAILURE, - ); - } - - $this->codeCoverageFilterRegistry->init($this->configuration, true); - - if (!$this->codeCoverageFilterRegistry->configured()) { - return Result::from( - 'Filter for code coverage has not been configured' . PHP_EOL, - Result::FAILURE, - ); - } - - $timer = new Timer; - $timer->start(); - - print 'Warming cache for static analysis ... '; - - /** @phpstan-ignore new.internalClass,method.internalClass */ - $statistics = (new CacheWarmer)->warmCache( - $this->configuration->coverageCacheDirectory(), - !$this->configuration->disableCodeCoverageIgnore(), - $this->configuration->ignoreDeprecatedCodeUnitsFromCodeCoverage(), - $this->codeCoverageFilterRegistry->get(), - ); - - printf( - '[%s]%s%s%d file%s processed, %d cache hit%s, %d cache miss%s%s', - $timer->stop()->asString(), - PHP_EOL, - PHP_EOL, - $statistics['cacheHits'] + $statistics['cacheMisses'], - ($statistics['cacheHits'] + $statistics['cacheMisses']) !== 1 ? 's' : '', - $statistics['cacheHits'], - $statistics['cacheHits'] !== 1 ? 's' : '', - $statistics['cacheMisses'], - $statistics['cacheMisses'] !== 1 ? 'es' : '', - PHP_EOL, - ); - - return Result::from(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Result.php b/vendor/phpunit/phpunit/src/TextUI/Command/Result.php deleted file mode 100644 index ae4a3e27..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Result.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Command; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Result -{ - public const int SUCCESS = 0; - public const int FAILURE = 1; - public const int EXCEPTION = 2; - public const int CRASH = 255; - private string $output; - private int $shellExitCode; - - public static function from(string $output = '', int $shellExitCode = self::SUCCESS): self - { - return new self($output, $shellExitCode); - } - - private function __construct(string $output, int $shellExitCode) - { - $this->output = $output; - $this->shellExitCode = $shellExitCode; - } - - public function output(): string - { - return $this->output; - } - - public function shellExitCode(): int - { - return $this->shellExitCode; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/BootstrapLoader.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/BootstrapLoader.php deleted file mode 100644 index f52d6647..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/BootstrapLoader.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use const PHP_EOL; -use function in_array; -use function is_readable; -use function sprintf; -use PHPUnit\Event\Facade as EventFacade; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BootstrapLoader -{ - /** - * @throws BootstrapScriptDoesNotExistException - * @throws BootstrapScriptException - */ - public function handle(Configuration $configuration): void - { - if (!$configuration->hasBootstrap()) { - return; - } - - $this->load($configuration->bootstrap()); - - foreach ($configuration->bootstrapForTestSuite() as $testSuiteName => $bootstrapForTestSuite) { - if ($configuration->includeTestSuites() !== [] && !in_array($testSuiteName, $configuration->includeTestSuites(), true)) { - continue; - } - - if ($configuration->excludeTestSuites() !== [] && in_array($testSuiteName, $configuration->excludeTestSuites(), true)) { - continue; - } - - $this->load($bootstrapForTestSuite); - } - } - - /** - * @param non-empty-string $filename - */ - private function load(string $filename): void - { - if (!is_readable($filename)) { - throw new BootstrapScriptDoesNotExistException($filename); - } - - try { - include_once $filename; - } catch (Throwable $t) { - $message = sprintf( - 'Error in bootstrap script: %s:%s%s%s%s', - $t::class, - PHP_EOL, - $t->getMessage(), - PHP_EOL, - $t->getTraceAsString(), - ); - - while ($t = $t->getPrevious()) { - $message .= sprintf( - '%s%sPrevious error: %s:%s%s%s%s', - PHP_EOL, - PHP_EOL, - $t::class, - PHP_EOL, - $t->getMessage(), - PHP_EOL, - $t->getTraceAsString(), - ); - } - - throw new BootstrapScriptException($message); - } - - EventFacade::emitter()->testRunnerBootstrapFinished($filename); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Builder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Builder.php deleted file mode 100644 index 6f9e81a1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Builder.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use PHPUnit\TextUI\CliArguments\Builder as CliConfigurationBuilder; -use PHPUnit\TextUI\CliArguments\Exception as CliConfigurationException; -use PHPUnit\TextUI\CliArguments\XmlConfigurationFileFinder; -use PHPUnit\TextUI\XmlConfiguration\DefaultConfiguration; -use PHPUnit\TextUI\XmlConfiguration\Exception as XmlConfigurationException; -use PHPUnit\TextUI\XmlConfiguration\Loader; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ -final readonly class Builder -{ - /** - * @param list $argv - * - * @throws ConfigurationCannotBeBuiltException - */ - public function build(array $argv): Configuration - { - try { - $cliConfiguration = (new CliConfigurationBuilder)->fromParameters($argv); - $configurationFile = (new XmlConfigurationFileFinder)->find($cliConfiguration); - $xmlConfiguration = DefaultConfiguration::create(); - - if ($configurationFile !== false) { - $xmlConfiguration = (new Loader)->load($configurationFile); - } - - return Registry::init( - $cliConfiguration, - $xmlConfiguration, - ); - } catch (CliConfigurationException|XmlConfigurationException $e) { - throw new ConfigurationCannotBeBuiltException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php deleted file mode 100644 index c3d0e2a4..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php +++ /dev/null @@ -1,1411 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\CliArguments; - -use const DIRECTORY_SEPARATOR; -use function assert; -use function basename; -use function explode; -use function getcwd; -use function is_file; -use function is_numeric; -use function sprintf; -use function strtolower; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\Util\Filesystem; -use SebastianBergmann\CliParser\Exception as CliParserException; -use SebastianBergmann\CliParser\Parser as CliParser; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Builder -{ - /** - * @var non-empty-list - */ - private const array LONG_OPTIONS = [ - 'atleast-version=', - 'bootstrap=', - 'cache-result', - 'do-not-cache-result', - 'cache-directory=', - 'check-version', - 'check-php-configuration', - 'colors==', - 'columns=', - 'configuration=', - 'warm-coverage-cache', - 'coverage-filter=', - 'coverage-clover=', - 'coverage-cobertura=', - 'coverage-crap4j=', - 'coverage-html=', - 'coverage-openclover=', - 'coverage-php=', - 'coverage-text==', - 'only-summary-for-coverage-text', - 'show-uncovered-for-coverage-text', - 'coverage-xml=', - 'path-coverage', - 'disallow-test-output', - 'display-all-issues', - 'display-incomplete', - 'display-skipped', - 'display-deprecations', - 'display-phpunit-deprecations', - 'display-phpunit-notices', - 'display-errors', - 'display-notices', - 'display-warnings', - 'default-time-limit=', - 'enforce-time-limit', - 'exclude-group=', - 'filter=', - 'exclude-filter=', - 'generate-baseline=', - 'use-baseline=', - 'ignore-baseline', - 'generate-configuration', - 'globals-backup', - 'group=', - 'covers=', - 'uses=', - 'requires-php-extension=', - 'help', - 'resolve-dependencies', - 'ignore-dependencies', - 'include-path=', - 'list-groups', - 'list-suites', - 'list-test-files', - 'list-tests', - 'list-tests-xml=', - 'log-junit=', - 'log-otr=', - 'include-git-information', - 'log-teamcity=', - 'migrate-configuration', - 'no-configuration', - 'no-coverage', - 'no-logging', - 'no-extensions', - 'no-output', - 'no-progress', - 'no-results', - 'order-by=', - 'process-isolation', - 'do-not-report-useless-tests', - 'dont-report-useless-tests', - 'random-order', - 'random-order-seed=', - 'reverse-order', - 'reverse-list', - 'static-backup', - 'stderr', - 'fail-on-all-issues', - 'fail-on-deprecation', - 'fail-on-phpunit-deprecation', - 'fail-on-phpunit-notice', - 'fail-on-phpunit-warning', - 'fail-on-empty-test-suite', - 'fail-on-incomplete', - 'fail-on-notice', - 'fail-on-risky', - 'fail-on-skipped', - 'fail-on-warning', - 'do-not-fail-on-deprecation', - 'do-not-fail-on-phpunit-deprecation', - 'do-not-fail-on-phpunit-notice', - 'do-not-fail-on-phpunit-warning', - 'do-not-fail-on-empty-test-suite', - 'do-not-fail-on-incomplete', - 'do-not-fail-on-notice', - 'do-not-fail-on-risky', - 'do-not-fail-on-skipped', - 'do-not-fail-on-warning', - 'stop-on-defect', - 'stop-on-deprecation==', - 'stop-on-error', - 'stop-on-failure', - 'stop-on-incomplete', - 'stop-on-notice', - 'stop-on-risky', - 'stop-on-skipped', - 'stop-on-warning', - 'strict-coverage', - 'disable-coverage-ignore', - 'strict-global-state', - 'teamcity', - 'testdox', - 'testdox-summary', - 'testdox-html=', - 'testdox-text=', - 'test-suffix=', - 'testsuite=', - 'exclude-testsuite=', - 'log-events-text=', - 'log-events-verbose-text=', - 'version', - 'debug', - 'with-telemetry', - 'extension=', - ]; - - private const string SHORT_OPTIONS = 'd:c:h'; - - /** - * @var array - */ - private array $processed = []; - - /** - * @param list $parameters - * - * @throws Exception - */ - public function fromParameters(array $parameters): Configuration - { - try { - $options = (new CliParser)->parse( - $parameters, - self::SHORT_OPTIONS, - self::LONG_OPTIONS, - ); - } catch (CliParserException $e) { - throw new Exception( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - $atLeastVersion = null; - $backupGlobals = null; - $backupStaticProperties = null; - $beStrictAboutChangesToGlobalState = null; - $bootstrap = null; - $cacheDirectory = null; - $cacheResult = null; - $checkPhpConfiguration = false; - $checkVersion = false; - $colors = null; - $columns = null; - $configuration = null; - $warmCoverageCache = false; - $coverageFilter = null; - $coverageClover = null; - $coverageCobertura = null; - $coverageCrap4J = null; - $coverageHtml = null; - $coverageOpenClover = null; - $coveragePhp = null; - $coverageText = null; - $coverageTextShowUncoveredFiles = null; - $coverageTextShowOnlySummary = null; - $coverageXml = null; - $pathCoverage = null; - $defaultTimeLimit = null; - $disableCodeCoverageIgnore = null; - $disallowTestOutput = null; - $displayAllIssues = null; - $displayIncomplete = null; - $displaySkipped = null; - $displayDeprecations = null; - $displayPhpunitDeprecations = null; - $displayPhpunitNotices = null; - $displayErrors = null; - $displayNotices = null; - $displayWarnings = null; - $enforceTimeLimit = null; - $excludeGroups = null; - $executionOrder = null; - $executionOrderDefects = null; - $failOnAllIssues = null; - $failOnDeprecation = null; - $failOnPhpunitDeprecation = null; - $failOnPhpunitNotice = null; - $failOnPhpunitWarning = null; - $failOnEmptyTestSuite = null; - $failOnIncomplete = null; - $failOnNotice = null; - $failOnRisky = null; - $failOnSkipped = null; - $failOnWarning = null; - $doNotFailOnDeprecation = null; - $doNotFailOnPhpunitDeprecation = null; - $doNotFailOnPhpunitNotice = null; - $doNotFailOnPhpunitWarning = null; - $doNotFailOnEmptyTestSuite = null; - $doNotFailOnIncomplete = null; - $doNotFailOnNotice = null; - $doNotFailOnRisky = null; - $doNotFailOnSkipped = null; - $doNotFailOnWarning = null; - $stopOnDefect = null; - $stopOnDeprecation = null; - $specificDeprecationToStopOn = null; - $stopOnError = null; - $stopOnFailure = null; - $stopOnIncomplete = null; - $stopOnNotice = null; - $stopOnRisky = null; - $stopOnSkipped = null; - $stopOnWarning = null; - $filter = null; - $excludeFilter = null; - $generateBaseline = null; - $useBaseline = null; - $ignoreBaseline = false; - $generateConfiguration = false; - $migrateConfiguration = false; - $groups = null; - $testsCovering = null; - $testsUsing = null; - $testsRequiringPhpExtension = null; - $help = false; - $includePath = null; - $iniSettings = []; - $junitLogfile = null; - $otrLogfile = null; - $includeGitInformation = null; - $listGroups = false; - $listSuites = false; - $listTestFiles = false; - $listTests = false; - $listTestsXml = null; - $noCoverage = null; - $noExtensions = null; - $noOutput = null; - $noProgress = null; - $noResults = null; - $noLogging = null; - $processIsolation = null; - $randomOrderSeed = null; - $reportUselessTests = null; - $resolveDependencies = null; - $reverseList = null; - $stderr = null; - $strictCoverage = null; - $teamcityLogfile = null; - $testdoxHtmlFile = null; - $testdoxTextFile = null; - $testSuffixes = null; - $testSuite = null; - $excludeTestSuite = null; - $useDefaultConfiguration = true; - $version = false; - $logEventsText = null; - $logEventsVerboseText = null; - $printerTeamCity = null; - $printerTestDox = null; - $printerTestDoxSummary = null; - $debug = false; - $withTelemetry = false; - $extensions = []; - - foreach ($options[0] as $option) { - $optionAllowedMultipleTimes = false; - - switch ($option[0]) { - case '--colors': - $colors = \PHPUnit\TextUI\Configuration\Configuration::COLOR_AUTO; - - if ($option[1] !== null) { - $colors = $option[1]; - } - - break; - - case '--bootstrap': - $bootstrap = $option[1]; - - break; - - case '--cache-directory': - $cacheDirectory = $option[1]; - - break; - - case '--cache-result': - $cacheResult = true; - - break; - - case '--do-not-cache-result': - $cacheResult = false; - - break; - - case '--columns': - if (is_numeric($option[1])) { - $columns = (int) $option[1]; - } elseif ($option[1] === 'max') { - $columns = 'max'; - } - - break; - - case 'c': - case '--configuration': - $configuration = $option[1]; - - break; - - case '--warm-coverage-cache': - $warmCoverageCache = true; - - break; - - case '--coverage-clover': - $coverageClover = $option[1]; - - break; - - case '--coverage-cobertura': - $coverageCobertura = $option[1]; - - break; - - case '--coverage-crap4j': - $coverageCrap4J = $option[1]; - - break; - - case '--coverage-html': - $coverageHtml = $option[1]; - - break; - - case '--coverage-php': - $coveragePhp = $option[1]; - - break; - - case '--coverage-openclover': - $coverageOpenClover = $option[1]; - - break; - - case '--coverage-text': - if ($option[1] === null) { - $option[1] = 'php://stdout'; - } - - $coverageText = $option[1]; - - break; - - case '--only-summary-for-coverage-text': - $coverageTextShowOnlySummary = true; - - break; - - case '--show-uncovered-for-coverage-text': - $coverageTextShowUncoveredFiles = true; - - break; - - case '--coverage-xml': - $coverageXml = $option[1]; - - break; - - case '--path-coverage': - $pathCoverage = true; - - break; - - case 'd': - $tmp = explode('=', $option[1]); - - if (isset($tmp[0])) { - assert($tmp[0] !== ''); - - if (isset($tmp[1])) { - assert($tmp[1] !== ''); - - $iniSettings[$tmp[0]] = $tmp[1]; - } else { - $iniSettings[$tmp[0]] = '1'; - } - } - - $optionAllowedMultipleTimes = true; - - break; - - case 'h': - case '--help': - $help = true; - - break; - - case '--filter': - $filter = $option[1]; - - break; - - case '--exclude-filter': - $excludeFilter = $option[1]; - - break; - - case '--testsuite': - $testSuite = $option[1]; - - break; - - case '--exclude-testsuite': - $excludeTestSuite = $option[1]; - - break; - - case '--generate-baseline': - $generateBaseline = $option[1]; - - if (basename($generateBaseline) === $generateBaseline) { - $generateBaseline = getcwd() . DIRECTORY_SEPARATOR . $generateBaseline; - } - - break; - - case '--use-baseline': - $useBaseline = $option[1]; - - if (basename($useBaseline) === $useBaseline && !is_file($useBaseline)) { - $useBaseline = getcwd() . DIRECTORY_SEPARATOR . $useBaseline; - } - - break; - - case '--ignore-baseline': - $ignoreBaseline = true; - - break; - - case '--generate-configuration': - $generateConfiguration = true; - - break; - - case '--migrate-configuration': - $migrateConfiguration = true; - - break; - - case '--group': - if ($groups === null) { - $groups = []; - } - - $groups[] = $option[1]; - - $optionAllowedMultipleTimes = true; - - break; - - case '--exclude-group': - if ($excludeGroups === null) { - $excludeGroups = []; - } - - $excludeGroups[] = $option[1]; - - $optionAllowedMultipleTimes = true; - - break; - - case '--covers': - if ($testsCovering === null) { - $testsCovering = []; - } - - $testsCovering[] = strtolower($option[1]); - - $optionAllowedMultipleTimes = true; - - break; - - case '--uses': - if ($testsUsing === null) { - $testsUsing = []; - } - - $testsUsing[] = strtolower($option[1]); - - $optionAllowedMultipleTimes = true; - - break; - - case '--requires-php-extension': - if ($testsRequiringPhpExtension === null) { - $testsRequiringPhpExtension = []; - } - - $testsRequiringPhpExtension[] = strtolower($option[1]); - - $optionAllowedMultipleTimes = true; - - break; - - case '--test-suffix': - if ($testSuffixes === null) { - $testSuffixes = []; - } - - $testSuffixes[] = $option[1]; - - $optionAllowedMultipleTimes = true; - - break; - - case '--include-path': - $includePath = $option[1]; - - break; - - case '--list-groups': - $listGroups = true; - - break; - - case '--list-suites': - $listSuites = true; - - break; - - case '--list-test-files': - $listTestFiles = true; - - break; - - case '--list-tests': - $listTests = true; - - break; - - case '--list-tests-xml': - $listTestsXml = $option[1]; - - break; - - case '--log-junit': - $junitLogfile = $option[1]; - - break; - - case '--log-otr': - $otrLogfile = $option[1]; - - break; - - case '--include-git-information': - $includeGitInformation = true; - - break; - - case '--log-teamcity': - $teamcityLogfile = $option[1]; - - break; - - case '--order-by': - foreach (explode(',', $option[1]) as $order) { - switch ($order) { - case 'default': - $executionOrder = TestSuiteSorter::ORDER_DEFAULT; - $executionOrderDefects = TestSuiteSorter::ORDER_DEFAULT; - $resolveDependencies = true; - - break; - - case 'defects': - $executionOrderDefects = TestSuiteSorter::ORDER_DEFECTS_FIRST; - - break; - - case 'depends': - $resolveDependencies = true; - - break; - - case 'duration': - $executionOrder = TestSuiteSorter::ORDER_DURATION; - - break; - - case 'no-depends': - $resolveDependencies = false; - - break; - - case 'random': - $executionOrder = TestSuiteSorter::ORDER_RANDOMIZED; - - break; - - case 'reverse': - $executionOrder = TestSuiteSorter::ORDER_REVERSED; - - break; - - case 'size': - $executionOrder = TestSuiteSorter::ORDER_SIZE; - - break; - - default: - throw new Exception( - sprintf( - 'unrecognized --order-by option: %s', - $order, - ), - ); - } - } - - break; - - case '--process-isolation': - $processIsolation = true; - - break; - - case '--stderr': - $stderr = true; - - break; - - case '--fail-on-all-issues': - $failOnAllIssues = true; - - break; - - case '--fail-on-deprecation': - $this->warnWhenOptionsConflict( - $doNotFailOnDeprecation, - '--fail-on-deprecation', - '--do-not-fail-on-deprecation', - ); - - $failOnDeprecation = true; - - break; - - case '--fail-on-phpunit-deprecation': - $this->warnWhenOptionsConflict( - $doNotFailOnPhpunitDeprecation, - '--fail-on-phpunit-deprecation', - '--do-not-fail-on-phpunit-deprecation', - ); - - $failOnPhpunitDeprecation = true; - - break; - - case '--fail-on-phpunit-notice': - $this->warnWhenOptionsConflict( - $doNotFailOnPhpunitNotice, - '--fail-on-phpunit-notice', - '--do-not-fail-on-phpunit-notice', - ); - - $failOnPhpunitNotice = true; - - break; - - case '--fail-on-phpunit-warning': - $this->warnWhenOptionsConflict( - $doNotFailOnPhpunitWarning, - '--fail-on-phpunit-warning', - '--do-not-fail-on-phpunit-warning', - ); - - $failOnPhpunitWarning = true; - - break; - - case '--fail-on-empty-test-suite': - $this->warnWhenOptionsConflict( - $doNotFailOnEmptyTestSuite, - '--fail-on-empty-test-suite', - '--do-not-fail-on-empty-test-suite', - ); - - $failOnEmptyTestSuite = true; - - break; - - case '--fail-on-incomplete': - $this->warnWhenOptionsConflict( - $doNotFailOnIncomplete, - '--fail-on-incomplete', - '--do-not-fail-on-incomplete', - ); - - $failOnIncomplete = true; - - break; - - case '--fail-on-notice': - $this->warnWhenOptionsConflict( - $doNotFailOnNotice, - '--fail-on-notice', - '--do-not-fail-on-notice', - ); - - $failOnNotice = true; - - break; - - case '--fail-on-risky': - $this->warnWhenOptionsConflict( - $doNotFailOnRisky, - '--fail-on-risky', - '--do-not-fail-on-risky', - ); - - $failOnRisky = true; - - break; - - case '--fail-on-skipped': - $this->warnWhenOptionsConflict( - $doNotFailOnSkipped, - '--fail-on-skipped', - '--do-not-fail-on-skipped', - ); - - $failOnSkipped = true; - - break; - - case '--fail-on-warning': - $this->warnWhenOptionsConflict( - $doNotFailOnWarning, - '--fail-on-warning', - '--do-not-fail-on-warning', - ); - - $failOnWarning = true; - - break; - - case '--do-not-fail-on-deprecation': - $this->warnWhenOptionsConflict( - $failOnDeprecation, - '--do-not-fail-on-deprecation', - '--fail-on-deprecation', - ); - - $doNotFailOnDeprecation = true; - - break; - - case '--do-not-fail-on-phpunit-deprecation': - $this->warnWhenOptionsConflict( - $failOnPhpunitDeprecation, - '--do-not-fail-on-phpunit-deprecation', - '--fail-on-phpunit-deprecation', - ); - - $doNotFailOnPhpunitDeprecation = true; - - break; - - case '--do-not-fail-on-phpunit-notice': - $this->warnWhenOptionsConflict( - $failOnPhpunitNotice, - '--do-not-fail-on-phpunit-notice', - '--fail-on-phpunit-notice', - ); - - $doNotFailOnPhpunitNotice = true; - - break; - - case '--do-not-fail-on-phpunit-warning': - $this->warnWhenOptionsConflict( - $failOnPhpunitWarning, - '--do-not-fail-on-phpunit-warning', - '--fail-on-phpunit-warning', - ); - - $doNotFailOnPhpunitWarning = true; - - break; - - case '--do-not-fail-on-empty-test-suite': - $this->warnWhenOptionsConflict( - $failOnEmptyTestSuite, - '--do-not-fail-on-empty-test-suite', - '--fail-on-empty-test-suite', - ); - - $doNotFailOnEmptyTestSuite = true; - - break; - - case '--do-not-fail-on-incomplete': - $this->warnWhenOptionsConflict( - $failOnIncomplete, - '--do-not-fail-on-incomplete', - '--fail-on-incomplete', - ); - - $doNotFailOnIncomplete = true; - - break; - - case '--do-not-fail-on-notice': - $this->warnWhenOptionsConflict( - $failOnNotice, - '--do-not-fail-on-notice', - '--fail-on-notice', - ); - - $doNotFailOnNotice = true; - - break; - - case '--do-not-fail-on-risky': - $this->warnWhenOptionsConflict( - $failOnRisky, - '--do-not-fail-on-risky', - '--fail-on-risky', - ); - - $doNotFailOnRisky = true; - - break; - - case '--do-not-fail-on-skipped': - $this->warnWhenOptionsConflict( - $failOnSkipped, - '--do-not-fail-on-skipped', - '--fail-on-skipped', - ); - - $doNotFailOnSkipped = true; - - break; - - case '--do-not-fail-on-warning': - $this->warnWhenOptionsConflict( - $failOnWarning, - '--do-not-fail-on-warning', - '--fail-on-warning', - ); - - $doNotFailOnWarning = true; - - break; - - case '--stop-on-defect': - $stopOnDefect = true; - - break; - - case '--stop-on-deprecation': - $stopOnDeprecation = true; - - if ($option[1] !== null) { - $specificDeprecationToStopOn = $option[1]; - } - - break; - - case '--stop-on-error': - $stopOnError = true; - - break; - - case '--stop-on-failure': - $stopOnFailure = true; - - break; - - case '--stop-on-incomplete': - $stopOnIncomplete = true; - - break; - - case '--stop-on-notice': - $stopOnNotice = true; - - break; - - case '--stop-on-risky': - $stopOnRisky = true; - - break; - - case '--stop-on-skipped': - $stopOnSkipped = true; - - break; - - case '--stop-on-warning': - $stopOnWarning = true; - - break; - - case '--teamcity': - $printerTeamCity = true; - - break; - - case '--testdox': - $printerTestDox = true; - - break; - - case '--testdox-summary': - $printerTestDoxSummary = true; - - break; - - case '--testdox-html': - $testdoxHtmlFile = $option[1]; - - break; - - case '--testdox-text': - $testdoxTextFile = $option[1]; - - break; - - case '--no-configuration': - $useDefaultConfiguration = false; - - break; - - case '--no-extensions': - $noExtensions = true; - - break; - - case '--no-coverage': - $noCoverage = true; - - break; - - case '--no-logging': - $noLogging = true; - - break; - - case '--no-output': - $noOutput = true; - - break; - - case '--no-progress': - $noProgress = true; - - break; - - case '--no-results': - $noResults = true; - - break; - - case '--globals-backup': - $backupGlobals = true; - - break; - - case '--static-backup': - $backupStaticProperties = true; - - break; - - case '--atleast-version': - $atLeastVersion = $option[1]; - - break; - - case '--version': - $version = true; - - break; - - case '--do-not-report-useless-tests': - $reportUselessTests = false; - - break; - - case '--dont-report-useless-tests': - EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation( - 'Option --dont-report-useless-tests is deprecated, use --do-not-report-useless-tests instead', - ); - - $reportUselessTests = false; - - break; - - case '--strict-coverage': - $strictCoverage = true; - - break; - - case '--disable-coverage-ignore': - $disableCodeCoverageIgnore = true; - - break; - - case '--strict-global-state': - $beStrictAboutChangesToGlobalState = true; - - break; - - case '--disallow-test-output': - $disallowTestOutput = true; - - break; - - case '--display-all-issues': - $displayAllIssues = true; - - break; - - case '--display-incomplete': - $displayIncomplete = true; - - break; - - case '--display-skipped': - $displaySkipped = true; - - break; - - case '--display-deprecations': - $displayDeprecations = true; - - break; - - case '--display-phpunit-deprecations': - $displayPhpunitDeprecations = true; - - break; - - case '--display-phpunit-notices': - $displayPhpunitNotices = true; - - break; - - case '--display-errors': - $displayErrors = true; - - break; - - case '--display-notices': - $displayNotices = true; - - break; - - case '--display-warnings': - $displayWarnings = true; - - break; - - case '--default-time-limit': - $defaultTimeLimit = (int) $option[1]; - - break; - - case '--enforce-time-limit': - $enforceTimeLimit = true; - - break; - - case '--reverse-list': - $reverseList = true; - - break; - - case '--check-php-configuration': - $checkPhpConfiguration = true; - - break; - - case '--check-version': - $checkVersion = true; - - break; - - case '--coverage-filter': - if ($coverageFilter === null) { - $coverageFilter = []; - } - - $coverageFilter[] = $option[1]; - - $optionAllowedMultipleTimes = true; - - break; - - case '--random-order': - $executionOrder = TestSuiteSorter::ORDER_RANDOMIZED; - - break; - - case '--random-order-seed': - $randomOrderSeed = (int) $option[1]; - - break; - - case '--resolve-dependencies': - $resolveDependencies = true; - - break; - - case '--ignore-dependencies': - $resolveDependencies = false; - - break; - - case '--reverse-order': - $executionOrder = TestSuiteSorter::ORDER_REVERSED; - - break; - - case '--log-events-text': - $logEventsText = Filesystem::resolveStreamOrFile($option[1]); - - if ($logEventsText === false) { - throw new Exception( - sprintf( - 'The path "%s" specified for the --log-events-text option could not be resolved', - $option[1], - ), - ); - } - - break; - - case '--log-events-verbose-text': - $logEventsVerboseText = Filesystem::resolveStreamOrFile($option[1]); - - if ($logEventsVerboseText === false) { - throw new Exception( - sprintf( - 'The path "%s" specified for the --log-events-verbose-text option could not be resolved', - $option[1], - ), - ); - } - - break; - - case '--debug': - $debug = true; - - break; - - case '--with-telemetry': - $withTelemetry = true; - - break; - - case '--extension': - $extensions[] = $option[1]; - - $optionAllowedMultipleTimes = true; - - break; - } - - if (!$optionAllowedMultipleTimes) { - $this->markProcessed($option[0]); - } - } - - if ($iniSettings === []) { - $iniSettings = null; - } - - if ($extensions === []) { - $extensions = null; - } - - return new Configuration( - $options[1], - $atLeastVersion, - $backupGlobals, - $backupStaticProperties, - $beStrictAboutChangesToGlobalState, - $bootstrap, - $cacheDirectory, - $cacheResult, - $checkPhpConfiguration, - $checkVersion, - $colors, - $columns, - $configuration, - $coverageClover, - $coverageCobertura, - $coverageCrap4J, - $coverageHtml, - $coverageOpenClover, - $coveragePhp, - $coverageText, - $coverageTextShowUncoveredFiles, - $coverageTextShowOnlySummary, - $coverageXml, - $pathCoverage, - $warmCoverageCache, - $defaultTimeLimit, - $disableCodeCoverageIgnore, - $disallowTestOutput, - $enforceTimeLimit, - $excludeGroups, - $executionOrder, - $executionOrderDefects, - $failOnAllIssues, - $failOnDeprecation, - $failOnPhpunitDeprecation, - $failOnPhpunitNotice, - $failOnPhpunitWarning, - $failOnEmptyTestSuite, - $failOnIncomplete, - $failOnNotice, - $failOnRisky, - $failOnSkipped, - $failOnWarning, - $doNotFailOnDeprecation, - $doNotFailOnPhpunitDeprecation, - $doNotFailOnPhpunitNotice, - $doNotFailOnPhpunitWarning, - $doNotFailOnEmptyTestSuite, - $doNotFailOnIncomplete, - $doNotFailOnNotice, - $doNotFailOnRisky, - $doNotFailOnSkipped, - $doNotFailOnWarning, - $stopOnDefect, - $stopOnDeprecation, - $specificDeprecationToStopOn, - $stopOnError, - $stopOnFailure, - $stopOnIncomplete, - $stopOnNotice, - $stopOnRisky, - $stopOnSkipped, - $stopOnWarning, - $filter, - $excludeFilter, - $generateBaseline, - $useBaseline, - $ignoreBaseline, - $generateConfiguration, - $migrateConfiguration, - $groups, - $testsCovering, - $testsUsing, - $testsRequiringPhpExtension, - $help, - $includePath, - $iniSettings, - $junitLogfile, - $otrLogfile, - $includeGitInformation, - $listGroups, - $listSuites, - $listTestFiles, - $listTests, - $listTestsXml, - $noCoverage, - $noExtensions, - $noOutput, - $noProgress, - $noResults, - $noLogging, - $processIsolation, - $randomOrderSeed, - $reportUselessTests, - $resolveDependencies, - $reverseList, - $stderr, - $strictCoverage, - $teamcityLogfile, - $testdoxHtmlFile, - $testdoxTextFile, - $testSuffixes, - $testSuite, - $excludeTestSuite, - $useDefaultConfiguration, - $displayAllIssues, - $displayIncomplete, - $displaySkipped, - $displayDeprecations, - $displayPhpunitDeprecations, - $displayPhpunitNotices, - $displayErrors, - $displayNotices, - $displayWarnings, - $version, - $coverageFilter, - $logEventsText, - $logEventsVerboseText, - $printerTeamCity, - $printerTestDox, - $printerTestDoxSummary, - $debug, - $withTelemetry, - $extensions, - ); - } - - /** - * @param non-empty-string $option - */ - private function markProcessed(string $option): void - { - if (!isset($this->processed[$option])) { - $this->processed[$option] = 1; - - return; - } - - $this->processed[$option]++; - - if ($this->processed[$option] === 2) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Option %s cannot be used more than once', - $option, - ), - ); - } - } - - /** - * @param non-empty-string $option - */ - private function warnWhenOptionsConflict(?bool $current, string $option, string $opposite): void - { - if ($current === null) { - return; - } - - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Options %s and %s cannot be used together', - $option, - $opposite, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php deleted file mode 100644 index d2d0948f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php +++ /dev/null @@ -1,2585 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\CliArguments; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Configuration -{ - /** - * @var list - */ - private array $arguments; - private ?string $atLeastVersion; - private ?bool $backupGlobals; - private ?bool $backupStaticProperties; - private ?bool $beStrictAboutChangesToGlobalState; - private ?string $bootstrap; - private ?string $cacheDirectory; - private ?bool $cacheResult; - private bool $checkPhpConfiguration; - private bool $checkVersion; - private ?string $colors; - private null|int|string $columns; - private ?string $configurationFile; - - /** - * @var ?non-empty-list - */ - private ?array $coverageFilter; - private ?string $coverageClover; - private ?string $coverageCobertura; - private ?string $coverageCrap4J; - private ?string $coverageHtml; - private ?string $coverageOpenClover; - private ?string $coveragePhp; - private ?string $coverageText; - private ?bool $coverageTextShowUncoveredFiles; - private ?bool $coverageTextShowOnlySummary; - private ?string $coverageXml; - private ?bool $pathCoverage; - private bool $warmCoverageCache; - private ?int $defaultTimeLimit; - private ?bool $disableCodeCoverageIgnore; - private ?bool $disallowTestOutput; - private ?bool $enforceTimeLimit; - - /** - * @var ?non-empty-list - */ - private ?array $excludeGroups; - private ?int $executionOrder; - private ?int $executionOrderDefects; - private ?bool $failOnAllIssues; - private ?bool $failOnDeprecation; - private ?bool $failOnPhpunitDeprecation; - private ?bool $failOnPhpunitNotice; - private ?bool $failOnPhpunitWarning; - private ?bool $failOnEmptyTestSuite; - private ?bool $failOnIncomplete; - private ?bool $failOnNotice; - private ?bool $failOnRisky; - private ?bool $failOnSkipped; - private ?bool $failOnWarning; - private ?bool $doNotFailOnDeprecation; - private ?bool $doNotFailOnPhpunitDeprecation; - private ?bool $doNotFailOnPhpunitNotice; - private ?bool $doNotFailOnPhpunitWarning; - private ?bool $doNotFailOnEmptyTestSuite; - private ?bool $doNotFailOnIncomplete; - private ?bool $doNotFailOnNotice; - private ?bool $doNotFailOnRisky; - private ?bool $doNotFailOnSkipped; - private ?bool $doNotFailOnWarning; - private ?bool $stopOnDefect; - private ?bool $stopOnDeprecation; - private ?string $specificDeprecationToStopOn; - private ?bool $stopOnError; - private ?bool $stopOnFailure; - private ?bool $stopOnIncomplete; - private ?bool $stopOnNotice; - private ?bool $stopOnRisky; - private ?bool $stopOnSkipped; - private ?bool $stopOnWarning; - private ?string $filter; - private ?string $excludeFilter; - private ?string $generateBaseline; - private ?string $useBaseline; - private bool $ignoreBaseline; - private bool $generateConfiguration; - private bool $migrateConfiguration; - - /** - * @var ?non-empty-list - */ - private ?array $groups; - - /** - * @var ?non-empty-list - */ - private ?array $testsCovering; - - /** - * @var ?non-empty-list - */ - private ?array $testsUsing; - - /** - * @var ?non-empty-list - */ - private ?array $testsRequiringPhpExtension; - private bool $help; - private ?string $includePath; - - /** - * @var ?non-empty-array - */ - private ?array $iniSettings; - private ?string $junitLogfile; - private ?string $otrLogfile; - private ?bool $includeGitInformationInOtrLogfile; - private bool $listGroups; - private bool $listSuites; - private bool $listTestFiles; - private bool $listTests; - private ?string $listTestsXml; - private ?bool $noCoverage; - private ?bool $noExtensions; - private ?bool $noOutput; - private ?bool $noProgress; - private ?bool $noResults; - private ?bool $noLogging; - private ?bool $processIsolation; - private ?int $randomOrderSeed; - private ?bool $reportUselessTests; - private ?bool $resolveDependencies; - private ?bool $reverseList; - private ?bool $stderr; - private ?bool $strictCoverage; - private ?string $teamcityLogfile; - private ?bool $teamCityPrinter; - private ?string $testdoxHtmlFile; - private ?string $testdoxTextFile; - private ?bool $testdoxPrinter; - private ?bool $testdoxPrinterSummary; - - /** - * @var ?non-empty-list - */ - private ?array $testSuffixes; - private ?string $testSuite; - private ?string $excludeTestSuite; - private bool $useDefaultConfiguration; - private ?bool $displayDetailsOnAllIssues; - private ?bool $displayDetailsOnIncompleteTests; - private ?bool $displayDetailsOnSkippedTests; - private ?bool $displayDetailsOnTestsThatTriggerDeprecations; - private ?bool $displayDetailsOnPhpunitDeprecations; - private ?bool $displayDetailsOnPhpunitNotices; - private ?bool $displayDetailsOnTestsThatTriggerErrors; - private ?bool $displayDetailsOnTestsThatTriggerNotices; - private ?bool $displayDetailsOnTestsThatTriggerWarnings; - private bool $version; - private ?string $logEventsText; - private ?string $logEventsVerboseText; - private bool $debug; - private bool $withTelemetry; - - /** - * @var ?non-empty-list - */ - private ?array $extensions; - - /** - * @param list $arguments - * @param ?non-empty-list $excludeGroups - * @param ?non-empty-list $groups - * @param ?non-empty-list $testsCovering - * @param ?non-empty-list $testsUsing - * @param ?non-empty-list $testsRequiringPhpExtension - * @param ?non-empty-array $iniSettings - * @param ?non-empty-list $testSuffixes - * @param ?non-empty-list $coverageFilter - * @param ?non-empty-list $extensions - */ - public function __construct(array $arguments, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticProperties, ?bool $beStrictAboutChangesToGlobalState, ?string $bootstrap, ?string $cacheDirectory, ?bool $cacheResult, bool $checkPhpConfiguration, bool $checkVersion, ?string $colors, null|int|string $columns, ?string $configurationFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coverageOpenClover, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, bool $warmCoverageCache, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?bool $failOnAllIssues, ?bool $failOnDeprecation, ?bool $failOnPhpunitDeprecation, ?bool $failOnPhpunitNotice, ?bool $failOnPhpunitWarning, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?bool $doNotFailOnDeprecation, ?bool $doNotFailOnPhpunitDeprecation, ?bool $doNotFailOnPhpunitNotice, ?bool $doNotFailOnPhpunitWarning, ?bool $doNotFailOnEmptyTestSuite, ?bool $doNotFailOnIncomplete, ?bool $doNotFailOnNotice, ?bool $doNotFailOnRisky, ?bool $doNotFailOnSkipped, ?bool $doNotFailOnWarning, ?bool $stopOnDefect, ?bool $stopOnDeprecation, ?string $specificDeprecationToStopOn, ?bool $stopOnError, ?bool $stopOnFailure, ?bool $stopOnIncomplete, ?bool $stopOnNotice, ?bool $stopOnRisky, ?bool $stopOnSkipped, ?bool $stopOnWarning, ?string $filter, ?string $excludeFilter, ?string $generateBaseline, ?string $useBaseline, bool $ignoreBaseline, bool $generateConfiguration, bool $migrateConfiguration, ?array $groups, ?array $testsCovering, ?array $testsUsing, ?array $testsRequiringPhpExtension, bool $help, ?string $includePath, ?array $iniSettings, ?string $junitLogfile, ?string $otrLogfile, ?bool $includeGitInformation, bool $listGroups, bool $listSuites, bool $listTestFiles, bool $listTests, ?string $listTestsXml, ?bool $noCoverage, ?bool $noExtensions, ?bool $noOutput, ?bool $noProgress, ?bool $noResults, ?bool $noLogging, ?bool $processIsolation, ?int $randomOrderSeed, ?bool $reportUselessTests, ?bool $resolveDependencies, ?bool $reverseList, ?bool $stderr, ?bool $strictCoverage, ?string $teamcityLogfile, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?array $testSuffixes, ?string $testSuite, ?string $excludeTestSuite, bool $useDefaultConfiguration, ?bool $displayDetailsOnAllIssues, ?bool $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnPhpunitDeprecations, ?bool $displayDetailsOnPhpunitNotices, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $testdoxPrinter, ?bool $testdoxPrinterSummary, bool $debug, bool $withTelemetry, ?array $extensions) - { - $this->arguments = $arguments; - $this->atLeastVersion = $atLeastVersion; - $this->backupGlobals = $backupGlobals; - $this->backupStaticProperties = $backupStaticProperties; - $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; - $this->bootstrap = $bootstrap; - $this->cacheDirectory = $cacheDirectory; - $this->cacheResult = $cacheResult; - $this->checkPhpConfiguration = $checkPhpConfiguration; - $this->checkVersion = $checkVersion; - $this->colors = $colors; - $this->columns = $columns; - $this->configurationFile = $configurationFile; - $this->coverageFilter = $coverageFilter; - $this->coverageClover = $coverageClover; - $this->coverageCobertura = $coverageCobertura; - $this->coverageCrap4J = $coverageCrap4J; - $this->coverageHtml = $coverageHtml; - $this->coverageOpenClover = $coverageOpenClover; - $this->coveragePhp = $coveragePhp; - $this->coverageText = $coverageText; - $this->coverageTextShowUncoveredFiles = $coverageTextShowUncoveredFiles; - $this->coverageTextShowOnlySummary = $coverageTextShowOnlySummary; - $this->coverageXml = $coverageXml; - $this->pathCoverage = $pathCoverage; - $this->warmCoverageCache = $warmCoverageCache; - $this->defaultTimeLimit = $defaultTimeLimit; - $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; - $this->disallowTestOutput = $disallowTestOutput; - $this->enforceTimeLimit = $enforceTimeLimit; - $this->excludeGroups = $excludeGroups; - $this->executionOrder = $executionOrder; - $this->executionOrderDefects = $executionOrderDefects; - $this->failOnAllIssues = $failOnAllIssues; - $this->failOnDeprecation = $failOnDeprecation; - $this->failOnPhpunitDeprecation = $failOnPhpunitDeprecation; - $this->failOnPhpunitNotice = $failOnPhpunitNotice; - $this->failOnPhpunitWarning = $failOnPhpunitWarning; - $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; - $this->failOnIncomplete = $failOnIncomplete; - $this->failOnNotice = $failOnNotice; - $this->failOnRisky = $failOnRisky; - $this->failOnSkipped = $failOnSkipped; - $this->failOnWarning = $failOnWarning; - $this->doNotFailOnDeprecation = $doNotFailOnDeprecation; - $this->doNotFailOnPhpunitDeprecation = $doNotFailOnPhpunitDeprecation; - $this->doNotFailOnPhpunitNotice = $doNotFailOnPhpunitNotice; - $this->doNotFailOnPhpunitWarning = $doNotFailOnPhpunitWarning; - $this->doNotFailOnEmptyTestSuite = $doNotFailOnEmptyTestSuite; - $this->doNotFailOnIncomplete = $doNotFailOnIncomplete; - $this->doNotFailOnNotice = $doNotFailOnNotice; - $this->doNotFailOnRisky = $doNotFailOnRisky; - $this->doNotFailOnSkipped = $doNotFailOnSkipped; - $this->doNotFailOnWarning = $doNotFailOnWarning; - $this->stopOnDefect = $stopOnDefect; - $this->stopOnDeprecation = $stopOnDeprecation; - $this->specificDeprecationToStopOn = $specificDeprecationToStopOn; - $this->stopOnError = $stopOnError; - $this->stopOnFailure = $stopOnFailure; - $this->stopOnIncomplete = $stopOnIncomplete; - $this->stopOnNotice = $stopOnNotice; - $this->stopOnRisky = $stopOnRisky; - $this->stopOnSkipped = $stopOnSkipped; - $this->stopOnWarning = $stopOnWarning; - $this->filter = $filter; - $this->excludeFilter = $excludeFilter; - $this->generateBaseline = $generateBaseline; - $this->useBaseline = $useBaseline; - $this->ignoreBaseline = $ignoreBaseline; - $this->generateConfiguration = $generateConfiguration; - $this->migrateConfiguration = $migrateConfiguration; - $this->groups = $groups; - $this->testsCovering = $testsCovering; - $this->testsUsing = $testsUsing; - $this->testsRequiringPhpExtension = $testsRequiringPhpExtension; - $this->help = $help; - $this->includePath = $includePath; - $this->iniSettings = $iniSettings; - $this->junitLogfile = $junitLogfile; - $this->otrLogfile = $otrLogfile; - $this->includeGitInformationInOtrLogfile = $includeGitInformation; - $this->listGroups = $listGroups; - $this->listSuites = $listSuites; - $this->listTestFiles = $listTestFiles; - $this->listTests = $listTests; - $this->listTestsXml = $listTestsXml; - $this->noCoverage = $noCoverage; - $this->noExtensions = $noExtensions; - $this->noOutput = $noOutput; - $this->noProgress = $noProgress; - $this->noResults = $noResults; - $this->noLogging = $noLogging; - $this->processIsolation = $processIsolation; - $this->randomOrderSeed = $randomOrderSeed; - $this->reportUselessTests = $reportUselessTests; - $this->resolveDependencies = $resolveDependencies; - $this->reverseList = $reverseList; - $this->stderr = $stderr; - $this->strictCoverage = $strictCoverage; - $this->teamcityLogfile = $teamcityLogfile; - $this->testdoxHtmlFile = $testdoxHtmlFile; - $this->testdoxTextFile = $testdoxTextFile; - $this->testSuffixes = $testSuffixes; - $this->testSuite = $testSuite; - $this->excludeTestSuite = $excludeTestSuite; - $this->useDefaultConfiguration = $useDefaultConfiguration; - $this->displayDetailsOnAllIssues = $displayDetailsOnAllIssues; - $this->displayDetailsOnIncompleteTests = $displayDetailsOnIncompleteTests; - $this->displayDetailsOnSkippedTests = $displayDetailsOnSkippedTests; - $this->displayDetailsOnTestsThatTriggerDeprecations = $displayDetailsOnTestsThatTriggerDeprecations; - $this->displayDetailsOnPhpunitDeprecations = $displayDetailsOnPhpunitDeprecations; - $this->displayDetailsOnPhpunitNotices = $displayDetailsOnPhpunitNotices; - $this->displayDetailsOnTestsThatTriggerErrors = $displayDetailsOnTestsThatTriggerErrors; - $this->displayDetailsOnTestsThatTriggerNotices = $displayDetailsOnTestsThatTriggerNotices; - $this->displayDetailsOnTestsThatTriggerWarnings = $displayDetailsOnTestsThatTriggerWarnings; - $this->version = $version; - $this->logEventsText = $logEventsText; - $this->logEventsVerboseText = $logEventsVerboseText; - $this->teamCityPrinter = $printerTeamCity; - $this->testdoxPrinter = $testdoxPrinter; - $this->testdoxPrinterSummary = $testdoxPrinterSummary; - $this->debug = $debug; - $this->withTelemetry = $withTelemetry; - $this->extensions = $extensions; - } - - /** - * @return list - */ - public function arguments(): array - { - return $this->arguments; - } - - /** - * @phpstan-assert-if-true !null $this->atLeastVersion - */ - public function hasAtLeastVersion(): bool - { - return $this->atLeastVersion !== null; - } - - /** - * @throws Exception - */ - public function atLeastVersion(): string - { - if (!$this->hasAtLeastVersion()) { - throw new Exception; - } - - return $this->atLeastVersion; - } - - /** - * @phpstan-assert-if-true !null $this->backupGlobals - */ - public function hasBackupGlobals(): bool - { - return $this->backupGlobals !== null; - } - - /** - * @throws Exception - */ - public function backupGlobals(): bool - { - if (!$this->hasBackupGlobals()) { - throw new Exception; - } - - return $this->backupGlobals; - } - - /** - * @phpstan-assert-if-true !null $this->backupStaticProperties - */ - public function hasBackupStaticProperties(): bool - { - return $this->backupStaticProperties !== null; - } - - /** - * @throws Exception - */ - public function backupStaticProperties(): bool - { - if (!$this->hasBackupStaticProperties()) { - throw new Exception; - } - - return $this->backupStaticProperties; - } - - /** - * @phpstan-assert-if-true !null $this->beStrictAboutChangesToGlobalState - */ - public function hasBeStrictAboutChangesToGlobalState(): bool - { - return $this->beStrictAboutChangesToGlobalState !== null; - } - - /** - * @throws Exception - */ - public function beStrictAboutChangesToGlobalState(): bool - { - if (!$this->hasBeStrictAboutChangesToGlobalState()) { - throw new Exception; - } - - return $this->beStrictAboutChangesToGlobalState; - } - - /** - * @phpstan-assert-if-true !null $this->bootstrap - */ - public function hasBootstrap(): bool - { - return $this->bootstrap !== null; - } - - /** - * @throws Exception - */ - public function bootstrap(): string - { - if (!$this->hasBootstrap()) { - throw new Exception; - } - - return $this->bootstrap; - } - - /** - * @phpstan-assert-if-true !null $this->cacheDirectory - */ - public function hasCacheDirectory(): bool - { - return $this->cacheDirectory !== null; - } - - /** - * @throws Exception - */ - public function cacheDirectory(): string - { - if (!$this->hasCacheDirectory()) { - throw new Exception; - } - - return $this->cacheDirectory; - } - - /** - * @phpstan-assert-if-true !null $this->cacheResult - */ - public function hasCacheResult(): bool - { - return $this->cacheResult !== null; - } - - /** - * @throws Exception - */ - public function cacheResult(): bool - { - if (!$this->hasCacheResult()) { - throw new Exception; - } - - return $this->cacheResult; - } - - public function checkPhpConfiguration(): bool - { - return $this->checkPhpConfiguration; - } - - public function checkVersion(): bool - { - return $this->checkVersion; - } - - /** - * @phpstan-assert-if-true !null $this->colors - */ - public function hasColors(): bool - { - return $this->colors !== null; - } - - /** - * @throws Exception - */ - public function colors(): string - { - if (!$this->hasColors()) { - throw new Exception; - } - - return $this->colors; - } - - /** - * @phpstan-assert-if-true !null $this->columns - */ - public function hasColumns(): bool - { - return $this->columns !== null; - } - - /** - * @throws Exception - */ - public function columns(): int|string - { - if (!$this->hasColumns()) { - throw new Exception; - } - - return $this->columns; - } - - /** - * @phpstan-assert-if-true !null $this->configurationFile - */ - public function hasConfigurationFile(): bool - { - return $this->configurationFile !== null; - } - - /** - * @throws Exception - */ - public function configurationFile(): string - { - if (!$this->hasConfigurationFile()) { - throw new Exception; - } - - return $this->configurationFile; - } - - /** - * @phpstan-assert-if-true !null $this->coverageFilter - */ - public function hasCoverageFilter(): bool - { - return $this->coverageFilter !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function coverageFilter(): array - { - if (!$this->hasCoverageFilter()) { - throw new Exception; - } - - return $this->coverageFilter; - } - - /** - * @phpstan-assert-if-true !null $this->coverageClover - */ - public function hasCoverageClover(): bool - { - return $this->coverageClover !== null; - } - - /** - * @throws Exception - */ - public function coverageClover(): string - { - if (!$this->hasCoverageClover()) { - throw new Exception; - } - - return $this->coverageClover; - } - - /** - * @phpstan-assert-if-true !null $this->coverageCobertura - */ - public function hasCoverageCobertura(): bool - { - return $this->coverageCobertura !== null; - } - - /** - * @throws Exception - */ - public function coverageCobertura(): string - { - if (!$this->hasCoverageCobertura()) { - throw new Exception; - } - - return $this->coverageCobertura; - } - - /** - * @phpstan-assert-if-true !null $this->coverageCrap4J - */ - public function hasCoverageCrap4J(): bool - { - return $this->coverageCrap4J !== null; - } - - /** - * @throws Exception - */ - public function coverageCrap4J(): string - { - if (!$this->hasCoverageCrap4J()) { - throw new Exception; - } - - return $this->coverageCrap4J; - } - - /** - * @phpstan-assert-if-true !null $this->coverageHtml - */ - public function hasCoverageHtml(): bool - { - return $this->coverageHtml !== null; - } - - /** - * @throws Exception - */ - public function coverageHtml(): string - { - if (!$this->hasCoverageHtml()) { - throw new Exception; - } - - return $this->coverageHtml; - } - - /** - * @phpstan-assert-if-true !null $this->coverageOpenClover - */ - public function hasCoverageOpenClover(): bool - { - return $this->coverageOpenClover !== null; - } - - /** - * @throws Exception - */ - public function coverageOpenClover(): string - { - if (!$this->hasCoverageOpenClover()) { - throw new Exception; - } - - return $this->coverageOpenClover; - } - - /** - * @phpstan-assert-if-true !null $this->coveragePhp - */ - public function hasCoveragePhp(): bool - { - return $this->coveragePhp !== null; - } - - /** - * @throws Exception - */ - public function coveragePhp(): string - { - if (!$this->hasCoveragePhp()) { - throw new Exception; - } - - return $this->coveragePhp; - } - - /** - * @phpstan-assert-if-true !null $this->coverageText - */ - public function hasCoverageText(): bool - { - return $this->coverageText !== null; - } - - /** - * @throws Exception - */ - public function coverageText(): string - { - if (!$this->hasCoverageText()) { - throw new Exception; - } - - return $this->coverageText; - } - - /** - * @phpstan-assert-if-true !null $this->coverageTextShowUncoveredFiles - */ - public function hasCoverageTextShowUncoveredFiles(): bool - { - return $this->coverageTextShowUncoveredFiles !== null; - } - - /** - * @throws Exception - */ - public function coverageTextShowUncoveredFiles(): bool - { - if (!$this->hasCoverageTextShowUncoveredFiles()) { - throw new Exception; - } - - return $this->coverageTextShowUncoveredFiles; - } - - /** - * @phpstan-assert-if-true !null $this->coverageTextShowOnlySummary - */ - public function hasCoverageTextShowOnlySummary(): bool - { - return $this->coverageTextShowOnlySummary !== null; - } - - /** - * @throws Exception - */ - public function coverageTextShowOnlySummary(): bool - { - if (!$this->hasCoverageTextShowOnlySummary()) { - throw new Exception; - } - - return $this->coverageTextShowOnlySummary; - } - - /** - * @phpstan-assert-if-true !null $this->coverageXml - */ - public function hasCoverageXml(): bool - { - return $this->coverageXml !== null; - } - - /** - * @throws Exception - */ - public function coverageXml(): string - { - if (!$this->hasCoverageXml()) { - throw new Exception; - } - - return $this->coverageXml; - } - - /** - * @phpstan-assert-if-true !null $this->pathCoverage - */ - public function hasPathCoverage(): bool - { - return $this->pathCoverage !== null; - } - - /** - * @throws Exception - */ - public function pathCoverage(): bool - { - if (!$this->hasPathCoverage()) { - throw new Exception; - } - - return $this->pathCoverage; - } - - public function warmCoverageCache(): bool - { - return $this->warmCoverageCache; - } - - /** - * @phpstan-assert-if-true !null $this->defaultTimeLimit - */ - public function hasDefaultTimeLimit(): bool - { - return $this->defaultTimeLimit !== null; - } - - /** - * @throws Exception - */ - public function defaultTimeLimit(): int - { - if (!$this->hasDefaultTimeLimit()) { - throw new Exception; - } - - return $this->defaultTimeLimit; - } - - /** - * @phpstan-assert-if-true !null $this->disableCodeCoverageIgnore - */ - public function hasDisableCodeCoverageIgnore(): bool - { - return $this->disableCodeCoverageIgnore !== null; - } - - /** - * @throws Exception - */ - public function disableCodeCoverageIgnore(): bool - { - if (!$this->hasDisableCodeCoverageIgnore()) { - throw new Exception; - } - - return $this->disableCodeCoverageIgnore; - } - - /** - * @phpstan-assert-if-true !null $this->disallowTestOutput - */ - public function hasDisallowTestOutput(): bool - { - return $this->disallowTestOutput !== null; - } - - /** - * @throws Exception - */ - public function disallowTestOutput(): bool - { - if (!$this->hasDisallowTestOutput()) { - throw new Exception; - } - - return $this->disallowTestOutput; - } - - /** - * @phpstan-assert-if-true !null $this->enforceTimeLimit - */ - public function hasEnforceTimeLimit(): bool - { - return $this->enforceTimeLimit !== null; - } - - /** - * @throws Exception - */ - public function enforceTimeLimit(): bool - { - if (!$this->hasEnforceTimeLimit()) { - throw new Exception; - } - - return $this->enforceTimeLimit; - } - - /** - * @phpstan-assert-if-true !null $this->excludeGroups - */ - public function hasExcludeGroups(): bool - { - return $this->excludeGroups !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function excludeGroups(): array - { - if (!$this->hasExcludeGroups()) { - throw new Exception; - } - - return $this->excludeGroups; - } - - /** - * @phpstan-assert-if-true !null $this->executionOrder - */ - public function hasExecutionOrder(): bool - { - return $this->executionOrder !== null; - } - - /** - * @throws Exception - */ - public function executionOrder(): int - { - if (!$this->hasExecutionOrder()) { - throw new Exception; - } - - return $this->executionOrder; - } - - /** - * @phpstan-assert-if-true !null $this->executionOrderDefects - */ - public function hasExecutionOrderDefects(): bool - { - return $this->executionOrderDefects !== null; - } - - /** - * @throws Exception - */ - public function executionOrderDefects(): int - { - if (!$this->hasExecutionOrderDefects()) { - throw new Exception; - } - - return $this->executionOrderDefects; - } - - /** - * @phpstan-assert-if-true !null $this->failOnAllIssues - */ - public function hasFailOnAllIssues(): bool - { - return $this->failOnAllIssues !== null; - } - - /** - * @throws Exception - */ - public function failOnAllIssues(): bool - { - if (!$this->hasFailOnAllIssues()) { - throw new Exception; - } - - return $this->failOnAllIssues; - } - - /** - * @phpstan-assert-if-true !null $this->failOnDeprecation - */ - public function hasFailOnDeprecation(): bool - { - return $this->failOnDeprecation !== null; - } - - /** - * @throws Exception - */ - public function failOnDeprecation(): bool - { - if (!$this->hasFailOnDeprecation()) { - throw new Exception; - } - - return $this->failOnDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->failOnPhpunitDeprecation - */ - public function hasFailOnPhpunitDeprecation(): bool - { - return $this->failOnPhpunitDeprecation !== null; - } - - /** - * @throws Exception - */ - public function failOnPhpunitDeprecation(): bool - { - if (!$this->hasFailOnPhpunitDeprecation()) { - throw new Exception; - } - - return $this->failOnPhpunitDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->failOnPhpunitNotice - */ - public function hasFailOnPhpunitNotice(): bool - { - return $this->failOnPhpunitNotice !== null; - } - - /** - * @throws Exception - */ - public function failOnPhpunitNotice(): bool - { - if (!$this->hasFailOnPhpunitNotice()) { - throw new Exception; - } - - return $this->failOnPhpunitNotice; - } - - /** - * @phpstan-assert-if-true !null $this->failOnPhpunitWarning - */ - public function hasFailOnPhpunitWarning(): bool - { - return $this->failOnPhpunitWarning !== null; - } - - /** - * @throws Exception - */ - public function failOnPhpunitWarning(): bool - { - if (!$this->hasFailOnPhpunitWarning()) { - throw new Exception; - } - - return $this->failOnPhpunitWarning; - } - - /** - * @phpstan-assert-if-true !null $this->failOnEmptyTestSuite - */ - public function hasFailOnEmptyTestSuite(): bool - { - return $this->failOnEmptyTestSuite !== null; - } - - /** - * @throws Exception - */ - public function failOnEmptyTestSuite(): bool - { - if (!$this->hasFailOnEmptyTestSuite()) { - throw new Exception; - } - - return $this->failOnEmptyTestSuite; - } - - /** - * @phpstan-assert-if-true !null $this->failOnIncomplete - */ - public function hasFailOnIncomplete(): bool - { - return $this->failOnIncomplete !== null; - } - - /** - * @throws Exception - */ - public function failOnIncomplete(): bool - { - if (!$this->hasFailOnIncomplete()) { - throw new Exception; - } - - return $this->failOnIncomplete; - } - - /** - * @phpstan-assert-if-true !null $this->failOnNotice - */ - public function hasFailOnNotice(): bool - { - return $this->failOnNotice !== null; - } - - /** - * @throws Exception - */ - public function failOnNotice(): bool - { - if (!$this->hasFailOnNotice()) { - throw new Exception; - } - - return $this->failOnNotice; - } - - /** - * @phpstan-assert-if-true !null $this->failOnRisky - */ - public function hasFailOnRisky(): bool - { - return $this->failOnRisky !== null; - } - - /** - * @throws Exception - */ - public function failOnRisky(): bool - { - if (!$this->hasFailOnRisky()) { - throw new Exception; - } - - return $this->failOnRisky; - } - - /** - * @phpstan-assert-if-true !null $this->failOnSkipped - */ - public function hasFailOnSkipped(): bool - { - return $this->failOnSkipped !== null; - } - - /** - * @throws Exception - */ - public function failOnSkipped(): bool - { - if (!$this->hasFailOnSkipped()) { - throw new Exception; - } - - return $this->failOnSkipped; - } - - /** - * @phpstan-assert-if-true !null $this->failOnWarning - */ - public function hasFailOnWarning(): bool - { - return $this->failOnWarning !== null; - } - - /** - * @throws Exception - */ - public function failOnWarning(): bool - { - if (!$this->hasFailOnWarning()) { - throw new Exception; - } - - return $this->failOnWarning; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnDeprecation - */ - public function hasDoNotFailOnDeprecation(): bool - { - return $this->doNotFailOnDeprecation !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnDeprecation(): bool - { - if (!$this->hasDoNotFailOnDeprecation()) { - throw new Exception; - } - - return $this->doNotFailOnDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnPhpunitDeprecation - */ - public function hasDoNotFailOnPhpunitDeprecation(): bool - { - return $this->doNotFailOnPhpunitDeprecation !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnPhpunitDeprecation(): bool - { - if (!$this->hasDoNotFailOnPhpunitDeprecation()) { - throw new Exception; - } - - return $this->doNotFailOnPhpunitDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnPhpunitNotice - */ - public function hasDoNotFailOnPhpunitNotice(): bool - { - return $this->doNotFailOnPhpunitNotice !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnPhpunitNotice(): bool - { - if (!$this->hasDoNotFailOnPhpunitNotice()) { - throw new Exception; - } - - return $this->doNotFailOnPhpunitNotice; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnPhpunitWarning - */ - public function hasDoNotFailOnPhpunitWarning(): bool - { - return $this->doNotFailOnPhpunitWarning !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnPhpunitWarning(): bool - { - if (!$this->hasDoNotFailOnPhpunitWarning()) { - throw new Exception; - } - - return $this->doNotFailOnPhpunitWarning; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnEmptyTestSuite - */ - public function hasDoNotFailOnEmptyTestSuite(): bool - { - return $this->doNotFailOnEmptyTestSuite !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnEmptyTestSuite(): bool - { - if (!$this->hasDoNotFailOnEmptyTestSuite()) { - throw new Exception; - } - - return $this->doNotFailOnEmptyTestSuite; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnIncomplete - */ - public function hasDoNotFailOnIncomplete(): bool - { - return $this->doNotFailOnIncomplete !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnIncomplete(): bool - { - if (!$this->hasDoNotFailOnIncomplete()) { - throw new Exception; - } - - return $this->doNotFailOnIncomplete; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnNotice - */ - public function hasDoNotFailOnNotice(): bool - { - return $this->doNotFailOnNotice !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnNotice(): bool - { - if (!$this->hasDoNotFailOnNotice()) { - throw new Exception; - } - - return $this->doNotFailOnNotice; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnRisky - */ - public function hasDoNotFailOnRisky(): bool - { - return $this->doNotFailOnRisky !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnRisky(): bool - { - if (!$this->hasDoNotFailOnRisky()) { - throw new Exception; - } - - return $this->doNotFailOnRisky; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnSkipped - */ - public function hasDoNotFailOnSkipped(): bool - { - return $this->doNotFailOnSkipped !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnSkipped(): bool - { - if (!$this->hasDoNotFailOnSkipped()) { - throw new Exception; - } - - return $this->doNotFailOnSkipped; - } - - /** - * @phpstan-assert-if-true !null $this->doNotFailOnWarning - */ - public function hasDoNotFailOnWarning(): bool - { - return $this->doNotFailOnWarning !== null; - } - - /** - * @throws Exception - */ - public function doNotFailOnWarning(): bool - { - if (!$this->hasDoNotFailOnWarning()) { - throw new Exception; - } - - return $this->doNotFailOnWarning; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnDefect - */ - public function hasStopOnDefect(): bool - { - return $this->stopOnDefect !== null; - } - - /** - * @throws Exception - */ - public function stopOnDefect(): bool - { - if (!$this->hasStopOnDefect()) { - throw new Exception; - } - - return $this->stopOnDefect; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnDeprecation - */ - public function hasStopOnDeprecation(): bool - { - return $this->stopOnDeprecation !== null; - } - - /** - * @throws Exception - */ - public function stopOnDeprecation(): bool - { - if (!$this->hasStopOnDeprecation()) { - throw new Exception; - } - - return $this->stopOnDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->specificDeprecationToStopOn - */ - public function hasSpecificDeprecationToStopOn(): bool - { - return $this->specificDeprecationToStopOn !== null; - } - - /** - * @throws Exception - */ - public function specificDeprecationToStopOn(): string - { - if (!$this->hasSpecificDeprecationToStopOn()) { - throw new Exception; - } - - return $this->specificDeprecationToStopOn; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnError - */ - public function hasStopOnError(): bool - { - return $this->stopOnError !== null; - } - - /** - * @throws Exception - */ - public function stopOnError(): bool - { - if (!$this->hasStopOnError()) { - throw new Exception; - } - - return $this->stopOnError; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnFailure - */ - public function hasStopOnFailure(): bool - { - return $this->stopOnFailure !== null; - } - - /** - * @throws Exception - */ - public function stopOnFailure(): bool - { - if (!$this->hasStopOnFailure()) { - throw new Exception; - } - - return $this->stopOnFailure; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnIncomplete - */ - public function hasStopOnIncomplete(): bool - { - return $this->stopOnIncomplete !== null; - } - - /** - * @throws Exception - */ - public function stopOnIncomplete(): bool - { - if (!$this->hasStopOnIncomplete()) { - throw new Exception; - } - - return $this->stopOnIncomplete; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnNotice - */ - public function hasStopOnNotice(): bool - { - return $this->stopOnNotice !== null; - } - - /** - * @throws Exception - */ - public function stopOnNotice(): bool - { - if (!$this->hasStopOnNotice()) { - throw new Exception; - } - - return $this->stopOnNotice; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnRisky - */ - public function hasStopOnRisky(): bool - { - return $this->stopOnRisky !== null; - } - - /** - * @throws Exception - */ - public function stopOnRisky(): bool - { - if (!$this->hasStopOnRisky()) { - throw new Exception; - } - - return $this->stopOnRisky; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnSkipped - */ - public function hasStopOnSkipped(): bool - { - return $this->stopOnSkipped !== null; - } - - /** - * @throws Exception - */ - public function stopOnSkipped(): bool - { - if (!$this->hasStopOnSkipped()) { - throw new Exception; - } - - return $this->stopOnSkipped; - } - - /** - * @phpstan-assert-if-true !null $this->stopOnWarning - */ - public function hasStopOnWarning(): bool - { - return $this->stopOnWarning !== null; - } - - /** - * @throws Exception - */ - public function stopOnWarning(): bool - { - if (!$this->hasStopOnWarning()) { - throw new Exception; - } - - return $this->stopOnWarning; - } - - /** - * @phpstan-assert-if-true !null $this->excludeFilter - */ - public function hasExcludeFilter(): bool - { - return $this->excludeFilter !== null; - } - - /** - * @throws Exception - */ - public function excludeFilter(): string - { - if (!$this->hasExcludeFilter()) { - throw new Exception; - } - - return $this->excludeFilter; - } - - /** - * @phpstan-assert-if-true !null $this->filter - */ - public function hasFilter(): bool - { - return $this->filter !== null; - } - - /** - * @throws Exception - */ - public function filter(): string - { - if (!$this->hasFilter()) { - throw new Exception; - } - - return $this->filter; - } - - /** - * @phpstan-assert-if-true !null $this->generateBaseline - */ - public function hasGenerateBaseline(): bool - { - return $this->generateBaseline !== null; - } - - /** - * @throws Exception - */ - public function generateBaseline(): string - { - if (!$this->hasGenerateBaseline()) { - throw new Exception; - } - - return $this->generateBaseline; - } - - /** - * @phpstan-assert-if-true !null $this->useBaseline - */ - public function hasUseBaseline(): bool - { - return $this->useBaseline !== null; - } - - /** - * @throws Exception - */ - public function useBaseline(): string - { - if (!$this->hasUseBaseline()) { - throw new Exception; - } - - return $this->useBaseline; - } - - public function ignoreBaseline(): bool - { - return $this->ignoreBaseline; - } - - public function generateConfiguration(): bool - { - return $this->generateConfiguration; - } - - public function migrateConfiguration(): bool - { - return $this->migrateConfiguration; - } - - /** - * @phpstan-assert-if-true !null $this->groups - */ - public function hasGroups(): bool - { - return $this->groups !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function groups(): array - { - if (!$this->hasGroups()) { - throw new Exception; - } - - return $this->groups; - } - - /** - * @phpstan-assert-if-true !null $this->testsCovering - */ - public function hasTestsCovering(): bool - { - return $this->testsCovering !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function testsCovering(): array - { - if (!$this->hasTestsCovering()) { - throw new Exception; - } - - return $this->testsCovering; - } - - /** - * @phpstan-assert-if-true !null $this->testsUsing - */ - public function hasTestsUsing(): bool - { - return $this->testsUsing !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function testsUsing(): array - { - if (!$this->hasTestsUsing()) { - throw new Exception; - } - - return $this->testsUsing; - } - - /** - * @phpstan-assert-if-true !null $this->testsRequiringPhpExtension - */ - public function hasTestsRequiringPhpExtension(): bool - { - return $this->testsRequiringPhpExtension !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function testsRequiringPhpExtension(): array - { - if (!$this->hasTestsRequiringPhpExtension()) { - throw new Exception; - } - - return $this->testsRequiringPhpExtension; - } - - public function help(): bool - { - return $this->help; - } - - /** - * @phpstan-assert-if-true !null $this->includePath - */ - public function hasIncludePath(): bool - { - return $this->includePath !== null; - } - - /** - * @throws Exception - */ - public function includePath(): string - { - if (!$this->hasIncludePath()) { - throw new Exception; - } - - return $this->includePath; - } - - /** - * @phpstan-assert-if-true !null $this->iniSettings - */ - public function hasIniSettings(): bool - { - return $this->iniSettings !== null; - } - - /** - * @throws Exception - * - * @return non-empty-array - */ - public function iniSettings(): array - { - if (!$this->hasIniSettings()) { - throw new Exception; - } - - return $this->iniSettings; - } - - /** - * @phpstan-assert-if-true !null $this->junitLogfile - */ - public function hasJunitLogfile(): bool - { - return $this->junitLogfile !== null; - } - - /** - * @throws Exception - */ - public function junitLogfile(): string - { - if (!$this->hasJunitLogfile()) { - throw new Exception; - } - - return $this->junitLogfile; - } - - /** - * @phpstan-assert-if-true !null $this->otrLogfile - */ - public function hasOtrLogfile(): bool - { - return $this->otrLogfile !== null; - } - - /** - * @throws Exception - */ - public function otrLogfile(): string - { - if (!$this->hasOtrLogfile()) { - throw new Exception; - } - - return $this->otrLogfile; - } - - /** - * @phpstan-assert-if-true !null $this->includeGitInformationInOtrLogfile - */ - public function hasIncludeGitInformationInOtrLogfile(): bool - { - return $this->includeGitInformationInOtrLogfile !== null; - } - - /** - * @throws Exception - */ - public function includeGitInformationInOtrLogfile(): bool - { - if (!$this->hasIncludeGitInformationInOtrLogfile()) { - throw new Exception; - } - - return $this->includeGitInformationInOtrLogfile; - } - - public function listGroups(): bool - { - return $this->listGroups; - } - - public function listSuites(): bool - { - return $this->listSuites; - } - - public function listTestFiles(): bool - { - return $this->listTestFiles; - } - - public function listTests(): bool - { - return $this->listTests; - } - - /** - * @phpstan-assert-if-true !null $this->listTestsXml - */ - public function hasListTestsXml(): bool - { - return $this->listTestsXml !== null; - } - - /** - * @throws Exception - */ - public function listTestsXml(): string - { - if (!$this->hasListTestsXml()) { - throw new Exception; - } - - return $this->listTestsXml; - } - - /** - * @phpstan-assert-if-true !null $this->noCoverage - */ - public function hasNoCoverage(): bool - { - return $this->noCoverage !== null; - } - - /** - * @throws Exception - */ - public function noCoverage(): bool - { - if (!$this->hasNoCoverage()) { - throw new Exception; - } - - return $this->noCoverage; - } - - /** - * @phpstan-assert-if-true !null $this->noExtensions - */ - public function hasNoExtensions(): bool - { - return $this->noExtensions !== null; - } - - /** - * @throws Exception - */ - public function noExtensions(): bool - { - if (!$this->hasNoExtensions()) { - throw new Exception; - } - - return $this->noExtensions; - } - - /** - * @phpstan-assert-if-true !null $this->noOutput - */ - public function hasNoOutput(): bool - { - return $this->noOutput !== null; - } - - /** - * @throws Exception - */ - public function noOutput(): bool - { - if ($this->noOutput === null) { - throw new Exception; - } - - return $this->noOutput; - } - - /** - * @phpstan-assert-if-true !null $this->noProgress - */ - public function hasNoProgress(): bool - { - return $this->noProgress !== null; - } - - /** - * @throws Exception - */ - public function noProgress(): bool - { - if ($this->noProgress === null) { - throw new Exception; - } - - return $this->noProgress; - } - - /** - * @phpstan-assert-if-true !null $this->noResults - */ - public function hasNoResults(): bool - { - return $this->noResults !== null; - } - - /** - * @throws Exception - */ - public function noResults(): bool - { - if ($this->noResults === null) { - throw new Exception; - } - - return $this->noResults; - } - - /** - * @phpstan-assert-if-true !null $this->noLogging - */ - public function hasNoLogging(): bool - { - return $this->noLogging !== null; - } - - /** - * @throws Exception - */ - public function noLogging(): bool - { - if (!$this->hasNoLogging()) { - throw new Exception; - } - - return $this->noLogging; - } - - /** - * @phpstan-assert-if-true !null $this->processIsolation - */ - public function hasProcessIsolation(): bool - { - return $this->processIsolation !== null; - } - - /** - * @throws Exception - */ - public function processIsolation(): bool - { - if (!$this->hasProcessIsolation()) { - throw new Exception; - } - - return $this->processIsolation; - } - - /** - * @phpstan-assert-if-true !null $this->randomOrderSeed - */ - public function hasRandomOrderSeed(): bool - { - return $this->randomOrderSeed !== null; - } - - /** - * @throws Exception - */ - public function randomOrderSeed(): int - { - if (!$this->hasRandomOrderSeed()) { - throw new Exception; - } - - return $this->randomOrderSeed; - } - - /** - * @phpstan-assert-if-true !null $this->reportUselessTests - */ - public function hasReportUselessTests(): bool - { - return $this->reportUselessTests !== null; - } - - /** - * @throws Exception - */ - public function reportUselessTests(): bool - { - if (!$this->hasReportUselessTests()) { - throw new Exception; - } - - return $this->reportUselessTests; - } - - /** - * @phpstan-assert-if-true !null $this->resolveDependencies - */ - public function hasResolveDependencies(): bool - { - return $this->resolveDependencies !== null; - } - - /** - * @throws Exception - */ - public function resolveDependencies(): bool - { - if (!$this->hasResolveDependencies()) { - throw new Exception; - } - - return $this->resolveDependencies; - } - - /** - * @phpstan-assert-if-true !null $this->reverseList - */ - public function hasReverseList(): bool - { - return $this->reverseList !== null; - } - - /** - * @throws Exception - */ - public function reverseList(): bool - { - if (!$this->hasReverseList()) { - throw new Exception; - } - - return $this->reverseList; - } - - /** - * @phpstan-assert-if-true !null $this->stderr - */ - public function hasStderr(): bool - { - return $this->stderr !== null; - } - - /** - * @throws Exception - */ - public function stderr(): bool - { - if (!$this->hasStderr()) { - throw new Exception; - } - - return $this->stderr; - } - - /** - * @phpstan-assert-if-true !null $this->strictCoverage - */ - public function hasStrictCoverage(): bool - { - return $this->strictCoverage !== null; - } - - /** - * @throws Exception - */ - public function strictCoverage(): bool - { - if (!$this->hasStrictCoverage()) { - throw new Exception; - } - - return $this->strictCoverage; - } - - /** - * @phpstan-assert-if-true !null $this->teamcityLogfile - */ - public function hasTeamcityLogfile(): bool - { - return $this->teamcityLogfile !== null; - } - - /** - * @throws Exception - */ - public function teamcityLogfile(): string - { - if (!$this->hasTeamcityLogfile()) { - throw new Exception; - } - - return $this->teamcityLogfile; - } - - /** - * @phpstan-assert-if-true !null $this->teamCityPrinter - */ - public function hasTeamCityPrinter(): bool - { - return $this->teamCityPrinter !== null; - } - - /** - * @throws Exception - */ - public function teamCityPrinter(): bool - { - if (!$this->hasTeamCityPrinter()) { - throw new Exception; - } - - return $this->teamCityPrinter; - } - - /** - * @phpstan-assert-if-true !null $this->testdoxHtmlFile - */ - public function hasTestdoxHtmlFile(): bool - { - return $this->testdoxHtmlFile !== null; - } - - /** - * @throws Exception - */ - public function testdoxHtmlFile(): string - { - if (!$this->hasTestdoxHtmlFile()) { - throw new Exception; - } - - return $this->testdoxHtmlFile; - } - - /** - * @phpstan-assert-if-true !null $this->testdoxTextFile - */ - public function hasTestdoxTextFile(): bool - { - return $this->testdoxTextFile !== null; - } - - /** - * @throws Exception - */ - public function testdoxTextFile(): string - { - if (!$this->hasTestdoxTextFile()) { - throw new Exception; - } - - return $this->testdoxTextFile; - } - - /** - * @phpstan-assert-if-true !null $this->testdoxPrinter - */ - public function hasTestDoxPrinter(): bool - { - return $this->testdoxPrinter !== null; - } - - /** - * @throws Exception - */ - public function testdoxPrinter(): bool - { - if (!$this->hasTestDoxPrinter()) { - throw new Exception; - } - - return $this->testdoxPrinter; - } - - /** - * @phpstan-assert-if-true !null $this->testdoxPrinterSummary - */ - public function hasTestDoxPrinterSummary(): bool - { - return $this->testdoxPrinterSummary !== null; - } - - /** - * @throws Exception - */ - public function testdoxPrinterSummary(): bool - { - if (!$this->hasTestDoxPrinterSummary()) { - throw new Exception; - } - - return $this->testdoxPrinterSummary; - } - - /** - * @phpstan-assert-if-true !null $this->testSuffixes - */ - public function hasTestSuffixes(): bool - { - return $this->testSuffixes !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function testSuffixes(): array - { - if (!$this->hasTestSuffixes()) { - throw new Exception; - } - - return $this->testSuffixes; - } - - /** - * @phpstan-assert-if-true !null $this->testSuite - */ - public function hasTestSuite(): bool - { - return $this->testSuite !== null; - } - - /** - * @throws Exception - */ - public function testSuite(): string - { - if (!$this->hasTestSuite()) { - throw new Exception; - } - - return $this->testSuite; - } - - /** - * @phpstan-assert-if-true !null $this->excludeTestSuite - */ - public function hasExcludedTestSuite(): bool - { - return $this->excludeTestSuite !== null; - } - - /** - * @throws Exception - */ - public function excludedTestSuite(): string - { - if (!$this->hasExcludedTestSuite()) { - throw new Exception; - } - - return $this->excludeTestSuite; - } - - public function useDefaultConfiguration(): bool - { - return $this->useDefaultConfiguration; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnAllIssues - */ - public function hasDisplayDetailsOnAllIssues(): bool - { - return $this->displayDetailsOnAllIssues !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnAllIssues(): bool - { - if (!$this->hasDisplayDetailsOnAllIssues()) { - throw new Exception; - } - - return $this->displayDetailsOnAllIssues; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnIncompleteTests - */ - public function hasDisplayDetailsOnIncompleteTests(): bool - { - return $this->displayDetailsOnIncompleteTests !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnIncompleteTests(): bool - { - if (!$this->hasDisplayDetailsOnIncompleteTests()) { - throw new Exception; - } - - return $this->displayDetailsOnIncompleteTests; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnSkippedTests - */ - public function hasDisplayDetailsOnSkippedTests(): bool - { - return $this->displayDetailsOnSkippedTests !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnSkippedTests(): bool - { - if (!$this->hasDisplayDetailsOnSkippedTests()) { - throw new Exception; - } - - return $this->displayDetailsOnSkippedTests; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnTestsThatTriggerDeprecations - */ - public function hasDisplayDetailsOnTestsThatTriggerDeprecations(): bool - { - return $this->displayDetailsOnTestsThatTriggerDeprecations !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnTestsThatTriggerDeprecations(): bool - { - if (!$this->hasDisplayDetailsOnTestsThatTriggerDeprecations()) { - throw new Exception; - } - - return $this->displayDetailsOnTestsThatTriggerDeprecations; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnPhpunitDeprecations - */ - public function hasDisplayDetailsOnPhpunitDeprecations(): bool - { - return $this->displayDetailsOnPhpunitDeprecations !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnPhpunitDeprecations(): bool - { - if (!$this->hasDisplayDetailsOnPhpunitDeprecations()) { - throw new Exception; - } - - return $this->displayDetailsOnPhpunitDeprecations; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnPhpunitNotices - */ - public function hasDisplayDetailsOnPhpunitNotices(): bool - { - return $this->displayDetailsOnPhpunitNotices !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnPhpunitNotices(): bool - { - if (!$this->hasDisplayDetailsOnPhpunitNotices()) { - throw new Exception; - } - - return $this->displayDetailsOnPhpunitNotices; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnTestsThatTriggerErrors - */ - public function hasDisplayDetailsOnTestsThatTriggerErrors(): bool - { - return $this->displayDetailsOnTestsThatTriggerErrors !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnTestsThatTriggerErrors(): bool - { - if (!$this->hasDisplayDetailsOnTestsThatTriggerErrors()) { - throw new Exception; - } - - return $this->displayDetailsOnTestsThatTriggerErrors; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnTestsThatTriggerNotices - */ - public function hasDisplayDetailsOnTestsThatTriggerNotices(): bool - { - return $this->displayDetailsOnTestsThatTriggerNotices !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnTestsThatTriggerNotices(): bool - { - if (!$this->hasDisplayDetailsOnTestsThatTriggerNotices()) { - throw new Exception; - } - - return $this->displayDetailsOnTestsThatTriggerNotices; - } - - /** - * @phpstan-assert-if-true !null $this->displayDetailsOnTestsThatTriggerWarnings - */ - public function hasDisplayDetailsOnTestsThatTriggerWarnings(): bool - { - return $this->displayDetailsOnTestsThatTriggerWarnings !== null; - } - - /** - * @throws Exception - */ - public function displayDetailsOnTestsThatTriggerWarnings(): bool - { - if (!$this->hasDisplayDetailsOnTestsThatTriggerWarnings()) { - throw new Exception; - } - - return $this->displayDetailsOnTestsThatTriggerWarnings; - } - - public function version(): bool - { - return $this->version; - } - - /** - * @phpstan-assert-if-true !null $this->logEventsText - */ - public function hasLogEventsText(): bool - { - return $this->logEventsText !== null; - } - - /** - * @throws Exception - */ - public function logEventsText(): string - { - if (!$this->hasLogEventsText()) { - throw new Exception; - } - - return $this->logEventsText; - } - - /** - * @phpstan-assert-if-true !null $this->logEventsVerboseText - */ - public function hasLogEventsVerboseText(): bool - { - return $this->logEventsVerboseText !== null; - } - - /** - * @throws Exception - */ - public function logEventsVerboseText(): string - { - if (!$this->hasLogEventsVerboseText()) { - throw new Exception; - } - - return $this->logEventsVerboseText; - } - - public function debug(): bool - { - return $this->debug; - } - - public function withTelemetry(): bool - { - return $this->withTelemetry; - } - - /** - * @phpstan-assert-if-true !null $this->extensions - */ - public function hasExtensions(): bool - { - return $this->extensions !== null; - } - - /** - * @throws Exception - * - * @return non-empty-list - */ - public function extensions(): array - { - if (!$this->hasExtensions()) { - throw new Exception; - } - - return $this->extensions; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php deleted file mode 100644 index 0d9a5a00..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\CliArguments; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends RuntimeException implements \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/XmlConfigurationFileFinder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/XmlConfigurationFileFinder.php deleted file mode 100644 index 5357ef63..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/XmlConfigurationFileFinder.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\CliArguments; - -use function getcwd; -use function is_dir; -use function is_file; -use function realpath; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class XmlConfigurationFileFinder -{ - public function find(Configuration $configuration): false|string - { - $useDefaultConfiguration = $configuration->useDefaultConfiguration(); - - if ($configuration->hasConfigurationFile()) { - if (is_dir($configuration->configurationFile())) { - $candidate = $this->configurationFileInDirectory($configuration->configurationFile()); - - if ($candidate !== false) { - return $candidate; - } - - return false; - } - - return $configuration->configurationFile(); - } - - if ($useDefaultConfiguration) { - $directory = getcwd(); - - if ($directory !== false) { - $candidate = $this->configurationFileInDirectory($directory); - - if ($candidate !== false) { - return $candidate; - } - } - } - - return false; - } - - private function configurationFileInDirectory(string $directory): false|string - { - $candidates = [ - $directory . '/phpunit.xml', - $directory . '/phpunit.dist.xml', - $directory . '/phpunit.xml.dist', - ]; - - foreach ($candidates as $candidate) { - if (is_file($candidate)) { - return realpath($candidate); - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/CodeCoverageFilterRegistry.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/CodeCoverageFilterRegistry.php deleted file mode 100644 index 7051d284..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/CodeCoverageFilterRegistry.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function array_keys; -use function assert; -use SebastianBergmann\CodeCoverage\Filter; - -/** - * CLI options and XML configuration are static within a single PHPUnit process. - * It is therefore okay to use a Singleton registry here. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CodeCoverageFilterRegistry -{ - private static ?self $instance = null; - private ?Filter $filter = null; - private bool $configured = false; - - public static function instance(): self - { - if (self::$instance === null) { - self::$instance = new self; - } - - return self::$instance; - } - - /** - * @codeCoverageIgnore - */ - public function get(): Filter - { - assert($this->filter !== null); - - return $this->filter; - } - - /** - * @codeCoverageIgnore - */ - public function init(Configuration $configuration, bool $force = false): void - { - if (!$configuration->hasCoverageReport() && !$force) { - return; - } - - if ($this->configured && !$force) { - return; - } - - $this->filter = new Filter; - - if ($configuration->source()->notEmpty()) { - $this->filter->includeFiles(array_keys((new SourceMapper)->map($configuration->source()))); - - $this->configured = true; - } - } - - /** - * @codeCoverageIgnore - */ - public function configured(): bool - { - return $this->configured; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php deleted file mode 100644 index a6dfe62a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php +++ /dev/null @@ -1,1538 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function explode; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Configuration -{ - public const string COLOR_NEVER = 'never'; - public const string COLOR_AUTO = 'auto'; - public const string COLOR_ALWAYS = 'always'; - public const string COLOR_DEFAULT = self::COLOR_NEVER; - - /** - * @var list - */ - private array $cliArguments; - private ?string $configurationFile; - private ?string $bootstrap; - - /** - * @var array - */ - private array $bootstrapForTestSuite; - private bool $cacheResult; - private ?string $cacheDirectory; - private ?string $coverageCacheDirectory; - private Source $source; - private bool $pathCoverage; - private ?string $coverageClover; - private ?string $coverageCobertura; - private ?string $coverageCrap4j; - private int $coverageCrap4jThreshold; - private ?string $coverageHtml; - private int $coverageHtmlLowUpperBound; - private int $coverageHtmlHighLowerBound; - private string $coverageHtmlColorSuccessLow; - private string $coverageHtmlColorSuccessMedium; - private string $coverageHtmlColorSuccessHigh; - private string $coverageHtmlColorWarning; - private string $coverageHtmlColorDanger; - private ?string $coverageHtmlCustomCssFile; - private ?string $coverageOpenClover; - private ?string $coveragePhp; - private ?string $coverageText; - private bool $coverageTextShowUncoveredFiles; - private bool $coverageTextShowOnlySummary; - private ?string $coverageXml; - private string $testResultCacheFile; - private bool $ignoreDeprecatedCodeUnitsFromCodeCoverage; - private bool $disableCodeCoverageIgnore; - private bool $failOnAllIssues; - private bool $failOnDeprecation; - private bool $failOnPhpunitDeprecation; - private bool $failOnPhpunitNotice; - private bool $failOnPhpunitWarning; - private bool $failOnEmptyTestSuite; - private bool $failOnIncomplete; - private bool $failOnNotice; - private bool $failOnRisky; - private bool $failOnSkipped; - private bool $failOnWarning; - private bool $doNotFailOnDeprecation; - private bool $doNotFailOnPhpunitDeprecation; - private bool $doNotFailOnPhpunitNotice; - private bool $doNotFailOnPhpunitWarning; - private bool $doNotFailOnEmptyTestSuite; - private bool $doNotFailOnIncomplete; - private bool $doNotFailOnNotice; - private bool $doNotFailOnRisky; - private bool $doNotFailOnSkipped; - private bool $doNotFailOnWarning; - private bool $stopOnDefect; - private bool $stopOnDeprecation; - private ?string $specificDeprecationToStopOn; - private bool $stopOnError; - private bool $stopOnFailure; - private bool $stopOnIncomplete; - private bool $stopOnNotice; - private bool $stopOnRisky; - private bool $stopOnSkipped; - private bool $stopOnWarning; - private bool $outputToStandardErrorStream; - private int $columns; - private bool $noExtensions; - - /** - * @var ?non-empty-string - */ - private ?string $pharExtensionDirectory; - - /** - * @var list}> - */ - private array $extensionBootstrappers; - private bool $backupGlobals; - private bool $backupStaticProperties; - private bool $beStrictAboutChangesToGlobalState; - private bool $colors; - private bool $processIsolation; - private bool $enforceTimeLimit; - private int $defaultTimeLimit; - private int $timeoutForSmallTests; - private int $timeoutForMediumTests; - private int $timeoutForLargeTests; - private bool $reportUselessTests; - private bool $strictCoverage; - private bool $disallowTestOutput; - private bool $displayDetailsOnAllIssues; - private bool $displayDetailsOnIncompleteTests; - private bool $displayDetailsOnSkippedTests; - private bool $displayDetailsOnTestsThatTriggerDeprecations; - private bool $displayDetailsOnPhpunitDeprecations; - private bool $displayDetailsOnPhpunitNotices; - private bool $displayDetailsOnTestsThatTriggerErrors; - private bool $displayDetailsOnTestsThatTriggerNotices; - private bool $displayDetailsOnTestsThatTriggerWarnings; - private bool $reverseDefectList; - private bool $requireCoverageMetadata; - private bool $noProgress; - private bool $noResults; - private bool $noOutput; - private int $executionOrder; - private int $executionOrderDefects; - private bool $resolveDependencies; - private ?string $logfileTeamcity; - private ?string $logfileJunit; - private ?string $logfileOtr; - private bool $includeGitInformationInOtrLogfile; - private ?string $logfileTestdoxHtml; - private ?string $logfileTestdoxText; - private ?string $logEventsText; - private ?string $logEventsVerboseText; - - /** - * @var ?non-empty-list - */ - private ?array $testsCovering; - - /** - * @var ?non-empty-list - */ - private ?array $testsUsing; - - /** - * @var ?non-empty-list - */ - private ?array $testsRequiringPhpExtension; - private bool $teamCityOutput; - private bool $testDoxOutput; - private bool $testDoxOutputSummary; - private ?string $filter; - private ?string $excludeFilter; - - /** - * @var list - */ - private array $groups; - - /** - * @var list - */ - private array $excludeGroups; - private int $randomOrderSeed; - private bool $includeUncoveredFiles; - private TestSuiteCollection $testSuite; - private string $includeTestSuite; - private string $excludeTestSuite; - private ?string $defaultTestSuite; - - /** - * @var non-empty-list - */ - private array $testSuffixes; - private Php $php; - private bool $controlGarbageCollector; - private int $numberOfTestsBeforeGarbageCollection; - - /** - * @var null|non-empty-string - */ - private ?string $generateBaseline; - private bool $debug; - private bool $withTelemetry; - - /** - * @var non-negative-int - */ - private int $shortenArraysForExportThreshold; - - /** - * @param list $cliArguments - * @param array $bootstrapForTestSuite - * @param ?non-empty-string $pharExtensionDirectory - * @param list}> $extensionBootstrappers - * @param ?non-empty-list $testsCovering - * @param ?non-empty-list $testsUsing - * @param ?non-empty-list $testsRequiringPhpExtension - * @param list $groups - * @param list $excludeGroups - * @param non-empty-list $testSuffixes - * @param null|non-empty-string $generateBaseline - * @param non-negative-int $shortenArraysForExportThreshold - */ - public function __construct(array $cliArguments, ?string $configurationFile, ?string $bootstrap, array $bootstrapForTestSuite, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, Source $source, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coverageOpenClover, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnAllIssues, bool $failOnDeprecation, bool $failOnPhpunitDeprecation, bool $failOnPhpunitNotice, bool $failOnPhpunitWarning, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $doNotFailOnDeprecation, bool $doNotFailOnPhpunitDeprecation, bool $doNotFailOnPhpunitNotice, bool $doNotFailOnPhpunitWarning, bool $doNotFailOnEmptyTestSuite, bool $doNotFailOnIncomplete, bool $doNotFailOnNotice, bool $doNotFailOnRisky, bool $doNotFailOnSkipped, bool $doNotFailOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, ?string $specificDeprecationToStopOn, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnAllIssues, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnPhpunitDeprecations, bool $displayDetailsOnPhpunitNotices, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileOtr, bool $includeGitInformationInOtrLogfile, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, bool $testDoxOutputSummary, ?array $testsCovering, ?array $testsUsing, ?array $testsRequiringPhpExtension, ?string $filter, ?string $excludeFilter, array $groups, array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, ?string $generateBaseline, bool $debug, bool $withTelemetry, int $shortenArraysForExportThreshold) - { - $this->cliArguments = $cliArguments; - $this->configurationFile = $configurationFile; - $this->bootstrap = $bootstrap; - $this->bootstrapForTestSuite = $bootstrapForTestSuite; - $this->cacheResult = $cacheResult; - $this->cacheDirectory = $cacheDirectory; - $this->coverageCacheDirectory = $coverageCacheDirectory; - $this->source = $source; - $this->testResultCacheFile = $testResultCacheFile; - $this->coverageClover = $coverageClover; - $this->coverageCobertura = $coverageCobertura; - $this->coverageCrap4j = $coverageCrap4j; - $this->coverageCrap4jThreshold = $coverageCrap4jThreshold; - $this->coverageHtml = $coverageHtml; - $this->coverageHtmlLowUpperBound = $coverageHtmlLowUpperBound; - $this->coverageHtmlHighLowerBound = $coverageHtmlHighLowerBound; - $this->coverageHtmlColorSuccessLow = $coverageHtmlColorSuccessLow; - $this->coverageHtmlColorSuccessMedium = $coverageHtmlColorSuccessMedium; - $this->coverageHtmlColorSuccessHigh = $coverageHtmlColorSuccessHigh; - $this->coverageHtmlColorWarning = $coverageHtmlColorWarning; - $this->coverageHtmlColorDanger = $coverageHtmlColorDanger; - $this->coverageHtmlCustomCssFile = $coverageHtmlCustomCssFile; - $this->coverageOpenClover = $coverageOpenClover; - $this->coveragePhp = $coveragePhp; - $this->coverageText = $coverageText; - $this->coverageTextShowUncoveredFiles = $coverageTextShowUncoveredFiles; - $this->coverageTextShowOnlySummary = $coverageTextShowOnlySummary; - $this->coverageXml = $coverageXml; - $this->pathCoverage = $pathCoverage; - $this->ignoreDeprecatedCodeUnitsFromCodeCoverage = $ignoreDeprecatedCodeUnitsFromCodeCoverage; - $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; - $this->failOnAllIssues = $failOnAllIssues; - $this->failOnDeprecation = $failOnDeprecation; - $this->failOnPhpunitDeprecation = $failOnPhpunitDeprecation; - $this->failOnPhpunitNotice = $failOnPhpunitNotice; - $this->failOnPhpunitWarning = $failOnPhpunitWarning; - $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; - $this->failOnIncomplete = $failOnIncomplete; - $this->failOnNotice = $failOnNotice; - $this->failOnRisky = $failOnRisky; - $this->failOnSkipped = $failOnSkipped; - $this->failOnWarning = $failOnWarning; - $this->doNotFailOnDeprecation = $doNotFailOnDeprecation; - $this->doNotFailOnPhpunitDeprecation = $doNotFailOnPhpunitDeprecation; - $this->doNotFailOnPhpunitNotice = $doNotFailOnPhpunitNotice; - $this->doNotFailOnPhpunitWarning = $doNotFailOnPhpunitWarning; - $this->doNotFailOnEmptyTestSuite = $doNotFailOnEmptyTestSuite; - $this->doNotFailOnIncomplete = $doNotFailOnIncomplete; - $this->doNotFailOnNotice = $doNotFailOnNotice; - $this->doNotFailOnRisky = $doNotFailOnRisky; - $this->doNotFailOnSkipped = $doNotFailOnSkipped; - $this->doNotFailOnWarning = $doNotFailOnWarning; - $this->stopOnDefect = $stopOnDefect; - $this->stopOnDeprecation = $stopOnDeprecation; - $this->specificDeprecationToStopOn = $specificDeprecationToStopOn; - $this->stopOnError = $stopOnError; - $this->stopOnFailure = $stopOnFailure; - $this->stopOnIncomplete = $stopOnIncomplete; - $this->stopOnNotice = $stopOnNotice; - $this->stopOnRisky = $stopOnRisky; - $this->stopOnSkipped = $stopOnSkipped; - $this->stopOnWarning = $stopOnWarning; - $this->outputToStandardErrorStream = $outputToStandardErrorStream; - $this->columns = $columns; - $this->noExtensions = $noExtensions; - $this->pharExtensionDirectory = $pharExtensionDirectory; - $this->extensionBootstrappers = $extensionBootstrappers; - $this->backupGlobals = $backupGlobals; - $this->backupStaticProperties = $backupStaticProperties; - $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; - $this->colors = $colors; - $this->processIsolation = $processIsolation; - $this->enforceTimeLimit = $enforceTimeLimit; - $this->defaultTimeLimit = $defaultTimeLimit; - $this->timeoutForSmallTests = $timeoutForSmallTests; - $this->timeoutForMediumTests = $timeoutForMediumTests; - $this->timeoutForLargeTests = $timeoutForLargeTests; - $this->reportUselessTests = $reportUselessTests; - $this->strictCoverage = $strictCoverage; - $this->disallowTestOutput = $disallowTestOutput; - $this->displayDetailsOnAllIssues = $displayDetailsOnAllIssues; - $this->displayDetailsOnIncompleteTests = $displayDetailsOnIncompleteTests; - $this->displayDetailsOnSkippedTests = $displayDetailsOnSkippedTests; - $this->displayDetailsOnTestsThatTriggerDeprecations = $displayDetailsOnTestsThatTriggerDeprecations; - $this->displayDetailsOnPhpunitDeprecations = $displayDetailsOnPhpunitDeprecations; - $this->displayDetailsOnPhpunitNotices = $displayDetailsOnPhpunitNotices; - $this->displayDetailsOnTestsThatTriggerErrors = $displayDetailsOnTestsThatTriggerErrors; - $this->displayDetailsOnTestsThatTriggerNotices = $displayDetailsOnTestsThatTriggerNotices; - $this->displayDetailsOnTestsThatTriggerWarnings = $displayDetailsOnTestsThatTriggerWarnings; - $this->reverseDefectList = $reverseDefectList; - $this->requireCoverageMetadata = $requireCoverageMetadata; - $this->noProgress = $noProgress; - $this->noResults = $noResults; - $this->noOutput = $noOutput; - $this->executionOrder = $executionOrder; - $this->executionOrderDefects = $executionOrderDefects; - $this->resolveDependencies = $resolveDependencies; - $this->logfileTeamcity = $logfileTeamcity; - $this->logfileJunit = $logfileJunit; - $this->logfileOtr = $logfileOtr; - $this->includeGitInformationInOtrLogfile = $includeGitInformationInOtrLogfile; - $this->logfileTestdoxHtml = $logfileTestdoxHtml; - $this->logfileTestdoxText = $logfileTestdoxText; - $this->logEventsText = $logEventsText; - $this->logEventsVerboseText = $logEventsVerboseText; - $this->teamCityOutput = $teamCityOutput; - $this->testDoxOutput = $testDoxOutput; - $this->testDoxOutputSummary = $testDoxOutputSummary; - $this->testsCovering = $testsCovering; - $this->testsUsing = $testsUsing; - $this->testsRequiringPhpExtension = $testsRequiringPhpExtension; - $this->filter = $filter; - $this->excludeFilter = $excludeFilter; - $this->groups = $groups; - $this->excludeGroups = $excludeGroups; - $this->randomOrderSeed = $randomOrderSeed; - $this->includeUncoveredFiles = $includeUncoveredFiles; - $this->testSuite = $testSuite; - $this->includeTestSuite = $includeTestSuite; - $this->excludeTestSuite = $excludeTestSuite; - $this->defaultTestSuite = $defaultTestSuite; - $this->testSuffixes = $testSuffixes; - $this->php = $php; - $this->controlGarbageCollector = $controlGarbageCollector; - $this->numberOfTestsBeforeGarbageCollection = $numberOfTestsBeforeGarbageCollection; - $this->generateBaseline = $generateBaseline; - $this->debug = $debug; - $this->withTelemetry = $withTelemetry; - $this->shortenArraysForExportThreshold = $shortenArraysForExportThreshold; - } - - /** - * @phpstan-assert-if-true !empty $this->cliArguments - */ - public function hasCliArguments(): bool - { - return $this->cliArguments !== []; - } - - /** - * @return list - */ - public function cliArguments(): array - { - return $this->cliArguments; - } - - /** - * @phpstan-assert-if-true !null $this->configurationFile - */ - public function hasConfigurationFile(): bool - { - return $this->configurationFile !== null; - } - - /** - * @throws NoConfigurationFileException - */ - public function configurationFile(): string - { - if (!$this->hasConfigurationFile()) { - throw new NoConfigurationFileException; - } - - return $this->configurationFile; - } - - /** - * @phpstan-assert-if-true !null $this->bootstrap - */ - public function hasBootstrap(): bool - { - return $this->bootstrap !== null; - } - - /** - * @throws NoBootstrapException - */ - public function bootstrap(): string - { - if (!$this->hasBootstrap()) { - throw new NoBootstrapException; - } - - return $this->bootstrap; - } - - /** - * @return array - */ - public function bootstrapForTestSuite(): array - { - return $this->bootstrapForTestSuite; - } - - public function cacheResult(): bool - { - return $this->cacheResult; - } - - /** - * @phpstan-assert-if-true !null $this->cacheDirectory - */ - public function hasCacheDirectory(): bool - { - return $this->cacheDirectory !== null; - } - - /** - * @throws NoCacheDirectoryException - */ - public function cacheDirectory(): string - { - if (!$this->hasCacheDirectory()) { - throw new NoCacheDirectoryException; - } - - return $this->cacheDirectory; - } - - /** - * @phpstan-assert-if-true !null $this->coverageCacheDirectory - */ - public function hasCoverageCacheDirectory(): bool - { - return $this->coverageCacheDirectory !== null; - } - - /** - * @throws NoCoverageCacheDirectoryException - */ - public function coverageCacheDirectory(): string - { - if (!$this->hasCoverageCacheDirectory()) { - throw new NoCoverageCacheDirectoryException; - } - - return $this->coverageCacheDirectory; - } - - public function source(): Source - { - return $this->source; - } - - public function testResultCacheFile(): string - { - return $this->testResultCacheFile; - } - - public function ignoreDeprecatedCodeUnitsFromCodeCoverage(): bool - { - return $this->ignoreDeprecatedCodeUnitsFromCodeCoverage; - } - - public function disableCodeCoverageIgnore(): bool - { - return $this->disableCodeCoverageIgnore; - } - - public function pathCoverage(): bool - { - return $this->pathCoverage; - } - - public function hasCoverageReport(): bool - { - return $this->hasCoverageClover() || - $this->hasCoverageCobertura() || - $this->hasCoverageCrap4j() || - $this->hasCoverageHtml() || - $this->hasCoverageOpenClover() || - $this->hasCoveragePhp() || - $this->hasCoverageText() || - $this->hasCoverageXml(); - } - - /** - * @phpstan-assert-if-true !null $this->coverageClover - */ - public function hasCoverageClover(): bool - { - return $this->coverageClover !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageClover(): string - { - if (!$this->hasCoverageClover()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageClover; - } - - /** - * @phpstan-assert-if-true !null $this->coverageCobertura - */ - public function hasCoverageCobertura(): bool - { - return $this->coverageCobertura !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageCobertura(): string - { - if (!$this->hasCoverageCobertura()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageCobertura; - } - - /** - * @phpstan-assert-if-true !null $this->coverageCrap4j - */ - public function hasCoverageCrap4j(): bool - { - return $this->coverageCrap4j !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageCrap4j(): string - { - if (!$this->hasCoverageCrap4j()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageCrap4j; - } - - public function coverageCrap4jThreshold(): int - { - return $this->coverageCrap4jThreshold; - } - - /** - * @phpstan-assert-if-true !null $this->coverageHtml - */ - public function hasCoverageHtml(): bool - { - return $this->coverageHtml !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageHtml(): string - { - if (!$this->hasCoverageHtml()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageHtml; - } - - public function coverageHtmlLowUpperBound(): int - { - return $this->coverageHtmlLowUpperBound; - } - - public function coverageHtmlHighLowerBound(): int - { - return $this->coverageHtmlHighLowerBound; - } - - public function coverageHtmlColorSuccessLow(): string - { - return $this->coverageHtmlColorSuccessLow; - } - - public function coverageHtmlColorSuccessMedium(): string - { - return $this->coverageHtmlColorSuccessMedium; - } - - public function coverageHtmlColorSuccessHigh(): string - { - return $this->coverageHtmlColorSuccessHigh; - } - - public function coverageHtmlColorWarning(): string - { - return $this->coverageHtmlColorWarning; - } - - public function coverageHtmlColorDanger(): string - { - return $this->coverageHtmlColorDanger; - } - - /** - * @phpstan-assert-if-true !null $this->coverageHtmlCustomCssFile - */ - public function hasCoverageHtmlCustomCssFile(): bool - { - return $this->coverageHtmlCustomCssFile !== null; - } - - /** - * @throws NoCustomCssFileException - */ - public function coverageHtmlCustomCssFile(): string - { - if (!$this->hasCoverageHtmlCustomCssFile()) { - throw new NoCustomCssFileException; - } - - return $this->coverageHtmlCustomCssFile; - } - - /** - * @phpstan-assert-if-true !null $this->coverageOpenClover - */ - public function hasCoverageOpenClover(): bool - { - return $this->coverageOpenClover !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageOpenClover(): string - { - if (!$this->hasCoverageOpenClover()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageOpenClover; - } - - /** - * @phpstan-assert-if-true !null $this->coveragePhp - */ - public function hasCoveragePhp(): bool - { - return $this->coveragePhp !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coveragePhp(): string - { - if (!$this->hasCoveragePhp()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coveragePhp; - } - - /** - * @phpstan-assert-if-true !null $this->coverageText - */ - public function hasCoverageText(): bool - { - return $this->coverageText !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageText(): string - { - if (!$this->hasCoverageText()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageText; - } - - public function coverageTextShowUncoveredFiles(): bool - { - return $this->coverageTextShowUncoveredFiles; - } - - public function coverageTextShowOnlySummary(): bool - { - return $this->coverageTextShowOnlySummary; - } - - /** - * @phpstan-assert-if-true !null $this->coverageXml - */ - public function hasCoverageXml(): bool - { - return $this->coverageXml !== null; - } - - /** - * @throws CodeCoverageReportNotConfiguredException - */ - public function coverageXml(): string - { - if (!$this->hasCoverageXml()) { - throw new CodeCoverageReportNotConfiguredException; - } - - return $this->coverageXml; - } - - public function failOnAllIssues(): bool - { - return $this->failOnAllIssues; - } - - public function failOnDeprecation(): bool - { - return $this->failOnDeprecation; - } - - public function failOnPhpunitDeprecation(): bool - { - return $this->failOnPhpunitDeprecation; - } - - public function failOnPhpunitNotice(): bool - { - return $this->failOnPhpunitNotice; - } - - public function failOnPhpunitWarning(): bool - { - return $this->failOnPhpunitWarning; - } - - public function failOnEmptyTestSuite(): bool - { - return $this->failOnEmptyTestSuite; - } - - public function failOnIncomplete(): bool - { - return $this->failOnIncomplete; - } - - public function failOnNotice(): bool - { - return $this->failOnNotice; - } - - public function failOnRisky(): bool - { - return $this->failOnRisky; - } - - public function failOnSkipped(): bool - { - return $this->failOnSkipped; - } - - public function failOnWarning(): bool - { - return $this->failOnWarning; - } - - public function doNotFailOnDeprecation(): bool - { - return $this->doNotFailOnDeprecation; - } - - public function doNotFailOnPhpunitDeprecation(): bool - { - return $this->doNotFailOnPhpunitDeprecation; - } - - public function doNotFailOnPhpunitNotice(): bool - { - return $this->doNotFailOnPhpunitNotice; - } - - public function doNotFailOnPhpunitWarning(): bool - { - return $this->doNotFailOnPhpunitWarning; - } - - public function doNotFailOnEmptyTestSuite(): bool - { - return $this->doNotFailOnEmptyTestSuite; - } - - public function doNotFailOnIncomplete(): bool - { - return $this->doNotFailOnIncomplete; - } - - public function doNotFailOnNotice(): bool - { - return $this->doNotFailOnNotice; - } - - public function doNotFailOnRisky(): bool - { - return $this->doNotFailOnRisky; - } - - public function doNotFailOnSkipped(): bool - { - return $this->doNotFailOnSkipped; - } - - public function doNotFailOnWarning(): bool - { - return $this->doNotFailOnWarning; - } - - public function stopOnDefect(): bool - { - return $this->stopOnDefect; - } - - public function stopOnDeprecation(): bool - { - return $this->stopOnDeprecation; - } - - /** - * @phpstan-assert-if-true !null $this->specificDeprecationToStopOn - */ - public function hasSpecificDeprecationToStopOn(): bool - { - return $this->specificDeprecationToStopOn !== null; - } - - /** - * @throws SpecificDeprecationToStopOnNotConfiguredException - */ - public function specificDeprecationToStopOn(): string - { - if (!$this->hasSpecificDeprecationToStopOn()) { - throw new SpecificDeprecationToStopOnNotConfiguredException; - } - - return $this->specificDeprecationToStopOn; - } - - public function stopOnError(): bool - { - return $this->stopOnError; - } - - public function stopOnFailure(): bool - { - return $this->stopOnFailure; - } - - public function stopOnIncomplete(): bool - { - return $this->stopOnIncomplete; - } - - public function stopOnNotice(): bool - { - return $this->stopOnNotice; - } - - public function stopOnRisky(): bool - { - return $this->stopOnRisky; - } - - public function stopOnSkipped(): bool - { - return $this->stopOnSkipped; - } - - public function stopOnWarning(): bool - { - return $this->stopOnWarning; - } - - public function outputToStandardErrorStream(): bool - { - return $this->outputToStandardErrorStream; - } - - public function columns(): int - { - return $this->columns; - } - - public function noExtensions(): bool - { - return $this->noExtensions; - } - - /** - * @phpstan-assert-if-true !null $this->pharExtensionDirectory - */ - public function hasPharExtensionDirectory(): bool - { - return $this->pharExtensionDirectory !== null; - } - - /** - * @throws NoPharExtensionDirectoryException - * - * @return non-empty-string - */ - public function pharExtensionDirectory(): string - { - if (!$this->hasPharExtensionDirectory()) { - throw new NoPharExtensionDirectoryException; - } - - return $this->pharExtensionDirectory; - } - - /** - * @return list}> - */ - public function extensionBootstrappers(): array - { - return $this->extensionBootstrappers; - } - - public function backupGlobals(): bool - { - return $this->backupGlobals; - } - - public function backupStaticProperties(): bool - { - return $this->backupStaticProperties; - } - - public function beStrictAboutChangesToGlobalState(): bool - { - return $this->beStrictAboutChangesToGlobalState; - } - - public function colors(): bool - { - return $this->colors; - } - - public function processIsolation(): bool - { - return $this->processIsolation; - } - - public function enforceTimeLimit(): bool - { - return $this->enforceTimeLimit; - } - - public function defaultTimeLimit(): int - { - return $this->defaultTimeLimit; - } - - public function timeoutForSmallTests(): int - { - return $this->timeoutForSmallTests; - } - - public function timeoutForMediumTests(): int - { - return $this->timeoutForMediumTests; - } - - public function timeoutForLargeTests(): int - { - return $this->timeoutForLargeTests; - } - - public function reportUselessTests(): bool - { - return $this->reportUselessTests; - } - - public function strictCoverage(): bool - { - return $this->strictCoverage; - } - - public function disallowTestOutput(): bool - { - return $this->disallowTestOutput; - } - - public function displayDetailsOnAllIssues(): bool - { - return $this->displayDetailsOnAllIssues; - } - - public function displayDetailsOnIncompleteTests(): bool - { - return $this->displayDetailsOnIncompleteTests; - } - - public function displayDetailsOnSkippedTests(): bool - { - return $this->displayDetailsOnSkippedTests; - } - - public function displayDetailsOnTestsThatTriggerDeprecations(): bool - { - return $this->displayDetailsOnTestsThatTriggerDeprecations; - } - - public function displayDetailsOnPhpunitDeprecations(): bool - { - return $this->displayDetailsOnPhpunitDeprecations; - } - - public function displayDetailsOnPhpunitNotices(): bool - { - return $this->displayDetailsOnPhpunitNotices; - } - - public function displayDetailsOnTestsThatTriggerErrors(): bool - { - return $this->displayDetailsOnTestsThatTriggerErrors; - } - - public function displayDetailsOnTestsThatTriggerNotices(): bool - { - return $this->displayDetailsOnTestsThatTriggerNotices; - } - - public function displayDetailsOnTestsThatTriggerWarnings(): bool - { - return $this->displayDetailsOnTestsThatTriggerWarnings; - } - - public function reverseDefectList(): bool - { - return $this->reverseDefectList; - } - - public function requireCoverageMetadata(): bool - { - return $this->requireCoverageMetadata; - } - - public function noProgress(): bool - { - return $this->noProgress; - } - - public function noResults(): bool - { - return $this->noResults; - } - - public function noOutput(): bool - { - return $this->noOutput; - } - - public function executionOrder(): int - { - return $this->executionOrder; - } - - public function executionOrderDefects(): int - { - return $this->executionOrderDefects; - } - - public function resolveDependencies(): bool - { - return $this->resolveDependencies; - } - - /** - * @phpstan-assert-if-true !null $this->logfileTeamcity - */ - public function hasLogfileTeamcity(): bool - { - return $this->logfileTeamcity !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logfileTeamcity(): string - { - if (!$this->hasLogfileTeamcity()) { - throw new LoggingNotConfiguredException; - } - - return $this->logfileTeamcity; - } - - /** - * @phpstan-assert-if-true !null $this->logfileJunit - */ - public function hasLogfileJunit(): bool - { - return $this->logfileJunit !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logfileJunit(): string - { - if (!$this->hasLogfileJunit()) { - throw new LoggingNotConfiguredException; - } - - return $this->logfileJunit; - } - - /** - * @phpstan-assert-if-true !null $this->logfileOtr - */ - public function hasLogfileOtr(): bool - { - return $this->logfileOtr !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logfileOtr(): string - { - if (!$this->hasLogfileOtr()) { - throw new LoggingNotConfiguredException; - } - - return $this->logfileOtr; - } - - public function includeGitInformationInOtrLogfile(): bool - { - return $this->includeGitInformationInOtrLogfile; - } - - /** - * @phpstan-assert-if-true !null $this->logfileTestdoxHtml - */ - public function hasLogfileTestdoxHtml(): bool - { - return $this->logfileTestdoxHtml !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logfileTestdoxHtml(): string - { - if (!$this->hasLogfileTestdoxHtml()) { - throw new LoggingNotConfiguredException; - } - - return $this->logfileTestdoxHtml; - } - - /** - * @phpstan-assert-if-true !null $this->logfileTestdoxText - */ - public function hasLogfileTestdoxText(): bool - { - return $this->logfileTestdoxText !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logfileTestdoxText(): string - { - if (!$this->hasLogfileTestdoxText()) { - throw new LoggingNotConfiguredException; - } - - return $this->logfileTestdoxText; - } - - /** - * @phpstan-assert-if-true !null $this->logEventsText - */ - public function hasLogEventsText(): bool - { - return $this->logEventsText !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logEventsText(): string - { - if (!$this->hasLogEventsText()) { - throw new LoggingNotConfiguredException; - } - - return $this->logEventsText; - } - - /** - * @phpstan-assert-if-true !null $this->logEventsVerboseText - */ - public function hasLogEventsVerboseText(): bool - { - return $this->logEventsVerboseText !== null; - } - - /** - * @throws LoggingNotConfiguredException - */ - public function logEventsVerboseText(): string - { - if (!$this->hasLogEventsVerboseText()) { - throw new LoggingNotConfiguredException; - } - - return $this->logEventsVerboseText; - } - - public function outputIsTeamCity(): bool - { - return $this->teamCityOutput; - } - - public function outputIsTestDox(): bool - { - return $this->testDoxOutput; - } - - public function testDoxOutputWithSummary(): bool - { - return $this->testDoxOutputSummary; - } - - /** - * @phpstan-assert-if-true !empty $this->testsCovering - */ - public function hasTestsCovering(): bool - { - return $this->testsCovering !== null; - } - - /** - * @throws FilterNotConfiguredException - * - * @return list - */ - public function testsCovering(): array - { - if (!$this->hasTestsCovering()) { - throw new FilterNotConfiguredException; - } - - return $this->testsCovering; - } - - /** - * @phpstan-assert-if-true !empty $this->testsUsing - */ - public function hasTestsUsing(): bool - { - return $this->testsUsing !== null; - } - - /** - * @throws FilterNotConfiguredException - * - * @return list - */ - public function testsUsing(): array - { - if (!$this->hasTestsUsing()) { - throw new FilterNotConfiguredException; - } - - return $this->testsUsing; - } - - /** - * @phpstan-assert-if-true !empty $this->testsRequiringPhpExtension - */ - public function hasTestsRequiringPhpExtension(): bool - { - return $this->testsRequiringPhpExtension !== null; - } - - /** - * @throws FilterNotConfiguredException - * - * @return non-empty-list - */ - public function testsRequiringPhpExtension(): array - { - if (!$this->hasTestsRequiringPhpExtension()) { - throw new FilterNotConfiguredException; - } - - return $this->testsRequiringPhpExtension; - } - - /** - * @phpstan-assert-if-true !null $this->filter - */ - public function hasFilter(): bool - { - return $this->filter !== null; - } - - /** - * @throws FilterNotConfiguredException - */ - public function filter(): string - { - if (!$this->hasFilter()) { - throw new FilterNotConfiguredException; - } - - return $this->filter; - } - - /** - * @phpstan-assert-if-true !null $this->excludeFilter - */ - public function hasExcludeFilter(): bool - { - return $this->excludeFilter !== null; - } - - /** - * @throws FilterNotConfiguredException - */ - public function excludeFilter(): string - { - if (!$this->hasExcludeFilter()) { - throw new FilterNotConfiguredException; - } - - return $this->excludeFilter; - } - - /** - * @phpstan-assert-if-true !empty $this->groups - */ - public function hasGroups(): bool - { - return $this->groups !== []; - } - - /** - * @throws FilterNotConfiguredException - * - * @return non-empty-list - */ - public function groups(): array - { - if (!$this->hasGroups()) { - throw new FilterNotConfiguredException; - } - - return $this->groups; - } - - /** - * @phpstan-assert-if-true !empty $this->excludeGroups - */ - public function hasExcludeGroups(): bool - { - return $this->excludeGroups !== []; - } - - /** - * @throws FilterNotConfiguredException - * - * @return non-empty-list - */ - public function excludeGroups(): array - { - if (!$this->hasExcludeGroups()) { - throw new FilterNotConfiguredException; - } - - return $this->excludeGroups; - } - - public function randomOrderSeed(): int - { - return $this->randomOrderSeed; - } - - public function includeUncoveredFiles(): bool - { - return $this->includeUncoveredFiles; - } - - public function testSuite(): TestSuiteCollection - { - return $this->testSuite; - } - - /** - * @deprecated Use includeTestSuites() instead - */ - public function includeTestSuite(): string - { - return $this->includeTestSuite; - } - - /** - * @return list - */ - public function includeTestSuites(): array - { - if ($this->includeTestSuite === '') { - return []; - } - - return explode(',', $this->includeTestSuite); - } - - /** - * @deprecated Use excludeTestSuites() instead - */ - public function excludeTestSuite(): string - { - return $this->excludeTestSuite; - } - - /** - * @return list - */ - public function excludeTestSuites(): array - { - if ($this->excludeTestSuite === '') { - return []; - } - - return explode(',', $this->excludeTestSuite); - } - - /** - * @phpstan-assert-if-true !null $this->defaultTestSuite - */ - public function hasDefaultTestSuite(): bool - { - return $this->defaultTestSuite !== null; - } - - /** - * @throws NoDefaultTestSuiteException - */ - public function defaultTestSuite(): string - { - if (!$this->hasDefaultTestSuite()) { - throw new NoDefaultTestSuiteException; - } - - return $this->defaultTestSuite; - } - - /** - * @return non-empty-list - */ - public function testSuffixes(): array - { - return $this->testSuffixes; - } - - public function php(): Php - { - return $this->php; - } - - public function controlGarbageCollector(): bool - { - return $this->controlGarbageCollector; - } - - public function numberOfTestsBeforeGarbageCollection(): int - { - return $this->numberOfTestsBeforeGarbageCollection; - } - - /** - * @phpstan-assert-if-true !null $this->generateBaseline - */ - public function hasGenerateBaseline(): bool - { - return $this->generateBaseline !== null; - } - - /** - * @throws NoBaselineException - * - * @return non-empty-string - */ - public function generateBaseline(): string - { - if (!$this->hasGenerateBaseline()) { - throw new NoBaselineException; - } - - return $this->generateBaseline; - } - - public function debug(): bool - { - return $this->debug; - } - - public function withTelemetry(): bool - { - return $this->withTelemetry; - } - - /** - * @return non-negative-int - */ - public function shortenArraysForExportThreshold(): int - { - return $this->shortenArraysForExportThreshold; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptDoesNotExistException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptDoesNotExistException.php deleted file mode 100644 index 6146df2b..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptDoesNotExistException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BootstrapScriptDoesNotExistException extends RuntimeException implements Exception -{ - public function __construct(string $filename) - { - parent::__construct( - sprintf( - 'Cannot open bootstrap script "%s"', - $filename, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptException.php deleted file mode 100644 index 123b9aee..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/BootstrapScriptException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class BootstrapScriptException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CannotFindSchemaException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CannotFindSchemaException.php deleted file mode 100644 index 6eef052d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CannotFindSchemaException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\TextUI\Configuration\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotFindSchemaException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CodeCoverageReportNotConfiguredException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CodeCoverageReportNotConfiguredException.php deleted file mode 100644 index 83faa0a2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/CodeCoverageReportNotConfiguredException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CodeCoverageReportNotConfiguredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/ConfigurationCannotBeBuiltException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/ConfigurationCannotBeBuiltException.php deleted file mode 100644 index e95e0942..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/ConfigurationCannotBeBuiltException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ConfigurationCannotBeBuiltException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/Exception.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/Exception.php deleted file mode 100644 index dc49125a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends \PHPUnit\TextUI\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/FilterNotConfiguredException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/FilterNotConfiguredException.php deleted file mode 100644 index 5ae4331f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/FilterNotConfiguredException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class FilterNotConfiguredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/LoggingNotConfiguredException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/LoggingNotConfiguredException.php deleted file mode 100644 index 63cf9b07..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/LoggingNotConfiguredException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class LoggingNotConfiguredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBaselineException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBaselineException.php deleted file mode 100644 index 7611dceb..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBaselineException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoBaselineException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBootstrapException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBootstrapException.php deleted file mode 100644 index ff1bddf0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoBootstrapException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoBootstrapException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCacheDirectoryException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCacheDirectoryException.php deleted file mode 100644 index 215fe21f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCacheDirectoryException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoCacheDirectoryException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoConfigurationFileException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoConfigurationFileException.php deleted file mode 100644 index f8ceb80b..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoConfigurationFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoConfigurationFileException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCoverageCacheDirectoryException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCoverageCacheDirectoryException.php deleted file mode 100644 index 113950b5..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCoverageCacheDirectoryException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoCoverageCacheDirectoryException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCustomCssFileException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCustomCssFileException.php deleted file mode 100644 index e524c8db..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoCustomCssFileException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoCustomCssFileException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoDefaultTestSuiteException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoDefaultTestSuiteException.php deleted file mode 100644 index 96e7a7ad..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoDefaultTestSuiteException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoDefaultTestSuiteException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoPharExtensionDirectoryException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoPharExtensionDirectoryException.php deleted file mode 100644 index ce573ca7..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/NoPharExtensionDirectoryException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class NoPharExtensionDirectoryException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/SpecificDeprecationToStopOnNotConfiguredException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/SpecificDeprecationToStopOnNotConfiguredException.php deleted file mode 100644 index 73074db1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Exception/SpecificDeprecationToStopOnNotConfiguredException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SpecificDeprecationToStopOnNotConfiguredException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php deleted file mode 100644 index 57803140..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php +++ /dev/null @@ -1,1060 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use const DIRECTORY_SEPARATOR; -use const PATH_SEPARATOR; -use function array_diff; -use function assert; -use function dirname; -use function explode; -use function is_int; -use function realpath; -use function time; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration; -use PHPUnit\TextUI\CliArguments\Exception; -use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration; -use PHPUnit\TextUI\XmlConfiguration\LoadedFromFileConfiguration; -use PHPUnit\TextUI\XmlConfiguration\SchemaDetector; -use PHPUnit\Util\Filesystem; -use SebastianBergmann\CodeCoverage\Report\Html\Colors; -use SebastianBergmann\CodeCoverage\Report\Thresholds; -use SebastianBergmann\Environment\Console; -use SebastianBergmann\Invoker\Invoker; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Merger -{ - /** - * @throws \PHPUnit\TextUI\XmlConfiguration\Exception - * @throws Exception - * @throws NoCustomCssFileException - */ - public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlConfiguration): Configuration - { - $configurationFile = null; - - if ($xmlConfiguration->wasLoadedFromFile()) { - assert($xmlConfiguration instanceof LoadedFromFileConfiguration); - - $configurationFile = $xmlConfiguration->filename(); - } - - $bootstrap = null; - - if ($cliConfiguration->hasBootstrap()) { - $bootstrap = $cliConfiguration->bootstrap(); - } elseif ($xmlConfiguration->phpunit()->hasBootstrap()) { - $bootstrap = $xmlConfiguration->phpunit()->bootstrap(); - } - - if ($cliConfiguration->hasCacheResult()) { - $cacheResult = $cliConfiguration->cacheResult(); - } else { - $cacheResult = $xmlConfiguration->phpunit()->cacheResult(); - } - - $cacheDirectory = null; - $coverageCacheDirectory = null; - - if ($cliConfiguration->hasCacheDirectory() && Filesystem::createDirectory($cliConfiguration->cacheDirectory())) { - $cacheDirectory = realpath($cliConfiguration->cacheDirectory()); - } elseif ($xmlConfiguration->phpunit()->hasCacheDirectory() && Filesystem::createDirectory($xmlConfiguration->phpunit()->cacheDirectory())) { - $cacheDirectory = realpath($xmlConfiguration->phpunit()->cacheDirectory()); - } - - if ($cacheDirectory !== null) { - $coverageCacheDirectory = $cacheDirectory . DIRECTORY_SEPARATOR . 'code-coverage'; - $testResultCacheFile = $cacheDirectory . DIRECTORY_SEPARATOR . 'test-results'; - } - - if (!isset($testResultCacheFile)) { - if ($xmlConfiguration->wasLoadedFromFile()) { - $testResultCacheFile = dirname(realpath($xmlConfiguration->filename())) . DIRECTORY_SEPARATOR . '.phpunit.result.cache'; - } else { - $candidate = realpath($_SERVER['PHP_SELF']); - - if ($candidate) { - $testResultCacheFile = dirname($candidate) . DIRECTORY_SEPARATOR . '.phpunit.result.cache'; - } else { - $testResultCacheFile = '.phpunit.result.cache'; - } - } - } - - if ($cliConfiguration->hasDisableCodeCoverageIgnore()) { - $disableCodeCoverageIgnore = $cliConfiguration->disableCodeCoverageIgnore(); - } else { - $disableCodeCoverageIgnore = $xmlConfiguration->codeCoverage()->disableCodeCoverageIgnore(); - } - - if ($cliConfiguration->hasFailOnAllIssues()) { - $failOnAllIssues = $cliConfiguration->failOnAllIssues(); - } else { - $failOnAllIssues = $xmlConfiguration->phpunit()->failOnAllIssues(); - } - - if ($cliConfiguration->hasFailOnDeprecation()) { - $failOnDeprecation = $cliConfiguration->failOnDeprecation(); - } else { - $failOnDeprecation = $xmlConfiguration->phpunit()->failOnDeprecation(); - } - - if ($cliConfiguration->hasFailOnPhpunitDeprecation()) { - $failOnPhpunitDeprecation = $cliConfiguration->failOnPhpunitDeprecation(); - } else { - $failOnPhpunitDeprecation = $xmlConfiguration->phpunit()->failOnPhpunitDeprecation(); - } - - if ($cliConfiguration->hasFailOnPhpunitNotice()) { - $failOnPhpunitNotice = $cliConfiguration->failOnPhpunitNotice(); - } else { - $failOnPhpunitNotice = $xmlConfiguration->phpunit()->failOnPhpunitNotice(); - } - - if ($cliConfiguration->hasFailOnPhpunitWarning()) { - $failOnPhpunitWarning = $cliConfiguration->failOnPhpunitWarning(); - } else { - $failOnPhpunitWarning = $xmlConfiguration->phpunit()->failOnPhpunitWarning(); - } - - if ($cliConfiguration->hasFailOnEmptyTestSuite()) { - $failOnEmptyTestSuite = $cliConfiguration->failOnEmptyTestSuite(); - } else { - $failOnEmptyTestSuite = $xmlConfiguration->phpunit()->failOnEmptyTestSuite(); - } - - if ($cliConfiguration->hasFailOnIncomplete()) { - $failOnIncomplete = $cliConfiguration->failOnIncomplete(); - } else { - $failOnIncomplete = $xmlConfiguration->phpunit()->failOnIncomplete(); - } - - if ($cliConfiguration->hasFailOnNotice()) { - $failOnNotice = $cliConfiguration->failOnNotice(); - } else { - $failOnNotice = $xmlConfiguration->phpunit()->failOnNotice(); - } - - if ($cliConfiguration->hasFailOnRisky()) { - $failOnRisky = $cliConfiguration->failOnRisky(); - } else { - $failOnRisky = $xmlConfiguration->phpunit()->failOnRisky(); - } - - if ($cliConfiguration->hasFailOnSkipped()) { - $failOnSkipped = $cliConfiguration->failOnSkipped(); - } else { - $failOnSkipped = $xmlConfiguration->phpunit()->failOnSkipped(); - } - - if ($cliConfiguration->hasFailOnWarning()) { - $failOnWarning = $cliConfiguration->failOnWarning(); - } else { - $failOnWarning = $xmlConfiguration->phpunit()->failOnWarning(); - } - - $doNotFailOnDeprecation = false; - - if ($cliConfiguration->hasDoNotFailOnDeprecation()) { - $doNotFailOnDeprecation = $cliConfiguration->doNotFailOnDeprecation(); - } - - $doNotFailOnPhpunitDeprecation = false; - - if ($cliConfiguration->hasDoNotFailOnPhpunitDeprecation()) { - $doNotFailOnPhpunitDeprecation = $cliConfiguration->doNotFailOnPhpunitDeprecation(); - } - - $doNotFailOnPhpunitNotice = false; - - if ($cliConfiguration->hasDoNotFailOnPhpunitNotice()) { - $doNotFailOnPhpunitNotice = $cliConfiguration->doNotFailOnPhpunitNotice(); - } - - $doNotFailOnPhpunitWarning = false; - - if ($cliConfiguration->hasDoNotFailOnPhpunitWarning()) { - $doNotFailOnPhpunitWarning = $cliConfiguration->doNotFailOnPhpunitWarning(); - } - - $doNotFailOnEmptyTestSuite = false; - - if ($cliConfiguration->hasDoNotFailOnEmptyTestSuite()) { - $doNotFailOnEmptyTestSuite = $cliConfiguration->doNotFailOnEmptyTestSuite(); - } - - $doNotFailOnIncomplete = false; - - if ($cliConfiguration->hasDoNotFailOnIncomplete()) { - $doNotFailOnIncomplete = $cliConfiguration->doNotFailOnIncomplete(); - } - - $doNotFailOnNotice = false; - - if ($cliConfiguration->hasDoNotFailOnNotice()) { - $doNotFailOnNotice = $cliConfiguration->doNotFailOnNotice(); - } - - $doNotFailOnRisky = false; - - if ($cliConfiguration->hasDoNotFailOnRisky()) { - $doNotFailOnRisky = $cliConfiguration->doNotFailOnRisky(); - } - - $doNotFailOnSkipped = false; - - if ($cliConfiguration->hasDoNotFailOnSkipped()) { - $doNotFailOnSkipped = $cliConfiguration->doNotFailOnSkipped(); - } - - $doNotFailOnWarning = false; - - if ($cliConfiguration->hasDoNotFailOnWarning()) { - $doNotFailOnWarning = $cliConfiguration->doNotFailOnWarning(); - } - - if ($cliConfiguration->hasStopOnDefect()) { - $stopOnDefect = $cliConfiguration->stopOnDefect(); - } else { - $stopOnDefect = $xmlConfiguration->phpunit()->stopOnDefect(); - } - - if ($cliConfiguration->hasStopOnDeprecation()) { - $stopOnDeprecation = $cliConfiguration->stopOnDeprecation(); - } else { - $stopOnDeprecation = $xmlConfiguration->phpunit()->stopOnDeprecation(); - } - - $specificDeprecationToStopOn = null; - - if ($cliConfiguration->hasSpecificDeprecationToStopOn()) { - $specificDeprecationToStopOn = $cliConfiguration->specificDeprecationToStopOn(); - } - - if ($cliConfiguration->hasStopOnError()) { - $stopOnError = $cliConfiguration->stopOnError(); - } else { - $stopOnError = $xmlConfiguration->phpunit()->stopOnError(); - } - - if ($cliConfiguration->hasStopOnFailure()) { - $stopOnFailure = $cliConfiguration->stopOnFailure(); - } else { - $stopOnFailure = $xmlConfiguration->phpunit()->stopOnFailure(); - } - - if ($cliConfiguration->hasStopOnIncomplete()) { - $stopOnIncomplete = $cliConfiguration->stopOnIncomplete(); - } else { - $stopOnIncomplete = $xmlConfiguration->phpunit()->stopOnIncomplete(); - } - - if ($cliConfiguration->hasStopOnNotice()) { - $stopOnNotice = $cliConfiguration->stopOnNotice(); - } else { - $stopOnNotice = $xmlConfiguration->phpunit()->stopOnNotice(); - } - - if ($cliConfiguration->hasStopOnRisky()) { - $stopOnRisky = $cliConfiguration->stopOnRisky(); - } else { - $stopOnRisky = $xmlConfiguration->phpunit()->stopOnRisky(); - } - - if ($cliConfiguration->hasStopOnSkipped()) { - $stopOnSkipped = $cliConfiguration->stopOnSkipped(); - } else { - $stopOnSkipped = $xmlConfiguration->phpunit()->stopOnSkipped(); - } - - if ($cliConfiguration->hasStopOnWarning()) { - $stopOnWarning = $cliConfiguration->stopOnWarning(); - } else { - $stopOnWarning = $xmlConfiguration->phpunit()->stopOnWarning(); - } - - if ($cliConfiguration->hasStderr() && $cliConfiguration->stderr()) { - $outputToStandardErrorStream = true; - } else { - $outputToStandardErrorStream = $xmlConfiguration->phpunit()->stderr(); - } - - if ($cliConfiguration->hasColumns()) { - $columns = $cliConfiguration->columns(); - } else { - $columns = $xmlConfiguration->phpunit()->columns(); - } - - if ($columns === 'max') { - $columns = (new Console)->getNumberOfColumns(); - } - - if ($columns < 16) { - $columns = 16; - - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - 'Less than 16 columns requested, number of columns set to 16', - ); - } - - assert(is_int($columns)); - - $noExtensions = false; - - if ($cliConfiguration->hasNoExtensions() && $cliConfiguration->noExtensions()) { - $noExtensions = true; - } - - $pharExtensionDirectory = null; - - if ($xmlConfiguration->phpunit()->hasExtensionsDirectory()) { - $pharExtensionDirectory = $xmlConfiguration->phpunit()->extensionsDirectory(); - } - - $extensionBootstrappers = []; - - if ($cliConfiguration->hasExtensions()) { - foreach ($cliConfiguration->extensions() as $extension) { - $extensionBootstrappers[] = [ - 'className' => $extension, - 'parameters' => [], - ]; - } - } - - foreach ($xmlConfiguration->extensions() as $extension) { - $extensionBootstrappers[] = [ - 'className' => $extension->className(), - 'parameters' => $extension->parameters(), - ]; - } - - if ($cliConfiguration->hasPathCoverage() && $cliConfiguration->pathCoverage()) { - $pathCoverage = $cliConfiguration->pathCoverage(); - } else { - $pathCoverage = $xmlConfiguration->codeCoverage()->pathCoverage(); - } - - $defaultColors = Colors::default(); - $defaultThresholds = Thresholds::default(); - - $coverageClover = null; - $coverageCobertura = null; - $coverageCrap4j = null; - $coverageCrap4jThreshold = 30; - $coverageHtml = null; - $coverageHtmlLowUpperBound = $defaultThresholds->lowUpperBound(); - $coverageHtmlHighLowerBound = $defaultThresholds->highLowerBound(); - $coverageHtmlColorSuccessLow = $defaultColors->successLow(); - $coverageHtmlColorSuccessMedium = $defaultColors->successMedium(); - $coverageHtmlColorSuccessHigh = $defaultColors->successHigh(); - $coverageHtmlColorWarning = $defaultColors->warning(); - $coverageHtmlColorDanger = $defaultColors->danger(); - $coverageHtmlCustomCssFile = null; - $coverageOpenClover = null; - $coveragePhp = null; - $coverageText = null; - $coverageTextShowUncoveredFiles = false; - $coverageTextShowOnlySummary = false; - $coverageXml = null; - $coverageFromXmlConfiguration = true; - - if ($cliConfiguration->hasNoCoverage() && $cliConfiguration->noCoverage()) { - $coverageFromXmlConfiguration = false; - } - - if ($cliConfiguration->hasCoverageClover()) { - $coverageClover = $cliConfiguration->coverageClover(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasClover()) { - $coverageClover = $xmlConfiguration->codeCoverage()->clover()->target()->path(); - } - - if ($cliConfiguration->hasCoverageCobertura()) { - $coverageCobertura = $cliConfiguration->coverageCobertura(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasCobertura()) { - $coverageCobertura = $xmlConfiguration->codeCoverage()->cobertura()->target()->path(); - } - - if ($xmlConfiguration->codeCoverage()->hasCrap4j()) { - $coverageCrap4jThreshold = $xmlConfiguration->codeCoverage()->crap4j()->threshold(); - } - - if ($cliConfiguration->hasCoverageCrap4J()) { - $coverageCrap4j = $cliConfiguration->coverageCrap4J(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasCrap4j()) { - $coverageCrap4j = $xmlConfiguration->codeCoverage()->crap4j()->target()->path(); - } - - if ($xmlConfiguration->codeCoverage()->hasHtml()) { - $coverageHtmlHighLowerBound = $xmlConfiguration->codeCoverage()->html()->highLowerBound(); - $coverageHtmlLowUpperBound = $xmlConfiguration->codeCoverage()->html()->lowUpperBound(); - - if ($coverageHtmlLowUpperBound > $coverageHtmlHighLowerBound) { - $coverageHtmlLowUpperBound = $defaultThresholds->lowUpperBound(); - $coverageHtmlHighLowerBound = $defaultThresholds->highLowerBound(); - } - - $coverageHtmlColorSuccessLow = $xmlConfiguration->codeCoverage()->html()->colorSuccessLow(); - $coverageHtmlColorSuccessMedium = $xmlConfiguration->codeCoverage()->html()->colorSuccessMedium(); - $coverageHtmlColorSuccessHigh = $xmlConfiguration->codeCoverage()->html()->colorSuccessHigh(); - $coverageHtmlColorWarning = $xmlConfiguration->codeCoverage()->html()->colorWarning(); - $coverageHtmlColorDanger = $xmlConfiguration->codeCoverage()->html()->colorDanger(); - - if ($xmlConfiguration->codeCoverage()->html()->hasCustomCssFile()) { - $coverageHtmlCustomCssFile = $xmlConfiguration->codeCoverage()->html()->customCssFile(); - } - } - - if ($cliConfiguration->hasCoverageHtml()) { - $coverageHtml = $cliConfiguration->coverageHtml(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasHtml()) { - $coverageHtml = $xmlConfiguration->codeCoverage()->html()->target()->path(); - } - - if ($cliConfiguration->hasCoverageOpenClover()) { - $coverageOpenClover = $cliConfiguration->coverageOpenClover(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasOpenClover()) { - $coverageOpenClover = $xmlConfiguration->codeCoverage()->openClover()->target()->path(); - } - - if ($cliConfiguration->hasCoveragePhp()) { - $coveragePhp = $cliConfiguration->coveragePhp(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasPhp()) { - $coveragePhp = $xmlConfiguration->codeCoverage()->php()->target()->path(); - } - - if ($xmlConfiguration->codeCoverage()->hasText()) { - $coverageTextShowUncoveredFiles = $xmlConfiguration->codeCoverage()->text()->showUncoveredFiles(); - $coverageTextShowOnlySummary = $xmlConfiguration->codeCoverage()->text()->showOnlySummary(); - } - - if ($cliConfiguration->hasCoverageTextShowUncoveredFiles()) { - $coverageTextShowUncoveredFiles = $cliConfiguration->coverageTextShowUncoveredFiles(); - } - - if ($cliConfiguration->hasCoverageTextShowOnlySummary()) { - $coverageTextShowOnlySummary = $cliConfiguration->coverageTextShowOnlySummary(); - } - - if ($cliConfiguration->hasCoverageText()) { - $coverageText = $cliConfiguration->coverageText(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasText()) { - $coverageText = $xmlConfiguration->codeCoverage()->text()->target()->path(); - } - - if ($cliConfiguration->hasCoverageXml()) { - $coverageXml = $cliConfiguration->coverageXml(); - } elseif ($coverageFromXmlConfiguration && $xmlConfiguration->codeCoverage()->hasXml()) { - $coverageXml = $xmlConfiguration->codeCoverage()->xml()->target()->path(); - } - - if ($cliConfiguration->hasBackupGlobals()) { - $backupGlobals = $cliConfiguration->backupGlobals(); - } else { - $backupGlobals = $xmlConfiguration->phpunit()->backupGlobals(); - } - - if ($cliConfiguration->hasBackupStaticProperties()) { - $backupStaticProperties = $cliConfiguration->backupStaticProperties(); - } else { - $backupStaticProperties = $xmlConfiguration->phpunit()->backupStaticProperties(); - } - - if ($cliConfiguration->hasBeStrictAboutChangesToGlobalState()) { - $beStrictAboutChangesToGlobalState = $cliConfiguration->beStrictAboutChangesToGlobalState(); - } else { - $beStrictAboutChangesToGlobalState = $xmlConfiguration->phpunit()->beStrictAboutChangesToGlobalState(); - } - - if ($cliConfiguration->hasProcessIsolation()) { - $processIsolation = $cliConfiguration->processIsolation(); - } else { - $processIsolation = $xmlConfiguration->phpunit()->processIsolation(); - } - - if ($cliConfiguration->hasEnforceTimeLimit()) { - $enforceTimeLimit = $cliConfiguration->enforceTimeLimit(); - } else { - $enforceTimeLimit = $xmlConfiguration->phpunit()->enforceTimeLimit(); - } - - if ($enforceTimeLimit && !(new Invoker)->canInvokeWithTimeout()) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - 'The pcntl extension is required for enforcing time limits', - ); - } - - if ($cliConfiguration->hasDefaultTimeLimit()) { - $defaultTimeLimit = $cliConfiguration->defaultTimeLimit(); - } else { - $defaultTimeLimit = $xmlConfiguration->phpunit()->defaultTimeLimit(); - } - - $timeoutForSmallTests = $xmlConfiguration->phpunit()->timeoutForSmallTests(); - $timeoutForMediumTests = $xmlConfiguration->phpunit()->timeoutForMediumTests(); - $timeoutForLargeTests = $xmlConfiguration->phpunit()->timeoutForLargeTests(); - - if ($cliConfiguration->hasReportUselessTests()) { - $reportUselessTests = $cliConfiguration->reportUselessTests(); - } else { - $reportUselessTests = $xmlConfiguration->phpunit()->beStrictAboutTestsThatDoNotTestAnything(); - } - - if ($cliConfiguration->hasStrictCoverage()) { - $strictCoverage = $cliConfiguration->strictCoverage(); - } else { - $strictCoverage = $xmlConfiguration->phpunit()->beStrictAboutCoverageMetadata(); - } - - if ($cliConfiguration->hasDisallowTestOutput()) { - $disallowTestOutput = $cliConfiguration->disallowTestOutput(); - } else { - $disallowTestOutput = $xmlConfiguration->phpunit()->beStrictAboutOutputDuringTests(); - } - - if ($cliConfiguration->hasDisplayDetailsOnAllIssues()) { - $displayDetailsOnAllIssues = $cliConfiguration->displayDetailsOnAllIssues(); - } else { - $displayDetailsOnAllIssues = $xmlConfiguration->phpunit()->displayDetailsOnAllIssues(); - } - - if ($cliConfiguration->hasDisplayDetailsOnIncompleteTests()) { - $displayDetailsOnIncompleteTests = $cliConfiguration->displayDetailsOnIncompleteTests(); - } else { - $displayDetailsOnIncompleteTests = $xmlConfiguration->phpunit()->displayDetailsOnIncompleteTests(); - } - - if ($cliConfiguration->hasDisplayDetailsOnSkippedTests()) { - $displayDetailsOnSkippedTests = $cliConfiguration->displayDetailsOnSkippedTests(); - } else { - $displayDetailsOnSkippedTests = $xmlConfiguration->phpunit()->displayDetailsOnSkippedTests(); - } - - if ($cliConfiguration->hasDisplayDetailsOnTestsThatTriggerDeprecations()) { - $displayDetailsOnTestsThatTriggerDeprecations = $cliConfiguration->displayDetailsOnTestsThatTriggerDeprecations(); - } else { - $displayDetailsOnTestsThatTriggerDeprecations = $xmlConfiguration->phpunit()->displayDetailsOnTestsThatTriggerDeprecations(); - } - - if ($cliConfiguration->hasDisplayDetailsOnPhpunitDeprecations()) { - $displayDetailsOnPhpunitDeprecations = $cliConfiguration->displayDetailsOnPhpunitDeprecations(); - } else { - $displayDetailsOnPhpunitDeprecations = $xmlConfiguration->phpunit()->displayDetailsOnPhpunitDeprecations(); - } - - if ($cliConfiguration->hasDisplayDetailsOnPhpunitNotices()) { - $displayDetailsOnPhpunitNotices = $cliConfiguration->displayDetailsOnPhpunitNotices(); - } else { - $displayDetailsOnPhpunitNotices = $xmlConfiguration->phpunit()->displayDetailsOnPhpunitNotices(); - } - - if ($cliConfiguration->hasDisplayDetailsOnTestsThatTriggerErrors()) { - $displayDetailsOnTestsThatTriggerErrors = $cliConfiguration->displayDetailsOnTestsThatTriggerErrors(); - } else { - $displayDetailsOnTestsThatTriggerErrors = $xmlConfiguration->phpunit()->displayDetailsOnTestsThatTriggerErrors(); - } - - if ($cliConfiguration->hasDisplayDetailsOnTestsThatTriggerNotices()) { - $displayDetailsOnTestsThatTriggerNotices = $cliConfiguration->displayDetailsOnTestsThatTriggerNotices(); - } else { - $displayDetailsOnTestsThatTriggerNotices = $xmlConfiguration->phpunit()->displayDetailsOnTestsThatTriggerNotices(); - } - - if ($cliConfiguration->hasDisplayDetailsOnTestsThatTriggerWarnings()) { - $displayDetailsOnTestsThatTriggerWarnings = $cliConfiguration->displayDetailsOnTestsThatTriggerWarnings(); - } else { - $displayDetailsOnTestsThatTriggerWarnings = $xmlConfiguration->phpunit()->displayDetailsOnTestsThatTriggerWarnings(); - } - - if ($cliConfiguration->hasReverseList()) { - $reverseDefectList = $cliConfiguration->reverseList(); - } else { - $reverseDefectList = $xmlConfiguration->phpunit()->reverseDefectList(); - } - - $requireCoverageMetadata = $xmlConfiguration->phpunit()->requireCoverageMetadata(); - - if ($cliConfiguration->hasExecutionOrder()) { - $executionOrder = $cliConfiguration->executionOrder(); - } else { - $executionOrder = $xmlConfiguration->phpunit()->executionOrder(); - } - - $executionOrderDefects = TestSuiteSorter::ORDER_DEFAULT; - - if ($cliConfiguration->hasExecutionOrderDefects()) { - $executionOrderDefects = $cliConfiguration->executionOrderDefects(); - } elseif ($xmlConfiguration->phpunit()->defectsFirst()) { - $executionOrderDefects = TestSuiteSorter::ORDER_DEFECTS_FIRST; - } - - if ($cliConfiguration->hasResolveDependencies()) { - $resolveDependencies = $cliConfiguration->resolveDependencies(); - } else { - $resolveDependencies = $xmlConfiguration->phpunit()->resolveDependencies(); - } - - $colors = false; - $colorsSupported = (new Console)->hasColorSupport(); - - if ($cliConfiguration->hasColors()) { - if ($cliConfiguration->colors() === Configuration::COLOR_ALWAYS) { - $colors = true; - } elseif ($colorsSupported && $cliConfiguration->colors() === Configuration::COLOR_AUTO) { - $colors = true; - } - } elseif ($xmlConfiguration->phpunit()->colors() === Configuration::COLOR_ALWAYS) { - $colors = true; - } elseif ($colorsSupported && $xmlConfiguration->phpunit()->colors() === Configuration::COLOR_AUTO) { - $colors = true; - } - - $logfileTeamcity = null; - $logfileJunit = null; - $logfileOtr = null; - $logfileTestdoxHtml = null; - $logfileTestdoxText = null; - $loggingFromXmlConfiguration = true; - - if ($cliConfiguration->hasNoLogging() && $cliConfiguration->noLogging()) { - $loggingFromXmlConfiguration = false; - } - - if ($cliConfiguration->hasTeamcityLogfile()) { - $logfileTeamcity = $cliConfiguration->teamcityLogfile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasTeamCity()) { - $logfileTeamcity = $xmlConfiguration->logging()->teamCity()->target()->path(); - } - - if ($cliConfiguration->hasJunitLogfile()) { - $logfileJunit = $cliConfiguration->junitLogfile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasJunit()) { - $logfileJunit = $xmlConfiguration->logging()->junit()->target()->path(); - } - - if ($cliConfiguration->hasOtrLogfile()) { - $logfileOtr = $cliConfiguration->otrLogfile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasOtr()) { - $logfileOtr = $xmlConfiguration->logging()->otr()->target()->path(); - } - - $includeGitInformationInOtrLogfile = false; - - if ($cliConfiguration->hasIncludeGitInformationInOtrLogfile()) { - $includeGitInformationInOtrLogfile = $cliConfiguration->includeGitInformationInOtrLogfile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasOtr()) { - $includeGitInformationInOtrLogfile = $xmlConfiguration->logging()->otr()->includeGitInformation(); - } - - if ($cliConfiguration->hasTestdoxHtmlFile()) { - $logfileTestdoxHtml = $cliConfiguration->testdoxHtmlFile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasTestDoxHtml()) { - $logfileTestdoxHtml = $xmlConfiguration->logging()->testDoxHtml()->target()->path(); - } - - if ($cliConfiguration->hasTestdoxTextFile()) { - $logfileTestdoxText = $cliConfiguration->testdoxTextFile(); - } elseif ($loggingFromXmlConfiguration && $xmlConfiguration->logging()->hasTestDoxText()) { - $logfileTestdoxText = $xmlConfiguration->logging()->testDoxText()->target()->path(); - } - - $logEventsText = null; - - if ($cliConfiguration->hasLogEventsText()) { - $logEventsText = $cliConfiguration->logEventsText(); - } - - $logEventsVerboseText = null; - - if ($cliConfiguration->hasLogEventsVerboseText()) { - $logEventsVerboseText = $cliConfiguration->logEventsVerboseText(); - } - - $teamCityOutput = false; - - if ($cliConfiguration->hasTeamCityPrinter() && $cliConfiguration->teamCityPrinter()) { - $teamCityOutput = true; - } - - if ($cliConfiguration->hasTestDoxPrinter() && $cliConfiguration->testdoxPrinter()) { - $testDoxOutput = true; - } else { - $testDoxOutput = $xmlConfiguration->phpunit()->testdoxPrinter(); - } - - if ($cliConfiguration->hasTestDoxPrinterSummary() && $cliConfiguration->testdoxPrinterSummary()) { - $testDoxOutputSummary = true; - } else { - $testDoxOutputSummary = $xmlConfiguration->phpunit()->testdoxPrinterSummary(); - } - - $noProgress = false; - - if ($cliConfiguration->hasNoProgress() && $cliConfiguration->noProgress()) { - $noProgress = true; - } - - $noResults = false; - - if ($cliConfiguration->hasNoResults() && $cliConfiguration->noResults()) { - $noResults = true; - } - - $noOutput = false; - - if ($cliConfiguration->hasNoOutput() && $cliConfiguration->noOutput()) { - $noOutput = true; - } - - $testsCovering = null; - - if ($cliConfiguration->hasTestsCovering()) { - $testsCovering = $cliConfiguration->testsCovering(); - } - - $testsUsing = null; - - if ($cliConfiguration->hasTestsUsing()) { - $testsUsing = $cliConfiguration->testsUsing(); - } - - $testsRequiringPhpExtension = null; - - if ($cliConfiguration->hasTestsRequiringPhpExtension()) { - $testsRequiringPhpExtension = $cliConfiguration->testsRequiringPhpExtension(); - } - - $filter = null; - - if ($cliConfiguration->hasFilter()) { - $filter = $cliConfiguration->filter(); - } - - $excludeFilter = null; - - if ($cliConfiguration->hasExcludeFilter()) { - $excludeFilter = $cliConfiguration->excludeFilter(); - } - - if ($cliConfiguration->hasGroups()) { - $groups = $cliConfiguration->groups(); - } else { - $groups = $xmlConfiguration->groups()->include()->asArrayOfStrings(); - } - - if ($cliConfiguration->hasExcludeGroups()) { - $excludeGroups = $cliConfiguration->excludeGroups(); - } else { - $excludeGroups = $xmlConfiguration->groups()->exclude()->asArrayOfStrings(); - } - - $excludeGroups = array_diff($excludeGroups, $groups); - - if ($cliConfiguration->hasRandomOrderSeed()) { - $randomOrderSeed = $cliConfiguration->randomOrderSeed(); - } else { - $randomOrderSeed = time(); - } - - if ($xmlConfiguration->wasLoadedFromFile() && $xmlConfiguration->hasValidationErrors()) { - if ((new SchemaDetector)->detect($xmlConfiguration->filename())->detected()) { - EventFacade::emitter()->testRunnerTriggeredPhpunitDeprecation( - 'Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!', - ); - } else { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - "Test results may not be as expected because the XML configuration file did not pass validation:\n" . - $xmlConfiguration->validationErrors(), - ); - } - } - - $includeUncoveredFiles = $xmlConfiguration->codeCoverage()->includeUncoveredFiles(); - - $includePaths = []; - - if ($cliConfiguration->hasIncludePath()) { - foreach (explode(PATH_SEPARATOR, $cliConfiguration->includePath()) as $includePath) { - $includePaths[] = new Directory($includePath); - } - } - - foreach ($xmlConfiguration->php()->includePaths() as $includePath) { - $includePaths[] = $includePath; - } - - $iniSettings = []; - - if ($cliConfiguration->hasIniSettings()) { - foreach ($cliConfiguration->iniSettings() as $name => $value) { - $iniSettings[] = new IniSetting($name, $value); - } - } - - foreach ($xmlConfiguration->php()->iniSettings() as $iniSetting) { - $iniSettings[] = $iniSetting; - } - - $includeTestSuite = ''; - - if ($cliConfiguration->hasTestSuite()) { - $includeTestSuite = $cliConfiguration->testSuite(); - } elseif ($xmlConfiguration->phpunit()->hasDefaultTestSuite()) { - $includeTestSuite = $xmlConfiguration->phpunit()->defaultTestSuite(); - } - - $excludeTestSuite = ''; - - if ($cliConfiguration->hasExcludedTestSuite()) { - $excludeTestSuite = $cliConfiguration->excludedTestSuite(); - } - - $testSuffixes = ['Test.php', '.phpt']; - - if ($cliConfiguration->hasTestSuffixes()) { - $testSuffixes = $cliConfiguration->testSuffixes(); - } - - $sourceIncludeDirectories = []; - - if ($cliConfiguration->hasCoverageFilter()) { - foreach ($cliConfiguration->coverageFilter() as $directory) { - $sourceIncludeDirectories[] = new FilterDirectory($directory, '', '.php'); - } - } - - foreach ($xmlConfiguration->source()->includeDirectories() as $directory) { - $sourceIncludeDirectories[] = $directory; - } - - $sourceIncludeFiles = $xmlConfiguration->source()->includeFiles(); - $sourceExcludeDirectories = $xmlConfiguration->source()->excludeDirectories(); - $sourceExcludeFiles = $xmlConfiguration->source()->excludeFiles(); - - $useBaseline = null; - $generateBaseline = null; - - if (!$cliConfiguration->hasGenerateBaseline()) { - if ($cliConfiguration->hasUseBaseline()) { - $useBaseline = $cliConfiguration->useBaseline(); - } elseif ($xmlConfiguration->source()->hasBaseline()) { - $useBaseline = $xmlConfiguration->source()->baseline(); - } - } else { - $generateBaseline = $cliConfiguration->generateBaseline(); - } - - assert($useBaseline !== ''); - assert($generateBaseline !== ''); - - if ($failOnAllIssues) { - $displayDetailsOnAllIssues = true; - } - - if ($failOnDeprecation && !$doNotFailOnDeprecation) { - $displayDetailsOnTestsThatTriggerDeprecations = true; - } - - if ($failOnPhpunitDeprecation && !$doNotFailOnPhpunitDeprecation) { - $displayDetailsOnPhpunitDeprecations = true; - } - - if ($failOnPhpunitNotice && !$doNotFailOnPhpunitNotice) { - $displayDetailsOnPhpunitNotices = true; - } - - if ($failOnNotice && !$doNotFailOnNotice) { - $displayDetailsOnTestsThatTriggerNotices = true; - } - - if ($failOnWarning && !$doNotFailOnWarning) { - $displayDetailsOnTestsThatTriggerWarnings = true; - } - - if ($failOnIncomplete && !$doNotFailOnIncomplete) { - $displayDetailsOnIncompleteTests = true; - } - - if ($failOnSkipped && !$doNotFailOnSkipped) { - $displayDetailsOnSkippedTests = true; - } - - return new Configuration( - $cliConfiguration->arguments(), - $configurationFile, - $bootstrap, - $xmlConfiguration->phpunit()->bootstrapForTestSuite(), - $cacheResult, - $cacheDirectory, - $coverageCacheDirectory, - new Source( - $useBaseline, - $cliConfiguration->ignoreBaseline(), - FilterDirectoryCollection::fromArray($sourceIncludeDirectories), - $sourceIncludeFiles, - $sourceExcludeDirectories, - $sourceExcludeFiles, - $xmlConfiguration->source()->restrictNotices(), - $xmlConfiguration->source()->restrictWarnings(), - $xmlConfiguration->source()->ignoreSuppressionOfDeprecations(), - $xmlConfiguration->source()->ignoreSuppressionOfPhpDeprecations(), - $xmlConfiguration->source()->ignoreSuppressionOfErrors(), - $xmlConfiguration->source()->ignoreSuppressionOfNotices(), - $xmlConfiguration->source()->ignoreSuppressionOfPhpNotices(), - $xmlConfiguration->source()->ignoreSuppressionOfWarnings(), - $xmlConfiguration->source()->ignoreSuppressionOfPhpWarnings(), - $xmlConfiguration->source()->deprecationTriggers(), - $xmlConfiguration->source()->ignoreSelfDeprecations(), - $xmlConfiguration->source()->ignoreDirectDeprecations(), - $xmlConfiguration->source()->ignoreIndirectDeprecations(), - ), - $testResultCacheFile, - $coverageClover, - $coverageCobertura, - $coverageCrap4j, - $coverageCrap4jThreshold, - $coverageHtml, - $coverageHtmlLowUpperBound, - $coverageHtmlHighLowerBound, - $coverageHtmlColorSuccessLow, - $coverageHtmlColorSuccessMedium, - $coverageHtmlColorSuccessHigh, - $coverageHtmlColorWarning, - $coverageHtmlColorDanger, - $coverageHtmlCustomCssFile, - $coverageOpenClover, - $coveragePhp, - $coverageText, - $coverageTextShowUncoveredFiles, - $coverageTextShowOnlySummary, - $coverageXml, - $pathCoverage, - $xmlConfiguration->codeCoverage()->ignoreDeprecatedCodeUnits(), - $disableCodeCoverageIgnore, - $failOnAllIssues, - $failOnDeprecation, - $failOnPhpunitDeprecation, - $failOnPhpunitNotice, - $failOnPhpunitWarning, - $failOnEmptyTestSuite, - $failOnIncomplete, - $failOnNotice, - $failOnRisky, - $failOnSkipped, - $failOnWarning, - $doNotFailOnDeprecation, - $doNotFailOnPhpunitDeprecation, - $doNotFailOnPhpunitNotice, - $doNotFailOnPhpunitWarning, - $doNotFailOnEmptyTestSuite, - $doNotFailOnIncomplete, - $doNotFailOnNotice, - $doNotFailOnRisky, - $doNotFailOnSkipped, - $doNotFailOnWarning, - $stopOnDefect, - $stopOnDeprecation, - $specificDeprecationToStopOn, - $stopOnError, - $stopOnFailure, - $stopOnIncomplete, - $stopOnNotice, - $stopOnRisky, - $stopOnSkipped, - $stopOnWarning, - $outputToStandardErrorStream, - $columns, - $noExtensions, - $pharExtensionDirectory, - $extensionBootstrappers, - $backupGlobals, - $backupStaticProperties, - $beStrictAboutChangesToGlobalState, - $colors, - $processIsolation, - $enforceTimeLimit, - $defaultTimeLimit, - $timeoutForSmallTests, - $timeoutForMediumTests, - $timeoutForLargeTests, - $reportUselessTests, - $strictCoverage, - $disallowTestOutput, - $displayDetailsOnAllIssues, - $displayDetailsOnIncompleteTests, - $displayDetailsOnSkippedTests, - $displayDetailsOnTestsThatTriggerDeprecations, - $displayDetailsOnPhpunitDeprecations, - $displayDetailsOnPhpunitNotices, - $displayDetailsOnTestsThatTriggerErrors, - $displayDetailsOnTestsThatTriggerNotices, - $displayDetailsOnTestsThatTriggerWarnings, - $reverseDefectList, - $requireCoverageMetadata, - $noProgress, - $noResults, - $noOutput, - $executionOrder, - $executionOrderDefects, - $resolveDependencies, - $logfileTeamcity, - $logfileJunit, - $logfileOtr, - $includeGitInformationInOtrLogfile, - $logfileTestdoxHtml, - $logfileTestdoxText, - $logEventsText, - $logEventsVerboseText, - $teamCityOutput, - $testDoxOutput, - $testDoxOutputSummary, - $testsCovering, - $testsUsing, - $testsRequiringPhpExtension, - $filter, - $excludeFilter, - $groups, - $excludeGroups, - $randomOrderSeed, - $includeUncoveredFiles, - $xmlConfiguration->testSuite(), - $includeTestSuite, - $excludeTestSuite, - $xmlConfiguration->phpunit()->hasDefaultTestSuite() ? $xmlConfiguration->phpunit()->defaultTestSuite() : null, - $testSuffixes, - new Php( - DirectoryCollection::fromArray($includePaths), - IniSettingCollection::fromArray($iniSettings), - $xmlConfiguration->php()->constants(), - $xmlConfiguration->php()->globalVariables(), - $xmlConfiguration->php()->envVariables(), - $xmlConfiguration->php()->postVariables(), - $xmlConfiguration->php()->getVariables(), - $xmlConfiguration->php()->cookieVariables(), - $xmlConfiguration->php()->serverVariables(), - $xmlConfiguration->php()->filesVariables(), - $xmlConfiguration->php()->requestVariables(), - ), - $xmlConfiguration->phpunit()->controlGarbageCollector(), - $xmlConfiguration->phpunit()->numberOfTestsBeforeGarbageCollection(), - $generateBaseline, - $cliConfiguration->debug(), - $cliConfiguration->withTelemetry(), - $xmlConfiguration->phpunit()->shortenArraysForExportThreshold(), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/PhpHandler.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/PhpHandler.php deleted file mode 100644 index 3aa13160..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/PhpHandler.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use const PATH_SEPARATOR; -use function constant; -use function define; -use function defined; -use function getenv; -use function implode; -use function ini_get; -use function ini_set; -use function putenv; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class PhpHandler -{ - public function handle(Php $configuration): void - { - $this->handleIncludePaths($configuration->includePaths()); - $this->handleIniSettings($configuration->iniSettings()); - $this->handleConstants($configuration->constants()); - $this->handleGlobalVariables($configuration->globalVariables()); - $this->handleServerVariables($configuration->serverVariables()); - $this->handleEnvVariables($configuration->envVariables()); - $this->handleVariables('_POST', $configuration->postVariables()); - $this->handleVariables('_GET', $configuration->getVariables()); - $this->handleVariables('_COOKIE', $configuration->cookieVariables()); - $this->handleVariables('_FILES', $configuration->filesVariables()); - $this->handleVariables('_REQUEST', $configuration->requestVariables()); - } - - private function handleIncludePaths(DirectoryCollection $includePaths): void - { - if (!$includePaths->isEmpty()) { - $includePathsAsStrings = []; - - foreach ($includePaths as $includePath) { - $includePathsAsStrings[] = $includePath->path(); - } - - ini_set( - 'include_path', - implode(PATH_SEPARATOR, $includePathsAsStrings) . - PATH_SEPARATOR . - ini_get('include_path'), - ); - } - } - - private function handleIniSettings(IniSettingCollection $iniSettings): void - { - foreach ($iniSettings as $iniSetting) { - $value = $iniSetting->value(); - - if (defined($value)) { - $value = (string) constant($value); - } - - ini_set($iniSetting->name(), $value); - } - } - - private function handleConstants(ConstantCollection $constants): void - { - foreach ($constants as $constant) { - if (!defined($constant->name())) { - define($constant->name(), $constant->value()); - } - } - } - - private function handleGlobalVariables(VariableCollection $variables): void - { - foreach ($variables as $variable) { - $GLOBALS[$variable->name()] = $variable->value(); - } - } - - private function handleServerVariables(VariableCollection $variables): void - { - foreach ($variables as $variable) { - $_SERVER[$variable->name()] = $variable->value(); - } - } - - private function handleVariables(string $target, VariableCollection $variables): void - { - foreach ($variables as $variable) { - $GLOBALS[$target][$variable->name()] = $variable->value(); - } - } - - private function handleEnvVariables(VariableCollection $variables): void - { - foreach ($variables as $variable) { - $name = $variable->name(); - $value = $variable->value(); - $force = $variable->force(); - - if ($force || getenv($name) === false) { - putenv("{$name}={$value}"); - } - - $value = getenv($name); - - if ($force || !isset($_ENV[$name])) { - $_ENV[$name] = $value; - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Registry.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Registry.php deleted file mode 100644 index ad807523..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Registry.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function assert; -use function file_get_contents; -use function file_put_contents; -use function serialize; -use function unserialize; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\TextUI\CliArguments\Configuration as CliConfiguration; -use PHPUnit\TextUI\CliArguments\Exception; -use PHPUnit\TextUI\XmlConfiguration\Configuration as XmlConfiguration; -use PHPUnit\Util\VersionComparisonOperator; - -/** - * CLI options and XML configuration are static within a single PHPUnit process. - * It is therefore okay to use a Singleton registry here. - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Registry -{ - private static ?Configuration $instance = null; - - public static function saveTo(string $path): bool - { - $result = file_put_contents( - $path, - serialize(self::get()), - ); - - if ($result) { - return true; - } - - // @codeCoverageIgnoreStart - return false; - // @codeCoverageIgnoreEnd - } - - /** - * This method is used by the "run test(s) in separate process" templates. - * - * @noinspection PhpUnused - * - * @codeCoverageIgnore - */ - public static function loadFrom(string $path): void - { - $buffer = file_get_contents($path); - - assert($buffer !== false); - - self::$instance = unserialize( - $buffer, - [ - 'allowed_classes' => [ - Configuration::class, - Php::class, - ConstantCollection::class, - Constant::class, - IniSettingCollection::class, - IniSetting::class, - VariableCollection::class, - Variable::class, - DirectoryCollection::class, - Directory::class, - FileCollection::class, - File::class, - FilterDirectoryCollection::class, - FilterDirectory::class, - TestDirectoryCollection::class, - TestDirectory::class, - TestFileCollection::class, - TestFile::class, - TestSuiteCollection::class, - TestSuite::class, - VersionComparisonOperator::class, - Source::class, - ], - ], - ); - } - - public static function get(): Configuration - { - assert(self::$instance instanceof Configuration); - - return self::$instance; - } - - /** - * @throws \PHPUnit\TextUI\XmlConfiguration\Exception - * @throws Exception - * @throws NoCustomCssFileException - */ - public static function init(CliConfiguration $cliConfiguration, XmlConfiguration $xmlConfiguration): Configuration - { - self::$instance = (new Merger)->merge($cliConfiguration, $xmlConfiguration); - - EventFacade::emitter()->testRunnerConfigured(self::$instance); - - return self::$instance; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceFilter.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceFilter.php deleted file mode 100644 index 845a9b37..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceFilter.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SourceFilter -{ - private static ?self $instance = null; - - /** - * @var array - */ - private readonly array $map; - - public static function instance(): self - { - if (self::$instance === null) { - self::$instance = new self( - (new SourceMapper)->map( - Registry::get()->source(), - ), - ); - } - - return self::$instance; - } - - /** - * @param array $map - */ - public function __construct(array $map) - { - $this->map = $map; - } - - public function includes(string $path): bool - { - return isset($this->map[$path]); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceMapper.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceMapper.php deleted file mode 100644 index c2c54838..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/SourceMapper.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function realpath; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; -use SplObjectStorage; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SourceMapper -{ - /** - * @var ?SplObjectStorage> - */ - private static ?SplObjectStorage $files = null; - - /** - * @return array - */ - public function map(Source $source): array - { - if (self::$files === null) { - self::$files = new SplObjectStorage; - } - - if (isset(self::$files[$source])) { - return self::$files[$source]; - } - - $files = []; - - $directories = $this->aggregateDirectories($source->includeDirectories()); - - foreach ($directories as $path => [$prefixes, $suffixes]) { - foreach ((new FileIteratorFacade)->getFilesAsArray($path, $suffixes, $prefixes) as $file) { - $file = realpath($file); - - if (!$file) { - continue; - } - - $files[$file] = true; - } - } - - foreach ($source->includeFiles() as $file) { - $file = realpath($file->path()); - - if (!$file) { - continue; - } - - $files[$file] = true; - } - - $directories = $this->aggregateDirectories($source->excludeDirectories()); - - foreach ($directories as $path => [$prefixes, $suffixes]) { - foreach ((new FileIteratorFacade)->getFilesAsArray($path, $suffixes, $prefixes) as $file) { - $file = realpath($file); - - if (!$file) { - continue; - } - - if (!isset($files[$file])) { - continue; - } - - unset($files[$file]); - } - } - - foreach ($source->excludeFiles() as $file) { - $file = realpath($file->path()); - - if (!$file) { - continue; - } - - if (!isset($files[$file])) { - continue; - } - - unset($files[$file]); - } - - self::$files[$source] = $files; - - return $files; - } - - /** - * @return array,list}> - */ - private function aggregateDirectories(FilterDirectoryCollection $directories): array - { - $aggregated = []; - - foreach ($directories as $directory) { - if (!isset($aggregated[$directory->path()])) { - $aggregated[$directory->path()] = [ - 0 => [], - 1 => [], - ]; - } - - $prefix = $directory->prefix(); - - if ($prefix !== '') { - $aggregated[$directory->path()][0][] = $prefix; - } - - $suffix = $directory->suffix(); - - if ($suffix !== '') { - $aggregated[$directory->path()][1][] = $suffix; - } - } - - return $aggregated; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/TestSuiteBuilder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/TestSuiteBuilder.php deleted file mode 100644 index 0312aad7..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/TestSuiteBuilder.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use const PHP_EOL; -use function assert; -use function count; -use function is_dir; -use function is_file; -use function realpath; -use function str_ends_with; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Exception; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\TestSuiteLoader; -use PHPUnit\TextUI\RuntimeException; -use PHPUnit\TextUI\TestDirectoryNotFoundException; -use PHPUnit\TextUI\TestFileNotFoundException; -use PHPUnit\TextUI\XmlConfiguration\TestSuiteMapper; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteBuilder -{ - /** - * @throws \PHPUnit\Framework\Exception - * @throws RuntimeException - * @throws TestDirectoryNotFoundException - * @throws TestFileNotFoundException - */ - public function build(Configuration $configuration): TestSuite - { - if ($configuration->hasCliArguments()) { - $arguments = []; - - foreach ($configuration->cliArguments() as $cliArgument) { - $argument = realpath($cliArgument); - - if (!$argument) { - throw new TestFileNotFoundException($cliArgument); - } - - $arguments[] = $argument; - } - - if (count($arguments) === 1) { - $testSuite = $this->testSuiteFromPath( - $arguments[0], - $configuration->testSuffixes(), - ); - } else { - $testSuite = $this->testSuiteFromPathList( - $arguments, - $configuration->testSuffixes(), - ); - } - } - - if (!isset($testSuite)) { - $xmlConfigurationFile = $configuration->hasConfigurationFile() ? $configuration->configurationFile() : 'Root Test Suite'; - - assert($xmlConfigurationFile !== ''); - - $testSuite = (new TestSuiteMapper)->map( - $xmlConfigurationFile, - $configuration->testSuite(), - $configuration->includeTestSuites(), - $configuration->excludeTestSuites(), - ); - } - - EventFacade::emitter()->testSuiteLoaded(\PHPUnit\Event\TestSuite\TestSuiteBuilder::from($testSuite)); - - return $testSuite; - } - - /** - * @param non-empty-string $path - * @param list $suffixes - * - * @throws \PHPUnit\Framework\Exception - */ - private function testSuiteFromPath(string $path, array $suffixes, ?TestSuite $suite = null): TestSuite - { - if (str_ends_with($path, '.phpt') && is_file($path)) { - if ($suite === null) { - $suite = TestSuite::empty($path); - } - - $suite->addTestFile($path); - - return $suite; - } - - if (is_dir($path)) { - $files = (new FileIteratorFacade)->getFilesAsArray($path, $suffixes); - - if ($suite === null) { - $suite = TestSuite::empty('CLI Arguments'); - } - - $suite->addTestFiles($files); - - return $suite; - } - - try { - $testClass = (new TestSuiteLoader)->load($path); - } catch (Exception $e) { - print $e->getMessage() . PHP_EOL; - - exit(1); - } - - if ($suite === null) { - return TestSuite::fromClassReflector($testClass); - } - - $suite->addTestSuite($testClass); - - return $suite; - } - - /** - * @param list $paths - * @param list $suffixes - * - * @throws \PHPUnit\Framework\Exception - */ - private function testSuiteFromPathList(array $paths, array $suffixes): TestSuite - { - $suite = TestSuite::empty('CLI Arguments'); - - foreach ($paths as $path) { - $this->testSuiteFromPath($path, $suffixes, $suite); - } - - return $suite; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Constant.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Constant.php deleted file mode 100644 index 0ff240dd..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Constant.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Constant -{ - private string $name; - private bool|string $value; - - public function __construct(string $name, bool|string $value) - { - $this->name = $name; - $this->value = $value; - } - - public function name(): string - { - return $this->name; - } - - public function value(): bool|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollection.php deleted file mode 100644 index 3e34d743..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollection.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class ConstantCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $constants; - - /** - * @param list $constants - */ - public static function fromArray(array $constants): self - { - return new self(...$constants); - } - - private function __construct(Constant ...$constants) - { - $this->constants = $constants; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->constants; - } - - public function count(): int - { - return count($this->constants); - } - - public function getIterator(): ConstantCollectionIterator - { - return new ConstantCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollectionIterator.php deleted file mode 100644 index f385b7fa..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ConstantCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class ConstantCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $constants; - private int $position = 0; - - public function __construct(ConstantCollection $constants) - { - $this->constants = $constants->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->constants); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Constant - { - return $this->constants[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Directory.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Directory.php deleted file mode 100644 index f44e28b1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Directory.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Directory -{ - private string $path; - - public function __construct(string $path) - { - $this->path = $path; - } - - public function path(): string - { - return $this->path; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollection.php deleted file mode 100644 index dc1e840c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class DirectoryCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $directories; - - /** - * @param list $directories - */ - public static function fromArray(array $directories): self - { - return new self(...$directories); - } - - private function __construct(Directory ...$directories) - { - $this->directories = $directories; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->directories; - } - - public function count(): int - { - return count($this->directories); - } - - public function getIterator(): DirectoryCollectionIterator - { - return new DirectoryCollectionIterator($this); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollectionIterator.php deleted file mode 100644 index 73d2cff6..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/DirectoryCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class DirectoryCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $directories; - private int $position = 0; - - public function __construct(DirectoryCollection $directories) - { - $this->directories = $directories->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->directories); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Directory - { - return $this->directories[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrap.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrap.php deleted file mode 100644 index 09430c7f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrap.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class ExtensionBootstrap -{ - /** - * @var non-empty-string - */ - private string $className; - - /** - * @var array - */ - private array $parameters; - - /** - * @param non-empty-string $className - * @param array $parameters - */ - public function __construct(string $className, array $parameters) - { - $this->className = $className; - $this->parameters = $parameters; - } - - /** - * @return non-empty-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return array - */ - public function parameters(): array - { - return $this->parameters; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollection.php deleted file mode 100644 index 16ca1e07..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollection.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class ExtensionBootstrapCollection implements IteratorAggregate -{ - /** - * @var list - */ - private array $extensionBootstraps; - - /** - * @param list $extensionBootstraps - */ - public static function fromArray(array $extensionBootstraps): self - { - return new self(...$extensionBootstraps); - } - - private function __construct(ExtensionBootstrap ...$extensionBootstraps) - { - $this->extensionBootstraps = $extensionBootstraps; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->extensionBootstraps; - } - - public function getIterator(): ExtensionBootstrapCollectionIterator - { - return new ExtensionBootstrapCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollectionIterator.php deleted file mode 100644 index 0b5c20ba..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/ExtensionBootstrapCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class ExtensionBootstrapCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $extensionBootstraps; - private int $position = 0; - - public function __construct(ExtensionBootstrapCollection $extensionBootstraps) - { - $this->extensionBootstraps = $extensionBootstraps->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->extensionBootstraps); - } - - public function key(): int - { - return $this->position; - } - - public function current(): ExtensionBootstrap - { - return $this->extensionBootstraps[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/File.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/File.php deleted file mode 100644 index 85900f47..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/File.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class File -{ - /** - * @var non-empty-string - */ - private string $path; - - /** - * @param non-empty-string $path - */ - public function __construct(string $path) - { - $this->path = $path; - } - - /** - * @return non-empty-string - */ - public function path(): string - { - return $this->path; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollection.php deleted file mode 100644 index 61522a5e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class FileCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $files; - - /** - * @param list $files - */ - public static function fromArray(array $files): self - { - return new self(...$files); - } - - private function __construct(File ...$files) - { - $this->files = $files; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->files; - } - - public function count(): int - { - return count($this->files); - } - - public function notEmpty(): bool - { - return $this->files !== []; - } - - public function getIterator(): FileCollectionIterator - { - return new FileCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollectionIterator.php deleted file mode 100644 index 91ec8e27..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FileCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class FileCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $files; - private int $position = 0; - - public function __construct(FileCollection $files) - { - $this->files = $files->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->files); - } - - public function key(): int - { - return $this->position; - } - - public function current(): File - { - return $this->files[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectory.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectory.php deleted file mode 100644 index 52dcd1b1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectory.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class FilterDirectory -{ - /** - * @var non-empty-string - */ - private string $path; - private string $prefix; - private string $suffix; - - /** - * @param non-empty-string $path - */ - public function __construct(string $path, string $prefix, string $suffix) - { - $this->path = $path; - $this->prefix = $prefix; - $this->suffix = $suffix; - } - - /** - * @return non-empty-string - */ - public function path(): string - { - return $this->path; - } - - public function prefix(): string - { - return $this->prefix; - } - - public function suffix(): string - { - return $this->suffix; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollection.php deleted file mode 100644 index 147f0618..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class FilterDirectoryCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $directories; - - /** - * @param list $directories - */ - public static function fromArray(array $directories): self - { - return new self(...$directories); - } - - private function __construct(FilterDirectory ...$directories) - { - $this->directories = $directories; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->directories; - } - - public function count(): int - { - return count($this->directories); - } - - public function notEmpty(): bool - { - return $this->directories !== []; - } - - public function getIterator(): FilterDirectoryCollectionIterator - { - return new FilterDirectoryCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollectionIterator.php deleted file mode 100644 index 737c752f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/FilterDirectoryCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class FilterDirectoryCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $directories; - private int $position = 0; - - public function __construct(FilterDirectoryCollection $directories) - { - $this->directories = $directories->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->directories); - } - - public function key(): int - { - return $this->position; - } - - public function current(): FilterDirectory - { - return $this->directories[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Group.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Group.php deleted file mode 100644 index cb0bdc8a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Group.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Group -{ - private string $name; - - public function __construct(string $name) - { - $this->name = $name; - } - - public function name(): string - { - return $this->name; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollection.php deleted file mode 100644 index 8232e1f3..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollection.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class GroupCollection implements IteratorAggregate -{ - /** - * @var list - */ - private array $groups; - - /** - * @param list $groups - */ - public static function fromArray(array $groups): self - { - return new self(...$groups); - } - - private function __construct(Group ...$groups) - { - $this->groups = $groups; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->groups; - } - - /** - * @return list - */ - public function asArrayOfStrings(): array - { - $result = []; - - foreach ($this->groups as $group) { - $result[] = $group->name(); - } - - return $result; - } - - public function isEmpty(): bool - { - return $this->groups === []; - } - - public function getIterator(): GroupCollectionIterator - { - return new GroupCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollectionIterator.php deleted file mode 100644 index 77480875..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/GroupCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class GroupCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $groups; - private int $position = 0; - - public function __construct(GroupCollection $groups) - { - $this->groups = $groups->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->groups); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Group - { - return $this->groups[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSetting.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSetting.php deleted file mode 100644 index b4d11665..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSetting.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class IniSetting -{ - private string $name; - private string $value; - - public function __construct(string $name, string $value) - { - $this->name = $name; - $this->value = $value; - } - - public function name(): string - { - return $this->name; - } - - public function value(): string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollection.php deleted file mode 100644 index abfd8fd2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollection.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class IniSettingCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $iniSettings; - - /** - * @param list $iniSettings - */ - public static function fromArray(array $iniSettings): self - { - return new self(...$iniSettings); - } - - private function __construct(IniSetting ...$iniSettings) - { - $this->iniSettings = $iniSettings; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->iniSettings; - } - - public function count(): int - { - return count($this->iniSettings); - } - - public function getIterator(): IniSettingCollectionIterator - { - return new IniSettingCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollectionIterator.php deleted file mode 100644 index cb68c3dd..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/IniSettingCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class IniSettingCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $iniSettings; - private int $position = 0; - - public function __construct(IniSettingCollection $iniSettings) - { - $this->iniSettings = $iniSettings->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->iniSettings); - } - - public function key(): int - { - return $this->position; - } - - public function current(): IniSetting - { - return $this->iniSettings[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php deleted file mode 100644 index 0dc4735d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Php -{ - private DirectoryCollection $includePaths; - private IniSettingCollection $iniSettings; - private ConstantCollection $constants; - private VariableCollection $globalVariables; - private VariableCollection $envVariables; - private VariableCollection $postVariables; - private VariableCollection $getVariables; - private VariableCollection $cookieVariables; - private VariableCollection $serverVariables; - private VariableCollection $filesVariables; - private VariableCollection $requestVariables; - - public function __construct(DirectoryCollection $includePaths, IniSettingCollection $iniSettings, ConstantCollection $constants, VariableCollection $globalVariables, VariableCollection $envVariables, VariableCollection $postVariables, VariableCollection $getVariables, VariableCollection $cookieVariables, VariableCollection $serverVariables, VariableCollection $filesVariables, VariableCollection $requestVariables) - { - $this->includePaths = $includePaths; - $this->iniSettings = $iniSettings; - $this->constants = $constants; - $this->globalVariables = $globalVariables; - $this->envVariables = $envVariables; - $this->postVariables = $postVariables; - $this->getVariables = $getVariables; - $this->cookieVariables = $cookieVariables; - $this->serverVariables = $serverVariables; - $this->filesVariables = $filesVariables; - $this->requestVariables = $requestVariables; - } - - public function includePaths(): DirectoryCollection - { - return $this->includePaths; - } - - public function iniSettings(): IniSettingCollection - { - return $this->iniSettings; - } - - public function constants(): ConstantCollection - { - return $this->constants; - } - - public function globalVariables(): VariableCollection - { - return $this->globalVariables; - } - - public function envVariables(): VariableCollection - { - return $this->envVariables; - } - - public function postVariables(): VariableCollection - { - return $this->postVariables; - } - - public function getVariables(): VariableCollection - { - return $this->getVariables; - } - - public function cookieVariables(): VariableCollection - { - return $this->cookieVariables; - } - - public function serverVariables(): VariableCollection - { - return $this->serverVariables; - } - - public function filesVariables(): VariableCollection - { - return $this->filesVariables; - } - - public function requestVariables(): VariableCollection - { - return $this->requestVariables; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php deleted file mode 100644 index b6f61eb0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Source -{ - /** - * @var non-empty-string - */ - private ?string $baseline; - private bool $ignoreBaseline; - private FilterDirectoryCollection $includeDirectories; - private FileCollection $includeFiles; - private FilterDirectoryCollection $excludeDirectories; - private FileCollection $excludeFiles; - private bool $restrictNotices; - private bool $restrictWarnings; - private bool $ignoreSuppressionOfDeprecations; - private bool $ignoreSuppressionOfPhpDeprecations; - private bool $ignoreSuppressionOfErrors; - private bool $ignoreSuppressionOfNotices; - private bool $ignoreSuppressionOfPhpNotices; - private bool $ignoreSuppressionOfWarnings; - private bool $ignoreSuppressionOfPhpWarnings; - private bool $ignoreSelfDeprecations; - private bool $ignoreDirectDeprecations; - private bool $ignoreIndirectDeprecations; - - /** - * @var array{functions: list, methods: list} - */ - private array $deprecationTriggers; - - /** - * @param non-empty-string $baseline - * @param array{functions: list, methods: list} $deprecationTriggers - */ - public function __construct(?string $baseline, bool $ignoreBaseline, FilterDirectoryCollection $includeDirectories, FileCollection $includeFiles, FilterDirectoryCollection $excludeDirectories, FileCollection $excludeFiles, bool $restrictNotices, bool $restrictWarnings, bool $ignoreSuppressionOfDeprecations, bool $ignoreSuppressionOfPhpDeprecations, bool $ignoreSuppressionOfErrors, bool $ignoreSuppressionOfNotices, bool $ignoreSuppressionOfPhpNotices, bool $ignoreSuppressionOfWarnings, bool $ignoreSuppressionOfPhpWarnings, array $deprecationTriggers, bool $ignoreSelfDeprecations, bool $ignoreDirectDeprecations, bool $ignoreIndirectDeprecations) - { - $this->baseline = $baseline; - $this->ignoreBaseline = $ignoreBaseline; - $this->includeDirectories = $includeDirectories; - $this->includeFiles = $includeFiles; - $this->excludeDirectories = $excludeDirectories; - $this->excludeFiles = $excludeFiles; - $this->restrictNotices = $restrictNotices; - $this->restrictWarnings = $restrictWarnings; - $this->ignoreSuppressionOfDeprecations = $ignoreSuppressionOfDeprecations; - $this->ignoreSuppressionOfPhpDeprecations = $ignoreSuppressionOfPhpDeprecations; - $this->ignoreSuppressionOfErrors = $ignoreSuppressionOfErrors; - $this->ignoreSuppressionOfNotices = $ignoreSuppressionOfNotices; - $this->ignoreSuppressionOfPhpNotices = $ignoreSuppressionOfPhpNotices; - $this->ignoreSuppressionOfWarnings = $ignoreSuppressionOfWarnings; - $this->ignoreSuppressionOfPhpWarnings = $ignoreSuppressionOfPhpWarnings; - $this->deprecationTriggers = $deprecationTriggers; - $this->ignoreSelfDeprecations = $ignoreSelfDeprecations; - $this->ignoreDirectDeprecations = $ignoreDirectDeprecations; - $this->ignoreIndirectDeprecations = $ignoreIndirectDeprecations; - } - - /** - * @phpstan-assert-if-true !null $this->baseline - */ - public function useBaseline(): bool - { - return $this->hasBaseline() && !$this->ignoreBaseline; - } - - /** - * @phpstan-assert-if-true !null $this->baseline - */ - public function hasBaseline(): bool - { - return $this->baseline !== null; - } - - /** - * @throws NoBaselineException - * - * @return non-empty-string - */ - public function baseline(): string - { - if (!$this->hasBaseline()) { - throw new NoBaselineException; - } - - return $this->baseline; - } - - public function includeDirectories(): FilterDirectoryCollection - { - return $this->includeDirectories; - } - - public function includeFiles(): FileCollection - { - return $this->includeFiles; - } - - public function excludeDirectories(): FilterDirectoryCollection - { - return $this->excludeDirectories; - } - - public function excludeFiles(): FileCollection - { - return $this->excludeFiles; - } - - public function notEmpty(): bool - { - return $this->includeDirectories->notEmpty() || $this->includeFiles->notEmpty(); - } - - public function restrictNotices(): bool - { - return $this->restrictNotices; - } - - public function restrictWarnings(): bool - { - return $this->restrictWarnings; - } - - public function ignoreSuppressionOfDeprecations(): bool - { - return $this->ignoreSuppressionOfDeprecations; - } - - public function ignoreSuppressionOfPhpDeprecations(): bool - { - return $this->ignoreSuppressionOfPhpDeprecations; - } - - public function ignoreSuppressionOfErrors(): bool - { - return $this->ignoreSuppressionOfErrors; - } - - public function ignoreSuppressionOfNotices(): bool - { - return $this->ignoreSuppressionOfNotices; - } - - public function ignoreSuppressionOfPhpNotices(): bool - { - return $this->ignoreSuppressionOfPhpNotices; - } - - public function ignoreSuppressionOfWarnings(): bool - { - return $this->ignoreSuppressionOfWarnings; - } - - public function ignoreSuppressionOfPhpWarnings(): bool - { - return $this->ignoreSuppressionOfPhpWarnings; - } - - /** - * @return array{functions: list, methods: list} - */ - public function deprecationTriggers(): array - { - return $this->deprecationTriggers; - } - - public function ignoreSelfDeprecations(): bool - { - return $this->ignoreSelfDeprecations; - } - - public function ignoreDirectDeprecations(): bool - { - return $this->ignoreDirectDeprecations; - } - - public function ignoreIndirectDeprecations(): bool - { - return $this->ignoreIndirectDeprecations; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectory.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectory.php deleted file mode 100644 index dfe301a9..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectory.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use PHPUnit\Util\VersionComparisonOperator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class TestDirectory -{ - /** - * @var non-empty-string - */ - private string $path; - private string $prefix; - private string $suffix; - private string $phpVersion; - private VersionComparisonOperator $phpVersionOperator; - - /** - * @var list - */ - private array $groups; - - /** - * @param non-empty-string $path - * @param list $groups - */ - public function __construct(string $path, string $prefix, string $suffix, string $phpVersion, VersionComparisonOperator $phpVersionOperator, array $groups) - { - $this->path = $path; - $this->prefix = $prefix; - $this->suffix = $suffix; - $this->phpVersion = $phpVersion; - $this->phpVersionOperator = $phpVersionOperator; - $this->groups = $groups; - } - - /** - * @return non-empty-string - */ - public function path(): string - { - return $this->path; - } - - public function prefix(): string - { - return $this->prefix; - } - - public function suffix(): string - { - return $this->suffix; - } - - public function phpVersion(): string - { - return $this->phpVersion; - } - - public function phpVersionOperator(): VersionComparisonOperator - { - return $this->phpVersionOperator; - } - - /** - * @return list - */ - public function groups(): array - { - return $this->groups; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollection.php deleted file mode 100644 index ba867273..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class TestDirectoryCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $directories; - - /** - * @param list $directories - */ - public static function fromArray(array $directories): self - { - return new self(...$directories); - } - - private function __construct(TestDirectory ...$directories) - { - $this->directories = $directories; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->directories; - } - - public function count(): int - { - return count($this->directories); - } - - public function getIterator(): TestDirectoryCollectionIterator - { - return new TestDirectoryCollectionIterator($this); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollectionIterator.php deleted file mode 100644 index fa57410a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestDirectoryCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class TestDirectoryCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $directories; - private int $position = 0; - - public function __construct(TestDirectoryCollection $directories) - { - $this->directories = $directories->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->directories); - } - - public function key(): int - { - return $this->position; - } - - public function current(): TestDirectory - { - return $this->directories[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFile.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFile.php deleted file mode 100644 index e658ff88..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFile.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use PHPUnit\Util\VersionComparisonOperator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class TestFile -{ - /** - * @var non-empty-string - */ - private string $path; - private string $phpVersion; - private VersionComparisonOperator $phpVersionOperator; - - /** - * @var list - */ - private array $groups; - - /** - * @param non-empty-string $path - * @param list $groups - */ - public function __construct(string $path, string $phpVersion, VersionComparisonOperator $phpVersionOperator, array $groups) - { - $this->path = $path; - $this->phpVersion = $phpVersion; - $this->phpVersionOperator = $phpVersionOperator; - $this->groups = $groups; - } - - /** - * @return non-empty-string - */ - public function path(): string - { - return $this->path; - } - - public function phpVersion(): string - { - return $this->phpVersion; - } - - public function phpVersionOperator(): VersionComparisonOperator - { - return $this->phpVersionOperator; - } - - /** - * @return list - */ - public function groups(): array - { - return $this->groups; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollection.php deleted file mode 100644 index 6d1ae279..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class TestFileCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $files; - - /** - * @param list $files - */ - public static function fromArray(array $files): self - { - return new self(...$files); - } - - private function __construct(TestFile ...$files) - { - $this->files = $files; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->files; - } - - public function count(): int - { - return count($this->files); - } - - public function getIterator(): TestFileCollectionIterator - { - return new TestFileCollectionIterator($this); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollectionIterator.php deleted file mode 100644 index ed328e9e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestFileCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class TestFileCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $files; - private int $position = 0; - - public function __construct(TestFileCollection $files) - { - $this->files = $files->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->files); - } - - public function key(): int - { - return $this->position; - } - - public function current(): TestFile - { - return $this->files[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuite.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuite.php deleted file mode 100644 index fdba72e0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuite.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class TestSuite -{ - /** - * @var non-empty-string - */ - private string $name; - private TestDirectoryCollection $directories; - private TestFileCollection $files; - private FileCollection $exclude; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name, TestDirectoryCollection $directories, TestFileCollection $files, FileCollection $exclude) - { - $this->name = $name; - $this->directories = $directories; - $this->files = $files; - $this->exclude = $exclude; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - public function directories(): TestDirectoryCollection - { - return $this->directories; - } - - public function files(): TestFileCollection - { - return $this->files; - } - - public function exclude(): FileCollection - { - return $this->exclude; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollection.php deleted file mode 100644 index 26c9a645..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollection.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class TestSuiteCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $testSuites; - - /** - * @param list $testSuites - */ - public static function fromArray(array $testSuites): self - { - return new self(...$testSuites); - } - - private function __construct(TestSuite ...$testSuites) - { - $this->testSuites = $testSuites; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->testSuites; - } - - public function count(): int - { - return count($this->testSuites); - } - - public function getIterator(): TestSuiteCollectionIterator - { - return new TestSuiteCollectionIterator($this); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollectionIterator.php deleted file mode 100644 index d0b0768a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/TestSuiteCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class TestSuiteCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $testSuites; - private int $position = 0; - - public function __construct(TestSuiteCollection $testSuites) - { - $this->testSuites = $testSuites->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->testSuites); - } - - public function key(): int - { - return $this->position; - } - - public function current(): TestSuite - { - return $this->testSuites[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Variable.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Variable.php deleted file mode 100644 index cc0425c8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Variable.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Variable -{ - private string $name; - private mixed $value; - private bool $force; - - public function __construct(string $name, mixed $value, bool $force) - { - $this->name = $name; - $this->value = $value; - $this->force = $force; - } - - public function name(): string - { - return $this->name; - } - - public function value(): mixed - { - return $this->value; - } - - public function force(): bool - { - return $this->force; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollection.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollection.php deleted file mode 100644 index 77fb4cff..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollection.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - * - * @template-implements IteratorAggregate - */ -final readonly class VariableCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $variables; - - /** - * @param list $variables - */ - public static function fromArray(array $variables): self - { - return new self(...$variables); - } - - private function __construct(Variable ...$variables) - { - $this->variables = $variables; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->variables; - } - - public function count(): int - { - return count($this->variables); - } - - public function getIterator(): VariableCollectionIterator - { - return new VariableCollectionIterator($this); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollectionIterator.php deleted file mode 100644 index 2e32194c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/VariableCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Configuration; - -use function count; -use Iterator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @template-implements Iterator - */ -final class VariableCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $variables; - private int $position = 0; - - public function __construct(VariableCollection $variables) - { - $this->variables = $variables->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->variables); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Variable - { - return $this->variables[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php deleted file mode 100644 index d66f58f1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage; - -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Clover; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Cobertura; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Crap4j; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Html; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\OpenClover; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Php; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Text; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Xml; -use PHPUnit\TextUI\XmlConfiguration\Exception; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class CodeCoverage -{ - private bool $pathCoverage; - private bool $includeUncoveredFiles; - private bool $ignoreDeprecatedCodeUnits; - private bool $disableCodeCoverageIgnore; - private ?Clover $clover; - private ?Cobertura $cobertura; - private ?Crap4j $crap4j; - private ?Html $html; - private ?OpenClover $openClover; - private ?Php $php; - private ?Text $text; - private ?Xml $xml; - - public function __construct(bool $pathCoverage, bool $includeUncoveredFiles, bool $ignoreDeprecatedCodeUnits, bool $disableCodeCoverageIgnore, ?Clover $clover, ?Cobertura $cobertura, ?Crap4j $crap4j, ?Html $html, ?OpenClover $openClover, ?Php $php, ?Text $text, ?Xml $xml) - { - $this->pathCoverage = $pathCoverage; - $this->includeUncoveredFiles = $includeUncoveredFiles; - $this->ignoreDeprecatedCodeUnits = $ignoreDeprecatedCodeUnits; - $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; - $this->clover = $clover; - $this->cobertura = $cobertura; - $this->crap4j = $crap4j; - $this->html = $html; - $this->openClover = $openClover; - $this->php = $php; - $this->text = $text; - $this->xml = $xml; - } - - public function pathCoverage(): bool - { - return $this->pathCoverage; - } - - public function includeUncoveredFiles(): bool - { - return $this->includeUncoveredFiles; - } - - public function ignoreDeprecatedCodeUnits(): bool - { - return $this->ignoreDeprecatedCodeUnits; - } - - public function disableCodeCoverageIgnore(): bool - { - return $this->disableCodeCoverageIgnore; - } - - /** - * @phpstan-assert-if-true !null $this->clover - */ - public function hasClover(): bool - { - return $this->clover !== null; - } - - /** - * @throws Exception - */ - public function clover(): Clover - { - if (!$this->hasClover()) { - throw new Exception( - 'Code Coverage report "Clover XML" has not been configured', - ); - } - - return $this->clover; - } - - /** - * @phpstan-assert-if-true !null $this->cobertura - */ - public function hasCobertura(): bool - { - return $this->cobertura !== null; - } - - /** - * @throws Exception - */ - public function cobertura(): Cobertura - { - if (!$this->hasCobertura()) { - throw new Exception( - 'Code Coverage report "Cobertura XML" has not been configured', - ); - } - - return $this->cobertura; - } - - /** - * @phpstan-assert-if-true !null $this->crap4j - */ - public function hasCrap4j(): bool - { - return $this->crap4j !== null; - } - - /** - * @throws Exception - */ - public function crap4j(): Crap4j - { - if (!$this->hasCrap4j()) { - throw new Exception( - 'Code Coverage report "Crap4J" has not been configured', - ); - } - - return $this->crap4j; - } - - /** - * @phpstan-assert-if-true !null $this->html - */ - public function hasHtml(): bool - { - return $this->html !== null; - } - - /** - * @throws Exception - */ - public function html(): Html - { - if (!$this->hasHtml()) { - throw new Exception( - 'Code Coverage report "HTML" has not been configured', - ); - } - - return $this->html; - } - - /** - * @phpstan-assert-if-true !null $this->openClover - */ - public function hasOpenClover(): bool - { - return $this->openClover !== null; - } - - /** - * @throws Exception - */ - public function openClover(): OpenClover - { - if (!$this->hasOpenClover()) { - throw new Exception( - 'Code Coverage report "OpenClover XML" has not been configured', - ); - } - - return $this->openClover; - } - - /** - * @phpstan-assert-if-true !null $this->php - */ - public function hasPhp(): bool - { - return $this->php !== null; - } - - /** - * @throws Exception - */ - public function php(): Php - { - if (!$this->hasPhp()) { - throw new Exception( - 'Code Coverage report "PHP" has not been configured', - ); - } - - return $this->php; - } - - /** - * @phpstan-assert-if-true !null $this->text - */ - public function hasText(): bool - { - return $this->text !== null; - } - - /** - * @throws Exception - */ - public function text(): Text - { - if (!$this->hasText()) { - throw new Exception( - 'Code Coverage report "Text" has not been configured', - ); - } - - return $this->text; - } - - /** - * @phpstan-assert-if-true !null $this->xml - */ - public function hasXml(): bool - { - return $this->xml !== null; - } - - /** - * @throws Exception - */ - public function xml(): Xml - { - if (!$this->hasXml()) { - throw new Exception( - 'Code Coverage report "XML" has not been configured', - ); - } - - return $this->xml; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Clover.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Clover.php deleted file mode 100644 index cdaf122e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Clover.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Clover -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Cobertura.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Cobertura.php deleted file mode 100644 index 015dba39..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Cobertura.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Cobertura -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Crap4j.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Crap4j.php deleted file mode 100644 index 24aa66dd..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Crap4j.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Crap4j -{ - private File $target; - private int $threshold; - - public function __construct(File $target, int $threshold) - { - $this->target = $target; - $this->threshold = $threshold; - } - - public function target(): File - { - return $this->target; - } - - public function threshold(): int - { - return $this->threshold; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Html.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Html.php deleted file mode 100644 index dde8880f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Html.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\Directory; -use PHPUnit\TextUI\Configuration\NoCustomCssFileException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Html -{ - private Directory $target; - private int $lowUpperBound; - private int $highLowerBound; - private string $colorSuccessLow; - private string $colorSuccessMedium; - private string $colorSuccessHigh; - private string $colorWarning; - private string $colorDanger; - private ?string $customCssFile; - - public function __construct(Directory $target, int $lowUpperBound, int $highLowerBound, string $colorSuccessLow, string $colorSuccessMedium, string $colorSuccessHigh, string $colorWarning, string $colorDanger, ?string $customCssFile) - { - $this->target = $target; - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - $this->colorSuccessLow = $colorSuccessLow; - $this->colorSuccessMedium = $colorSuccessMedium; - $this->colorSuccessHigh = $colorSuccessHigh; - $this->colorWarning = $colorWarning; - $this->colorDanger = $colorDanger; - $this->customCssFile = $customCssFile; - } - - public function target(): Directory - { - return $this->target; - } - - public function lowUpperBound(): int - { - return $this->lowUpperBound; - } - - public function highLowerBound(): int - { - return $this->highLowerBound; - } - - public function colorSuccessLow(): string - { - return $this->colorSuccessLow; - } - - public function colorSuccessMedium(): string - { - return $this->colorSuccessMedium; - } - - public function colorSuccessHigh(): string - { - return $this->colorSuccessHigh; - } - - public function colorWarning(): string - { - return $this->colorWarning; - } - - public function colorDanger(): string - { - return $this->colorDanger; - } - - /** - * @phpstan-assert-if-true !null $this->customCssFile - */ - public function hasCustomCssFile(): bool - { - return $this->customCssFile !== null; - } - - /** - * @throws NoCustomCssFileException - */ - public function customCssFile(): string - { - if (!$this->hasCustomCssFile()) { - throw new NoCustomCssFileException; - } - - return $this->customCssFile; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/OpenClover.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/OpenClover.php deleted file mode 100644 index e20a24d0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/OpenClover.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class OpenClover -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php deleted file mode 100644 index ae022e7a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Php -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Text.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Text.php deleted file mode 100644 index cf04d910..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Text.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Text -{ - private File $target; - private bool $showUncoveredFiles; - private bool $showOnlySummary; - - public function __construct(File $target, bool $showUncoveredFiles, bool $showOnlySummary) - { - $this->target = $target; - $this->showUncoveredFiles = $showUncoveredFiles; - $this->showOnlySummary = $showOnlySummary; - } - - public function target(): File - { - return $this->target; - } - - public function showUncoveredFiles(): bool - { - return $this->showUncoveredFiles; - } - - public function showOnlySummary(): bool - { - return $this->showOnlySummary; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Xml.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Xml.php deleted file mode 100644 index 62f99a06..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Xml.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report; - -use PHPUnit\TextUI\Configuration\Directory; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Xml -{ - private Directory $target; - - public function __construct(Directory $target) - { - $this->target = $target; - } - - public function target(): Directory - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Configuration.php deleted file mode 100644 index 378022b0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Configuration.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\TextUI\Configuration\ExtensionBootstrapCollection; -use PHPUnit\TextUI\Configuration\Php; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\TestSuiteCollection; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage; -use PHPUnit\TextUI\XmlConfiguration\Logging\Logging; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -abstract readonly class Configuration -{ - private ExtensionBootstrapCollection $extensions; - private Source $source; - private CodeCoverage $codeCoverage; - private Groups $groups; - private Logging $logging; - private Php $php; - private PHPUnit $phpunit; - private TestSuiteCollection $testSuite; - - public function __construct(ExtensionBootstrapCollection $extensions, Source $source, CodeCoverage $codeCoverage, Groups $groups, Logging $logging, Php $php, PHPUnit $phpunit, TestSuiteCollection $testSuite) - { - $this->extensions = $extensions; - $this->source = $source; - $this->codeCoverage = $codeCoverage; - $this->groups = $groups; - $this->logging = $logging; - $this->php = $php; - $this->phpunit = $phpunit; - $this->testSuite = $testSuite; - } - - public function extensions(): ExtensionBootstrapCollection - { - return $this->extensions; - } - - public function source(): Source - { - return $this->source; - } - - public function codeCoverage(): CodeCoverage - { - return $this->codeCoverage; - } - - public function groups(): Groups - { - return $this->groups; - } - - public function logging(): Logging - { - return $this->logging; - } - - public function php(): Php - { - return $this->php; - } - - public function phpunit(): PHPUnit - { - return $this->phpunit; - } - - public function testSuite(): TestSuiteCollection - { - return $this->testSuite; - } - - /** - * @phpstan-assert-if-true DefaultConfiguration $this - */ - public function isDefault(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true LoadedFromFileConfiguration $this - */ - public function wasLoadedFromFile(): bool - { - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php deleted file mode 100644 index de16474a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\TextUI\Configuration\ConstantCollection; -use PHPUnit\TextUI\Configuration\DirectoryCollection; -use PHPUnit\TextUI\Configuration\ExtensionBootstrapCollection; -use PHPUnit\TextUI\Configuration\FileCollection; -use PHPUnit\TextUI\Configuration\FilterDirectoryCollection as CodeCoverageFilterDirectoryCollection; -use PHPUnit\TextUI\Configuration\GroupCollection; -use PHPUnit\TextUI\Configuration\IniSettingCollection; -use PHPUnit\TextUI\Configuration\Php; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\TestSuiteCollection; -use PHPUnit\TextUI\Configuration\VariableCollection; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage; -use PHPUnit\TextUI\XmlConfiguration\Logging\Logging; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class DefaultConfiguration extends Configuration -{ - public static function create(): self - { - return new self( - ExtensionBootstrapCollection::fromArray([]), - new Source( - null, - false, - CodeCoverageFilterDirectoryCollection::fromArray([]), - FileCollection::fromArray([]), - CodeCoverageFilterDirectoryCollection::fromArray([]), - FileCollection::fromArray([]), - false, - false, - false, - false, - false, - false, - false, - false, - false, - [ - 'functions' => [], - 'methods' => [], - ], - false, - false, - false, - ), - new CodeCoverage( - false, - true, - false, - false, - null, - null, - null, - null, - null, - null, - null, - null, - ), - new Groups( - GroupCollection::fromArray([]), - GroupCollection::fromArray([]), - ), - new Logging( - null, - null, - null, - null, - null, - ), - new Php( - DirectoryCollection::fromArray([]), - IniSettingCollection::fromArray([]), - ConstantCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - VariableCollection::fromArray([]), - ), - new PHPUnit( - null, - true, - 80, - \PHPUnit\TextUI\Configuration\Configuration::COLOR_DEFAULT, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - null, - [], - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - null, - false, - false, - true, - false, - false, - 1, - 1, - 10, - 60, - null, - TestSuiteSorter::ORDER_DEFAULT, - true, - false, - false, - false, - false, - false, - false, - 100, - 10, - ), - TestSuiteCollection::fromArray([]), - ); - } - - public function isDefault(): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php deleted file mode 100644 index 60c3c9ac..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Exception extends RuntimeException implements \PHPUnit\Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php deleted file mode 100644 index 4fc4ca2e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function str_replace; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Generator -{ - /** - * @var string - */ - private const string TEMPLATE = <<<'EOT' - - - - - {tests_directory} - - - - - - {src_directory} - - - - -EOT; - - public function generateDefaultConfiguration(string $schemaLocation, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory): string - { - return str_replace( - [ - '{schema_location}', - '{bootstrap_script}', - '{tests_directory}', - '{src_directory}', - '{cache_directory}', - ], - [ - $schemaLocation, - $bootstrapScript, - $testsDirectory, - $srcDirectory, - $cacheDirectory, - ], - self::TEMPLATE, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Groups.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Groups.php deleted file mode 100644 index 1a7cc6b4..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Groups.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\TextUI\Configuration\GroupCollection; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Groups -{ - private GroupCollection $include; - private GroupCollection $exclude; - - public function __construct(GroupCollection $include, GroupCollection $exclude) - { - $this->include = $include; - $this->exclude = $exclude; - } - - public function hasInclude(): bool - { - return !$this->include->isEmpty(); - } - - public function include(): GroupCollection - { - return $this->include; - } - - public function hasExclude(): bool - { - return !$this->exclude->isEmpty(); - } - - public function exclude(): GroupCollection - { - return $this->exclude; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/LoadedFromFileConfiguration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/LoadedFromFileConfiguration.php deleted file mode 100644 index e69d137f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/LoadedFromFileConfiguration.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\TextUI\Configuration\ExtensionBootstrapCollection; -use PHPUnit\TextUI\Configuration\Php; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\TestSuiteCollection; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage; -use PHPUnit\TextUI\XmlConfiguration\Logging\Logging; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class LoadedFromFileConfiguration extends Configuration -{ - /** - * @var non-empty-string - */ - private string $filename; - private ValidationResult $validationResult; - - /** - * @param non-empty-string $filename - */ - public function __construct(string $filename, ValidationResult $validationResult, ExtensionBootstrapCollection $extensions, Source $source, CodeCoverage $codeCoverage, Groups $groups, Logging $logging, Php $php, PHPUnit $phpunit, TestSuiteCollection $testSuite) - { - $this->filename = $filename; - $this->validationResult = $validationResult; - - parent::__construct( - $extensions, - $source, - $codeCoverage, - $groups, - $logging, - $php, - $phpunit, - $testSuite, - ); - } - - /** - * @return non-empty-string - */ - public function filename(): string - { - return $this->filename; - } - - public function hasValidationErrors(): bool - { - return $this->validationResult->hasValidationErrors(); - } - - public function validationErrors(): string - { - return $this->validationResult->asString(); - } - - public function wasLoadedFromFile(): bool - { - return true; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php deleted file mode 100644 index 886959fd..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Loader.php +++ /dev/null @@ -1,1225 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use const DIRECTORY_SEPARATOR; -use const PHP_EOL; -use const PHP_VERSION; -use function assert; -use function defined; -use function dirname; -use function explode; -use function is_numeric; -use function preg_match; -use function realpath; -use function sprintf; -use function str_contains; -use function str_starts_with; -use function strlen; -use function strtolower; -use function substr; -use function trim; -use DOMDocument; -use DOMElement; -use DOMNode; -use DOMNodeList; -use DOMXPath; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\Runner\Version; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\Constant; -use PHPUnit\TextUI\Configuration\ConstantCollection; -use PHPUnit\TextUI\Configuration\Directory; -use PHPUnit\TextUI\Configuration\DirectoryCollection; -use PHPUnit\TextUI\Configuration\ExtensionBootstrap; -use PHPUnit\TextUI\Configuration\ExtensionBootstrapCollection; -use PHPUnit\TextUI\Configuration\File; -use PHPUnit\TextUI\Configuration\FileCollection; -use PHPUnit\TextUI\Configuration\FilterDirectory; -use PHPUnit\TextUI\Configuration\FilterDirectoryCollection; -use PHPUnit\TextUI\Configuration\Group; -use PHPUnit\TextUI\Configuration\GroupCollection; -use PHPUnit\TextUI\Configuration\IniSetting; -use PHPUnit\TextUI\Configuration\IniSettingCollection; -use PHPUnit\TextUI\Configuration\Php; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\TestDirectory; -use PHPUnit\TextUI\Configuration\TestDirectoryCollection; -use PHPUnit\TextUI\Configuration\TestFile; -use PHPUnit\TextUI\Configuration\TestFileCollection; -use PHPUnit\TextUI\Configuration\TestSuite as TestSuiteConfiguration; -use PHPUnit\TextUI\Configuration\TestSuiteCollection; -use PHPUnit\TextUI\Configuration\Variable; -use PHPUnit\TextUI\Configuration\VariableCollection; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Clover; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Cobertura; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Crap4j; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Html as CodeCoverageHtml; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\OpenClover; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Php as CodeCoveragePhp; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Text as CodeCoverageText; -use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Xml as CodeCoverageXml; -use PHPUnit\TextUI\XmlConfiguration\Logging\Junit; -use PHPUnit\TextUI\XmlConfiguration\Logging\Logging; -use PHPUnit\TextUI\XmlConfiguration\Logging\Otr; -use PHPUnit\TextUI\XmlConfiguration\Logging\TeamCity; -use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html as TestDoxHtml; -use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text as TestDoxText; -use PHPUnit\Util\VersionComparisonOperator; -use PHPUnit\Util\Xml\Loader as XmlLoader; -use PHPUnit\Util\Xml\XmlException; -use SebastianBergmann\CodeCoverage\Report\Html\Colors; -use SebastianBergmann\CodeCoverage\Report\Thresholds; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Loader -{ - /** - * @throws Exception - */ - public function load(string $filename): LoadedFromFileConfiguration - { - try { - $document = (new XmlLoader)->loadFile($filename); - } catch (XmlException $e) { - throw new Exception( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - $xpath = new DOMXPath($document); - - try { - $xsdFilename = (new SchemaFinder)->find(Version::series()); - } catch (CannotFindSchemaException $e) { - throw new Exception( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - - $configurationFileRealpath = realpath($filename); - - assert($configurationFileRealpath !== false && $configurationFileRealpath !== ''); - - $validationResult = (new Validator)->validate($document, $xsdFilename); - - try { - return new LoadedFromFileConfiguration( - $configurationFileRealpath, - $validationResult, - $this->extensions($xpath), - $this->source($configurationFileRealpath, $xpath), - $this->codeCoverage($configurationFileRealpath, $xpath), - $this->groups($xpath), - $this->logging($configurationFileRealpath, $xpath), - $this->php($configurationFileRealpath, $xpath), - $this->phpunit($configurationFileRealpath, $document, $xpath), - $this->testSuite($configurationFileRealpath, $xpath), - ); - } catch (Throwable $t) { - $message = sprintf( - 'Cannot load XML configuration file %s', - $configurationFileRealpath, - ); - - if ($validationResult->hasValidationErrors()) { - $message .= ' because it has validation errors:' . PHP_EOL . $validationResult->asString(); - } - - throw new Exception($message, previous: $t); - } - } - - private function logging(string $filename, DOMXPath $xpath): Logging - { - $junit = null; - $element = $this->element($xpath, 'logging/junit'); - - if ($element !== null) { - $junit = new Junit( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $otr = null; - $element = $this->element($xpath, 'logging/otr'); - - if ($element !== null) { - $otr = new Otr( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - $this->parseBooleanAttribute($element, 'includeGitInformation', false), - ); - } - - $teamCity = null; - $element = $this->element($xpath, 'logging/teamcity'); - - if ($element !== null) { - $teamCity = new TeamCity( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $testDoxHtml = null; - $element = $this->element($xpath, 'logging/testdoxHtml'); - - if ($element !== null) { - $testDoxHtml = new TestDoxHtml( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $testDoxText = null; - $element = $this->element($xpath, 'logging/testdoxText'); - - if ($element !== null) { - $testDoxText = new TestDoxText( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - return new Logging( - $junit, - $otr, - $teamCity, - $testDoxHtml, - $testDoxText, - ); - } - - private function extensions(DOMXPath $xpath): ExtensionBootstrapCollection - { - $extensionBootstrappers = []; - - $bootstrapNodes = $xpath->query('extensions/bootstrap'); - - assert($bootstrapNodes instanceof DOMNodeList); - - foreach ($bootstrapNodes as $bootstrap) { - assert($bootstrap instanceof DOMElement); - - $parameters = []; - - $parameterNodes = $xpath->query('parameter', $bootstrap); - - assert($parameterNodes instanceof DOMNodeList); - - foreach ($parameterNodes as $parameter) { - assert($parameter instanceof DOMElement); - - $parameters[$parameter->getAttribute('name')] = $parameter->getAttribute('value'); - } - - $className = $bootstrap->getAttribute('class'); - - assert($className !== ''); - - $extensionBootstrappers[] = new ExtensionBootstrap( - $className, - $parameters, - ); - } - - return ExtensionBootstrapCollection::fromArray($extensionBootstrappers); - } - - /** - * @return non-empty-string - */ - private function toAbsolutePath(string $filename, string $path): string - { - $path = trim($path); - - if (str_starts_with($path, '/')) { - return $path; - } - - // Matches the following on Windows: - // - \\NetworkComputer\Path - // - \\.\D: - // - \\.\c: - // - C:\Windows - // - C:\windows - // - C:/windows - // - c:/windows - if (defined('PHP_WINDOWS_VERSION_BUILD') && - $path !== '' && - ($path[0] === '\\' || (strlen($path) >= 3 && preg_match('#^[A-Z]:[/\\\]#i', substr($path, 0, 3))))) { - return $path; - } - - if (str_contains($path, '://')) { - return $path; - } - - return dirname($filename) . DIRECTORY_SEPARATOR . $path; - } - - private function source(string $filename, DOMXPath $xpath): Source - { - $baseline = null; - $restrictNotices = false; - $restrictWarnings = false; - $ignoreSuppressionOfDeprecations = false; - $ignoreSuppressionOfPhpDeprecations = false; - $ignoreSuppressionOfErrors = false; - $ignoreSuppressionOfNotices = false; - $ignoreSuppressionOfPhpNotices = false; - $ignoreSuppressionOfWarnings = false; - $ignoreSuppressionOfPhpWarnings = false; - $ignoreSelfDeprecations = false; - $ignoreDirectDeprecations = false; - $ignoreIndirectDeprecations = false; - - $element = $this->element($xpath, 'source'); - - if ($element !== null) { - $baseline = $this->parseStringAttribute($element, 'baseline'); - - if ($baseline !== null) { - $baseline = $this->toAbsolutePath($filename, $baseline); - } - - $restrictNotices = $this->parseBooleanAttribute($element, 'restrictNotices', false); - $restrictWarnings = $this->parseBooleanAttribute($element, 'restrictWarnings', false); - $ignoreSuppressionOfDeprecations = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfDeprecations', false); - $ignoreSuppressionOfPhpDeprecations = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfPhpDeprecations', false); - $ignoreSuppressionOfErrors = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfErrors', false); - $ignoreSuppressionOfNotices = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfNotices', false); - $ignoreSuppressionOfPhpNotices = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfPhpNotices', false); - $ignoreSuppressionOfWarnings = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfWarnings', false); - $ignoreSuppressionOfPhpWarnings = $this->parseBooleanAttribute($element, 'ignoreSuppressionOfPhpWarnings', false); - $ignoreSelfDeprecations = $this->parseBooleanAttribute($element, 'ignoreSelfDeprecations', false); - $ignoreDirectDeprecations = $this->parseBooleanAttribute($element, 'ignoreDirectDeprecations', false); - $ignoreIndirectDeprecations = $this->parseBooleanAttribute($element, 'ignoreIndirectDeprecations', false); - } - - $deprecationTriggers = [ - 'functions' => [], - 'methods' => [], - ]; - - $functionNodes = $xpath->query('source/deprecationTrigger/function'); - - assert($functionNodes instanceof DOMNodeList); - - foreach ($functionNodes as $functionNode) { - assert($functionNode instanceof DOMElement); - - $deprecationTriggers['functions'][] = $functionNode->textContent; - } - - $methodNodes = $xpath->query('source/deprecationTrigger/method'); - - assert($methodNodes instanceof DOMNodeList); - - foreach ($methodNodes as $methodNode) { - assert($methodNode instanceof DOMElement); - - $deprecationTriggers['methods'][] = $methodNode->textContent; - } - - return new Source( - $baseline, - false, - $this->readFilterDirectories($filename, $xpath, 'source/include/directory'), - $this->readFilterFiles($filename, $xpath, 'source/include/file'), - $this->readFilterDirectories($filename, $xpath, 'source/exclude/directory'), - $this->readFilterFiles($filename, $xpath, 'source/exclude/file'), - $restrictNotices, - $restrictWarnings, - $ignoreSuppressionOfDeprecations, - $ignoreSuppressionOfPhpDeprecations, - $ignoreSuppressionOfErrors, - $ignoreSuppressionOfNotices, - $ignoreSuppressionOfPhpNotices, - $ignoreSuppressionOfWarnings, - $ignoreSuppressionOfPhpWarnings, - $deprecationTriggers, - $ignoreSelfDeprecations, - $ignoreDirectDeprecations, - $ignoreIndirectDeprecations, - ); - } - - private function codeCoverage(string $filename, DOMXPath $xpath): CodeCoverage - { - $pathCoverage = false; - $includeUncoveredFiles = true; - $ignoreDeprecatedCodeUnits = false; - $disableCodeCoverageIgnore = false; - - $element = $this->element($xpath, 'coverage'); - - if ($element !== null) { - $pathCoverage = $this->parseBooleanAttribute( - $element, - 'pathCoverage', - false, - ); - - $includeUncoveredFiles = $this->parseBooleanAttribute( - $element, - 'includeUncoveredFiles', - true, - ); - - $ignoreDeprecatedCodeUnits = $this->parseBooleanAttribute( - $element, - 'ignoreDeprecatedCodeUnits', - false, - ); - - $disableCodeCoverageIgnore = $this->parseBooleanAttribute( - $element, - 'disableCodeCoverageIgnore', - false, - ); - } - - $clover = null; - $element = $this->element($xpath, 'coverage/report/clover'); - - if ($element !== null) { - $clover = new Clover( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $cobertura = null; - $element = $this->element($xpath, 'coverage/report/cobertura'); - - if ($element !== null) { - $cobertura = new Cobertura( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $crap4j = null; - $element = $this->element($xpath, 'coverage/report/crap4j'); - - if ($element !== null) { - $crap4j = new Crap4j( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - $this->parseIntegerAttribute($element, 'threshold', 30), - ); - } - - $html = null; - $element = $this->element($xpath, 'coverage/report/html'); - - if ($element !== null) { - $defaultColors = Colors::default(); - $defaultThresholds = Thresholds::default(); - - $html = new CodeCoverageHtml( - new Directory( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputDirectory'), - ), - ), - $this->parseIntegerAttribute($element, 'lowUpperBound', $defaultThresholds->lowUpperBound()), - $this->parseIntegerAttribute($element, 'highLowerBound', $defaultThresholds->highLowerBound()), - $this->parseStringAttributeWithDefault($element, 'colorSuccessLow', $defaultColors->successLow()), - $this->parseStringAttributeWithDefault($element, 'colorSuccessMedium', $defaultColors->successMedium()), - $this->parseStringAttributeWithDefault($element, 'colorSuccessHigh', $defaultColors->successHigh()), - $this->parseStringAttributeWithDefault($element, 'colorWarning', $defaultColors->warning()), - $this->parseStringAttributeWithDefault($element, 'colorDanger', $defaultColors->danger()), - $this->parseStringAttribute($element, 'customCssFile'), - ); - } - - $openClover = null; - $element = $this->element($xpath, 'coverage/report/openclover'); - - if ($element !== null) { - $openClover = new OpenClover( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $php = null; - $element = $this->element($xpath, 'coverage/report/php'); - - if ($element !== null) { - $php = new CodeCoveragePhp( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - ); - } - - $text = null; - $element = $this->element($xpath, 'coverage/report/text'); - - if ($element !== null) { - $text = new CodeCoverageText( - new File( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputFile'), - ), - ), - $this->parseBooleanAttribute($element, 'showUncoveredFiles', false), - $this->parseBooleanAttribute($element, 'showOnlySummary', false), - ); - } - - $xml = null; - $element = $this->element($xpath, 'coverage/report/xml'); - - if ($element !== null) { - $xml = new CodeCoverageXml( - new Directory( - $this->toAbsolutePath( - $filename, - (string) $this->parseStringAttribute($element, 'outputDirectory'), - ), - ), - ); - } - - return new CodeCoverage( - $pathCoverage, - $includeUncoveredFiles, - $ignoreDeprecatedCodeUnits, - $disableCodeCoverageIgnore, - $clover, - $cobertura, - $crap4j, - $html, - $openClover, - $php, - $text, - $xml, - ); - } - - private function booleanFromString(string $value, bool $default): bool - { - if (strtolower($value) === 'false') { - return false; - } - - if (strtolower($value) === 'true') { - return true; - } - - return $default; - } - - private function valueFromString(string $value): bool|string - { - if (strtolower($value) === 'false') { - return false; - } - - if (strtolower($value) === 'true') { - return true; - } - - return $value; - } - - private function readFilterDirectories(string $filename, DOMXPath $xpath, string $query): FilterDirectoryCollection - { - $directories = []; - - $directoryNodes = $xpath->query($query); - - assert($directoryNodes instanceof DOMNodeList); - - foreach ($directoryNodes as $directoryNode) { - assert($directoryNode instanceof DOMElement); - - $directoryPath = $directoryNode->textContent; - - if ($directoryPath === '') { - continue; - } - - $directories[] = new FilterDirectory( - $this->toAbsolutePath($filename, $directoryPath), - $directoryNode->hasAttribute('prefix') ? $directoryNode->getAttribute('prefix') : '', - $directoryNode->hasAttribute('suffix') ? $directoryNode->getAttribute('suffix') : '.php', - ); - } - - return FilterDirectoryCollection::fromArray($directories); - } - - private function readFilterFiles(string $filename, DOMXPath $xpath, string $query): FileCollection - { - $files = []; - - $fileNodes = $xpath->query($query); - - assert($fileNodes instanceof DOMNodeList); - - foreach ($fileNodes as $fileNode) { - assert($fileNode instanceof DOMNode); - - $filePath = $fileNode->textContent; - - if ($filePath !== '') { - $files[] = new File($this->toAbsolutePath($filename, $filePath)); - } - } - - return FileCollection::fromArray($files); - } - - private function groups(DOMXPath $xpath): Groups - { - $include = []; - $exclude = []; - - $groupNodes = $xpath->query('groups/include/group'); - - assert($groupNodes instanceof DOMNodeList); - - foreach ($groupNodes as $groupNode) { - assert($groupNode instanceof DOMNode); - - $include[] = new Group($groupNode->textContent); - } - - $groupNodes = $xpath->query('groups/exclude/group'); - - assert($groupNodes instanceof DOMNodeList); - - foreach ($groupNodes as $groupNode) { - assert($groupNode instanceof DOMNode); - - $exclude[] = new Group($groupNode->textContent); - } - - return new Groups( - GroupCollection::fromArray($include), - GroupCollection::fromArray($exclude), - ); - } - - private function parseBooleanAttribute(DOMElement $element, string $attribute, bool $default): bool - { - if (!$element->hasAttribute($attribute)) { - return $default; - } - - return $this->booleanFromString( - $element->getAttribute($attribute), - false, - ); - } - - private function parseIntegerAttribute(DOMElement $element, string $attribute, int $default): int - { - if (!$element->hasAttribute($attribute)) { - return $default; - } - - return $this->parseInteger( - $element->getAttribute($attribute), - $default, - ); - } - - private function parseStringAttribute(DOMElement $element, string $attribute): ?string - { - if (!$element->hasAttribute($attribute)) { - return null; - } - - return $element->getAttribute($attribute); - } - - private function parseStringAttributeWithDefault(DOMElement $element, string $attribute, string $default): string - { - if (!$element->hasAttribute($attribute)) { - return $default; - } - - return $element->getAttribute($attribute); - } - - private function parseInteger(string $value, int $default): int - { - if (is_numeric($value)) { - return (int) $value; - } - - return $default; - } - - private function php(string $filename, DOMXPath $xpath): Php - { - $includePaths = []; - - $includePathNodes = $xpath->query('php/includePath'); - - assert($includePathNodes instanceof DOMNodeList); - - foreach ($includePathNodes as $includePath) { - assert($includePath instanceof DOMNode); - - $path = $includePath->textContent; - - if ($path !== '') { - $includePaths[] = new Directory($this->toAbsolutePath($filename, $path)); - } - } - - $iniSettings = []; - - $iniNodes = $xpath->query('php/ini'); - - assert($iniNodes instanceof DOMNodeList); - - foreach ($iniNodes as $ini) { - assert($ini instanceof DOMElement); - - $iniSettings[] = new IniSetting( - $ini->getAttribute('name'), - $ini->getAttribute('value'), - ); - } - - $constants = []; - - $constNodes = $xpath->query('php/const'); - - assert($constNodes instanceof DOMNodeList); - - foreach ($constNodes as $constNode) { - assert($constNode instanceof DOMElement); - - $value = $constNode->getAttribute('value'); - - $constants[] = new Constant( - $constNode->getAttribute('name'), - $this->valueFromString($value), - ); - } - - $variables = [ - 'var' => [], - 'env' => [], - 'post' => [], - 'get' => [], - 'cookie' => [], - 'server' => [], - 'files' => [], - 'request' => [], - ]; - - foreach (['var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request'] as $array) { - $varNodes = $xpath->query('php/' . $array); - - assert($varNodes instanceof DOMNodeList); - - foreach ($varNodes as $var) { - assert($var instanceof DOMElement); - - $name = $var->getAttribute('name'); - $value = $var->getAttribute('value'); - $force = false; - $verbatim = false; - - if ($var->hasAttribute('force')) { - $force = $this->booleanFromString($var->getAttribute('force'), false); - } - - if ($var->hasAttribute('verbatim')) { - $verbatim = $this->booleanFromString($var->getAttribute('verbatim'), false); - } - - if (!$verbatim) { - $value = $this->valueFromString($value); - } - - $variables[$array][] = new Variable($name, $value, $force); - } - } - - return new Php( - DirectoryCollection::fromArray($includePaths), - IniSettingCollection::fromArray($iniSettings), - ConstantCollection::fromArray($constants), - VariableCollection::fromArray($variables['var']), - VariableCollection::fromArray($variables['env']), - VariableCollection::fromArray($variables['post']), - VariableCollection::fromArray($variables['get']), - VariableCollection::fromArray($variables['cookie']), - VariableCollection::fromArray($variables['server']), - VariableCollection::fromArray($variables['files']), - VariableCollection::fromArray($variables['request']), - ); - } - - private function phpunit(string $filename, DOMDocument $document, DOMXPath $xpath): PHPUnit - { - $executionOrder = TestSuiteSorter::ORDER_DEFAULT; - $defectsFirst = false; - $resolveDependencies = $this->parseBooleanAttribute($document->documentElement, 'resolveDependencies', true); - - if ($document->documentElement->hasAttribute('executionOrder')) { - foreach (explode(',', $document->documentElement->getAttribute('executionOrder')) as $order) { - switch ($order) { - case 'default': - $executionOrder = TestSuiteSorter::ORDER_DEFAULT; - $defectsFirst = false; - $resolveDependencies = true; - - break; - - case 'depends': - $resolveDependencies = true; - - break; - - case 'no-depends': - $resolveDependencies = false; - - break; - - case 'defects': - $defectsFirst = true; - - break; - - case 'duration': - $executionOrder = TestSuiteSorter::ORDER_DURATION; - - break; - - case 'random': - $executionOrder = TestSuiteSorter::ORDER_RANDOMIZED; - - break; - - case 'reverse': - $executionOrder = TestSuiteSorter::ORDER_REVERSED; - - break; - - case 'size': - $executionOrder = TestSuiteSorter::ORDER_SIZE; - - break; - } - } - } - - $cacheDirectory = $this->parseStringAttribute($document->documentElement, 'cacheDirectory'); - - if ($cacheDirectory !== null) { - $cacheDirectory = $this->toAbsolutePath($filename, $cacheDirectory); - } - - $bootstrap = $this->parseStringAttribute($document->documentElement, 'bootstrap'); - - if ($bootstrap !== null) { - $bootstrap = $this->toAbsolutePath($filename, $bootstrap); - } - - $extensionsDirectory = $this->parseStringAttribute($document->documentElement, 'extensionsDirectory'); - - if ($extensionsDirectory !== null) { - $extensionsDirectory = $this->toAbsolutePath($filename, $extensionsDirectory); - } - - $backupStaticProperties = false; - - if ($document->documentElement->hasAttribute('backupStaticProperties')) { - $backupStaticProperties = $this->parseBooleanAttribute($document->documentElement, 'backupStaticProperties', false); - } - - $requireCoverageMetadata = false; - - if ($document->documentElement->hasAttribute('requireCoverageMetadata')) { - $requireCoverageMetadata = $this->parseBooleanAttribute($document->documentElement, 'requireCoverageMetadata', false); - } - - $beStrictAboutCoverageMetadata = false; - - if ($document->documentElement->hasAttribute('beStrictAboutCoverageMetadata')) { - $beStrictAboutCoverageMetadata = $this->parseBooleanAttribute($document->documentElement, 'beStrictAboutCoverageMetadata', false); - } - - $shortenArraysForExportThreshold = $this->parseIntegerAttribute($document->documentElement, 'shortenArraysForExportThreshold', 10); - - if ($shortenArraysForExportThreshold < 0) { - $shortenArraysForExportThreshold = 0; - } - - return new PHPUnit( - $cacheDirectory, - $this->parseBooleanAttribute($document->documentElement, 'cacheResult', true), - $this->parseColumns($document), - $this->parseColors($document), - $this->parseBooleanAttribute($document->documentElement, 'stderr', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnAllIssues', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnIncompleteTests', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnSkippedTests', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnTestsThatTriggerDeprecations', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnPhpunitDeprecations', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnPhpunitNotices', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnTestsThatTriggerErrors', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnTestsThatTriggerNotices', false), - $this->parseBooleanAttribute($document->documentElement, 'displayDetailsOnTestsThatTriggerWarnings', false), - $this->parseBooleanAttribute($document->documentElement, 'reverseDefectList', false), - $requireCoverageMetadata, - $bootstrap, - $this->bootstrapForTestSuite($filename, $xpath), - $this->parseBooleanAttribute($document->documentElement, 'processIsolation', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnAllIssues', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnDeprecation', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnPhpunitDeprecation', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnPhpunitNotice', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnPhpunitWarning', true), - $this->parseBooleanAttribute($document->documentElement, 'failOnEmptyTestSuite', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnIncomplete', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnNotice', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnRisky', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnSkipped', false), - $this->parseBooleanAttribute($document->documentElement, 'failOnWarning', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnDefect', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnDeprecation', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnError', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnFailure', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnIncomplete', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnNotice', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnRisky', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnSkipped', false), - $this->parseBooleanAttribute($document->documentElement, 'stopOnWarning', false), - $extensionsDirectory, - $this->parseBooleanAttribute($document->documentElement, 'beStrictAboutChangesToGlobalState', false), - $this->parseBooleanAttribute($document->documentElement, 'beStrictAboutOutputDuringTests', false), - $this->parseBooleanAttribute($document->documentElement, 'beStrictAboutTestsThatDoNotTestAnything', true), - $beStrictAboutCoverageMetadata, - $this->parseBooleanAttribute($document->documentElement, 'enforceTimeLimit', false), - $this->parseIntegerAttribute($document->documentElement, 'defaultTimeLimit', 1), - $this->parseIntegerAttribute($document->documentElement, 'timeoutForSmallTests', 1), - $this->parseIntegerAttribute($document->documentElement, 'timeoutForMediumTests', 10), - $this->parseIntegerAttribute($document->documentElement, 'timeoutForLargeTests', 60), - $this->parseStringAttribute($document->documentElement, 'defaultTestSuite'), - $executionOrder, - $resolveDependencies, - $defectsFirst, - $this->parseBooleanAttribute($document->documentElement, 'backupGlobals', false), - $backupStaticProperties, - $this->parseBooleanAttribute($document->documentElement, 'testdox', false), - $this->parseBooleanAttribute($document->documentElement, 'testdoxSummary', false), - $this->parseBooleanAttribute($document->documentElement, 'controlGarbageCollector', false), - $this->parseIntegerAttribute($document->documentElement, 'numberOfTestsBeforeGarbageCollection', 100), - $shortenArraysForExportThreshold, - ); - } - - private function parseColors(DOMDocument $document): string - { - $colors = Configuration::COLOR_DEFAULT; - - if ($document->documentElement->hasAttribute('colors')) { - /* only allow boolean for compatibility with previous versions - 'always' only allowed from command line */ - if ($this->booleanFromString($document->documentElement->getAttribute('colors'), false)) { - $colors = Configuration::COLOR_AUTO; - } else { - $colors = Configuration::COLOR_NEVER; - } - } - - return $colors; - } - - private function parseColumns(DOMDocument $document): int|string - { - $columns = 80; - - if ($document->documentElement->hasAttribute('columns')) { - $columns = $document->documentElement->getAttribute('columns'); - - if ($columns !== 'max') { - $columns = $this->parseInteger($columns, 80); - } - } - - return $columns; - } - - /** - * @return array - */ - private function bootstrapForTestSuite(string $filename, DOMXPath $xpath): array - { - $bootstrapForTestSuite = []; - - foreach ($this->parseTestSuiteElements($xpath) as $element) { - if (!$element->hasAttribute('bootstrap')) { - continue; - } - - $name = $element->getAttribute('name'); - $bootstrap = $element->getAttribute('bootstrap'); - - assert($name !== ''); - assert($bootstrap !== ''); - - $bootstrapForTestSuite[$name] = $this->toAbsolutePath($filename, $bootstrap); - } - - return $bootstrapForTestSuite; - } - - private function testSuite(string $filename, DOMXPath $xpath): TestSuiteCollection - { - $testSuites = []; - - foreach ($this->parseTestSuiteElements($xpath) as $element) { - $exclude = []; - - foreach ($element->getElementsByTagName('exclude') as $excludeNode) { - $excludeFile = $excludeNode->textContent; - - if ($excludeFile !== '') { - $exclude[] = new File($this->toAbsolutePath($filename, $excludeFile)); - } - } - - $directories = []; - - foreach ($element->getElementsByTagName('directory') as $directoryNode) { - assert($directoryNode instanceof DOMElement); - - $directory = $directoryNode->textContent; - - if ($directory === '') { - continue; - } - - $prefix = ''; - - if ($directoryNode->hasAttribute('prefix')) { - $prefix = $directoryNode->getAttribute('prefix'); - } - - $suffix = 'Test.php'; - - if ($directoryNode->hasAttribute('suffix')) { - $suffix = $directoryNode->getAttribute('suffix'); - } - - $phpVersion = PHP_VERSION; - - if ($directoryNode->hasAttribute('phpVersion')) { - $phpVersion = $directoryNode->getAttribute('phpVersion'); - } - - $phpVersionOperator = new VersionComparisonOperator('>='); - - if ($directoryNode->hasAttribute('phpVersionOperator')) { - $phpVersionOperator = new VersionComparisonOperator($directoryNode->getAttribute('phpVersionOperator')); - } - - $groups = []; - - if ($directoryNode->hasAttribute('groups')) { - foreach (explode(',', $directoryNode->getAttribute('groups')) as $group) { - $group = trim($group); - - if ($group === '') { - continue; - } - - $groups[] = $group; - } - } - - $directories[] = new TestDirectory( - $this->toAbsolutePath($filename, $directory), - $prefix, - $suffix, - $phpVersion, - $phpVersionOperator, - $groups, - ); - } - - $files = []; - - foreach ($element->getElementsByTagName('file') as $fileNode) { - assert($fileNode instanceof DOMElement); - - $file = $fileNode->textContent; - - if ($file === '') { - continue; - } - - $phpVersion = PHP_VERSION; - - if ($fileNode->hasAttribute('phpVersion')) { - $phpVersion = $fileNode->getAttribute('phpVersion'); - } - - $phpVersionOperator = new VersionComparisonOperator('>='); - - if ($fileNode->hasAttribute('phpVersionOperator')) { - $phpVersionOperator = new VersionComparisonOperator($fileNode->getAttribute('phpVersionOperator')); - } - - $groups = []; - - if ($fileNode->hasAttribute('groups')) { - foreach (explode(',', $fileNode->getAttribute('groups')) as $group) { - $group = trim($group); - - if ($group === '') { - continue; - } - - $groups[] = $group; - } - } - - $files[] = new TestFile( - $this->toAbsolutePath($filename, $file), - $phpVersion, - $phpVersionOperator, - $groups, - ); - } - - $name = $element->getAttribute('name'); - - assert($name !== ''); - - $testSuites[] = new TestSuiteConfiguration( - $name, - TestDirectoryCollection::fromArray($directories), - TestFileCollection::fromArray($files), - FileCollection::fromArray($exclude), - ); - } - - return TestSuiteCollection::fromArray($testSuites); - } - - /** - * @return list - */ - private function parseTestSuiteElements(DOMXPath $xpath): array - { - $elements = []; - - $testSuiteNodes = $xpath->query('testsuites/testsuite'); - - assert($testSuiteNodes instanceof DOMNodeList); - - if ($testSuiteNodes->length === 0) { - $testSuiteNodes = $xpath->query('testsuite'); - - assert($testSuiteNodes instanceof DOMNodeList); - } - - if ($testSuiteNodes->length === 1) { - $element = $testSuiteNodes->item(0); - - assert($element instanceof DOMElement); - - $elements[] = $element; - } else { - foreach ($testSuiteNodes as $testSuiteNode) { - assert($testSuiteNode instanceof DOMElement); - - $elements[] = $testSuiteNode; - } - } - - return $elements; - } - - private function element(DOMXPath $xpath, string $element): ?DOMElement - { - $nodes = $xpath->query($element); - - assert($nodes instanceof DOMNodeList); - - if ($nodes->length === 1) { - $node = $nodes->item(0); - - assert($node instanceof DOMElement); - - return $node; - } - - return null; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Junit.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Junit.php deleted file mode 100644 index cf9878df..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Junit.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Junit -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Logging.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Logging.php deleted file mode 100644 index 63f4d89f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Logging.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging; - -use PHPUnit\TextUI\XmlConfiguration\Exception; -use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Html as TestDoxHtml; -use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Text as TestDoxText; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Logging -{ - private ?Junit $junit; - private ?Otr $otr; - private ?TeamCity $teamCity; - private ?TestDoxHtml $testDoxHtml; - private ?TestDoxText $testDoxText; - - public function __construct(?Junit $junit, ?Otr $otr, ?TeamCity $teamCity, ?TestDoxHtml $testDoxHtml, ?TestDoxText $testDoxText) - { - $this->junit = $junit; - $this->otr = $otr; - $this->teamCity = $teamCity; - $this->testDoxHtml = $testDoxHtml; - $this->testDoxText = $testDoxText; - } - - public function hasJunit(): bool - { - return $this->junit !== null; - } - - /** - * @throws Exception - */ - public function junit(): Junit - { - if ($this->junit === null) { - throw new Exception('Logger "JUnit XML" is not configured'); - } - - return $this->junit; - } - - public function hasOtr(): bool - { - return $this->otr !== null; - } - - /** - * @throws Exception - */ - public function otr(): Otr - { - if ($this->otr === null) { - throw new Exception('Logger "Open Test Reporting XML" is not configured'); - } - - return $this->otr; - } - - public function hasTeamCity(): bool - { - return $this->teamCity !== null; - } - - /** - * @throws Exception - */ - public function teamCity(): TeamCity - { - if ($this->teamCity === null) { - throw new Exception('Logger "Team City" is not configured'); - } - - return $this->teamCity; - } - - public function hasTestDoxHtml(): bool - { - return $this->testDoxHtml !== null; - } - - /** - * @throws Exception - */ - public function testDoxHtml(): TestDoxHtml - { - if ($this->testDoxHtml === null) { - throw new Exception('Logger "TestDox HTML" is not configured'); - } - - return $this->testDoxHtml; - } - - public function hasTestDoxText(): bool - { - return $this->testDoxText !== null; - } - - /** - * @throws Exception - */ - public function testDoxText(): TestDoxText - { - if ($this->testDoxText === null) { - throw new Exception('Logger "TestDox Text" is not configured'); - } - - return $this->testDoxText; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Otr.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Otr.php deleted file mode 100644 index 25cfc989..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/Otr.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Otr -{ - private File $target; - private bool $includeGitInformation; - - public function __construct(File $target, bool $includeGitInformation) - { - $this->target = $target; - $this->includeGitInformation = $includeGitInformation; - } - - public function target(): File - { - return $this->target; - } - - public function includeGitInformation(): bool - { - return $this->includeGitInformation; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TeamCity.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TeamCity.php deleted file mode 100644 index daf1cecc..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TeamCity.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class TeamCity -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Html.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Html.php deleted file mode 100644 index 60e9d4da..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Html.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Html -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Text.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Text.php deleted file mode 100644 index ed436c0a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Logging/TestDox/Text.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration\Logging\TestDox; - -use PHPUnit\TextUI\Configuration\File; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class Text -{ - private File $target; - - public function __construct(File $target) - { - $this->target = $target; - } - - public function target(): File - { - return $this->target; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php deleted file mode 100644 index 6235c55f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function version_compare; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MigrationBuilder -{ - /** - * @var non-empty-array> - */ - private const array AVAILABLE_MIGRATIONS = [ - '8.5' => [ - RemoveLogTypes::class, - ], - - '9.2' => [ - RemoveCacheTokensAttribute::class, - IntroduceCoverageElement::class, - MoveAttributesFromRootToCoverage::class, - MoveAttributesFromFilterWhitelistToCoverage::class, - MoveWhitelistIncludesToCoverage::class, - MoveWhitelistExcludesToCoverage::class, - RemoveEmptyFilter::class, - CoverageCloverToReport::class, - CoverageCrap4jToReport::class, - CoverageHtmlToReport::class, - CoveragePhpToReport::class, - CoverageTextToReport::class, - CoverageXmlToReport::class, - ConvertLogTypes::class, - ], - - '9.5' => [ - RemoveListeners::class, - RemoveTestSuiteLoaderAttributes::class, - RemoveCacheResultFileAttribute::class, - RemoveCoverageElementCacheDirectoryAttribute::class, - RemoveCoverageElementProcessUncoveredFilesAttribute::class, - IntroduceCacheDirectoryAttribute::class, - RenameBackupStaticAttributesAttribute::class, - RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute::class, - RemoveBeStrictAboutTodoAnnotatedTestsAttribute::class, - RemovePrinterAttributes::class, - RemoveVerboseAttribute::class, - RenameForceCoversAnnotationAttribute::class, - RenameBeStrictAboutCoversAnnotationAttribute::class, - RemoveConversionToExceptionsAttributes::class, - RemoveNoInteractionAttribute::class, - RemoveLoggingElements::class, - RemoveTestDoxGroupsElement::class, - ], - - '10.0' => [ - MoveCoverageDirectoriesToSource::class, - ], - - '10.4' => [ - RemoveBeStrictAboutTodoAnnotatedTestsAttribute::class, - ], - - '10.5' => [ - RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute::class, - ], - - '11.0' => [ - ReplaceRestrictDeprecationsWithIgnoreDeprecations::class, - ], - - '11.1' => [ - RemoveCacheResultFileAttribute::class, - RemoveCoverageElementCacheDirectoryAttribute::class, - ], - - '11.2' => [ - RemoveBeStrictAboutTodoAnnotatedTestsAttribute::class, - ], - ]; - - /** - * @return non-empty-list - */ - public function build(string $fromVersion): array - { - $stack = [new UpdateSchemaLocation]; - - foreach (self::AVAILABLE_MIGRATIONS as $version => $migrations) { - if (version_compare($version, $fromVersion, '<')) { - continue; - } - - foreach ($migrations as $migration) { - $stack[] = new $migration; - } - } - - return $stack; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationException.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationException.php deleted file mode 100644 index bb35aca6..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MigrationException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ConvertLogTypes.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ConvertLogTypes.php deleted file mode 100644 index 81a0e322..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ConvertLogTypes.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ConvertLogTypes implements Migration -{ - public function migrate(DOMDocument $document): void - { - $logging = $document->getElementsByTagName('logging')->item(0); - - if (!$logging instanceof DOMElement) { - return; - } - $types = [ - 'junit' => 'junit', - 'teamcity' => 'teamcity', - 'testdox-html' => 'testdoxHtml', - 'testdox-text' => 'testdoxText', - 'testdox-xml' => 'testdoxXml', - 'plain' => 'text', - ]; - - $logNodes = []; - - foreach ($logging->getElementsByTagName('log') as $logNode) { - if (!isset($types[$logNode->getAttribute('type')])) { - continue; - } - - $logNodes[] = $logNode; - } - - foreach ($logNodes as $oldNode) { - $newLogNode = $document->createElement($types[$oldNode->getAttribute('type')]); - $newLogNode->setAttribute('outputFile', $oldNode->getAttribute('target')); - - $logging->replaceChild($newLogNode, $oldNode); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCloverToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCloverToReport.php deleted file mode 100644 index 0dfee46f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCloverToReport.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoverageCloverToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-clover'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $clover = $logNode->ownerDocument->createElement('clover'); - - $clover->setAttribute('outputFile', $logNode->getAttribute('target')); - - return $clover; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCrap4jToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCrap4jToReport.php deleted file mode 100644 index f0aac5c7..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageCrap4jToReport.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoverageCrap4jToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-crap4j'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $crap4j = $logNode->ownerDocument->createElement('crap4j'); - $crap4j->setAttribute('outputFile', $logNode->getAttribute('target')); - - $this->migrateAttributes($logNode, $crap4j, ['threshold']); - - return $crap4j; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageHtmlToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageHtmlToReport.php deleted file mode 100644 index f6b7982d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageHtmlToReport.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoverageHtmlToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-html'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $html = $logNode->ownerDocument->createElement('html'); - $html->setAttribute('outputDirectory', $logNode->getAttribute('target')); - - $this->migrateAttributes($logNode, $html, ['lowUpperBound', 'highLowerBound']); - - return $html; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoveragePhpToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoveragePhpToReport.php deleted file mode 100644 index 7e362708..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoveragePhpToReport.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoveragePhpToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-php'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $php = $logNode->ownerDocument->createElement('php'); - $php->setAttribute('outputFile', $logNode->getAttribute('target')); - - return $php; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageTextToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageTextToReport.php deleted file mode 100644 index d463cef8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageTextToReport.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoverageTextToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-text'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $text = $logNode->ownerDocument->createElement('text'); - $text->setAttribute('outputFile', $logNode->getAttribute('target')); - - $this->migrateAttributes($logNode, $text, ['showUncoveredFiles', 'showOnlySummary']); - - return $text; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageXmlToReport.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageXmlToReport.php deleted file mode 100644 index 3db89974..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/CoverageXmlToReport.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoverageXmlToReport extends LogToReportMigration -{ - protected function forType(): string - { - return 'coverage-xml'; - } - - protected function toReportFormat(DOMElement $logNode): DOMElement - { - $xml = $logNode->ownerDocument->createElement('xml'); - $xml->setAttribute('outputDirectory', $logNode->getAttribute('target')); - - return $xml; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCacheDirectoryAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCacheDirectoryAttribute.php deleted file mode 100644 index 87624cc6..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCacheDirectoryAttribute.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IntroduceCacheDirectoryAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('cacheDirectory')) { - return; - } - - $root->setAttribute('cacheDirectory', '.phpunit.cache'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCoverageElement.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCoverageElement.php deleted file mode 100644 index 9334c1f4..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/IntroduceCoverageElement.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class IntroduceCoverageElement implements Migration -{ - public function migrate(DOMDocument $document): void - { - $coverage = $document->createElement('coverage'); - - $document->documentElement->insertBefore( - $coverage, - $document->documentElement->firstChild, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/LogToReportMigration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/LogToReportMigration.php deleted file mode 100644 index 08815cbc..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/LogToReportMigration.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use function sprintf; -use DOMDocument; -use DOMElement; -use DOMXPath; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class LogToReportMigration implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - $logNode = $this->findLogNode($document); - - if ($logNode === null) { - return; - } - - $reportChild = $this->toReportFormat($logNode); - - $report = $coverage->getElementsByTagName('report')->item(0); - - if ($report === null) { - $report = $coverage->appendChild($document->createElement('report')); - } - - $report->appendChild($reportChild); - $logNode->parentNode->removeChild($logNode); - } - - /** - * @param list $attributes - */ - protected function migrateAttributes(DOMElement $src, DOMElement $dest, array $attributes): void - { - foreach ($attributes as $attr) { - if (!$src->hasAttribute($attr)) { - continue; - } - - $dest->setAttribute($attr, $src->getAttribute($attr)); - $src->removeAttribute($attr); - } - } - - abstract protected function forType(): string; - - abstract protected function toReportFormat(DOMElement $logNode): DOMElement; - - private function findLogNode(DOMDocument $document): ?DOMElement - { - $xpath = new DOMXPath($document); - - $logNode = $xpath->query( - sprintf( - '//logging/log[@type="%s"]', - $this->forType(), - ), - ); - - assert($logNode !== false); - - $logNode = $logNode->item(0); - - if (!$logNode instanceof DOMElement) { - return null; - } - - return $logNode; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/Migration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/Migration.php deleted file mode 100644 index 05359a2d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/Migration.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Migration -{ - public function migrate(DOMDocument $document): void; -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php deleted file mode 100644 index 68538169..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MoveAttributesFromFilterWhitelistToCoverage implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $whitelist = $document->getElementsByTagName('whitelist')->item(0); - - if ($whitelist === null) { - return; - } - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - $map = [ - 'addUncoveredFilesFromWhitelist' => 'includeUncoveredFiles', - 'processUncoveredFilesFromWhitelist' => 'processUncoveredFiles', - ]; - - foreach ($map as $old => $new) { - if (!$whitelist->hasAttribute($old)) { - continue; - } - - $coverage->setAttribute($new, $whitelist->getAttribute($old)); - $whitelist->removeAttribute($old); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromRootToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromRootToCoverage.php deleted file mode 100644 index f0e47b90..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveAttributesFromRootToCoverage.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MoveAttributesFromRootToCoverage implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $map = [ - 'disableCodeCoverageIgnore' => 'disableCodeCoverageIgnore', - 'ignoreDeprecatedCodeUnitsFromCodeCoverage' => 'ignoreDeprecatedCodeUnits', - ]; - - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - foreach ($map as $old => $new) { - if (!$root->hasAttribute($old)) { - continue; - } - - $coverage->setAttribute($new, $root->getAttribute($old)); - $root->removeAttribute($old); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php deleted file mode 100644 index 4dd37ea5..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; -use DOMXPath; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MoveCoverageDirectoriesToSource implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $source = $document->getElementsByTagName('source')->item(0); - - if ($source !== null) { - return; - } - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if ($coverage === null) { - return; - } - - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - $source = $document->createElement('source'); - $root->appendChild($source); - - $xpath = new DOMXPath($document); - - foreach (['include', 'exclude'] as $element) { - $nodes = $xpath->query('//coverage/' . $element); - - assert($nodes !== false); - - foreach (SnapshotNodeList::fromNodeList($nodes) as $node) { - $source->appendChild($node); - } - } - - if ($coverage->childElementCount !== 0) { - return; - } - - assert($coverage->parentNode !== null); - - $coverage->parentNode->removeChild($coverage); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistExcludesToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistExcludesToCoverage.php deleted file mode 100644 index 09641bb1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistExcludesToCoverage.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use function in_array; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MoveWhitelistExcludesToCoverage implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $whitelist = $document->getElementsByTagName('whitelist')->item(0); - - if ($whitelist === null) { - return; - } - - $excludeNodes = SnapshotNodeList::fromNodeList($whitelist->getElementsByTagName('exclude')); - - if ($excludeNodes->count() === 0) { - return; - } - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - $targetExclude = $coverage->getElementsByTagName('exclude')->item(0); - - if ($targetExclude === null) { - $targetExclude = $coverage->appendChild( - $document->createElement('exclude'), - ); - } - - foreach ($excludeNodes as $excludeNode) { - assert($excludeNode instanceof DOMElement); - - foreach (SnapshotNodeList::fromNodeList($excludeNode->childNodes) as $child) { - if (!$child instanceof DOMElement || !in_array($child->nodeName, ['directory', 'file'], true)) { - continue; - } - - $targetExclude->appendChild($child); - } - - if ($excludeNode->getElementsByTagName('*')->count() !== 0) { - throw new MigrationException('Dangling child elements in exclude found.'); - } - - $whitelist->removeChild($excludeNode); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistIncludesToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistIncludesToCoverage.php deleted file mode 100644 index 99901249..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/MoveWhitelistIncludesToCoverage.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class MoveWhitelistIncludesToCoverage implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $whitelist = $document->getElementsByTagName('whitelist')->item(0); - - if ($whitelist === null) { - return; - } - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - $include = $document->createElement('include'); - $coverage->appendChild($include); - - foreach (SnapshotNodeList::fromNodeList($whitelist->childNodes) as $child) { - if (!$child instanceof DOMElement) { - continue; - } - - if (!($child->nodeName === 'directory' || $child->nodeName === 'file')) { - continue; - } - - $include->appendChild($child); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute.php deleted file mode 100644 index cdb90775..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveBeStrictAboutResourceUsageDuringSmallTestsAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('beStrictAboutResourceUsageDuringSmallTests')) { - $root->removeAttribute('beStrictAboutResourceUsageDuringSmallTests'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutTodoAnnotatedTestsAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutTodoAnnotatedTestsAttribute.php deleted file mode 100644 index 1858e67f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveBeStrictAboutTodoAnnotatedTestsAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveBeStrictAboutTodoAnnotatedTestsAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) { - $root->removeAttribute('beStrictAboutTodoAnnotatedTests'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheResultFileAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheResultFileAttribute.php deleted file mode 100644 index a5c51c4e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheResultFileAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveCacheResultFileAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('cacheResultFile')) { - $root->removeAttribute('cacheResultFile'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheTokensAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheTokensAttribute.php deleted file mode 100644 index 69bf38a2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCacheTokensAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveCacheTokensAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('cacheTokens')) { - $root->removeAttribute('cacheTokens'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveConversionToExceptionsAttributes.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveConversionToExceptionsAttributes.php deleted file mode 100644 index a908aee3..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveConversionToExceptionsAttributes.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveConversionToExceptionsAttributes implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('convertDeprecationsToExceptions')) { - $root->removeAttribute('convertDeprecationsToExceptions'); - } - - if ($root->hasAttribute('convertErrorsToExceptions')) { - $root->removeAttribute('convertErrorsToExceptions'); - } - - if ($root->hasAttribute('convertNoticesToExceptions')) { - $root->removeAttribute('convertNoticesToExceptions'); - } - - if ($root->hasAttribute('convertWarningsToExceptions')) { - $root->removeAttribute('convertWarningsToExceptions'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementCacheDirectoryAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementCacheDirectoryAttribute.php deleted file mode 100644 index c26d2071..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementCacheDirectoryAttribute.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveCoverageElementCacheDirectoryAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $node = $document->getElementsByTagName('coverage')->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - if ($node->hasAttribute('cacheDirectory')) { - $node->removeAttribute('cacheDirectory'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementProcessUncoveredFilesAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementProcessUncoveredFilesAttribute.php deleted file mode 100644 index 34768625..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveCoverageElementProcessUncoveredFilesAttribute.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveCoverageElementProcessUncoveredFilesAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $node = $document->getElementsByTagName('coverage')->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - if ($node->hasAttribute('processUncoveredFiles')) { - $node->removeAttribute('processUncoveredFiles'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveEmptyFilter.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveEmptyFilter.php deleted file mode 100644 index a831e205..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveEmptyFilter.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function sprintf; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveEmptyFilter implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $whitelist = $document->getElementsByTagName('whitelist')->item(0); - - if ($whitelist instanceof DOMElement) { - $this->ensureEmpty($whitelist); - $whitelist->parentNode->removeChild($whitelist); - } - - $filter = $document->getElementsByTagName('filter')->item(0); - - if ($filter instanceof DOMElement) { - $this->ensureEmpty($filter); - $filter->parentNode->removeChild($filter); - } - } - - /** - * @throws MigrationException - */ - private function ensureEmpty(DOMElement $element): void - { - if ($element->attributes->length > 0) { - throw new MigrationException(sprintf('%s element has unexpected attributes', $element->nodeName)); - } - - if ($element->getElementsByTagName('*')->length > 0) { - throw new MigrationException(sprintf('%s element has unexpected children', $element->nodeName)); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveListeners.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveListeners.php deleted file mode 100644 index bf288996..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveListeners.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveListeners implements Migration -{ - public function migrate(DOMDocument $document): void - { - $node = $document->getElementsByTagName('listeners')->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - $node->parentNode->removeChild($node); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLogTypes.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLogTypes.php deleted file mode 100644 index 46ee55e9..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLogTypes.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveLogTypes implements Migration -{ - public function migrate(DOMDocument $document): void - { - $logging = $document->getElementsByTagName('logging')->item(0); - - if (!$logging instanceof DOMElement) { - return; - } - - foreach (SnapshotNodeList::fromNodeList($logging->getElementsByTagName('log')) as $logNode) { - assert($logNode instanceof DOMElement); - - switch ($logNode->getAttribute('type')) { - case 'json': - case 'tap': - $logging->removeChild($logNode); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php deleted file mode 100644 index ccccb819..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; -use DOMXPath; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveLoggingElements implements Migration -{ - public function migrate(DOMDocument $document): void - { - $this->removeTestDoxElement($document); - $this->removeTextElement($document); - } - - private function removeTestDoxElement(DOMDocument $document): void - { - $nodes = (new DOMXPath($document))->query('logging/testdoxXml'); - - assert($nodes !== false); - - $node = $nodes->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - $node->parentNode->removeChild($node); - } - - private function removeTextElement(DOMDocument $document): void - { - $nodes = (new DOMXPath($document))->query('logging/text'); - - assert($nodes !== false); - - $node = $nodes->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - $node->parentNode->removeChild($node); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php deleted file mode 100644 index 897cccd8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveNoInteractionAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('noInteraction')) { - $root->removeAttribute('noInteraction'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php deleted file mode 100644 index 84f4bcf1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemovePrinterAttributes implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('printerClass')) { - $root->removeAttribute('printerClass'); - } - - if ($root->hasAttribute('printerFile')) { - $root->removeAttribute('printerFile'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php deleted file mode 100644 index e2ff3051..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('registerMockObjectsFromTestArgumentsRecursively')) { - $root->removeAttribute('registerMockObjectsFromTestArgumentsRecursively'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php deleted file mode 100644 index ea5a6921..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveTestDoxGroupsElement implements Migration -{ - public function migrate(DOMDocument $document): void - { - $node = $document->getElementsByTagName('testdoxGroups')->item(0); - - if (!$node instanceof DOMElement || $node->parentNode === null) { - return; - } - - $node->parentNode->removeChild($node); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php deleted file mode 100644 index 284dda2e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveTestSuiteLoaderAttributes implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('testSuiteLoaderClass')) { - $root->removeAttribute('testSuiteLoaderClass'); - } - - if ($root->hasAttribute('testSuiteLoaderFile')) { - $root->removeAttribute('testSuiteLoaderFile'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php deleted file mode 100644 index d4aa6608..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RemoveVerboseAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('verbose')) { - $root->removeAttribute('verbose'); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBackupStaticAttributesAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBackupStaticAttributesAttribute.php deleted file mode 100644 index c2de95ce..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBackupStaticAttributesAttribute.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RenameBackupStaticAttributesAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('backupStaticProperties')) { - return; - } - - if (!$root->hasAttribute('backupStaticAttributes')) { - return; - } - - $root->setAttribute('backupStaticProperties', $root->getAttribute('backupStaticAttributes')); - $root->removeAttribute('backupStaticAttributes'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBeStrictAboutCoversAnnotationAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBeStrictAboutCoversAnnotationAttribute.php deleted file mode 100644 index dda890b6..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameBeStrictAboutCoversAnnotationAttribute.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RenameBeStrictAboutCoversAnnotationAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('beStrictAboutCoverageMetadata')) { - return; - } - - if (!$root->hasAttribute('beStrictAboutCoversAnnotation')) { - return; - } - - $root->setAttribute('beStrictAboutCoverageMetadata', $root->getAttribute('beStrictAboutCoversAnnotation')); - $root->removeAttribute('beStrictAboutCoversAnnotation'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameForceCoversAnnotationAttribute.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameForceCoversAnnotationAttribute.php deleted file mode 100644 index 707aff8a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RenameForceCoversAnnotationAttribute.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RenameForceCoversAnnotationAttribute implements Migration -{ - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - if ($root->hasAttribute('requireCoverageMetadata')) { - return; - } - - if (!$root->hasAttribute('forceCoversAnnotation')) { - return; - } - - $root->setAttribute('requireCoverageMetadata', $root->getAttribute('forceCoversAnnotation')); - $root->removeAttribute('forceCoversAnnotation'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ReplaceRestrictDeprecationsWithIgnoreDeprecations.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ReplaceRestrictDeprecationsWithIgnoreDeprecations.php deleted file mode 100644 index 12cb1e7f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/ReplaceRestrictDeprecationsWithIgnoreDeprecations.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use DOMDocument; -use DOMElement; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ReplaceRestrictDeprecationsWithIgnoreDeprecations implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $source = $document->getElementsByTagName('source')->item(0); - - if ($source === null) { - return; - } - - assert($source instanceof DOMElement); - - if (!$source->hasAttribute('restrictDeprecations')) { - return; - } - - $restrictDeprecations = $source->getAttribute('restrictDeprecations') === 'true'; - - $source->removeAttribute('restrictDeprecations'); - - if (!$restrictDeprecations || - $source->hasAttribute('ignoreIndirectDeprecations')) { - return; - } - - $source->setAttribute('ignoreIndirectDeprecations', 'true'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php deleted file mode 100644 index 35c8abe8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use function str_contains; -use DOMDocument; -use DOMElement; -use PHPUnit\Runner\Version; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UpdateSchemaLocation implements Migration -{ - private const string NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema-instance'; - private const string LOCAL_NAME_SCHEMA_LOCATION = 'noNamespaceSchemaLocation'; - - public function migrate(DOMDocument $document): void - { - $root = $document->documentElement; - - assert($root instanceof DOMElement); - - $existingSchemaLocation = $root->getAttributeNodeNS(self::NAMESPACE_URI, self::LOCAL_NAME_SCHEMA_LOCATION)->value; - - if (str_contains($existingSchemaLocation, '://') === false) { // If the current schema location is a relative path, don't update it - return; - } - - $root->setAttributeNS( - self::NAMESPACE_URI, - 'xsi:' . self::LOCAL_NAME_SCHEMA_LOCATION, - 'https://schema.phpunit.de/' . Version::series() . '/phpunit.xsd', - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php deleted file mode 100644 index 4649dec2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use PHPUnit\Runner\Version; -use PHPUnit\Util\Xml\Loader as XmlLoader; -use PHPUnit\Util\Xml\XmlException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Migrator -{ - /** - * @throws Exception - * @throws MigrationException - * @throws XmlException - */ - public function migrate(string $filename): string - { - $origin = (new SchemaDetector)->detect($filename); - - if (!$origin->detected()) { - throw new Exception('The file does not validate against any known schema'); - } - - if ($origin->version() === Version::series()) { - throw new Exception('The file does not need to be migrated'); - } - - $configurationDocument = (new XmlLoader)->loadFile($filename); - - foreach ((new MigrationBuilder)->build($origin->version()) as $migration) { - $migration->migrate($configurationDocument); - } - - $configurationDocument->formatOutput = true; - $configurationDocument->preserveWhiteSpace = false; - - $xml = $configurationDocument->saveXML(); - - assert($xml !== false); - - return $xml; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php deleted file mode 100644 index 491c24ed..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function count; -use ArrayIterator; -use Countable; -use DOMNode; -use DOMNodeList; -use IteratorAggregate; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @template-implements IteratorAggregate - */ -final class SnapshotNodeList implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $nodes = []; - - /** - * @param DOMNodeList $list - */ - public static function fromNodeList(DOMNodeList $list): self - { - $snapshot = new self; - - foreach ($list as $node) { - $snapshot->nodes[] = $node; - } - - return $snapshot; - } - - public function count(): int - { - return count($this->nodes); - } - - /** - * @return ArrayIterator - */ - public function getIterator(): ArrayIterator - { - return new ArrayIterator($this->nodes); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/PHPUnit.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/PHPUnit.php deleted file mode 100644 index 0b384e73..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/PHPUnit.php +++ /dev/null @@ -1,530 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class PHPUnit -{ - private ?string $cacheDirectory; - private bool $cacheResult; - private int|string $columns; - private string $colors; - private bool $stderr; - private bool $displayDetailsOnAllIssues; - private bool $displayDetailsOnIncompleteTests; - private bool $displayDetailsOnSkippedTests; - private bool $displayDetailsOnTestsThatTriggerDeprecations; - private bool $displayDetailsOnPhpunitDeprecations; - private bool $displayDetailsOnPhpunitNotices; - private bool $displayDetailsOnTestsThatTriggerErrors; - private bool $displayDetailsOnTestsThatTriggerNotices; - private bool $displayDetailsOnTestsThatTriggerWarnings; - private bool $reverseDefectList; - private bool $requireCoverageMetadata; - private ?string $bootstrap; - - /** - * @var array - */ - private array $bootstrapForTestSuite; - private bool $processIsolation; - private bool $failOnAllIssues; - private bool $failOnDeprecation; - private bool $failOnPhpunitDeprecation; - private bool $failOnPhpunitNotice; - private bool $failOnPhpunitWarning; - private bool $failOnEmptyTestSuite; - private bool $failOnIncomplete; - private bool $failOnNotice; - private bool $failOnRisky; - private bool $failOnSkipped; - private bool $failOnWarning; - private bool $stopOnDefect; - private bool $stopOnDeprecation; - private bool $stopOnError; - private bool $stopOnFailure; - private bool $stopOnIncomplete; - private bool $stopOnNotice; - private bool $stopOnRisky; - private bool $stopOnSkipped; - private bool $stopOnWarning; - - /** - * @var ?non-empty-string - */ - private ?string $extensionsDirectory; - private bool $beStrictAboutChangesToGlobalState; - private bool $beStrictAboutOutputDuringTests; - private bool $beStrictAboutTestsThatDoNotTestAnything; - private bool $beStrictAboutCoverageMetadata; - private bool $enforceTimeLimit; - private int $defaultTimeLimit; - private int $timeoutForSmallTests; - private int $timeoutForMediumTests; - private int $timeoutForLargeTests; - private ?string $defaultTestSuite; - private int $executionOrder; - private bool $resolveDependencies; - private bool $defectsFirst; - private bool $backupGlobals; - private bool $backupStaticProperties; - private bool $testdoxPrinter; - private bool $testdoxPrinterSummary; - private bool $controlGarbageCollector; - private int $numberOfTestsBeforeGarbageCollection; - - /** - * @var non-negative-int - */ - private int $shortenArraysForExportThreshold; - - /** - * @param array $bootstrapForTestSuite - * @param ?non-empty-string $extensionsDirectory - * @param non-negative-int $shortenArraysForExportThreshold - */ - public function __construct(?string $cacheDirectory, bool $cacheResult, int|string $columns, string $colors, bool $stderr, bool $displayDetailsOnAllIssues, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnPhpunitDeprecations, bool $displayDetailsOnPhpunitNotices, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, ?string $bootstrap, array $bootstrapForTestSuite, bool $processIsolation, bool $failOnAllIssues, bool $failOnDeprecation, bool $failOnPhpunitDeprecation, bool $failOnPhpunitNotice, bool $failOnPhpunitWarning, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, ?string $extensionsDirectory, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutCoverageMetadata, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticProperties, bool $testdoxPrinter, bool $testdoxPrinterSummary, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, int $shortenArraysForExportThreshold) - { - $this->cacheDirectory = $cacheDirectory; - $this->cacheResult = $cacheResult; - $this->columns = $columns; - $this->colors = $colors; - $this->stderr = $stderr; - $this->displayDetailsOnAllIssues = $displayDetailsOnAllIssues; - $this->displayDetailsOnIncompleteTests = $displayDetailsOnIncompleteTests; - $this->displayDetailsOnSkippedTests = $displayDetailsOnSkippedTests; - $this->displayDetailsOnTestsThatTriggerDeprecations = $displayDetailsOnTestsThatTriggerDeprecations; - $this->displayDetailsOnPhpunitDeprecations = $displayDetailsOnPhpunitDeprecations; - $this->displayDetailsOnPhpunitNotices = $displayDetailsOnPhpunitNotices; - $this->displayDetailsOnTestsThatTriggerErrors = $displayDetailsOnTestsThatTriggerErrors; - $this->displayDetailsOnTestsThatTriggerNotices = $displayDetailsOnTestsThatTriggerNotices; - $this->displayDetailsOnTestsThatTriggerWarnings = $displayDetailsOnTestsThatTriggerWarnings; - $this->reverseDefectList = $reverseDefectList; - $this->requireCoverageMetadata = $requireCoverageMetadata; - $this->bootstrap = $bootstrap; - $this->bootstrapForTestSuite = $bootstrapForTestSuite; - $this->processIsolation = $processIsolation; - $this->failOnAllIssues = $failOnAllIssues; - $this->failOnDeprecation = $failOnDeprecation; - $this->failOnPhpunitDeprecation = $failOnPhpunitDeprecation; - $this->failOnPhpunitNotice = $failOnPhpunitNotice; - $this->failOnPhpunitWarning = $failOnPhpunitWarning; - $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; - $this->failOnIncomplete = $failOnIncomplete; - $this->failOnNotice = $failOnNotice; - $this->failOnRisky = $failOnRisky; - $this->failOnSkipped = $failOnSkipped; - $this->failOnWarning = $failOnWarning; - $this->stopOnDefect = $stopOnDefect; - $this->stopOnDeprecation = $stopOnDeprecation; - $this->stopOnError = $stopOnError; - $this->stopOnFailure = $stopOnFailure; - $this->stopOnIncomplete = $stopOnIncomplete; - $this->stopOnNotice = $stopOnNotice; - $this->stopOnRisky = $stopOnRisky; - $this->stopOnSkipped = $stopOnSkipped; - $this->stopOnWarning = $stopOnWarning; - $this->extensionsDirectory = $extensionsDirectory; - $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; - $this->beStrictAboutOutputDuringTests = $beStrictAboutOutputDuringTests; - $this->beStrictAboutTestsThatDoNotTestAnything = $beStrictAboutTestsThatDoNotTestAnything; - $this->beStrictAboutCoverageMetadata = $beStrictAboutCoverageMetadata; - $this->enforceTimeLimit = $enforceTimeLimit; - $this->defaultTimeLimit = $defaultTimeLimit; - $this->timeoutForSmallTests = $timeoutForSmallTests; - $this->timeoutForMediumTests = $timeoutForMediumTests; - $this->timeoutForLargeTests = $timeoutForLargeTests; - $this->defaultTestSuite = $defaultTestSuite; - $this->executionOrder = $executionOrder; - $this->resolveDependencies = $resolveDependencies; - $this->defectsFirst = $defectsFirst; - $this->backupGlobals = $backupGlobals; - $this->backupStaticProperties = $backupStaticProperties; - $this->testdoxPrinter = $testdoxPrinter; - $this->testdoxPrinterSummary = $testdoxPrinterSummary; - $this->controlGarbageCollector = $controlGarbageCollector; - $this->numberOfTestsBeforeGarbageCollection = $numberOfTestsBeforeGarbageCollection; - $this->shortenArraysForExportThreshold = $shortenArraysForExportThreshold; - } - - /** - * @phpstan-assert-if-true !null $this->cacheDirectory - */ - public function hasCacheDirectory(): bool - { - return $this->cacheDirectory !== null; - } - - /** - * @throws Exception - */ - public function cacheDirectory(): string - { - if (!$this->hasCacheDirectory()) { - throw new Exception('Cache directory is not configured'); - } - - return $this->cacheDirectory; - } - - public function cacheResult(): bool - { - return $this->cacheResult; - } - - public function columns(): int|string - { - return $this->columns; - } - - public function colors(): string - { - return $this->colors; - } - - public function stderr(): bool - { - return $this->stderr; - } - - public function displayDetailsOnAllIssues(): bool - { - return $this->displayDetailsOnAllIssues; - } - - public function displayDetailsOnIncompleteTests(): bool - { - return $this->displayDetailsOnIncompleteTests; - } - - public function displayDetailsOnSkippedTests(): bool - { - return $this->displayDetailsOnSkippedTests; - } - - public function displayDetailsOnTestsThatTriggerDeprecations(): bool - { - return $this->displayDetailsOnTestsThatTriggerDeprecations; - } - - public function displayDetailsOnPhpunitDeprecations(): bool - { - return $this->displayDetailsOnPhpunitDeprecations; - } - - public function displayDetailsOnPhpunitNotices(): bool - { - return $this->displayDetailsOnPhpunitNotices; - } - - public function displayDetailsOnTestsThatTriggerErrors(): bool - { - return $this->displayDetailsOnTestsThatTriggerErrors; - } - - public function displayDetailsOnTestsThatTriggerNotices(): bool - { - return $this->displayDetailsOnTestsThatTriggerNotices; - } - - public function displayDetailsOnTestsThatTriggerWarnings(): bool - { - return $this->displayDetailsOnTestsThatTriggerWarnings; - } - - public function reverseDefectList(): bool - { - return $this->reverseDefectList; - } - - public function requireCoverageMetadata(): bool - { - return $this->requireCoverageMetadata; - } - - /** - * @phpstan-assert-if-true !null $this->bootstrap - */ - public function hasBootstrap(): bool - { - return $this->bootstrap !== null; - } - - /** - * @throws Exception - */ - public function bootstrap(): string - { - if (!$this->hasBootstrap()) { - throw new Exception('Bootstrap script is not configured'); - } - - return $this->bootstrap; - } - - /** - * @return array - */ - public function bootstrapForTestSuite(): array - { - return $this->bootstrapForTestSuite; - } - - public function processIsolation(): bool - { - return $this->processIsolation; - } - - public function failOnAllIssues(): bool - { - return $this->failOnAllIssues; - } - - public function failOnDeprecation(): bool - { - return $this->failOnDeprecation; - } - - public function failOnPhpunitDeprecation(): bool - { - return $this->failOnPhpunitDeprecation; - } - - public function failOnPhpunitNotice(): bool - { - return $this->failOnPhpunitNotice; - } - - public function failOnPhpunitWarning(): bool - { - return $this->failOnPhpunitWarning; - } - - public function failOnEmptyTestSuite(): bool - { - return $this->failOnEmptyTestSuite; - } - - public function failOnIncomplete(): bool - { - return $this->failOnIncomplete; - } - - public function failOnNotice(): bool - { - return $this->failOnNotice; - } - - public function failOnRisky(): bool - { - return $this->failOnRisky; - } - - public function failOnSkipped(): bool - { - return $this->failOnSkipped; - } - - public function failOnWarning(): bool - { - return $this->failOnWarning; - } - - public function stopOnDefect(): bool - { - return $this->stopOnDefect; - } - - public function stopOnDeprecation(): bool - { - return $this->stopOnDeprecation; - } - - public function stopOnError(): bool - { - return $this->stopOnError; - } - - public function stopOnFailure(): bool - { - return $this->stopOnFailure; - } - - public function stopOnIncomplete(): bool - { - return $this->stopOnIncomplete; - } - - public function stopOnNotice(): bool - { - return $this->stopOnNotice; - } - - public function stopOnRisky(): bool - { - return $this->stopOnRisky; - } - - public function stopOnSkipped(): bool - { - return $this->stopOnSkipped; - } - - public function stopOnWarning(): bool - { - return $this->stopOnWarning; - } - - /** - * @phpstan-assert-if-true !null $this->extensionsDirectory - */ - public function hasExtensionsDirectory(): bool - { - return $this->extensionsDirectory !== null; - } - - /** - * @throws Exception - * - * @return non-empty-string - */ - public function extensionsDirectory(): string - { - if (!$this->hasExtensionsDirectory()) { - throw new Exception('Extensions directory is not configured'); - } - - return $this->extensionsDirectory; - } - - public function beStrictAboutChangesToGlobalState(): bool - { - return $this->beStrictAboutChangesToGlobalState; - } - - public function beStrictAboutOutputDuringTests(): bool - { - return $this->beStrictAboutOutputDuringTests; - } - - public function beStrictAboutTestsThatDoNotTestAnything(): bool - { - return $this->beStrictAboutTestsThatDoNotTestAnything; - } - - public function beStrictAboutCoverageMetadata(): bool - { - return $this->beStrictAboutCoverageMetadata; - } - - public function enforceTimeLimit(): bool - { - return $this->enforceTimeLimit; - } - - public function defaultTimeLimit(): int - { - return $this->defaultTimeLimit; - } - - public function timeoutForSmallTests(): int - { - return $this->timeoutForSmallTests; - } - - public function timeoutForMediumTests(): int - { - return $this->timeoutForMediumTests; - } - - public function timeoutForLargeTests(): int - { - return $this->timeoutForLargeTests; - } - - /** - * @phpstan-assert-if-true !null $this->defaultTestSuite - */ - public function hasDefaultTestSuite(): bool - { - return $this->defaultTestSuite !== null; - } - - /** - * @throws Exception - */ - public function defaultTestSuite(): string - { - if (!$this->hasDefaultTestSuite()) { - throw new Exception('Default test suite is not configured'); - } - - return $this->defaultTestSuite; - } - - public function executionOrder(): int - { - return $this->executionOrder; - } - - public function resolveDependencies(): bool - { - return $this->resolveDependencies; - } - - public function defectsFirst(): bool - { - return $this->defectsFirst; - } - - public function backupGlobals(): bool - { - return $this->backupGlobals; - } - - public function backupStaticProperties(): bool - { - return $this->backupStaticProperties; - } - - public function testdoxPrinter(): bool - { - return $this->testdoxPrinter; - } - - public function testdoxPrinterSummary(): bool - { - return $this->testdoxPrinterSummary; - } - - public function controlGarbageCollector(): bool - { - return $this->controlGarbageCollector; - } - - public function numberOfTestsBeforeGarbageCollection(): int - { - return $this->numberOfTestsBeforeGarbageCollection; - } - - /** - * @return non-negative-int - */ - public function shortenArraysForExportThreshold(): int - { - return $this->shortenArraysForExportThreshold; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/FailedSchemaDetectionResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/FailedSchemaDetectionResult.php deleted file mode 100644 index 5bd282c8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/FailedSchemaDetectionResult.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class FailedSchemaDetectionResult extends SchemaDetectionResult -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php deleted file mode 100644 index aa855b0c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\Util\Xml\XmlException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -abstract readonly class SchemaDetectionResult -{ - /** - * @phpstan-assert-if-true SuccessfulSchemaDetectionResult $this - */ - public function detected(): bool - { - return false; - } - - /** - * @throws XmlException - */ - public function version(): string - { - throw new XmlException('No supported schema was detected'); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php deleted file mode 100644 index 5f55f5f2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use PHPUnit\Util\Xml\Loader; -use PHPUnit\Util\Xml\XmlException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class SchemaDetector -{ - /** - * @throws XmlException - */ - public function detect(string $filename): SchemaDetectionResult - { - $document = (new Loader)->loadFile($filename); - - $schemaFinder = new SchemaFinder; - - foreach ($schemaFinder->available() as $candidate) { - $schema = (new SchemaFinder)->find($candidate); - - if (!(new Validator)->validate($document, $schema)->hasValidationErrors()) { - return new SuccessfulSchemaDetectionResult($candidate); - } - } - - return new FailedSchemaDetectionResult; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php deleted file mode 100644 index 18658f87..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class SuccessfulSchemaDetectionResult extends SchemaDetectionResult -{ - /** - * @var non-empty-string - */ - private string $version; - - /** - * @param non-empty-string $version - */ - public function __construct(string $version) - { - $this->version = $version; - } - - public function detected(): bool - { - return true; - } - - /** - * @return non-empty-string - */ - public function version(): string - { - return $this->version; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php deleted file mode 100644 index 39d25cfa..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use function defined; -use function is_file; -use function rsort; -use function sprintf; -use DirectoryIterator; -use PHPUnit\Runner\Version; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class SchemaFinder -{ - /** - * @return non-empty-list - */ - public function available(): array - { - $result = [Version::series()]; - - foreach ((new DirectoryIterator($this->path() . 'schema')) as $file) { - if ($file->isDot()) { - continue; - } - - $version = $file->getBasename('.xsd'); - - assert($version !== ''); - - $result[] = $version; - } - - rsort($result); - - return $result; - } - - /** - * @throws CannotFindSchemaException - */ - public function find(string $version): string - { - if ($version === Version::series()) { - $filename = $this->path() . 'phpunit.xsd'; - } else { - $filename = $this->path() . 'schema/' . $version . '.xsd'; - } - - if (!is_file($filename)) { - throw new CannotFindSchemaException( - sprintf( - 'Schema for PHPUnit %s is not available', - $version, - ), - ); - } - - return $filename; - } - - private function path(): string - { - if (defined('__PHPUNIT_PHAR_ROOT__')) { - return __PHPUNIT_PHAR_ROOT__ . '/'; - } - - return __DIR__ . '/../../../../'; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/TestSuiteMapper.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/TestSuiteMapper.php deleted file mode 100644 index 66bd611c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/TestSuiteMapper.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use const PHP_VERSION; -use function in_array; -use function is_dir; -use function is_file; -use function sprintf; -use function str_contains; -use function version_compare; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\Exception as FrameworkException; -use PHPUnit\Framework\TestSuite as TestSuiteObject; -use PHPUnit\TextUI\Configuration\TestSuiteCollection; -use PHPUnit\TextUI\RuntimeException; -use PHPUnit\TextUI\TestDirectoryNotFoundException; -use PHPUnit\TextUI\TestFileNotFoundException; -use SebastianBergmann\FileIterator\Facade; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteMapper -{ - /** - * @param non-empty-string $xmlConfigurationFile - * @param list $includeTestSuites - * @param list $excludeTestSuites - * - * @throws RuntimeException - * @throws TestDirectoryNotFoundException - * @throws TestFileNotFoundException - */ - public function map(string $xmlConfigurationFile, TestSuiteCollection $configuredTestSuites, array $includeTestSuites, array $excludeTestSuites): TestSuiteObject - { - try { - $result = TestSuiteObject::empty($xmlConfigurationFile); - $processed = []; - - foreach ($configuredTestSuites as $configuredTestSuite) { - if ($includeTestSuites !== [] && !in_array($configuredTestSuite->name(), $includeTestSuites, true)) { - continue; - } - - if ($excludeTestSuites !== [] && in_array($configuredTestSuite->name(), $excludeTestSuites, true)) { - continue; - } - - $testSuiteName = $configuredTestSuite->name(); - $exclude = []; - - foreach ($configuredTestSuite->exclude()->asArray() as $file) { - $exclude[] = $file->path(); - } - - $testSuite = TestSuiteObject::empty($configuredTestSuite->name()); - $empty = true; - - foreach ($configuredTestSuite->directories() as $directory) { - if (!str_contains($directory->path(), '*') && !is_dir($directory->path())) { - throw new TestDirectoryNotFoundException($directory->path()); - } - - if (!version_compare(PHP_VERSION, $directory->phpVersion(), $directory->phpVersionOperator()->asString())) { - continue; - } - - $files = (new Facade)->getFilesAsArray( - $directory->path(), - $directory->suffix(), - $directory->prefix(), - $exclude, - ); - - $groups = $directory->groups(); - - foreach ($files as $file) { - if (isset($processed[$file])) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot add file %s to test suite "%s" as it was already added to test suite "%s"', - $file, - $testSuiteName, - $processed[$file], - ), - ); - - continue; - } - - $processed[$file] = $testSuiteName; - $empty = false; - - $testSuite->addTestFile($file, $groups); - } - } - - foreach ($configuredTestSuite->files() as $file) { - if (!is_file($file->path())) { - throw new TestFileNotFoundException($file->path()); - } - - if (!version_compare(PHP_VERSION, $file->phpVersion(), $file->phpVersionOperator()->asString())) { - continue; - } - - if (isset($processed[$file->path()])) { - EventFacade::emitter()->testRunnerTriggeredPhpunitWarning( - sprintf( - 'Cannot add file %s to test suite "%s" as it was already added to test suite "%s"', - $file->path(), - $testSuiteName, - $processed[$file->path()], - ), - ); - - continue; - } - - $processed[$file->path()] = $testSuiteName; - $empty = false; - - $testSuite->addTestFile($file->path(), $file->groups()); - } - - if (!$empty) { - $result->addTest($testSuite); - } - } - - return $result; - } catch (FrameworkException $e) { - throw new RuntimeException( - $e->getMessage(), - $e->getCode(), - $e, - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php deleted file mode 100644 index 95fe473d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use const PHP_EOL; -use function sprintf; -use function trim; -use LibXMLError; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class ValidationResult -{ - /** - * @var array> - */ - private array $validationErrors; - - /** - * @param array $errors - */ - public static function fromArray(array $errors): self - { - $validationErrors = []; - - foreach ($errors as $error) { - if (!isset($validationErrors[$error->line])) { - $validationErrors[$error->line] = []; - } - - $validationErrors[$error->line][] = trim($error->message); - } - - return new self($validationErrors); - } - - /** - * @param array> $validationErrors - */ - private function __construct(array $validationErrors) - { - $this->validationErrors = $validationErrors; - } - - public function hasValidationErrors(): bool - { - return $this->validationErrors !== []; - } - - public function asString(): string - { - $buffer = ''; - - foreach ($this->validationErrors as $line => $validationErrorsOnLine) { - $buffer .= sprintf(PHP_EOL . ' Line %d:' . PHP_EOL, $line); - - foreach ($validationErrorsOnLine as $validationError) { - $buffer .= sprintf(' - %s' . PHP_EOL, $validationError); - } - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php deleted file mode 100644 index cc3a93dd..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use function assert; -use function file_get_contents; -use function libxml_clear_errors; -use function libxml_get_errors; -use function libxml_use_internal_errors; -use DOMDocument; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Validator -{ - public function validate(DOMDocument $document, string $xsdFilename): ValidationResult - { - $buffer = file_get_contents($xsdFilename); - - assert($buffer !== false); - - $originalErrorHandling = libxml_use_internal_errors(true); - - $document->schemaValidateSource($buffer); - - $errors = libxml_get_errors(); - libxml_clear_errors(); - libxml_use_internal_errors($originalErrorHandling); - - return ValidationResult::fromArray($errors); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/CannotOpenSocketException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/CannotOpenSocketException.php deleted file mode 100644 index 519d1378..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/CannotOpenSocketException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class CannotOpenSocketException extends RuntimeException implements Exception -{ - public function __construct(string $hostname, int $port) - { - parent::__construct( - sprintf( - 'Cannot open socket %s:%d', - $hostname, - $port, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/Exception.php b/vendor/phpunit/phpunit/src/TextUI/Exception/Exception.php deleted file mode 100644 index 6b370ca0..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/InvalidSocketException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/InvalidSocketException.php deleted file mode 100644 index 441afd2a..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/InvalidSocketException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidSocketException extends RuntimeException implements Exception -{ - public function __construct(string $socket) - { - parent::__construct( - sprintf( - '"%s" does not match "socket://hostname:port" format', - $socket, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php deleted file mode 100644 index 875a0487..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php deleted file mode 100644 index 9b35390c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestDirectoryNotFoundException extends RuntimeException implements Exception -{ - public function __construct(string $path) - { - parent::__construct( - sprintf( - 'Test directory "%s" not found', - $path, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php deleted file mode 100644 index 46c9df80..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestFileNotFoundException extends RuntimeException implements Exception -{ - public function __construct(string $path) - { - parent::__construct( - sprintf( - 'Test file "%s" not found', - $path, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Help.php b/vendor/phpunit/phpunit/src/TextUI/Help.php deleted file mode 100644 index 639a5be3..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Help.php +++ /dev/null @@ -1,330 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use const PHP_EOL; -use function count; -use function defined; -use function explode; -use function max; -use function preg_replace_callback; -use function str_pad; -use function str_repeat; -use function strlen; -use function wordwrap; -use PHPUnit\Util\Color; -use SebastianBergmann\Environment\Console; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Help -{ - private const string LEFT_MARGIN = ' '; - private int $lengthOfLongestOptionName = 0; - private readonly int $columnsAvailableForDescription; - private bool $hasColor; - - public function __construct(?int $width = null, ?bool $withColor = null) - { - if ($width === null) { - $width = (new Console)->getNumberOfColumns(); - } - - if ($withColor === null) { - $this->hasColor = (new Console)->hasColorSupport(); - } else { - $this->hasColor = $withColor; - } - - foreach ($this->elements() as $options) { - foreach ($options as $option) { - if (isset($option['arg'])) { - $this->lengthOfLongestOptionName = max($this->lengthOfLongestOptionName, strlen($option['arg'])); - } - } - } - - $this->columnsAvailableForDescription = $width - $this->lengthOfLongestOptionName - 4; - } - - public function generate(): string - { - if ($this->hasColor) { - return $this->writeWithColor(); - } - - return $this->writeWithoutColor(); - } - - private function writeWithoutColor(): string - { - $buffer = ''; - - foreach ($this->elements() as $section => $options) { - $buffer .= "{$section}:" . PHP_EOL; - - if ($section !== 'Usage') { - $buffer .= PHP_EOL; - } - - foreach ($options as $option) { - if (isset($option['spacer'])) { - $buffer .= PHP_EOL; - } - - if (isset($option['text'])) { - $buffer .= self::LEFT_MARGIN . $option['text'] . PHP_EOL; - } - - if (isset($option['arg'])) { - $arg = str_pad($option['arg'], $this->lengthOfLongestOptionName); - - $buffer .= self::LEFT_MARGIN . $arg . ' ' . $option['desc'] . PHP_EOL; - } - } - - $buffer .= PHP_EOL; - } - - return $buffer; - } - - private function writeWithColor(): string - { - $buffer = ''; - - foreach ($this->elements() as $section => $options) { - $buffer .= Color::colorize('fg-yellow', "{$section}:") . PHP_EOL; - - if ($section !== 'Usage') { - $buffer .= PHP_EOL; - } - - foreach ($options as $option) { - if (isset($option['spacer'])) { - $buffer .= PHP_EOL; - } - - if (isset($option['text'])) { - $buffer .= self::LEFT_MARGIN . $option['text'] . PHP_EOL; - } - - if (isset($option['arg'])) { - $arg = Color::colorize('fg-green', str_pad($option['arg'], $this->lengthOfLongestOptionName)); - $arg = preg_replace_callback( - '/(<[^>]+>)/', - static fn (array $matches) => Color::colorize('fg-cyan', $matches[0]), - $arg, - ); - - $desc = explode(PHP_EOL, wordwrap($option['desc'], $this->columnsAvailableForDescription, PHP_EOL)); - - $buffer .= self::LEFT_MARGIN . $arg . ' ' . $desc[0] . PHP_EOL; - - for ($i = 1; $i < count($desc); $i++) { - $buffer .= str_repeat(' ', $this->lengthOfLongestOptionName + 3) . $desc[$i] . PHP_EOL; - } - } - } - - $buffer .= PHP_EOL; - } - - return $buffer; - } - - /** - * @return array> - */ - private function elements(): array - { - $elements = [ - 'Usage' => [ - ['text' => 'phpunit [options] ...'], - ], - - 'Configuration' => [ - ['arg' => '--bootstrap ', 'desc' => 'A PHP script that is included before the tests run'], - ['arg' => '-c|--configuration ', 'desc' => 'Read configuration from XML file'], - ['arg' => '--no-configuration', 'desc' => 'Ignore default configuration file (phpunit.xml)'], - ['arg' => '--extension ', 'desc' => 'Register test runner extension with bootstrap '], - ['arg' => '--no-extensions', 'desc' => 'Do not register test runner extensions'], - ['arg' => '--include-path ', 'desc' => 'Prepend PHP\'s include_path with given path(s)'], - ['arg' => '-d ', 'desc' => 'Sets a php.ini value'], - ['arg' => '--cache-directory ', 'desc' => 'Specify cache directory'], - ['arg' => '--generate-configuration', 'desc' => 'Generate configuration file with suggested settings'], - ['arg' => '--migrate-configuration', 'desc' => 'Migrate configuration file to current format'], - ['arg' => '--generate-baseline ', 'desc' => 'Generate baseline for issues'], - ['arg' => '--use-baseline ', 'desc' => 'Use baseline to ignore issues'], - ['arg' => '--ignore-baseline', 'desc' => 'Do not use baseline to ignore issues'], - ], - - 'Selection' => [ - ['arg' => '--list-suites', 'desc' => 'List available test suites'], - ['arg' => '--testsuite ', 'desc' => 'Only run tests from the specified test suite(s)'], - ['arg' => '--exclude-testsuite ', 'desc' => 'Exclude tests from the specified test suite(s)'], - ['arg' => '--list-groups', 'desc' => 'List available test groups'], - ['arg' => '--group ', 'desc' => 'Only run tests from the specified group(s)'], - ['arg' => '--exclude-group ', 'desc' => 'Exclude tests from the specified group(s)'], - ['arg' => '--covers ', 'desc' => 'Only run tests that intend to cover '], - ['arg' => '--uses ', 'desc' => 'Only run tests that intend to use '], - ['arg' => '--requires-php-extension ', 'desc' => 'Only run tests that require PHP extension '], - ['arg' => '--list-test-files', 'desc' => 'List available test files'], - ['arg' => '--list-tests', 'desc' => 'List available tests'], - ['arg' => '--list-tests-xml ', 'desc' => 'List available tests in XML format'], - ['arg' => '--filter ', 'desc' => 'Filter which tests to run'], - ['arg' => '--exclude-filter ', 'desc' => 'Exclude tests for the specified filter pattern'], - ['arg' => '--test-suffix ', 'desc' => 'Only search for test in files with specified suffix(es). Default: Test.php,.phpt'], - ], - - 'Execution' => [ - ['arg' => '--process-isolation', 'desc' => 'Run each test in a separate PHP process'], - ['arg' => '--globals-backup', 'desc' => 'Backup and restore $GLOBALS for each test'], - ['arg' => '--static-backup', 'desc' => 'Backup and restore static properties for each test'], - ['spacer' => ''], - - ['arg' => '--strict-coverage', 'desc' => 'Be strict about code coverage metadata'], - ['arg' => '--strict-global-state', 'desc' => 'Be strict about changes to global state'], - ['arg' => '--disallow-test-output', 'desc' => 'Be strict about output during tests'], - ['arg' => '--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'], - ['arg' => '--default-time-limit ', 'desc' => 'Timeout in seconds for tests that have no declared size'], - ['arg' => '--do-not-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'], - ['spacer' => ''], - - ['arg' => '--stop-on-defect', 'desc' => 'Stop after first error, failure, warning, or risky test'], - ['arg' => '--stop-on-error', 'desc' => 'Stop after first error'], - ['arg' => '--stop-on-failure', 'desc' => 'Stop after first failure'], - ['arg' => '--stop-on-warning', 'desc' => 'Stop after first warning'], - ['arg' => '--stop-on-risky', 'desc' => 'Stop after first risky test'], - ['arg' => '--stop-on-deprecation', 'desc' => 'Stop after first test that triggered a deprecation'], - ['arg' => '--stop-on-notice', 'desc' => 'Stop after first test that triggered a notice'], - ['arg' => '--stop-on-skipped', 'desc' => 'Stop after first skipped test'], - ['arg' => '--stop-on-incomplete', 'desc' => 'Stop after first incomplete test'], - ['spacer' => ''], - - ['arg' => '--fail-on-empty-test-suite', 'desc' => 'Signal failure using shell exit code when no tests were run'], - ['arg' => '--fail-on-warning', 'desc' => 'Signal failure using shell exit code when a warning was triggered'], - ['arg' => '--fail-on-risky', 'desc' => 'Signal failure using shell exit code when a test was considered risky'], - ['arg' => '--fail-on-deprecation', 'desc' => 'Signal failure using shell exit code when a deprecation was triggered'], - ['arg' => '--fail-on-phpunit-deprecation', 'desc' => 'Signal failure using shell exit code when a PHPUnit deprecation was triggered'], - ['arg' => '--fail-on-phpunit-notice', 'desc' => 'Signal failure using shell exit code when a PHPUnit notice was triggered'], - ['arg' => '--fail-on-phpunit-warning', 'desc' => 'Signal failure using shell exit code when a PHPUnit warning was triggered'], - ['arg' => '--fail-on-notice', 'desc' => 'Signal failure using shell exit code when a notice was triggered'], - ['arg' => '--fail-on-skipped', 'desc' => 'Signal failure using shell exit code when a test was skipped'], - ['arg' => '--fail-on-incomplete', 'desc' => 'Signal failure using shell exit code when a test was marked incomplete'], - ['arg' => '--fail-on-all-issues', 'desc' => 'Signal failure using shell exit code when an issue is triggered'], - ['spacer' => ''], - - ['arg' => '--do-not-fail-on-empty-test-suite', 'desc' => 'Do not signal failure using shell exit code when no tests were run'], - ['arg' => '--do-not-fail-on-warning', 'desc' => 'Do not signal failure using shell exit code when a warning was triggered'], - ['arg' => '--do-not-fail-on-risky', 'desc' => 'Do not signal failure using shell exit code when a test was considered risky'], - ['arg' => '--do-not-fail-on-deprecation', 'desc' => 'Do not signal failure using shell exit code when a deprecation was triggered'], - ['arg' => '--do-not-fail-on-phpunit-deprecation', 'desc' => 'Do not signal failure using shell exit code when a PHPUnit deprecation was triggered'], - ['arg' => '--do-not-fail-on-phpunit-notice', 'desc' => 'Do not signal failure using shell exit code when a PHPUnit notice was triggered'], - ['arg' => '--do-not-fail-on-phpunit-warning', 'desc' => 'Do not signal failure using shell exit code when a PHPUnit warning was triggered'], - ['arg' => '--do-not-fail-on-notice', 'desc' => 'Do not signal failure using shell exit code when a notice was triggered'], - ['arg' => '--do-not-fail-on-skipped', 'desc' => 'Do not signal failure using shell exit code when a test was skipped'], - ['arg' => '--do-not-fail-on-incomplete', 'desc' => 'Do not signal failure using shell exit code when a test was marked incomplete'], - ['spacer' => ''], - - ['arg' => '--cache-result', 'desc' => 'Write test results to cache file'], - ['arg' => '--do-not-cache-result', 'desc' => 'Do not write test results to cache file'], - ['spacer' => ''], - - ['arg' => '--order-by ', 'desc' => 'Run tests in order: default|defects|depends|duration|no-depends|random|reverse|size'], - ['arg' => '--random-order-seed ', 'desc' => 'Use the specified random seed when running tests in random order'], - ], - - 'Reporting' => [ - ['arg' => '--colors ', 'desc' => 'Use colors in output ("never", "auto" or "always")'], - ['arg' => '--columns ', 'desc' => 'Number of columns to use for progress output'], - ['arg' => '--columns max', 'desc' => 'Use maximum number of columns for progress output'], - ['arg' => '--stderr', 'desc' => 'Write to STDERR instead of STDOUT'], - ['spacer' => ''], - - ['arg' => '--no-progress', 'desc' => 'Disable output of test execution progress'], - ['arg' => '--no-results', 'desc' => 'Disable output of test results'], - ['arg' => '--no-output', 'desc' => 'Disable all output'], - ['spacer' => ''], - - ['arg' => '--display-incomplete', 'desc' => 'Display details for incomplete tests'], - ['arg' => '--display-skipped', 'desc' => 'Display details for skipped tests'], - ['arg' => '--display-deprecations', 'desc' => 'Display details for deprecations triggered by tests'], - ['arg' => '--display-phpunit-deprecations', 'desc' => 'Display details for PHPUnit deprecations'], - ['arg' => '--display-phpunit-notices', 'desc' => 'Display details for PHPUnit notices'], - ['arg' => '--display-errors', 'desc' => 'Display details for errors triggered by tests'], - ['arg' => '--display-notices', 'desc' => 'Display details for notices triggered by tests'], - ['arg' => '--display-warnings', 'desc' => 'Display details for warnings triggered by tests'], - ['arg' => '--display-all-issues', 'desc' => 'Display details for all issues that are triggered'], - ['arg' => '--reverse-list', 'desc' => 'Print defects in reverse order'], - ['spacer' => ''], - - ['arg' => '--teamcity', 'desc' => 'Replace default progress and result output with TeamCity format'], - ['arg' => '--testdox', 'desc' => 'Replace default result output with TestDox format'], - ['arg' => '--testdox-summary', 'desc' => 'Repeat TestDox output for tests with errors, failures, or issues'], - ['spacer' => ''], - - ['arg' => '--debug', 'desc' => 'Replace default progress and result output with debugging information'], - ['arg' => '--with-telemetry', 'desc' => 'Include telemetry information in debugging information output'], - ], - - 'Logging' => [ - ['arg' => '--log-junit ', 'desc' => 'Write test results in JUnit XML format to file'], - ['arg' => '--log-otr ', 'desc' => 'Write test results in Open Test Reporting XML format to file'], - ['arg' => '--include-git-information', 'desc' => 'Include Git information in Open Test Reporting XML logfile'], - ['arg' => '--log-teamcity ', 'desc' => 'Write test results in TeamCity format to file'], - ['arg' => '--testdox-html ', 'desc' => 'Write test results in TestDox format (HTML) to file'], - ['arg' => '--testdox-text ', 'desc' => 'Write test results in TestDox format (plain text) to file'], - ['arg' => '--log-events-text ', 'desc' => 'Stream events as plain text to file'], - ['arg' => '--log-events-verbose-text ', 'desc' => 'Stream events as plain text with extended information to file'], - ['arg' => '--no-logging', 'desc' => 'Ignore logging configured in the XML configuration file'], - ], - - 'Code Coverage' => [ - ['arg' => '--coverage-clover ', 'desc' => 'Write code coverage report in Clover XML format to file'], - ['arg' => '--coverage-openclover ', 'desc' => 'Write code coverage report in OpenClover XML format to file'], - ['arg' => '--coverage-cobertura ', 'desc' => 'Write code coverage report in Cobertura XML format to file'], - ['arg' => '--coverage-crap4j ', 'desc' => 'Write code coverage report in Crap4J XML format to file'], - ['arg' => '--coverage-html ', 'desc' => 'Write code coverage report in HTML format to directory'], - ['arg' => '--coverage-php ', 'desc' => 'Write serialized code coverage data to file'], - ['arg' => '--coverage-text=', 'desc' => 'Write code coverage report in text format to file [default: standard output]'], - ['arg' => '--only-summary-for-coverage-text', 'desc' => 'Option for code coverage report in text format: only show summary'], - ['arg' => '--show-uncovered-for-coverage-text', 'desc' => 'Option for code coverage report in text format: show uncovered files'], - ['arg' => '--coverage-xml ', 'desc' => 'Write code coverage report in XML format to directory'], - ['arg' => '--warm-coverage-cache', 'desc' => 'Warm static analysis cache'], - ['arg' => '--coverage-filter ', 'desc' => 'Include in code coverage reporting'], - ['arg' => '--path-coverage', 'desc' => 'Report path coverage in addition to line coverage'], - ['arg' => '--disable-coverage-ignore', 'desc' => 'Disable metadata for ignoring code coverage'], - ['arg' => '--no-coverage', 'desc' => 'Ignore code coverage reporting configured in the XML configuration file'], - ], - ]; - - if (defined('__PHPUNIT_PHAR__')) { - $elements['PHAR'] = [ - ['arg' => '--manifest', 'desc' => 'Print Software Bill of Materials (SBOM) in plain-text format'], - ['arg' => '--sbom', 'desc' => 'Print Software Bill of Materials (SBOM) in CycloneDX XML format'], - ['arg' => '--composer-lock', 'desc' => 'Print composer.lock file used to build the PHAR'], - ]; - } - - $elements['Miscellaneous'] = [ - ['arg' => '-h|--help', 'desc' => 'Prints this usage information'], - ['arg' => '--version', 'desc' => 'Prints the version and exits'], - ['arg' => '--atleast-version ', 'desc' => 'Checks that version is greater than and exits'], - ['arg' => '--check-version', 'desc' => 'Checks whether PHPUnit is the latest version and exits'], - ['arg' => '--check-php-configuration', 'desc' => 'Checks whether PHP configuration follows best practices'], - ]; - - return $elements; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php deleted file mode 100644 index bcee3996..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php +++ /dev/null @@ -1,418 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use function floor; -use function sprintf; -use function str_repeat; -use function strlen; -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\TestRunner\ChildProcessErrored; -use PHPUnit\Event\TestRunner\ExecutionStarted; -use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\TextUI\Configuration\Source; -use PHPUnit\TextUI\Configuration\SourceFilter; -use PHPUnit\TextUI\Output\Printer; -use PHPUnit\Util\Color; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ProgressPrinter -{ - private readonly Printer $printer; - private readonly bool $colors; - private readonly int $numberOfColumns; - private readonly Source $source; - private int $column = 0; - private int $numberOfTests = 0; - private int $numberOfTestsWidth = 0; - private int $maxColumn = 0; - private int $numberOfTestsRun = 0; - private ?TestStatus $status = null; - private bool $prepared = false; - private bool $childProcessErrored = false; - - public function __construct(Printer $printer, Facade $facade, bool $colors, int $numberOfColumns, Source $source) - { - $this->printer = $printer; - $this->colors = $colors; - $this->numberOfColumns = $numberOfColumns; - $this->source = $source; - - $this->registerSubscribers($facade); - } - - public function testRunnerExecutionStarted(ExecutionStarted $event): void - { - $this->numberOfTestsRun = 0; - $this->numberOfTests = $event->testSuite()->count(); - $this->numberOfTestsWidth = strlen((string) $this->numberOfTests); - $this->column = 0; - $this->maxColumn = $this->numberOfColumns - strlen(' / (XXX%)') - (2 * $this->numberOfTestsWidth); - } - - public function beforeTestClassMethodErrored(): void - { - $this->printProgressForError(); - $this->updateTestStatus(TestStatus::error()); - } - - public function testPrepared(): void - { - $this->prepared = true; - } - - public function testSkipped(): void - { - if (!$this->prepared) { - $this->printProgressForSkipped(); - } else { - $this->updateTestStatus(TestStatus::skipped()); - } - } - - public function testMarkedIncomplete(): void - { - $this->updateTestStatus(TestStatus::incomplete()); - } - - public function testTriggeredNotice(NoticeTriggered $event): void - { - if ($event->ignoredByBaseline()) { - return; - } - - if ($this->source->restrictNotices() && - !SourceFilter::instance()->includes($event->file())) { - return; - } - - if (!$this->source->ignoreSuppressionOfNotices() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::notice()); - } - - public function testTriggeredPhpNotice(PhpNoticeTriggered $event): void - { - if ($event->ignoredByBaseline()) { - return; - } - - if ($this->source->restrictNotices() && - !SourceFilter::instance()->includes($event->file())) { - return; - } - - if (!$this->source->ignoreSuppressionOfPhpNotices() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::notice()); - } - - public function testTriggeredDeprecation(DeprecationTriggered $event): void - { - if ($event->ignoredByBaseline() || $event->ignoredByTest()) { - return; - } - - if ($this->source->ignoreSelfDeprecations() && - ($event->trigger()->isTest() || $event->trigger()->isSelf())) { - return; - } - - if ($this->source->ignoreDirectDeprecations() && $event->trigger()->isDirect()) { - return; - } - - if ($this->source->ignoreIndirectDeprecations() && $event->trigger()->isIndirect()) { - return; - } - - if (!$this->source->ignoreSuppressionOfDeprecations() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): void - { - if ($event->ignoredByBaseline() || $event->ignoredByTest()) { - return; - } - - if ($this->source->ignoreSelfDeprecations() && - ($event->trigger()->isTest() || $event->trigger()->isSelf())) { - return; - } - - if ($this->source->ignoreDirectDeprecations() && $event->trigger()->isDirect()) { - return; - } - - if ($this->source->ignoreIndirectDeprecations() && $event->trigger()->isIndirect()) { - return; - } - - if (!$this->source->ignoreSuppressionOfPhpDeprecations() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testTriggeredPhpunitDeprecation(): void - { - $this->updateTestStatus(TestStatus::deprecation()); - } - - public function testConsideredRisky(): void - { - $this->updateTestStatus(TestStatus::risky()); - } - - public function testTriggeredWarning(WarningTriggered $event): void - { - if ($event->ignoredByBaseline()) { - return; - } - - if ($this->source->restrictWarnings() && - !SourceFilter::instance()->includes($event->file())) { - return; - } - - if (!$this->source->ignoreSuppressionOfWarnings() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - public function testTriggeredPhpWarning(PhpWarningTriggered $event): void - { - if ($event->ignoredByBaseline()) { - return; - } - - if ($this->source->restrictWarnings() && - !SourceFilter::instance()->includes($event->file())) { - return; - } - - if (!$this->source->ignoreSuppressionOfPhpWarnings() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - public function testTriggeredPhpunitWarning(PhpunitWarningTriggered $event): void - { - if ($event->ignoredByTest()) { - return; - } - - $this->updateTestStatus(TestStatus::warning()); - } - - public function testTriggeredError(ErrorTriggered $event): void - { - if (!$this->source->ignoreSuppressionOfErrors() && $event->wasSuppressed()) { - return; - } - - $this->updateTestStatus(TestStatus::error()); - } - - public function testFailed(): void - { - $this->updateTestStatus(TestStatus::failure()); - } - - public function testErrored(Errored $event): void - { - if ($this->childProcessErrored) { - $this->updateTestStatus(TestStatus::error()); - - return; - } - - if (!$this->prepared) { - $this->printProgressForError(); - } else { - $this->updateTestStatus(TestStatus::error()); - } - } - - public function testFinished(): void - { - if ($this->status === null) { - $this->printProgressForSuccess(); - } elseif ($this->status->isSkipped()) { - $this->printProgressForSkipped(); - } elseif ($this->status->isIncomplete()) { - $this->printProgressForIncomplete(); - } elseif ($this->status->isRisky()) { - $this->printProgressForRisky(); - } elseif ($this->status->isNotice()) { - $this->printProgressForNotice(); - } elseif ($this->status->isDeprecation()) { - $this->printProgressForDeprecation(); - } elseif ($this->status->isWarning()) { - $this->printProgressForWarning(); - } elseif ($this->status->isFailure()) { - $this->printProgressForFailure(); - } else { - $this->printProgressForError(); - } - - $this->status = null; - $this->prepared = false; - $this->childProcessErrored = false; - } - - public function childProcessErrored(ChildProcessErrored $event): void - { - $this->childProcessErrored = true; - } - - private function registerSubscribers(Facade $facade): void - { - $facade->registerSubscribers( - new BeforeTestClassMethodErroredSubscriber($this), - new TestConsideredRiskySubscriber($this), - new TestErroredSubscriber($this), - new TestFailedSubscriber($this), - new TestFinishedSubscriber($this), - new TestMarkedIncompleteSubscriber($this), - new TestPreparedSubscriber($this), - new TestRunnerExecutionStartedSubscriber($this), - new TestSkippedSubscriber($this), - new TestTriggeredDeprecationSubscriber($this), - new TestTriggeredNoticeSubscriber($this), - new TestTriggeredPhpDeprecationSubscriber($this), - new TestTriggeredPhpNoticeSubscriber($this), - new TestTriggeredPhpunitDeprecationSubscriber($this), - new TestTriggeredPhpunitWarningSubscriber($this), - new TestTriggeredPhpWarningSubscriber($this), - new TestTriggeredWarningSubscriber($this), - new ChildProcessErroredSubscriber($this), - ); - } - - private function updateTestStatus(TestStatus $status): void - { - if ($this->status !== null && - $this->status->isMoreImportantThan($status)) { - return; - } - - $this->status = $status; - } - - private function printProgressForSuccess(): void - { - $this->printProgress('.'); - } - - private function printProgressForSkipped(): void - { - $this->printProgressWithColor('fg-cyan, bold', 'S'); - } - - private function printProgressForIncomplete(): void - { - $this->printProgressWithColor('fg-yellow, bold', 'I'); - } - - private function printProgressForNotice(): void - { - $this->printProgressWithColor('fg-yellow, bold', 'N'); - } - - private function printProgressForDeprecation(): void - { - $this->printProgressWithColor('fg-yellow, bold', 'D'); - } - - private function printProgressForRisky(): void - { - $this->printProgressWithColor('fg-yellow, bold', 'R'); - } - - private function printProgressForWarning(): void - { - $this->printProgressWithColor('fg-yellow, bold', 'W'); - } - - private function printProgressForFailure(): void - { - $this->printProgressWithColor('bg-red, fg-white', 'F'); - } - - private function printProgressForError(): void - { - $this->printProgressWithColor('fg-red, bold', 'E'); - } - - private function printProgressWithColor(string $color, string $progress): void - { - if ($this->colors) { - $progress = Color::colorizeTextBox($color, $progress); - } - - $this->printProgress($progress); - } - - private function printProgress(string $progress): void - { - $this->printer->print($progress); - - $this->column++; - $this->numberOfTestsRun++; - - if ($this->column === $this->maxColumn || $this->numberOfTestsRun === $this->numberOfTests) { - if ($this->numberOfTestsRun === $this->numberOfTests) { - $this->printer->print(str_repeat(' ', $this->maxColumn - $this->column)); - } - - $this->printer->print( - sprintf( - ' %' . $this->numberOfTestsWidth . 'd / %' . - $this->numberOfTestsWidth . 'd (%3s%%)', - $this->numberOfTestsRun, - $this->numberOfTests, - floor(($this->numberOfTestsRun / $this->numberOfTests) * 100), - ), - ); - - if ($this->column === $this->maxColumn) { - $this->column = 0; - $this->printer->print("\n"); - } - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/BeforeTestClassMethodErroredSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/BeforeTestClassMethodErroredSubscriber.php deleted file mode 100644 index 2984cdda..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/BeforeTestClassMethodErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class BeforeTestClassMethodErroredSubscriber extends Subscriber implements BeforeFirstTestMethodErroredSubscriber -{ - public function notify(BeforeFirstTestMethodErrored $event): void - { - $this->printer()->beforeTestClassMethodErrored(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/ChildProcessErroredSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/ChildProcessErroredSubscriber.php deleted file mode 100644 index 64369407..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/ChildProcessErroredSubscriber.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\TestRunner\ChildProcessErrored; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ChildProcessErroredSubscriber extends Subscriber implements \PHPUnit\Event\TestRunner\ChildProcessErroredSubscriber -{ - public function notify(ChildProcessErrored $event): void - { - $this->printer()->childProcessErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/Subscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/Subscriber.php deleted file mode 100644 index 32515ee3..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/Subscriber.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class Subscriber -{ - private ProgressPrinter $printer; - - public function __construct(ProgressPrinter $printer) - { - $this->printer = $printer; - } - - protected function printer(): ProgressPrinter - { - return $this->printer; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestConsideredRiskySubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestConsideredRiskySubscriber.php deleted file mode 100644 index e5b57c6d..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestConsideredRiskySubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\ConsideredRiskySubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestConsideredRiskySubscriber extends Subscriber implements ConsideredRiskySubscriber -{ - public function notify(ConsideredRisky $event): void - { - $this->printer()->testConsideredRisky(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestErroredSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestErroredSubscriber.php deleted file mode 100644 index 33340755..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestErroredSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\Errored; -use PHPUnit\Event\Test\ErroredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestErroredSubscriber extends Subscriber implements ErroredSubscriber -{ - public function notify(Errored $event): void - { - $this->printer()->testErrored($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFailedSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFailedSubscriber.php deleted file mode 100644 index 9109d1b3..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFailedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\Failed; -use PHPUnit\Event\Test\FailedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFailedSubscriber extends Subscriber implements FailedSubscriber -{ - public function notify(Failed $event): void - { - $this->printer()->testFailed(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFinishedSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFinishedSubscriber.php deleted file mode 100644 index e4b4ca5e..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestFinishedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\Finished; -use PHPUnit\Event\Test\FinishedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestFinishedSubscriber extends Subscriber implements FinishedSubscriber -{ - public function notify(Finished $event): void - { - $this->printer()->testFinished(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestMarkedIncompleteSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestMarkedIncompleteSubscriber.php deleted file mode 100644 index 8b445088..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestMarkedIncompleteSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\MarkedIncomplete; -use PHPUnit\Event\Test\MarkedIncompleteSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestMarkedIncompleteSubscriber extends Subscriber implements MarkedIncompleteSubscriber -{ - public function notify(MarkedIncomplete $event): void - { - $this->printer()->testMarkedIncomplete(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestPreparedSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestPreparedSubscriber.php deleted file mode 100644 index d99f2fa4..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestPreparedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\Prepared; -use PHPUnit\Event\Test\PreparedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestPreparedSubscriber extends Subscriber implements PreparedSubscriber -{ - public function notify(Prepared $event): void - { - $this->printer()->testPrepared(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestRunnerExecutionStartedSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestRunnerExecutionStartedSubscriber.php deleted file mode 100644 index 78e104f6..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestRunnerExecutionStartedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\TestRunner\ExecutionStarted; -use PHPUnit\Event\TestRunner\ExecutionStartedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestRunnerExecutionStartedSubscriber extends Subscriber implements ExecutionStartedSubscriber -{ - public function notify(ExecutionStarted $event): void - { - $this->printer()->testRunnerExecutionStarted($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php deleted file mode 100644 index a2f4e255..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\Skipped; -use PHPUnit\Event\Test\SkippedSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSkippedSubscriber extends Subscriber implements SkippedSubscriber -{ - public function notify(Skipped $event): void - { - $this->printer()->testSkipped(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredDeprecationSubscriber.php deleted file mode 100644 index 16a4ccf9..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber -{ - public function notify(DeprecationTriggered $event): void - { - $this->printer()->testTriggeredDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredErrorSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredErrorSubscriber.php deleted file mode 100644 index 1f89911b..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredErrorSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\ErrorTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredErrorSubscriber extends Subscriber implements ErrorTriggeredSubscriber -{ - public function notify(ErrorTriggered $event): void - { - $this->printer()->testTriggeredError($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredNoticeSubscriber.php deleted file mode 100644 index 0639f027..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\NoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber -{ - public function notify(NoticeTriggered $event): void - { - $this->printer()->testTriggeredNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpDeprecationSubscriber.php deleted file mode 100644 index 550250c2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpDeprecationSubscriber extends Subscriber implements PhpDeprecationTriggeredSubscriber -{ - public function notify(PhpDeprecationTriggered $event): void - { - $this->printer()->testTriggeredPhpDeprecation($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpNoticeSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpNoticeSubscriber.php deleted file mode 100644 index 299b898c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpNoticeSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpNoticeSubscriber extends Subscriber implements PhpNoticeTriggeredSubscriber -{ - public function notify(PhpNoticeTriggered $event): void - { - $this->printer()->testTriggeredPhpNotice($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpWarningSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpWarningSubscriber.php deleted file mode 100644 index a4ff81c2..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpWarningSubscriber extends Subscriber implements PhpWarningTriggeredSubscriber -{ - public function notify(PhpWarningTriggered $event): void - { - $this->printer()->testTriggeredPhpWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php deleted file mode 100644 index 62311a01..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitDeprecationSubscriber extends Subscriber implements PhpunitDeprecationTriggeredSubscriber -{ - public function notify(PhpunitDeprecationTriggered $event): void - { - $this->printer()->testTriggeredPhpunitDeprecation(); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitWarningSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitWarningSubscriber.php deleted file mode 100644 index 7d0aed1f..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredPhpunitWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredPhpunitWarningSubscriber extends Subscriber implements PhpunitWarningTriggeredSubscriber -{ - public function notify(PhpunitWarningTriggered $event): void - { - $this->printer()->testTriggeredPhpunitWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredWarningSubscriber.php deleted file mode 100644 index 62045842..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/Subscriber/TestTriggeredWarningSubscriber.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default\ProgressPrinter; - -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\Event\Test\WarningTriggeredSubscriber; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber -{ - public function notify(WarningTriggered $event): void - { - $this->printer()->testTriggeredWarning($event); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php deleted file mode 100644 index 555382db..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ResultPrinter.php +++ /dev/null @@ -1,696 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default; - -use const PHP_EOL; -use function array_keys; -use function array_merge; -use function array_reverse; -use function array_unique; -use function assert; -use function count; -use function explode; -use function ksort; -use function range; -use function sprintf; -use function str_starts_with; -use function strlen; -use function substr; -use function trim; -use PHPUnit\Event\Code\Test; -use PHPUnit\Event\Code\TestMethod; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Event\Test\ConsideredRisky; -use PHPUnit\Event\Test\DeprecationTriggered; -use PHPUnit\Event\Test\ErrorTriggered; -use PHPUnit\Event\Test\NoticeTriggered; -use PHPUnit\Event\Test\PhpDeprecationTriggered; -use PHPUnit\Event\Test\PhpNoticeTriggered; -use PHPUnit\Event\Test\PhpunitDeprecationTriggered; -use PHPUnit\Event\Test\PhpunitErrorTriggered; -use PHPUnit\Event\Test\PhpunitNoticeTriggered; -use PHPUnit\Event\Test\PhpunitWarningTriggered; -use PHPUnit\Event\Test\PhpWarningTriggered; -use PHPUnit\Event\Test\WarningTriggered; -use PHPUnit\TestRunner\TestResult\Issues\Issue; -use PHPUnit\TestRunner\TestResult\TestResult; -use PHPUnit\TextUI\Output\Printer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class ResultPrinter -{ - private readonly Printer $printer; - private readonly bool $displayPhpunitDeprecations; - private readonly bool $displayPhpunitErrors; - private readonly bool $displayPhpunitNotices; - private readonly bool $displayPhpunitWarnings; - private readonly bool $displayTestsWithErrors; - private readonly bool $displayTestsWithFailedAssertions; - private readonly bool $displayRiskyTests; - private readonly bool $displayDetailsOnIncompleteTests; - private readonly bool $displayDetailsOnSkippedTests; - private readonly bool $displayDetailsOnTestsThatTriggerDeprecations; - private readonly bool $displayDetailsOnTestsThatTriggerErrors; - private readonly bool $displayDetailsOnTestsThatTriggerNotices; - private readonly bool $displayDetailsOnTestsThatTriggerWarnings; - private readonly bool $displayDefectsInReverseOrder; - private bool $listPrinted = false; - - public function __construct(Printer $printer, bool $displayPhpunitDeprecations, bool $displayPhpunitErrors, bool $displayPhpunitNotices, bool $displayPhpunitWarnings, bool $displayTestsWithErrors, bool $displayTestsWithFailedAssertions, bool $displayRiskyTests, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $displayDefectsInReverseOrder) - { - $this->printer = $printer; - $this->displayPhpunitDeprecations = $displayPhpunitDeprecations; - $this->displayPhpunitErrors = $displayPhpunitErrors; - $this->displayPhpunitNotices = $displayPhpunitNotices; - $this->displayPhpunitWarnings = $displayPhpunitWarnings; - $this->displayTestsWithErrors = $displayTestsWithErrors; - $this->displayTestsWithFailedAssertions = $displayTestsWithFailedAssertions; - $this->displayRiskyTests = $displayRiskyTests; - $this->displayDetailsOnIncompleteTests = $displayDetailsOnIncompleteTests; - $this->displayDetailsOnSkippedTests = $displayDetailsOnSkippedTests; - $this->displayDetailsOnTestsThatTriggerDeprecations = $displayDetailsOnTestsThatTriggerDeprecations; - $this->displayDetailsOnTestsThatTriggerErrors = $displayDetailsOnTestsThatTriggerErrors; - $this->displayDetailsOnTestsThatTriggerNotices = $displayDetailsOnTestsThatTriggerNotices; - $this->displayDetailsOnTestsThatTriggerWarnings = $displayDetailsOnTestsThatTriggerWarnings; - $this->displayDefectsInReverseOrder = $displayDefectsInReverseOrder; - } - - public function print(TestResult $result, bool $stackTraceForDeprecations = false): void - { - if ($this->displayPhpunitErrors) { - $this->printPhpunitErrors($result); - } - - if ($this->displayPhpunitWarnings) { - $this->printTestRunnerWarnings($result); - } - - if ($this->displayPhpunitDeprecations) { - $this->printTestRunnerDeprecations($result); - } - - if ($this->displayPhpunitNotices) { - $this->printTestRunnerNotices($result); - } - - if ($this->displayTestsWithErrors) { - $this->printTestsWithErrors($result); - } - - if ($this->displayTestsWithFailedAssertions) { - $this->printTestsWithFailedAssertions($result); - } - - if ($this->displayPhpunitWarnings) { - $this->printDetailsOnTestsThatTriggeredPhpunitWarnings($result); - } - - if ($this->displayPhpunitDeprecations) { - $this->printDetailsOnTestsThatTriggeredPhpunitDeprecations($result); - } - - if ($this->displayRiskyTests) { - $this->printRiskyTests($result); - } - - if ($this->displayPhpunitNotices) { - $this->printDetailsOnTestsThatTriggeredPhpunitNotices($result); - } - - if ($this->displayDetailsOnIncompleteTests) { - $this->printIncompleteTests($result); - } - - if ($this->displayDetailsOnSkippedTests) { - $this->printSkippedTestSuites($result); - $this->printSkippedTests($result); - } - - if ($this->displayDetailsOnTestsThatTriggerErrors) { - $this->printIssueList('error', $result->errors()); - } - - if ($this->displayDetailsOnTestsThatTriggerWarnings) { - $this->printIssueList('PHP warning', $result->phpWarnings()); - $this->printIssueList('warning', $result->warnings()); - } - - if ($this->displayDetailsOnTestsThatTriggerNotices) { - $this->printIssueList('PHP notice', $result->phpNotices()); - $this->printIssueList('notice', $result->notices()); - } - - if ($this->displayDetailsOnTestsThatTriggerDeprecations) { - $this->printIssueList('PHP deprecation', $result->phpDeprecations()); - $this->printIssueList('deprecation', $result->deprecations(), $stackTraceForDeprecations); - } - } - - private function printPhpunitErrors(TestResult $result): void - { - if (!$result->hasTestTriggeredPhpunitErrorEvents()) { - return; - } - - $elements = $this->mapTestsWithIssuesEventsToElements($result->testTriggeredPhpunitErrorEvents()); - - $this->printListHeaderWithNumber($elements['numberOfTestsWithIssues'], 'PHPUnit error'); - $this->printList($elements['elements']); - } - - private function printDetailsOnTestsThatTriggeredPhpunitDeprecations(TestResult $result): void - { - if (!$result->hasTestTriggeredPhpunitDeprecationEvents()) { - return; - } - - $elements = $this->mapTestsWithIssuesEventsToElements($result->testTriggeredPhpunitDeprecationEvents()); - - $this->printListHeaderWithNumberOfTestsAndNumberOfIssues( - $elements['numberOfTestsWithIssues'], - $elements['numberOfIssues'], - 'PHPUnit deprecation', - ); - - $this->printList($elements['elements']); - } - - private function printDetailsOnTestsThatTriggeredPhpunitNotices(TestResult $result): void - { - if (!$result->hasTestTriggeredPhpunitNoticeEvents()) { - return; - } - - $elements = $this->mapTestsWithIssuesEventsToElements($result->testTriggeredPhpunitNoticeEvents()); - - $this->printListHeaderWithNumberOfTestsAndNumberOfIssues( - $elements['numberOfTestsWithIssues'], - $elements['numberOfIssues'], - 'PHPUnit notice', - ); - - $this->printList($elements['elements']); - } - - private function printTestRunnerNotices(TestResult $result): void - { - if (!$result->hasTestRunnerTriggeredNoticeEvents()) { - return; - } - - $elements = []; - $messages = []; - - foreach ($result->testRunnerTriggeredNoticeEvents() as $event) { - if (isset($messages[$event->message()])) { - continue; - } - - $elements[] = [ - 'title' => $event->message(), - 'body' => '', - ]; - - $messages[$event->message()] = true; - } - - $this->printListHeaderWithNumber(count($elements), 'PHPUnit test runner notice'); - $this->printList($elements); - } - - private function printTestRunnerWarnings(TestResult $result): void - { - if (!$result->hasTestRunnerTriggeredWarningEvents()) { - return; - } - - $elements = []; - $messages = []; - - foreach ($result->testRunnerTriggeredWarningEvents() as $event) { - if (isset($messages[$event->message()])) { - continue; - } - - $elements[] = [ - 'title' => $event->message(), - 'body' => '', - ]; - - $messages[$event->message()] = true; - } - - $this->printListHeaderWithNumber(count($elements), 'PHPUnit test runner warning'); - $this->printList($elements); - } - - private function printTestRunnerDeprecations(TestResult $result): void - { - if (!$result->hasTestRunnerTriggeredDeprecationEvents()) { - return; - } - - $elements = []; - - foreach ($result->testRunnerTriggeredDeprecationEvents() as $event) { - $elements[] = [ - 'title' => $event->message(), - 'body' => '', - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'PHPUnit test runner deprecation'); - $this->printList($elements); - } - - private function printDetailsOnTestsThatTriggeredPhpunitWarnings(TestResult $result): void - { - if (!$result->hasTestTriggeredPhpunitWarningEvents()) { - return; - } - - $elements = $this->mapTestsWithIssuesEventsToElements($result->testTriggeredPhpunitWarningEvents()); - - $this->printListHeaderWithNumberOfTestsAndNumberOfIssues( - $elements['numberOfTestsWithIssues'], - $elements['numberOfIssues'], - 'PHPUnit warning', - ); - - $this->printList($elements['elements']); - } - - private function printTestsWithErrors(TestResult $result): void - { - if (!$result->hasTestErroredEvents()) { - return; - } - - $elements = []; - - foreach ($result->testErroredEvents() as $event) { - if ($event instanceof AfterLastTestMethodErrored || $event instanceof BeforeFirstTestMethodErrored) { - $title = $event->testClassName(); - } else { - $title = $this->name($event->test()); - } - - $elements[] = [ - 'title' => $title, - 'body' => $event->throwable()->asString(), - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'error'); - $this->printList($elements); - } - - private function printTestsWithFailedAssertions(TestResult $result): void - { - if (!$result->hasTestFailedEvents()) { - return; - } - - $elements = []; - - foreach ($result->testFailedEvents() as $event) { - $body = $event->throwable()->asString(); - - if (str_starts_with($body, 'AssertionError: ')) { - $body = substr($body, strlen('AssertionError: ')); - } - - $elements[] = [ - 'title' => $this->name($event->test()), - 'body' => $body, - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'failure'); - $this->printList($elements); - } - - private function printRiskyTests(TestResult $result): void - { - if (!$result->hasTestConsideredRiskyEvents()) { - return; - } - - $elements = $this->mapTestsWithIssuesEventsToElements($result->testConsideredRiskyEvents()); - - $this->printListHeaderWithNumber($elements['numberOfTestsWithIssues'], 'risky test'); - $this->printList($elements['elements']); - } - - private function printIncompleteTests(TestResult $result): void - { - if (!$result->hasTestMarkedIncompleteEvents()) { - return; - } - - $elements = []; - - foreach ($result->testMarkedIncompleteEvents() as $event) { - $elements[] = [ - 'title' => $this->name($event->test()), - 'body' => $event->throwable()->asString(), - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'incomplete test'); - $this->printList($elements); - } - - private function printSkippedTestSuites(TestResult $result): void - { - if (!$result->hasTestSuiteSkippedEvents()) { - return; - } - - $elements = []; - - foreach ($result->testSuiteSkippedEvents() as $event) { - $elements[] = [ - 'title' => $event->testSuite()->name(), - 'body' => $event->message(), - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'skipped test suite'); - $this->printList($elements); - } - - private function printSkippedTests(TestResult $result): void - { - if (!$result->hasTestSkippedEvents()) { - return; - } - - $elements = []; - - foreach ($result->testSkippedEvents() as $event) { - $elements[] = [ - 'title' => $this->name($event->test()), - 'body' => $event->message(), - ]; - } - - $this->printListHeaderWithNumber(count($elements), 'skipped test'); - $this->printList($elements); - } - - /** - * @param non-empty-string $type - * @param list $issues - */ - private function printIssueList(string $type, array $issues, bool $stackTrace = false): void - { - if ($issues === []) { - return; - } - - $numberOfUniqueIssues = count($issues); - $triggeringTests = []; - - foreach ($issues as $issue) { - $triggeringTests = array_merge($triggeringTests, array_keys($issue->triggeringTests())); - } - - $numberOfTests = count(array_unique($triggeringTests)); - unset($triggeringTests); - - $this->printListHeader( - sprintf( - '%d test%s triggered %d %s%s:' . PHP_EOL . PHP_EOL, - $numberOfTests, - $numberOfTests !== 1 ? 's' : '', - $numberOfUniqueIssues, - $type, - $numberOfUniqueIssues !== 1 ? 's' : '', - ), - ); - - $i = 1; - - foreach ($issues as $issue) { - $title = sprintf( - '%s:%d', - $issue->file(), - $issue->line(), - ); - - $body = trim($issue->description()) . PHP_EOL . PHP_EOL; - - if ($stackTrace && $issue->hasStackTrace()) { - $body .= trim($issue->stackTrace()) . PHP_EOL . PHP_EOL; - } - - if (!$issue->triggeredInTest()) { - $body .= 'Triggered by:'; - - $triggeringTests = $issue->triggeringTests(); - - ksort($triggeringTests); - - foreach ($triggeringTests as $triggeringTest) { - $body .= PHP_EOL . PHP_EOL . '* ' . $triggeringTest['test']->id(); - - if ($triggeringTest['count'] > 1) { - $body .= sprintf( - ' (%d times)', - $triggeringTest['count'], - ); - } - - if ($triggeringTest['test']->isTestMethod()) { - $body .= PHP_EOL . ' ' . $triggeringTest['test']->file() . ':' . $triggeringTest['test']->line(); - } - } - } - - $this->printIssueListElement($i++, $title, $body); - - $this->printer->print(PHP_EOL); - } - } - - private function printListHeaderWithNumberOfTestsAndNumberOfIssues(int $numberOfTestsWithIssues, int $numberOfIssues, string $type): void - { - $this->printListHeader( - sprintf( - "%d test%s triggered %d %s%s:\n\n", - $numberOfTestsWithIssues, - $numberOfTestsWithIssues !== 1 ? 's' : '', - $numberOfIssues, - $type, - $numberOfIssues !== 1 ? 's' : '', - ), - ); - } - - private function printListHeaderWithNumber(int $number, string $type): void - { - $this->printListHeader( - sprintf( - "There %s %d %s%s:\n\n", - ($number === 1) ? 'was' : 'were', - $number, - $type, - ($number === 1) ? '' : 's', - ), - ); - } - - private function printListHeader(string $header): void - { - if ($this->listPrinted) { - $this->printer->print("--\n\n"); - } - - $this->listPrinted = true; - - $this->printer->print($header); - } - - /** - * @param list $elements - */ - private function printList(array $elements): void - { - $i = 1; - - if ($this->displayDefectsInReverseOrder) { - $elements = array_reverse($elements); - } - - foreach ($elements as $element) { - $this->printListElement($i++, $element['title'], $element['body']); - } - - $this->printer->print("\n"); - } - - private function printListElement(int $number, string $title, string $body): void - { - $body = trim($body); - - $this->printer->print( - sprintf( - "%s%d) %s\n%s%s", - $number > 1 ? "\n" : '', - $number, - $title, - $body, - $body !== '' ? "\n" : '', - ), - ); - } - - private function printIssueListElement(int $number, string $title, string $body): void - { - $body = trim($body); - - $this->printer->print( - sprintf( - "%d) %s\n%s%s", - $number, - $title, - $body, - $body !== '' ? "\n" : '', - ), - ); - } - - private function name(Test $test): string - { - if ($test->isTestMethod()) { - assert($test instanceof TestMethod); - - if (!$test->testData()->hasDataFromDataProvider()) { - return $test->nameWithClass(); - } - - return $test->className() . '::' . $test->methodName() . $test->testData()->dataFromDataProvider()->dataAsStringForResultOutput(); - } - - return $test->name(); - } - - /** - * @param array> $events - * - * @return array{numberOfTestsWithIssues: int, numberOfIssues: int, elements: list} - */ - private function mapTestsWithIssuesEventsToElements(array $events): array - { - $elements = []; - $issues = 0; - - foreach ($events as $reasons) { - $test = $reasons[0]->test(); - $testLocation = $this->testLocation($test); - $title = $this->name($test); - $body = ''; - $first = true; - $single = count($reasons) === 1; - - foreach ($reasons as $reason) { - if ($first) { - $first = false; - } else { - $body .= PHP_EOL; - } - - $body .= $this->reasonMessage($reason, $single); - $body .= $this->reasonLocation($reason, $single); - - $issues++; - } - - if ($testLocation !== '') { - $body .= $testLocation; - } - - $elements[] = [ - 'title' => $title, - 'body' => $body, - ]; - } - - return [ - 'numberOfTestsWithIssues' => count($events), - 'numberOfIssues' => $issues, - 'elements' => $elements, - ]; - } - - private function testLocation(Test $test): string - { - if (!$test->isTestMethod()) { - return ''; - } - - assert($test instanceof TestMethod); - - return sprintf( - '%s%s:%d%s', - PHP_EOL, - $test->file(), - $test->line(), - PHP_EOL, - ); - } - - private function reasonMessage(ConsideredRisky|DeprecationTriggered|ErrorTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpunitDeprecationTriggered|PhpunitErrorTriggered|PhpunitNoticeTriggered|PhpunitWarningTriggered|PhpWarningTriggered|WarningTriggered $reason, bool $single): string - { - $message = trim($reason->message()); - - if ($single) { - return $message . PHP_EOL; - } - - $lines = explode(PHP_EOL, $message); - $buffer = '* ' . $lines[0] . PHP_EOL; - - if (count($lines) > 1) { - foreach (range(1, count($lines) - 1) as $line) { - $buffer .= ' ' . $lines[$line] . PHP_EOL; - } - } - - return $buffer; - } - - private function reasonLocation(ConsideredRisky|DeprecationTriggered|ErrorTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpunitDeprecationTriggered|PhpunitErrorTriggered|PhpunitNoticeTriggered|PhpunitWarningTriggered|PhpWarningTriggered|WarningTriggered $reason, bool $single): string - { - if (!$reason instanceof DeprecationTriggered && - !$reason instanceof PhpDeprecationTriggered && - !$reason instanceof ErrorTriggered && - !$reason instanceof NoticeTriggered && - !$reason instanceof PhpNoticeTriggered && - !$reason instanceof WarningTriggered && - !$reason instanceof PhpWarningTriggered) { - return ''; - } - - return sprintf( - '%s%s:%d%s', - $single ? '' : ' ', - $reason->file(), - $reason->line(), - PHP_EOL, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php deleted file mode 100644 index b51d5106..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/UnexpectedOutputPrinter.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\Default; - -use PHPUnit\Event\Facade; -use PHPUnit\Event\Test\PrintedUnexpectedOutput; -use PHPUnit\Event\Test\PrintedUnexpectedOutputSubscriber; -use PHPUnit\TextUI\Output\Printer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UnexpectedOutputPrinter implements PrintedUnexpectedOutputSubscriber -{ - private Printer $printer; - - public function __construct(Printer $printer, Facade $facade) - { - $this->printer = $printer; - - $facade->registerSubscriber($this); - } - - public function notify(PrintedUnexpectedOutput $event): void - { - $this->printer->print($event->output()); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php b/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php deleted file mode 100644 index 2a50017b..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php +++ /dev/null @@ -1,275 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output; - -use const PHP_EOL; -use function assert; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Logging\TeamCity\TeamCityLogger; -use PHPUnit\Logging\TestDox\TestResultCollection; -use PHPUnit\Runner\DirectoryDoesNotExistException; -use PHPUnit\TestRunner\TestResult\TestResult; -use PHPUnit\TextUI\CannotOpenSocketException; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\InvalidSocketException; -use PHPUnit\TextUI\Output\Default\ProgressPrinter\ProgressPrinter as DefaultProgressPrinter; -use PHPUnit\TextUI\Output\Default\ResultPrinter as DefaultResultPrinter; -use PHPUnit\TextUI\Output\Default\UnexpectedOutputPrinter; -use PHPUnit\TextUI\Output\TestDox\ResultPrinter as TestDoxResultPrinter; -use SebastianBergmann\Timer\Duration; -use SebastianBergmann\Timer\ResourceUsageFormatter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Facade -{ - private static ?Printer $printer = null; - private static ?DefaultResultPrinter $defaultResultPrinter = null; - private static ?TestDoxResultPrinter $testDoxResultPrinter = null; - private static ?SummaryPrinter $summaryPrinter = null; - private static bool $defaultProgressPrinter = false; - - public static function init(Configuration $configuration, bool $extensionReplacesProgressOutput, bool $extensionReplacesResultOutput): Printer - { - self::createPrinter($configuration); - - assert(self::$printer !== null); - - if ($configuration->debug()) { - return self::$printer; - } - - self::createUnexpectedOutputPrinter(); - - if (!$extensionReplacesProgressOutput) { - self::createProgressPrinter($configuration); - } - - if (!$extensionReplacesResultOutput) { - self::createResultPrinter($configuration); - self::createSummaryPrinter($configuration); - } - - if ($configuration->outputIsTeamCity()) { - new TeamCityLogger( - DefaultPrinter::standardOutput(), - EventFacade::instance(), - ); - } - - return self::$printer; - } - - /** - * @param ?array $testDoxResult - */ - public static function printResult(TestResult $result, ?array $testDoxResult, Duration $duration, bool $stackTraceForDeprecations): void - { - assert(self::$printer !== null); - - if ($result->numberOfTestsRun() > 0) { - if (self::$defaultProgressPrinter) { - self::$printer->print(PHP_EOL . PHP_EOL); - } - - self::$printer->print((new ResourceUsageFormatter)->resourceUsage($duration) . PHP_EOL . PHP_EOL); - } - - if (self::$testDoxResultPrinter !== null && $testDoxResult !== null) { - self::$testDoxResultPrinter->print($result, $testDoxResult); - } - - if (self::$defaultResultPrinter !== null) { - self::$defaultResultPrinter->print($result, $stackTraceForDeprecations); - } - - if (self::$summaryPrinter !== null) { - self::$summaryPrinter->print($result); - } - } - - /** - * @throws CannotOpenSocketException - * @throws DirectoryDoesNotExistException - * @throws InvalidSocketException - */ - public static function printerFor(string $target): Printer - { - if ($target === 'php://stdout') { - if (!self::$printer instanceof NullPrinter) { - return self::$printer; - } - - return DefaultPrinter::standardOutput(); - } - - return DefaultPrinter::from($target); - } - - private static function createPrinter(Configuration $configuration): void - { - $printerNeeded = false; - - if ($configuration->debug()) { - $printerNeeded = true; - } - - if ($configuration->outputIsTeamCity()) { - $printerNeeded = true; - } - - if ($configuration->outputIsTestDox()) { - $printerNeeded = true; - } - - if (!$configuration->noOutput() && !$configuration->noProgress()) { - $printerNeeded = true; - } - - if (!$configuration->noOutput() && !$configuration->noResults()) { - $printerNeeded = true; - } - - if ($printerNeeded) { - if ($configuration->outputToStandardErrorStream()) { - self::$printer = DefaultPrinter::standardError(); - - return; - } - - self::$printer = DefaultPrinter::standardOutput(); - - return; - } - - self::$printer = new NullPrinter; - } - - private static function createProgressPrinter(Configuration $configuration): void - { - assert(self::$printer !== null); - - if (!self::useDefaultProgressPrinter($configuration)) { - return; - } - - new DefaultProgressPrinter( - self::$printer, - EventFacade::instance(), - $configuration->colors(), - $configuration->columns(), - $configuration->source(), - ); - - self::$defaultProgressPrinter = true; - } - - private static function useDefaultProgressPrinter(Configuration $configuration): bool - { - if ($configuration->noOutput()) { - return false; - } - - if ($configuration->noProgress()) { - return false; - } - - if ($configuration->outputIsTeamCity()) { - return false; - } - - return true; - } - - private static function createResultPrinter(Configuration $configuration): void - { - assert(self::$printer !== null); - - if ($configuration->outputIsTestDox()) { - self::$defaultResultPrinter = new DefaultResultPrinter( - self::$printer, - $configuration->displayDetailsOnPhpunitDeprecations() || $configuration->displayDetailsOnAllIssues(), - true, - $configuration->displayDetailsOnPhpunitNotices() || $configuration->displayDetailsOnAllIssues(), - true, - false, - false, - true, - false, - false, - $configuration->displayDetailsOnTestsThatTriggerDeprecations() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerErrors() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerNotices() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerWarnings() || $configuration->displayDetailsOnAllIssues(), - $configuration->reverseDefectList(), - ); - } - - if ($configuration->outputIsTestDox()) { - self::$testDoxResultPrinter = new TestDoxResultPrinter( - self::$printer, - $configuration->colors(), - $configuration->columns(), - $configuration->testDoxOutputWithSummary(), - ); - } - - if ($configuration->noOutput() || $configuration->noResults()) { - return; - } - - if (self::$defaultResultPrinter !== null) { - return; - } - - self::$defaultResultPrinter = new DefaultResultPrinter( - self::$printer, - $configuration->displayDetailsOnPhpunitDeprecations() || $configuration->displayDetailsOnAllIssues(), - true, - $configuration->displayDetailsOnPhpunitNotices() || $configuration->displayDetailsOnAllIssues(), - true, - true, - true, - true, - $configuration->displayDetailsOnIncompleteTests() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnSkippedTests() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerDeprecations() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerErrors() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerNotices() || $configuration->displayDetailsOnAllIssues(), - $configuration->displayDetailsOnTestsThatTriggerWarnings() || $configuration->displayDetailsOnAllIssues(), - $configuration->reverseDefectList(), - ); - } - - private static function createSummaryPrinter(Configuration $configuration): void - { - assert(self::$printer !== null); - - if (($configuration->noOutput() || $configuration->noResults()) && - !($configuration->outputIsTeamCity() || $configuration->outputIsTestDox())) { - return; - } - - self::$summaryPrinter = new SummaryPrinter( - self::$printer, - $configuration->colors(), - ); - } - - private static function createUnexpectedOutputPrinter(): void - { - assert(self::$printer !== null); - - new UnexpectedOutputPrinter(self::$printer, EventFacade::instance()); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/DefaultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Printer/DefaultPrinter.php deleted file mode 100644 index 382f4815..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/DefaultPrinter.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output; - -use function assert; -use function count; -use function dirname; -use function explode; -use function fclose; -use function fopen; -use function fsockopen; -use function fwrite; -use function str_replace; -use function str_starts_with; -use PHPUnit\Runner\DirectoryDoesNotExistException; -use PHPUnit\TextUI\CannotOpenSocketException; -use PHPUnit\TextUI\InvalidSocketException; -use PHPUnit\Util\Filesystem; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class DefaultPrinter implements Printer -{ - /** - * @var closed-resource|resource - */ - private $stream; - private readonly bool $isPhpStream; - private bool $isOpen; - - /** - * @throws CannotOpenSocketException - * @throws DirectoryDoesNotExistException - * @throws InvalidSocketException - */ - public static function from(string $out): self - { - return new self($out); - } - - /** - * @throws CannotOpenSocketException - * @throws DirectoryDoesNotExistException - * @throws InvalidSocketException - */ - public static function standardOutput(): self - { - return new self('php://stdout'); - } - - /** - * @throws CannotOpenSocketException - * @throws DirectoryDoesNotExistException - * @throws InvalidSocketException - */ - public static function standardError(): self - { - return new self('php://stderr'); - } - - /** - * @throws CannotOpenSocketException - * @throws DirectoryDoesNotExistException - * @throws InvalidSocketException - */ - private function __construct(string $out) - { - $this->isPhpStream = str_starts_with($out, 'php://'); - - if (str_starts_with($out, 'socket://')) { - $tmp = explode(':', str_replace('socket://', '', $out)); - - if (count($tmp) !== 2) { - throw new InvalidSocketException($out); - } - - $stream = @fsockopen($tmp[0], (int) $tmp[1]); - - if ($stream === false) { - throw new CannotOpenSocketException($tmp[0], (int) $tmp[1]); - } - - $this->stream = $stream; - $this->isOpen = true; - - return; - } - - if (!$this->isPhpStream && !Filesystem::createDirectory(dirname($out))) { - throw new DirectoryDoesNotExistException(dirname($out)); - } - - $stream = fopen($out, 'wb'); - - assert($stream !== false); - - $this->stream = $stream; - $this->isOpen = true; - } - - public function print(string $buffer): void - { - assert($this->isOpen); - - fwrite($this->stream, $buffer); - } - - public function flush(): void - { - if ($this->isOpen && $this->isPhpStream) { - fclose($this->stream); - - $this->isOpen = false; - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/NullPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Printer/NullPrinter.php deleted file mode 100644 index 5e6b7ddf..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/NullPrinter.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class NullPrinter implements Printer -{ - public function print(string $buffer): void - { - } - - public function flush(): void - { - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/Printer.php b/vendor/phpunit/phpunit/src/TextUI/Output/Printer/Printer.php deleted file mode 100644 index c9b0fb97..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Printer/Printer.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Printer -{ - public function print(string $buffer): void; - - public function flush(): void; -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/SummaryPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/SummaryPrinter.php deleted file mode 100644 index 4f3e6618..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/SummaryPrinter.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output; - -use const PHP_EOL; -use function sprintf; -use PHPUnit\TestRunner\TestResult\TestResult; -use PHPUnit\Util\Color; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class SummaryPrinter -{ - private readonly Printer $printer; - private readonly bool $colors; - private bool $countPrinted = false; - - public function __construct(Printer $printer, bool $colors) - { - $this->printer = $printer; - $this->colors = $colors; - } - - public function print(TestResult $result): void - { - if ($result->numberOfTestsRun() === 0) { - $this->printWithColor( - 'fg-black, bg-yellow', - 'No tests executed!', - ); - - return; - } - - if ($result->wasSuccessful() && - !$result->hasIssues() && - !$result->hasTestSuiteSkippedEvents() && - !$result->hasTestSkippedEvents()) { - $this->printWithColor( - 'fg-black, bg-green', - sprintf( - 'OK (%d test%s, %d assertion%s)', - $result->numberOfTestsRun(), - $result->numberOfTestsRun() === 1 ? '' : 's', - $result->numberOfAssertions(), - $result->numberOfAssertions() === 1 ? '' : 's', - ), - ); - - $this->printNumberOfIssuesIgnoredByBaseline($result); - - return; - } - - $color = 'fg-black, bg-yellow'; - - if ($result->wasSuccessful()) { - if ($result->hasIssues()) { - $this->printWithColor( - $color, - 'OK, but there were issues!', - ); - } else { - $this->printWithColor( - $color, - 'OK, but some tests were skipped!', - ); - } - } else { - if ($result->hasTestErroredEvents() || $result->hasTestTriggeredPhpunitErrorEvents()) { - $color = 'fg-white, bg-red'; - - $this->printWithColor( - $color, - 'ERRORS!', - ); - } else { - $color = 'fg-white, bg-red'; - - $this->printWithColor( - $color, - 'FAILURES!', - ); - } - } - - $this->printCountString($result->numberOfTestsRun(), 'Tests', $color, true); - $this->printCountString($result->numberOfAssertions(), 'Assertions', $color, true); - $this->printCountString($result->numberOfErrors(), 'Errors', $color); - $this->printCountString($result->numberOfTestFailedEvents(), 'Failures', $color); - $this->printCountString($result->numberOfPhpunitWarnings(), 'PHPUnit Warnings', $color); - $this->printCountString($result->numberOfWarnings(), 'Warnings', $color); - $this->printCountString($result->numberOfPhpOrUserDeprecations(), 'Deprecations', $color); - $this->printCountString($result->numberOfPhpunitDeprecations(), 'PHPUnit Deprecations', $color); - $this->printCountString($result->numberOfPhpunitNotices(), 'PHPUnit Notices', $color); - $this->printCountString($result->numberOfNotices(), 'Notices', $color); - $this->printCountString($result->numberOfTestSuiteSkippedEvents() + $result->numberOfTestSkippedEvents(), 'Skipped', $color); - $this->printCountString($result->numberOfTestMarkedIncompleteEvents(), 'Incomplete', $color); - $this->printCountString($result->numberOfTestsWithTestConsideredRiskyEvents(), 'Risky', $color); - $this->printWithColor($color, '.'); - - $this->printNumberOfIssuesIgnoredByBaseline($result); - } - - private function printCountString(int $count, string $name, string $color, bool $always = false): void - { - if ($always || $count > 0) { - $this->printWithColor( - $color, - sprintf( - '%s%s: %d', - $this->countPrinted ? ', ' : '', - $name, - $count, - ), - false, - ); - - $this->countPrinted = true; - } - } - - private function printWithColor(string $color, string $buffer, bool $lf = true): void - { - if ($this->colors) { - $buffer = Color::colorizeTextBox($color, $buffer); - } - - $this->printer->print($buffer); - - if ($lf) { - $this->printer->print(PHP_EOL); - } - } - - private function printNumberOfIssuesIgnoredByBaseline(TestResult $result): void - { - if ($result->hasIssuesIgnoredByBaseline()) { - $this->printer->print( - sprintf( - '%s%d issue%s %s ignored by baseline.%s', - PHP_EOL, - $result->numberOfIssuesIgnoredByBaseline(), - $result->numberOfIssuesIgnoredByBaseline() > 1 ? 's' : '', - $result->numberOfIssuesIgnoredByBaseline() > 1 ? 'were' : 'was', - PHP_EOL, - ), - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php deleted file mode 100644 index 27ae3ced..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php +++ /dev/null @@ -1,502 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\Output\TestDox; - -use const PHP_EOL; -use function array_map; -use function explode; -use function implode; -use function preg_match; -use function preg_split; -use function rtrim; -use function sprintf; -use function str_starts_with; -use function trim; -use PHPUnit\Event\Code\Throwable; -use PHPUnit\Event\Test\AfterLastTestMethodErrored; -use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; -use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\Logging\TestDox\TestResult as TestDoxTestResult; -use PHPUnit\Logging\TestDox\TestResultCollection; -use PHPUnit\TestRunner\TestResult\TestResult; -use PHPUnit\TextUI\Output\Printer; -use PHPUnit\Util\Color; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ResultPrinter -{ - private Printer $printer; - private bool $colors; - private int $columns; - private bool $printSummary; - - public function __construct(Printer $printer, bool $colors, int $columns, bool $printSummary) - { - $this->printer = $printer; - $this->colors = $colors; - $this->columns = $columns; - $this->printSummary = $printSummary; - } - - /** - * @param array $tests - */ - public function print(TestResult $result, array $tests): void - { - $this->doPrint($tests, false); - - if ($this->printSummary) { - $this->printer->print('Summary of tests with errors, failures, or issues:' . PHP_EOL . PHP_EOL); - - $this->doPrint($tests, true); - } - - $beforeFirstTestMethodErrored = []; - $afterLastTestMethodErrored = []; - - foreach ($result->testErroredEvents() as $error) { - if ($error instanceof BeforeFirstTestMethodErrored) { - $beforeFirstTestMethodErrored[$error->calledMethod()->className() . '::' . $error->calledMethod()->methodName()] = $error; - } - - if ($error instanceof AfterLastTestMethodErrored) { - $afterLastTestMethodErrored[$error->calledMethod()->className() . '::' . $error->calledMethod()->methodName()] = $error; - } - } - - $this->printBeforeClassOrAfterClassErrors( - 'before-first-test', - $beforeFirstTestMethodErrored, - ); - - $this->printBeforeClassOrAfterClassErrors( - 'after-last-test', - $afterLastTestMethodErrored, - ); - } - - /** - * @param array $tests - */ - private function doPrint(array $tests, bool $onlySummary): void - { - foreach ($tests as $prettifiedClassName => $_tests) { - $print = true; - - if ($onlySummary) { - $found = false; - - foreach ($_tests as $test) { - if ($test->status()->isSuccess()) { - continue; - } - - $found = true; - - break; - } - - if (!$found) { - $print = false; - } - } - - if (!$print) { - continue; - } - - $this->printPrettifiedClassName($prettifiedClassName); - - foreach ($_tests as $test) { - if ($onlySummary && $test->status()->isSuccess()) { - continue; - } - - $this->printTestResult($test); - } - - $this->printer->print(PHP_EOL); - } - } - - private function printPrettifiedClassName(string $prettifiedClassName): void - { - $buffer = $prettifiedClassName; - - if ($this->colors) { - $buffer = Color::colorizeTextBox('underlined', $buffer); - } - - $this->printer->print($buffer . PHP_EOL); - } - - private function printTestResult(TestDoxTestResult $test): void - { - $this->printTestResultHeader($test); - $this->printTestResultBody($test); - } - - private function printTestResultHeader(TestDoxTestResult $test): void - { - $buffer = ' ' . $this->symbolFor($test->status()) . ' '; - - if ($this->colors) { - $this->printer->print( - Color::colorizeTextBox( - $this->colorFor($test->status()), - $buffer, - ), - ); - } else { - $this->printer->print($buffer); - } - - $this->printer->print($test->test()->testDox()->prettifiedMethodName($this->colors) . PHP_EOL); - } - - private function printTestResultBody(TestDoxTestResult $test): void - { - if ($test->status()->isSuccess()) { - return; - } - - if (!$test->hasThrowable()) { - return; - } - - $this->printTestResultBodyStart($test); - $this->printThrowable($test->status(), $test->throwable()); - $this->printTestResultBodyEnd($test); - } - - private function printTestResultBodyStart(TestDoxTestResult $test): void - { - $this->printer->print( - $this->prefixLines( - $this->prefixFor('start', $test->status()), - '', - ), - ); - - $this->printer->print(PHP_EOL); - } - - private function printTestResultBodyEnd(TestDoxTestResult $test): void - { - $this->printer->print(PHP_EOL); - - $this->printer->print( - $this->prefixLines( - $this->prefixFor('last', $test->status()), - '', - ), - ); - - $this->printer->print(PHP_EOL); - } - - private function printThrowable(TestStatus $status, Throwable $throwable): void - { - $message = trim($throwable->description()); - $stackTrace = $this->formatStackTrace($throwable->stackTrace()); - $diff = ''; - - if ($message !== '' && $this->colors) { - ['message' => $message, 'diff' => $diff] = $this->colorizeMessageAndDiff( - $message, - $this->messageColorFor($status), - ); - } - - if ($message !== '') { - $this->printer->print( - $this->prefixLines( - $this->prefixFor('message', $status), - $message, - ), - ); - - $this->printer->print(PHP_EOL); - } - - if ($diff !== '') { - $this->printer->print( - $this->prefixLines( - $this->prefixFor('diff', $status), - $diff, - ), - ); - - $this->printer->print(PHP_EOL); - } - - if ($stackTrace !== '') { - if ($message !== '' || $diff !== '') { - $tracePrefix = $this->prefixFor('default', $status); - } else { - $tracePrefix = $this->prefixFor('trace', $status); - } - - $this->printer->print( - $this->prefixLines($tracePrefix, PHP_EOL . $stackTrace), - ); - } - - if ($throwable->hasPrevious()) { - $this->printer->print(PHP_EOL); - - $this->printer->print( - $this->prefixLines( - $this->prefixFor('default', $status), - ' ', - ), - ); - - $this->printer->print(PHP_EOL); - - $this->printer->print( - $this->prefixLines( - $this->prefixFor('default', $status), - 'Caused by:', - ), - ); - - $this->printer->print(PHP_EOL); - - $this->printThrowable($status, $throwable->previous()); - } - } - - /** - * @return array{message: string, diff: string} - */ - private function colorizeMessageAndDiff(string $buffer, string $style): array - { - $lines = []; - - if ($buffer !== '') { - $lines = array_map('\rtrim', explode(PHP_EOL, $buffer)); - } - - $message = []; - $diff = []; - $insideDiff = false; - - foreach ($lines as $line) { - if ($line === '--- Expected') { - $insideDiff = true; - } - - if (!$insideDiff) { - $message[] = $line; - } else { - if (str_starts_with($line, '-')) { - $line = Color::colorize('fg-red', Color::visualizeWhitespace($line, true)); - } elseif (str_starts_with($line, '+')) { - $line = Color::colorize('fg-green', Color::visualizeWhitespace($line, true)); - } elseif ($line === '@@ @@') { - $line = Color::colorize('fg-cyan', $line); - } - - $diff[] = $line; - } - } - - $message = implode(PHP_EOL, $message); - $diff = implode(PHP_EOL, $diff); - - if ($message !== '') { - // Testdox output has a left-margin of 5; keep right-margin to prevent terminal scrolling - $message = Color::colorizeTextBox($style, $message, $this->columns - 7); - } - - return [ - 'message' => $message, - 'diff' => $diff, - ]; - } - - private function formatStackTrace(string $stackTrace): string - { - if (!$this->colors) { - return rtrim($stackTrace); - } - - $lines = []; - $previousPath = ''; - - foreach (explode(PHP_EOL, $stackTrace) as $line) { - if (preg_match('/^(.*):(\d+)$/', $line, $matches) > 0) { - $lines[] = Color::colorizePath($matches[1], $previousPath) . Color::dim(':') . Color::colorize('fg-blue', $matches[2]) . "\n"; - $previousPath = $matches[1]; - - continue; - } - - $lines[] = $line; - $previousPath = ''; - } - - return rtrim(implode('', $lines)); - } - - private function prefixLines(string $prefix, string $message): string - { - $lines = preg_split('/\r\n|\r|\n/', $message); - - if ($lines === false) { - $lines = []; - } - - return implode( - PHP_EOL, - array_map( - static fn (string $line) => ' ' . $prefix . ($line !== '' ? ' ' . $line : ''), - $lines, - ), - ); - } - - /** - * @param 'default'|'diff'|'last'|'message'|'start'|'trace' $type - */ - private function prefixFor(string $type, TestStatus $status): string - { - if (!$this->colors) { - return '│'; - } - - return Color::colorize( - $this->colorFor($status), - match ($type) { - 'default' => '│', - 'start' => '┐', - 'message' => '├', - 'diff' => '┊', - 'trace' => '╵', - 'last' => '┴', - }, - ); - } - - private function colorFor(TestStatus $status): string - { - if ($status->isSuccess()) { - return 'fg-green'; - } - - if ($status->isError()) { - return 'fg-yellow'; - } - - if ($status->isFailure()) { - return 'fg-red'; - } - - if ($status->isSkipped()) { - return 'fg-cyan'; - } - - if ($status->isIncomplete() || $status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { - return 'fg-yellow'; - } - - return 'fg-blue'; - } - - private function messageColorFor(TestStatus $status): string - { - if ($status->isSuccess()) { - return ''; - } - - if ($status->isError()) { - return 'bg-yellow,fg-black'; - } - - if ($status->isFailure()) { - return 'bg-red,fg-white'; - } - - if ($status->isSkipped()) { - return 'fg-cyan'; - } - - if ($status->isIncomplete() || $status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { - return 'fg-yellow'; - } - - return 'fg-white,bg-blue'; - } - - private function symbolFor(TestStatus $status): string - { - if ($status->isSuccess()) { - return '✔'; - } - - if ($status->isError() || $status->isFailure()) { - return '✘'; - } - - if ($status->isSkipped()) { - return '↩'; - } - - if ($status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { - return '⚠'; - } - - if ($status->isIncomplete()) { - return '∅'; - } - - return '?'; - } - - /** - * @param 'after-last-test'|'before-first-test' $type - * @param array $errors - */ - private function printBeforeClassOrAfterClassErrors(string $type, array $errors): void - { - if ($errors === []) { - return; - } - - $this->printer->print( - sprintf( - 'These %s methods errored:' . PHP_EOL . PHP_EOL, - $type, - ), - ); - - $index = 0; - - foreach ($errors as $method => $error) { - $this->printer->print( - sprintf( - '%d) %s' . PHP_EOL, - ++$index, - $method, - ), - ); - - $this->printer->print(trim($error->throwable()->description()) . PHP_EOL . PHP_EOL); - $this->printer->print($this->formatStackTrace($error->throwable()->stackTrace()) . PHP_EOL); - } - - $this->printer->print(PHP_EOL); - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php b/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php deleted file mode 100644 index cc95d33c..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use PHPUnit\TestRunner\TestResult\TestResult; -use PHPUnit\TextUI\Configuration\Configuration; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ShellExitCodeCalculator -{ - private const int SUCCESS_EXIT = 0; - private const int FAILURE_EXIT = 1; - private const int EXCEPTION_EXIT = 2; - - public function calculate(Configuration $configuration, TestResult $result): int - { - $failOnDeprecation = false; - $failOnPhpunitDeprecation = false; - $failOnPhpunitNotice = false; - $failOnPhpunitWarning = false; - $failOnEmptyTestSuite = false; - $failOnIncomplete = false; - $failOnNotice = false; - $failOnRisky = false; - $failOnSkipped = false; - $failOnWarning = false; - - if ($configuration->failOnAllIssues()) { - $failOnDeprecation = true; - $failOnPhpunitDeprecation = true; - $failOnPhpunitNotice = true; - $failOnPhpunitWarning = true; - $failOnEmptyTestSuite = true; - $failOnIncomplete = true; - $failOnNotice = true; - $failOnRisky = true; - $failOnSkipped = true; - $failOnWarning = true; - } - - if ($configuration->failOnDeprecation()) { - $failOnDeprecation = true; - } - - if ($configuration->doNotFailOnDeprecation()) { - $failOnDeprecation = false; - } - - if ($configuration->failOnPhpunitDeprecation()) { - $failOnPhpunitDeprecation = true; - } - - if ($configuration->doNotFailOnPhpunitDeprecation()) { - $failOnPhpunitDeprecation = false; - } - - if ($configuration->failOnPhpunitNotice()) { - $failOnPhpunitNotice = true; - } - - if ($configuration->doNotFailOnPhpunitNotice()) { - $failOnPhpunitNotice = false; - } - - if ($configuration->failOnPhpunitWarning()) { - $failOnPhpunitWarning = true; - } - - if ($configuration->doNotFailOnPhpunitWarning()) { - $failOnPhpunitWarning = false; - } - - if ($configuration->failOnEmptyTestSuite()) { - $failOnEmptyTestSuite = true; - } - - if ($configuration->doNotFailOnEmptyTestSuite()) { - $failOnEmptyTestSuite = false; - } - - if ($configuration->failOnIncomplete()) { - $failOnIncomplete = true; - } - - if ($configuration->doNotFailOnIncomplete()) { - $failOnIncomplete = false; - } - - if ($configuration->failOnNotice()) { - $failOnNotice = true; - } - - if ($configuration->doNotFailOnNotice()) { - $failOnNotice = false; - } - - if ($configuration->failOnRisky()) { - $failOnRisky = true; - } - - if ($configuration->doNotFailOnRisky()) { - $failOnRisky = false; - } - - if ($configuration->failOnSkipped()) { - $failOnSkipped = true; - } - - if ($configuration->doNotFailOnSkipped()) { - $failOnSkipped = false; - } - - if ($configuration->failOnWarning()) { - $failOnWarning = true; - } - - if ($configuration->doNotFailOnWarning()) { - $failOnWarning = false; - } - - $returnCode = self::FAILURE_EXIT; - - if ($result->wasSuccessful()) { - $returnCode = self::SUCCESS_EXIT; - } - - if ($failOnEmptyTestSuite && !$result->hasTests()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnDeprecation && $result->hasPhpOrUserDeprecations()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnPhpunitDeprecation && $result->hasPhpunitDeprecations()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnPhpunitNotice && $result->hasPhpunitNotices()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnPhpunitWarning && $result->hasPhpunitWarnings()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnIncomplete && $result->hasIncompleteTests()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnNotice && $result->hasNotices()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnRisky && $result->hasRiskyTests()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnSkipped && $result->hasSkippedTests()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($failOnWarning && $result->hasWarnings()) { - $returnCode = self::FAILURE_EXIT; - } - - if ($result->hasErrors()) { - $returnCode = self::EXCEPTION_EXIT; - } - - return $returnCode; - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php deleted file mode 100644 index 2363ca29..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function mt_srand; -use PHPUnit\Event; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\ResultCache\ResultCache; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\TextUI\Configuration\Configuration; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class TestRunner -{ - /** - * @throws RuntimeException - */ - public function run(Configuration $configuration, ResultCache $resultCache, TestSuite $suite): void - { - try { - Event\Facade::emitter()->testRunnerStarted(); - - if ($configuration->executionOrder() === TestSuiteSorter::ORDER_RANDOMIZED) { - mt_srand($configuration->randomOrderSeed()); - } - - if ($configuration->executionOrder() !== TestSuiteSorter::ORDER_DEFAULT || - $configuration->executionOrderDefects() !== TestSuiteSorter::ORDER_DEFAULT || - $configuration->resolveDependencies()) { - $resultCache->load(); - - (new TestSuiteSorter($resultCache))->reorderTestsInSuite( - $suite, - $configuration->executionOrder(), - $configuration->resolveDependencies(), - $configuration->executionOrderDefects(), - ); - - Event\Facade::emitter()->testSuiteSorted( - $configuration->executionOrder(), - $configuration->executionOrderDefects(), - $configuration->resolveDependencies(), - ); - } - - (new TestSuiteFilterProcessor)->process($configuration, $suite); - - Event\Facade::emitter()->testRunnerExecutionStarted( - Event\TestSuite\TestSuiteBuilder::from($suite), - ); - - $suite->run(); - - Event\Facade::emitter()->testRunnerExecutionFinished(); - Event\Facade::emitter()->testRunnerFinished(); - } catch (Throwable $t) { - throw new RuntimeException( - $t->getMessage(), - (int) $t->getCode(), - $t, - ); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/TestSuiteFilterProcessor.php b/vendor/phpunit/phpunit/src/TextUI/TestSuiteFilterProcessor.php deleted file mode 100644 index c0e4beb1..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/TestSuiteFilterProcessor.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI; - -use function array_map; -use PHPUnit\Event; -use PHPUnit\Framework\TestSuite; -use PHPUnit\Runner\Filter\Factory; -use PHPUnit\TextUI\Configuration\Configuration; -use PHPUnit\TextUI\Configuration\FilterNotConfiguredException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class TestSuiteFilterProcessor -{ - /** - * @throws Event\RuntimeException - * @throws FilterNotConfiguredException - */ - public function process(Configuration $configuration, TestSuite $suite): void - { - $factory = new Factory; - - if (!$configuration->hasFilter() && - !$configuration->hasGroups() && - !$configuration->hasExcludeGroups() && - !$configuration->hasExcludeFilter() && - !$configuration->hasTestsCovering() && - !$configuration->hasTestsUsing() && - !$configuration->hasTestsRequiringPhpExtension()) { - return; - } - - if ($configuration->hasExcludeGroups()) { - $factory->addExcludeGroupFilter( - $configuration->excludeGroups(), - ); - } - - if ($configuration->hasGroups()) { - $factory->addIncludeGroupFilter( - $configuration->groups(), - ); - } - - if ($configuration->hasTestsCovering()) { - $factory->addIncludeGroupFilter( - array_map( - static fn (string $name): string => '__phpunit_covers_' . $name, - $configuration->testsCovering(), - ), - ); - } - - if ($configuration->hasTestsUsing()) { - $factory->addIncludeGroupFilter( - array_map( - static fn (string $name): string => '__phpunit_uses_' . $name, - $configuration->testsUsing(), - ), - ); - } - - if ($configuration->hasTestsRequiringPhpExtension()) { - $factory->addIncludeGroupFilter( - array_map( - static fn (string $name): string => '__phpunit_requires_php_extension' . $name, - $configuration->testsRequiringPhpExtension(), - ), - ); - } - - if ($configuration->hasExcludeFilter()) { - $factory->addExcludeNameFilter( - $configuration->excludeFilter(), - ); - } - - if ($configuration->hasFilter()) { - $factory->addIncludeNameFilter( - $configuration->filter(), - ); - } - - $suite->injectFilter($factory); - - Event\Facade::emitter()->testSuiteFiltered( - Event\TestSuite\TestSuiteBuilder::from($suite), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Color.php b/vendor/phpunit/phpunit/src/Util/Color.php deleted file mode 100644 index c225e37b..00000000 --- a/vendor/phpunit/phpunit/src/Util/Color.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const DIRECTORY_SEPARATOR; -use const PHP_EOL; -use function array_map; -use function array_walk; -use function count; -use function explode; -use function implode; -use function max; -use function min; -use function preg_replace; -use function preg_replace_callback; -use function preg_split; -use function sprintf; -use function str_pad; -use function strtr; -use function trim; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class Color -{ - /** - * @var non-empty-array - */ - private const array WHITESPACE_MAP = [ - ' ' => '·', - "\t" => '⇥', - ]; - - /** - * @var non-empty-array - */ - private const array WHITESPACE_EOL_MAP = [ - ' ' => '·', - "\t" => '⇥', - "\n" => '↵', - "\r" => '⟵', - ]; - - /** - * @var non-empty-array - */ - private const array ANSI_CODES = [ - 'reset' => '0', - 'bold' => '1', - 'dim' => '2', - 'dim-reset' => '22', - 'underlined' => '4', - 'fg-default' => '39', - 'fg-black' => '30', - 'fg-red' => '31', - 'fg-green' => '32', - 'fg-yellow' => '33', - 'fg-blue' => '34', - 'fg-magenta' => '35', - 'fg-cyan' => '36', - 'fg-white' => '37', - 'bg-default' => '49', - 'bg-black' => '40', - 'bg-red' => '41', - 'bg-green' => '42', - 'bg-yellow' => '43', - 'bg-blue' => '44', - 'bg-magenta' => '45', - 'bg-cyan' => '46', - 'bg-white' => '47', - ]; - - public static function colorize(string $color, string $buffer): string - { - if (trim($buffer) === '') { - return $buffer; - } - - $codes = array_map('\trim', explode(',', $color)); - $styles = []; - - foreach ($codes as $code) { - if (isset(self::ANSI_CODES[$code])) { - $styles[] = self::ANSI_CODES[$code]; - } - } - - if ($styles === []) { - return $buffer; - } - - return self::optimizeColor(sprintf("\x1b[%sm", implode(';', $styles)) . $buffer . "\x1b[0m"); - } - - public static function colorizeTextBox(string $color, string $buffer, ?int $columns = null): string - { - $lines = preg_split('/\r\n|\r|\n/', $buffer); - $maxBoxWidth = max(array_map('\strlen', $lines)); - - if ($columns !== null) { - $maxBoxWidth = min($maxBoxWidth, $columns); - } - - array_walk($lines, static function (string &$line) use ($color, $maxBoxWidth): void - { - $line = self::colorize($color, str_pad($line, $maxBoxWidth)); - }); - - return implode(PHP_EOL, $lines); - } - - public static function colorizePath(string $path, ?string $previousPath = null, bool $colorizeFilename = false): string - { - if ($previousPath === null) { - $previousPath = ''; - } - - $path = explode(DIRECTORY_SEPARATOR, $path); - $previousPath = explode(DIRECTORY_SEPARATOR, $previousPath); - - for ($i = 0; $i < min(count($path), count($previousPath)); $i++) { - if ($path[$i] === $previousPath[$i]) { - $path[$i] = self::dim($path[$i]); - } - } - - if ($colorizeFilename) { - $last = count($path) - 1; - $path[$last] = preg_replace_callback( - '/([\-_.]+|phpt$)/', - static fn (array $matches) => self::dim($matches[0]), - $path[$last], - ); - } - - return self::optimizeColor(implode(self::dim(DIRECTORY_SEPARATOR), $path)); - } - - public static function dim(string $buffer): string - { - if (trim($buffer) === '') { - return $buffer; - } - - return "\e[2m{$buffer}\e[22m"; - } - - public static function visualizeWhitespace(string $buffer, bool $visualizeEOL = false): string - { - $replaceMap = $visualizeEOL ? self::WHITESPACE_EOL_MAP : self::WHITESPACE_MAP; - - return preg_replace_callback( - '/\s+/', - static fn (array $matches) => self::dim(strtr($matches[0], $replaceMap)), - $buffer, - ); - } - - private static function optimizeColor(string $buffer): string - { - return preg_replace( - [ - "/\e\\[22m\e\\[2m/", - "/\e\\[([^m]*)m\e\\[([1-9][0-9;]*)m/", - "/(\e\\[[^m]*m)+(\e\\[0m)/", - ], - [ - '', - "\e[$1;$2m", - '$2', - ], - $buffer, - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/Exception.php b/vendor/phpunit/phpunit/src/Util/Exception/Exception.php deleted file mode 100644 index 58f42db7..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This interface is not covered by the backward compatibility promise for PHPUnit - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/InvalidDirectoryException.php b/vendor/phpunit/phpunit/src/Util/Exception/InvalidDirectoryException.php deleted file mode 100644 index 623af2de..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/InvalidDirectoryException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidDirectoryException extends RuntimeException implements Exception -{ - public function __construct(string $directory) - { - parent::__construct( - sprintf( - '"%s" is not a directory', - $directory, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/InvalidJsonException.php b/vendor/phpunit/phpunit/src/Util/Exception/InvalidJsonException.php deleted file mode 100644 index 224f7115..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/InvalidJsonException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidJsonException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/InvalidVersionOperatorException.php b/vendor/phpunit/phpunit/src/Util/Exception/InvalidVersionOperatorException.php deleted file mode 100644 index bc2fe9a0..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/InvalidVersionOperatorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function sprintf; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class InvalidVersionOperatorException extends RuntimeException implements Exception -{ - public function __construct(string $operator) - { - parent::__construct( - sprintf( - '"%s" is not a valid version_compare() operator', - $operator, - ), - ); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/PhpProcessException.php b/vendor/phpunit/phpunit/src/Util/Exception/PhpProcessException.php deleted file mode 100644 index 05069ef0..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/PhpProcessException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use PHPUnit\Util\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class PhpProcessException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Util/Exception/XmlException.php b/vendor/phpunit/phpunit/src/Util/Exception/XmlException.php deleted file mode 100644 index 127e1eca..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exception/XmlException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Xml; - -use PHPUnit\Util\Exception; -use RuntimeException; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class XmlException extends RuntimeException implements Exception -{ -} diff --git a/vendor/phpunit/phpunit/src/Util/ExcludeList.php b/vendor/phpunit/phpunit/src/Util/ExcludeList.php deleted file mode 100644 index 7ec8d427..00000000 --- a/vendor/phpunit/phpunit/src/Util/ExcludeList.php +++ /dev/null @@ -1,232 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const PHP_OS_FAMILY; -use function assert; -use function class_exists; -use function defined; -use function dirname; -use function is_dir; -use function realpath; -use function str_starts_with; -use function sys_get_temp_dir; -use Composer\Autoload\ClassLoader; -use DeepCopy\DeepCopy; -use PharIo\Manifest\Manifest; -use PharIo\Version\Version as PharIoVersion; -use PhpParser\Parser; -use PHPUnit\Framework\TestCase; -use ReflectionClass; -use SebastianBergmann\CliParser\Parser as CliParser; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Complexity\Calculator; -use SebastianBergmann\Diff\Diff; -use SebastianBergmann\Environment\Runtime; -use SebastianBergmann\Exporter\Exporter; -use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; -use SebastianBergmann\GlobalState\Snapshot; -use SebastianBergmann\Invoker\Invoker; -use SebastianBergmann\LinesOfCode\Counter; -use SebastianBergmann\ObjectEnumerator\Enumerator; -use SebastianBergmann\ObjectReflector\ObjectReflector; -use SebastianBergmann\RecursionContext\Context; -use SebastianBergmann\Template\Template; -use SebastianBergmann\Timer\Timer; -use SebastianBergmann\Type\TypeName; -use SebastianBergmann\Version; -use staabm\SideEffectsDetector\SideEffectsDetector; -use TheSeer\Tokenizer\Tokenizer; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class ExcludeList -{ - /** - * @var non-empty-array - */ - private const array EXCLUDED_CLASS_NAMES = [ - // composer - ClassLoader::class => 1, - - // myclabs/deepcopy - DeepCopy::class => 1, - - // nikic/php-parser - Parser::class => 1, - - // phar-io/manifest - Manifest::class => 1, - - // phar-io/version - PharIoVersion::class => 1, - - // phpunit/phpunit - TestCase::class => 2, - - // phpunit/php-code-coverage - CodeCoverage::class => 1, - - // phpunit/php-file-iterator - FileIteratorFacade::class => 1, - - // phpunit/php-invoker - Invoker::class => 1, - - // phpunit/php-text-template - Template::class => 1, - - // phpunit/php-timer - Timer::class => 1, - - // sebastian/cli-parser - CliParser::class => 1, - - // sebastian/comparator - Comparator::class => 1, - - // sebastian/complexity - Calculator::class => 1, - - // sebastian/diff - Diff::class => 1, - - // sebastian/environment - Runtime::class => 1, - - // sebastian/exporter - Exporter::class => 1, - - // sebastian/global-state - Snapshot::class => 1, - - // sebastian/lines-of-code - Counter::class => 1, - - // sebastian/object-enumerator - Enumerator::class => 1, - - // sebastian/object-reflector - ObjectReflector::class => 1, - - // sebastian/recursion-context - Context::class => 1, - - // sebastian/type - TypeName::class => 1, - - // sebastian/version - Version::class => 1, - - // staabm/side-effects-detector - SideEffectsDetector::class => 1, - - // theseer/tokenizer - Tokenizer::class => 1, - ]; - - /** - * @var list - */ - private static array $directories = []; - private static bool $initialized = false; - private readonly bool $enabled; - - /** - * @param non-empty-string $directory - * - * @throws InvalidDirectoryException - */ - public static function addDirectory(string $directory): void - { - if (!is_dir($directory)) { - throw new InvalidDirectoryException($directory); - } - - $directory = realpath($directory); - - assert($directory !== false); - - self::$directories[] = $directory; - } - - public function __construct(?bool $enabled = null) - { - if ($enabled === null) { - $enabled = !defined('PHPUNIT_TESTSUITE'); - } - - $this->enabled = $enabled; - } - - /** - * @return list - */ - public function getExcludedDirectories(): array - { - self::initialize(); - - return self::$directories; - } - - public function isExcluded(string $file): bool - { - if (!$this->enabled) { - return false; - } - - self::initialize(); - - foreach (self::$directories as $directory) { - if (str_starts_with($file, $directory)) { - return true; - } - } - - return false; - } - - private static function initialize(): void - { - if (self::$initialized) { - return; - } - - foreach (self::EXCLUDED_CLASS_NAMES as $className => $parent) { - if (!class_exists($className)) { - continue; - } - - $directory = (new ReflectionClass($className))->getFileName(); - - for ($i = 0; $i < $parent; $i++) { - $directory = dirname($directory); - } - - self::$directories[] = $directory; - } - - /** - * Hide process isolation workaround on Windows: - * tempnam() prefix is limited to first 3 characters. - * - * @see https://php.net/manual/en/function.tempnam.php - */ - if (PHP_OS_FAMILY === 'Windows') { - // @codeCoverageIgnoreStart - self::$directories[] = sys_get_temp_dir() . '\\PHP'; - // @codeCoverageIgnoreEnd - } - - self::$initialized = true; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Exporter.php b/vendor/phpunit/phpunit/src/Util/Exporter.php deleted file mode 100644 index 182499e9..00000000 --- a/vendor/phpunit/phpunit/src/Util/Exporter.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\TextUI\Configuration\Registry as ConfigurationRegistry; -use SebastianBergmann\Exporter\Exporter as OriginalExporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final class Exporter -{ - private static ?OriginalExporter $exporter = null; - - public static function export(mixed $value): string - { - return self::exporter()->export($value); - } - - /** - * @param array $data - */ - public static function shortenedRecursiveExport(array $data): string - { - return self::exporter()->shortenedRecursiveExport($data); - } - - public static function shortenedExport(mixed $value): string - { - return self::exporter()->shortenedExport($value); - } - - private static function exporter(): OriginalExporter - { - if (self::$exporter !== null) { - return self::$exporter; - } - - self::$exporter = new OriginalExporter( - ConfigurationRegistry::get()->shortenArraysForExportThreshold(), - ); - - return self::$exporter; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php deleted file mode 100644 index 3da54042..00000000 --- a/vendor/phpunit/phpunit/src/Util/Filesystem.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const DIRECTORY_SEPARATOR; -use function basename; -use function dirname; -use function is_dir; -use function mkdir; -use function realpath; -use function str_starts_with; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Filesystem -{ - public static function createDirectory(string $directory): bool - { - return !(!is_dir($directory) && !@mkdir($directory, 0o777, true) && !is_dir($directory)); - } - - /** - * @param non-empty-string $path - * - * @return false|non-empty-string - */ - public static function resolveStreamOrFile(string $path): false|string - { - if (str_starts_with($path, 'php://') || str_starts_with($path, 'socket://')) { - return $path; - } - - $directory = dirname($path); - - if (is_dir($directory)) { - return realpath($directory) . DIRECTORY_SEPARATOR . basename($path); - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php deleted file mode 100644 index 122e5c06..00000000 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function array_unshift; -use function defined; -use function in_array; -use function is_array; -use function is_file; -use function realpath; -use function sprintf; -use function str_starts_with; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\PhptAssertionFailedError; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Filter -{ - /** - * @throws Exception - */ - public static function stackTraceFromThrowableAsString(Throwable $t, bool $unwrap = true): string - { - if ($t instanceof PhptAssertionFailedError) { - $stackTrace = $t->syntheticTrace(); - $file = $t->syntheticFile(); - $line = $t->syntheticLine(); - } elseif ($t instanceof Exception) { - $stackTrace = $t->getSerializableTrace(); - $file = $t->getFile(); - $line = $t->getLine(); - } else { - if ($unwrap && $t->getPrevious() !== null) { - $t = $t->getPrevious(); - } - - $stackTrace = $t->getTrace(); - $file = $t->getFile(); - $line = $t->getLine(); - } - - if (!self::frameExists($stackTrace, $file, $line)) { - array_unshift( - $stackTrace, - ['file' => $file, 'line' => $line], - ); - } - - return self::stackTraceAsString($stackTrace); - } - - /** - * @param list $frames - */ - private static function stackTraceAsString(array $frames): string - { - $buffer = ''; - $prefix = defined('__PHPUNIT_PHAR_ROOT__') ? __PHPUNIT_PHAR_ROOT__ : false; - $excludeList = new ExcludeList; - - foreach ($frames as $frame) { - if (self::shouldPrintFrame($frame, $prefix, $excludeList)) { - $buffer .= sprintf( - "%s:%s\n", - $frame['file'], - $frame['line'] ?? '?', - ); - } - } - - return $buffer; - } - - /** - * @param array{file?: non-empty-string} $frame - */ - private static function shouldPrintFrame(array $frame, false|string $prefix, ExcludeList $excludeList): bool - { - if (!isset($frame['file'])) { - return false; - } - - $file = $frame['file']; - $fileIsNotPrefixed = $prefix === false || !str_starts_with($file, $prefix); - - // @see https://github.com/sebastianbergmann/phpunit/issues/4033 - if (isset($GLOBALS['_SERVER']['SCRIPT_NAME'])) { - $script = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']); - } else { - // @codeCoverageIgnoreStart - $script = ''; - // @codeCoverageIgnoreEnd - } - - return $fileIsNotPrefixed && - $file !== $script && - self::fileIsExcluded($file, $excludeList) && - is_file($file); - } - - private static function fileIsExcluded(string $file, ExcludeList $excludeList): bool - { - return (!isset($GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST']) || - !is_array($GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST']) || - $GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] === [] || - !in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'], true)) && - !$excludeList->isExcluded($file); - } - - /** - * @param list $trace - */ - private static function frameExists(array $trace, string $file, int $line): bool - { - foreach ($trace as $frame) { - if (isset($frame['file'], $frame['line']) && $frame['file'] === $file && $frame['line'] === $line) { - return true; - } - } - - return false; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php deleted file mode 100644 index 9f05089b..00000000 --- a/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ /dev/null @@ -1,326 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const PHP_MAJOR_VERSION; -use const PHP_MINOR_VERSION; -use function array_reverse; -use function array_shift; -use function assert; -use function defined; -use function get_defined_constants; -use function get_included_files; -use function in_array; -use function ini_get_all; -use function is_array; -use function is_file; -use function is_scalar; -use function preg_match; -use function serialize; -use function sprintf; -use function str_ends_with; -use function str_starts_with; -use function strtr; -use function var_export; -use Closure; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class GlobalState -{ - /** - * @var non-empty-list - */ - private const array SUPER_GLOBAL_ARRAYS = [ - '_ENV', - '_POST', - '_GET', - '_COOKIE', - '_SERVER', - '_FILES', - '_REQUEST', - ]; - - /** - * @var non-empty-array> - */ - private const array DEPRECATED_INI_SETTINGS = [ - '7.3' => [ - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.func_overload' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'string.strip_tags' => true, - ], - - '7.4' => [ - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.func_overload' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'pdo_odbc.db2_instance_name' => true, - 'string.strip_tags' => true, - ], - - '8.0' => [ - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - ], - - '8.1' => [ - 'auto_detect_line_endings' => true, - 'filter.default' => true, - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'oci8.old_oci_close_semantics' => true, - ], - - '8.2' => [ - 'auto_detect_line_endings' => true, - 'filter.default' => true, - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'oci8.old_oci_close_semantics' => true, - ], - - '8.3' => [ - 'auto_detect_line_endings' => true, - 'filter.default' => true, - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'oci8.old_oci_close_semantics' => true, - ], - - '8.4' => [ - 'auto_detect_line_endings' => true, - 'filter.default' => true, - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'oci8.old_oci_close_semantics' => true, - ], - - '8.5' => [ - 'auto_detect_line_endings' => true, - 'filter.default' => true, - 'iconv.input_encoding' => true, - 'iconv.output_encoding' => true, - 'iconv.internal_encoding' => true, - 'mbstring.http_input' => true, - 'mbstring.http_output' => true, - 'mbstring.internal_encoding' => true, - 'oci8.old_oci_close_semantics' => true, - ], - ]; - - /** - * @throws Exception - */ - public static function getIncludedFilesAsString(): string - { - return self::processIncludedFilesAsString(get_included_files()); - } - - /** - * @param list $files - * - * @throws Exception - */ - public static function processIncludedFilesAsString(array $files): string - { - $excludeList = new ExcludeList; - $prefix = false; - $result = ''; - - if (defined('__PHPUNIT_PHAR__')) { - // @codeCoverageIgnoreStart - $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/'; - // @codeCoverageIgnoreEnd - } - - // Do not process bootstrap script - array_shift($files); - - // If bootstrap script was a Composer bin proxy, skip the second entry as well - if (str_ends_with(strtr($files[0], '\\', '/'), '/phpunit/phpunit/phpunit')) { - // @codeCoverageIgnoreStart - array_shift($files); - // @codeCoverageIgnoreEnd - } - - foreach (array_reverse($files) as $file) { - if (isset($GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST']) && - is_array($GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST']) && - $GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] !== [] && - in_array($file, $GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'], true)) { - continue; - } - - if ($prefix !== false && str_starts_with($file, $prefix)) { - continue; - } - - // Skip virtual file system protocols - if (preg_match('/^(vfs|phpvfs[a-z0-9]+):/', $file) > 0) { - continue; - } - - if (!$excludeList->isExcluded($file) && is_file($file)) { - $result = 'require_once \'' . $file . "';\n" . $result; - } - } - - return $result; - } - - public static function getIniSettingsAsString(): string - { - $result = ''; - - $iniSettings = ini_get_all(null, false); - - assert($iniSettings !== false); - - foreach ($iniSettings as $key => $value) { - if (self::isIniSettingDeprecated($key)) { - continue; - } - - $result .= sprintf( - '@ini_set(%s, %s);' . "\n", - self::exportVariable($key), - self::exportVariable((string) $value), - ); - } - - return $result; - } - - public static function getConstantsAsString(): string - { - $constants = get_defined_constants(true); - $result = ''; - - if (isset($constants['user'])) { - foreach ($constants['user'] as $name => $value) { - $result .= sprintf( - 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", - $name, - $name, - self::exportVariable($value), - ); - } - } - - return $result; - } - - public static function getGlobalsAsString(): string - { - $result = ''; - - foreach (self::SUPER_GLOBAL_ARRAYS as $superGlobalArray) { - if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) { - foreach ($GLOBALS[$superGlobalArray] as $key => $value) { - if ($value instanceof Closure) { - continue; - } - - $result .= sprintf( - '$GLOBALS[\'%s\'][\'%s\'] = %s;' . "\n", - $superGlobalArray, - $key, - self::exportVariable($GLOBALS[$superGlobalArray][$key]), - ); - } - } - } - - $excludeList = self::SUPER_GLOBAL_ARRAYS; - $excludeList[] = 'GLOBALS'; - - foreach ($GLOBALS as $key => $value) { - if (!$value instanceof Closure && !in_array($key, $excludeList, true)) { - $result .= sprintf( - '$GLOBALS[\'%s\'] = %s;' . "\n", - $key, - self::exportVariable($value), - ); - } - } - - return $result; - } - - private static function exportVariable(mixed $variable): string - { - if (is_scalar($variable) || $variable === null || - (is_array($variable) && self::arrayOnlyContainsScalars($variable))) { - return var_export($variable, true); - } - - return 'unserialize(' . var_export(serialize($variable), true) . ')'; - } - - /** - * @param array $array - */ - private static function arrayOnlyContainsScalars(array $array): bool - { - $result = true; - - foreach ($array as $element) { - if (is_array($element)) { - $result = self::arrayOnlyContainsScalars($element); - } elseif (!is_scalar($element) && $element !== null) { - $result = false; - } - - if (!$result) { - break; - } - } - - return $result; - } - - private static function isIniSettingDeprecated(string $iniSetting): bool - { - return isset(self::DEPRECATED_INI_SETTINGS[PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION][$iniSetting]); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Http/Downloader.php b/vendor/phpunit/phpunit/src/Util/Http/Downloader.php deleted file mode 100644 index a9af2e38..00000000 --- a/vendor/phpunit/phpunit/src/Util/Http/Downloader.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Http; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -interface Downloader -{ - /** - * @param non-empty-string $url - */ - public function download(string $url): false|string; -} diff --git a/vendor/phpunit/phpunit/src/Util/Http/PhpDownloader.php b/vendor/phpunit/phpunit/src/Util/Http/PhpDownloader.php deleted file mode 100644 index 5969c042..00000000 --- a/vendor/phpunit/phpunit/src/Util/Http/PhpDownloader.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Http; - -use function file_get_contents; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @codeCoverageIgnore - */ -final class PhpDownloader implements Downloader -{ - /** - * @param non-empty-string $url - */ - public function download(string $url): false|string - { - return file_get_contents($url); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Json.php b/vendor/phpunit/phpunit/src/Util/Json.php deleted file mode 100644 index cbe959ac..00000000 --- a/vendor/phpunit/phpunit/src/Util/Json.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const JSON_ERROR_NONE; -use const JSON_PRETTY_PRINT; -use const JSON_UNESCAPED_SLASHES; -use const JSON_UNESCAPED_UNICODE; -use const SORT_STRING; -use function assert; -use function is_object; -use function is_scalar; -use function json_decode; -use function json_encode; -use function json_last_error; -use function ksort; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Json -{ - /** - * @throws InvalidJsonException - */ - public static function prettify(string $json): string - { - $decodedJson = json_decode($json, false); - - if (json_last_error() !== JSON_ERROR_NONE) { - throw new InvalidJsonException; - } - - $result = json_encode($decodedJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - - assert($result !== false); - - return $result; - } - - /** - * Element 0 is true and element 1 is null when JSON decoding did not work. - * * Element 0 is false and element 1 has the decoded value when JSON decoding did work. - * * This is used to avoid ambiguity with JSON strings consisting entirely of 'null' or 'false'. - * - * @return array{0: false, 1: mixed}|array{0: true, 1: null} - */ - public static function canonicalize(string $json): array - { - $decodedJson = json_decode($json); - - if (json_last_error() !== JSON_ERROR_NONE) { - return [true, null]; - } - - self::recursiveSort($decodedJson); - - $reencodedJson = json_encode($decodedJson); - - return [false, $reencodedJson]; - } - - /** - * JSON object keys are unordered while PHP array keys are ordered. - * - * Sort all array keys to ensure both the expected and actual values have - * their keys in the same order. - */ - private static function recursiveSort(mixed &$json): void - { - if ($json === null || $json === [] || is_scalar($json)) { - return; - } - - $isObject = is_object($json); - - if ($isObject) { - // Objects need to be sorted during canonicalization to ensure - // correct comparsion since JSON objects are unordered. It must be - // kept as an object so that the value correctly stays as a JSON - // object instead of potentially being converted to an array. This - // approach ensures that numeric string JSON keys are preserved and - // don't risk being flattened due to PHP's array semantics. - // See #2919, #4584, #4674 - $json = (array) $json; - ksort($json, SORT_STRING); - } - - foreach ($json as &$value) { - self::recursiveSort($value); - } - - if ($isObject) { - $json = (object) $json; - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/DefaultJobRunner.php b/vendor/phpunit/phpunit/src/Util/PHP/DefaultJobRunner.php deleted file mode 100644 index 7d2d419b..00000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/DefaultJobRunner.php +++ /dev/null @@ -1,251 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use const PHP_BINARY; -use const PHP_SAPI; -use function array_keys; -use function array_merge; -use function array_values; -use function assert; -use function fclose; -use function file_put_contents; -use function function_exists; -use function fwrite; -use function ini_get_all; -use function is_array; -use function is_resource; -use function proc_close; -use function proc_open; -use function stream_get_contents; -use function sys_get_temp_dir; -use function tempnam; -use function trim; -use function unlink; -use function xdebug_is_debugger_active; -use PHPUnit\Event\Facade; -use PHPUnit\Runner\CodeCoverage; -use SebastianBergmann\Environment\Runtime; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class DefaultJobRunner extends JobRunner -{ - /** - * @throws PhpProcessException - */ - public function run(Job $job): Result - { - $temporaryFile = null; - - if ($job->hasInput()) { - $temporaryFile = tempnam(sys_get_temp_dir(), 'phpunit_'); - - if ($temporaryFile === false || - file_put_contents($temporaryFile, $job->code()) === false) { - // @codeCoverageIgnoreStart - throw new PhpProcessException( - 'Unable to write temporary file', - ); - // @codeCoverageIgnoreEnd - } - - $job = new Job( - $job->input(), - $job->phpSettings(), - $job->environmentVariables(), - $job->arguments(), - null, - $job->redirectErrors(), - $job->requiresXdebug(), - ); - } - - assert($temporaryFile !== ''); - - return $this->runProcess($job, $temporaryFile); - } - - /** - * @param ?non-empty-string $temporaryFile - * - * @throws PhpProcessException - */ - private function runProcess(Job $job, ?string $temporaryFile): Result - { - $environmentVariables = null; - - if ($job->hasEnvironmentVariables()) { - /** @phpstan-ignore nullCoalesce.variable */ - $environmentVariables = $_SERVER ?? []; - - unset($environmentVariables['argv'], $environmentVariables['argc']); - - $environmentVariables = array_merge($environmentVariables, $job->environmentVariables()); - - foreach ($environmentVariables as $key => $value) { - if (is_array($value)) { - unset($environmentVariables[$key]); - } - } - - unset($key, $value); - } - - $pipeSpec = [ - 0 => ['pipe', 'r'], - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ]; - - if ($job->redirectErrors()) { - $pipeSpec[2] = ['redirect', 1]; - } - - $process = proc_open( - $this->buildCommand($job, $temporaryFile), - $pipeSpec, - $pipes, - null, - $environmentVariables, - ); - - if (!is_resource($process)) { - // @codeCoverageIgnoreStart - throw new PhpProcessException( - 'Unable to spawn worker process', - ); - // @codeCoverageIgnoreEnd - } - - Facade::emitter()->childProcessStarted(); - - fwrite($pipes[0], $job->code()); - fclose($pipes[0]); - - $stdout = ''; - $stderr = ''; - - if (isset($pipes[1])) { - $stdout = stream_get_contents($pipes[1]); - - fclose($pipes[1]); - } - - if (isset($pipes[2])) { - $stderr = stream_get_contents($pipes[2]); - - fclose($pipes[2]); - } - - proc_close($process); - - if ($temporaryFile !== null) { - unlink($temporaryFile); - } - - assert($stdout !== false); - assert($stderr !== false); - - return new Result($stdout, $stderr); - } - - /** - * @return non-empty-list - */ - private function buildCommand(Job $job, ?string $file): array - { - $runtime = new Runtime; - $command = [PHP_BINARY]; - $phpSettings = $job->phpSettings(); - - if ($runtime->hasPCOV()) { - $pcovSettings = ini_get_all('pcov'); - - assert($pcovSettings !== false); - - $phpSettings = array_merge( - $phpSettings, - $runtime->getCurrentSettings( - array_keys($pcovSettings), - ), - ); - } elseif ($runtime->hasXdebug()) { - assert(function_exists('xdebug_is_debugger_active')); - - $xdebugSettings = ini_get_all('xdebug'); - - assert($xdebugSettings !== false); - - $phpSettings = array_merge( - $phpSettings, - $runtime->getCurrentSettings( - array_keys($xdebugSettings), - ), - ); - - if ( - !CodeCoverage::instance()->isActive() && - xdebug_is_debugger_active() === false && - !$job->requiresXdebug() - ) { - // disable xdebug to speedup test execution - $phpSettings['xdebug.mode'] = 'xdebug.mode=off'; - } - } - - $command = array_merge($command, $this->settingsToParameters(array_values($phpSettings))); - - if (PHP_SAPI === 'phpdbg') { - $command[] = '-qrr'; - - if ($file === null) { - $command[] = 's='; - } - } - - if ($file !== null) { - $command[] = '-f'; - $command[] = $file; - } - - if ($job->hasArguments()) { - if ($file === null) { - $command[] = '--'; - } - - foreach ($job->arguments() as $argument) { - $command[] = trim($argument); - } - } - - return $command; - } - - /** - * @param list $settings - * - * @return list - */ - private function settingsToParameters(array $settings): array - { - $buffer = []; - - foreach ($settings as $setting) { - $buffer[] = '-d'; - $buffer[] = $setting; - } - - return $buffer; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Job.php b/vendor/phpunit/phpunit/src/Util/PHP/Job.php deleted file mode 100644 index 172d3f59..00000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/Job.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Job -{ - /** - * @var non-empty-string - */ - private string $code; - - /** - * @var list - */ - private array $phpSettings; - - /** - * @var array - */ - private array $environmentVariables; - - /** - * @var list - */ - private array $arguments; - - /** - * @var ?non-empty-string - */ - private ?string $input; - private bool $redirectErrors; - private bool $requiresXdebug; - - /** - * @param non-empty-string $code - * @param list $phpSettings - * @param array $environmentVariables - * @param list $arguments - * @param ?non-empty-string $input - */ - public function __construct(string $code, array $phpSettings = [], array $environmentVariables = [], array $arguments = [], ?string $input = null, bool $redirectErrors = false, bool $requiresXdebug = false) - { - $this->code = $code; - $this->phpSettings = $phpSettings; - $this->environmentVariables = $environmentVariables; - $this->arguments = $arguments; - $this->input = $input; - $this->redirectErrors = $redirectErrors; - $this->requiresXdebug = $requiresXdebug; - } - - /** - * @return non-empty-string - */ - public function code(): string - { - return $this->code; - } - - /** - * @return list - */ - public function phpSettings(): array - { - return $this->phpSettings; - } - - /** - * @phpstan-assert-if-true !empty $this->environmentVariables - */ - public function hasEnvironmentVariables(): bool - { - return $this->environmentVariables !== []; - } - - /** - * @return array - */ - public function environmentVariables(): array - { - return $this->environmentVariables; - } - - /** - * @phpstan-assert-if-true !empty $this->arguments - */ - public function hasArguments(): bool - { - return $this->arguments !== []; - } - - /** - * @return list - */ - public function arguments(): array - { - return $this->arguments; - } - - /** - * @phpstan-assert-if-true !empty $this->input - */ - public function hasInput(): bool - { - return $this->input !== null; - } - - /** - * @throws PhpProcessException - * - * @return non-empty-string - */ - public function input(): string - { - if ($this->input === null) { - throw new PhpProcessException('No input specified'); - } - - return $this->input; - } - - public function redirectErrors(): bool - { - return $this->redirectErrors; - } - - public function requiresXdebug(): bool - { - return $this->requiresXdebug; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/JobRunner.php b/vendor/phpunit/phpunit/src/Util/PHP/JobRunner.php deleted file mode 100644 index 6805a0c4..00000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/JobRunner.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use function assert; -use function file_get_contents; -use function is_file; -use function unlink; -use PHPUnit\Event\Facade as EventFacade; -use PHPUnit\Framework\ChildProcessResultProcessor; -use PHPUnit\Framework\Test; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -abstract readonly class JobRunner -{ - private ChildProcessResultProcessor $processor; - - public function __construct(ChildProcessResultProcessor $processor) - { - $this->processor = $processor; - } - - /** - * @param non-empty-string $processResultFile - */ - final public function runTestJob(Job $job, string $processResultFile, Test $test): void - { - $result = $this->run($job); - - $processResult = ''; - - if (is_file($processResultFile)) { - $processResult = file_get_contents($processResultFile); - - assert($processResult !== false); - - @unlink($processResultFile); - } - - $this->processor->process( - $test, - $processResult, - $result->stderr(), - ); - - EventFacade::emitter()->childProcessFinished($result->stdout(), $result->stderr()); - } - - abstract public function run(Job $job): Result; -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/JobRunnerRegistry.php b/vendor/phpunit/phpunit/src/Util/PHP/JobRunnerRegistry.php deleted file mode 100644 index 94e22a4e..00000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/JobRunnerRegistry.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use PHPUnit\Event\Facade; -use PHPUnit\Framework\ChildProcessResultProcessor; -use PHPUnit\Framework\Test; -use PHPUnit\Runner\CodeCoverage; -use PHPUnit\TestRunner\TestResult\PassedTests; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class JobRunnerRegistry -{ - private static ?JobRunner $runner = null; - - public static function run(Job $job): Result - { - return self::runner()->run($job); - } - - /** - * @param non-empty-string $processResultFile - */ - public static function runTestJob(Job $job, string $processResultFile, Test $test): void - { - self::runner()->runTestJob($job, $processResultFile, $test); - } - - public static function set(JobRunner $runner): void - { - self::$runner = $runner; - } - - private static function runner(): JobRunner - { - if (self::$runner === null) { - self::$runner = new DefaultJobRunner( - new ChildProcessResultProcessor( - Facade::instance(), - Facade::emitter(), - PassedTests::instance(), - CodeCoverage::instance(), - ), - ); - } - - return self::$runner; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Result.php b/vendor/phpunit/phpunit/src/Util/PHP/Result.php deleted file mode 100644 index ed058226..00000000 --- a/vendor/phpunit/phpunit/src/Util/PHP/Result.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Result -{ - private string $stdout; - private string $stderr; - - public function __construct(string $stdout, string $stderr) - { - $this->stdout = $stdout; - $this->stderr = $stderr; - } - - public function stdout(): string - { - return $this->stdout; - } - - public function stderr(): string - { - return $this->stderr; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Reflection.php b/vendor/phpunit/phpunit/src/Util/Reflection.php deleted file mode 100644 index b61c19b9..00000000 --- a/vendor/phpunit/phpunit/src/Util/Reflection.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function array_keys; -use function array_merge; -use function array_reverse; -use function assert; -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\TestCase; -use ReflectionClass; -use ReflectionException; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Reflection -{ - /** - * @param class-string $className - * @param non-empty-string $methodName - * - * @return array{file: non-empty-string, line: non-negative-int} - */ - public static function sourceLocationFor(string $className, string $methodName): array - { - try { - $reflector = new ReflectionMethod($className, $methodName); - - $file = $reflector->getFileName(); - $line = $reflector->getStartLine(); - } catch (ReflectionException) { - $file = 'unknown'; - $line = 0; - } - - assert($file !== false && $file !== ''); - assert($line !== false && $line >= 0); - - return [ - 'file' => $file, - 'line' => $line, - ]; - } - - /** - * @param ReflectionClass $class - * - * @return list - */ - public static function publicMethodsDeclaredDirectlyInTestClass(ReflectionClass $class): array - { - return self::filterAndSortMethods($class, ReflectionMethod::IS_PUBLIC, true); - } - - /** - * @param ReflectionClass $class - * - * @return list - */ - public static function methodsDeclaredDirectlyInTestClass(ReflectionClass $class): array - { - return self::filterAndSortMethods($class, null, false); - } - - /** - * @param ReflectionClass $class - * - * @return list - */ - private static function filterAndSortMethods(ReflectionClass $class, ?int $filter, bool $sortHighestToLowest): array - { - $methodsByClass = []; - - foreach ($class->getMethods($filter) as $method) { - $declaringClassName = $method->getDeclaringClass()->getName(); - - if ($declaringClassName === TestCase::class) { - continue; - } - - if ($declaringClassName === Assert::class) { - continue; - } - - if (!isset($methodsByClass[$declaringClassName])) { - $methodsByClass[$declaringClassName] = []; - } - - $methodsByClass[$declaringClassName][] = $method; - } - - $classNames = array_keys($methodsByClass); - - if ($sortHighestToLowest) { - $classNames = array_reverse($classNames); - } - - $methods = []; - - foreach ($classNames as $className) { - $methods = array_merge($methods, $methodsByClass[$className]); - } - - return $methods; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php deleted file mode 100644 index bcc2f371..00000000 --- a/vendor/phpunit/phpunit/src/Util/Test.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const DEBUG_BACKTRACE_IGNORE_ARGS; -use const DEBUG_BACKTRACE_PROVIDE_OBJECT; -use function debug_backtrace; -use function str_starts_with; -use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; -use PHPUnit\Framework\TestCase; -use PHPUnit\Metadata\Parser\Registry; -use ReflectionMethod; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Test -{ - /** - * @throws NoTestCaseObjectOnCallStackException - */ - public static function currentTestCase(): TestCase - { - foreach (debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { - if (isset($frame['object']) && $frame['object'] instanceof TestCase) { - return $frame['object']; - } - } - - throw new NoTestCaseObjectOnCallStackException; - } - - public static function isTestMethod(ReflectionMethod $method): bool - { - if (!$method->isPublic()) { - return false; - } - - if (str_starts_with($method->getName(), 'test')) { - return true; - } - - $metadata = Registry::parser()->forMethod( - $method->getDeclaringClass()->getName(), - $method->getName(), - ); - - return $metadata->isTest()->isNotEmpty(); - } -} diff --git a/vendor/phpunit/phpunit/src/Util/ThrowableToStringMapper.php b/vendor/phpunit/phpunit/src/Util/ThrowableToStringMapper.php deleted file mode 100644 index 0fcf3695..00000000 --- a/vendor/phpunit/phpunit/src/Util/ThrowableToStringMapper.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function trim; -use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\PhptAssertionFailedError; -use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Runner\ErrorException; -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class ThrowableToStringMapper -{ - public static function map(Throwable $t): string - { - if ($t instanceof ErrorException) { - return $t->getMessage(); - } - - if ($t instanceof SelfDescribing) { - $buffer = $t->toString(); - - if ($t instanceof ExpectationFailedException && $t->getComparisonFailure() !== null) { - $buffer .= $t->getComparisonFailure()->getDiff(); - } - - if ($t instanceof PhptAssertionFailedError) { - $buffer .= $t->diff(); - } - - if ($buffer !== '') { - $buffer = trim($buffer) . "\n"; - } - - return $buffer; - } - - return $t::class . ': ' . $t->getMessage() . "\n"; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php b/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php deleted file mode 100644 index 9dcba3c3..00000000 --- a/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use function in_array; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @immutable - */ -final readonly class VersionComparisonOperator -{ - /** - * @var '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' - */ - private string $operator; - - /** - * @param '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' $operator - * - * @throws InvalidVersionOperatorException - */ - public function __construct(string $operator) - { - $this->ensureOperatorIsValid($operator); - - $this->operator = $operator; - } - - /** - * @return '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' - */ - public function asString(): string - { - return $this->operator; - } - - /** - * @param '!='|'<'|'<='|'<>'|'='|'=='|'>'|'>='|'eq'|'ge'|'gt'|'le'|'lt'|'ne' $operator - * - * @throws InvalidVersionOperatorException - */ - private function ensureOperatorIsValid(string $operator): void - { - if (!in_array($operator, ['<', 'lt', '<=', 'le', '>', 'gt', '>=', 'ge', '==', '=', 'eq', '!=', '<>', 'ne'], true)) { - throw new InvalidVersionOperatorException($operator); - } - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Xml/Loader.php b/vendor/phpunit/phpunit/src/Util/Xml/Loader.php deleted file mode 100644 index 1289c253..00000000 --- a/vendor/phpunit/phpunit/src/Util/Xml/Loader.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\Xml; - -use function error_reporting; -use function file_get_contents; -use function libxml_get_errors; -use function libxml_use_internal_errors; -use function sprintf; -use function trim; -use DOMDocument; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Loader -{ - /** - * @throws XmlException - */ - public function loadFile(string $filename): DOMDocument - { - $reporting = error_reporting(0); - $contents = file_get_contents($filename); - - error_reporting($reporting); - - if ($contents === false) { - throw new XmlException( - sprintf( - 'Could not read XML from file "%s"', - $filename, - ), - ); - } - - if (trim($contents) === '') { - throw new XmlException( - sprintf( - 'Could not parse XML from empty file "%s"', - $filename, - ), - ); - } - - return $this->load($contents); - } - - /** - * @throws XmlException - */ - public function load(string $actual): DOMDocument - { - if ($actual === '') { - throw new XmlException('Could not parse XML from empty string'); - } - - $document = new DOMDocument; - $document->preserveWhiteSpace = false; - - $internal = libxml_use_internal_errors(true); - $message = ''; - $reporting = error_reporting(0); - $loaded = $document->loadXML($actual); - - foreach (libxml_get_errors() as $error) { - $message .= "\n" . $error->message; - } - - libxml_use_internal_errors($internal); - error_reporting($reporting); - - if ($loaded === false) { - if ($message === '') { - $message = 'Could not load XML for unknown reason'; - } - - throw new XmlException($message); - } - - return $document; - } -} diff --git a/vendor/phpunit/phpunit/src/Util/Xml/Xml.php b/vendor/phpunit/phpunit/src/Util/Xml/Xml.php deleted file mode 100644 index 5e30bb43..00000000 --- a/vendor/phpunit/phpunit/src/Util/Xml/Xml.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use const ENT_QUOTES; -use function htmlspecialchars; -use function mb_convert_encoding; -use function ord; -use function preg_replace; -use function strlen; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final readonly class Xml -{ - /** - * Escapes a string for the use in XML documents. - * - * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, - * and FFFF (not even as character reference). - * - * @see https://www.w3.org/TR/xml/#charsets - */ - public static function prepareString(string $string): string - { - return preg_replace( - '/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/', - '', - htmlspecialchars( - self::convertToUtf8($string), - ENT_QUOTES, - ), - ); - } - - private static function convertToUtf8(string $string): string - { - if (!self::isUtf8($string)) { - $string = mb_convert_encoding($string, 'UTF-8'); - } - - return $string; - } - - private static function isUtf8(string $string): bool - { - $length = strlen($string); - - for ($i = 0; $i < $length; $i++) { - if (ord($string[$i]) < 0x80) { - $n = 0; - } elseif ((ord($string[$i]) & 0xE0) === 0xC0) { - $n = 1; - } elseif ((ord($string[$i]) & 0xF0) === 0xE0) { - $n = 2; - } elseif ((ord($string[$i]) & 0xF0) === 0xF0) { - $n = 3; - } else { - return false; - } - - for ($j = 0; $j < $n; $j++) { - if ((++$i === $length) || ((ord($string[$i]) & 0xC0) !== 0x80)) { - return false; - } - } - } - - return true; - } -} diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md deleted file mode 100644 index 58ddab05..00000000 --- a/vendor/psr/cache/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Fixed - -- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr -- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr -- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell -- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell - -## 1.0.0 - 2015-12-11 - -Initial stable release; reflects accepted PSR-6 specification diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt deleted file mode 100644 index b1c2c97b..00000000 --- a/vendor/psr/cache/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md deleted file mode 100644 index 9855a318..00000000 --- a/vendor/psr/cache/README.md +++ /dev/null @@ -1,12 +0,0 @@ -Caching Interface -============== - -This repository holds all interfaces related to [PSR-6 (Caching Interface)][psr-url]. - -Note that this is not a Caching implementation of its own. It is merely interfaces that describe the components of a Caching mechanism. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-6/ -[package-url]: https://packagist.org/packages/psr/cache -[implementation-url]: https://packagist.org/providers/psr/cache-implementation diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json deleted file mode 100644 index 4b687971..00000000 --- a/vendor/psr/cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/cache", - "description": "Common interface for caching libraries", - "keywords": ["psr", "psr-6", "cache"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=8.0.0" - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index bb785f46..00000000 --- a/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -=7.4.0" - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php deleted file mode 100644 index 0f213f2f..00000000 --- a/vendor/psr/container/src/ContainerExceptionInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -=7.2.0" - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php b/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php deleted file mode 100644 index 4306fa91..00000000 --- a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - diff --git a/vendor/psr/http-message/docs/PSR7-Usage.md b/vendor/psr/http-message/docs/PSR7-Usage.md deleted file mode 100644 index b6d048a3..00000000 --- a/vendor/psr/http-message/docs/PSR7-Usage.md +++ /dev/null @@ -1,159 +0,0 @@ -### PSR-7 Usage - -All PSR-7 applications comply with these interfaces -They were created to establish a standard between middleware implementations. - -> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - - -The following examples will illustrate how basic operations are done in PSR-7. - -##### Examples - - -For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) -All PSR-7 implementations should have the same behaviour. - -The following will be assumed: -`$request` is an object of `Psr\Http\Message\RequestInterface` and - -`$response` is an object implementing `Psr\Http\Message\RequestInterface` - - -### Working with HTTP Headers - -#### Adding headers to response: - -```php -$response->withHeader('My-Custom-Header', 'My Custom Message'); -``` - -#### Appending values to headers - -```php -$response->withAddedHeader('My-Custom-Header', 'The second message'); -``` - -#### Checking if header exists: - -```php -$request->hasHeader('My-Custom-Header'); // will return false -$response->hasHeader('My-Custom-Header'); // will return true -``` - -> Note: My-Custom-Header was only added in the Response - -#### Getting comma-separated values from a header (also applies to request) - -```php -// getting value from request headers -$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" -// getting value from response headers -$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" -``` - -#### Getting array of value from a header (also applies to request) -```php -// getting value from request headers -$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] -// getting value from response headers -$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] -``` - -#### Removing headers from HTTP Messages -```php -// removing a header from Request, removing deprecated "Content-MD5" header -$request->withoutHeader('Content-MD5'); - -// removing a header from Response -// effect: the browser won't know the size of the stream -// the browser will download the stream till it ends -$response->withoutHeader('Content-Length'); -``` - -### Working with HTTP Message Body - -When working with the PSR-7 there are two methods of implementation: -#### 1. Getting the body separately - -> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. - -```php -$body = $response->getBody(); -// operations on body, eg. read, write, seek -// ... -// replacing the old body -$response->withBody($body); -// this last statement is optional as we working with objects -// in this case the "new" body is same with the "old" one -// the $body variable has the same value as the one in $request, only the reference is passed -``` - -#### 2. Working directly on response - -> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required - -```php -$response->getBody()->write('hello'); -``` - -### Getting the body contents - -The following snippet gets the contents of a stream contents. -> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. -```php -$body = $response->getBody(); -$body->rewind(); // or $body->seek(0); -$bodyText = $body->getContents(); -``` -> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. - -### Append to body - -```php -$response->getBody()->write('Hello'); // writing directly -$body = $request->getBody(); // which is a `StreamInterface` -$body->write('xxxxx'); -``` - -### Prepend to body -Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. -The following example will explain the behaviour of streams. - -```php -// assuming our response is initially empty -$body = $repsonse->getBody(); -// writing the string "abcd" -$body->write('abcd'); - -// seeking to start of stream -$body->seek(0); -// writing 'ef' -$body->write('ef'); // at this point the stream contains "efcd" -``` - -#### Prepending by rewriting separately - -```php -// assuming our response body stream only contains: "abcd" -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // abcd -// seeking the stream to beginning -$body->rewind(); -$body->write('ef'); // stream contains "efcd" -$body->write($contents); // stream contains "efabcd" -``` - -> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. - -#### Prepending by using contents as a string -```php -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // efabcd -$contents = 'ef'.$contents; -$body->rewind(); -$body->write($contents); -``` diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php deleted file mode 100644 index a83c9851..00000000 --- a/vendor/psr/http-message/src/MessageInterface.php +++ /dev/null @@ -1,187 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(): array; - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader(string $name): bool; - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader(string $name): array; - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine(string $name): string; - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader(string $name, $value): MessageInterface; - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader(string $name, $value): MessageInterface; - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader(string $name): MessageInterface; - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(): StreamInterface; - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body): MessageInterface; -} diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index 33f85e55..00000000 --- a/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,130 +0,0 @@ -getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(): array; - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query): ServerRequestInterface; - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(): array; - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data): ServerRequestInterface; - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(): array; - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute(string $name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute(string $name, $value): ServerRequestInterface; - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute(string $name): ServerRequestInterface; -} diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index a62aabb8..00000000 --- a/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,158 +0,0 @@ - - * [user-info@]host[:port] - * - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(): string; - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(): string; - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(): string; - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(): ?int; - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(): string; - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(): string; - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(): string; - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme(string $scheme): UriInterface; - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo(string $user, ?string $password = null): UriInterface; - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost(string $host): UriInterface; - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort(?int $port): UriInterface; - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath(string $path): UriInterface; - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery(string $query): UriInterface; - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment(string $fragment): UriInterface; - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(): string; -} diff --git a/vendor/psr/http-server-handler/LICENSE b/vendor/psr/http-server-handler/LICENSE deleted file mode 100644 index b71ec5df..00000000 --- a/vendor/psr/http-server-handler/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/psr/http-server-handler/README.md b/vendor/psr/http-server-handler/README.md deleted file mode 100644 index 111a9ed2..00000000 --- a/vendor/psr/http-server-handler/README.md +++ /dev/null @@ -1,12 +0,0 @@ -HTTP Server Request Handlers for Middleware -=========================================== - -This repository holds the `RequestHandlerInterface` related to [PSR-15 (HTTP Server Request Handlers)][psr-url]. - -Note that this is not a Server Request Handler implementation of its own. It is merely the interface that describe a Server Request Handler. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-15/ -[package-url]: https://packagist.org/packages/psr/http-server-handler -[implementation-url]: https://packagist.org/providers/psr/http-server-handler-implementation diff --git a/vendor/psr/http-server-handler/composer.json b/vendor/psr/http-server-handler/composer.json deleted file mode 100644 index c54b2dee..00000000 --- a/vendor/psr/http-server-handler/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "psr/http-server-handler", - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "psr", - "psr-7", - "psr-15", - "http-interop", - "http", - "server", - "handler", - "request", - "response" - ], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/http-server-handler/src/RequestHandlerInterface.php b/vendor/psr/http-server-handler/src/RequestHandlerInterface.php deleted file mode 100644 index 83911e26..00000000 --- a/vendor/psr/http-server-handler/src/RequestHandlerInterface.php +++ /dev/null @@ -1,22 +0,0 @@ -=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/http-server-middleware/src/MiddlewareInterface.php b/vendor/psr/http-server-middleware/src/MiddlewareInterface.php deleted file mode 100644 index a6c14f8c..00000000 --- a/vendor/psr/http-server-middleware/src/MiddlewareInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -logger = $logger; } diff --git a/vendor/psr/log/src/LoggerInterface.php b/vendor/psr/log/src/LoggerInterface.php index cb4cf648..b4d062b9 100644 --- a/vendor/psr/log/src/LoggerInterface.php +++ b/vendor/psr/log/src/LoggerInterface.php @@ -22,9 +22,12 @@ interface LoggerInterface /** * System is unusable. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function emergency(string|\Stringable $message, array $context = []): void; + public function emergency(string|\Stringable $message, array $context = []); /** * Action must be taken immediately. @@ -32,26 +35,35 @@ public function emergency(string|\Stringable $message, array $context = []): voi * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function alert(string|\Stringable $message, array $context = []): void; + public function alert(string|\Stringable $message, array $context = []); /** * Critical conditions. * * Example: Application component unavailable, unexpected exception. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function critical(string|\Stringable $message, array $context = []): void; + public function critical(string|\Stringable $message, array $context = []); /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function error(string|\Stringable $message, array $context = []): void; + public function error(string|\Stringable $message, array $context = []); /** * Exceptional occurrences that are not errors. @@ -59,40 +71,55 @@ public function error(string|\Stringable $message, array $context = []): void; * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function warning(string|\Stringable $message, array $context = []): void; + public function warning(string|\Stringable $message, array $context = []); /** * Normal but significant events. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function notice(string|\Stringable $message, array $context = []): void; + public function notice(string|\Stringable $message, array $context = []); /** * Interesting events. * * Example: User logs in, SQL logs. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function info(string|\Stringable $message, array $context = []): void; + public function info(string|\Stringable $message, array $context = []); /** * Detailed debug information. * + * @param string|\Stringable $message * @param mixed[] $context + * + * @return void */ - public function debug(string|\Stringable $message, array $context = []): void; + public function debug(string|\Stringable $message, array $context = []); /** * Logs with an arbitrary level. * - * @param mixed $level + * @param mixed $level + * @param string|\Stringable $message * @param mixed[] $context * + * @return void + * * @throws \Psr\Log\InvalidArgumentException */ - public function log($level, string|\Stringable $message, array $context = []): void; + public function log($level, string|\Stringable $message, array $context = []); } diff --git a/vendor/psr/log/src/LoggerTrait.php b/vendor/psr/log/src/LoggerTrait.php index a5d9980b..920bda77 100644 --- a/vendor/psr/log/src/LoggerTrait.php +++ b/vendor/psr/log/src/LoggerTrait.php @@ -14,8 +14,13 @@ trait LoggerTrait { /** * System is unusable. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function emergency(string|\Stringable $message, array $context = []): void + public function emergency(string|\Stringable $message, array $context = []) { $this->log(LogLevel::EMERGENCY, $message, $context); } @@ -25,8 +30,13 @@ public function emergency(string|\Stringable $message, array $context = []): voi * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function alert(string|\Stringable $message, array $context = []): void + public function alert(string|\Stringable $message, array $context = []) { $this->log(LogLevel::ALERT, $message, $context); } @@ -35,8 +45,13 @@ public function alert(string|\Stringable $message, array $context = []): void * Critical conditions. * * Example: Application component unavailable, unexpected exception. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function critical(string|\Stringable $message, array $context = []): void + public function critical(string|\Stringable $message, array $context = []) { $this->log(LogLevel::CRITICAL, $message, $context); } @@ -44,8 +59,13 @@ public function critical(string|\Stringable $message, array $context = []): void /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function error(string|\Stringable $message, array $context = []): void + public function error(string|\Stringable $message, array $context = []) { $this->log(LogLevel::ERROR, $message, $context); } @@ -55,16 +75,26 @@ public function error(string|\Stringable $message, array $context = []): void * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function warning(string|\Stringable $message, array $context = []): void + public function warning(string|\Stringable $message, array $context = []) { $this->log(LogLevel::WARNING, $message, $context); } /** * Normal but significant events. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function notice(string|\Stringable $message, array $context = []): void + public function notice(string|\Stringable $message, array $context = []) { $this->log(LogLevel::NOTICE, $message, $context); } @@ -73,16 +103,26 @@ public function notice(string|\Stringable $message, array $context = []): void * Interesting events. * * Example: User logs in, SQL logs. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function info(string|\Stringable $message, array $context = []): void + public function info(string|\Stringable $message, array $context = []) { $this->log(LogLevel::INFO, $message, $context); } /** * Detailed debug information. + * + * @param string|\Stringable $message + * @param array $context + * + * @return void */ - public function debug(string|\Stringable $message, array $context = []): void + public function debug(string|\Stringable $message, array $context = []) { $this->log(LogLevel::DEBUG, $message, $context); } @@ -90,9 +130,13 @@ public function debug(string|\Stringable $message, array $context = []): void /** * Logs with an arbitrary level. * - * @param mixed $level + * @param mixed $level + * @param string|\Stringable $message + * @param array $context + * + * @return void * * @throws \Psr\Log\InvalidArgumentException */ - abstract public function log($level, string|\Stringable $message, array $context = []): void; + abstract public function log($level, string|\Stringable $message, array $context = []); } diff --git a/vendor/psr/log/src/NullLogger.php b/vendor/psr/log/src/NullLogger.php index de0561e2..56077057 100644 --- a/vendor/psr/log/src/NullLogger.php +++ b/vendor/psr/log/src/NullLogger.php @@ -15,11 +15,15 @@ class NullLogger extends AbstractLogger /** * Logs with an arbitrary level. * - * @param mixed[] $context + * @param mixed $level + * @param string|\Stringable $message + * @param array $context + * + * @return void * * @throws \Psr\Log\InvalidArgumentException */ - public function log($level, string|\Stringable $message, array $context = []): void + public function log($level, string|\Stringable $message, array $context = []) { // noop } diff --git a/vendor/psr/simple-cache/composer.json b/vendor/psr/simple-cache/composer.json index f307a845..a520e7d5 100644 --- a/vendor/psr/simple-cache/composer.json +++ b/vendor/psr/simple-cache/composer.json @@ -19,7 +19,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.0.x-dev" } } } diff --git a/vendor/psr/simple-cache/src/CacheInterface.php b/vendor/psr/simple-cache/src/CacheInterface.php index 671e340c..cb05d2f1 100644 --- a/vendor/psr/simple-cache/src/CacheInterface.php +++ b/vendor/psr/simple-cache/src/CacheInterface.php @@ -15,7 +15,7 @@ interface CacheInterface * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function get(string $key, mixed $default = null): mixed; + public function get(string $key, mixed $default = null); /** * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. @@ -31,7 +31,7 @@ public function get(string $key, mixed $default = null): mixed; * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null); /** * Delete an item from the cache by its unique key. @@ -43,14 +43,14 @@ public function set(string $key, mixed $value, null|int|\DateInterval $ttl = nul * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function delete(string $key): bool; + public function delete(string $key); /** * Wipes clean the entire cache's keys. * * @return bool True on success and false on failure. */ - public function clear(): bool; + public function clear(); /** * Obtains multiple cache items by their unique keys. @@ -64,7 +64,7 @@ public function clear(): bool; * MUST be thrown if $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ - public function getMultiple(iterable $keys, mixed $default = null): iterable; + public function getMultiple(iterable $keys, mixed $default = null); /** * Persists a set of key => value pairs in the cache, with an optional TTL. @@ -80,7 +80,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable; * MUST be thrown if $values is neither an array nor a Traversable, * or if any of the $values are not a legal value. */ - public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool; + public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null); /** * Deletes multiple cache items in a single operation. @@ -93,7 +93,7 @@ public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null * MUST be thrown if $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ - public function deleteMultiple(iterable $keys): bool; + public function deleteMultiple(iterable $keys); /** * Determines whether an item is present in the cache. @@ -110,5 +110,5 @@ public function deleteMultiple(iterable $keys): bool; * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function has(string $key): bool; + public function has(string $key); } diff --git a/vendor/ramsey/collection/LICENSE b/vendor/ramsey/collection/LICENSE deleted file mode 100644 index a7fcf120..00000000 --- a/vendor/ramsey/collection/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2022 Ben Ramsey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/ramsey/collection/README.md b/vendor/ramsey/collection/README.md deleted file mode 100644 index aacf940b..00000000 --- a/vendor/ramsey/collection/README.md +++ /dev/null @@ -1,59 +0,0 @@ -

          ramsey/collection

          - -

          - A PHP library for representing and manipulating collections. -

          - -

          - Source Code - Download Package - PHP Programming Language - Read License - Build Status - Codecov Code Coverage -

          - -## About - -ramsey/collection is a PHP library for representing and manipulating collections. - -Much inspiration for this library came from the [Java Collections Framework][java]. - -This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). -By participating in this project and its community, you are expected to -uphold this code. - -## Installation - -Install this package as a dependency using [Composer](https://getcomposer.org). - -``` bash -composer require ramsey/collection -``` - -## Usage - -Examples of how to use this library may be found in the -[Wiki pages](https://github.com/ramsey/collection/wiki/Examples). - -## Contributing - -Contributions are welcome! To contribute, please familiarize yourself with -[CONTRIBUTING.md](CONTRIBUTING.md). - -## Coordinated Disclosure - -Keeping user information safe and secure is a top priority, and we welcome the -contribution of external security researchers. If you believe you've found a -security issue in software that is maintained in this repository, please read -[SECURITY.md][] for instructions on submitting a vulnerability report. - -## Copyright and License - -The ramsey/collection library is copyright © [Ben Ramsey](https://benramsey.com) -and licensed for use under the terms of the -MIT License (MIT). Please see [LICENSE](LICENSE) for more information. - - -[java]: http://docs.oracle.com/javase/8/docs/technotes/guides/collections/index.html -[security.md]: https://github.com/ramsey/collection/blob/main/SECURITY.md diff --git a/vendor/ramsey/collection/SECURITY.md b/vendor/ramsey/collection/SECURITY.md deleted file mode 100644 index 3de4c0cb..00000000 --- a/vendor/ramsey/collection/SECURITY.md +++ /dev/null @@ -1,169 +0,0 @@ - - -# Vulnerability Disclosure Policy (VDP) - -## Brand Promise - - - -Keeping user information safe and secure is a top priority, and we welcome the -contribution of external security researchers. - -## Scope - - - -If you believe you've found a security issue in software that is maintained in -this repository, we encourage you to notify us. - -| Version | In scope | Source code | -| ------- | :------: | ----------- | -| latest | ✅ | https://github.com/ramsey/collection | - -## How to Submit a Report - - - -To submit a vulnerability report, please contact us at security@ramsey.dev. -Your submission will be reviewed and validated by a member of our team. - -## Safe Harbor - - - -We support safe harbor for security researchers who: - -* Make a good faith effort to avoid privacy violations, destruction of data, and - interruption or degradation of our services. -* Only interact with accounts you own or with explicit permission of the account - holder. If you do encounter Personally Identifiable Information (PII) contact - us immediately, do not proceed with access, and immediately purge any local - information. -* Provide us with a reasonable amount of time to resolve vulnerabilities prior - to any disclosure to the public or a third party. - -We will consider activities conducted consistent with this policy to constitute -"authorized" conduct and will not pursue civil action or initiate a complaint to -law enforcement. We will help to the extent we can if legal action is initiated -by a third party against you. - -Please submit a report to us before engaging in conduct that may be inconsistent -with or unaddressed by this policy. - -## Preferences - - - -* Please provide detailed reports with reproducible steps and a clearly defined - impact. -* Include the version number of the vulnerable package in your report -* Social engineering (e.g. phishing, vishing, smishing) is prohibited. - - - -## Encryption Key for security@ramsey.dev - -For increased privacy when reporting sensitive issues, you may encrypt your -message using the following public key: - -``` ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBF+Z9gEBEACbT/pIx8RR0K18t8Z2rDnmEV44YdT7HNsMdq+D6SAlx8UUb6AU -jGIbV9dgBgGNtOLU1pxloaJwL9bWIRbj+X/Qb2WNIP//Vz1Y40ox1dSpfCUrizXx -kb4p58Xml0PsB8dg3b4RDUgKwGC37ne5xmDnigyJPbiB2XJ6Xc46oPCjh86XROTK -wEBB2lY67ClBlSlvC2V9KmbTboRQkLdQDhOaUosMb99zRb0EWqDLaFkZVjY5HI7i -0pTveE6dI12NfHhTwKjZ5pUiAZQGlKA6J1dMjY2unxHZkQj5MlMfrLSyJHZxccdJ -xD94T6OTcTHt/XmMpI2AObpewZDdChDQmcYDZXGfAhFoJmbvXsmLMGXKgzKoZ/ls -RmLsQhh7+/r8E+Pn5r+A6Hh4uAc14ApyEP0ckKeIXw1C6pepHM4E8TEXVr/IA6K/ -z6jlHORixIFX7iNOnfHh+qwOgZw40D6JnBfEzjFi+T2Cy+JzN2uy7I8UnecTMGo3 -5t6astPy6xcH6kZYzFTV7XERR6LIIVyLAiMFd8kF5MbJ8N5ElRFsFHPW+82N2HDX -c60iSaTB85k6R6xd8JIKDiaKE4sSuw2wHFCKq33d/GamYezp1wO+bVUQg88efljC -2JNFyD+vl30josqhw1HcmbE1TP3DlYeIL5jQOlxCMsgai6JtTfHFM/5MYwARAQAB -tBNzZWN1cml0eUByYW1zZXkuZGV2iQJUBBMBCAA+FiEE4drPD+/ofZ570fAYq0bv -vXQCywIFAl+Z9gECGwMFCQeGH4AFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ -q0bvvXQCywIkEA//Qcwv8MtTCy01LHZd9c7VslwhNdXQDYymcTyjcYw8x7O22m4B -3hXE6vqAplFhVxxkqXB2ef0tQuzxhPHNJgkCE4Wq4i+V6qGpaSVHQT2W6DN/NIhL -vS8OdScc6zddmIbIkSrzVVAtjwehFNEIrX3DnbbbK+Iku7vsKT5EclOluIsjlYoX -goW8IeReyDBqOe2H3hoCGw6EA0D/NYV2bJnfy53rXVIyarsXXeOLp7eNEH6Td7aW -PVSrMZJe1t+knrEGnEdrXWzlg4lCJJCtemGv+pKBUomnyISXSdqyoRCCzvQjqyig -2kRebUX8BXPW33p4OXPj9sIboUOjZwormWwqqbFMO+J4TiVCUoEoheI7emPFRcNN -QtPJrjbY1++OznBc0GRpfeUkGoU1cbRl1bnepnFIZMTDLkrVW6I1Y4q8ZVwX3BkE -N81ctFrRpHBlU36EdHvjPQmGtuiL77Qq3fWmMv7yTvK1wHJAXfEb0ZJWHZCbck3w -l0CVq0Z+UUAOM8Rp1N0N8m92xtapav0qCFU9qzf2J5qX6GRmWv+d29wPgFHzDWBm -nnrYYIA4wJLx00U6SMcVBSnNe91B+RfGY5XQhbWPjQQecOGCSDsxaFAq2MeOVJyZ -bIjLYfG9GxoLKr5R7oLRJvZI4nKKBc1Kci/crZbdiSdQhSQGlDz88F1OHeCIdQQQ -EQgAHRYhBOhdAxHd+lus86YQ57Atl5icjAcbBQJfmfdIAAoJELAtl5icjAcbFVcA -/1LqB3ZjsnXDAvvAXZVjSPqofSlpMLeRQP6IM/A9Odq0AQCZrtZc1knOMGEcjppK -Rk+sy/R0Mshy8TDuaZIRgh2Ux7kCDQRfmfYBARAAmchKzzVz7IaEq7PnZDb3szQs -T/+E9F3m39yOpV4fEB1YzObonFakXNT7Gw2tZEx0eitUMqQ/13jjfu3UdzlKl2bR -qA8LrSQRhB+PTC9A1XvwxCUYhhjGiLzJ9CZL6hBQB43qHOmE9XJPme90geLsF+gK -u39Waj1SNWzwGg+Gy1Gl5f2AJoDTxznreCuFGj+Vfaczt/hlfgqpOdb9jsmdoE7t -3DSWppA9dRHWwQSgE6J28rR4QySBcqyXS6IMykqaJn7Z26yNIaITLnHCZOSY8zhP -ha7GFsN549EOCgECbrnPt9dmI2+hQE0RO0e7SOBNsIf5sz/i7urhwuj0CbOqhjc2 -X1AEVNFCVcb6HPi/AWefdFCRu0gaWQxn5g+9nkq5slEgvzCCiKYzaBIcr8qR6Hb4 -FaOPVPxO8vndRouq57Ws8XpAwbPttioFuCqF4u9K+tK/8e2/R8QgRYJsE3Cz/Fu8 -+pZFpMnqbDEbK3DL3ss+1ed1sky+mDV8qXXeI33XW5hMFnk1JWshUjHNlQmE6ftC -U0xSTMVUtwJhzH2zDp8lEdu7qi3EsNULOl68ozDr6soWAvCbHPeTdTOnFySGCleG -/3TonsoZJs/sSPPJnxFQ1DtgQL6EbhIwa0ZwU4eKYVHZ9tjxuMX3teFzRvOrJjgs -+ywGlsIURtEckT5Y6nMAEQEAAYkCPAQYAQgAJhYhBOHazw/v6H2ee9HwGKtG7710 -AssCBQJfmfYBAhsMBQkHhh+AAAoJEKtG7710AssC8NcP/iDAcy1aZFvkA0EbZ85p -i7/+ywtE/1wF4U4/9OuLcoskqGGnl1pJNPooMOSBCfreoTB8HimT0Fln0CoaOm4Q -pScNq39JXmf4VxauqUJVARByP6zUfgYarqoaZNeuFF0S4AZJ2HhGzaQPjDz1uKVM -PE6tQSgQkFzdZ9AtRA4vElTH6yRAgmepUsOihk0b0gUtVnwtRYZ8e0Qt3ie97a73 -DxLgAgedFRUbLRYiT0vNaYbainBsLWKpN/T8odwIg/smP0Khjp/ckV60cZTdBiPR -szBTPJESMUTu0VPntc4gWwGsmhZJg/Tt/qP08XYo3VxNYBegyuWwNR66zDWvwvGH -muMv5UchuDxp6Rt3JkIO4voMT1JSjWy9p8krkPEE4V6PxAagLjdZSkt92wVLiK5x -y5gNrtPhU45YdRAKHr36OvJBJQ42CDaZ6nzrzghcIp9CZ7ANHrI+QLRM/csz+AGA -szSp6S4mc1lnxxfbOhPPpebZPn0nIAXoZnnoVKdrxBVedPQHT59ZFvKTQ9Fs7gd3 -sYNuc7tJGFGC2CxBH4ANDpOQkc5q9JJ1HSGrXU3juxIiRgfA26Q22S9c71dXjElw -Ri584QH+bL6kkYmm8xpKF6TVwhwu5xx/jBPrbWqFrtbvLNrnfPoapTihBfdIhkT6 -nmgawbBHA02D5xEqB5SU3WJu -=eJNx ------END PGP PUBLIC KEY BLOCK----- -``` diff --git a/vendor/ramsey/collection/composer.json b/vendor/ramsey/collection/composer.json deleted file mode 100644 index 42fc22b9..00000000 --- a/vendor/ramsey/collection/composer.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "name": "ramsey/collection", - "description": "A PHP library for representing and manipulating collections.", - "license": "MIT", - "type": "library", - "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" - ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "require": { - "php": "^8.1" - }, - "require-dev": { - "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.45", - "fakerphp/faker": "^1.24", - "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^2.1", - "mockery/mockery": "^1.6", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.4", - "phpspec/prophecy-phpunit": "^2.3", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^10.5", - "ramsey/coding-standard": "^2.3", - "ramsey/conventional-commits": "^1.6", - "roave/security-advisories": "dev-latest" - }, - "prefer-stable": true, - "autoload": { - "psr-4": { - "Ramsey\\Collection\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Ramsey\\Collection\\Test\\": "tests/" - } - }, - "config": { - "allow-plugins": { - "captainhook/plugin-composer": true, - "dealerdirect/phpcodesniffer-composer-installer": true, - "ergebnis/composer-normalize": true, - "phpstan/extension-installer": true - }, - "sort-packages": true - }, - "extra": { - "captainhook": { - "force-install": true - }, - "ramsey/conventional-commits": { - "configFile": "conventional-commits.json" - } - }, - "scripts": { - "dev:analyze": [ - "@dev:analyze:phpstan" - ], - "dev:analyze:phpstan": "phpstan analyse --ansi --memory-limit=1G", - "dev:build:clean": "git clean -fX build/", - "dev:lint": [ - "@dev:lint:syntax", - "@dev:lint:style" - ], - "dev:lint:fix": "phpcbf", - "dev:lint:style": "phpcs --colors", - "dev:lint:syntax": "parallel-lint --colors src/ tests/", - "dev:test": [ - "@dev:lint", - "@dev:analyze", - "@dev:test:unit" - ], - "dev:test:coverage:ci": "phpunit --colors=always --coverage-text --coverage-clover build/coverage/clover.xml --coverage-cobertura build/coverage/cobertura.xml --coverage-crap4j build/coverage/crap4j.xml --coverage-xml build/coverage/coverage-xml --log-junit build/junit.xml", - "dev:test:coverage:html": "phpunit --colors=always --coverage-html build/coverage/coverage-html/", - "dev:test:unit": "phpunit --colors=always", - "test": "@dev:test" - }, - "scripts-descriptions": { - "dev:analyze": "Runs all static analysis checks.", - "dev:analyze:phpstan": "Runs the PHPStan static analyzer.", - "dev:build:clean": "Cleans the build/ directory.", - "dev:lint": "Runs all linting checks.", - "dev:lint:fix": "Auto-fixes coding standards issues, if possible.", - "dev:lint:style": "Checks for coding standards issues.", - "dev:lint:syntax": "Checks for syntax errors.", - "dev:test": "Runs linting, static analysis, and unit tests.", - "dev:test:coverage:ci": "Runs unit tests and generates CI coverage reports.", - "dev:test:coverage:html": "Runs unit tests and generates HTML coverage report.", - "dev:test:unit": "Runs unit tests.", - "test": "Runs linting, static analysis, and unit tests." - } -} diff --git a/vendor/ramsey/collection/src/AbstractArray.php b/vendor/ramsey/collection/src/AbstractArray.php deleted file mode 100644 index 6d6b6d66..00000000 --- a/vendor/ramsey/collection/src/AbstractArray.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use ArrayIterator; -use Traversable; - -use function count; - -/** - * This class provides a basic implementation of `ArrayInterface`, to minimize - * the effort required to implement this interface. - * - * @template T - * @implements ArrayInterface - */ -abstract class AbstractArray implements ArrayInterface -{ - /** - * The items of this array. - * - * @var array - */ - protected array $data = []; - - /** - * Constructs a new array object. - * - * @param array $data The initial items to add to this array. - */ - public function __construct(array $data = []) - { - // Invoke offsetSet() for each value added; in this way, subclasses - // may provide additional logic about values added to the array object. - foreach ($data as $key => $value) { - $this[$key] = $value; - } - } - - /** - * Returns an iterator for this array. - * - * @link http://php.net/manual/en/iteratoraggregate.getiterator.php IteratorAggregate::getIterator() - * - * @return Traversable - */ - public function getIterator(): Traversable - { - return new ArrayIterator($this->data); - } - - /** - * Returns `true` if the given offset exists in this array. - * - * @link http://php.net/manual/en/arrayaccess.offsetexists.php ArrayAccess::offsetExists() - * - * @param array-key $offset The offset to check. - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->data[$offset]); - } - - /** - * Returns the value at the specified offset. - * - * @link http://php.net/manual/en/arrayaccess.offsetget.php ArrayAccess::offsetGet() - * - * @param array-key $offset The offset for which a value should be returned. - * - * @return T the value stored at the offset, or null if the offset - * does not exist. - */ - public function offsetGet(mixed $offset): mixed - { - return $this->data[$offset]; - } - - /** - * Sets the given value to the given offset in the array. - * - * @link http://php.net/manual/en/arrayaccess.offsetset.php ArrayAccess::offsetSet() - * - * @param array-key | null $offset The offset to set. If `null`, the value - * may be set at a numerically-indexed offset. - * @param T $value The value to set at the given offset. - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if ($offset === null) { - $this->data[] = $value; - } else { - $this->data[$offset] = $value; - } - } - - /** - * Removes the given offset and its value from the array. - * - * @link http://php.net/manual/en/arrayaccess.offsetunset.php ArrayAccess::offsetUnset() - * - * @param array-key $offset The offset to remove from the array. - */ - public function offsetUnset(mixed $offset): void - { - unset($this->data[$offset]); - } - - /** - * Returns data suitable for PHP serialization. - * - * @link https://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.serialize - * @link https://www.php.net/serialize - * - * @return array - */ - public function __serialize(): array - { - return $this->data; - } - - /** - * Adds unserialized data to the object. - * - * @param array $data - */ - public function __unserialize(array $data): void - { - $this->data = $data; - } - - /** - * Returns the number of items in this array. - * - * @link http://php.net/manual/en/countable.count.php Countable::count() - */ - public function count(): int - { - return count($this->data); - } - - public function clear(): void - { - $this->data = []; - } - - /** - * @inheritDoc - */ - public function toArray(): array - { - return $this->data; - } - - public function isEmpty(): bool - { - return $this->data === []; - } -} diff --git a/vendor/ramsey/collection/src/AbstractCollection.php b/vendor/ramsey/collection/src/AbstractCollection.php deleted file mode 100644 index 2f006b90..00000000 --- a/vendor/ramsey/collection/src/AbstractCollection.php +++ /dev/null @@ -1,365 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Closure; -use Ramsey\Collection\Exception\CollectionMismatchException; -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Exception\InvalidPropertyOrMethod; -use Ramsey\Collection\Exception\NoSuchElementException; -use Ramsey\Collection\Exception\UnsupportedOperationException; -use Ramsey\Collection\Tool\TypeTrait; -use Ramsey\Collection\Tool\ValueExtractorTrait; -use Ramsey\Collection\Tool\ValueToStringTrait; - -use function array_filter; -use function array_key_first; -use function array_key_last; -use function array_map; -use function array_merge; -use function array_reduce; -use function array_search; -use function array_udiff; -use function array_uintersect; -use function in_array; -use function is_int; -use function is_object; -use function spl_object_id; -use function sprintf; -use function usort; - -/** - * This class provides a basic implementation of `CollectionInterface`, to - * minimize the effort required to implement this interface - * - * @template T - * @extends AbstractArray - * @implements CollectionInterface - */ -abstract class AbstractCollection extends AbstractArray implements CollectionInterface -{ - use TypeTrait; - use ValueToStringTrait; - use ValueExtractorTrait; - - /** - * @throws InvalidArgumentException if $element is of the wrong type. - */ - public function add(mixed $element): bool - { - $this[] = $element; - - return true; - } - - public function contains(mixed $element, bool $strict = true): bool - { - return in_array($element, $this->data, $strict); - } - - /** - * @throws InvalidArgumentException if $element is of the wrong type. - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if ($this->checkType($this->getType(), $value) === false) { - throw new InvalidArgumentException( - 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($value), - ); - } - - if ($offset === null) { - $this->data[] = $value; - } else { - $this->data[$offset] = $value; - } - } - - public function remove(mixed $element): bool - { - if (($position = array_search($element, $this->data, true)) !== false) { - unset($this[$position]); - - return true; - } - - return false; - } - - /** - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call column() on this - * collection. - * - * @inheritDoc - */ - public function column(string $propertyOrMethod): array - { - $temp = []; - - foreach ($this->data as $item) { - $temp[] = $this->extractValue($item, $propertyOrMethod); - } - - return $temp; - } - - /** - * @return T - * - * @throws NoSuchElementException if this collection is empty. - */ - public function first(): mixed - { - $firstIndex = array_key_first($this->data); - - if ($firstIndex === null) { - throw new NoSuchElementException('Can\'t determine first item. Collection is empty'); - } - - return $this->data[$firstIndex]; - } - - /** - * @return T - * - * @throws NoSuchElementException if this collection is empty. - */ - public function last(): mixed - { - $lastIndex = array_key_last($this->data); - - if ($lastIndex === null) { - throw new NoSuchElementException('Can\'t determine last item. Collection is empty'); - } - - return $this->data[$lastIndex]; - } - - /** - * @return CollectionInterface - * - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call sort() on this - * collection. - */ - public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): CollectionInterface - { - $collection = clone $this; - - usort( - $collection->data, - function (mixed $a, mixed $b) use ($propertyOrMethod, $order): int { - $aValue = $this->extractValue($a, $propertyOrMethod); - $bValue = $this->extractValue($b, $propertyOrMethod); - - return ($aValue <=> $bValue) * ($order === Sort::Descending ? -1 : 1); - }, - ); - - return $collection; - } - - /** - * @param callable(T): bool $callback A callable to use for filtering elements. - * - * @return CollectionInterface - */ - public function filter(callable $callback): CollectionInterface - { - $collection = clone $this; - $collection->data = array_merge([], array_filter($collection->data, $callback)); - - return $collection; - } - - /** - * @return CollectionInterface - * - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call where() on this - * collection. - */ - public function where(?string $propertyOrMethod, mixed $value): CollectionInterface - { - return $this->filter( - fn (mixed $item): bool => $this->extractValue($item, $propertyOrMethod) === $value, - ); - } - - /** - * @param callable(T): TCallbackReturn $callback A callable to apply to each - * item of the collection. - * - * @return CollectionInterface - * - * @template TCallbackReturn - */ - public function map(callable $callback): CollectionInterface - { - return new Collection('mixed', array_map($callback, $this->data)); - } - - /** - * @param callable(TCarry, T): TCarry $callback A callable to apply to each - * item of the collection to reduce it to a single value. - * @param TCarry $initial This is the initial value provided to the callback. - * - * @return TCarry - * - * @template TCarry - */ - public function reduce(callable $callback, mixed $initial): mixed - { - return array_reduce($this->data, $callback, $initial); - } - - /** - * @param CollectionInterface $other The collection to check for divergent - * items. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if the compared collections are of - * differing types. - */ - public function diff(CollectionInterface $other): CollectionInterface - { - $this->compareCollectionTypes($other); - - $diffAtoB = array_udiff($this->data, $other->toArray(), $this->getComparator()); - $diffBtoA = array_udiff($other->toArray(), $this->data, $this->getComparator()); - - $collection = clone $this; - $collection->data = array_merge($diffAtoB, $diffBtoA); - - return $collection; - } - - /** - * @param CollectionInterface $other The collection to check for - * intersecting items. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if the compared collections are of - * differing types. - */ - public function intersect(CollectionInterface $other): CollectionInterface - { - $this->compareCollectionTypes($other); - - $collection = clone $this; - $collection->data = array_uintersect($this->data, $other->toArray(), $this->getComparator()); - - return $collection; - } - - /** - * @param CollectionInterface ...$collections The collections to merge. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if unable to merge any of the given - * collections or items within the given collections due to type - * mismatch errors. - */ - public function merge(CollectionInterface ...$collections): CollectionInterface - { - $mergedCollection = clone $this; - - foreach ($collections as $index => $collection) { - if (!$collection instanceof static) { - throw new CollectionMismatchException( - sprintf('Collection with index %d must be of type %s', $index, static::class), - ); - } - - // When using generics (Collection.php, Set.php, etc), - // we also need to make sure that the internal types match each other - if ($this->getUniformType($collection) !== $this->getUniformType($this)) { - throw new CollectionMismatchException( - sprintf( - 'Collection items in collection with index %d must be of type %s', - $index, - $this->getType(), - ), - ); - } - - foreach ($collection as $key => $value) { - if (is_int($key)) { - $mergedCollection[] = $value; - } else { - $mergedCollection[$key] = $value; - } - } - } - - return $mergedCollection; - } - - /** - * @param CollectionInterface $other - * - * @throws CollectionMismatchException - */ - private function compareCollectionTypes(CollectionInterface $other): void - { - if (!$other instanceof static) { - throw new CollectionMismatchException('Collection must be of type ' . static::class); - } - - // When using generics (Collection.php, Set.php, etc), - // we also need to make sure that the internal types match each other - if ($this->getUniformType($other) !== $this->getUniformType($this)) { - throw new CollectionMismatchException('Collection items must be of type ' . $this->getType()); - } - } - - private function getComparator(): Closure - { - return function (mixed $a, mixed $b): int { - // If the two values are object, we convert them to unique scalars. - // If the collection contains mixed values (unlikely) where some are objects - // and some are not, we leave them as they are. - // The comparator should still work and the result of $a < $b should - // be consistent but unpredictable since not documented. - if (is_object($a) && is_object($b)) { - $a = spl_object_id($a); - $b = spl_object_id($b); - } - - return $a === $b ? 0 : ($a < $b ? 1 : -1); - }; - } - - /** - * @param CollectionInterface $collection - */ - private function getUniformType(CollectionInterface $collection): string - { - return match ($collection->getType()) { - 'integer' => 'int', - 'boolean' => 'bool', - 'double' => 'float', - default => $collection->getType(), - }; - } -} diff --git a/vendor/ramsey/collection/src/AbstractSet.php b/vendor/ramsey/collection/src/AbstractSet.php deleted file mode 100644 index 63f83315..00000000 --- a/vendor/ramsey/collection/src/AbstractSet.php +++ /dev/null @@ -1,51 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -/** - * This class contains the basic implementation of a collection that does not - * allow duplicated values (a set), to minimize the effort required to implement - * this specific type of collection. - * - * @template T - * @extends AbstractCollection - */ -abstract class AbstractSet extends AbstractCollection -{ - public function add(mixed $element): bool - { - if ($this->contains($element)) { - return false; - } - - // Call offsetSet() on the parent instead of add(), since calling - // parent::add() will invoke $this->offsetSet(), which will call - // $this->contains() a second time. This can cause performance issues - // with extremely large collections. For more information, see - // https://github.com/ramsey/collection/issues/68. - parent::offsetSet(null, $element); - - return true; - } - - public function offsetSet(mixed $offset, mixed $value): void - { - if ($this->contains($value)) { - return; - } - - parent::offsetSet($offset, $value); - } -} diff --git a/vendor/ramsey/collection/src/ArrayInterface.php b/vendor/ramsey/collection/src/ArrayInterface.php deleted file mode 100644 index bc7f6f42..00000000 --- a/vendor/ramsey/collection/src/ArrayInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use ArrayAccess; -use Countable; -use IteratorAggregate; - -/** - * `ArrayInterface` provides traversable array functionality to data types. - * - * @template T - * @extends ArrayAccess - * @extends IteratorAggregate - */ -interface ArrayInterface extends - ArrayAccess, - Countable, - IteratorAggregate -{ - /** - * Removes all items from this array. - */ - public function clear(): void; - - /** - * Returns a native PHP array representation of this array object. - * - * @return array - */ - public function toArray(): array; - - /** - * Returns `true` if this array is empty. - */ - public function isEmpty(): bool; -} diff --git a/vendor/ramsey/collection/src/Collection.php b/vendor/ramsey/collection/src/Collection.php deleted file mode 100644 index 3b0f7689..00000000 --- a/vendor/ramsey/collection/src/Collection.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -/** - * A collection represents a group of objects. - * - * Each object in the collection is of a specific, defined type. - * - * This is a direct implementation of `CollectionInterface`, provided for - * the sake of convenience. - * - * Example usage: - * - * ``` - * $collection = new \Ramsey\Collection\Collection('My\\Foo'); - * $collection->add(new \My\Foo()); - * $collection->add(new \My\Foo()); - * - * foreach ($collection as $foo) { - * // Do something with $foo - * } - * ``` - * - * It is preferable to subclass `AbstractCollection` to create your own typed - * collections. For example: - * - * ``` - * namespace My\Foo; - * - * class FooCollection extends \Ramsey\Collection\AbstractCollection - * { - * public function getType() - * { - * return 'My\\Foo'; - * } - * } - * ``` - * - * And then use it similarly to the earlier example: - * - * ``` - * $fooCollection = new \My\Foo\FooCollection(); - * $fooCollection->add(new \My\Foo()); - * $fooCollection->add(new \My\Foo()); - * - * foreach ($fooCollection as $foo) { - * // Do something with $foo - * } - * ``` - * - * The benefit with this approach is that you may do type-checking on the - * collection object: - * - * ``` - * if ($collection instanceof \My\Foo\FooCollection) { - * // the collection is a collection of My\Foo objects - * } - * ``` - * - * @template T - * @extends AbstractCollection - */ -class Collection extends AbstractCollection -{ - /** - * Constructs a collection object of the specified type, optionally with the - * specified data. - * - * @param string $collectionType The type or class name associated with this - * collection. - * @param array $data The initial items to store in the collection. - */ - public function __construct(private readonly string $collectionType, array $data = []) - { - parent::__construct($data); - } - - public function getType(): string - { - return $this->collectionType; - } -} diff --git a/vendor/ramsey/collection/src/CollectionInterface.php b/vendor/ramsey/collection/src/CollectionInterface.php deleted file mode 100644 index 3ffbb166..00000000 --- a/vendor/ramsey/collection/src/CollectionInterface.php +++ /dev/null @@ -1,253 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Ramsey\Collection\Exception\CollectionMismatchException; -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Exception\InvalidPropertyOrMethod; -use Ramsey\Collection\Exception\NoSuchElementException; -use Ramsey\Collection\Exception\UnsupportedOperationException; - -/** - * A collection represents a group of values, known as its elements. - * - * Some collections allow duplicate elements and others do not. Some are ordered - * and others unordered. - * - * @template T - * @extends ArrayInterface - */ -interface CollectionInterface extends ArrayInterface -{ - /** - * Ensures that this collection contains the specified element (optional - * operation). - * - * Returns `true` if this collection changed as a result of the call. - * (Returns `false` if this collection does not permit duplicates and - * already contains the specified element.) - * - * Collections that support this operation may place limitations on what - * elements may be added to this collection. In particular, some - * collections will refuse to add `null` elements, and others will impose - * restrictions on the type of elements that may be added. Collection - * classes should clearly specify in their documentation any restrictions - * on what elements may be added. - * - * If a collection refuses to add a particular element for any reason other - * than that it already contains the element, it must throw an exception - * (rather than returning `false`). This preserves the invariant that a - * collection always contains the specified element after this call returns. - * - * @param T $element The element to add to the collection. - * - * @return bool `true` if this collection changed as a result of the call. - * - * @throws InvalidArgumentException if the collection refuses to add the - * $element for any reason other than that it already contains the element. - */ - public function add(mixed $element): bool; - - /** - * Returns `true` if this collection contains the specified element. - * - * @param T $element The element to check whether the collection contains. - * @param bool $strict Whether to perform a strict type check on the value. - */ - public function contains(mixed $element, bool $strict = true): bool; - - /** - * Returns the type associated with this collection. - */ - public function getType(): string; - - /** - * Removes a single instance of the specified element from this collection, - * if it is present. - * - * @param T $element The element to remove from the collection. - * - * @return bool `true` if an element was removed as a result of this call. - */ - public function remove(mixed $element): bool; - - /** - * Returns the values from the given property, method, or array key. - * - * @param string $propertyOrMethod The name of the property, method, or - * array key to evaluate and return. - * - * @return list - * - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call column() on this - * collection. - */ - public function column(string $propertyOrMethod): array; - - /** - * Returns the first item of the collection. - * - * @return T - * - * @throws NoSuchElementException if this collection is empty. - */ - public function first(): mixed; - - /** - * Returns the last item of the collection. - * - * @return T - * - * @throws NoSuchElementException if this collection is empty. - */ - public function last(): mixed; - - /** - * Sort the collection by a property, method, or array key with the given - * sort order. - * - * If $propertyOrMethod is `null`, this will sort by comparing each element. - * - * This will always leave the original collection untouched and will return - * a new one. - * - * @param string | null $propertyOrMethod The property, method, or array key - * to sort by. - * @param Sort $order The sort order for the resulting collection. - * - * @return CollectionInterface - * - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call sort() on this - * collection. - */ - public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): self; - - /** - * Filter out items of the collection which don't match the criteria of - * given callback. - * - * This will always leave the original collection untouched and will return - * a new one. - * - * See the {@link http://php.net/manual/en/function.array-filter.php PHP array_filter() documentation} - * for examples of how the `$callback` parameter works. - * - * @param callable(T): bool $callback A callable to use for filtering elements. - * - * @return CollectionInterface - */ - public function filter(callable $callback): self; - - /** - * Create a new collection where the result of the given property, method, - * or array key of each item in the collection equals the given value. - * - * This will always leave the original collection untouched and will return - * a new one. - * - * @param string | null $propertyOrMethod The property, method, or array key - * to evaluate. If `null`, the element itself is compared to $value. - * @param mixed $value The value to match. - * - * @return CollectionInterface - * - * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist - * on the elements in this collection. - * @throws UnsupportedOperationException if unable to call where() on this - * collection. - */ - public function where(?string $propertyOrMethod, mixed $value): self; - - /** - * Apply a given callback method on each item of the collection. - * - * This will always leave the original collection untouched. The new - * collection is created by mapping the callback to each item of the - * original collection. - * - * See the {@link http://php.net/manual/en/function.array-map.php PHP array_map() documentation} - * for examples of how the `$callback` parameter works. - * - * @param callable(T): TCallbackReturn $callback A callable to apply to each - * item of the collection. - * - * @return CollectionInterface - * - * @template TCallbackReturn - */ - public function map(callable $callback): self; - - /** - * Apply a given callback method on each item of the collection - * to reduce it to a single value. - * - * See the {@link http://php.net/manual/en/function.array-reduce.php PHP array_reduce() documentation} - * for examples of how the `$callback` and `$initial` parameters work. - * - * @param callable(TCarry, T): TCarry $callback A callable to apply to each - * item of the collection to reduce it to a single value. - * @param TCarry $initial This is the initial value provided to the callback. - * - * @return TCarry - * - * @template TCarry - */ - public function reduce(callable $callback, mixed $initial): mixed; - - /** - * Create a new collection with divergent items between current and given - * collection. - * - * @param CollectionInterface $other The collection to check for divergent - * items. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if the compared collections are of - * differing types. - */ - public function diff(CollectionInterface $other): self; - - /** - * Create a new collection with intersecting item between current and given - * collection. - * - * @param CollectionInterface $other The collection to check for - * intersecting items. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if the compared collections are of - * differing types. - */ - public function intersect(CollectionInterface $other): self; - - /** - * Merge current items and items of given collections into a new one. - * - * @param CollectionInterface ...$collections The collections to merge. - * - * @return CollectionInterface - * - * @throws CollectionMismatchException if unable to merge any of the given - * collections or items within the given collections due to type - * mismatch errors. - */ - public function merge(CollectionInterface ...$collections): self; -} diff --git a/vendor/ramsey/collection/src/DoubleEndedQueue.php b/vendor/ramsey/collection/src/DoubleEndedQueue.php deleted file mode 100644 index 62947a24..00000000 --- a/vendor/ramsey/collection/src/DoubleEndedQueue.php +++ /dev/null @@ -1,166 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Exception\NoSuchElementException; - -use function array_key_last; -use function array_pop; -use function array_unshift; - -/** - * This class provides a basic implementation of `DoubleEndedQueueInterface`, to - * minimize the effort required to implement this interface. - * - * @template T - * @extends Queue - * @implements DoubleEndedQueueInterface - */ -class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface -{ - /** - * Constructs a double-ended queue (dequeue) object of the specified type, - * optionally with the specified data. - * - * @param string $queueType The type or class name associated with this dequeue. - * @param array $data The initial items to store in the dequeue. - */ - public function __construct(private readonly string $queueType, array $data = []) - { - parent::__construct($this->queueType, $data); - } - - /** - * @throws InvalidArgumentException if $element is of the wrong type - */ - public function addFirst(mixed $element): bool - { - if ($this->checkType($this->getType(), $element) === false) { - throw new InvalidArgumentException( - 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($element), - ); - } - - array_unshift($this->data, $element); - - return true; - } - - /** - * @throws InvalidArgumentException if $element is of the wrong type - */ - public function addLast(mixed $element): bool - { - return $this->add($element); - } - - public function offerFirst(mixed $element): bool - { - try { - return $this->addFirst($element); - } catch (InvalidArgumentException) { - return false; - } - } - - public function offerLast(mixed $element): bool - { - return $this->offer($element); - } - - /** - * @return T the first element in this queue. - * - * @throws NoSuchElementException if the queue is empty - */ - public function removeFirst(): mixed - { - return $this->remove(); - } - - /** - * @return T the last element in this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function removeLast(): mixed - { - return $this->pollLast() ?? throw new NoSuchElementException( - 'Can\'t return element from Queue. Queue is empty.', - ); - } - - /** - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function pollFirst(): mixed - { - return $this->poll(); - } - - /** - * @return T | null the tail of this queue, or `null` if this queue is empty. - */ - public function pollLast(): mixed - { - return array_pop($this->data); - } - - /** - * @return T the head of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function firstElement(): mixed - { - return $this->element(); - } - - /** - * @return T the tail of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function lastElement(): mixed - { - return $this->peekLast() ?? throw new NoSuchElementException( - 'Can\'t return element from Queue. Queue is empty.', - ); - } - - /** - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function peekFirst(): mixed - { - return $this->peek(); - } - - /** - * @return T | null the tail of this queue, or `null` if this queue is empty. - */ - public function peekLast(): mixed - { - $lastIndex = array_key_last($this->data); - - if ($lastIndex === null) { - return null; - } - - return $this->data[$lastIndex]; - } -} diff --git a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php deleted file mode 100644 index 15cc0e97..00000000 --- a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php +++ /dev/null @@ -1,313 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Ramsey\Collection\Exception\NoSuchElementException; -use RuntimeException; - -/** - * A linear collection that supports element insertion and removal at both ends. - * - * Most `DoubleEndedQueueInterface` implementations place no fixed limits on the - * number of elements they may contain, but this interface supports - * capacity-restricted double-ended queues as well as those with no fixed size - * limit. - * - * This interface defines methods to access the elements at both ends of the - * double-ended queue. Methods are provided to insert, remove, and examine the - * element. Each of these methods exists in two forms: one throws an exception - * if the operation fails, the other returns a special value (either `null` or - * `false`, depending on the operation). The latter form of the insert operation - * is designed specifically for use with capacity-restricted implementations; in - * most implementations, insert operations cannot fail. - * - * The twelve methods described above are summarized in the following table: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
          Summary of DoubleEndedQueueInterface methods
          First Element (Head)Last Element (Tail)
          Throws exceptionSpecial valueThrows exceptionSpecial value
          InsertaddFirst()offerFirst()addLast()offerLast()
          RemoveremoveFirst()pollFirst()removeLast()pollLast()
          ExaminefirstElement()peekFirst()lastElement()peekLast()
          - * - * This interface extends the `QueueInterface`. When a double-ended queue is - * used as a queue, FIFO (first-in-first-out) behavior results. Elements are - * added at the end of the double-ended queue and removed from the beginning. - * The methods inherited from the `QueueInterface` are precisely equivalent to - * `DoubleEndedQueueInterface` methods as indicated in the following table: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
          Comparison of QueueInterface and DoubleEndedQueueInterface methods
          QueueInterface MethodDoubleEndedQueueInterface Method
          add()addLast()
          offer()offerLast()
          remove()removeFirst()
          poll()pollFirst()
          element()firstElement()
          peek()peekFirst()
          - * - * Double-ended queues can also be used as LIFO (last-in-first-out) stacks. When - * a double-ended queue is used as a stack, elements are pushed and popped from - * the beginning of the double-ended queue. Stack concepts are precisely - * equivalent to `DoubleEndedQueueInterface` methods as indicated in the table - * below: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
          Comparison of stack concepts and DoubleEndedQueueInterface methods
          Stack conceptDoubleEndedQueueInterface Method
          pushaddFirst()
          popremoveFirst()
          peekpeekFirst()
          - * - * Note that the `peek()` method works equally well when a double-ended queue is - * used as a queue or a stack; in either case, elements are drawn from the - * beginning of the double-ended queue. - * - * While `DoubleEndedQueueInterface` implementations are not strictly required - * to prohibit the insertion of `null` elements, they are strongly encouraged to - * do so. Users of any `DoubleEndedQueueInterface` implementations that do allow - * `null` elements are strongly encouraged *not* to take advantage of the - * ability to insert nulls. This is so because `null` is used as a special - * return value by various methods to indicated that the double-ended queue is - * empty. - * - * @template T - * @extends QueueInterface - */ -interface DoubleEndedQueueInterface extends QueueInterface -{ - /** - * Inserts the specified element at the front of this queue if it is - * possible to do so immediately without violating capacity restrictions. - * - * When using a capacity-restricted double-ended queue, it is generally - * preferable to use the `offerFirst()` method. - * - * @param T $element The element to add to the front of this queue. - * - * @return bool `true` if this queue changed as a result of the call. - * - * @throws RuntimeException if a queue refuses to add a particular element - * for any reason other than that it already contains the element. - * Implementations should use a more-specific exception that extends - * `\RuntimeException`. - */ - public function addFirst(mixed $element): bool; - - /** - * Inserts the specified element at the end of this queue if it is possible - * to do so immediately without violating capacity restrictions. - * - * When using a capacity-restricted double-ended queue, it is generally - * preferable to use the `offerLast()` method. - * - * This method is equivalent to `add()`. - * - * @param T $element The element to add to the end of this queue. - * - * @return bool `true` if this queue changed as a result of the call. - * - * @throws RuntimeException if a queue refuses to add a particular element - * for any reason other than that it already contains the element. - * Implementations should use a more-specific exception that extends - * `\RuntimeException`. - */ - public function addLast(mixed $element): bool; - - /** - * Inserts the specified element at the front of this queue if it is - * possible to do so immediately without violating capacity restrictions. - * - * When using a capacity-restricted queue, this method is generally - * preferable to `addFirst()`, which can fail to insert an element only by - * throwing an exception. - * - * @param T $element The element to add to the front of this queue. - * - * @return bool `true` if the element was added to this queue, else `false`. - */ - public function offerFirst(mixed $element): bool; - - /** - * Inserts the specified element at the end of this queue if it is possible - * to do so immediately without violating capacity restrictions. - * - * When using a capacity-restricted queue, this method is generally - * preferable to `addLast()` which can fail to insert an element only by - * throwing an exception. - * - * @param T $element The element to add to the end of this queue. - * - * @return bool `true` if the element was added to this queue, else `false`. - */ - public function offerLast(mixed $element): bool; - - /** - * Retrieves and removes the head of this queue. - * - * This method differs from `pollFirst()` only in that it throws an - * exception if this queue is empty. - * - * @return T the first element in this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function removeFirst(): mixed; - - /** - * Retrieves and removes the tail of this queue. - * - * This method differs from `pollLast()` only in that it throws an exception - * if this queue is empty. - * - * @return T the last element in this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function removeLast(): mixed; - - /** - * Retrieves and removes the head of this queue, or returns `null` if this - * queue is empty. - * - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function pollFirst(): mixed; - - /** - * Retrieves and removes the tail of this queue, or returns `null` if this - * queue is empty. - * - * @return T | null the tail of this queue, or `null` if this queue is empty. - */ - public function pollLast(): mixed; - - /** - * Retrieves, but does not remove, the head of this queue. - * - * This method differs from `peekFirst()` only in that it throws an - * exception if this queue is empty. - * - * @return T the head of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function firstElement(): mixed; - - /** - * Retrieves, but does not remove, the tail of this queue. - * - * This method differs from `peekLast()` only in that it throws an exception - * if this queue is empty. - * - * @return T the tail of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function lastElement(): mixed; - - /** - * Retrieves, but does not remove, the head of this queue, or returns `null` - * if this queue is empty. - * - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function peekFirst(): mixed; - - /** - * Retrieves, but does not remove, the tail of this queue, or returns `null` - * if this queue is empty. - * - * @return T | null the tail of this queue, or `null` if this queue is empty. - */ - public function peekLast(): mixed; -} diff --git a/vendor/ramsey/collection/src/Exception/CollectionException.php b/vendor/ramsey/collection/src/Exception/CollectionException.php deleted file mode 100644 index 4aa92bed..00000000 --- a/vendor/ramsey/collection/src/Exception/CollectionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use Throwable; - -interface CollectionException extends Throwable -{ -} diff --git a/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php b/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php deleted file mode 100644 index 42f5be2d..00000000 --- a/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use RuntimeException; - -/** - * Thrown when attempting to operate on collections of differing types. - */ -class CollectionMismatchException extends RuntimeException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php b/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 7b41b4a7..00000000 --- a/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use InvalidArgumentException as PhpInvalidArgumentException; - -/** - * Thrown to indicate an argument is not of the expected type. - */ -class InvalidArgumentException extends PhpInvalidArgumentException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php b/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php deleted file mode 100644 index a53be14a..00000000 --- a/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use RuntimeException; - -/** - * Thrown when attempting to evaluate a property, method, or array key - * that doesn't exist on an element or cannot otherwise be evaluated in the - * current context. - */ -class InvalidPropertyOrMethod extends RuntimeException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/Exception/NoSuchElementException.php b/vendor/ramsey/collection/src/Exception/NoSuchElementException.php deleted file mode 100644 index cd98f0c0..00000000 --- a/vendor/ramsey/collection/src/Exception/NoSuchElementException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use RuntimeException; - -/** - * Thrown when attempting to access an element that does not exist. - */ -class NoSuchElementException extends RuntimeException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php b/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php deleted file mode 100644 index c75294e5..00000000 --- a/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use OutOfBoundsException as PhpOutOfBoundsException; - -/** - * Thrown when attempting to access an element out of the range of the collection. - */ -class OutOfBoundsException extends PhpOutOfBoundsException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php b/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php deleted file mode 100644 index d074f45f..00000000 --- a/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Exception; - -use RuntimeException; - -/** - * Thrown to indicate that the requested operation is not supported. - */ -class UnsupportedOperationException extends RuntimeException implements CollectionException -{ -} diff --git a/vendor/ramsey/collection/src/GenericArray.php b/vendor/ramsey/collection/src/GenericArray.php deleted file mode 100644 index 2b079aa5..00000000 --- a/vendor/ramsey/collection/src/GenericArray.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -/** - * `GenericArray` represents a standard array object. - * - * @extends AbstractArray - */ -class GenericArray extends AbstractArray -{ -} diff --git a/vendor/ramsey/collection/src/Map/AbstractMap.php b/vendor/ramsey/collection/src/Map/AbstractMap.php deleted file mode 100644 index 92f23e60..00000000 --- a/vendor/ramsey/collection/src/Map/AbstractMap.php +++ /dev/null @@ -1,205 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -use Ramsey\Collection\AbstractArray; -use Ramsey\Collection\Exception\InvalidArgumentException; -use Traversable; - -use function array_key_exists; -use function array_keys; -use function in_array; -use function var_export; - -/** - * This class provides a basic implementation of `MapInterface`, to minimize the - * effort required to implement this interface. - * - * @template K of array-key - * @template T - * @extends AbstractArray - * @implements MapInterface - */ -abstract class AbstractMap extends AbstractArray implements MapInterface -{ - /** - * @param array $data The initial items to add to this map. - */ - public function __construct(array $data = []) - { - parent::__construct($data); - } - - /** - * @return Traversable - */ - public function getIterator(): Traversable - { - return parent::getIterator(); - } - - /** - * @param K $offset The offset to set - * @param T $value The value to set at the given offset. - * - * @inheritDoc - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if ($offset === null) { - throw new InvalidArgumentException( - 'Map elements are key/value pairs; a key must be provided for ' - . 'value ' . var_export($value, true), - ); - } - - $this->data[$offset] = $value; - } - - public function containsKey(int | string $key): bool - { - return array_key_exists($key, $this->data); - } - - public function containsValue(mixed $value): bool - { - return in_array($value, $this->data, true); - } - - /** - * @inheritDoc - */ - public function keys(): array - { - /** @var list */ - return array_keys($this->data); - } - - /** - * @param K $key The key to return from the map. - * @param T | null $defaultValue The default value to use if `$key` is not found. - * - * @return T | null the value or `null` if the key could not be found. - */ - public function get(int | string $key, mixed $defaultValue = null): mixed - { - return $this[$key] ?? $defaultValue; - } - - /** - * @param K $key The key to put or replace in the map. - * @param T $value The value to store at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function put(int | string $key, mixed $value): mixed - { - $previousValue = $this->get($key); - $this[$key] = $value; - - return $previousValue; - } - - /** - * @param K $key The key to put in the map. - * @param T $value The value to store at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function putIfAbsent(int | string $key, mixed $value): mixed - { - $currentValue = $this->get($key); - - if ($currentValue === null) { - $this[$key] = $value; - } - - return $currentValue; - } - - /** - * @param K $key The key to remove from the map. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function remove(int | string $key): mixed - { - $previousValue = $this->get($key); - unset($this[$key]); - - return $previousValue; - } - - public function removeIf(int | string $key, mixed $value): bool - { - if ($this->get($key) === $value) { - unset($this[$key]); - - return true; - } - - return false; - } - - /** - * @param K $key The key to replace. - * @param T $value The value to set at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function replace(int | string $key, mixed $value): mixed - { - $currentValue = $this->get($key); - - if ($this->containsKey($key)) { - $this[$key] = $value; - } - - return $currentValue; - } - - public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool - { - if ($this->get($key) === $oldValue) { - $this[$key] = $newValue; - - return true; - } - - return false; - } - - /** - * @return array - */ - public function __serialize(): array - { - /** @var array */ - return parent::__serialize(); - } - - /** - * @return array - */ - public function toArray(): array - { - /** @var array */ - return parent::toArray(); - } -} diff --git a/vendor/ramsey/collection/src/Map/AbstractTypedMap.php b/vendor/ramsey/collection/src/Map/AbstractTypedMap.php deleted file mode 100644 index 8b6cc048..00000000 --- a/vendor/ramsey/collection/src/Map/AbstractTypedMap.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Tool\TypeTrait; -use Ramsey\Collection\Tool\ValueToStringTrait; - -/** - * This class provides a basic implementation of `TypedMapInterface`, to - * minimize the effort required to implement this interface. - * - * @template K of array-key - * @template T - * @extends AbstractMap - * @implements TypedMapInterface - */ -abstract class AbstractTypedMap extends AbstractMap implements TypedMapInterface -{ - use TypeTrait; - use ValueToStringTrait; - - /** - * @param K $offset - * @param T $value - * - * @inheritDoc - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if ($this->checkType($this->getKeyType(), $offset) === false) { - throw new InvalidArgumentException( - 'Key must be of type ' . $this->getKeyType() . '; key is ' - . $this->toolValueToString($offset), - ); - } - - if ($this->checkType($this->getValueType(), $value) === false) { - throw new InvalidArgumentException( - 'Value must be of type ' . $this->getValueType() . '; value is ' - . $this->toolValueToString($value), - ); - } - - parent::offsetSet($offset, $value); - } -} diff --git a/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php b/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php deleted file mode 100644 index 34e4e853..00000000 --- a/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -/** - * `AssociativeArrayMap` represents a standard associative array object. - * - * @extends AbstractMap - */ -class AssociativeArrayMap extends AbstractMap -{ -} diff --git a/vendor/ramsey/collection/src/Map/MapInterface.php b/vendor/ramsey/collection/src/Map/MapInterface.php deleted file mode 100644 index 22ba1bdd..00000000 --- a/vendor/ramsey/collection/src/Map/MapInterface.php +++ /dev/null @@ -1,142 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -use Ramsey\Collection\ArrayInterface; - -/** - * An object that maps keys to values. - * - * A map cannot contain duplicate keys; each key can map to at most one value. - * - * @template K of array-key - * @template T - * @extends ArrayInterface - */ -interface MapInterface extends ArrayInterface -{ - /** - * Returns `true` if this map contains a mapping for the specified key. - * - * @param K $key The key to check in the map. - */ - public function containsKey(int | string $key): bool; - - /** - * Returns `true` if this map maps one or more keys to the specified value. - * - * This performs a strict type check on the value. - * - * @param T $value The value to check in the map. - */ - public function containsValue(mixed $value): bool; - - /** - * Return an array of the keys contained in this map. - * - * @return list - */ - public function keys(): array; - - /** - * Returns the value to which the specified key is mapped, `null` if this - * map contains no mapping for the key, or (optionally) `$defaultValue` if - * this map contains no mapping for the key. - * - * @param K $key The key to return from the map. - * @param T | null $defaultValue The default value to use if `$key` is not found. - * - * @return T | null the value or `null` if the key could not be found. - */ - public function get(int | string $key, mixed $defaultValue = null): mixed; - - /** - * Associates the specified value with the specified key in this map. - * - * If the map previously contained a mapping for the key, the old value is - * replaced by the specified value. - * - * @param K $key The key to put or replace in the map. - * @param T $value The value to store at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function put(int | string $key, mixed $value): mixed; - - /** - * Associates the specified value with the specified key in this map only if - * it is not already set. - * - * If there is already a value associated with `$key`, this returns that - * value without replacing it. - * - * @param K $key The key to put in the map. - * @param T $value The value to store at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function putIfAbsent(int | string $key, mixed $value): mixed; - - /** - * Removes the mapping for a key from this map if it is present. - * - * @param K $key The key to remove from the map. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function remove(int | string $key): mixed; - - /** - * Removes the entry for the specified key only if it is currently mapped to - * the specified value. - * - * This performs a strict type check on the value. - * - * @param K $key The key to remove from the map. - * @param T $value The value to match. - * - * @return bool true if the value was removed. - */ - public function removeIf(int | string $key, mixed $value): bool; - - /** - * Replaces the entry for the specified key only if it is currently mapped - * to some value. - * - * @param K $key The key to replace. - * @param T $value The value to set at `$key`. - * - * @return T | null the previous value associated with key, or `null` if - * there was no mapping for `$key`. - */ - public function replace(int | string $key, mixed $value): mixed; - - /** - * Replaces the entry for the specified key only if currently mapped to the - * specified value. - * - * This performs a strict type check on the value. - * - * @param K $key The key to remove from the map. - * @param T $oldValue The value to match. - * @param T $newValue The value to use as a replacement. - * - * @return bool true if the value was replaced. - */ - public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool; -} diff --git a/vendor/ramsey/collection/src/Map/NamedParameterMap.php b/vendor/ramsey/collection/src/Map/NamedParameterMap.php deleted file mode 100644 index f948e476..00000000 --- a/vendor/ramsey/collection/src/Map/NamedParameterMap.php +++ /dev/null @@ -1,110 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Tool\TypeTrait; -use Ramsey\Collection\Tool\ValueToStringTrait; - -use function array_combine; -use function array_key_exists; -use function is_int; - -/** - * `NamedParameterMap` represents a mapping of values to a set of named keys - * that may optionally be typed - * - * @extends AbstractMap - */ -class NamedParameterMap extends AbstractMap -{ - use TypeTrait; - use ValueToStringTrait; - - /** - * Named parameters defined for this map. - * - * @var array - */ - private readonly array $namedParameters; - - /** - * Constructs a new `NamedParameterMap`. - * - * @param array $namedParameters The named parameters defined for this map. - * @param array $data An initial set of data to set on this map. - */ - public function __construct(array $namedParameters, array $data = []) - { - $this->namedParameters = $this->filterNamedParameters($namedParameters); - parent::__construct($data); - } - - /** - * Returns named parameters set for this `NamedParameterMap`. - * - * @return array - */ - public function getNamedParameters(): array - { - return $this->namedParameters; - } - - public function offsetSet(mixed $offset, mixed $value): void - { - if (!array_key_exists($offset, $this->namedParameters)) { - throw new InvalidArgumentException( - 'Attempting to set value for unconfigured parameter \'' - . $this->toolValueToString($offset) . '\'', - ); - } - - if ($this->checkType($this->namedParameters[$offset], $value) === false) { - throw new InvalidArgumentException( - 'Value for \'' . $offset . '\' must be of type ' - . $this->namedParameters[$offset] . '; value is ' - . $this->toolValueToString($value), - ); - } - - $this->data[$offset] = $value; - } - - /** - * Given an array of named parameters, constructs a proper mapping of - * named parameters to types. - * - * @param array $namedParameters The named parameters to filter. - * - * @return array - */ - protected function filterNamedParameters(array $namedParameters): array - { - $names = []; - $types = []; - - foreach ($namedParameters as $key => $value) { - if (is_int($key)) { - $names[] = $value; - $types[] = 'mixed'; - } else { - $names[] = $key; - $types[] = $value; - } - } - - return array_combine($names, $types) ?: []; - } -} diff --git a/vendor/ramsey/collection/src/Map/TypedMap.php b/vendor/ramsey/collection/src/Map/TypedMap.php deleted file mode 100644 index 4a090c81..00000000 --- a/vendor/ramsey/collection/src/Map/TypedMap.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -/** - * A `TypedMap` represents a map of elements where key and value are typed. - * - * Each element is identified by a key with defined type and a value of defined - * type. The keys of the map must be unique. The values on the map can be - * repeated but each with its own different key. - * - * The most common case is to use a string type key, but it's not limited to - * this type of keys. - * - * This is a direct implementation of `TypedMapInterface`, provided for the sake - * of convenience. - * - * Example usage: - * - * ``` - * $map = new TypedMap('string', Foo::class); - * $map['x'] = new Foo(); - * foreach ($map as $key => $value) { - * // do something with $key, it will be a Foo::class - * } - * - * // this will throw an exception since key must be string - * $map[10] = new Foo(); - * - * // this will throw an exception since value must be a Foo - * $map['bar'] = 'bar'; - * - * // initialize map with contents - * $map = new TypedMap('string', Foo::class, [ - * new Foo(), new Foo(), new Foo() - * ]); - * ``` - * - * It is preferable to subclass `AbstractTypedMap` to create your own typed map - * implementation: - * - * ``` - * class FooTypedMap extends AbstractTypedMap - * { - * public function getKeyType() - * { - * return 'int'; - * } - * - * public function getValueType() - * { - * return Foo::class; - * } - * } - * ``` - * - * … but you also may use the `TypedMap` class: - * - * ``` - * class FooTypedMap extends TypedMap - * { - * public function __constructor(array $data = []) - * { - * parent::__construct('int', Foo::class, $data); - * } - * } - * ``` - * - * @template K of array-key - * @template T - * @extends AbstractTypedMap - */ -class TypedMap extends AbstractTypedMap -{ - /** - * Constructs a map object of the specified key and value types, - * optionally with the specified data. - * - * @param string $keyType The data type of the map's keys. - * @param string $valueType The data type of the map's values. - * @param array $data The initial data to set for this map. - */ - public function __construct( - private readonly string $keyType, - private readonly string $valueType, - array $data = [], - ) { - parent::__construct($data); - } - - public function getKeyType(): string - { - return $this->keyType; - } - - public function getValueType(): string - { - return $this->valueType; - } -} diff --git a/vendor/ramsey/collection/src/Map/TypedMapInterface.php b/vendor/ramsey/collection/src/Map/TypedMapInterface.php deleted file mode 100644 index 5a44f064..00000000 --- a/vendor/ramsey/collection/src/Map/TypedMapInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Map; - -/** - * A `TypedMapInterface` represents a map of elements where key and value are - * typed. - * - * @template K of array-key - * @template T - * @extends MapInterface - */ -interface TypedMapInterface extends MapInterface -{ - /** - * Return the type used on the key. - */ - public function getKeyType(): string; - - /** - * Return the type forced on the values. - */ - public function getValueType(): string; -} diff --git a/vendor/ramsey/collection/src/Queue.php b/vendor/ramsey/collection/src/Queue.php deleted file mode 100644 index 0f5b3374..00000000 --- a/vendor/ramsey/collection/src/Queue.php +++ /dev/null @@ -1,148 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Ramsey\Collection\Exception\InvalidArgumentException; -use Ramsey\Collection\Exception\NoSuchElementException; -use Ramsey\Collection\Tool\TypeTrait; -use Ramsey\Collection\Tool\ValueToStringTrait; - -use function array_key_first; - -/** - * This class provides a basic implementation of `QueueInterface`, to minimize - * the effort required to implement this interface. - * - * @template T - * @extends AbstractArray - * @implements QueueInterface - */ -class Queue extends AbstractArray implements QueueInterface -{ - use TypeTrait; - use ValueToStringTrait; - - /** - * Constructs a queue object of the specified type, optionally with the - * specified data. - * - * @param string $queueType The type or class name associated with this queue. - * @param array $data The initial items to store in the queue. - */ - public function __construct(private readonly string $queueType, array $data = []) - { - parent::__construct($data); - } - - /** - * {@inheritDoc} - * - * Since arbitrary offsets may not be manipulated in a queue, this method - * serves only to fulfill the `ArrayAccess` interface requirements. It is - * invoked by other operations when adding values to the queue. - * - * @throws InvalidArgumentException if $value is of the wrong type. - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if ($this->checkType($this->getType(), $value) === false) { - throw new InvalidArgumentException( - 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($value), - ); - } - - $this->data[] = $value; - } - - /** - * @throws InvalidArgumentException if $value is of the wrong type. - */ - public function add(mixed $element): bool - { - $this[] = $element; - - return true; - } - - /** - * @return T - * - * @throws NoSuchElementException if this queue is empty. - */ - public function element(): mixed - { - return $this->peek() ?? throw new NoSuchElementException( - 'Can\'t return element from Queue. Queue is empty.', - ); - } - - public function offer(mixed $element): bool - { - try { - return $this->add($element); - } catch (InvalidArgumentException) { - return false; - } - } - - /** - * @return T | null - */ - public function peek(): mixed - { - $index = array_key_first($this->data); - - if ($index === null) { - return null; - } - - return $this[$index]; - } - - /** - * @return T | null - */ - public function poll(): mixed - { - $index = array_key_first($this->data); - - if ($index === null) { - return null; - } - - $head = $this[$index]; - unset($this[$index]); - - return $head; - } - - /** - * @return T - * - * @throws NoSuchElementException if this queue is empty. - */ - public function remove(): mixed - { - return $this->poll() ?? throw new NoSuchElementException( - 'Can\'t return element from Queue. Queue is empty.', - ); - } - - public function getType(): string - { - return $this->queueType; - } -} diff --git a/vendor/ramsey/collection/src/QueueInterface.php b/vendor/ramsey/collection/src/QueueInterface.php deleted file mode 100644 index f29ce43a..00000000 --- a/vendor/ramsey/collection/src/QueueInterface.php +++ /dev/null @@ -1,202 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -use Ramsey\Collection\Exception\NoSuchElementException; -use RuntimeException; - -/** - * A queue is a collection in which the entities in the collection are kept in - * order. - * - * The principal operations on the queue are the addition of entities to the end - * (tail), also known as *enqueue*, and removal of entities from the front - * (head), also known as *dequeue*. This makes the queue a first-in-first-out - * (FIFO) data structure. - * - * Besides basic array operations, queues provide additional insertion, - * extraction, and inspection operations. Each of these methods exists in two - * forms: one throws an exception if the operation fails, the other returns a - * special value (either `null` or `false`, depending on the operation). The - * latter form of the insert operation is designed specifically for use with - * capacity-restricted `QueueInterface` implementations; in most - * implementations, insert operations cannot fail. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
          Summary of QueueInterface methods
          Throws exceptionReturns special value
          Insertadd()offer()
          Removeremove()poll()
          Examineelement()peek()
          - * - * Queues typically, but do not necessarily, order elements in a FIFO - * (first-in-first-out) manner. Among the exceptions are priority queues, which - * order elements according to a supplied comparator, or the elements' natural - * ordering, and LIFO queues (or stacks) which order the elements LIFO - * (last-in-first-out). Whatever the ordering used, the head of the queue is - * that element which would be removed by a call to remove() or poll(). In a - * FIFO queue, all new elements are inserted at the tail of the queue. Other - * kinds of queues may use different placement rules. Every `QueueInterface` - * implementation must specify its ordering properties. - * - * The `offer()` method inserts an element if possible, otherwise returning - * `false`. This differs from the `add()` method, which can fail to add an - * element only by throwing an unchecked exception. The `offer()` method is - * designed for use when failure is a normal, rather than exceptional - * occurrence, for example, in fixed-capacity (or "bounded") queues. - * - * The `remove()` and `poll()` methods remove and return the head of the queue. - * Exactly which element is removed from the queue is a function of the queue's - * ordering policy, which differs from implementation to implementation. The - * `remove()` and `poll()` methods differ only in their behavior when the queue - * is empty: the `remove()` method throws an exception, while the `poll()` - * method returns `null`. - * - * The `element()` and `peek()` methods return, but do not remove, the head of - * the queue. - * - * `QueueInterface` implementations generally do not allow insertion of `null` - * elements, although some implementations do not prohibit insertion of `null`. - * Even in the implementations that permit it, `null` should not be inserted - * into a queue, as `null` is also used as a special return value by the - * `poll()` method to indicate that the queue contains no elements. - * - * @template T - * @extends ArrayInterface - */ -interface QueueInterface extends ArrayInterface -{ - /** - * Ensures that this queue contains the specified element (optional - * operation). - * - * Returns `true` if this queue changed as a result of the call. (Returns - * `false` if this queue does not permit duplicates and already contains the - * specified element.) - * - * Queues that support this operation may place limitations on what elements - * may be added to this queue. In particular, some queues will refuse to add - * `null` elements, and others will impose restrictions on the type of - * elements that may be added. Queue classes should clearly specify in their - * documentation any restrictions on what elements may be added. - * - * If a queue refuses to add a particular element for any reason other than - * that it already contains the element, it must throw an exception (rather - * than returning `false`). This preserves the invariant that a queue always - * contains the specified element after this call returns. - * - * @see self::offer() - * - * @param T $element The element to add to this queue. - * - * @return bool `true` if this queue changed as a result of the call. - * - * @throws RuntimeException if a queue refuses to add a particular element - * for any reason other than that it already contains the element. - * Implementations should use a more-specific exception that extends - * `\RuntimeException`. - */ - public function add(mixed $element): bool; - - /** - * Retrieves, but does not remove, the head of this queue. - * - * This method differs from `peek()` only in that it throws an exception if - * this queue is empty. - * - * @see self::peek() - * - * @return T the head of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function element(): mixed; - - /** - * Inserts the specified element into this queue if it is possible to do so - * immediately without violating capacity restrictions. - * - * When using a capacity-restricted queue, this method is generally - * preferable to `add()`, which can fail to insert an element only by - * throwing an exception. - * - * @see self::add() - * - * @param T $element The element to add to this queue. - * - * @return bool `true` if the element was added to this queue, else `false`. - */ - public function offer(mixed $element): bool; - - /** - * Retrieves, but does not remove, the head of this queue, or returns `null` - * if this queue is empty. - * - * @see self::element() - * - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function peek(): mixed; - - /** - * Retrieves and removes the head of this queue, or returns `null` - * if this queue is empty. - * - * @see self::remove() - * - * @return T | null the head of this queue, or `null` if this queue is empty. - */ - public function poll(): mixed; - - /** - * Retrieves and removes the head of this queue. - * - * This method differs from `poll()` only in that it throws an exception if - * this queue is empty. - * - * @see self::poll() - * - * @return T the head of this queue. - * - * @throws NoSuchElementException if this queue is empty. - */ - public function remove(): mixed; - - /** - * Returns the type associated with this queue. - */ - public function getType(): string; -} diff --git a/vendor/ramsey/collection/src/Set.php b/vendor/ramsey/collection/src/Set.php deleted file mode 100644 index d60f2487..00000000 --- a/vendor/ramsey/collection/src/Set.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -/** - * A set is a collection that contains no duplicate elements. - * - * Great care must be exercised if mutable objects are used as set elements. - * The behavior of a set is not specified if the value of an object is changed - * in a manner that affects equals comparisons while the object is an element in - * the set. - * - * Example usage: - * - * ``` - * $foo = new \My\Foo(); - * $set = new Set(\My\Foo::class); - * - * $set->add($foo); // returns TRUE, the element doesn't exist - * $set->add($foo); // returns FALSE, the element already exists - * - * $bar = new \My\Foo(); - * $set->add($bar); // returns TRUE, $bar !== $foo - * ``` - * - * @template T - * @extends AbstractSet - */ -class Set extends AbstractSet -{ - /** - * Constructs a set object of the specified type, optionally with the - * specified data. - * - * @param string $setType The type or class name associated with this set. - * @param array $data The initial items to store in the set. - */ - public function __construct(private readonly string $setType, array $data = []) - { - parent::__construct($data); - } - - public function getType(): string - { - return $this->setType; - } -} diff --git a/vendor/ramsey/collection/src/Sort.php b/vendor/ramsey/collection/src/Sort.php deleted file mode 100644 index 0c3c1921..00000000 --- a/vendor/ramsey/collection/src/Sort.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection; - -/** - * Collection sorting - */ -enum Sort: string -{ - /** - * Sort items in a collection in ascending order. - */ - case Ascending = 'asc'; - - /** - * Sort items in a collection in descending order. - */ - case Descending = 'desc'; -} diff --git a/vendor/ramsey/collection/src/Tool/TypeTrait.php b/vendor/ramsey/collection/src/Tool/TypeTrait.php deleted file mode 100644 index ac51b7f1..00000000 --- a/vendor/ramsey/collection/src/Tool/TypeTrait.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Tool; - -use function is_array; -use function is_bool; -use function is_callable; -use function is_float; -use function is_int; -use function is_numeric; -use function is_object; -use function is_resource; -use function is_scalar; -use function is_string; - -/** - * Provides functionality to check values for specific types. - */ -trait TypeTrait -{ - /** - * Returns `true` if value is of the specified type. - * - * @param string $type The type to check the value against. - * @param mixed $value The value to check. - */ - protected function checkType(string $type, mixed $value): bool - { - return match ($type) { - 'array' => is_array($value), - 'bool', 'boolean' => is_bool($value), - 'callable' => is_callable($value), - 'float', 'double' => is_float($value), - 'int', 'integer' => is_int($value), - 'null' => $value === null, - 'numeric' => is_numeric($value), - 'object' => is_object($value), - 'resource' => is_resource($value), - 'scalar' => is_scalar($value), - 'string' => is_string($value), - 'mixed' => true, - default => $value instanceof $type, - }; - } -} diff --git a/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php b/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php deleted file mode 100644 index bbe27b44..00000000 --- a/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Tool; - -use Ramsey\Collection\Exception\InvalidPropertyOrMethod; -use Ramsey\Collection\Exception\UnsupportedOperationException; -use ReflectionProperty; - -use function is_array; -use function is_object; -use function method_exists; -use function property_exists; -use function sprintf; - -/** - * Provides functionality to extract the value of a property or method from an object. - */ -trait ValueExtractorTrait -{ - /** - * Returns the type associated with this collection. - */ - abstract public function getType(): string; - - /** - * Extracts the value of the given property, method, or array key from the - * element. - * - * If `$propertyOrMethod` is `null`, we return the element as-is. - * - * @param mixed $element The element to extract the value from. - * @param string | null $propertyOrMethod The property or method for which the - * value should be extracted. - * - * @return mixed the value extracted from the specified property, method, - * or array key, or the element itself. - * - * @throws InvalidPropertyOrMethod - * @throws UnsupportedOperationException - */ - protected function extractValue(mixed $element, ?string $propertyOrMethod): mixed - { - if ($propertyOrMethod === null) { - return $element; - } - - if (!is_object($element) && !is_array($element)) { - throw new UnsupportedOperationException(sprintf( - 'The collection type "%s" does not support the $propertyOrMethod parameter', - $this->getType(), - )); - } - - if (is_array($element)) { - return $element[$propertyOrMethod] ?? throw new InvalidPropertyOrMethod(sprintf( - 'Key or index "%s" not found in collection elements', - $propertyOrMethod, - )); - } - - if (property_exists($element, $propertyOrMethod) && method_exists($element, $propertyOrMethod)) { - $reflectionProperty = new ReflectionProperty($element, $propertyOrMethod); - if ($reflectionProperty->isPublic()) { - return $element->$propertyOrMethod; - } - - return $element->{$propertyOrMethod}(); - } - - if (property_exists($element, $propertyOrMethod)) { - return $element->$propertyOrMethod; - } - - if (method_exists($element, $propertyOrMethod)) { - return $element->{$propertyOrMethod}(); - } - - if (isset($element->$propertyOrMethod)) { - return $element->$propertyOrMethod; - } - - throw new InvalidPropertyOrMethod(sprintf( - 'Method or property "%s" not defined in %s', - $propertyOrMethod, - $element::class, - )); - } -} diff --git a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php deleted file mode 100644 index 40c78032..00000000 --- a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Collection\Tool; - -use DateTimeInterface; - -use function assert; -use function get_resource_type; -use function is_array; -use function is_bool; -use function is_callable; -use function is_object; -use function is_resource; -use function is_scalar; - -/** - * Provides functionality to express a value as string - */ -trait ValueToStringTrait -{ - /** - * Returns a string representation of the value. - * - * - null value: `'NULL'` - * - boolean: `'TRUE'`, `'FALSE'` - * - array: `'Array'` - * - scalar: converted-value - * - resource: `'(type resource #number)'` - * - object with `__toString()`: result of `__toString()` - * - object DateTime: ISO 8601 date - * - object: `'(className Object)'` - * - anonymous function: same as object - * - * @param mixed $value the value to return as a string. - */ - protected function toolValueToString(mixed $value): string - { - // null - if ($value === null) { - return 'NULL'; - } - - // boolean constants - if (is_bool($value)) { - return $value ? 'TRUE' : 'FALSE'; - } - - // array - if (is_array($value)) { - return 'Array'; - } - - // scalar types (integer, float, string) - if (is_scalar($value)) { - return (string) $value; - } - - // resource - if (is_resource($value)) { - return '(' . get_resource_type($value) . ' resource #' . (int) $value . ')'; - } - - // From here, $value should be an object. - assert(is_object($value)); - - // __toString() is implemented - if (is_callable([$value, '__toString'])) { - /** @var string */ - return $value->__toString(); - } - - // object of type \DateTime - if ($value instanceof DateTimeInterface) { - return $value->format('c'); - } - - // unknown type - return '(' . $value::class . ' Object)'; - } -} diff --git a/vendor/ramsey/uuid/LICENSE b/vendor/ramsey/uuid/LICENSE deleted file mode 100644 index 22b4d0de..00000000 --- a/vendor/ramsey/uuid/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2025 Ben Ramsey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/ramsey/uuid/README.md b/vendor/ramsey/uuid/README.md deleted file mode 100644 index eab624da..00000000 --- a/vendor/ramsey/uuid/README.md +++ /dev/null @@ -1,82 +0,0 @@ -

          ramsey/uuid

          - -

          - A PHP library for generating and working with UUIDs. -

          - -

          - Source Code - Download Package - PHP Programming Language - Read License - Build Status - Codecov Code Coverage -

          - -ramsey/uuid is a PHP library for generating and working with universally unique -identifiers (UUIDs). - -This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). -By participating in this project and its community, you are expected to -uphold this code. - -Much inspiration for this library came from the [Java][javauuid] and -[Python][pyuuid] UUID libraries. - -## Installation - -The preferred method of installation is via [Composer][]. Run the following -command to install the package and add it as a requirement to your project's -`composer.json`: - -```bash -composer require ramsey/uuid -``` - -## Upgrading to Version 4 - -See the documentation for a thorough upgrade guide: - -* [Upgrading ramsey/uuid Version 3 to 4](https://uuid.ramsey.dev/en/stable/upgrading/3-to-4.html) - -## Documentation - -Please see for documentation, tips, examples, and -frequently asked questions. - -## Contributing - -Contributions are welcome! To contribute, please familiarize yourself with -[CONTRIBUTING.md](CONTRIBUTING.md). - -## Coordinated Disclosure - -Keeping user information safe and secure is a top priority, and we welcome the -contribution of external security researchers. If you believe you've found a -security issue in software that is maintained in this repository, please read -[SECURITY.md][] for instructions on submitting a vulnerability report. - -## ramsey/uuid for Enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of ramsey/uuid and thousands of other packages are working with -Tidelift to deliver commercial support and maintenance for the open source -packages you use to build your applications. Save time, reduce risk, and improve -code health, while paying the maintainers of the exact packages you use. -[Learn more.](https://tidelift.com/subscription/pkg/packagist-ramsey-uuid?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Copyright and License - -The ramsey/uuid library is copyright © [Ben Ramsey](https://benramsey.com/) and -licensed for use under the MIT License (MIT). Please see [LICENSE][] for more -information. - -[rfc4122]: http://tools.ietf.org/html/rfc4122 -[conduct]: https://github.com/ramsey/uuid/blob/4.x/CODE_OF_CONDUCT.md -[javauuid]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html -[pyuuid]: http://docs.python.org/3/library/uuid.html -[composer]: http://getcomposer.org/ -[contributing.md]: https://github.com/ramsey/uuid/blob/4.x/CONTRIBUTING.md -[security.md]: https://github.com/ramsey/uuid/blob/4.x/SECURITY.md -[license]: https://github.com/ramsey/uuid/blob/4.x/LICENSE diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json deleted file mode 100644 index b34d9b10..00000000 --- a/vendor/ramsey/uuid/composer.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "name": "ramsey/uuid", - "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", - "license": "MIT", - "type": "library", - "keywords": [ - "uuid", - "identifier", - "guid" - ], - "require": { - "php": "^8.0", - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", - "ramsey/collection": "^1.2 || ^2.0" - }, - "require-dev": { - "captainhook/captainhook": "^5.25", - "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "ergebnis/composer-normalize": "^2.47", - "mockery/mockery": "^1.6", - "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.6", - "php-mock/php-mock-mockery": "^1.5", - "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpbench/phpbench": "^1.2.14", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-mockery": "^2.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^9.6", - "slevomat/coding-standard": "^8.18", - "squizlabs/php_codesniffer": "^3.13" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "suggest": { - "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", - "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "minimum-stability": "dev", - "prefer-stable": true, - "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "autoload-dev": { - "psr-4": { - "Ramsey\\Uuid\\Benchmark\\": "tests/benchmark/", - "Ramsey\\Uuid\\StaticAnalysis\\": "tests/static-analysis/", - "Ramsey\\Uuid\\Test\\": "tests/" - } - }, - "config": { - "allow-plugins": { - "captainhook/plugin-composer": true, - "dealerdirect/phpcodesniffer-composer-installer": true, - "ergebnis/composer-normalize": true, - "phpstan/extension-installer": true - }, - "sort-packages": true - }, - "extra": { - "captainhook": { - "force-install": true - } - }, - "scripts": { - "dev:analyze": "@dev:analyze:phpstan", - "dev:analyze:phpstan": "phpstan analyse --ansi --memory-limit 1G", - "dev:bench": "@php -d 'error_reporting=24575' vendor/bin/phpbench run", - "dev:build:clean": "git clean -fX build/", - "dev:lint": [ - "@dev:lint:syntax", - "@dev:lint:style" - ], - "dev:lint:fix": "phpcbf --cache=build/cache/phpcs.cache", - "dev:lint:style": "phpcs --cache=build/cache/phpcs.cache --colors", - "dev:lint:syntax": "parallel-lint --colors src/ tests/", - "dev:test": [ - "@dev:lint", - "@dev:bench", - "@dev:analyze", - "@dev:test:unit" - ], - "dev:test:coverage:ci": "@php -d 'xdebug.mode=coverage' vendor/bin/phpunit --colors=always --coverage-text --coverage-clover build/coverage/clover.xml --coverage-cobertura build/coverage/cobertura.xml --coverage-crap4j build/coverage/crap4j.xml --coverage-xml build/coverage/coverage-xml --log-junit build/junit.xml", - "dev:test:coverage:html": "@php -d 'xdebug.mode=coverage' vendor/bin/phpunit --colors=always --coverage-html build/coverage/coverage-html/", - "dev:test:unit": "phpunit --colors=always", - "test": "@dev:test" - }, - "scripts-descriptions": { - "dev:analyze": "Runs all static analysis checks.", - "dev:analyze:phpstan": "Runs the PHPStan static analyzer.", - "dev:bench": "Runs PHPBench benchmark tests.", - "dev:build:clean": "Cleans the build/ directory.", - "dev:lint": "Runs all linting checks.", - "dev:lint:fix": "Auto-fixes coding standards issues, if possible.", - "dev:lint:style": "Checks for coding standards issues.", - "dev:lint:syntax": "Checks for syntax errors.", - "dev:test": "Runs linting, static analysis, and unit tests.", - "dev:test:coverage:ci": "Runs unit tests and generates CI coverage reports.", - "dev:test:coverage:html": "Runs unit tests and generates HTML coverage report.", - "dev:test:unit": "Runs unit tests.", - "test": "Runs linting, static analysis, and unit tests." - } -} diff --git a/vendor/ramsey/uuid/src/BinaryUtils.php b/vendor/ramsey/uuid/src/BinaryUtils.php deleted file mode 100644 index d8aac2e9..00000000 --- a/vendor/ramsey/uuid/src/BinaryUtils.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -/** - * Provides binary math utilities - */ -class BinaryUtils -{ - /** - * Applies the variant field to the 16-bit clock sequence - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - * - * @param int $clockSeq The 16-bit clock sequence value before the variant is applied - * - * @return int The 16-bit clock sequence multiplexed with the UUID variant - * - * @pure - */ - public static function applyVariant(int $clockSeq): int - { - return ($clockSeq & 0x3fff) | 0x8000; - } - - /** - * Applies the version field to the 16-bit `time_hi_and_version` field - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - * - * @param int $timeHi The value of the 16-bit `time_hi_and_version` field before the version is applied - * @param int $version The version to apply to the `time_hi` field - * - * @return int The 16-bit time_hi field of the timestamp multiplexed with the UUID version number - * - * @pure - */ - public static function applyVersion(int $timeHi, int $version): int - { - return ($timeHi & 0x0fff) | ($version << 12); - } -} diff --git a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php b/vendor/ramsey/uuid/src/Builder/BuilderCollection.php deleted file mode 100644 index 2b2e0a2d..00000000 --- a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Builder; - -use Ramsey\Collection\AbstractCollection; -use Ramsey\Uuid\Converter\Number\GenericNumberConverter; -use Ramsey\Uuid\Converter\Time\GenericTimeConverter; -use Ramsey\Uuid\Converter\Time\PhpTimeConverter; -use Ramsey\Uuid\Guid\GuidBuilder; -use Ramsey\Uuid\Math\BrickMathCalculator; -use Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; -use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; -use Traversable; - -/** - * A collection of UuidBuilderInterface objects - * - * @deprecated this class has been deprecated and will be removed in 5.0.0. The use-case for this class comes from a - * pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced at runtime: - * that is no longer necessary, now that you can safely verify your code to be correct, and use more generic types - * like `iterable` instead. - * - * @extends AbstractCollection - */ -class BuilderCollection extends AbstractCollection -{ - public function getType(): string - { - return UuidBuilderInterface::class; - } - - public function getIterator(): Traversable - { - return parent::getIterator(); - } - - /** - * Re-constructs the object from its serialized form - * - * @param string $serialized The serialized PHP string to unserialize into a UuidInterface instance - */ - public function unserialize($serialized): void - { - /** @var array $data */ - $data = unserialize($serialized, [ - 'allowed_classes' => [ - BrickMathCalculator::class, - GenericNumberConverter::class, - GenericTimeConverter::class, - GuidBuilder::class, - NonstandardUuidBuilder::class, - PhpTimeConverter::class, - Rfc4122UuidBuilder::class, - ], - ]); - - $this->data = array_filter( - $data, - function ($unserialized): bool { - /** @phpstan-ignore instanceof.alwaysTrue */ - return $unserialized instanceof UuidBuilderInterface; - }, - ); - } -} diff --git a/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php b/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php deleted file mode 100644 index 3d62159b..00000000 --- a/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Builder; - -use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; - -/** - * @deprecated Please transition to {@see Rfc4122UuidBuilder}. - * - * @immutable - */ -class DefaultUuidBuilder extends Rfc4122UuidBuilder -{ -} diff --git a/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php b/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php deleted file mode 100644 index 1554a976..00000000 --- a/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Builder; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\Time\DegradedTimeConverter; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\DegradedUuid; -use Ramsey\Uuid\Rfc4122\Fields as Rfc4122Fields; -use Ramsey\Uuid\UuidInterface; - -/** - * @deprecated DegradedUuid instances are no longer necessary to support 32-bit systems. Please transition to {@see DefaultUuidBuilder}. - * - * @immutable - */ -class DegradedUuidBuilder implements UuidBuilderInterface -{ - private TimeConverterInterface $timeConverter; - - /** - * @param NumberConverterInterface $numberConverter The number converter to use when constructing the DegradedUuid - * @param TimeConverterInterface|null $timeConverter The time converter to use for converting timestamps extracted - * from a UUID to Unix timestamps - */ - public function __construct( - private NumberConverterInterface $numberConverter, - ?TimeConverterInterface $timeConverter = null - ) { - $this->timeConverter = $timeConverter ?: new DegradedTimeConverter(); - } - - /** - * Builds and returns a DegradedUuid - * - * @param CodecInterface $codec The codec to use for building this DegradedUuid instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return DegradedUuid The DegradedUuidBuild returns an instance of Ramsey\Uuid\DegradedUuid - * - * @phpstan-impure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface - { - return new DegradedUuid(new Rfc4122Fields($bytes), $this->numberConverter, $codec, $this->timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php deleted file mode 100644 index e40f778b..00000000 --- a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Builder; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Exception\BuilderNotFoundException; -use Ramsey\Uuid\Exception\UnableToBuildUuidException; -use Ramsey\Uuid\UuidInterface; - -/** - * FallbackBuilder builds a UUID by stepping through a list of UUID builders until a UUID can be constructed without exceptions - * - * @immutable - */ -class FallbackBuilder implements UuidBuilderInterface -{ - /** - * @param iterable $builders An array of UUID builders - */ - public function __construct(private iterable $builders) - { - } - - /** - * Builds and returns a UuidInterface instance using the first builder that succeeds - * - * @param CodecInterface $codec The codec to use for building this instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return UuidInterface an instance of a UUID object - * - * @pure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface - { - $lastBuilderException = null; - - foreach ($this->builders as $builder) { - try { - return $builder->build($codec, $bytes); - } catch (UnableToBuildUuidException $exception) { - $lastBuilderException = $exception; - - continue; - } - } - - throw new BuilderNotFoundException( - 'Could not find a suitable builder for the provided codec and fields', - 0, - $lastBuilderException, - ); - } -} diff --git a/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php b/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php deleted file mode 100644 index c409878a..00000000 --- a/vendor/ramsey/uuid/src/Builder/UuidBuilderInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Builder; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\UuidInterface; - -/** - * A UUID builder builds instances of UuidInterface - * - * @immutable - */ -interface UuidBuilderInterface -{ - /** - * Builds and returns a UuidInterface - * - * @param CodecInterface $codec The codec to use for building this UuidInterface instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return UuidInterface Implementations may choose to return more specific instances of UUIDs that implement UuidInterface - * - * @pure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface; -} diff --git a/vendor/ramsey/uuid/src/Codec/CodecInterface.php b/vendor/ramsey/uuid/src/Codec/CodecInterface.php deleted file mode 100644 index b1e554ea..00000000 --- a/vendor/ramsey/uuid/src/Codec/CodecInterface.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -use Ramsey\Uuid\UuidInterface; - -/** - * A codec encodes and decodes a UUID according to defined rules - * - * @immutable - */ -interface CodecInterface -{ - /** - * Returns a hexadecimal string representation of a UuidInterface - * - * @param UuidInterface $uuid The UUID for which to create a hexadecimal string representation - * - * @return non-empty-string Hexadecimal string representation of a UUID - * - * @pure - */ - public function encode(UuidInterface $uuid): string; - - /** - * Returns a binary string representation of a UuidInterface - * - * @param UuidInterface $uuid The UUID for which to create a binary string representation - * - * @return non-empty-string Binary string representation of a UUID - * - * @pure - */ - public function encodeBinary(UuidInterface $uuid): string; - - /** - * Returns a UuidInterface derived from a hexadecimal string representation - * - * @param string $encodedUuid The hexadecimal string representation to convert into a UuidInterface instance - * - * @return UuidInterface An instance of a UUID decoded from a hexadecimal string representation - * - * @pure - */ - public function decode(string $encodedUuid): UuidInterface; - - /** - * Returns a UuidInterface derived from a binary string representation - * - * @param string $bytes The binary string representation to convert into a UuidInterface instance - * - * @return UuidInterface An instance of a UUID decoded from a binary string representation - * - * @pure - */ - public function decodeBytes(string $bytes): UuidInterface; -} diff --git a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php b/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php deleted file mode 100644 index a1bd58a2..00000000 --- a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -use Ramsey\Uuid\Guid\Guid; -use Ramsey\Uuid\UuidInterface; - -use function bin2hex; -use function sprintf; -use function substr; - -/** - * GuidStringCodec encodes and decodes globally unique identifiers (GUID) - * - * @see Guid - * - * @immutable - */ -class GuidStringCodec extends StringCodec -{ - public function encode(UuidInterface $uuid): string - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $hex = bin2hex($uuid->getFields()->getBytes()); - - /** @var non-empty-string */ - return sprintf( - '%02s%02s%02s%02s-%02s%02s-%02s%02s-%04s-%012s', - substr($hex, 6, 2), - substr($hex, 4, 2), - substr($hex, 2, 2), - substr($hex, 0, 2), - substr($hex, 10, 2), - substr($hex, 8, 2), - substr($hex, 14, 2), - substr($hex, 12, 2), - substr($hex, 16, 4), - substr($hex, 20), - ); - } - - public function decode(string $encodedUuid): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $bytes = $this->getBytes($encodedUuid); - - /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall */ - return $this->getBuilder()->build($this, $this->swapBytes($bytes)); - } - - public function decodeBytes(string $bytes): UuidInterface - { - // Call parent::decode() to preserve the correct byte order. - return parent::decode(bin2hex($bytes)); - } - - /** - * Swaps bytes according to the GUID rules - */ - private function swapBytes(string $bytes): string - { - return $bytes[3] . $bytes[2] . $bytes[1] . $bytes[0] - . $bytes[5] . $bytes[4] . $bytes[7] . $bytes[6] - . substr($bytes, 8); - } -} diff --git a/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php b/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php deleted file mode 100644 index ea533d99..00000000 --- a/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php +++ /dev/null @@ -1,101 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; -use Ramsey\Uuid\UuidInterface; - -use function strlen; -use function substr; - -/** - * OrderedTimeCodec encodes and decodes a UUID, optimizing the byte order for more efficient storage - * - * For binary representations of version 1 UUID, this codec may be used to reorganize the time fields, making the UUID - * closer to sequential when storing the bytes. According to Percona, this optimization can improve database INSERT and - * SELECT statements using the UUID column as a key. - * - * The string representation of the UUID will remain unchanged. Only the binary representation is reordered. - * - * PLEASE NOTE: Binary representations of UUIDs encoded with this codec must be decoded with this codec. Decoding using - * another codec can result in malformed UUIDs. - * - * @deprecated Please migrate to {@link https://uuid.ramsey.dev/en/stable/rfc4122/version6.html Version 6, reordered time-based UUIDs}. - * - * @link https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/ Storing UUID Values in MySQL - * - * @immutable - */ -class OrderedTimeCodec extends StringCodec -{ - /** - * Returns a binary string representation of a UUID, with the timestamp fields rearranged for optimized storage - * - * @return non-empty-string - */ - public function encodeBinary(UuidInterface $uuid): string - { - if ( - /** @phpstan-ignore possiblyImpure.methodCall */ - !($uuid->getFields() instanceof Rfc4122FieldsInterface) - /** @phpstan-ignore possiblyImpure.methodCall */ - || $uuid->getFields()->getVersion() !== Uuid::UUID_TYPE_TIME - ) { - throw new InvalidArgumentException('Expected version 1 (time-based) UUID'); - } - - /** @phpstan-ignore possiblyImpure.methodCall */ - $bytes = $uuid->getFields()->getBytes(); - - return $bytes[6] . $bytes[7] . $bytes[4] . $bytes[5] - . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3] - . substr($bytes, 8); - } - - /** - * Returns a UuidInterface derived from an ordered-time binary string representation - * - * @throws InvalidArgumentException if $bytes is an invalid length - * - * @inheritDoc - */ - public function decodeBytes(string $bytes): UuidInterface - { - if (strlen($bytes) !== 16) { - throw new InvalidArgumentException('$bytes string should contain 16 characters.'); - } - - // Rearrange the bytes to their original order. - $rearrangedBytes = $bytes[4] . $bytes[5] . $bytes[6] . $bytes[7] - . $bytes[2] . $bytes[3] . $bytes[0] . $bytes[1] - . substr($bytes, 8); - - $uuid = parent::decodeBytes($rearrangedBytes); - - /** @phpstan-ignore possiblyImpure.methodCall */ - $fields = $uuid->getFields(); - - if (!$fields instanceof Rfc4122FieldsInterface || $fields->getVersion() !== Uuid::UUID_TYPE_TIME) { - throw new UnsupportedOperationException( - 'Attempting to decode a non-time-based UUID using OrderedTimeCodec', - ); - } - - return $uuid; - } -} diff --git a/vendor/ramsey/uuid/src/Codec/StringCodec.php b/vendor/ramsey/uuid/src/Codec/StringCodec.php deleted file mode 100644 index 55f4f8b2..00000000 --- a/vendor/ramsey/uuid/src/Codec/StringCodec.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Exception\InvalidUuidStringException; -use Ramsey\Uuid\Uuid; -use Ramsey\Uuid\UuidInterface; - -use function bin2hex; -use function hex2bin; -use function implode; -use function sprintf; -use function str_replace; -use function strlen; -use function substr; - -/** - * StringCodec encodes and decodes RFC 9562 (formerly RFC 4122) UUIDs - * - * @immutable - */ -class StringCodec implements CodecInterface -{ - /** - * Constructs a StringCodec - * - * @param UuidBuilderInterface $builder The builder to use when encoding UUIDs - */ - public function __construct(private UuidBuilderInterface $builder) - { - } - - public function encode(UuidInterface $uuid): string - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $hex = bin2hex($uuid->getFields()->getBytes()); - - /** @var non-empty-string */ - return sprintf( - '%08s-%04s-%04s-%04s-%012s', - substr($hex, 0, 8), - substr($hex, 8, 4), - substr($hex, 12, 4), - substr($hex, 16, 4), - substr($hex, 20), - ); - } - - /** - * @return non-empty-string - */ - public function encodeBinary(UuidInterface $uuid): string - { - /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ - return $uuid->getFields()->getBytes(); - } - - /** - * @throws InvalidUuidStringException - * - * @inheritDoc - */ - public function decode(string $encodedUuid): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return $this->builder->build($this, $this->getBytes($encodedUuid)); - } - - public function decodeBytes(string $bytes): UuidInterface - { - if (strlen($bytes) !== 16) { - throw new InvalidArgumentException('$bytes string should contain 16 characters.'); - } - - return $this->builder->build($this, $bytes); - } - - /** - * Returns the UUID builder - */ - protected function getBuilder(): UuidBuilderInterface - { - return $this->builder; - } - - /** - * Returns a byte string of the UUID - */ - protected function getBytes(string $encodedUuid): string - { - $parsedUuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}', '-'], '', $encodedUuid); - - $components = [ - substr($parsedUuid, 0, 8), - substr($parsedUuid, 8, 4), - substr($parsedUuid, 12, 4), - substr($parsedUuid, 16, 4), - substr($parsedUuid, 20), - ]; - - if (!Uuid::isValid(implode('-', $components))) { - throw new InvalidUuidStringException('Invalid UUID string: ' . $encodedUuid); - } - - return (string) hex2bin($parsedUuid); - } -} diff --git a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php deleted file mode 100644 index e7c8efd4..00000000 --- a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -use Ramsey\Uuid\Exception\InvalidUuidStringException; -use Ramsey\Uuid\UuidInterface; - -use function bin2hex; -use function sprintf; -use function substr; -use function substr_replace; - -/** - * TimestampFirstCombCodec encodes and decodes COMBs, with the timestamp as the first 48 bits - * - * In contrast with the TimestampLastCombCodec, the TimestampFirstCombCodec adds the timestamp to the first 48 bits of - * the COMB. To generate a timestamp-first COMB, set the TimestampFirstCombCodec as the codec, along with the - * CombGenerator as the random generator. - * - * ``` - * $factory = new UuidFactory(); - * - * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); - * - * $factory->setRandomGenerator(new CombGenerator( - * $factory->getRandomGenerator(), - * $factory->getNumberConverter(), - * )); - * - * $timestampFirstComb = $factory->uuid4(); - * ``` - * - * @deprecated Please migrate to {@link https://uuid.ramsey.dev/en/stable/rfc4122/version7.html Version 7, Unix Epoch Time UUIDs}. - * - * @link https://web.archive.org/web/20240118030355/https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys - * - * @immutable - */ -class TimestampFirstCombCodec extends StringCodec -{ - /** - * @return non-empty-string - */ - public function encode(UuidInterface $uuid): string - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $bytes = $this->swapBytes($uuid->getFields()->getBytes()); - - return sprintf( - '%08s-%04s-%04s-%04s-%012s', - bin2hex(substr($bytes, 0, 4)), - bin2hex(substr($bytes, 4, 2)), - bin2hex(substr($bytes, 6, 2)), - bin2hex(substr($bytes, 8, 2)), - bin2hex(substr($bytes, 10)) - ); - } - - /** - * @return non-empty-string - */ - public function encodeBinary(UuidInterface $uuid): string - { - /** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */ - return $this->swapBytes($uuid->getFields()->getBytes()); - } - - /** - * @throws InvalidUuidStringException - * - * @inheritDoc - */ - public function decode(string $encodedUuid): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $bytes = $this->getBytes($encodedUuid); - - /** @phpstan-ignore possiblyImpure.methodCall */ - return $this->getBuilder()->build($this, $this->swapBytes($bytes)); - } - - public function decodeBytes(string $bytes): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return $this->getBuilder()->build($this, $this->swapBytes($bytes)); - } - - /** - * Swaps bytes according to the timestamp-first COMB rules - * - * @pure - */ - private function swapBytes(string $bytes): string - { - $first48Bits = substr($bytes, 0, 6); - $last48Bits = substr($bytes, -6); - - return substr_replace(substr_replace($bytes, $last48Bits, 0, 6), $first48Bits, -6); - } -} diff --git a/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php b/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php deleted file mode 100644 index 14d10b66..00000000 --- a/vendor/ramsey/uuid/src/Codec/TimestampLastCombCodec.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Codec; - -/** - * TimestampLastCombCodec encodes and decodes COMBs, with the timestamp as the last 48 bits - * - * The CombGenerator when used with the StringCodec (and, by proxy, the TimestampLastCombCodec) adds the timestamp to - * the last 48 bits of the COMB. The TimestampLastCombCodec is provided for the sake of consistency. In practice, it is - * identical to the standard StringCodec, but it may be used with the CombGenerator for additional context when reading - * code. - * - * Consider the following code. By default, the codec used by UuidFactory is the StringCodec, but here, we explicitly - * set the TimestampLastCombCodec. It is redundant, but it is clear that we intend this COMB to be generated with the - * timestamp appearing at the end. - * - * ``` - * $factory = new UuidFactory(); - * - * $factory->setCodec(new TimestampLastCombCodec($factory->getUuidBuilder())); - * - * $factory->setRandomGenerator(new CombGenerator( - * $factory->getRandomGenerator(), - * $factory->getNumberConverter(), - * )); - * - * $timestampLastComb = $factory->uuid4(); - * ``` - * - * @deprecated Please use {@see StringCodec} instead. - * - * @immutable - */ -class TimestampLastCombCodec extends StringCodec -{ -} diff --git a/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php b/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php deleted file mode 100644 index ff4e1cca..00000000 --- a/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Number; - -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Math\BrickMathCalculator; - -/** - * Previously used to integrate moontoast/math as a bignum arithmetic library, BigNumberConverter is deprecated in favor - * of GenericNumberConverter - * - * @deprecated Please transition to {@see GenericNumberConverter}. - * - * @immutable - */ -class BigNumberConverter implements NumberConverterInterface -{ - private NumberConverterInterface $converter; - - public function __construct() - { - $this->converter = new GenericNumberConverter(new BrickMathCalculator()); - } - - /** - * @pure - */ - public function fromHex(string $hex): string - { - return $this->converter->fromHex($hex); - } - - /** - * @pure - */ - public function toHex(string $number): string - { - return $this->converter->toHex($number); - } -} diff --git a/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php b/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php deleted file mode 100644 index 54e4e8c0..00000000 --- a/vendor/ramsey/uuid/src/Converter/Number/DegradedNumberConverter.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Number; - -/** - * @deprecated DegradedNumberConverter is no longer necessary for converting numbers on 32-bit systems. Please - * transition to {@see GenericNumberConverter}. - * - * @immutable - */ -class DegradedNumberConverter extends BigNumberConverter -{ -} diff --git a/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php b/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php deleted file mode 100644 index 86968abd..00000000 --- a/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Number; - -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Math\CalculatorInterface; -use Ramsey\Uuid\Type\Integer as IntegerObject; - -/** - * GenericNumberConverter uses the provided calculator to convert decimal numbers to and from hexadecimal values - * - * @immutable - */ -class GenericNumberConverter implements NumberConverterInterface -{ - public function __construct(private CalculatorInterface $calculator) - { - } - - /** - * @pure - */ - public function fromHex(string $hex): string - { - return $this->calculator->fromBase($hex, 16)->toString(); - } - - /** - * @pure - */ - public function toHex(string $number): string - { - /** @phpstan-ignore return.type, possiblyImpure.new */ - return $this->calculator->toBase(new IntegerObject($number), 16); - } -} diff --git a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php b/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php deleted file mode 100644 index 63eca6c4..00000000 --- a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter; - -/** - * A number converter converts UUIDs from hexadecimal characters into representations of integers and vice versa - * - * @immutable - */ -interface NumberConverterInterface -{ - /** - * Converts a hexadecimal number into a string integer representation of the number - * - * The integer representation returned is a string representation of the integer to accommodate unsigned integers - * that are greater than `PHP_INT_MAX`. - * - * @param string $hex The hexadecimal string representation to convert - * - * @return numeric-string String representation of an integer - * - * @pure - */ - public function fromHex(string $hex): string; - - /** - * Converts a string integer representation into a hexadecimal string representation of the number - * - * @param string $number A string integer representation to convert; this must be a numeric string to accommodate - * unsigned integers that are greater than `PHP_INT_MAX`. - * - * @return non-empty-string Hexadecimal string - * - * @pure - */ - public function toHex(string $number): string; -} diff --git a/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php deleted file mode 100644 index 7112495c..00000000 --- a/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Time; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Math\BrickMathCalculator; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Time; - -/** - * Previously used to integrate moontoast/math as a bignum arithmetic library, BigNumberTimeConverter is deprecated in - * favor of GenericTimeConverter - * - * @deprecated Please transition to {@see GenericTimeConverter}. - * - * @immutable - */ -class BigNumberTimeConverter implements TimeConverterInterface -{ - private TimeConverterInterface $converter; - - public function __construct() - { - $this->converter = new GenericTimeConverter(new BrickMathCalculator()); - } - - public function calculateTime(string $seconds, string $microseconds): Hexadecimal - { - return $this->converter->calculateTime($seconds, $microseconds); - } - - public function convertTime(Hexadecimal $uuidTimestamp): Time - { - return $this->converter->convertTime($uuidTimestamp); - } -} diff --git a/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php deleted file mode 100644 index 47204509..00000000 --- a/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Time; - -/** - * @deprecated DegradedTimeConverter is no longer necessary for converting time on 32-bit systems. Please transition to - * {@see GenericTimeConverter}. - * - * @immutable - */ -class DegradedTimeConverter extends BigNumberTimeConverter -{ -} diff --git a/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php deleted file mode 100644 index 1079e885..00000000 --- a/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Time; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Math\CalculatorInterface; -use Ramsey\Uuid\Math\RoundingMode; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\Time; - -use function explode; -use function str_pad; - -use const STR_PAD_LEFT; - -/** - * GenericTimeConverter uses the provided calculator to calculate and convert time values - * - * @immutable - */ -class GenericTimeConverter implements TimeConverterInterface -{ - /** - * The number of 100-nanosecond intervals from the Gregorian calendar epoch to the Unix epoch. - */ - private const GREGORIAN_TO_UNIX_INTERVALS = '122192928000000000'; - - /** - * The number of 100-nanosecond intervals in one second. - */ - private const SECOND_INTERVALS = '10000000'; - - /** - * The number of 100-nanosecond intervals in one microsecond. - */ - private const MICROSECOND_INTERVALS = '10'; - - public function __construct(private CalculatorInterface $calculator) - { - } - - public function calculateTime(string $seconds, string $microseconds): Hexadecimal - { - /** @phpstan-ignore possiblyImpure.new */ - $timestamp = new Time($seconds, $microseconds); - - // Convert the seconds into a count of 100-nanosecond intervals. - $sec = $this->calculator->multiply( - $timestamp->getSeconds(), - new IntegerObject(self::SECOND_INTERVALS), /** @phpstan-ignore possiblyImpure.new */ - ); - - // Convert the microseconds into a count of 100-nanosecond intervals. - $usec = $this->calculator->multiply( - $timestamp->getMicroseconds(), - new IntegerObject(self::MICROSECOND_INTERVALS), /** @phpstan-ignore possiblyImpure.new */ - ); - - /** - * Combine the intervals of seconds and microseconds and add the count of 100-nanosecond intervals from the - * Gregorian calendar epoch to the Unix epoch. This gives us the correct count of 100-nanosecond intervals since - * the Gregorian calendar epoch for the given seconds and microseconds. - * - * @var IntegerObject $uuidTime - * @phpstan-ignore possiblyImpure.new - */ - $uuidTime = $this->calculator->add($sec, $usec, new IntegerObject(self::GREGORIAN_TO_UNIX_INTERVALS)); - - /** - * PHPStan considers CalculatorInterface::toHexadecimal, Hexadecimal:toString impure. - * - * @phpstan-ignore possiblyImpure.new - */ - return new Hexadecimal(str_pad($this->calculator->toHexadecimal($uuidTime)->toString(), 16, '0', STR_PAD_LEFT)); - } - - public function convertTime(Hexadecimal $uuidTimestamp): Time - { - // From the total, subtract the number of 100-nanosecond intervals from the Gregorian calendar epoch to the Unix - // epoch. This gives us the number of 100-nanosecond intervals from the Unix epoch, which also includes the microtime. - $epochNanoseconds = $this->calculator->subtract( - $this->calculator->toInteger($uuidTimestamp), - new IntegerObject(self::GREGORIAN_TO_UNIX_INTERVALS), /** @phpstan-ignore possiblyImpure.new */ - ); - - // Convert the 100-nanosecond intervals into seconds and microseconds. - $unixTimestamp = $this->calculator->divide( - RoundingMode::HALF_UP, - 6, - $epochNanoseconds, - new IntegerObject(self::SECOND_INTERVALS), /** @phpstan-ignore possiblyImpure.new */ - ); - - $split = explode('.', (string) $unixTimestamp, 2); - - /** @phpstan-ignore possiblyImpure.new */ - return new Time($split[0], $split[1] ?? 0); - } -} diff --git a/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php deleted file mode 100644 index 67dbf887..00000000 --- a/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php +++ /dev/null @@ -1,170 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Time; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Math\BrickMathCalculator; -use Ramsey\Uuid\Math\CalculatorInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\Time; - -use function count; -use function dechex; -use function explode; -use function is_float; -use function is_int; -use function str_pad; -use function strlen; -use function substr; - -use const STR_PAD_LEFT; -use const STR_PAD_RIGHT; - -/** - * PhpTimeConverter uses built-in PHP functions and standard math operations available to the PHP programming language - * to provide facilities for converting parts of time into representations that may be used in UUIDs - * - * @immutable - */ -class PhpTimeConverter implements TimeConverterInterface -{ - /** - * The number of 100-nanosecond intervals from the Gregorian calendar epoch to the Unix epoch. - */ - private const GREGORIAN_TO_UNIX_INTERVALS = 0x01b21dd213814000; - - /** - * The number of 100-nanosecond intervals in one second. - */ - private const SECOND_INTERVALS = 10_000_000; - - /** - * The number of 100-nanosecond intervals in one microsecond. - */ - private const MICROSECOND_INTERVALS = 10; - - private int $phpPrecision; - private CalculatorInterface $calculator; - private TimeConverterInterface $fallbackConverter; - - public function __construct( - ?CalculatorInterface $calculator = null, - ?TimeConverterInterface $fallbackConverter = null, - ) { - if ($calculator === null) { - $calculator = new BrickMathCalculator(); - } - - if ($fallbackConverter === null) { - $fallbackConverter = new GenericTimeConverter($calculator); - } - - $this->calculator = $calculator; - $this->fallbackConverter = $fallbackConverter; - $this->phpPrecision = (int) ini_get('precision'); - } - - public function calculateTime(string $seconds, string $microseconds): Hexadecimal - { - $seconds = new IntegerObject($seconds); /** @phpstan-ignore possiblyImpure.new */ - $microseconds = new IntegerObject($microseconds); /** @phpstan-ignore possiblyImpure.new */ - - // Calculate the count of 100-nanosecond intervals since the Gregorian calendar epoch - // for the given seconds and microseconds. - $uuidTime = ((int) $seconds->toString() * self::SECOND_INTERVALS) - + ((int) $microseconds->toString() * self::MICROSECOND_INTERVALS) - + self::GREGORIAN_TO_UNIX_INTERVALS; - - // Check to see whether we've overflowed the max/min integer size. - // If so, we will default to a different time converter. - // @phpstan-ignore function.alreadyNarrowedType (the integer value might have overflowed) - if (!is_int($uuidTime)) { - return $this->fallbackConverter->calculateTime( - $seconds->toString(), - $microseconds->toString(), - ); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new Hexadecimal( - str_pad(dechex($uuidTime), 16, '0', STR_PAD_LEFT) - ); - } - - public function convertTime(Hexadecimal $uuidTimestamp): Time - { - $timestamp = $this->calculator->toInteger($uuidTimestamp); - - // Convert the 100-nanosecond intervals into seconds and microseconds. - $splitTime = $this->splitTime( - ((int) $timestamp->toString() - self::GREGORIAN_TO_UNIX_INTERVALS) / self::SECOND_INTERVALS, - ); - - if (count($splitTime) === 0) { - return $this->fallbackConverter->convertTime($uuidTimestamp); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new Time($splitTime['sec'], $splitTime['usec']); - } - - /** - * @param float | int $time The time to split into seconds and microseconds - * - * @return string[] - * - * @pure - */ - private function splitTime(float | int $time): array - { - $split = explode('.', (string) $time, 2); - - // If the $time value is a float but $split only has 1 element, then the float math was rounded up to the next - // second, so we want to return an empty array to allow use of the fallback converter. - if (is_float($time) && count($split) === 1) { - return []; - } - - if (count($split) === 1) { - return ['sec' => $split[0], 'usec' => '0']; - } - - // If the microseconds are less than six characters AND the length of the number is greater than or equal to the - // PHP precision, then it's possible that we lost some precision for the microseconds. Return an empty array so - // that we can choose to use the fallback converter. - if (strlen($split[1]) < 6 && strlen((string) $time) >= $this->phpPrecision) { - return []; - } - - $microseconds = $split[1]; - - // Ensure the microseconds are no longer than 6 digits. If they are, - // truncate the number to the first 6 digits and round up, if needed. - if (strlen($microseconds) > 6) { - $roundingDigit = (int) substr($microseconds, 6, 1); - $microseconds = (int) substr($microseconds, 0, 6); - - if ($roundingDigit >= 5) { - $microseconds++; - } - } - - return [ - 'sec' => $split[0], - 'usec' => str_pad((string) $microseconds, 6, '0', STR_PAD_RIGHT), - ]; - } -} diff --git a/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php deleted file mode 100644 index 4bd41255..00000000 --- a/vendor/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php +++ /dev/null @@ -1,92 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter\Time; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Math\CalculatorInterface; -use Ramsey\Uuid\Math\RoundingMode; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\Time; - -use function explode; -use function str_pad; - -use const STR_PAD_LEFT; - -/** - * UnixTimeConverter converts Unix Epoch timestamps to/from hexadecimal values consisting of milliseconds elapsed since - * the Unix Epoch - * - * @immutable - */ -class UnixTimeConverter implements TimeConverterInterface -{ - private const MILLISECONDS = 1000; - - public function __construct(private CalculatorInterface $calculator) - { - } - - public function calculateTime(string $seconds, string $microseconds): Hexadecimal - { - /** @phpstan-ignore possiblyImpure.new */ - $timestamp = new Time($seconds, $microseconds); - - // Convert the seconds into milliseconds. - $sec = $this->calculator->multiply( - $timestamp->getSeconds(), - new IntegerObject(self::MILLISECONDS) /** @phpstan-ignore possiblyImpure.new */ - ); - - // Convert the microseconds into milliseconds; the scale is zero because we need to discard the fractional part. - $usec = $this->calculator->divide( - RoundingMode::DOWN, // Always round down to stay in the previous millisecond. - 0, - $timestamp->getMicroseconds(), - new IntegerObject(self::MILLISECONDS), /** @phpstan-ignore possiblyImpure.new */ - ); - - /** @var IntegerObject $unixTime */ - $unixTime = $this->calculator->add($sec, $usec); - - /** @phpstan-ignore possiblyImpure.new */ - return new Hexadecimal( - str_pad( - $this->calculator->toHexadecimal($unixTime)->toString(), - 12, - '0', - STR_PAD_LEFT - ), - ); - } - - public function convertTime(Hexadecimal $uuidTimestamp): Time - { - $milliseconds = $this->calculator->toInteger($uuidTimestamp); - - $unixTimestamp = $this->calculator->divide( - RoundingMode::HALF_UP, - 6, - $milliseconds, - new IntegerObject(self::MILLISECONDS), /** @phpstan-ignore possiblyImpure.new */ - ); - - $split = explode('.', (string) $unixTimestamp, 2); - - /** @phpstan-ignore possiblyImpure.new */ - return new Time($split[0], $split[1] ?? '0'); - } -} diff --git a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php b/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php deleted file mode 100644 index 065e3b7d..00000000 --- a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Converter; - -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Time; - -/** - * A time converter converts timestamps into representations that may be used in UUIDs - * - * @immutable - */ -interface TimeConverterInterface -{ - /** - * Uses the provided seconds and micro-seconds to calculate the count of 100-nanosecond intervals since - * UTC 00:00:00.00, 15 October 1582, for RFC 9562 (formerly RFC 4122) variant UUIDs - * - * @link https://www.rfc-editor.org/rfc/rfc9562#appendix-A RFC 9562, Appendix A. Test Vectors - * - * @param string $seconds A string representation of seconds since the Unix epoch for the time to calculate - * @param string $microseconds A string representation of the micro-seconds associated with the time to calculate - * - * @return Hexadecimal The full UUID timestamp as a Hexadecimal value - * - * @pure - */ - public function calculateTime(string $seconds, string $microseconds): Hexadecimal; - - /** - * Converts a timestamp extracted from a UUID to a Unix timestamp - * - * @param Hexadecimal $uuidTimestamp A hexadecimal representation of a UUID timestamp; a UUID timestamp is a count - * of 100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582. - * - * @return Time An instance of {@see Time} - * - * @pure - */ - public function convertTime(Hexadecimal $uuidTimestamp): Time; -} diff --git a/vendor/ramsey/uuid/src/DegradedUuid.php b/vendor/ramsey/uuid/src/DegradedUuid.php deleted file mode 100644 index 169976e7..00000000 --- a/vendor/ramsey/uuid/src/DegradedUuid.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -/** - * @deprecated DegradedUuid is no longer necessary to represent UUIDs on 32-bit systems. - * Transition any type declarations using this class to {@see UuidInterface}. - * - * @immutable - */ -class DegradedUuid extends Uuid -{ -} diff --git a/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php b/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php deleted file mode 100644 index 91dbbc60..00000000 --- a/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php +++ /dev/null @@ -1,126 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use DateTimeInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; - -/** - * This interface encapsulates deprecated methods for ramsey/uuid - * - * @immutable - */ -interface DeprecatedUuidInterface -{ - /** - * @deprecated This method will be removed in 5.0.0. There is no alternative recommendation, so plan accordingly. - */ - public function getNumberConverter(): NumberConverterInterface; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. - * - * @return string[] - */ - public function getFieldsHex(): array; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. - */ - public function getClockSeqHiAndReservedHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. - */ - public function getClockSeqLowHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. - */ - public function getClockSequenceHex(): string; - - /** - * @deprecated In ramsey/uuid version 5.0.0, this will be removed from the interface. It is available at - * {@see UuidV1::getDateTime()}. - */ - public function getDateTime(): DateTimeInterface; - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getLeastSignificantBitsHex(): string; - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getMostSignificantBitsHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. - */ - public function getNodeHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. - */ - public function getTimeHiAndVersionHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. - */ - public function getTimeLowHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. - */ - public function getTimeMidHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. - */ - public function getTimestampHex(): string; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. - */ - public function getVariant(): ?int; - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. - */ - public function getVersion(): ?int; -} diff --git a/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php b/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php deleted file mode 100644 index fb885787..00000000 --- a/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php +++ /dev/null @@ -1,326 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use DateTimeImmutable; -use DateTimeInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Exception\DateTimeException; -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Throwable; - -use function str_pad; -use function substr; - -use const STR_PAD_LEFT; - -/** - * This trait encapsulates deprecated methods for ramsey/uuid; this trait and its methods will be removed in ramsey/uuid 5.0.0. - * - * @deprecated This trait and its methods will be removed in ramsey/uuid 5.0.0. - * - * @immutable - */ -trait DeprecatedUuidMethodsTrait -{ - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()} and use the arbitrary-precision math - * library of your choice to convert it to a string integer. - */ - public function getClockSeqHiAndReserved(): string - { - return $this->numberConverter->fromHex($this->fields->getClockSeqHiAndReserved()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. - */ - public function getClockSeqHiAndReservedHex(): string - { - return $this->fields->getClockSeqHiAndReserved()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()} and use the arbitrary-precision math library of - * your choice to convert it to a string integer. - */ - public function getClockSeqLow(): string - { - return $this->numberConverter->fromHex($this->fields->getClockSeqLow()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. - */ - public function getClockSeqLowHex(): string - { - return $this->fields->getClockSeqLow()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()} and use the arbitrary-precision math library of - * your choice to convert it to a string integer. - */ - public function getClockSequence(): string - { - return $this->numberConverter->fromHex($this->fields->getClockSeq()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. - */ - public function getClockSequenceHex(): string - { - return $this->fields->getClockSeq()->toString(); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no alternative recommendation, so plan accordingly. - */ - public function getNumberConverter(): NumberConverterInterface - { - return $this->numberConverter; - } - - /** - * @deprecated In ramsey/uuid version 5.0.0, this will be removed. It is available at {@see UuidV1::getDateTime()}. - * - * @return DateTimeImmutable An immutable instance of DateTimeInterface - * - * @throws UnsupportedOperationException if UUID is not time-based - * @throws DateTimeException if DateTime throws an exception/error - */ - public function getDateTime(): DateTimeInterface - { - if ($this->fields->getVersion() !== 1) { - throw new UnsupportedOperationException('Not a time-based UUID'); - } - - $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); - - try { - return new DateTimeImmutable( - '@' - . $time->getSeconds()->toString() - . '.' - . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) - ); - } catch (Throwable $e) { - throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); - } - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * - * @return string[] - */ - public function getFieldsHex(): array - { - return [ - 'time_low' => $this->fields->getTimeLow()->toString(), - 'time_mid' => $this->fields->getTimeMid()->toString(), - 'time_hi_and_version' => $this->fields->getTimeHiAndVersion()->toString(), - 'clock_seq_hi_and_reserved' => $this->fields->getClockSeqHiAndReserved()->toString(), - 'clock_seq_low' => $this->fields->getClockSeqLow()->toString(), - 'node' => $this->fields->getNode()->toString(), - ]; - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getLeastSignificantBits(): string - { - $leastSignificantHex = substr($this->getHex()->toString(), 16); - - return $this->numberConverter->fromHex($leastSignificantHex); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getLeastSignificantBitsHex(): string - { - return substr($this->getHex()->toString(), 16); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getMostSignificantBits(): string - { - $mostSignificantHex = substr($this->getHex()->toString(), 0, 16); - - return $this->numberConverter->fromHex($mostSignificantHex); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getMostSignificantBitsHex(): string - { - return substr($this->getHex()->toString(), 0, 16); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()} and use the arbitrary-precision math library of your - * choice to convert it to a string integer. - */ - public function getNode(): string - { - return $this->numberConverter->fromHex($this->fields->getNode()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. - */ - public function getNodeHex(): string - { - return $this->fields->getNode()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()} and use the arbitrary-precision math - * library of your choice to convert it to a string integer. - */ - public function getTimeHiAndVersion(): string - { - return $this->numberConverter->fromHex($this->fields->getTimeHiAndVersion()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. - */ - public function getTimeHiAndVersionHex(): string - { - return $this->fields->getTimeHiAndVersion()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()} and use the arbitrary-precision math library of - * your choice to convert it to a string integer. - */ - public function getTimeLow(): string - { - return $this->numberConverter->fromHex($this->fields->getTimeLow()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. - */ - public function getTimeLowHex(): string - { - return $this->fields->getTimeLow()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()} and use the arbitrary-precision math library of - * your choice to convert it to a string integer. - */ - public function getTimeMid(): string - { - return $this->numberConverter->fromHex($this->fields->getTimeMid()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. - */ - public function getTimeMidHex(): string - { - return $this->fields->getTimeMid()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()} and use the arbitrary-precision math library of - * your choice to convert it to a string integer. - */ - public function getTimestamp(): string - { - if ($this->fields->getVersion() !== 1) { - throw new UnsupportedOperationException('Not a time-based UUID'); - } - - return $this->numberConverter->fromHex($this->fields->getTimestamp()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. - */ - public function getTimestampHex(): string - { - if ($this->fields->getVersion() !== 1) { - throw new UnsupportedOperationException('Not a time-based UUID'); - } - - return $this->fields->getTimestamp()->toString(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. - */ - public function getVariant(): ?int - { - return $this->fields->getVariant(); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. - * If it is a {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call - * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. - */ - public function getVersion(): ?int - { - return $this->fields->getVersion(); - } -} diff --git a/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php b/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php deleted file mode 100644 index 220ffedb..00000000 --- a/vendor/ramsey/uuid/src/Exception/BuilderNotFoundException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that no suitable builder could be found - */ -class BuilderNotFoundException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/DateTimeException.php b/vendor/ramsey/uuid/src/Exception/DateTimeException.php deleted file mode 100644 index 5f0e658b..00000000 --- a/vendor/ramsey/uuid/src/Exception/DateTimeException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that the PHP DateTime extension encountered an exception/error - */ -class DateTimeException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/DceSecurityException.php b/vendor/ramsey/uuid/src/Exception/DceSecurityException.php deleted file mode 100644 index bd8ca4c6..00000000 --- a/vendor/ramsey/uuid/src/Exception/DceSecurityException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate an exception occurred while dealing with DCE Security (version 2) UUIDs - */ -class DceSecurityException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php b/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 2a1fa3ac..00000000 --- a/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use InvalidArgumentException as PhpInvalidArgumentException; - -/** - * Thrown to indicate that the argument received is not valid - */ -class InvalidArgumentException extends PhpInvalidArgumentException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php b/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php deleted file mode 100644 index 1c94f659..00000000 --- a/vendor/ramsey/uuid/src/Exception/InvalidBytesException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that the bytes being operated on are invalid in some way - */ -class InvalidBytesException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php b/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php deleted file mode 100644 index cfc7eee4..00000000 --- a/vendor/ramsey/uuid/src/Exception/InvalidUuidStringException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -/** - * Thrown to indicate that the string received is not a valid UUID - * - * The InvalidArgumentException that this extends is the ramsey/uuid version of this exception. It exists in the same - * namespace as this class. - */ -class InvalidUuidStringException extends InvalidArgumentException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/NameException.php b/vendor/ramsey/uuid/src/Exception/NameException.php deleted file mode 100644 index ee72e165..00000000 --- a/vendor/ramsey/uuid/src/Exception/NameException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that an error occurred while attempting to hash a namespace and name - */ -class NameException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/NodeException.php b/vendor/ramsey/uuid/src/Exception/NodeException.php deleted file mode 100644 index 0dbdd50b..00000000 --- a/vendor/ramsey/uuid/src/Exception/NodeException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that attempting to fetch or create a node ID encountered an error - */ -class NodeException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/RandomSourceException.php b/vendor/ramsey/uuid/src/Exception/RandomSourceException.php deleted file mode 100644 index 7b246041..00000000 --- a/vendor/ramsey/uuid/src/Exception/RandomSourceException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that the source of random data encountered an error - * - * This exception is used mostly to indicate that random_bytes() or random_int() threw an exception. However, it may be - * used for other sources of random data. - */ -class RandomSourceException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/TimeSourceException.php b/vendor/ramsey/uuid/src/Exception/TimeSourceException.php deleted file mode 100644 index fc9cf36b..00000000 --- a/vendor/ramsey/uuid/src/Exception/TimeSourceException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate that the source of time encountered an error - */ -class TimeSourceException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php b/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php deleted file mode 100644 index 5ba26d8d..00000000 --- a/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use RuntimeException as PhpRuntimeException; - -/** - * Thrown to indicate a builder is unable to build a UUID - */ -class UnableToBuildUuidException extends PhpRuntimeException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php b/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php deleted file mode 100644 index e1b3eda1..00000000 --- a/vendor/ramsey/uuid/src/Exception/UnsupportedOperationException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use LogicException as PhpLogicException; - -/** - * Thrown to indicate that the requested operation is not supported - */ -class UnsupportedOperationException extends PhpLogicException implements UuidExceptionInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php b/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php deleted file mode 100644 index a2f1c103..00000000 --- a/vendor/ramsey/uuid/src/Exception/UuidExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Exception; - -use Throwable; - -interface UuidExceptionInterface extends Throwable -{ -} diff --git a/vendor/ramsey/uuid/src/FeatureSet.php b/vendor/ramsey/uuid/src/FeatureSet.php deleted file mode 100644 index 88ce7c42..00000000 --- a/vendor/ramsey/uuid/src/FeatureSet.php +++ /dev/null @@ -1,383 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use Ramsey\Uuid\Builder\FallbackBuilder; -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Codec\GuidStringCodec; -use Ramsey\Uuid\Codec\StringCodec; -use Ramsey\Uuid\Converter\Number\GenericNumberConverter; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\Time\GenericTimeConverter; -use Ramsey\Uuid\Converter\Time\PhpTimeConverter; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Generator\DceSecurityGenerator; -use Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; -use Ramsey\Uuid\Generator\NameGeneratorFactory; -use Ramsey\Uuid\Generator\NameGeneratorInterface; -use Ramsey\Uuid\Generator\PeclUuidNameGenerator; -use Ramsey\Uuid\Generator\PeclUuidRandomGenerator; -use Ramsey\Uuid\Generator\PeclUuidTimeGenerator; -use Ramsey\Uuid\Generator\RandomGeneratorFactory; -use Ramsey\Uuid\Generator\RandomGeneratorInterface; -use Ramsey\Uuid\Generator\TimeGeneratorFactory; -use Ramsey\Uuid\Generator\TimeGeneratorInterface; -use Ramsey\Uuid\Generator\UnixTimeGenerator; -use Ramsey\Uuid\Guid\GuidBuilder; -use Ramsey\Uuid\Math\BrickMathCalculator; -use Ramsey\Uuid\Math\CalculatorInterface; -use Ramsey\Uuid\Nonstandard\UuidBuilder as NonstandardUuidBuilder; -use Ramsey\Uuid\Provider\Dce\SystemDceSecurityProvider; -use Ramsey\Uuid\Provider\DceSecurityProviderInterface; -use Ramsey\Uuid\Provider\Node\FallbackNodeProvider; -use Ramsey\Uuid\Provider\Node\RandomNodeProvider; -use Ramsey\Uuid\Provider\Node\SystemNodeProvider; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Provider\Time\SystemTimeProvider; -use Ramsey\Uuid\Provider\TimeProviderInterface; -use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder; -use Ramsey\Uuid\Validator\GenericValidator; -use Ramsey\Uuid\Validator\ValidatorInterface; - -use const PHP_INT_SIZE; - -/** - * FeatureSet detects and exposes available features in the current environment - * - * A feature set is used by UuidFactory to determine the available features and capabilities of the environment. - */ -class FeatureSet -{ - private ?TimeProviderInterface $timeProvider = null; - private CalculatorInterface $calculator; - private CodecInterface $codec; - private DceSecurityGeneratorInterface $dceSecurityGenerator; - private NameGeneratorInterface $nameGenerator; - private NodeProviderInterface $nodeProvider; - private NumberConverterInterface $numberConverter; - private RandomGeneratorInterface $randomGenerator; - private TimeConverterInterface $timeConverter; - private TimeGeneratorInterface $timeGenerator; - private TimeGeneratorInterface $unixTimeGenerator; - private UuidBuilderInterface $builder; - private ValidatorInterface $validator; - - /** - * @param bool $useGuids True build UUIDs using the GuidStringCodec - * @param bool $force32Bit True to force the use of 32-bit functionality (primarily for testing purposes) - * @param bool $forceNoBigNumber (obsolete) - * @param bool $ignoreSystemNode True to disable attempts to check for the system node ID (primarily for testing purposes) - * @param bool $enablePecl True to enable the use of the PeclUuidTimeGenerator to generate version 1 UUIDs - * - * @phpstan-ignore constructor.unusedParameter ($forceNoBigNumber is deprecated) - */ - public function __construct( - bool $useGuids = false, - private bool $force32Bit = false, - bool $forceNoBigNumber = false, - private bool $ignoreSystemNode = false, - private bool $enablePecl = false, - ) { - $this->randomGenerator = $this->buildRandomGenerator(); - $this->setCalculator(new BrickMathCalculator()); - $this->builder = $this->buildUuidBuilder($useGuids); - $this->codec = $this->buildCodec($useGuids); - $this->nodeProvider = $this->buildNodeProvider(); - $this->nameGenerator = $this->buildNameGenerator(); - $this->setTimeProvider(new SystemTimeProvider()); - $this->setDceSecurityProvider(new SystemDceSecurityProvider()); - $this->validator = new GenericValidator(); - - assert($this->timeProvider !== null); - $this->unixTimeGenerator = $this->buildUnixTimeGenerator(); - } - - /** - * Returns the builder configured for this environment - */ - public function getBuilder(): UuidBuilderInterface - { - return $this->builder; - } - - /** - * Returns the calculator configured for this environment - */ - public function getCalculator(): CalculatorInterface - { - return $this->calculator; - } - - /** - * Returns the codec configured for this environment - */ - public function getCodec(): CodecInterface - { - return $this->codec; - } - - /** - * Returns the DCE Security generator configured for this environment - */ - public function getDceSecurityGenerator(): DceSecurityGeneratorInterface - { - return $this->dceSecurityGenerator; - } - - /** - * Returns the name generator configured for this environment - */ - public function getNameGenerator(): NameGeneratorInterface - { - return $this->nameGenerator; - } - - /** - * Returns the node provider configured for this environment - */ - public function getNodeProvider(): NodeProviderInterface - { - return $this->nodeProvider; - } - - /** - * Returns the number converter configured for this environment - */ - public function getNumberConverter(): NumberConverterInterface - { - return $this->numberConverter; - } - - /** - * Returns the random generator configured for this environment - */ - public function getRandomGenerator(): RandomGeneratorInterface - { - return $this->randomGenerator; - } - - /** - * Returns the time converter configured for this environment - */ - public function getTimeConverter(): TimeConverterInterface - { - return $this->timeConverter; - } - - /** - * Returns the time generator configured for this environment - */ - public function getTimeGenerator(): TimeGeneratorInterface - { - return $this->timeGenerator; - } - - /** - * Returns the Unix Epoch time generator configured for this environment - */ - public function getUnixTimeGenerator(): TimeGeneratorInterface - { - return $this->unixTimeGenerator; - } - - /** - * Returns the validator configured for this environment - */ - public function getValidator(): ValidatorInterface - { - return $this->validator; - } - - /** - * Sets the calculator to use in this environment - */ - public function setCalculator(CalculatorInterface $calculator): void - { - $this->calculator = $calculator; - $this->numberConverter = $this->buildNumberConverter($calculator); - $this->timeConverter = $this->buildTimeConverter($calculator); - - if (isset($this->timeProvider)) { - $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); - } - } - - /** - * Sets the DCE Security provider to use in this environment - */ - public function setDceSecurityProvider(DceSecurityProviderInterface $dceSecurityProvider): void - { - $this->dceSecurityGenerator = $this->buildDceSecurityGenerator($dceSecurityProvider); - } - - /** - * Sets the node provider to use in this environment - */ - public function setNodeProvider(NodeProviderInterface $nodeProvider): void - { - $this->nodeProvider = $nodeProvider; - - if (isset($this->timeProvider)) { - $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); - } - } - - /** - * Sets the time provider to use in this environment - */ - public function setTimeProvider(TimeProviderInterface $timeProvider): void - { - $this->timeProvider = $timeProvider; - $this->timeGenerator = $this->buildTimeGenerator($timeProvider); - } - - /** - * Set the validator to use in this environment - */ - public function setValidator(ValidatorInterface $validator): void - { - $this->validator = $validator; - } - - /** - * Returns a codec configured for this environment - * - * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec - */ - private function buildCodec(bool $useGuids = false): CodecInterface - { - if ($useGuids) { - return new GuidStringCodec($this->builder); - } - - return new StringCodec($this->builder); - } - - /** - * Returns a DCE Security generator configured for this environment - */ - private function buildDceSecurityGenerator( - DceSecurityProviderInterface $dceSecurityProvider, - ): DceSecurityGeneratorInterface { - return new DceSecurityGenerator($this->numberConverter, $this->timeGenerator, $dceSecurityProvider); - } - - /** - * Returns a node provider configured for this environment - */ - private function buildNodeProvider(): NodeProviderInterface - { - if ($this->ignoreSystemNode) { - return new RandomNodeProvider(); - } - - return new FallbackNodeProvider([new SystemNodeProvider(), new RandomNodeProvider()]); - } - - /** - * Returns a number converter configured for this environment - */ - private function buildNumberConverter(CalculatorInterface $calculator): NumberConverterInterface - { - return new GenericNumberConverter($calculator); - } - - /** - * Returns a random generator configured for this environment - */ - private function buildRandomGenerator(): RandomGeneratorInterface - { - if ($this->enablePecl) { - return new PeclUuidRandomGenerator(); - } - - return (new RandomGeneratorFactory())->getGenerator(); - } - - /** - * Returns a time generator configured for this environment - * - * @param TimeProviderInterface $timeProvider The time provider to use with - * the time generator - */ - private function buildTimeGenerator(TimeProviderInterface $timeProvider): TimeGeneratorInterface - { - if ($this->enablePecl) { - return new PeclUuidTimeGenerator(); - } - - return (new TimeGeneratorFactory($this->nodeProvider, $this->timeConverter, $timeProvider))->getGenerator(); - } - - /** - * Returns a Unix Epoch time generator configured for this environment - */ - private function buildUnixTimeGenerator(): TimeGeneratorInterface - { - return new UnixTimeGenerator($this->randomGenerator); - } - - /** - * Returns a name generator configured for this environment - */ - private function buildNameGenerator(): NameGeneratorInterface - { - if ($this->enablePecl) { - return new PeclUuidNameGenerator(); - } - - return (new NameGeneratorFactory())->getGenerator(); - } - - /** - * Returns a time converter configured for this environment - */ - private function buildTimeConverter(CalculatorInterface $calculator): TimeConverterInterface - { - $genericConverter = new GenericTimeConverter($calculator); - - if ($this->is64BitSystem()) { - return new PhpTimeConverter($calculator, $genericConverter); - } - - return $genericConverter; - } - - /** - * Returns a UUID builder configured for this environment - * - * @param bool $useGuids Whether to build UUIDs using the GuidStringCodec - */ - private function buildUuidBuilder(bool $useGuids = false): UuidBuilderInterface - { - if ($useGuids) { - return new GuidBuilder($this->numberConverter, $this->timeConverter); - } - - return new FallbackBuilder([ - new Rfc4122UuidBuilder($this->numberConverter, $this->timeConverter), - new NonstandardUuidBuilder($this->numberConverter, $this->timeConverter), - ]); - } - - /** - * Returns true if the PHP build is 64-bit - */ - private function is64BitSystem(): bool - { - return PHP_INT_SIZE === 8 && !$this->force32Bit; - } -} diff --git a/vendor/ramsey/uuid/src/Fields/FieldsInterface.php b/vendor/ramsey/uuid/src/Fields/FieldsInterface.php deleted file mode 100644 index f17ea880..00000000 --- a/vendor/ramsey/uuid/src/Fields/FieldsInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Fields; - -use Serializable; - -/** - * UUIDs consist of unsigned integers, the bytes of which are separated into fields and arranged in a particular layout - * defined by the specification for the variant - * - * @immutable - */ -interface FieldsInterface extends Serializable -{ - /** - * Returns the bytes that comprise the fields - * - * @pure - */ - public function getBytes(): string; -} diff --git a/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php b/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php deleted file mode 100644 index 9ea47c63..00000000 --- a/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php +++ /dev/null @@ -1,83 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Fields; - -use ValueError; - -use function base64_decode; -use function sprintf; -use function strlen; - -/** - * Provides common serialization functionality to fields - * - * @immutable - */ -trait SerializableFieldsTrait -{ - /** - * @param string $bytes The bytes that comprise the fields - */ - abstract public function __construct(string $bytes); - - /** - * Returns the bytes that comprise the fields - */ - abstract public function getBytes(): string; - - /** - * Returns a string representation of the object - */ - public function serialize(): string - { - return $this->getBytes(); - } - - /** - * @return array{bytes: string} - */ - public function __serialize(): array - { - return ['bytes' => $this->getBytes()]; - } - - /** - * Constructs the object from a serialized string representation - * - * @param string $data The serialized string representation of the object - */ - public function unserialize(string $data): void - { - if (strlen($data) === 16) { - $this->__construct($data); - } else { - $this->__construct(base64_decode($data)); - } - } - - /** - * @param array{bytes?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['bytes'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['bytes']); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/vendor/ramsey/uuid/src/Generator/CombGenerator.php deleted file mode 100644 index 5f6fa1d9..00000000 --- a/vendor/ramsey/uuid/src/Generator/CombGenerator.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; - -use function bin2hex; -use function explode; -use function hex2bin; -use function microtime; -use function str_pad; -use function substr; - -use const STR_PAD_LEFT; - -/** - * CombGenerator generates COMBs (combined UUID/timestamp) - * - * The CombGenerator, when used with the StringCodec (and, by proxy, the TimestampLastCombCodec) or the - * TimestampFirstCombCodec, combines the current timestamp with a UUID (hence the name "COMB"). The timestamp either - * appears as the first or last 48 bits of the COMB, depending on the codec used. - * - * By default, COMBs will have the timestamp set as the last 48 bits of the identifier. - * - * ``` - * $factory = new UuidFactory(); - * - * $factory->setRandomGenerator(new CombGenerator( - * $factory->getRandomGenerator(), - * $factory->getNumberConverter(), - * )); - * - * $comb = $factory->uuid4(); - * ``` - * - * To generate a COMB with the timestamp as the first 48 bits, set the TimestampFirstCombCodec as the codec. - * - * ``` - * $factory->setCodec(new TimestampFirstCombCodec($factory->getUuidBuilder())); - * ``` - * - * @deprecated Please migrate to {@link https://uuid.ramsey.dev/en/stable/rfc4122/version7.html Version 7, Unix Epoch Time UUIDs}. - * - * @link https://web.archive.org/web/20240118030355/https://www.informit.com/articles/printerfriendly/25862 The Cost of GUIDs as Primary Keys - */ -class CombGenerator implements RandomGeneratorInterface -{ - public const TIMESTAMP_BYTES = 6; - - public function __construct( - private RandomGeneratorInterface $generator, - private NumberConverterInterface $numberConverter - ) { - } - - /** - * @throws InvalidArgumentException if $length is not a positive integer greater than or equal to CombGenerator::TIMESTAMP_BYTES - * - * @inheritDoc - */ - public function generate(int $length): string - { - if ($length < self::TIMESTAMP_BYTES) { - throw new InvalidArgumentException( - 'Length must be a positive integer greater than or equal to ' . self::TIMESTAMP_BYTES - ); - } - - if ($length % 2 !== 0) { - throw new InvalidArgumentException('Length must be an even number'); - } - - $hash = ''; - - /** @phpstan-ignore greater.alwaysTrue (TIMESTAMP_BYTES constant could change in child classes) */ - if (self::TIMESTAMP_BYTES > 0 && $length > self::TIMESTAMP_BYTES) { - $hash = $this->generator->generate($length - self::TIMESTAMP_BYTES); - } - - $lsbTime = str_pad( - $this->numberConverter->toHex($this->timestamp()), - self::TIMESTAMP_BYTES * 2, - '0', - STR_PAD_LEFT, - ); - - return (string) hex2bin(str_pad(bin2hex($hash), $length - self::TIMESTAMP_BYTES, '0') . $lsbTime); - } - - /** - * Returns the current timestamp as a string integer, precise to 0.00001 seconds - */ - private function timestamp(): string - { - $time = explode(' ', microtime(false)); - - return $time[1] . substr($time[0], 2, 5); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php b/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php deleted file mode 100644 index 71192c09..00000000 --- a/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php +++ /dev/null @@ -1,133 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Exception\DceSecurityException; -use Ramsey\Uuid\Provider\DceSecurityProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Uuid; - -use function hex2bin; -use function in_array; -use function pack; -use function str_pad; -use function strlen; -use function substr_replace; - -use const STR_PAD_LEFT; - -/** - * DceSecurityGenerator generates strings of binary data based on a local domain, local identifier, node ID, clock - * sequence, and the current time - */ -class DceSecurityGenerator implements DceSecurityGeneratorInterface -{ - private const DOMAINS = [ - Uuid::DCE_DOMAIN_PERSON, - Uuid::DCE_DOMAIN_GROUP, - Uuid::DCE_DOMAIN_ORG, - ]; - - /** - * Upper bounds for the clock sequence in DCE Security UUIDs. - */ - private const CLOCK_SEQ_HIGH = 63; - - /** - * Lower bounds for the clock sequence in DCE Security UUIDs. - */ - private const CLOCK_SEQ_LOW = 0; - - public function __construct( - private NumberConverterInterface $numberConverter, - private TimeGeneratorInterface $timeGenerator, - private DceSecurityProviderInterface $dceSecurityProvider, - ) { - } - - public function generate( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): string { - if (!in_array($localDomain, self::DOMAINS)) { - throw new DceSecurityException('Local domain must be a valid DCE Security domain'); - } - - if ($localIdentifier && $localIdentifier->isNegative()) { - throw new DceSecurityException( - 'Local identifier out of bounds; it must be a value between 0 and 4294967295', - ); - } - - if ($clockSeq > self::CLOCK_SEQ_HIGH || $clockSeq < self::CLOCK_SEQ_LOW) { - throw new DceSecurityException('Clock sequence out of bounds; it must be a value between 0 and 63'); - } - - switch ($localDomain) { - case Uuid::DCE_DOMAIN_ORG: - if ($localIdentifier === null) { - throw new DceSecurityException('A local identifier must be provided for the org domain'); - } - - break; - case Uuid::DCE_DOMAIN_PERSON: - if ($localIdentifier === null) { - $localIdentifier = $this->dceSecurityProvider->getUid(); - } - - break; - case Uuid::DCE_DOMAIN_GROUP: - default: - if ($localIdentifier === null) { - $localIdentifier = $this->dceSecurityProvider->getGid(); - } - - break; - } - - $identifierHex = $this->numberConverter->toHex($localIdentifier->toString()); - - // The maximum value for the local identifier is 0xffffffff, or 4,294,967,295. This is 8 hexadecimal digits, so - // if the length of hexadecimal digits is greater than 8, we know the value is greater than 0xffffffff. - if (strlen($identifierHex) > 8) { - throw new DceSecurityException( - 'Local identifier out of bounds; it must be a value between 0 and 4294967295', - ); - } - - $domainByte = pack('n', $localDomain)[1]; - $identifierBytes = (string) hex2bin(str_pad($identifierHex, 8, '0', STR_PAD_LEFT)); - - if ($node instanceof Hexadecimal) { - $node = $node->toString(); - } - - // Shift the clock sequence 8 bits to the left, so it matches 0x3f00. - if ($clockSeq !== null) { - $clockSeq = $clockSeq << 8; - } - - $bytes = $this->timeGenerator->generate($node, $clockSeq); - - // Replace bytes in the time-based UUID with DCE Security values. - $bytes = substr_replace($bytes, $identifierBytes, 0, 4); - - return substr_replace($bytes, $domainByte, 9, 1); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php deleted file mode 100644 index f52eb557..00000000 --- a/vendor/ramsey/uuid/src/Generator/DceSecurityGeneratorInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Rfc4122\UuidV2; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; - -/** - * A DCE Security generator generates strings of binary data based on a local domain, local identifier, node ID, clock - * sequence, and the current time - * - * @see UuidV2 - */ -interface DceSecurityGeneratorInterface -{ - /** - * Generate a binary string from a local domain, local identifier, node ID, clock sequence, and current time - * - * @param int $localDomain The local domain to use when generating bytes, according to DCE Security - * @param IntegerObject | null $localIdentifier The local identifier for the given domain; this may be a UID or GID - * on POSIX systems if the local domain is "person" or "group," or it may be a site-defined identifier if the - * local domain is "org" - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return string A binary string - */ - public function generate( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): string; -} diff --git a/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php deleted file mode 100644 index cf37b453..00000000 --- a/vendor/ramsey/uuid/src/Generator/DefaultNameGenerator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Exception\NameException; -use Ramsey\Uuid\UuidInterface; -use ValueError; - -use function hash; - -/** - * DefaultNameGenerator generates strings of binary data based on a namespace, name, and hashing algorithm - */ -class DefaultNameGenerator implements NameGeneratorInterface -{ - /** - * @pure - */ - public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string - { - try { - return hash($hashAlgorithm, $ns->getBytes() . $name, true); - } catch (ValueError $e) { - throw new NameException( - message: sprintf('Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm), - previous: $e, - ); - } - } -} diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php deleted file mode 100644 index 6ded59d3..00000000 --- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php +++ /dev/null @@ -1,118 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Exception\RandomSourceException; -use Ramsey\Uuid\Exception\TimeSourceException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Provider\TimeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Throwable; - -use function dechex; -use function hex2bin; -use function is_int; -use function pack; -use function preg_match; -use function sprintf; -use function str_pad; -use function strlen; - -use const STR_PAD_LEFT; - -/** - * DefaultTimeGenerator generates strings of binary data based on a node ID, clock sequence, and the current time - */ -class DefaultTimeGenerator implements TimeGeneratorInterface -{ - public function __construct( - private NodeProviderInterface $nodeProvider, - private TimeConverterInterface $timeConverter, - private TimeProviderInterface $timeProvider, - ) { - } - - /** - * @throws InvalidArgumentException if the parameters contain invalid values - * @throws RandomSourceException if random_int() throws an exception/error - * - * @inheritDoc - */ - public function generate($node = null, ?int $clockSeq = null): string - { - if ($node instanceof Hexadecimal) { - $node = $node->toString(); - } - - $node = $this->getValidNode($node); - - if ($clockSeq === null) { - try { - // This does not use "stable storage"; see RFC 9562, section 6.3. - $clockSeq = random_int(0, 0x3fff); - } catch (Throwable $exception) { - throw new RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); - } - } - - $time = $this->timeProvider->getTime(); - - $uuidTime = $this->timeConverter->calculateTime( - $time->getSeconds()->toString(), - $time->getMicroseconds()->toString() - ); - - $timeHex = str_pad($uuidTime->toString(), 16, '0', STR_PAD_LEFT); - - if (strlen($timeHex) !== 16) { - throw new TimeSourceException(sprintf('The generated time of \'%s\' is larger than expected', $timeHex)); - } - - $timeBytes = (string) hex2bin($timeHex); - - return $timeBytes[4] . $timeBytes[5] . $timeBytes[6] . $timeBytes[7] - . $timeBytes[2] . $timeBytes[3] . $timeBytes[0] . $timeBytes[1] - . pack('n*', $clockSeq) . $node; - } - - /** - * Uses the node provider given when constructing this instance to get the node ID (usually a MAC address) - * - * @param int | string | null $node A node value that may be used to override the node provider - * - * @return string 6-byte binary string representation of the node - * - * @throws InvalidArgumentException - */ - private function getValidNode(int | string | null $node): string - { - if ($node === null) { - $node = $this->nodeProvider->getNode(); - } - - // Convert the node to hex if it is still an integer. - if (is_int($node)) { - $node = dechex($node); - } - - if (!preg_match('/^[A-Fa-f0-9]+$/', (string) $node) || strlen((string) $node) > 12) { - throw new InvalidArgumentException('Invalid node value'); - } - - return (string) hex2bin(str_pad((string) $node, 12, '0', STR_PAD_LEFT)); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php b/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php deleted file mode 100644 index d68e94b7..00000000 --- a/vendor/ramsey/uuid/src/Generator/NameGeneratorFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -/** - * NameGeneratorFactory retrieves a default name generator, based on the environment - */ -class NameGeneratorFactory -{ - /** - * Returns a default name generator, based on the current environment - */ - public function getGenerator(): NameGeneratorInterface - { - return new DefaultNameGenerator(); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php deleted file mode 100644 index f0fb8daa..00000000 --- a/vendor/ramsey/uuid/src/Generator/NameGeneratorInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\UuidInterface; - -/** - * A name generator generates strings of binary data created by hashing together a namespace with a name, according to a - * hashing algorithm - */ -interface NameGeneratorInterface -{ - /** - * Generate a binary string from a namespace and name hashed together with the specified hashing algorithm - * - * @param UuidInterface $ns The namespace - * @param string $name The name to use for creating a UUID - * @param string $hashAlgorithm The hashing algorithm to use - * - * @return string A binary string - * - * @pure - */ - public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string; -} diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php deleted file mode 100644 index d13bafc9..00000000 --- a/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Exception\NameException; -use Ramsey\Uuid\UuidInterface; - -use function sprintf; -use function uuid_generate_md5; -use function uuid_generate_sha1; -use function uuid_parse; - -/** - * PeclUuidNameGenerator generates strings of binary data from a namespace and a name, using ext-uuid - * - * @link https://pecl.php.net/package/uuid ext-uuid - */ -class PeclUuidNameGenerator implements NameGeneratorInterface -{ - /** - * @pure - */ - public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string - { - $uuid = match ($hashAlgorithm) { - 'md5' => uuid_generate_md5($ns->toString(), $name), /** @phpstan-ignore possiblyImpure.functionCall */ - 'sha1' => uuid_generate_sha1($ns->toString(), $name), /** @phpstan-ignore possiblyImpure.functionCall */ - default => throw new NameException( - sprintf('Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm), - ), - }; - - /** @phpstan-ignore possiblyImpure.functionCall */ - return (string) uuid_parse($uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php deleted file mode 100644 index 6ad45aca..00000000 --- a/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use function uuid_create; -use function uuid_parse; - -use const UUID_TYPE_RANDOM; - -/** - * PeclUuidRandomGenerator generates strings of random binary data using ext-uuid - * - * @link https://pecl.php.net/package/uuid ext-uuid - */ -class PeclUuidRandomGenerator implements RandomGeneratorInterface -{ - public function generate(int $length): string - { - $uuid = uuid_create(UUID_TYPE_RANDOM); - - return (string) uuid_parse($uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php deleted file mode 100644 index 558abf7e..00000000 --- a/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use function uuid_create; -use function uuid_parse; - -use const UUID_TYPE_TIME; - -/** - * PeclUuidTimeGenerator generates strings of binary data for time-base UUIDs, using ext-uuid - * - * @link https://pecl.php.net/package/uuid ext-uuid - */ -class PeclUuidTimeGenerator implements TimeGeneratorInterface -{ - /** - * @inheritDoc - */ - public function generate($node = null, ?int $clockSeq = null): string - { - $uuid = uuid_create(UUID_TYPE_TIME); - - return (string) uuid_parse($uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php deleted file mode 100644 index c169e63c..00000000 --- a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Exception\RandomSourceException; -use Throwable; - -/** - * RandomBytesGenerator generates strings of random binary data using the built-in `random_bytes()` PHP function - * - * @link http://php.net/random_bytes random_bytes() - */ -class RandomBytesGenerator implements RandomGeneratorInterface -{ - /** - * @throws RandomSourceException if random_bytes() throws an exception/error - * - * @inheritDoc - */ - public function generate(int $length): string - { - try { - return random_bytes($length); - } catch (Throwable $exception) { - throw new RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); - } - } -} diff --git a/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php b/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php deleted file mode 100644 index f4c3a6ff..00000000 --- a/vendor/ramsey/uuid/src/Generator/RandomGeneratorFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -/** - * RandomGeneratorFactory retrieves a default random generator, based on the environment - */ -class RandomGeneratorFactory -{ - /** - * Returns a default random generator, based on the current environment - */ - public function getGenerator(): RandomGeneratorInterface - { - return new RandomBytesGenerator(); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php deleted file mode 100644 index ddd87327..00000000 --- a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -/** - * A random generator generates strings of random binary data - */ -interface RandomGeneratorInterface -{ - /** - * Generates a string of randomized binary data - * - * @param int<1, max> $length The number of bytes to generate of random binary data - * - * @return string A binary string - */ - public function generate(int $length): string; -} diff --git a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php deleted file mode 100644 index b6d401d1..00000000 --- a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use RandomLib\Factory; -use RandomLib\Generator; - -/** - * RandomLibAdapter generates strings of random binary data using the paragonie/random-lib library - * - * @deprecated This class will be removed in 5.0.0. Use the default RandomBytesGenerator or implement your own generator - * that implements RandomGeneratorInterface. - * - * @link https://packagist.org/packages/paragonie/random-lib paragonie/random-lib - */ -class RandomLibAdapter implements RandomGeneratorInterface -{ - private Generator $generator; - - /** - * Constructs a RandomLibAdapter - * - * By default, if no Generator is passed in, this creates a high-strength generator to use when generating random - * binary data. - * - * @param Generator | null $generator The generator to use when generating binary data - */ - public function __construct(?Generator $generator = null) - { - if ($generator === null) { - $factory = new Factory(); - $generator = $factory->getHighStrengthGenerator(); - } - - $this->generator = $generator; - } - - public function generate(int $length): string - { - return $this->generator->generate($length); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php b/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php deleted file mode 100644 index 433e74c8..00000000 --- a/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Provider\TimeProviderInterface; - -/** - * TimeGeneratorFactory retrieves a default time generator, based on the environment - */ -class TimeGeneratorFactory -{ - public function __construct( - private NodeProviderInterface $nodeProvider, - private TimeConverterInterface $timeConverter, - private TimeProviderInterface $timeProvider, - ) { - } - - /** - * Returns a default time generator, based on the current environment - */ - public function getGenerator(): TimeGeneratorInterface - { - return new DefaultTimeGenerator($this->nodeProvider, $this->timeConverter, $this->timeProvider); - } -} diff --git a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php deleted file mode 100644 index c15d8207..00000000 --- a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Ramsey\Uuid\Type\Hexadecimal; - -/** - * A time generator generates strings of binary data based on a node ID, clock sequence, and the current time - */ -interface TimeGeneratorInterface -{ - /** - * Generate a binary string from a node ID, clock sequence, and current time - * - * @param Hexadecimal | int | string | null $node A 48-bit number representing the hardware address; this number may - * be represented as an integer or a hexadecimal string - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return string A binary string - */ - public function generate($node = null, ?int $clockSeq = null): string; -} diff --git a/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php deleted file mode 100644 index a2615f1a..00000000 --- a/vendor/ramsey/uuid/src/Generator/UnixTimeGenerator.php +++ /dev/null @@ -1,165 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Generator; - -use Brick\Math\BigInteger; -use DateTimeInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -use function assert; -use function hash; -use function pack; -use function str_pad; -use function strlen; -use function substr; -use function substr_replace; -use function unpack; - -use const PHP_INT_SIZE; -use const STR_PAD_LEFT; - -/** - * UnixTimeGenerator generates bytes, combining a 48-bit timestamp in milliseconds since the Unix Epoch with 80 random bits - * - * Code and concepts within this class are borrowed from the symfony/uid package and are used under the terms of the MIT - * license distributed with symfony/uid. - * - * symfony/uid is copyright (c) Fabien Potencier. - * - * @link https://symfony.com/components/Uid Symfony Uid component - * @link https://github.com/symfony/uid/blob/4f9f537e57261519808a7ce1d941490736522bbc/UuidV7.php Symfony UuidV7 class - * @link https://github.com/symfony/uid/blob/6.2/LICENSE MIT License - */ -class UnixTimeGenerator implements TimeGeneratorInterface -{ - private static string $time = ''; - private static ?string $seed = null; - private static int $seedIndex = 0; - - /** @var int[] */ - private static array $rand = []; - - /** @var int[] */ - private static array $seedParts; - - public function __construct( - private RandomGeneratorInterface $randomGenerator, - private int $intSize = PHP_INT_SIZE, - ) { - } - - /** - * @param Hexadecimal | int | string | null $node Unused in this generator - * @param int | null $clockSeq Unused in this generator - * @param DateTimeInterface | null $dateTime A date-time instance to use when generating bytes - */ - public function generate($node = null, ?int $clockSeq = null, ?DateTimeInterface $dateTime = null): string - { - if ($dateTime === null) { - $time = microtime(false); - $time = substr($time, 11) . substr($time, 2, 3); - } else { - $time = $dateTime->format('Uv'); - } - - if ($time > self::$time || ($dateTime !== null && $time !== self::$time)) { - $this->randomize($time); - } else { - $time = $this->increment(); - } - - if ($this->intSize >= 8) { - $time = substr(pack('J', (int) $time), -6); - } else { - $time = str_pad(BigInteger::of($time)->toBytes(false), 6, "\x00", STR_PAD_LEFT); - } - - assert(strlen($time) === 6); - - return $time . pack('n*', self::$rand[1], self::$rand[2], self::$rand[3], self::$rand[4], self::$rand[5]); - } - - private function randomize(string $time): void - { - if (self::$seed === null) { - $seed = $this->randomGenerator->generate(16); - self::$seed = $seed; - } else { - $seed = $this->randomGenerator->generate(10); - } - - /** @var int[] $rand */ - $rand = unpack('n*', $seed); - $rand[1] &= 0x03ff; - - self::$rand = $rand; - self::$time = $time; - } - - /** - * Special thanks to Nicolas Grekas () for sharing the following information: - * - * Within the same ms, we increment the rand part by a random 24-bit number. - * - * Instead of getting this number from random_bytes(), which is slow, we get it by sha512-hashing self::$seed. This - * produces 64 bytes of entropy, which we need to split in a list of 24-bit numbers. `unpack()` first splits them - * into 16 x 32-bit numbers; we take the first byte of each number to get 5 extra 24-bit numbers. Then, we consume - * each number one-by-one and run this logic every 21 iterations. - * - * `self::$rand` holds the random part of the UUID, split into 5 x 16-bit numbers for x86 portability. We increment - * this random part by the next 24-bit number in the `self::$seedParts` list and decrement `self::$seedIndex`. - */ - private function increment(): string - { - if (self::$seedIndex === 0 && self::$seed !== null) { - self::$seed = hash('sha512', self::$seed, true); - - /** @var int[] $s */ - $s = unpack('l*', self::$seed); - $s[] = ($s[1] >> 8 & 0xff0000) | ($s[2] >> 16 & 0xff00) | ($s[3] >> 24 & 0xff); - $s[] = ($s[4] >> 8 & 0xff0000) | ($s[5] >> 16 & 0xff00) | ($s[6] >> 24 & 0xff); - $s[] = ($s[7] >> 8 & 0xff0000) | ($s[8] >> 16 & 0xff00) | ($s[9] >> 24 & 0xff); - $s[] = ($s[10] >> 8 & 0xff0000) | ($s[11] >> 16 & 0xff00) | ($s[12] >> 24 & 0xff); - $s[] = ($s[13] >> 8 & 0xff0000) | ($s[14] >> 16 & 0xff00) | ($s[15] >> 24 & 0xff); - - self::$seedParts = $s; - self::$seedIndex = 21; - } - - self::$rand[5] = 0xffff & $carry = self::$rand[5] + 1 + (self::$seedParts[self::$seedIndex--] & 0xffffff); - self::$rand[4] = 0xffff & $carry = self::$rand[4] + ($carry >> 16); - self::$rand[3] = 0xffff & $carry = self::$rand[3] + ($carry >> 16); - self::$rand[2] = 0xffff & $carry = self::$rand[2] + ($carry >> 16); - self::$rand[1] += $carry >> 16; - - if (0xfc00 & self::$rand[1]) { - $time = self::$time; - $mtime = (int) substr($time, -9); - - if ($this->intSize >= 8 || strlen($time) < 10) { - $time = (string) ((int) $time + 1); - } elseif ($mtime === 999999999) { - $time = (1 + (int) substr($time, 0, -9)) . '000000000'; - } else { - $mtime++; - $time = substr_replace($time, str_pad((string) $mtime, 9, '0', STR_PAD_LEFT), -9); - } - - $this->randomize($time); - } - - return self::$time; - } -} diff --git a/vendor/ramsey/uuid/src/Guid/Fields.php b/vendor/ramsey/uuid/src/Guid/Fields.php deleted file mode 100644 index 58aa5e1c..00000000 --- a/vendor/ramsey/uuid/src/Guid/Fields.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Guid; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Fields\SerializableFieldsTrait; -use Ramsey\Uuid\Rfc4122\FieldsInterface; -use Ramsey\Uuid\Rfc4122\MaxTrait; -use Ramsey\Uuid\Rfc4122\NilTrait; -use Ramsey\Uuid\Rfc4122\VariantTrait; -use Ramsey\Uuid\Rfc4122\VersionTrait; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Uuid; - -use function bin2hex; -use function dechex; -use function hexdec; -use function pack; -use function sprintf; -use function str_pad; -use function strlen; -use function substr; -use function unpack; - -use const STR_PAD_LEFT; - -/** - * GUIDs consist of a set of named fields, according to RFC 9562 (formerly RFC 4122) - * - * @see Guid - * - * @immutable - */ -final class Fields implements FieldsInterface -{ - use MaxTrait; - use NilTrait; - use SerializableFieldsTrait; - use VariantTrait; - use VersionTrait; - - /** - * @param string $bytes A 16-byte binary string representation of a UUID - * - * @throws InvalidArgumentException if the byte string is not exactly 16 bytes - * @throws InvalidArgumentException if the byte string does not represent a GUID - * @throws InvalidArgumentException if the byte string does not contain a valid version - */ - public function __construct(private string $bytes) - { - if (strlen($this->bytes) !== 16) { - throw new InvalidArgumentException( - 'The byte string must be 16 bytes long; received ' . strlen($this->bytes) . ' bytes', - ); - } - - if (!$this->isCorrectVariant()) { - throw new InvalidArgumentException( - 'The byte string received does not conform to the RFC 9562 (formerly RFC 4122) ' - . 'or Microsoft Corporation variants', - ); - } - - if (!$this->isCorrectVersion()) { - throw new InvalidArgumentException('The byte string received does not contain a valid version'); - } - } - - public function getBytes(): string - { - return $this->bytes; - } - - public function getTimeLow(): Hexadecimal - { - // Swap the bytes from little endian to network byte order. - /** @var string[] $hex */ - $hex = unpack( - 'H*', - pack( - 'v*', - hexdec(bin2hex(substr($this->bytes, 2, 2))), - hexdec(bin2hex(substr($this->bytes, 0, 2))), - ), - ); - - return new Hexadecimal($hex[1] ?? ''); - } - - public function getTimeMid(): Hexadecimal - { - // Swap the bytes from little endian to network byte order. - /** @var string[] $hex */ - $hex = unpack('H*', pack('v', hexdec(bin2hex(substr($this->bytes, 4, 2))))); - - return new Hexadecimal($hex[1] ?? ''); - } - - public function getTimeHiAndVersion(): Hexadecimal - { - // Swap the bytes from little endian to network byte order. - /** @var string[] $hex */ - $hex = unpack('H*', pack('v', hexdec(bin2hex(substr($this->bytes, 6, 2))))); - - return new Hexadecimal($hex[1] ?? ''); - } - - public function getTimestamp(): Hexadecimal - { - return new Hexadecimal(sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - $this->getTimeLow()->toString() - )); - } - - public function getClockSeq(): Hexadecimal - { - if ($this->isMax()) { - $clockSeq = 0xffff; - } elseif ($this->isNil()) { - $clockSeq = 0x0000; - } else { - $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; - } - - return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); - } - - public function getClockSeqHiAndReserved(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); - } - - public function getClockSeqLow(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); - } - - public function getNode(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 10))); - } - - public function getVersion(): ?int - { - if ($this->isNil() || $this->isMax()) { - return null; - } - - /** @var int[] $parts */ - $parts = unpack('n*', $this->bytes); - - return ($parts[4] >> 4) & 0x00f; - } - - private function isCorrectVariant(): bool - { - if ($this->isNil() || $this->isMax()) { - return true; - } - - $variant = $this->getVariant(); - - return $variant === Uuid::RFC_4122 || $variant === Uuid::RESERVED_MICROSOFT; - } -} diff --git a/vendor/ramsey/uuid/src/Guid/Guid.php b/vendor/ramsey/uuid/src/Guid/Guid.php deleted file mode 100644 index af551cfc..00000000 --- a/vendor/ramsey/uuid/src/Guid/Guid.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Guid; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Uuid; - -/** - * Guid represents a UUID with "native" (little-endian) byte order - * - * From Wikipedia: - * - * > The first three fields are unsigned 32- and 16-bit integers and are subject to swapping, while the last two fields - * > consist of uninterpreted bytes, not subject to swapping. This byte swapping applies even for versions 3, 4, and 5, - * > where the canonical fields do not correspond to the content of the UUID. - * - * The first three fields of a GUID are encoded in little-endian byte order, while the last three fields are in network - * (big-endian) byte order. This is according to the history of the Microsoft GUID definition. - * - * According to the .NET Guid.ToByteArray method documentation: - * - * > Note that the order of bytes in the returned byte array is different from the string representation of a Guid value. - * > The order of the beginning four-byte group and the next two two-byte groups is reversed, whereas the order of the - * > last two-byte group and the closing six-byte group is the same. - * - * @link https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants UUID Variants on Wikipedia - * @link https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid Windows GUID structure - * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid .NET Guid Struct - * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray .NET Guid.ToByteArray Method - * - * @immutable - */ -final class Guid extends Uuid -{ - public function __construct( - Fields $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Guid/GuidBuilder.php b/vendor/ramsey/uuid/src/Guid/GuidBuilder.php deleted file mode 100644 index db743d9e..00000000 --- a/vendor/ramsey/uuid/src/Guid/GuidBuilder.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Guid; - -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\UnableToBuildUuidException; -use Ramsey\Uuid\UuidInterface; -use Throwable; - -/** - * GuidBuilder builds instances of Guid - * - * @see Guid - * - * @immutable - */ -class GuidBuilder implements UuidBuilderInterface -{ - /** - * @param NumberConverterInterface $numberConverter The number converter to use when constructing the Guid - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to Unix timestamps - */ - public function __construct( - private NumberConverterInterface $numberConverter, - private TimeConverterInterface $timeConverter, - ) { - } - - /** - * Builds and returns a Guid - * - * @param CodecInterface $codec The codec to use for building this Guid instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return Guid The GuidBuilder returns an instance of Ramsey\Uuid\Guid\Guid - * - * @pure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface - { - try { - /** @phpstan-ignore possiblyImpure.new */ - return new Guid($this->buildFields($bytes), $this->numberConverter, $codec, $this->timeConverter); - } catch (Throwable $e) { - /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall */ - throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); - } - } - - /** - * Proxy method to allow injecting a mock for testing - * - * @pure - */ - protected function buildFields(string $bytes): Fields - { - /** @phpstan-ignore possiblyImpure.new */ - return new Fields($bytes); - } -} diff --git a/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php b/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php deleted file mode 100644 index 8d3129c0..00000000 --- a/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php +++ /dev/null @@ -1,426 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Lazy; - -use DateTimeInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Fields\FieldsInterface; -use Ramsey\Uuid\Rfc4122\UuidV1; -use Ramsey\Uuid\Rfc4122\UuidV6; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\UuidFactory; -use Ramsey\Uuid\UuidInterface; -use ValueError; - -use function assert; -use function bin2hex; -use function hex2bin; -use function sprintf; -use function str_replace; -use function substr; - -/** - * Lazy version of a UUID: its format has not been determined yet, so it is mostly only usable for string/bytes - * conversion. This object optimizes instantiation, serialization and string conversion time, at the cost of increased - * overhead for more advanced UUID operations. - * - * > [!NOTE] - * > The {@see FieldsInterface} does not declare methods that deprecated API relies upon: the API has been ported from - * > the {@see \Ramsey\Uuid\Uuid} definition, and is deprecated anyway. - * - * > [!NOTE] - * > The deprecated API from {@see \Ramsey\Uuid\Uuid} is in use here (on purpose): it will be removed once the - * > deprecated API is gone from this class too. - * - * @internal this type is used internally for performance reasons and is not supposed to be directly referenced in consumer libraries. - */ -final class LazyUuidFromString implements UuidInterface -{ - public const VALID_REGEX = '/\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/ms'; - - private ?UuidInterface $unwrapped = null; - - /** - * @param non-empty-string $uuid - */ - public function __construct(private string $uuid) - { - } - - public static function fromBytes(string $bytes): self - { - $base16Uuid = bin2hex($bytes); - - return new self( - substr($base16Uuid, 0, 8) - . '-' - . substr($base16Uuid, 8, 4) - . '-' - . substr($base16Uuid, 12, 4) - . '-' - . substr($base16Uuid, 16, 4) - . '-' - . substr($base16Uuid, 20, 12) - ); - } - - public function serialize(): string - { - return $this->uuid; - } - - /** - * @return array{string: non-empty-string} - */ - public function __serialize(): array - { - return ['string' => $this->uuid]; - } - - /** - * {@inheritDoc} - * - * @param non-empty-string $data - */ - public function unserialize(string $data): void - { - $this->uuid = $data; - } - - /** - * @param array{string?: non-empty-string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['string'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['string']); - } - - public function getNumberConverter(): NumberConverterInterface - { - return ($this->unwrapped ?? $this->unwrap())->getNumberConverter(); - } - - /** - * @inheritDoc - */ - public function getFieldsHex(): array - { - return ($this->unwrapped ?? $this->unwrap())->getFieldsHex(); - } - - public function getClockSeqHiAndReservedHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getClockSeqHiAndReservedHex(); - } - - public function getClockSeqLowHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getClockSeqLowHex(); - } - - public function getClockSequenceHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getClockSequenceHex(); - } - - public function getDateTime(): DateTimeInterface - { - return ($this->unwrapped ?? $this->unwrap())->getDateTime(); - } - - public function getLeastSignificantBitsHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getLeastSignificantBitsHex(); - } - - public function getMostSignificantBitsHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getMostSignificantBitsHex(); - } - - public function getNodeHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getNodeHex(); - } - - public function getTimeHiAndVersionHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getTimeHiAndVersionHex(); - } - - public function getTimeLowHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getTimeLowHex(); - } - - public function getTimeMidHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getTimeMidHex(); - } - - public function getTimestampHex(): string - { - return ($this->unwrapped ?? $this->unwrap())->getTimestampHex(); - } - - public function getUrn(): string - { - return ($this->unwrapped ?? $this->unwrap())->getUrn(); - } - - public function getVariant(): ?int - { - return ($this->unwrapped ?? $this->unwrap())->getVariant(); - } - - public function getVersion(): ?int - { - return ($this->unwrapped ?? $this->unwrap())->getVersion(); - } - - public function compareTo(UuidInterface $other): int - { - return ($this->unwrapped ?? $this->unwrap())->compareTo($other); - } - - public function equals(?object $other): bool - { - if (!$other instanceof UuidInterface) { - return false; - } - - return $this->uuid === $other->toString(); - } - - public function getBytes(): string - { - /** - * @var non-empty-string - * @phpstan-ignore possiblyImpure.functionCall, possiblyImpure.functionCall - */ - return (string) hex2bin(str_replace('-', '', $this->uuid)); - } - - public function getFields(): FieldsInterface - { - return ($this->unwrapped ?? $this->unwrap())->getFields(); - } - - public function getHex(): Hexadecimal - { - return ($this->unwrapped ?? $this->unwrap())->getHex(); - } - - public function getInteger(): IntegerObject - { - return ($this->unwrapped ?? $this->unwrap())->getInteger(); - } - - public function toString(): string - { - return $this->uuid; - } - - public function __toString(): string - { - return $this->uuid; - } - - public function jsonSerialize(): string - { - return $this->uuid; - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()} - * and use the arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getClockSeqHiAndReserved(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getClockSeqHiAndReserved()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()} and use - * the arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getClockSeqLow(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getClockSeqLow()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()} and use the - * arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getClockSequence(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getClockSeq()->toString()); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getLeastSignificantBits(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - return $instance->getNumberConverter()->fromHex(substr($instance->getHex()->toString(), 16)); - } - - /** - * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be - * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}. - */ - public function getMostSignificantBits(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - return $instance->getNumberConverter()->fromHex(substr($instance->getHex()->toString(), 0, 16)); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getNode()} and use the - * arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getNode(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getNode()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()} and - * use the arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getTimeHiAndVersion(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getTimeHiAndVersion()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()} and use the - * arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getTimeLow(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getTimeLow()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()} and use the - * arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getTimeMid(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - return $instance->getNumberConverter()->fromHex($fields->getTimeMid()->toString()); - } - - /** - * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a - * {@see Rfc4122FieldsInterface} instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()} and use - * the arbitrary-precision math library of your choice to convert it to a string integer. - */ - public function getTimestamp(): string - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - $fields = $instance->getFields(); - assert($fields instanceof \Ramsey\Uuid\Rfc4122\FieldsInterface); - - if ($fields->getVersion() !== 1) { - throw new UnsupportedOperationException('Not a time-based UUID'); - } - - return $instance->getNumberConverter()->fromHex($fields->getTimestamp()->toString()); - } - - public function toUuidV1(): UuidV1 - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - if ($instance instanceof UuidV1) { - return $instance; - } - - assert($instance instanceof UuidV6); - - return $instance->toUuidV1(); - } - - public function toUuidV6(): UuidV6 - { - $instance = ($this->unwrapped ?? $this->unwrap()); - - assert($instance instanceof UuidV6); - - return $instance; - } - - private function unwrap(): UuidInterface - { - return $this->unwrapped = (new UuidFactory())->fromString($this->uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php deleted file mode 100644 index 649f5803..00000000 --- a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php +++ /dev/null @@ -1,154 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Math; - -use Brick\Math\BigDecimal; -use Brick\Math\BigInteger; -use Brick\Math\Exception\MathException; -use Brick\Math\RoundingMode as BrickMathRounding; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Type\Decimal; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\NumberInterface; - -/** - * A calculator using the brick/math library for arbitrary-precision arithmetic - * - * @immutable - */ -final class BrickMathCalculator implements CalculatorInterface -{ - private const ROUNDING_MODE_MAP = [ - RoundingMode::UNNECESSARY => BrickMathRounding::UNNECESSARY, - RoundingMode::UP => BrickMathRounding::UP, - RoundingMode::DOWN => BrickMathRounding::DOWN, - RoundingMode::CEILING => BrickMathRounding::CEILING, - RoundingMode::FLOOR => BrickMathRounding::FLOOR, - RoundingMode::HALF_UP => BrickMathRounding::HALF_UP, - RoundingMode::HALF_DOWN => BrickMathRounding::HALF_DOWN, - RoundingMode::HALF_CEILING => BrickMathRounding::HALF_CEILING, - RoundingMode::HALF_FLOOR => BrickMathRounding::HALF_FLOOR, - RoundingMode::HALF_EVEN => BrickMathRounding::HALF_EVEN, - ]; - - public function add(NumberInterface $augend, NumberInterface ...$addends): NumberInterface - { - $sum = BigInteger::of($augend->toString()); - - foreach ($addends as $addend) { - $sum = $sum->plus($addend->toString()); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new IntegerObject((string) $sum); - } - - public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends): NumberInterface - { - $difference = BigInteger::of($minuend->toString()); - - foreach ($subtrahends as $subtrahend) { - $difference = $difference->minus($subtrahend->toString()); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new IntegerObject((string) $difference); - } - - public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers): NumberInterface - { - $product = BigInteger::of($multiplicand->toString()); - - foreach ($multipliers as $multiplier) { - $product = $product->multipliedBy($multiplier->toString()); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new IntegerObject((string) $product); - } - - public function divide( - int $roundingMode, - int $scale, - NumberInterface $dividend, - NumberInterface ...$divisors, - ): NumberInterface { - /** @phpstan-ignore possiblyImpure.methodCall */ - $brickRounding = $this->getBrickRoundingMode($roundingMode); - - $quotient = BigDecimal::of($dividend->toString()); - - foreach ($divisors as $divisor) { - $quotient = $quotient->dividedBy($divisor->toString(), $scale, $brickRounding); - } - - if ($scale === 0) { - /** @phpstan-ignore possiblyImpure.new */ - return new IntegerObject((string) $quotient->toBigInteger()); - } - - /** @phpstan-ignore possiblyImpure.new */ - return new Decimal((string) $quotient); - } - - public function fromBase(string $value, int $base): IntegerObject - { - try { - /** @phpstan-ignore possiblyImpure.new */ - return new IntegerObject((string) BigInteger::fromBase($value, $base)); - } catch (MathException | \InvalidArgumentException $exception) { - throw new InvalidArgumentException( - $exception->getMessage(), - (int) $exception->getCode(), - $exception - ); - } - } - - public function toBase(IntegerObject $value, int $base): string - { - try { - return BigInteger::of($value->toString())->toBase($base); - } catch (MathException | \InvalidArgumentException $exception) { - throw new InvalidArgumentException( - $exception->getMessage(), - (int) $exception->getCode(), - $exception - ); - } - } - - public function toHexadecimal(IntegerObject $value): Hexadecimal - { - /** @phpstan-ignore possiblyImpure.new */ - return new Hexadecimal($this->toBase($value, 16)); - } - - public function toInteger(Hexadecimal $value): IntegerObject - { - return $this->fromBase($value->toString(), 16); - } - - /** - * Maps ramsey/uuid rounding modes to those used by brick/math - * - * @return BrickMathRounding::* - */ - private function getBrickRoundingMode(int $roundingMode) - { - return self::ROUNDING_MODE_MAP[$roundingMode] ?? BrickMathRounding::UNNECESSARY; - } -} diff --git a/vendor/ramsey/uuid/src/Math/CalculatorInterface.php b/vendor/ramsey/uuid/src/Math/CalculatorInterface.php deleted file mode 100644 index e6789a6e..00000000 --- a/vendor/ramsey/uuid/src/Math/CalculatorInterface.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Math; - -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\NumberInterface; - -/** - * A calculator performs arithmetic operations on numbers - * - * @immutable - */ -interface CalculatorInterface -{ - /** - * Returns the sum of all the provided parameters - * - * @param NumberInterface $augend The first addend (the integer being added to) - * @param NumberInterface ...$addends The additional integers to a add to the augend - * - * @return NumberInterface The sum of all the parameters - * - * @pure - */ - public function add(NumberInterface $augend, NumberInterface ...$addends): NumberInterface; - - /** - * Returns the difference of all the provided parameters - * - * @param NumberInterface $minuend The integer being subtracted from - * @param NumberInterface ...$subtrahends The integers to subtract from the minuend - * - * @return NumberInterface The difference after subtracting all parameters - * - * @pure - */ - public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahends): NumberInterface; - - /** - * Returns the product of all the provided parameters - * - * @param NumberInterface $multiplicand The integer to be multiplied - * @param NumberInterface ...$multipliers The factors by which to multiply the multiplicand - * - * @return NumberInterface The product of multiplying all the provided parameters - * - * @pure - */ - public function multiply(NumberInterface $multiplicand, NumberInterface ...$multipliers): NumberInterface; - - /** - * Returns the quotient of the provided parameters divided left-to-right - * - * @param int $roundingMode The RoundingMode constant to use for this operation - * @param int $scale The scale to use for this operation - * @param NumberInterface $dividend The integer to be divided - * @param NumberInterface ...$divisors The integers to divide $dividend by, in the order in which the division - * operations should take place (left-to-right) - * - * @return NumberInterface The quotient of dividing the provided parameters left-to-right - * - * @pure - */ - public function divide( - int $roundingMode, - int $scale, - NumberInterface $dividend, - NumberInterface ...$divisors, - ): NumberInterface; - - /** - * Converts a value from an arbitrary base to a base-10 integer value - * - * @param string $value The value to convert - * @param int $base The base to convert from (i.e., 2, 16, 32, etc.) - * - * @return IntegerObject The base-10 integer value of the converted value - * - * @pure - */ - public function fromBase(string $value, int $base): IntegerObject; - - /** - * Converts a base-10 integer value to an arbitrary base - * - * @param IntegerObject $value The integer value to convert - * @param int $base The base to convert to (i.e., 2, 16, 32, etc.) - * - * @return string The value represented in the specified base - * - * @pure - */ - public function toBase(IntegerObject $value, int $base): string; - - /** - * Converts an Integer instance to a Hexadecimal instance - * - * @pure - */ - public function toHexadecimal(IntegerObject $value): Hexadecimal; - - /** - * Converts a Hexadecimal instance to an Integer instance - * - * @pure - */ - public function toInteger(Hexadecimal $value): IntegerObject; -} diff --git a/vendor/ramsey/uuid/src/Math/RoundingMode.php b/vendor/ramsey/uuid/src/Math/RoundingMode.php deleted file mode 100644 index 1497aa6a..00000000 --- a/vendor/ramsey/uuid/src/Math/RoundingMode.php +++ /dev/null @@ -1,127 +0,0 @@ -= 0.5; otherwise, behaves as for DOWN. Note that this is the - * rounding mode commonly taught at school. - */ - public const HALF_UP = 5; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. - * - * Behaves as for UP if the discarded fraction is > 0.5; otherwise, behaves as for DOWN. - */ - public const HALF_DOWN = 6; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards positive infinity. - * - * If the result is positive, behaves as for HALF_UP; if negative, behaves as for HALF_DOWN. - */ - public const HALF_CEILING = 7; - - /** - * Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round towards negative infinity. - * - * If the result is positive, behaves as for HALF_DOWN; if negative, behaves as for HALF_UP. - */ - public const HALF_FLOOR = 8; - - /** - * Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case rounds towards the even neighbor. - * - * Behaves as for HALF_UP if the digit to the left of the discarded fraction is odd; behaves as for HALF_DOWN if it's even. - * - * Note that this is the rounding mode that statistically minimizes cumulative error when applied repeatedly over a - * sequence of calculations. It is sometimes known as "Banker's rounding", and is chiefly used in the USA. - */ - public const HALF_EVEN = 9; - - /** - * Private constructor. This class is not instantiable. - * - * @codeCoverageIgnore - */ - private function __construct() - { - } -} diff --git a/vendor/ramsey/uuid/src/Nonstandard/Fields.php b/vendor/ramsey/uuid/src/Nonstandard/Fields.php deleted file mode 100644 index d309c9a6..00000000 --- a/vendor/ramsey/uuid/src/Nonstandard/Fields.php +++ /dev/null @@ -1,128 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Nonstandard; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Fields\SerializableFieldsTrait; -use Ramsey\Uuid\Rfc4122\FieldsInterface; -use Ramsey\Uuid\Rfc4122\VariantTrait; -use Ramsey\Uuid\Type\Hexadecimal; - -use function bin2hex; -use function dechex; -use function hexdec; -use function sprintf; -use function str_pad; -use function strlen; -use function substr; - -use const STR_PAD_LEFT; - -/** - * Nonstandard UUID fields do not conform to the RFC 9562 (formerly RFC 4122) standard - * - * Since some systems may create nonstandard UUIDs, this implements the {@see FieldsInterface}, so that functionality of - * a nonstandard UUID is not degraded, in the event these UUIDs are expected to contain RFC 9562 (formerly RFC 4122) fields. - * - * Internally, this class represents the fields together as a 16-byte binary string. - * - * @immutable - */ -final class Fields implements FieldsInterface -{ - use SerializableFieldsTrait; - use VariantTrait; - - /** - * @param string $bytes A 16-byte binary string representation of a UUID - * - * @throws InvalidArgumentException if the byte string is not exactly 16 bytes - */ - public function __construct(private string $bytes) - { - if (strlen($this->bytes) !== 16) { - throw new InvalidArgumentException( - 'The byte string must be 16 bytes long; received ' . strlen($this->bytes) . ' bytes', - ); - } - } - - public function getBytes(): string - { - return $this->bytes; - } - - public function getClockSeq(): Hexadecimal - { - $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; - - return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); - } - - public function getClockSeqHiAndReserved(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); - } - - public function getClockSeqLow(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); - } - - public function getNode(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 10))); - } - - public function getTimeHiAndVersion(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 6, 2))); - } - - public function getTimeLow(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 0, 4))); - } - - public function getTimeMid(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 4, 2))); - } - - public function getTimestamp(): Hexadecimal - { - return new Hexadecimal(sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - $this->getTimeLow()->toString() - )); - } - - public function getVersion(): ?int - { - return null; - } - - public function isNil(): bool - { - return false; - } - - public function isMax(): bool - { - return false; - } -} diff --git a/vendor/ramsey/uuid/src/Nonstandard/Uuid.php b/vendor/ramsey/uuid/src/Nonstandard/Uuid.php deleted file mode 100644 index 7f15e6e1..00000000 --- a/vendor/ramsey/uuid/src/Nonstandard/Uuid.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Nonstandard; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Uuid as BaseUuid; - -/** - * Nonstandard\Uuid is a UUID that doesn't conform to RFC 9562 (formerly RFC 4122) - * - * @immutable - * @pure - */ -final class Uuid extends BaseUuid -{ - public function __construct( - Fields $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php b/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php deleted file mode 100644 index 74da9926..00000000 --- a/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Nonstandard; - -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\UnableToBuildUuidException; -use Ramsey\Uuid\UuidInterface; -use Throwable; - -/** - * Nonstandard\UuidBuilder builds instances of Nonstandard\Uuid - * - * @immutable - */ -class UuidBuilder implements UuidBuilderInterface -{ - /** - * @param NumberConverterInterface $numberConverter The number converter to use when constructing the Nonstandard\Uuid - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to Unix timestamps - */ - public function __construct( - private NumberConverterInterface $numberConverter, - private TimeConverterInterface $timeConverter, - ) { - } - - /** - * Builds and returns a Nonstandard\Uuid - * - * @param CodecInterface $codec The codec to use for building this instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return Uuid The Nonstandard\UuidBuilder returns an instance of Nonstandard\Uuid - * - * @pure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface - { - try { - /** @phpstan-ignore possiblyImpure.new */ - return new Uuid($this->buildFields($bytes), $this->numberConverter, $codec, $this->timeConverter); - } catch (Throwable $e) { - /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall */ - throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); - } - } - - /** - * Proxy method to allow injecting a mock for testing - * - * @pure - */ - protected function buildFields(string $bytes): Fields - { - /** @phpstan-ignore possiblyImpure.new */ - return new Fields($bytes); - } -} diff --git a/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php b/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php deleted file mode 100644 index e277afcc..00000000 --- a/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Nonstandard; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Lazy\LazyUuidFromString; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Rfc4122\TimeTrait; -use Ramsey\Uuid\Rfc4122\UuidInterface; -use Ramsey\Uuid\Rfc4122\UuidV1; -use Ramsey\Uuid\Uuid as BaseUuid; - -/** - * Reordered time, or version 6, UUIDs include timestamp, clock sequence, and node values that are combined into a - * 128-bit unsigned integer - * - * @deprecated Use {@see \Ramsey\Uuid\Rfc4122\UuidV6} instead. - * - * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft - * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.6 RFC 9562, 5.6. UUID Version 6 - * - * @immutable - */ -class UuidV6 extends BaseUuid implements UuidInterface -{ - use TimeTrait; - - /** - * Creates a version 6 (reordered Gregorian time) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== BaseUuid::UUID_TYPE_REORDERED_TIME) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV6 must represent a version 6 (reordered time) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } - - /** - * Converts this UUID into an instance of a version 1 UUID - */ - public function toUuidV1(): UuidV1 - { - $hex = $this->getHex()->toString(); - $hex = substr($hex, 7, 5) - . substr($hex, 13, 3) - . substr($hex, 3, 4) - . '1' . substr($hex, 0, 3) - . substr($hex, 16); - - /** @var LazyUuidFromString $uuid */ - $uuid = BaseUuid::fromBytes((string) hex2bin($hex)); - - return $uuid->toUuidV1(); - } - - /** - * Converts a version 1 UUID into an instance of a version 6 UUID - */ - public static function fromUuidV1(UuidV1 $uuidV1): \Ramsey\Uuid\Rfc4122\UuidV6 - { - $hex = $uuidV1->getHex()->toString(); - $hex = substr($hex, 13, 3) - . substr($hex, 8, 4) - . substr($hex, 0, 5) - . '6' . substr($hex, 5, 3) - . substr($hex, 16); - - /** @var LazyUuidFromString $uuid */ - $uuid = BaseUuid::fromBytes((string) hex2bin($hex)); - - return $uuid->toUuidV6(); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php b/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php deleted file mode 100644 index 830ffdd9..00000000 --- a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php +++ /dev/null @@ -1,216 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Dce; - -use Ramsey\Uuid\Exception\DceSecurityException; -use Ramsey\Uuid\Provider\DceSecurityProviderInterface; -use Ramsey\Uuid\Type\Integer as IntegerObject; - -use function escapeshellarg; -use function preg_split; -use function str_getcsv; -use function strrpos; -use function strtolower; -use function strtoupper; -use function substr; -use function trim; - -use const PREG_SPLIT_NO_EMPTY; - -/** - * SystemDceSecurityProvider retrieves the user or group identifiers from the system - */ -class SystemDceSecurityProvider implements DceSecurityProviderInterface -{ - /** - * @throws DceSecurityException if unable to get a user identifier - * - * @inheritDoc - */ - public function getUid(): IntegerObject - { - /** @var IntegerObject | int | float | string | null $uid */ - static $uid = null; - - if ($uid instanceof IntegerObject) { - return $uid; - } - - if ($uid === null) { - $uid = $this->getSystemUid(); - } - - if ($uid === '') { - throw new DceSecurityException( - 'Unable to get a user identifier using the system DCE Security provider; please provide a custom ' - . 'identifier or use a different provider', - ); - } - - $uid = new IntegerObject($uid); - - return $uid; - } - - /** - * @throws DceSecurityException if unable to get a group identifier - * - * @inheritDoc - */ - public function getGid(): IntegerObject - { - /** @var IntegerObject | int | float | string | null $gid */ - static $gid = null; - - if ($gid instanceof IntegerObject) { - return $gid; - } - - if ($gid === null) { - $gid = $this->getSystemGid(); - } - - if ($gid === '') { - throw new DceSecurityException( - 'Unable to get a group identifier using the system DCE Security provider; please provide a custom ' - . 'identifier or use a different provider', - ); - } - - $gid = new IntegerObject($gid); - - return $gid; - } - - /** - * Returns the UID from the system - */ - private function getSystemUid(): string - { - if (!$this->hasShellExec()) { - return ''; - } - - return match ($this->getOs()) { - 'WIN' => $this->getWindowsUid(), - default => trim((string) shell_exec('id -u')), - }; - } - - /** - * Returns the GID from the system - */ - private function getSystemGid(): string - { - if (!$this->hasShellExec()) { - return ''; - } - - return match ($this->getOs()) { - 'WIN' => $this->getWindowsGid(), - default => trim((string) shell_exec('id -g')), - }; - } - - /** - * Returns true if shell_exec() is available for use - */ - private function hasShellExec(): bool - { - return !str_contains(strtolower((string) ini_get('disable_functions')), 'shell_exec'); - } - - /** - * Returns the PHP_OS string - */ - private function getOs(): string - { - /** @var string $phpOs */ - $phpOs = constant('PHP_OS'); - - return strtoupper(substr($phpOs, 0, 3)); - } - - /** - * Returns the user identifier for a user on a Windows system - * - * Windows does not have the same concept as an effective POSIX UID for the running script. Instead, each user is - * uniquely identified by an SID (security identifier). The SID includes three 32-bit unsigned integers that make up - * a unique domain identifier, followed by an RID (relative identifier) that we will use as the UID. The primary - * caveat is that this UID may not be unique to the system, since it is, instead, unique to the domain. - * - * @link https://www.lifewire.com/what-is-an-sid-number-2626005 What Is an SID Number? - * @link https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/81d92bba-d22b-4a8c-908a-554ab29148ab Well-known SID Structures - * @link https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers#well-known-sids Well-known SIDs - * @link https://www.windows-commandline.com/get-sid-of-user/ Get SID of user - */ - private function getWindowsUid(): string - { - $response = shell_exec('whoami /user /fo csv /nh'); - - if ($response === null) { - return ''; - } - - $sid = str_getcsv(trim((string) $response), escape: '\\')[1] ?? ''; - - if (($lastHyphen = strrpos($sid, '-')) === false) { - return ''; - } - - return trim(substr($sid, $lastHyphen + 1)); - } - - /** - * Returns a group identifier for a user on a Windows system - * - * Since Windows does not have the same concept as an effective POSIX GID for the running script, we will get the - * local group memberships for the user running the script. Then, we will get the SID (security identifier) for the - * first group that appears in that list. Finally, we will return the RID (relative identifier) for the group and - * use that as the GID. - * - * @link https://www.windows-commandline.com/list-of-user-groups-command-line/ List of user groups command line - */ - private function getWindowsGid(): string - { - $response = shell_exec('net user %username% | findstr /b /i "Local Group Memberships"'); - - if ($response === null) { - return ''; - } - - $userGroups = preg_split('/\s{2,}/', (string) $response, -1, PREG_SPLIT_NO_EMPTY); - $firstGroup = trim($userGroups[1] ?? '', "* \t\n\r\0\x0B"); - - if ($firstGroup === '') { - return ''; - } - - $response = shell_exec('wmic group get name,sid | findstr /b /i ' . escapeshellarg($firstGroup)); - - if ($response === null) { - return ''; - } - - $userGroup = preg_split('/\s{2,}/', (string) $response, -1, PREG_SPLIT_NO_EMPTY); - $sid = $userGroup[1] ?? ''; - - if (($lastHyphen = strrpos($sid, '-')) === false) { - return ''; - } - - return trim(substr($sid, $lastHyphen + 1)); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php b/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php deleted file mode 100644 index f1c3e97c..00000000 --- a/vendor/ramsey/uuid/src/Provider/DceSecurityProviderInterface.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider; - -use Ramsey\Uuid\Rfc4122\UuidV2; -use Ramsey\Uuid\Type\Integer as IntegerObject; - -/** - * A DCE provider provides access to local domain identifiers for version 2, DCE Security, UUIDs - * - * @see UuidV2 - */ -interface DceSecurityProviderInterface -{ - /** - * Returns a user identifier for the system - * - * @link https://en.wikipedia.org/wiki/User_identifier User identifier - */ - public function getUid(): IntegerObject; - - /** - * Returns a group identifier for the system - * - * @link https://en.wikipedia.org/wiki/Group_identifier Group identifier - */ - public function getGid(): IntegerObject; -} diff --git a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php deleted file mode 100644 index 267ea9bf..00000000 --- a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Node; - -use Ramsey\Uuid\Exception\NodeException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -/** - * FallbackNodeProvider retrieves the system node ID by stepping through a list of providers until a node ID can be obtained - */ -class FallbackNodeProvider implements NodeProviderInterface -{ - /** - * @param iterable $providers Array of node providers - */ - public function __construct(private iterable $providers) - { - } - - public function getNode(): Hexadecimal - { - $lastProviderException = null; - - foreach ($this->providers as $provider) { - try { - return $provider->getNode(); - } catch (NodeException $exception) { - $lastProviderException = $exception; - - continue; - } - } - - throw new NodeException(message: 'Unable to find a suitable node provider', previous: $lastProviderException); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php b/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php deleted file mode 100644 index 1d4908a1..00000000 --- a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Node; - -use Ramsey\Collection\AbstractCollection; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -/** - * A collection of NodeProviderInterface objects - * - * @deprecated this class has been deprecated and will be removed in 5.0.0. The use-case for this class comes from a - * pre-`phpstan/phpstan` and pre-`vimeo/psalm` ecosystem, in which type safety had to be mostly enforced at runtime: - * that is no longer necessary, now that you can safely verify your code to be correct and use more generic types - * like `iterable` instead. - * - * @extends AbstractCollection - */ -class NodeProviderCollection extends AbstractCollection -{ - public function getType(): string - { - return NodeProviderInterface::class; - } - - /** - * Re-constructs the object from its serialized form - * - * @param string $serialized The serialized PHP string to unserialize into a UuidInterface instance - */ - public function unserialize($serialized): void - { - /** @var array $data */ - $data = unserialize($serialized, [ - 'allowed_classes' => [ - Hexadecimal::class, - RandomNodeProvider::class, - StaticNodeProvider::class, - SystemNodeProvider::class, - ], - ]); - - /** @phpstan-ignore-next-line */ - $this->data = array_filter($data, fn ($unserialized): bool => $unserialized instanceof NodeProviderInterface); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php deleted file mode 100644 index 9334ce0e..00000000 --- a/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Node; - -use Ramsey\Uuid\Exception\RandomSourceException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Throwable; - -use function bin2hex; -use function dechex; -use function hex2bin; -use function hexdec; -use function str_pad; -use function substr; - -use const STR_PAD_LEFT; - -/** - * RandomNodeProvider generates a random node ID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.10 RFC 9562, 6.10. UUIDs That Do Not Identify the Host - */ -class RandomNodeProvider implements NodeProviderInterface -{ - public function getNode(): Hexadecimal - { - try { - $nodeBytes = random_bytes(6); - } catch (Throwable $exception) { - throw new RandomSourceException($exception->getMessage(), (int) $exception->getCode(), $exception); - } - - // Split the node bytes for math on 32-bit systems. - $nodeMsb = substr($nodeBytes, 0, 3); - $nodeLsb = substr($nodeBytes, 3); - - // Set the multicast bit; see RFC 9562, section 6.10. - $nodeMsb = hex2bin(str_pad(dechex(hexdec(bin2hex($nodeMsb)) | 0x010000), 6, '0', STR_PAD_LEFT)); - - return new Hexadecimal(str_pad(bin2hex($nodeMsb . $nodeLsb), 12, '0', STR_PAD_LEFT)); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php deleted file mode 100644 index 612ccd9a..00000000 --- a/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Node; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -use function dechex; -use function hexdec; -use function str_pad; -use function substr; - -use const STR_PAD_LEFT; - -/** - * StaticNodeProvider provides a static node value with the multicast bit set - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.10 RFC 9562, 6.10. UUIDs That Do Not Identify the Host - */ -class StaticNodeProvider implements NodeProviderInterface -{ - private Hexadecimal $node; - - /** - * @param Hexadecimal $node The static node value to use - */ - public function __construct(Hexadecimal $node) - { - if (strlen($node->toString()) > 12) { - throw new InvalidArgumentException('Static node value cannot be greater than 12 hexadecimal characters'); - } - - $this->node = $this->setMulticastBit($node); - } - - public function getNode(): Hexadecimal - { - return $this->node; - } - - /** - * Set the multicast bit for the static node value - */ - private function setMulticastBit(Hexadecimal $node): Hexadecimal - { - $nodeHex = str_pad($node->toString(), 12, '0', STR_PAD_LEFT); - $firstOctet = substr($nodeHex, 0, 2); - $firstOctet = str_pad(dechex(hexdec($firstOctet) | 0x01), 2, '0', STR_PAD_LEFT); - - return new Hexadecimal($firstOctet . substr($nodeHex, 2)); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php deleted file mode 100644 index 05e2ea82..00000000 --- a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php +++ /dev/null @@ -1,184 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Node; - -use Ramsey\Uuid\Exception\NodeException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -use function array_filter; -use function array_map; -use function array_walk; -use function count; -use function ob_get_clean; -use function ob_start; -use function preg_match; -use function preg_match_all; -use function reset; -use function str_contains; -use function str_replace; -use function strtolower; -use function strtoupper; -use function substr; - -use const GLOB_NOSORT; -use const PREG_PATTERN_ORDER; - -/** - * SystemNodeProvider retrieves the system node ID, if possible - * - * The system node ID, or host ID, is often the same as the MAC address for a network interface on the host. - */ -class SystemNodeProvider implements NodeProviderInterface -{ - /** - * Pattern to match nodes in `ifconfig` and `ipconfig` output. - */ - private const IFCONFIG_PATTERN = '/[^:]([0-9a-f]{2}([:-])[0-9a-f]{2}(\2[0-9a-f]{2}){4})[^:]/i'; - - /** - * Pattern to match nodes in sysfs stream output. - */ - private const SYSFS_PATTERN = '/^([0-9a-f]{2}:){5}[0-9a-f]{2}$/i'; - - public function getNode(): Hexadecimal - { - $node = $this->getNodeFromSystem(); - - if ($node === '') { - throw new NodeException('Unable to fetch a node for this system'); - } - - return new Hexadecimal($node); - } - - /** - * Returns the system node if found - */ - protected function getNodeFromSystem(): string - { - /** @var string | null $node */ - static $node = null; - - if ($node !== null) { - return $node; - } - - // First, try a Linux-specific approach. - $node = $this->getSysfs(); - - if ($node === '') { - // Search ifconfig output for MAC addresses & return the first one. - $node = $this->getIfconfig(); - } - - $node = str_replace([':', '-'], '', $node); - - return $node; - } - - /** - * Returns the network interface configuration for the system - * - * @codeCoverageIgnore - */ - protected function getIfconfig(): string - { - if (str_contains(strtolower((string) ini_get('disable_functions')), 'passthru')) { - return ''; - } - - /** @var string $phpOs */ - $phpOs = constant('PHP_OS'); - - ob_start(); - switch (strtoupper(substr($phpOs, 0, 3))) { - case 'WIN': - passthru('ipconfig /all 2>&1'); - - break; - case 'DAR': - passthru('ifconfig 2>&1'); - - break; - case 'FRE': - passthru('netstat -i -f link 2>&1'); - - break; - case 'LIN': - default: - passthru('netstat -ie 2>&1'); - - break; - } - - $ifconfig = (string) ob_get_clean(); - - if (preg_match_all(self::IFCONFIG_PATTERN, $ifconfig, $matches, PREG_PATTERN_ORDER)) { - foreach ($matches[1] as $iface) { - if ($iface !== '00:00:00:00:00:00' && $iface !== '00-00-00-00-00-00') { - return $iface; - } - } - } - - return ''; - } - - /** - * Returns MAC address from the first system interface via the sysfs interface - */ - protected function getSysfs(): string - { - /** @var string $phpOs */ - $phpOs = constant('PHP_OS'); - - if (strtoupper($phpOs) !== 'LINUX') { - return ''; - } - - $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT); - - if ($addressPaths === false || count($addressPaths) === 0) { - return ''; - } - - /** @var array $macs */ - $macs = []; - - array_walk($addressPaths, function (string $addressPath) use (&$macs): void { - if (is_readable($addressPath)) { - $macs[] = file_get_contents($addressPath); - } - }); - - /** @var callable $trim */ - $trim = 'trim'; - - $macs = array_map($trim, $macs); - - // Remove invalid entries. - $macs = array_filter($macs, function (mixed $address): bool { - assert(is_string($address)); - - return $address !== '00:00:00:00:00:00' && preg_match(self::SYSFS_PATTERN, $address); - }); - - /** @var bool | string $mac */ - $mac = reset($macs); - - return (string) $mac; - } -} diff --git a/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php b/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php deleted file mode 100644 index d536b455..00000000 --- a/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider; - -use Ramsey\Uuid\Type\Hexadecimal; - -/** - * A node provider retrieves or generates a node ID - */ -interface NodeProviderInterface -{ - /** - * Returns a node ID - * - * @return Hexadecimal The node ID as a hexadecimal string - */ - public function getNode(): Hexadecimal; -} diff --git a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php deleted file mode 100644 index 68d9f10a..00000000 --- a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Time; - -use Ramsey\Uuid\Provider\TimeProviderInterface; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\Time; - -/** - * FixedTimeProvider uses a known time to provide the time - * - * This provider allows the use of a previously generated, or known, time when generating time-based UUIDs. - */ -class FixedTimeProvider implements TimeProviderInterface -{ - public function __construct(private Time $time) - { - } - - /** - * Sets the `usec` component of the time - * - * @param IntegerObject | int | string $value The `usec` value to set - */ - public function setUsec($value): void - { - $this->time = new Time($this->time->getSeconds(), $value); - } - - /** - * Sets the `sec` component of the time - * - * @param IntegerObject | int | string $value The `sec` value to set - */ - public function setSec($value): void - { - $this->time = new Time($value, $this->time->getMicroseconds()); - } - - public function getTime(): Time - { - return $this->time; - } -} diff --git a/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php b/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php deleted file mode 100644 index 3a1e09cb..00000000 --- a/vendor/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider\Time; - -use Ramsey\Uuid\Provider\TimeProviderInterface; -use Ramsey\Uuid\Type\Time; - -use function gettimeofday; - -/** - * SystemTimeProvider retrieves the current time using built-in PHP functions - */ -class SystemTimeProvider implements TimeProviderInterface -{ - public function getTime(): Time - { - $time = gettimeofday(); - - return new Time($time['sec'], $time['usec']); - } -} diff --git a/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php b/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php deleted file mode 100644 index 43588e0b..00000000 --- a/vendor/ramsey/uuid/src/Provider/TimeProviderInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Provider; - -use Ramsey\Uuid\Type\Time; - -/** - * A time provider retrieves the current time - */ -interface TimeProviderInterface -{ - /** - * Returns a time object - */ - public function getTime(): Time; -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/Fields.php b/vendor/ramsey/uuid/src/Rfc4122/Fields.php deleted file mode 100644 index 4f607d54..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/Fields.php +++ /dev/null @@ -1,190 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Fields\SerializableFieldsTrait; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Uuid; - -use function bin2hex; -use function dechex; -use function hexdec; -use function sprintf; -use function str_pad; -use function strlen; -use function substr; -use function unpack; - -use const STR_PAD_LEFT; - -/** - * RFC 9562 (formerly RFC 4122) variant UUIDs consist of a set of named fields - * - * Internally, this class represents the fields together as a 16-byte binary string. - * - * @immutable - */ -final class Fields implements FieldsInterface -{ - use MaxTrait; - use NilTrait; - use SerializableFieldsTrait; - use VariantTrait; - use VersionTrait; - - /** - * @param string $bytes A 16-byte binary string representation of a UUID - * - * @throws InvalidArgumentException if the byte string is not exactly 16 bytes - * @throws InvalidArgumentException if the byte string does not represent an RFC 9562 (formerly RFC 4122) UUID - * @throws InvalidArgumentException if the byte string does not contain a valid version - */ - public function __construct(private string $bytes) - { - if (strlen($this->bytes) !== 16) { - throw new InvalidArgumentException( - 'The byte string must be 16 bytes long; ' . 'received ' . strlen($this->bytes) . ' bytes', - ); - } - - if (!$this->isCorrectVariant()) { - throw new InvalidArgumentException( - 'The byte string received does not conform to the RFC 9562 (formerly RFC 4122) variant', - ); - } - - if (!$this->isCorrectVersion()) { - throw new InvalidArgumentException( - 'The byte string received does not contain a valid RFC 9562 (formerly RFC 4122) version', - ); - } - } - - /** - * @pure - */ - public function getBytes(): string - { - return $this->bytes; - } - - public function getClockSeq(): Hexadecimal - { - if ($this->isMax()) { - $clockSeq = 0xffff; - } elseif ($this->isNil()) { - $clockSeq = 0x0000; - } else { - $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; - } - - return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); - } - - public function getClockSeqHiAndReserved(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 8, 1))); - } - - public function getClockSeqLow(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 9, 1))); - } - - public function getNode(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 10))); - } - - public function getTimeHiAndVersion(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 6, 2))); - } - - public function getTimeLow(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 0, 4))); - } - - public function getTimeMid(): Hexadecimal - { - return new Hexadecimal(bin2hex(substr($this->bytes, 4, 2))); - } - - /** - * Returns the full 60-bit timestamp, without the version - * - * For version 2 UUIDs, the time_low field is the local identifier and should not be returned as part of the time. - * For this reason, we set the bottom 32 bits of the timestamp to 0's. As a result, there is some loss of timestamp - * fidelity, for version 2 UUIDs. The timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 minutes, 9 - * seconds, and 496,730 microseconds). - * - * For version 6 UUIDs, the timestamp order is reversed from the typical RFC 9562 (formerly RFC 4122) order (the - * time bits are in the correct bit order, so that it is monotonically increasing). In returning the timestamp - * value, we put the bits in the order: time_low + time_mid + time_hi. - */ - public function getTimestamp(): Hexadecimal - { - return new Hexadecimal(match ($this->getVersion()) { - Uuid::UUID_TYPE_DCE_SECURITY => sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - '' - ), - Uuid::UUID_TYPE_REORDERED_TIME => sprintf( - '%08s%04s%03x', - $this->getTimeLow()->toString(), - $this->getTimeMid()->toString(), - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff - ), - // The Unix timestamp in version 7 UUIDs is a 48-bit number, but for consistency, we will return a 60-bit - // number, padded to the left with zeros. - Uuid::UUID_TYPE_UNIX_TIME => sprintf( - '%011s%04s', - $this->getTimeLow()->toString(), - $this->getTimeMid()->toString(), - ), - default => sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - $this->getTimeLow()->toString() - ), - }); - } - - public function getVersion(): ?int - { - if ($this->isNil() || $this->isMax()) { - return null; - } - - /** @var int[] $parts */ - $parts = unpack('n*', $this->bytes); - - return $parts[4] >> 12; - } - - private function isCorrectVariant(): bool - { - if ($this->isNil() || $this->isMax()) { - return true; - } - - return $this->getVariant() === Uuid::RFC_4122; - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php b/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php deleted file mode 100644 index 13d86d9d..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php +++ /dev/null @@ -1,130 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Fields\FieldsInterface as BaseFieldsInterface; -use Ramsey\Uuid\Type\Hexadecimal; - -/** - * UUID fields, as defined by RFC 4122 - * - * This interface defines the fields of an RFC 4122 variant UUID. Since RFC 9562 removed the concept of fields and - * instead defined layouts that are specific to a given version, this interface is a legacy artifact of the earlier, and - * now obsolete, RFC 4122. - * - * The fields of an RFC 4122 variant UUID are: - * - * * **time_low**: The low field of the timestamp, an unsigned 32-bit integer - * * **time_mid**: The middle field of the timestamp, an unsigned 16-bit integer - * * **time_hi_and_version**: The high field of the timestamp multiplexed with the version number, an unsigned 16-bit integer - * * **clock_seq_hi_and_reserved**: The high field of the clock sequence multiplexed with the variant, an unsigned 8-bit integer - * * **clock_seq_low**: The low field of the clock sequence, an unsigned 8-bit integer - * * **node**: The spatially unique node identifier, an unsigned 48-bit integer - * - * @link https://www.rfc-editor.org/rfc/rfc4122#section-4.1 RFC 4122, 4.1. Format - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4 RFC 9562, 4. UUID Format - * - * @immutable - */ -interface FieldsInterface extends BaseFieldsInterface -{ - /** - * Returns the full 16-bit clock sequence, with the variant bits (two most significant bits) masked out - */ - public function getClockSeq(): Hexadecimal; - - /** - * Returns the high field of the clock sequence multiplexed with the variant - */ - public function getClockSeqHiAndReserved(): Hexadecimal; - - /** - * Returns the low field of the clock sequence - */ - public function getClockSeqLow(): Hexadecimal; - - /** - * Returns the node field - */ - public function getNode(): Hexadecimal; - - /** - * Returns the high field of the timestamp multiplexed with the version - */ - public function getTimeHiAndVersion(): Hexadecimal; - - /** - * Returns the low field of the timestamp - */ - public function getTimeLow(): Hexadecimal; - - /** - * Returns the middle field of the timestamp - */ - public function getTimeMid(): Hexadecimal; - - /** - * Returns the full 60-bit timestamp, without the version - */ - public function getTimestamp(): Hexadecimal; - - /** - * Returns the variant - * - * The variant number describes the layout of the UUID. The variant number has the following meaning: - * - * - 0 - Reserved for NCS backward compatibility - * - 2 - The RFC 9562 (formerly RFC 4122) variant - * - 6 - Reserved, Microsoft Corporation backward compatibility - * - 7 - Reserved for future definition - * - * For RFC 9562 (formerly RFC 4122) variant UUIDs, this value should always be the integer `2`. - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public function getVariant(): int; - - /** - * Returns the UUID version - * - * The version number describes how the UUID was generated and has the following meaning: - * - * 1. Gregorian time UUID - * 2. DCE security UUID - * 3. Name-based UUID hashed with MD5 - * 4. Randomly generated UUID - * 5. Name-based UUID hashed with SHA-1 - * 6. Reordered Gregorian time UUID - * 7. Unix Epoch time UUID - * 8. Custom format UUID - * - * This returns `null` if the UUID is not an RFC 9562 (formerly RFC 4122) variant, since the version is only - * meaningful for this variant. - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - * - * @pure - */ - public function getVersion(): ?int; - - /** - * Returns true if these fields represent a nil UUID - * - * The nil UUID is a special form of UUID that is specified to have all 128 bits set to zero. - * - * @pure - */ - public function isNil(): bool; -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php b/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php deleted file mode 100644 index 8646e6ad..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/MaxTrait.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -/** - * Provides common functionality for max UUIDs - * - * @immutable - */ -trait MaxTrait -{ - /** - * Returns the bytes that comprise the fields - * - * @pure - */ - abstract public function getBytes(): string; - - /** - * Returns true if the byte string represents a max UUID - * - * @pure - */ - public function isMax(): bool - { - return $this->getBytes() === "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"; - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php b/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php deleted file mode 100644 index ac50bcea..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/MaxUuid.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Uuid; - -/** - * The max UUID is a special form of UUID that has all 128 bits set to one (`1`) - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.10 RFC 9562, 5.10. Max UUID - * - * @immutable - */ -final class MaxUuid extends Uuid implements UuidInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php b/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php deleted file mode 100644 index 19d13778..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/NilTrait.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -/** - * Provides common functionality for nil UUIDs - * - * @immutable - */ -trait NilTrait -{ - /** - * Returns the bytes that comprise the fields - * - * @pure - */ - abstract public function getBytes(): string; - - /** - * Returns true if the byte string represents a nil UUID - */ - public function isNil(): bool - { - return $this->getBytes() === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php b/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php deleted file mode 100644 index a139de7f..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/NilUuid.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Uuid; - -/** - * The nil UUID is a special form of UUID that has all 128 bits set to zero (`0`) - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.9 RFC 9562, 5.9. Nil UUID - * - * @immutable - */ -final class NilUuid extends Uuid implements UuidInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php b/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php deleted file mode 100644 index c468c9bf..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/TimeTrait.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use DateTimeImmutable; -use DateTimeInterface; -use Ramsey\Uuid\Exception\DateTimeException; -use Throwable; - -use function str_pad; - -use const STR_PAD_LEFT; - -/** - * Provides common functionality for getting the time from a time-based UUID - * - * @immutable - */ -trait TimeTrait -{ - /** - * Returns a DateTimeInterface object representing the timestamp associated with the UUID - * - * @return DateTimeImmutable A PHP DateTimeImmutable instance representing the timestamp of a time-based UUID - */ - public function getDateTime(): DateTimeInterface - { - $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); - - try { - return new DateTimeImmutable( - '@' - . $time->getSeconds()->toString() - . '.' - . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) - ); - } catch (Throwable $e) { - throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); - } - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php b/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php deleted file mode 100644 index 787a0b71..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php +++ /dev/null @@ -1,122 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\Time\UnixTimeConverter; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\UnableToBuildUuidException; -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Math\BrickMathCalculator; -use Ramsey\Uuid\Rfc4122\UuidInterface as Rfc4122UuidInterface; -use Ramsey\Uuid\Uuid; -use Ramsey\Uuid\UuidInterface; -use Throwable; - -/** - * UuidBuilder builds instances of RFC 9562 (formerly 4122) UUIDs - * - * @immutable - */ -class UuidBuilder implements UuidBuilderInterface -{ - private TimeConverterInterface $unixTimeConverter; - - /** - * Constructs the DefaultUuidBuilder - * - * @param NumberConverterInterface $numberConverter The number converter to use when constructing the Uuid - * @param TimeConverterInterface $timeConverter The time converter to use for converting Gregorian time extracted - * from version 1, 2, and 6 UUIDs to Unix timestamps - * @param TimeConverterInterface | null $unixTimeConverter The time converter to use for converter Unix Epoch time - * extracted from version 7 UUIDs to Unix timestamps - */ - public function __construct( - private NumberConverterInterface $numberConverter, - private TimeConverterInterface $timeConverter, - ?TimeConverterInterface $unixTimeConverter = null, - ) { - $this->unixTimeConverter = $unixTimeConverter ?? new UnixTimeConverter(new BrickMathCalculator()); - } - - /** - * Builds and returns a Uuid - * - * @param CodecInterface $codec The codec to use for building this Uuid instance - * @param string $bytes The byte string from which to construct a UUID - * - * @return Rfc4122UuidInterface UuidBuilder returns instances of Rfc4122UuidInterface - * - * @pure - */ - public function build(CodecInterface $codec, string $bytes): UuidInterface - { - try { - /** @var Fields $fields */ - $fields = $this->buildFields($bytes); - - if ($fields->isNil()) { - /** @phpstan-ignore possiblyImpure.new */ - return new NilUuid($fields, $this->numberConverter, $codec, $this->timeConverter); - } - - if ($fields->isMax()) { - /** @phpstan-ignore possiblyImpure.new */ - return new MaxUuid($fields, $this->numberConverter, $codec, $this->timeConverter); - } - - return match ($fields->getVersion()) { - /** @phpstan-ignore possiblyImpure.new */ - Uuid::UUID_TYPE_TIME => new UuidV1($fields, $this->numberConverter, $codec, $this->timeConverter), - Uuid::UUID_TYPE_DCE_SECURITY - /** @phpstan-ignore possiblyImpure.new */ - => new UuidV2($fields, $this->numberConverter, $codec, $this->timeConverter), - /** @phpstan-ignore possiblyImpure.new */ - Uuid::UUID_TYPE_HASH_MD5 => new UuidV3($fields, $this->numberConverter, $codec, $this->timeConverter), - /** @phpstan-ignore possiblyImpure.new */ - Uuid::UUID_TYPE_RANDOM => new UuidV4($fields, $this->numberConverter, $codec, $this->timeConverter), - /** @phpstan-ignore possiblyImpure.new */ - Uuid::UUID_TYPE_HASH_SHA1 => new UuidV5($fields, $this->numberConverter, $codec, $this->timeConverter), - Uuid::UUID_TYPE_REORDERED_TIME - /** @phpstan-ignore possiblyImpure.new */ - => new UuidV6($fields, $this->numberConverter, $codec, $this->timeConverter), - Uuid::UUID_TYPE_UNIX_TIME - /** @phpstan-ignore possiblyImpure.new */ - => new UuidV7($fields, $this->numberConverter, $codec, $this->unixTimeConverter), - /** @phpstan-ignore possiblyImpure.new */ - Uuid::UUID_TYPE_CUSTOM => new UuidV8($fields, $this->numberConverter, $codec, $this->timeConverter), - default => throw new UnsupportedOperationException( - 'The UUID version in the given fields is not supported by this UUID builder', - ), - }; - } catch (Throwable $e) { - /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall */ - throw new UnableToBuildUuidException($e->getMessage(), (int) $e->getCode(), $e); - } - } - - /** - * Proxy method to allow injecting a mock for testing - * - * @pure - */ - protected function buildFields(string $bytes): FieldsInterface - { - /** @phpstan-ignore possiblyImpure.new */ - return new Fields($bytes); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php b/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php deleted file mode 100644 index 5918306a..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\UuidInterface as BaseUuidInterface; - -/** - * A universally unique identifier (UUID), as defined in RFC 9562 (formerly RFC 4122) - * - * @link https://www.rfc-editor.org/rfc/rfc9562 RFC 9562 - * - * @immutable - */ -interface UuidInterface extends BaseUuidInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php deleted file mode 100644 index df2af6fc..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Gregorian time, or version 1, UUIDs include timestamp, clock sequence, and node values, combined into a 128-bit unsigned integer - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.1 RFC 9562, 5.1. UUID Version 1 - * - * @immutable - */ -final class UuidV1 extends Uuid implements UuidInterface -{ - use TimeTrait; - - /** - * Creates a version 1 (Gregorian time) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_TIME) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV1 must represent a version 1 (time-based) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php deleted file mode 100644 index c3417d7b..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php +++ /dev/null @@ -1,107 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Uuid; - -use function hexdec; - -/** - * DCE Security version, or version 2, UUIDs include local domain identifier, local ID for the specified domain, and - * node values that are combined into a 128-bit unsigned integer - * - * It is important to note that a version 2 UUID suffers from some loss of timestamp fidelity, due to replacing the - * time_low field with the local identifier. When constructing the timestamp value for date purposes, we replace the - * local identifier bits with zeros. As a result, the timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 - * minutes, 9 seconds, and 496,730 microseconds). - * - * Astute observers might note this value directly corresponds to `2^32-1`, or `0xffffffff`. The local identifier is - * 32-bits, and we have set each of these bits to `0`, so the maximum range of timestamp drift is `0x00000000` to - * `0xffffffff` (counted in 100-nanosecond intervals). - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.2 RFC 9562, 5.2. UUID Version 2 - * @link https://publications.opengroup.org/c311 DCE 1.1: Authentication and Security Services - * @link https://publications.opengroup.org/c706 DCE 1.1: Remote Procedure Call - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01 DCE 1.1: Auth & Sec, §5.2.1.1 - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1: Auth & Sec, §11.5.1.1 - * @link https://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm DCE 1.1: RPC, Appendix A - * @link https://github.com/google/uuid Go package for UUIDs (includes DCE implementation) - * - * @immutable - */ -final class UuidV2 extends Uuid implements UuidInterface -{ - use TimeTrait; - - /** - * Creates a version 2 (DCE Security) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_DCE_SECURITY) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV2 must represent a version 2 (DCE Security) UUID' - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } - - /** - * Returns the local domain used to create this version 2 UUID - */ - public function getLocalDomain(): int - { - /** @var Rfc4122FieldsInterface $fields */ - $fields = $this->getFields(); - - return (int) hexdec($fields->getClockSeqLow()->toString()); - } - - /** - * Returns the string name of the local domain - */ - public function getLocalDomainName(): string - { - return Uuid::DCE_DOMAIN_NAMES[$this->getLocalDomain()]; - } - - /** - * Returns the local identifier for the domain used to create this version 2 UUID - */ - public function getLocalIdentifier(): IntegerObject - { - /** @var Rfc4122FieldsInterface $fields */ - $fields = $this->getFields(); - - return new IntegerObject($this->numberConverter->fromHex($fields->getTimeLow()->toString())); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php deleted file mode 100644 index 1b065e28..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV3.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Version 3 UUIDs are named-based, using a combination of a namespace and name that are hashed into a 128-bit unsigned - * integer using the MD5 hashing algorithm - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.3 RFC 9562, 5.3. UUID Version 3 - * - * @immutable - */ -final class UuidV3 extends Uuid implements UuidInterface -{ - /** - * Creates a version 3 (name-based, MD5-hashed) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_HASH_MD5) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV3 must represent a version 3 (name-based, MD5-hashed) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php deleted file mode 100644 index e28ddc35..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV4.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Random, or version 4, UUIDs are randomly or pseudo-randomly generated 128-bit integers - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.4 RFC 9562, 5.4. UUID Version 4 - * - * @immutable - */ -final class UuidV4 extends Uuid implements UuidInterface -{ - /** - * Creates a version 4 (random) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_RANDOM) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV4 must represent a version 4 (random) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php deleted file mode 100644 index be439083..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV5.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Version 5 UUIDs are named-based, using a combination of a namespace and name that are hashed into a 128-bit unsigned - * integer using the SHA1 hashing algorithm - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.5 RFC 9562, 5.5. UUID Version 5 - * - * @immutable - */ -final class UuidV5 extends Uuid implements UuidInterface -{ - /** - * Creates a version 5 (name-based, SHA1-hashed) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_HASH_SHA1) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV5 must represent a version 5 (named-based, SHA1-hashed) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php deleted file mode 100644 index 3ae4ffc9..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV6.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Nonstandard\UuidV6 as NonstandardUuidV6; - -/** - * Reordered Gregorian time, or version 6, UUIDs include timestamp, clock sequence, and node values that are combined - * into a 128-bit unsigned integer - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.6 RFC 9562, 5.6. UUID Version 6 - * - * @immutable - */ -final class UuidV6 extends NonstandardUuidV6 implements UuidInterface -{ -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php deleted file mode 100644 index 1f2f4b57..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV7.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Unix Epoch time, or version 7, UUIDs include a timestamp in milliseconds since the Unix Epoch, along with random bytes - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.7 RFC 9562, 5.7. UUID Version 7 - * - * @immutable - */ -final class UuidV7 extends Uuid implements UuidInterface -{ - use TimeTrait; - - /** - * Creates a version 7 (Unix Epoch time) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_UNIX_TIME) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV7 must represent a version 7 (Unix Epoch time) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php deleted file mode 100644 index ea57ec29..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV8.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Uuid; - -/** - * Custom format, or version 8, UUIDs provide an RFC-compatible format for experimental or vendor-specific uses - * - * The only requirement for version 8 UUIDs is that the version and variant bits must be set. Otherwise, implementations - * are free to set the other bits according to their needs. As a result, the uniqueness of version 8 UUIDs is - * implementation-specific and should not be assumed. - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.8 RFC 9562, 5.8. UUID Version 8 - * - * @immutable - */ -final class UuidV8 extends Uuid implements UuidInterface -{ - /** - * Creates a version 8 (custom format) UUID - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_CUSTOM) { - throw new InvalidArgumentException( - 'Fields used to create a UuidV8 must represent a version 8 (custom format) UUID', - ); - } - - parent::__construct($fields, $numberConverter, $codec, $timeConverter); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/Validator.php b/vendor/ramsey/uuid/src/Rfc4122/Validator.php deleted file mode 100644 index 17362860..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/Validator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Uuid; -use Ramsey\Uuid\Validator\ValidatorInterface; - -use function preg_match; -use function str_replace; - -/** - * Rfc4122\Validator validates strings as UUIDs of the RFC 9562 (formerly RFC 4122) variant - * - * @immutable - */ -final class Validator implements ValidatorInterface -{ - private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-' - . '[1-8][0-9A-Fa-f]{3}-[ABab89][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\z'; - - /** - * @return non-empty-string - */ - public function getPattern(): string - { - return self::VALID_PATTERN; - } - - public function validate(string $uuid): bool - { - /** @phpstan-ignore possiblyImpure.functionCall */ - $uuid = strtolower(str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid)); - - /** @phpstan-ignore possiblyImpure.functionCall */ - return $uuid === Uuid::NIL || $uuid === Uuid::MAX || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php b/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php deleted file mode 100644 index 3d393695..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Exception\InvalidBytesException; -use Ramsey\Uuid\Uuid; - -use function decbin; -use function str_pad; -use function str_starts_with; -use function strlen; -use function substr; -use function unpack; - -use const STR_PAD_LEFT; - -/** - * Provides common functionality for handling the variant, as defined by RFC 9562 (formerly RFC 4122) - * - * @immutable - */ -trait VariantTrait -{ - /** - * Returns the bytes that comprise the fields - */ - abstract public function getBytes(): string; - - /** - * Returns the variant - * - * The variant number describes the layout of the UUID. The variant number has the following meaning: - * - * - 0 - Reserved for NCS backward compatibility - * - 2 - The RFC 9562 (formerly RFC 4122) variant - * - 6 - Reserved, Microsoft Corporation backward compatibility - * - 7 - Reserved for future definition - * - * For RFC 9562 (formerly RFC 4122) variant UUIDs, this value should always be the integer `2`. - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public function getVariant(): int - { - if (strlen($this->getBytes()) !== 16) { - throw new InvalidBytesException('Invalid number of bytes'); - } - - // According to RFC 9562, sections {@link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 4.1} and - // {@link https://www.rfc-editor.org/rfc/rfc9562#section-5.10 5.10}, the Max UUID falls within the range - // of the future variant. - if ($this->isMax()) { - return Uuid::RESERVED_FUTURE; - } - - // According to RFC 9562, sections {@link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 4.1} and - // {@link https://www.rfc-editor.org/rfc/rfc9562#section-5.9 5.9}, the Nil UUID falls within the range - // of the Apollo NCS variant. - if ($this->isNil()) { - return Uuid::RESERVED_NCS; - } - - /** @var int[] $parts */ - $parts = unpack('n*', $this->getBytes()); - - // $parts[5] is a 16-bit, unsigned integer containing the variant bits of the UUID. We convert this integer into - // a string containing a binary representation, padded to 16 characters. We analyze the first three characters - // (three most-significant bits) to determine the variant. - $msb = substr(str_pad(decbin($parts[5]), 16, '0', STR_PAD_LEFT), 0, 3); - - if ($msb === '111') { - return Uuid::RESERVED_FUTURE; - } elseif ($msb === '110') { - return Uuid::RESERVED_MICROSOFT; - } elseif (str_starts_with($msb, '10')) { - return Uuid::RFC_4122; - } - - return Uuid::RESERVED_NCS; - } -} diff --git a/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php b/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php deleted file mode 100644 index 5f4e17bd..00000000 --- a/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Rfc4122; - -use Ramsey\Uuid\Uuid; - -/** - * Provides common functionality for handling the version, as defined by RFC 9562 (formerly RFC 4122) - * - * @immutable - */ -trait VersionTrait -{ - /** - * Returns the UUID version - * - * The version number describes how the UUID was generated and has the following meaning: - * - * 1. Gregorian time UUID - * 2. DCE security UUID - * 3. Name-based UUID hashed with MD5 - * 4. Randomly generated UUID - * 5. Name-based UUID hashed with SHA-1 - * 6. Reordered Gregorian time UUID - * 7. Unix Epoch time UUID - * 8. Custom format UUID - * - * This returns `null` if the UUID is not an RFC 9562 (formerly RFC 4122) variant, since the version is only - * meaningful for this variant. - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - * - * @pure - */ - abstract public function getVersion(): ?int; - - /** - * Returns true if these fields represent a max UUID - */ - abstract public function isMax(): bool; - - /** - * Returns true if these fields represent a nil UUID - */ - abstract public function isNil(): bool; - - /** - * Returns true if the version matches one of those defined by RFC 9562 (formerly RFC 4122) - * - * @return bool True if the UUID version is valid, false otherwise - */ - private function isCorrectVersion(): bool - { - if ($this->isNil() || $this->isMax()) { - return true; - } - - return match ($this->getVersion()) { - Uuid::UUID_TYPE_TIME, Uuid::UUID_TYPE_DCE_SECURITY, - Uuid::UUID_TYPE_HASH_MD5, Uuid::UUID_TYPE_RANDOM, - Uuid::UUID_TYPE_HASH_SHA1, Uuid::UUID_TYPE_REORDERED_TIME, - Uuid::UUID_TYPE_UNIX_TIME, Uuid::UUID_TYPE_CUSTOM => true, - default => false, - }; - } -} diff --git a/vendor/ramsey/uuid/src/Type/Decimal.php b/vendor/ramsey/uuid/src/Type/Decimal.php deleted file mode 100644 index b5b4f973..00000000 --- a/vendor/ramsey/uuid/src/Type/Decimal.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use ValueError; - -use function is_numeric; -use function sprintf; -use function str_starts_with; - -/** - * A value object representing a decimal - * - * This class exists for type-safety purposes, to ensure that decimals returned from ramsey/uuid methods as strings are - * truly decimals and not some other kind of string. - * - * To support values as true decimals and not as floats or doubles, we store the decimals as strings. - * - * @immutable - */ -final class Decimal implements NumberInterface -{ - private string $value; - private bool $isNegative; - - public function __construct(float | int | string | self $value) - { - $value = (string) $value; - - if (!is_numeric($value)) { - throw new InvalidArgumentException( - 'Value must be a signed decimal or a string containing only ' - . 'digits 0-9 and, optionally, a decimal point or sign (+ or -)' - ); - } - - // Remove the leading +-symbol. - if (str_starts_with($value, '+')) { - $value = substr($value, 1); - } - - // For cases like `-0` or `-0.0000`, convert the value to `0`. - if (abs((float) $value) === 0.0) { - $value = '0'; - } - - if (str_starts_with($value, '-')) { - $this->isNegative = true; - } else { - $this->isNegative = false; - } - - $this->value = $value; - } - - public function isNegative(): bool - { - return $this->isNegative; - } - - public function toString(): string - { - return $this->value; - } - - public function __toString(): string - { - return $this->toString(); - } - - public function jsonSerialize(): string - { - return $this->toString(); - } - - public function serialize(): string - { - return $this->toString(); - } - - /** - * @return array{string: string} - */ - public function __serialize(): array - { - return ['string' => $this->toString()]; - } - - /** - * Constructs the object from a serialized string representation - * - * @param string $data The serialized string representation of the object - */ - public function unserialize(string $data): void - { - $this->__construct($data); - } - - /** - * @param array{string?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['string'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['string']); - } -} diff --git a/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/vendor/ramsey/uuid/src/Type/Hexadecimal.php deleted file mode 100644 index c4117645..00000000 --- a/vendor/ramsey/uuid/src/Type/Hexadecimal.php +++ /dev/null @@ -1,131 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use ValueError; - -use function preg_match; -use function sprintf; -use function substr; - -/** - * A value object representing a hexadecimal number - * - * This class exists for type-safety purposes, to ensure that hexadecimal numbers returned from ramsey/uuid methods as - * strings are truly hexadecimal and not some other kind of string. - * - * @immutable - */ -final class Hexadecimal implements TypeInterface -{ - /** - * @var non-empty-string - */ - private string $value; - - /** - * @param self | string $value The hexadecimal value to store - */ - public function __construct(self | string $value) - { - $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); - } - - /** - * @return non-empty-string - * - * @pure - */ - public function toString(): string - { - return $this->value; - } - - /** - * @return non-empty-string - */ - public function __toString(): string - { - return $this->toString(); - } - - /** - * @return non-empty-string - */ - public function jsonSerialize(): string - { - return $this->toString(); - } - - /** - * @return non-empty-string - */ - public function serialize(): string - { - return $this->toString(); - } - - /** - * @return array{string: string} - */ - public function __serialize(): array - { - return ['string' => $this->toString()]; - } - - /** - * Constructs the object from a serialized string representation - * - * @param string $data The serialized string representation of the object - */ - public function unserialize(string $data): void - { - $this->__construct($data); - } - - /** - * @param array{string?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['string'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['string']); - } - - /** - * @return non-empty-string - */ - private function prepareValue(string $value): string - { - $value = strtolower($value); - - if (str_starts_with($value, '0x')) { - $value = substr($value, 2); - } - - if (!preg_match('/^[A-Fa-f0-9]+$/', $value)) { - throw new InvalidArgumentException('Value must be a hexadecimal number'); - } - - /** @var non-empty-string */ - return $value; - } -} diff --git a/vendor/ramsey/uuid/src/Type/Integer.php b/vendor/ramsey/uuid/src/Type/Integer.php deleted file mode 100644 index ed6c82d2..00000000 --- a/vendor/ramsey/uuid/src/Type/Integer.php +++ /dev/null @@ -1,160 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -use Ramsey\Uuid\Exception\InvalidArgumentException; -use ValueError; - -use function assert; -use function is_numeric; -use function preg_match; -use function sprintf; -use function substr; - -/** - * A value object representing an integer - * - * This class exists for type-safety purposes, to ensure that integers returned from ramsey/uuid methods as strings are - * truly integers and not some other kind of string. - * - * To support large integers beyond PHP_INT_MAX and PHP_INT_MIN on both 64-bit and 32-bit systems, we store the integers - * as strings. - * - * @immutable - */ -final class Integer implements NumberInterface -{ - /** - * @var numeric-string - */ - private string $value; - - /** - * @phpstan-ignore property.readOnlyByPhpDocDefaultValue - */ - private bool $isNegative = false; - - public function __construct(self | float | int | string $value) - { - $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); - } - - public function isNegative(): bool - { - return $this->isNegative; - } - - /** - * @return numeric-string - * - * @pure - */ - public function toString(): string - { - return $this->value; - } - - /** - * @return numeric-string - */ - public function __toString(): string - { - return $this->toString(); - } - - public function jsonSerialize(): string - { - return $this->toString(); - } - - public function serialize(): string - { - return $this->toString(); - } - - /** - * @return array{string: string} - */ - public function __serialize(): array - { - return ['string' => $this->toString()]; - } - - /** - * Constructs the object from a serialized string representation - * - * @param string $data The serialized string representation of the object - */ - public function unserialize(string $data): void - { - $this->__construct($data); - } - - /** - * @param array{string?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['string'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['string']); - } - - /** - * @return numeric-string - */ - private function prepareValue(float | int | string $value): string - { - $value = (string) $value; - $sign = '+'; - - // If the value contains a sign, remove it for the digit pattern check. - if (str_starts_with($value, '-') || str_starts_with($value, '+')) { - $sign = substr($value, 0, 1); - $value = substr($value, 1); - } - - if (!preg_match('/^\d+$/', $value)) { - throw new InvalidArgumentException( - 'Value must be a signed integer or a string containing only ' - . 'digits 0-9 and, optionally, a sign (+ or -)' - ); - } - - // Trim any leading zeros. - $value = ltrim($value, '0'); - - // Set to zero if the string is empty after trimming zeros. - if ($value === '') { - $value = '0'; - } - - // Add the negative sign back to the value. - if ($sign === '-' && $value !== '0') { - $value = $sign . $value; - - /** @phpstan-ignore property.readOnlyByPhpDocAssignNotInConstructor */ - $this->isNegative = true; - } - - assert(is_numeric($value)); - - return $value; - } -} diff --git a/vendor/ramsey/uuid/src/Type/NumberInterface.php b/vendor/ramsey/uuid/src/Type/NumberInterface.php deleted file mode 100644 index d85e103d..00000000 --- a/vendor/ramsey/uuid/src/Type/NumberInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -/** - * NumberInterface ensures consistency in numeric values returned by ramsey/uuid - * - * @immutable - */ -interface NumberInterface extends TypeInterface -{ - /** - * Returns true if this number is less than zero - */ - public function isNegative(): bool; -} diff --git a/vendor/ramsey/uuid/src/Type/Time.php b/vendor/ramsey/uuid/src/Type/Time.php deleted file mode 100644 index 2556c5b8..00000000 --- a/vendor/ramsey/uuid/src/Type/Time.php +++ /dev/null @@ -1,129 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use ValueError; - -use function json_decode; -use function json_encode; -use function sprintf; - -/** - * A value object representing a timestamp - * - * This class exists for type-safety purposes, to ensure that timestamps used by ramsey/uuid are truly timestamp - * integers and not some other kind of string or integer. - * - * @immutable - */ -final class Time implements TypeInterface -{ - private IntegerObject $seconds; - private IntegerObject $microseconds; - - public function __construct( - IntegerObject | float | int | string $seconds, - IntegerObject | float | int | string $microseconds = 0, - ) { - $this->seconds = new IntegerObject($seconds); - $this->microseconds = new IntegerObject($microseconds); - } - - /** - * @pure - */ - public function getSeconds(): IntegerObject - { - return $this->seconds; - } - - /** - * @pure - */ - public function getMicroseconds(): IntegerObject - { - return $this->microseconds; - } - - public function toString(): string - { - return $this->seconds->toString() . '.' . sprintf('%06s', $this->microseconds->toString()); - } - - public function __toString(): string - { - return $this->toString(); - } - - /** - * @return string[] - */ - public function jsonSerialize(): array - { - return [ - 'seconds' => $this->getSeconds()->toString(), - 'microseconds' => $this->getMicroseconds()->toString(), - ]; - } - - public function serialize(): string - { - return (string) json_encode($this); - } - - /** - * @return array{seconds: string, microseconds: string} - */ - public function __serialize(): array - { - return [ - 'seconds' => $this->getSeconds()->toString(), - 'microseconds' => $this->getMicroseconds()->toString(), - ]; - } - - /** - * Constructs the object from a serialized string representation - * - * @param string $data The serialized string representation of the object - */ - public function unserialize(string $data): void - { - /** @var array{seconds?: float | int | string, microseconds?: float | int | string} $time */ - $time = json_decode($data, true); - - if (!isset($time['seconds']) || !isset($time['microseconds'])) { - throw new UnsupportedOperationException('Attempted to unserialize an invalid value'); - } - - $this->__construct($time['seconds'], $time['microseconds']); - } - - /** - * @param array{seconds?: string, microseconds?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['seconds']) || !isset($data['microseconds'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->__construct($data['seconds'], $data['microseconds']); - } -} diff --git a/vendor/ramsey/uuid/src/Type/TypeInterface.php b/vendor/ramsey/uuid/src/Type/TypeInterface.php deleted file mode 100644 index 0c88a282..00000000 --- a/vendor/ramsey/uuid/src/Type/TypeInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Type; - -use JsonSerializable; -use Serializable; - -/** - * TypeInterface ensures consistency in typed values returned by ramsey/uuid - * - * @immutable - */ -interface TypeInterface extends JsonSerializable, Serializable -{ - /** - * @pure - */ - public function toString(): string; - - /** - * @pure - */ - public function __toString(): string; -} diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php deleted file mode 100644 index 0f05bbfb..00000000 --- a/vendor/ramsey/uuid/src/Uuid.php +++ /dev/null @@ -1,730 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use BadMethodCallException; -use DateTimeInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\InvalidArgumentException; -use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Fields\FieldsInterface; -use Ramsey\Uuid\Lazy\LazyUuidFromString; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use ValueError; - -use function assert; -use function bin2hex; -use function method_exists; -use function preg_match; -use function sprintf; -use function str_replace; -use function strcmp; -use function strlen; -use function strtolower; -use function substr; - -/** - * Uuid provides constants and static methods for working with and generating UUIDs - * - * @immutable - */ -class Uuid implements UuidInterface -{ - use DeprecatedUuidMethodsTrait; - - /** - * When this namespace is specified, the name string is a fully qualified domain name - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.6 RFC 9562, 6.6. Namespace ID Usage and Allocation - */ - public const NAMESPACE_DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; - - /** - * When this namespace is specified, the name string is a URL - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.6 RFC 9562, 6.6. Namespace ID Usage and Allocation - */ - public const NAMESPACE_URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; - - /** - * When this namespace is specified, the name string is an ISO OID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.6 RFC 9562, 6.6. Namespace ID Usage and Allocation - */ - public const NAMESPACE_OID = '6ba7b812-9dad-11d1-80b4-00c04fd430c8'; - - /** - * When this namespace is specified, the name string is an X.500 DN (in DER or a text output format) - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-6.6 RFC 9562, 6.6. Namespace ID Usage and Allocation - */ - public const NAMESPACE_X500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8'; - - /** - * The Nil UUID is a special form of UUID that is specified to have all 128 bits set to zero - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.9 RFC 9562, 5.9. Nil UUID - */ - public const NIL = '00000000-0000-0000-0000-000000000000'; - - /** - * The Max UUID is a special form of UUID that is specified to have all 128 bits set to one - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-5.10 RFC 9562, 5.10. Max UUID - */ - public const MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; - - /** - * Variant: reserved, NCS backward compatibility - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public const RESERVED_NCS = 0; - - /** - * Variant: the UUID layout specified in RFC 9562 (formerly RFC 4122) - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - * @see Uuid::RFC_9562 - */ - public const RFC_4122 = 2; - - /** - * Variant: the UUID layout specified in RFC 9562 (formerly RFC 4122) - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public const RFC_9562 = 2; - - /** - * Variant: reserved, Microsoft Corporation backward compatibility - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public const RESERVED_MICROSOFT = 6; - - /** - * Variant: reserved for future definition - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.1 RFC 9562, 4.1. Variant Field - */ - public const RESERVED_FUTURE = 7; - - /** - * @deprecated Use {@see ValidatorInterface::getPattern()} instead. - */ - public const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'; - - /** - * Version 1 (Gregorian time) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_TIME = 1; - - /** - * Version 2 (DCE Security) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_DCE_SECURITY = 2; - - /** - * @deprecated Use {@see Uuid::UUID_TYPE_DCE_SECURITY} instead. - */ - public const UUID_TYPE_IDENTIFIER = 2; - - /** - * Version 3 (name-based and hashed with MD5) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_HASH_MD5 = 3; - - /** - * Version 4 (random) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_RANDOM = 4; - - /** - * Version 5 (name-based and hashed with SHA1) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_HASH_SHA1 = 5; - - /** - * @deprecated Use {@see Uuid::UUID_TYPE_REORDERED_TIME} instead. - */ - public const UUID_TYPE_PEABODY = 6; - - /** - * Version 6 (reordered Gregorian time) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_REORDERED_TIME = 6; - - /** - * Version 7 (Unix Epoch time) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_UNIX_TIME = 7; - - /** - * Version 8 (custom format) UUID - * - * @link https://www.rfc-editor.org/rfc/rfc9562#section-4.2 RFC 9562, 4.2. Version Field - */ - public const UUID_TYPE_CUSTOM = 8; - - /** - * DCE Security principal domain - * - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 - */ - public const DCE_DOMAIN_PERSON = 0; - - /** - * DCE Security group domain - * - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 - */ - public const DCE_DOMAIN_GROUP = 1; - - /** - * DCE Security organization domain - * - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 - */ - public const DCE_DOMAIN_ORG = 2; - - /** - * DCE Security domain string names - * - * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap11.htm#tagcjh_14_05_01_01 DCE 1.1, §11.5.1.1 - */ - public const DCE_DOMAIN_NAMES = [ - self::DCE_DOMAIN_PERSON => 'person', - self::DCE_DOMAIN_GROUP => 'group', - self::DCE_DOMAIN_ORG => 'org', - ]; - - /** - * @phpstan-ignore property.readOnlyByPhpDocDefaultValue - */ - private static ?UuidFactoryInterface $factory = null; - - /** - * @var bool flag to detect if the UUID factory was replaced internally, which disables all optimizations for the - * default/happy path internal scenarios - * @phpstan-ignore property.readOnlyByPhpDocDefaultValue - */ - private static bool $factoryReplaced = false; - - protected CodecInterface $codec; - protected NumberConverterInterface $numberConverter; - protected Rfc4122FieldsInterface $fields; - protected TimeConverterInterface $timeConverter; - - /** - * Creates a universally unique identifier (UUID) from an array of fields - * - * Unless you're making advanced use of this library to generate identifiers that deviate from RFC 9562 (formerly - * RFC 4122), you probably do not want to instantiate a UUID directly. Use the static methods, instead: - * - * ``` - * use Ramsey\Uuid\Uuid; - * - * $timeBasedUuid = Uuid::uuid1(); - * $namespaceMd5Uuid = Uuid::uuid3(Uuid::NAMESPACE_URL, 'http://php.net/'); - * $randomUuid = Uuid::uuid4(); - * $namespaceSha1Uuid = Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://php.net/'); - * ``` - * - * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID - * @param NumberConverterInterface $numberConverter The number converter to use for converting hex values to/from integers - * @param CodecInterface $codec The codec to use when encoding or decoding UUID strings - * @param TimeConverterInterface $timeConverter The time converter to use for converting timestamps extracted from a - * UUID to unix timestamps - */ - public function __construct( - Rfc4122FieldsInterface $fields, - NumberConverterInterface $numberConverter, - CodecInterface $codec, - TimeConverterInterface $timeConverter, - ) { - $this->fields = $fields; - $this->codec = $codec; - $this->numberConverter = $numberConverter; - $this->timeConverter = $timeConverter; - } - - /** - * @return non-empty-string - */ - public function __toString(): string - { - return $this->toString(); - } - - /** - * Converts the UUID to a string for JSON serialization - */ - public function jsonSerialize(): string - { - return $this->toString(); - } - - /** - * Converts the UUID to a string for PHP serialization - */ - public function serialize(): string - { - return $this->codec->encode($this); - } - - /** - * @return array{bytes: string} - */ - public function __serialize(): array - { - return ['bytes' => $this->serialize()]; - } - - /** - * Re-constructs the object from its serialized form - * - * @param string $data The serialized PHP string to unserialize into a UuidInterface instance - */ - public function unserialize(string $data): void - { - if (strlen($data) === 16) { - /** @var Uuid $uuid */ - $uuid = self::getFactory()->fromBytes($data); - } else { - /** @var Uuid $uuid */ - $uuid = self::getFactory()->fromString($data); - } - - /** @phpstan-ignore property.readOnlyByPhpDocAssignNotInConstructor */ - $this->codec = $uuid->codec; - - /** @phpstan-ignore property.readOnlyByPhpDocAssignNotInConstructor */ - $this->numberConverter = $uuid->numberConverter; - - /** @phpstan-ignore property.readOnlyByPhpDocAssignNotInConstructor */ - $this->fields = $uuid->fields; - - /** @phpstan-ignore property.readOnlyByPhpDocAssignNotInConstructor */ - $this->timeConverter = $uuid->timeConverter; - } - - /** - * @param array{bytes?: string} $data - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - if (!isset($data['bytes'])) { - throw new ValueError(sprintf('%s(): Argument #1 ($data) is invalid', __METHOD__)); - } - // @codeCoverageIgnoreEnd - - $this->unserialize($data['bytes']); - } - - public function compareTo(UuidInterface $other): int - { - $compare = strcmp($this->toString(), $other->toString()); - - if ($compare < 0) { - return -1; - } - - if ($compare > 0) { - return 1; - } - - return 0; - } - - public function equals(?object $other): bool - { - if (!$other instanceof UuidInterface) { - return false; - } - - return $this->compareTo($other) === 0; - } - - /** - * @return non-empty-string - */ - public function getBytes(): string - { - return $this->codec->encodeBinary($this); - } - - public function getFields(): FieldsInterface - { - return $this->fields; - } - - public function getHex(): Hexadecimal - { - return new Hexadecimal(str_replace('-', '', $this->toString())); - } - - public function getInteger(): IntegerObject - { - return new IntegerObject($this->numberConverter->fromHex($this->getHex()->toString())); - } - - public function getUrn(): string - { - return 'urn:uuid:' . $this->toString(); - } - - /** - * @return non-empty-string - */ - public function toString(): string - { - return $this->codec->encode($this); - } - - /** - * Returns the factory used to create UUIDs - */ - public static function getFactory(): UuidFactoryInterface - { - if (self::$factory === null) { - self::$factory = new UuidFactory(); - } - - return self::$factory; - } - - /** - * Sets the factory used to create UUIDs - * - * @param UuidFactoryInterface $factory A factory that will be used by this class to create UUIDs - */ - public static function setFactory(UuidFactoryInterface $factory): void - { - // Note: non-strict equality is intentional here. If the factory is configured differently, every assumption - // around purity is broken, and we have to internally decide everything differently. - // phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator - self::$factoryReplaced = ($factory != new UuidFactory()); - - self::$factory = $factory; - } - - /** - * Creates a UUID from a byte string - * - * @param string $bytes A binary string - * - * @return UuidInterface A UuidInterface instance created from a binary string representation - * - * @throws InvalidArgumentException - * - * @pure - */ - public static function fromBytes(string $bytes): UuidInterface - { - /** @phpstan-ignore impure.staticPropertyAccess */ - if (!self::$factoryReplaced && strlen($bytes) === 16) { - $base16Uuid = bin2hex($bytes); - - // Note: we are calling `fromString` internally because we don't know if the given `$bytes` is a valid UUID - return self::fromString( - substr($base16Uuid, 0, 8) - . '-' - . substr($base16Uuid, 8, 4) - . '-' - . substr($base16Uuid, 12, 4) - . '-' - . substr($base16Uuid, 16, 4) - . '-' - . substr($base16Uuid, 20, 12), - ); - } - - /** @phpstan-ignore possiblyImpure.methodCall */ - return self::getFactory()->fromBytes($bytes); - } - - /** - * Creates a UUID from the string standard representation - * - * @param string $uuid A hexadecimal string - * - * @return UuidInterface A UuidInterface instance created from a hexadecimal string representation - * - * @throws InvalidArgumentException - * - * @pure - */ - public static function fromString(string $uuid): UuidInterface - { - $uuid = strtolower($uuid); - /** @phpstan-ignore impure.staticPropertyAccess, possiblyImpure.functionCall */ - if (!self::$factoryReplaced && preg_match(LazyUuidFromString::VALID_REGEX, $uuid) === 1) { - /** @phpstan-ignore possiblyImpure.functionCall */ - assert($uuid !== ''); - - /** @phpstan-ignore possiblyImpure.new */ - return new LazyUuidFromString($uuid); - } - - /** @phpstan-ignore possiblyImpure.methodCall */ - return self::getFactory()->fromString($uuid); - } - - /** - * Creates a UUID from a DateTimeInterface instance - * - * @param DateTimeInterface $dateTime The date and time - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 1 UUID created from a DateTimeInterface instance - */ - public static function fromDateTime( - DateTimeInterface $dateTime, - ?Hexadecimal $node = null, - ?int $clockSeq = null - ): UuidInterface { - return self::getFactory()->fromDateTime($dateTime, $node, $clockSeq); - } - - /** - * Creates a UUID from the Hexadecimal object - * - * @param Hexadecimal $hex Hexadecimal object representing a hexadecimal number - * - * @return UuidInterface A UuidInterface instance created from the Hexadecimal object representing a hexadecimal number - * - * @throws InvalidArgumentException - * - * @pure - */ - public static function fromHexadecimal(Hexadecimal $hex): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $factory = self::getFactory(); - - if (method_exists($factory, 'fromHexadecimal')) { - /** @phpstan-ignore possiblyImpure.methodCall */ - $uuid = $factory->fromHexadecimal($hex); - /** @phpstan-ignore possiblyImpure.functionCall */ - assert($uuid instanceof UuidInterface); - - return $uuid; - } - - throw new BadMethodCallException('The method fromHexadecimal() does not exist on the provided factory'); - } - - /** - * Creates a UUID from a 128-bit integer string - * - * @param string $integer String representation of 128-bit integer - * - * @return UuidInterface A UuidInterface instance created from the string representation of a 128-bit integer - * - * @throws InvalidArgumentException - * - * @pure - */ - public static function fromInteger(string $integer): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return self::getFactory()->fromInteger($integer); - } - - /** - * Returns true if the provided string is a valid UUID - * - * @param string $uuid A string to validate as a UUID - * - * @return bool True if the string is a valid UUID, false otherwise - * - * @phpstan-assert-if-true =non-empty-string $uuid - * - * @pure - */ - public static function isValid(string $uuid): bool - { - /** @phpstan-ignore possiblyImpure.methodCall, possiblyImpure.methodCall */ - return self::getFactory()->getValidator()->validate($uuid); - } - - /** - * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | int | string | null $node A 48-bit number representing the hardware address; this number may - * be represented as an integer or a hexadecimal string - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 1 UUID - */ - public static function uuid1($node = null, ?int $clockSeq = null): UuidInterface - { - return self::getFactory()->uuid1($node, $clockSeq); - } - - /** - * Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the current time - * - * @param int $localDomain The local domain to use when generating bytes, according to DCE Security - * @param IntegerObject | null $localIdentifier The local identifier for the given domain; this may be a UID or GID - * on POSIX systems, if the local domain is "person" or "group," or it may be a site-defined identifier if the - * local domain is "org" - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes (in a version 2 UUID, the lower 8 bits of this number are - * replaced with the domain). - * - * @return UuidInterface A UuidInterface instance that represents a version 2 UUID - */ - public static function uuid2( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null - ): UuidInterface { - return self::getFactory()->uuid2($localDomain, $localIdentifier, $node, $clockSeq); - } - - /** - * Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * @param string $name The name to use for creating a UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 3 UUID - * - * @pure - */ - public static function uuid3($ns, string $name): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return self::getFactory()->uuid3($ns, $name); - } - - /** - * Returns a version 4 (random) UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 4 UUID - */ - public static function uuid4(): UuidInterface - { - return self::getFactory()->uuid4(); - } - - /** - * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * @param string $name The name to use for creating a UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 5 UUID - * - * @pure - */ - public static function uuid5($ns, string $name): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return self::getFactory()->uuid5($ns, $name); - } - - /** - * Returns a version 6 (reordered Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 6 UUID - */ - public static function uuid6( - ?Hexadecimal $node = null, - ?int $clockSeq = null - ): UuidInterface { - return self::getFactory()->uuid6($node, $clockSeq); - } - - /** - * Returns a version 7 (Unix Epoch time) UUID - * - * @param DateTimeInterface | null $dateTime An optional date/time from which to create the version 7 UUID. If not - * provided, the UUID is generated using the current date/time. - * - * @return UuidInterface A UuidInterface instance that represents a version 7 UUID - */ - public static function uuid7(?DateTimeInterface $dateTime = null): UuidInterface - { - $factory = self::getFactory(); - - if (method_exists($factory, 'uuid7')) { - /** @var UuidInterface */ - return $factory->uuid7($dateTime); - } - - throw new UnsupportedOperationException('The provided factory does not support the uuid7() method'); - } - - /** - * Returns a version 8 (custom format) UUID - * - * The bytes provided may contain any value according to your application's needs. Be aware, however, that other - * applications may not understand the semantics of the value. - * - * @param string $bytes A 16-byte octet string. This is an open blob of data that you may fill with 128 bits of - * information. Be aware, however, bits 48 through 51 will be replaced with the UUID version field, and bits 64 - * and 65 will be replaced with the UUID variant. You MUST NOT rely on these bits for your application needs. - * - * @return UuidInterface A UuidInterface instance that represents a version 8 UUID - * - * @pure - */ - public static function uuid8(string $bytes): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - $factory = self::getFactory(); - - if (method_exists($factory, 'uuid8')) { - /** - * @var UuidInterface - * @phpstan-ignore possiblyImpure.methodCall - */ - return $factory->uuid8($bytes); - } - - throw new UnsupportedOperationException('The provided factory does not support the uuid8() method'); - } -} diff --git a/vendor/ramsey/uuid/src/UuidFactory.php b/vendor/ramsey/uuid/src/UuidFactory.php deleted file mode 100644 index c7607a1b..00000000 --- a/vendor/ramsey/uuid/src/UuidFactory.php +++ /dev/null @@ -1,476 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use DateTimeInterface; -use Ramsey\Uuid\Builder\UuidBuilderInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Generator\DceSecurityGeneratorInterface; -use Ramsey\Uuid\Generator\DefaultTimeGenerator; -use Ramsey\Uuid\Generator\NameGeneratorInterface; -use Ramsey\Uuid\Generator\RandomGeneratorInterface; -use Ramsey\Uuid\Generator\TimeGeneratorInterface; -use Ramsey\Uuid\Generator\UnixTimeGenerator; -use Ramsey\Uuid\Lazy\LazyUuidFromString; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Provider\Time\FixedTimeProvider; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Type\Time; -use Ramsey\Uuid\Validator\ValidatorInterface; - -use function bin2hex; -use function hex2bin; -use function pack; -use function str_pad; -use function strtolower; -use function substr; -use function substr_replace; -use function unpack; - -use const STR_PAD_LEFT; - -class UuidFactory implements UuidFactoryInterface -{ - private CodecInterface $codec; - private DceSecurityGeneratorInterface $dceSecurityGenerator; - private NameGeneratorInterface $nameGenerator; - private NodeProviderInterface $nodeProvider; - private NumberConverterInterface $numberConverter; - private RandomGeneratorInterface $randomGenerator; - private TimeConverterInterface $timeConverter; - private TimeGeneratorInterface $timeGenerator; - private TimeGeneratorInterface $unixTimeGenerator; - private UuidBuilderInterface $uuidBuilder; - private ValidatorInterface $validator; - - /** - * @var bool whether the feature set was provided from outside, or we can operate under "default" assumptions - */ - private bool $isDefaultFeatureSet; - - /** - * @param FeatureSet | null $features A set of available features in the current environment - */ - public function __construct(?FeatureSet $features = null) - { - $this->isDefaultFeatureSet = $features === null; - - $features = $features ?: new FeatureSet(); - - $this->codec = $features->getCodec(); - $this->dceSecurityGenerator = $features->getDceSecurityGenerator(); - $this->nameGenerator = $features->getNameGenerator(); - $this->nodeProvider = $features->getNodeProvider(); - $this->numberConverter = $features->getNumberConverter(); - $this->randomGenerator = $features->getRandomGenerator(); - $this->timeConverter = $features->getTimeConverter(); - $this->timeGenerator = $features->getTimeGenerator(); - $this->uuidBuilder = $features->getBuilder(); - $this->validator = $features->getValidator(); - $this->unixTimeGenerator = $features->getUnixTimeGenerator(); - } - - /** - * Returns the codec used by this factory - */ - public function getCodec(): CodecInterface - { - return $this->codec; - } - - /** - * Sets the codec to use for this factory - * - * @param CodecInterface $codec A UUID encoder-decoder - */ - public function setCodec(CodecInterface $codec): void - { - $this->isDefaultFeatureSet = false; - - $this->codec = $codec; - } - - /** - * Returns the name generator used by this factory - */ - public function getNameGenerator(): NameGeneratorInterface - { - return $this->nameGenerator; - } - - /** - * Sets the name generator to use for this factory - * - * @param NameGeneratorInterface $nameGenerator A generator to generate binary data, based on a namespace and name - */ - public function setNameGenerator(NameGeneratorInterface $nameGenerator): void - { - $this->isDefaultFeatureSet = false; - - $this->nameGenerator = $nameGenerator; - } - - /** - * Returns the node provider used by this factory - */ - public function getNodeProvider(): NodeProviderInterface - { - return $this->nodeProvider; - } - - /** - * Returns the random generator used by this factory - */ - public function getRandomGenerator(): RandomGeneratorInterface - { - return $this->randomGenerator; - } - - /** - * Returns the time generator used by this factory - */ - public function getTimeGenerator(): TimeGeneratorInterface - { - return $this->timeGenerator; - } - - /** - * Sets the time generator to use for this factory - * - * @param TimeGeneratorInterface $generator A generator to generate binary data, based on the time - */ - public function setTimeGenerator(TimeGeneratorInterface $generator): void - { - $this->isDefaultFeatureSet = false; - - $this->timeGenerator = $generator; - } - - /** - * Returns the DCE Security generator used by this factory - */ - public function getDceSecurityGenerator(): DceSecurityGeneratorInterface - { - return $this->dceSecurityGenerator; - } - - /** - * Sets the DCE Security generator to use for this factory - * - * @param DceSecurityGeneratorInterface $generator A generator to generate binary data, based on a local domain and - * local identifier - */ - public function setDceSecurityGenerator(DceSecurityGeneratorInterface $generator): void - { - $this->isDefaultFeatureSet = false; - - $this->dceSecurityGenerator = $generator; - } - - /** - * Returns the number converter used by this factory - */ - public function getNumberConverter(): NumberConverterInterface - { - return $this->numberConverter; - } - - /** - * Sets the random generator to use for this factory - * - * @param RandomGeneratorInterface $generator A generator to generate binary data, based on some random input - */ - public function setRandomGenerator(RandomGeneratorInterface $generator): void - { - $this->isDefaultFeatureSet = false; - - $this->randomGenerator = $generator; - } - - /** - * Sets the number converter to use for this factory - * - * @param NumberConverterInterface $converter A converter to use for working with large integers (i.e., integers - * greater than PHP_INT_MAX) - */ - public function setNumberConverter(NumberConverterInterface $converter): void - { - $this->isDefaultFeatureSet = false; - - $this->numberConverter = $converter; - } - - /** - * Returns the UUID builder used by this factory - */ - public function getUuidBuilder(): UuidBuilderInterface - { - return $this->uuidBuilder; - } - - /** - * Sets the UUID builder to use for this factory - * - * @param UuidBuilderInterface $builder A builder for constructing instances of UuidInterface - */ - public function setUuidBuilder(UuidBuilderInterface $builder): void - { - $this->isDefaultFeatureSet = false; - - $this->uuidBuilder = $builder; - } - - public function getValidator(): ValidatorInterface - { - return $this->validator; - } - - /** - * Sets the validator to use for this factory - * - * @param ValidatorInterface $validator A validator to use for validating whether a string is a valid UUID - */ - public function setValidator(ValidatorInterface $validator): void - { - $this->isDefaultFeatureSet = false; - - $this->validator = $validator; - } - - /** - * @pure - */ - public function fromBytes(string $bytes): UuidInterface - { - return $this->codec->decodeBytes($bytes); - } - - /** - * @pure - */ - public function fromString(string $uuid): UuidInterface - { - $uuid = strtolower($uuid); - - return $this->codec->decode($uuid); - } - - /** - * @pure - */ - public function fromInteger(string $integer): UuidInterface - { - $hex = $this->numberConverter->toHex($integer); - $hex = str_pad($hex, 32, '0', STR_PAD_LEFT); - - return $this->fromString($hex); - } - - public function fromDateTime( - DateTimeInterface $dateTime, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): UuidInterface { - $timeProvider = new FixedTimeProvider(new Time($dateTime->format('U'), $dateTime->format('u'))); - $timeGenerator = new DefaultTimeGenerator($this->nodeProvider, $this->timeConverter, $timeProvider); - $bytes = $timeGenerator->generate($node?->toString(), $clockSeq); - - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); - } - - /** - * @pure - */ - public function fromHexadecimal(Hexadecimal $hex): UuidInterface - { - return $this->codec->decode($hex->__toString()); - } - - /** - * @inheritDoc - */ - public function uuid1($node = null, ?int $clockSeq = null): UuidInterface - { - $bytes = $this->timeGenerator->generate($node, $clockSeq); - - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); - } - - public function uuid2( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): UuidInterface { - $bytes = $this->dceSecurityGenerator->generate($localDomain, $localIdentifier, $node, $clockSeq); - - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_DCE_SECURITY); - } - - /** - * @inheritDoc - * @pure - */ - public function uuid3($ns, string $name): UuidInterface - { - return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_MD5, 'md5'); - } - - public function uuid4(): UuidInterface - { - $bytes = $this->randomGenerator->generate(16); - - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_RANDOM); - } - - /** - * @inheritDoc - * @pure - */ - public function uuid5($ns, string $name): UuidInterface - { - return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_SHA1, 'sha1'); - } - - public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface - { - $bytes = $this->timeGenerator->generate($node?->toString(), $clockSeq); - - // Rearrange the bytes, according to the UUID version 6 specification. - $v6 = $bytes[6] . $bytes[7] . $bytes[4] . $bytes[5] - . $bytes[0] . $bytes[1] . $bytes[2] . $bytes[3]; - $v6 = bin2hex($v6); - - // Drop the first four bits, while adding an empty four bits for the version field. This allows us to - // reconstruct the correct time from the bytes of this UUID. - $v6Bytes = hex2bin(substr($v6, 1, 12) . '0' . substr($v6, -3)); - $v6Bytes .= substr($bytes, 8); - - return $this->uuidFromBytesAndVersion($v6Bytes, Uuid::UUID_TYPE_REORDERED_TIME); - } - - /** - * Returns a version 7 (Unix Epoch time) UUID - * - * @param DateTimeInterface | null $dateTime An optional date/time from which to create the version 7 UUID. If not - * provided, the UUID is generated using the current date/time. - * - * @return UuidInterface A UuidInterface instance that represents a version 7 UUID - */ - public function uuid7(?DateTimeInterface $dateTime = null): UuidInterface - { - assert($this->unixTimeGenerator instanceof UnixTimeGenerator); - $bytes = $this->unixTimeGenerator->generate(null, null, $dateTime); - - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_UNIX_TIME); - } - - /** - * Returns a version 8 (custom format) UUID - * - * The bytes provided may contain any value according to your application's needs. Be aware, however, that other - * applications may not understand the semantics of the value. - * - * @param string $bytes A 16-byte octet string. This is an open blob of data that you may fill with 128 bits of - * information. Be aware, however, bits 48 through 51 will be replaced with the UUID version field, and bits 64 - * and 65 will be replaced with the UUID variant. You MUST NOT rely on these bits for your application needs. - * - * @return UuidInterface A UuidInterface instance that represents a version 8 UUID - * - * @pure - */ - public function uuid8(string $bytes): UuidInterface - { - /** @phpstan-ignore possiblyImpure.methodCall */ - return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_CUSTOM); - } - - /** - * Returns a Uuid created from the provided byte string - * - * Uses the configured builder and codec and the provided byte string to construct a Uuid object. - * - * @param string $bytes The byte string from which to construct a UUID - * - * @return UuidInterface An instance of UuidInterface, created from the provided bytes - * - * @pure - */ - public function uuid(string $bytes): UuidInterface - { - return $this->uuidBuilder->build($this->codec, $bytes); - } - - /** - * Returns a version 3 or 5 namespaced Uuid - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * @param string $name The name to hash together with the namespace - * @param int $version The version of UUID to create (3 or 5) - * @param string $hashAlgorithm The hashing algorithm to use when hashing together the namespace and name - * - * @return UuidInterface An instance of UuidInterface, created by hashing together the provided namespace and name - * - * @pure - */ - private function uuidFromNsAndName( - UuidInterface | string $ns, - string $name, - int $version, - string $hashAlgorithm, - ): UuidInterface { - if (!($ns instanceof UuidInterface)) { - $ns = $this->fromString($ns); - } - - $bytes = $this->nameGenerator->generate($ns, $name, $hashAlgorithm); - - /** @phpstan-ignore possiblyImpure.methodCall */ - return $this->uuidFromBytesAndVersion(substr($bytes, 0, 16), $version); - } - - /** - * Returns a Uuid created from the provided bytes and version - * - * @param string $bytes The byte string to convert to a UUID - * @param int $version The version to apply to the UUID - * - * @return UuidInterface An instance of UuidInterface, created from the byte string and version - */ - private function uuidFromBytesAndVersion(string $bytes, int $version): UuidInterface - { - /** @var int[] $unpackedTime */ - $unpackedTime = unpack('n*', substr($bytes, 6, 2)); - $timeHi = $unpackedTime[1]; - $timeHiAndVersion = pack('n*', BinaryUtils::applyVersion($timeHi, $version)); - - /** @var int[] $unpackedClockSeq */ - $unpackedClockSeq = unpack('n*', substr($bytes, 8, 2)); - $clockSeqHi = $unpackedClockSeq[1]; - $clockSeqHiAndReserved = pack('n*', BinaryUtils::applyVariant($clockSeqHi)); - - $bytes = substr_replace($bytes, $timeHiAndVersion, 6, 2); - $bytes = substr_replace($bytes, $clockSeqHiAndReserved, 8, 2); - - if ($this->isDefaultFeatureSet) { - return LazyUuidFromString::fromBytes($bytes); - } - - return $this->uuid($bytes); - } -} diff --git a/vendor/ramsey/uuid/src/UuidFactoryInterface.php b/vendor/ramsey/uuid/src/UuidFactoryInterface.php deleted file mode 100644 index 5a83a797..00000000 --- a/vendor/ramsey/uuid/src/UuidFactoryInterface.php +++ /dev/null @@ -1,155 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use DateTimeInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Ramsey\Uuid\Validator\ValidatorInterface; - -/** - * UuidFactoryInterface defines the common functionality all `UuidFactory` instances must implement - */ -interface UuidFactoryInterface -{ - /** - * Creates a UUID from a byte string - * - * @param string $bytes A binary string - * - * @return UuidInterface A UuidInterface instance created from a binary string representation - * - * @pure - */ - public function fromBytes(string $bytes): UuidInterface; - - /** - * Creates a UUID from a DateTimeInterface instance - * - * @param DateTimeInterface $dateTime The date and time - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 1 UUID created from a DateTimeInterface instance - */ - public function fromDateTime( - DateTimeInterface $dateTime, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): UuidInterface; - - /** - * Creates a UUID from a 128-bit integer string - * - * @param string $integer String representation of 128-bit integer - * - * @return UuidInterface A UuidInterface instance created from the string representation of a 128-bit integer - * - * @pure - */ - public function fromInteger(string $integer): UuidInterface; - - /** - * Creates a UUID from the string standard representation - * - * @param string $uuid A hexadecimal string - * - * @return UuidInterface A UuidInterface instance created from a hexadecimal string representation - * - * @pure - */ - public function fromString(string $uuid): UuidInterface; - - /** - * Returns the validator used by the factory - */ - public function getValidator(): ValidatorInterface; - - /** - * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | int | string | null $node A 48-bit number representing the hardware address; this number may - * be represented as an integer or a hexadecimal string - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 1 UUID - */ - public function uuid1($node = null, ?int $clockSeq = null): UuidInterface; - - /** - * Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the - * current time - * - * @param int $localDomain The local domain to use when generating bytes, according to DCE Security - * @param IntegerObject | null $localIdentifier The local identifier for the given domain; this may be a UID or GID - * on POSIX systems, if the local domain is a person or group, or it may be a site-defined identifier if the - * local domain is org - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 2 UUID - */ - public function uuid2( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null, - ): UuidInterface; - - /** - * Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * @param string $name The name to use for creating a UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 3 UUID - * - * @pure - */ - public function uuid3($ns, string $name): UuidInterface; - - /** - * Returns a version 4 (random) UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 4 UUID - */ - public function uuid4(): UuidInterface; - - /** - * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * @param string $name The name to use for creating a UUID - * - * @return UuidInterface A UuidInterface instance that represents a version 5 UUID - * - * @pure - */ - public function uuid5($ns, string $name): UuidInterface; - - /** - * Returns a version 6 (reordered Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a version 6 UUID - */ - public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface; -} diff --git a/vendor/ramsey/uuid/src/UuidInterface.php b/vendor/ramsey/uuid/src/UuidInterface.php deleted file mode 100644 index 38525cb5..00000000 --- a/vendor/ramsey/uuid/src/UuidInterface.php +++ /dev/null @@ -1,110 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use JsonSerializable; -use Ramsey\Uuid\Fields\FieldsInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; -use Serializable; -use Stringable; - -/** - * A UUID is a universally unique identifier adhering to an agreed-upon representation format and standard for generation - * - * @immutable - */ -interface UuidInterface extends - DeprecatedUuidInterface, - JsonSerializable, - Serializable, - Stringable -{ - /** - * Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than the other UUID - * - * The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is - * greater for the first UUID. - * - * @param UuidInterface $other The UUID to compare - * - * @return int<-1,1> -1, 0, or 1 if the UUID is less than, equal to, or greater than $other - */ - public function compareTo(UuidInterface $other): int; - - /** - * Returns true if the UUID is equal to the provided object - * - * The result is true if and only if the argument is not null, is a UUID object, has the same variant, and contains - * the same value, bit-for-bit, as the UUID. - * - * @param object | null $other An object to test for equality with this UUID - * - * @return bool True if the other object is equal to this UUID - */ - public function equals(?object $other): bool; - - /** - * Returns the binary string representation of the UUID - * - * @return non-empty-string - * - * @pure - */ - public function getBytes(): string; - - /** - * Returns the fields that comprise this UUID - */ - public function getFields(): FieldsInterface; - - /** - * Returns the hexadecimal representation of the UUID - */ - public function getHex(): Hexadecimal; - - /** - * Returns the integer representation of the UUID - */ - public function getInteger(): IntegerObject; - - /** - * Returns the string standard representation of the UUID as a URN - * - * @link http://en.wikipedia.org/wiki/Uniform_Resource_Name Uniform Resource Name - * @link https://www.rfc-editor.org/rfc/rfc9562.html#section-4 RFC 9562, 4. UUID Format - * @link https://www.rfc-editor.org/rfc/rfc9562.html#section-7 RFC 9562, 7. IANA Considerations - * @link https://www.rfc-editor.org/rfc/rfc4122.html#section-3 RFC 4122, 3. Namespace Registration Template - */ - public function getUrn(): string; - - /** - * Returns the string standard representation of the UUID - * - * @return non-empty-string - * - * @pure - */ - public function toString(): string; - - /** - * Casts the UUID to the string standard representation - * - * @return non-empty-string - * - * @pure - */ - public function __toString(): string; -} diff --git a/vendor/ramsey/uuid/src/Validator/GenericValidator.php b/vendor/ramsey/uuid/src/Validator/GenericValidator.php deleted file mode 100644 index 6d60647b..00000000 --- a/vendor/ramsey/uuid/src/Validator/GenericValidator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Validator; - -use Ramsey\Uuid\Uuid; - -use function preg_match; -use function str_replace; - -/** - * GenericValidator validates strings as UUIDs of any variant - * - * @immutable - */ -final class GenericValidator implements ValidatorInterface -{ - /** - * Regular expression pattern for matching a UUID of any variant. - */ - private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\z'; - - /** - * @return non-empty-string - */ - public function getPattern(): string - { - return self::VALID_PATTERN; - } - - public function validate(string $uuid): bool - { - /** @phpstan-ignore possiblyImpure.functionCall */ - $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); - - /** @phpstan-ignore possiblyImpure.functionCall */ - return $uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); - } -} diff --git a/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php b/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php deleted file mode 100644 index 95dc8ebd..00000000 --- a/vendor/ramsey/uuid/src/Validator/ValidatorInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid\Validator; - -/** - * A validator validates a string as a proper UUID - * - * @immutable - */ -interface ValidatorInterface -{ - /** - * Returns the regular expression pattern used by this validator - * - * @return non-empty-string The regular expression pattern this validator uses - */ - public function getPattern(): string; - - /** - * Returns true if the provided string represents a UUID - * - * @param string $uuid The string to validate as a UUID - * - * @return bool True if the string is a valid UUID, false otherwise - * - * @pure - */ - public function validate(string $uuid): bool; -} diff --git a/vendor/ramsey/uuid/src/functions.php b/vendor/ramsey/uuid/src/functions.php deleted file mode 100644 index 854c5c55..00000000 --- a/vendor/ramsey/uuid/src/functions.php +++ /dev/null @@ -1,141 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * phpcs:disable Squiz.Functions.GlobalFunction - */ - -declare(strict_types=1); - -namespace Ramsey\Uuid; - -use DateTimeInterface; -use Ramsey\Uuid\Type\Hexadecimal; -use Ramsey\Uuid\Type\Integer as IntegerObject; - -/** - * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | int | string | null $node A 48-bit number representing the hardware address; this number may be - * represented as an integer or a hexadecimal string - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return non-empty-string Version 1 UUID as a string - */ -function v1($node = null, ?int $clockSeq = null): string -{ - return Uuid::uuid1($node, $clockSeq)->toString(); -} - -/** - * Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the current time - * - * @param int $localDomain The local domain to use when generating bytes, according to DCE Security - * @param IntegerObject | null $localIdentifier The local identifier for the given domain; this may be a UID or GID on - * POSIX systems, if the local domain is a person or group, or it may be a site-defined identifier if the local - * domain is org - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return non-empty-string Version 2 UUID as a string - */ -function v2( - int $localDomain, - ?IntegerObject $localIdentifier = null, - ?Hexadecimal $node = null, - ?int $clockSeq = null, -): string { - return Uuid::uuid2($localDomain, $localIdentifier, $node, $clockSeq)->toString(); -} - -/** - * Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * - * @return non-empty-string Version 3 UUID as a string - * - * @pure - */ -function v3($ns, string $name): string -{ - return Uuid::uuid3($ns, $name)->toString(); -} - -/** - * Returns a version 4 (random) UUID - * - * @return non-empty-string Version 4 UUID as a string - */ -function v4(): string -{ - return Uuid::uuid4()->toString(); -} - -/** - * Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name - * - * @param UuidInterface | string $ns The namespace (must be a valid UUID) - * - * @return non-empty-string Version 5 UUID as a string - * - * @pure - */ -function v5($ns, string $name): string -{ - return Uuid::uuid5($ns, $name)->toString(); -} - -/** - * Returns a version 6 (reordered Gregorian time) UUID from a host ID, sequence number, and the current time - * - * @param Hexadecimal | null $node A 48-bit number representing the hardware address - * @param int | null $clockSeq A 14-bit number used to help avoid duplicates that could arise when the clock is set - * backwards in time or if the node ID changes - * - * @return non-empty-string Version 6 UUID as a string - */ -function v6(?Hexadecimal $node = null, ?int $clockSeq = null): string -{ - return Uuid::uuid6($node, $clockSeq)->toString(); -} - -/** - * Returns a version 7 (Unix Epoch time) UUID - * - * @param DateTimeInterface|null $dateTime An optional date/time from which to create the version 7 UUID. If not - * provided, the UUID is generated using the current date/time. - * - * @return non-empty-string Version 7 UUID as a string - */ -function v7(?DateTimeInterface $dateTime = null): string -{ - return Uuid::uuid7($dateTime)->toString(); -} - -/** - * Returns a version 8 (custom format) UUID - * - * The bytes provided may contain any value according to your application's needs. Be aware, however, that other - * applications may not understand the semantics of the value. - * - * @param string $bytes A 16-byte octet string. This is an open blob of data that you may fill with 128 bits of - * information. Be aware, however, bits 48 through 51 will be replaced with the UUID version field, and bits 64 and - * 65 will be replaced with the UUID variant. You MUST NOT rely on these bits for your application needs. - * - * @return non-empty-string Version 8 UUID as a string - * - * @pure - */ -function v8(string $bytes): string -{ - return Uuid::uuid8($bytes)->toString(); -} diff --git a/vendor/sebastian/cli-parser/ChangeLog.md b/vendor/sebastian/cli-parser/ChangeLog.md deleted file mode 100644 index b84dc02d..00000000 --- a/vendor/sebastian/cli-parser/ChangeLog.md +++ /dev/null @@ -1,72 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [4.2.0] - 2025-09-14 - -### Changed - -* [#3](https://github.com/sebastianbergmann/cli-parser/pull/3): Print most similar options when reporting unknown options - -## [4.1.0] - 2025-09-13 - -### Changed - -* [#2](https://github.com/sebastianbergmann/cli-parser/pull/2): Print similar options when reporting ambiguous options - -## [4.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [3.0.2] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [3.0.1] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [3.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [2.0.1] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [2.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 - -## [1.0.1] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [1.0.0] - 2020-08-12 - -* Initial release - -[4.2.0]: https://github.com/sebastianbergmann/cli-parser/compare/4.1.0...4.2.0 -[4.1.0]: https://github.com/sebastianbergmann/cli-parser/compare/4.0.0...4.1.0 -[4.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/3.0...4.0.0 -[3.0.2]: https://github.com/sebastianbergmann/cli-parser/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/cli-parser/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/2.0...3.0.0 -[2.0.1]: https://github.com/sebastianbergmann/cli-parser/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/1.0.1...2.0.0 -[1.0.1]: https://github.com/sebastianbergmann/cli-parser/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/bb7bb3297957927962b0a3335befe7b66f7462e9...1.0.0 diff --git a/vendor/sebastian/cli-parser/LICENSE b/vendor/sebastian/cli-parser/LICENSE deleted file mode 100644 index 0d534da3..00000000 --- a/vendor/sebastian/cli-parser/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2020-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/cli-parser/README.md b/vendor/sebastian/cli-parser/README.md deleted file mode 100644 index d974c124..00000000 --- a/vendor/sebastian/cli-parser/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/cli-parser/v)](https://packagist.org/packages/sebastian/cli-parser) -[![CI Status](https://github.com/sebastianbergmann/cli-parser/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/cli-parser/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/cli-parser/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/cli-parser) - -# sebastian/cli-parser - -Library for parsing `$_SERVER['argv']`, extracted from `phpunit/phpunit`. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/cli-parser -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/cli-parser -``` diff --git a/vendor/sebastian/cli-parser/SECURITY.md b/vendor/sebastian/cli-parser/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/cli-parser/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/cli-parser/composer.json b/vendor/sebastian/cli-parser/composer.json deleted file mode 100644 index d8be843d..00000000 --- a/vendor/sebastian/cli-parser/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "sebastian/cli-parser", - "description": "Library for parsing CLI options", - "type": "library", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "security": "https://github.com/sebastianbergmann/cli-parser/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "4.2-dev" - } - } -} diff --git a/vendor/sebastian/cli-parser/src/Parser.php b/vendor/sebastian/cli-parser/src/Parser.php deleted file mode 100644 index fd544e94..00000000 --- a/vendor/sebastian/cli-parser/src/Parser.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use function array_map; -use function array_merge; -use function array_shift; -use function array_slice; -use function assert; -use function count; -use function current; -use function explode; -use function is_array; -use function is_int; -use function key; -use function levenshtein; -use function next; -use function preg_replace; -use function reset; -use function rtrim; -use function sort; -use function str_ends_with; -use function str_starts_with; -use function strlen; -use function strstr; -use function substr; -use function usort; - -final class Parser -{ - /** - * @param list $argv - * @param list $longOptions - * - * @throws AmbiguousOptionException - * @throws OptionDoesNotAllowArgumentException - * @throws RequiredOptionArgumentMissingException - * @throws UnknownOptionException - * - * @return array{0: list, 1: list} - */ - public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array - { - if ($argv === []) { - return [[], []]; - } - - $options = []; - $nonOptions = []; - - if ($longOptions !== null) { - sort($longOptions); - } - - if (isset($argv[0][0]) && $argv[0][0] !== '-') { - array_shift($argv); - } - - reset($argv); - - $argv = array_map('trim', $argv); - - while (false !== $arg = current($argv)) { - $i = key($argv); - - assert(is_int($i)); - - next($argv); - - if ($arg === '') { - continue; - } - - if ($arg === '--') { - $nonOptions = array_merge($nonOptions, array_slice($argv, $i + 1)); - - break; - } - - if ($arg[0] !== '-' || (strlen($arg) > 1 && $arg[1] === '-' && $longOptions === null)) { - $nonOptions[] = $arg; - - continue; - } - - if (strlen($arg) > 1 && $arg[1] === '-' && is_array($longOptions)) { - $this->parseLongOption( - substr($arg, 2), - $longOptions, - $options, - $argv, - ); - - continue; - } - - $this->parseShortOption( - substr($arg, 1), - $shortOptions, - $options, - $argv, - ); - } - - return [$options, $nonOptions]; - } - - /** - * @param list $options - * @param list $argv - * - * @throws RequiredOptionArgumentMissingException - */ - private function parseShortOption(string $argument, string $shortOptions, array &$options, array &$argv): void - { - $argumentLength = strlen($argument); - - for ($i = 0; $i < $argumentLength; $i++) { - $option = $argument[$i]; - $optionArgument = null; - - if ($argument[$i] === ':' || ($spec = strstr($shortOptions, $option)) === false) { - throw new UnknownOptionException('-' . $option, []); - } - - if (strlen($spec) > 1 && $spec[1] === ':') { - if ($i + 1 < $argumentLength) { - $options[] = [$option, substr($argument, $i + 1)]; - - break; - } - - if (!(strlen($spec) > 2 && $spec[2] === ':')) { - $optionArgument = current($argv); - - if ($optionArgument === false) { - throw new RequiredOptionArgumentMissingException('-' . $option); - } - - next($argv); - } - } - - $options[] = [$option, $optionArgument]; - } - } - - /** - * @param list $longOptions - * @param list $options - * @param list $argv - * - * @throws AmbiguousOptionException - * @throws OptionDoesNotAllowArgumentException - * @throws RequiredOptionArgumentMissingException - * @throws UnknownOptionException - */ - private function parseLongOption(string $argument, array $longOptions, array &$options, array &$argv): void - { - $count = count($longOptions); - $list = explode('=', $argument); - $option = $list[0]; - $optionArgument = null; - - if (count($list) > 1) { - /** @phpstan-ignore offsetAccess.notFound */ - $optionArgument = $list[1]; - } - - $optionLength = strlen($option); - - $similarOptions = []; - - foreach ($longOptions as $i => $longOption) { - $similarOptions[] = [ - levenshtein($longOption, $option), - '--' . rtrim($longOption, '='), - ]; - $opt_start = substr($longOption, 0, $optionLength); - - if ($opt_start !== $option) { - continue; - } - - $opt_rest = substr($longOption, $optionLength); - - if ($opt_rest !== '' && - $i + 1 < $count && - $option[0] !== '=' && - /** @phpstan-ignore offsetAccess.notFound */ - str_starts_with($longOptions[$i + 1], $option) - ) { - $candidates = []; - - foreach ($longOptions as $aLongOption) { - if (str_starts_with($aLongOption, $option)) { - $candidates[] = '--' . rtrim($aLongOption, '='); - } - } - - throw new AmbiguousOptionException('--' . $option, $candidates); - } - - if (str_ends_with($longOption, '=')) { - if (!str_ends_with($longOption, '==') && (string) $optionArgument === '') { - if (false === $optionArgument = current($argv)) { - throw new RequiredOptionArgumentMissingException('--' . $option); - } - - next($argv); - } - } elseif ($optionArgument !== null) { - throw new OptionDoesNotAllowArgumentException('--' . $option); - } - - $fullOption = '--' . preg_replace('/={1,2}$/', '', $longOption); - $options[] = [$fullOption, $optionArgument]; - - return; - } - - throw new UnknownOptionException('--' . $option, $this->formatSimilarOptions($similarOptions)); - } - - /** - * @param list $similarOptions - * - * @return array - */ - private function formatSimilarOptions(array $similarOptions): array - { - usort($similarOptions, static function (array $a, array $b) - { - return $a[0] <=> $b[0]; - }); - - $similarFormatted = []; - - foreach (array_slice($similarOptions, 0, 5) as [$distance, $label]) { - $similarFormatted[] = $label; - } - - return $similarFormatted; - } -} diff --git a/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php b/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php deleted file mode 100644 index ab2ff4f2..00000000 --- a/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use function implode; -use function sprintf; -use RuntimeException; - -final class AmbiguousOptionException extends RuntimeException implements Exception -{ - /** - * @param array $candiates - */ - public function __construct(string $option, array $candiates) - { - parent::__construct( - sprintf( - 'Option "%s" is ambiguous. Similar options are: %s', - $option, - implode(', ', $candiates), - ), - ); - } -} diff --git a/vendor/sebastian/cli-parser/src/exceptions/Exception.php b/vendor/sebastian/cli-parser/src/exceptions/Exception.php deleted file mode 100644 index f35ad245..00000000 --- a/vendor/sebastian/cli-parser/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php b/vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php deleted file mode 100644 index 7fea616b..00000000 --- a/vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use function sprintf; -use RuntimeException; - -final class OptionDoesNotAllowArgumentException extends RuntimeException implements Exception -{ - public function __construct(string $option) - { - parent::__construct( - sprintf( - 'Option "%s" does not allow an argument', - $option, - ), - ); - } -} diff --git a/vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php b/vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php deleted file mode 100644 index 9add49a9..00000000 --- a/vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use function sprintf; -use RuntimeException; - -final class RequiredOptionArgumentMissingException extends RuntimeException implements Exception -{ - public function __construct(string $option) - { - parent::__construct( - sprintf( - 'Required argument for option "%s" is missing', - $option, - ), - ); - } -} diff --git a/vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php b/vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php deleted file mode 100644 index 3ddeddd1..00000000 --- a/vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CliParser; - -use function implode; -use function sprintf; -use RuntimeException; - -final class UnknownOptionException extends RuntimeException implements Exception -{ - /** - * @param array $similarOptions - */ - public function __construct(string $option, array $similarOptions) - { - $message = sprintf( - 'Unknown option "%s"', - $option, - ); - - if ($similarOptions !== []) { - $message = sprintf( - 'Unknown option "%s". Most similar options are %s', - $option, - implode(', ', $similarOptions), - ); - } - - parent::__construct($message); - } -} diff --git a/vendor/sebastian/comparator/ChangeLog.md b/vendor/sebastian/comparator/ChangeLog.md deleted file mode 100644 index 2e26529a..00000000 --- a/vendor/sebastian/comparator/ChangeLog.md +++ /dev/null @@ -1,293 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [7.1.3] - 2025-08-20 - -### Changed - -* [#130](https://github.com/sebastianbergmann/comparator/pull/130): Provide a diff when `ClosureComparator` fails - -## [7.1.2] - 2025-08-10 - -### Fixed - -* `SebastianBergmann\Comparator\Comparator` should not have been marked as private implementation detail of this library - -## [7.1.1] - 2025-08-10 - -### Changed - -* Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5 - -## [7.1.0] - 2025-06-17 - -### Added - -* [#127](https://github.com/sebastianbergmann/comparator/issues/127): Support for comparing `Closure` objects - -## [7.0.1] - 2025-03-07 - -### Fixed - -* [#122](https://github.com/sebastianbergmann/comparator/issues/122): `INF` is considered equal to `-INF` - -## [7.0.0] - 2025-02-07 - -### Removed - -* Removed support for PHP 8.2 - -## [6.3.2] - 2025-08-10 - -### Changed - -* Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5 - -## [6.3.1] - 2025-03-07 - -### Fixed - -* [#122](https://github.com/sebastianbergmann/comparator/issues/122): `INF` is considered equal to `-INF` - -## [6.3.0] - 2025-01-06 - -### Added - -* [#121](https://github.com/sebastianbergmann/comparator/pull/121): Support for `BcMath\Number` objects - -## [6.2.1] - 2024-10-31 - -### Fixed - -* [#119](https://github.com/sebastianbergmann/comparator/pull/119): `Uninitialized string offset -1` warning - -## [6.2.0] - 2024-10-30 - -### Changed - -* [#117](https://github.com/sebastianbergmann/comparator/pull/117): Remove common prefixes and suffixes from actual and expected single-line strings - -## [6.1.1] - 2024-10-18 - -### Fixed - -* Reverted [#113](https://github.com/sebastianbergmann/comparator/pull/113) as it broke backward compatibility - -## [6.1.0] - 2024-09-11 - -### Added - -* Specialized comparator for enumerations - -## [6.0.2] - 2024-08-12 - -### Fixed - -* [#112](https://github.com/sebastianbergmann/comparator/issues/112): Arrays with different keys and the same values are considered equal in canonicalize mode - -## [6.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [6.0.0] - 2024-02-02 - -### Removed - -* Removed support for PHP 8.1 - -## [5.0.3] - 2024-10-18 - -### Fixed - -* Reverted [#113](https://github.com/sebastianbergmann/comparator/pull/113) as it broke backward compatibility - -## [5.0.2] - 2024-08-12 - -### Fixed - -* [#112](https://github.com/sebastianbergmann/comparator/issues/112): Arrays with different keys and the same values are considered equal in canonicalize mode - -## [5.0.1] - 2023-08-14 - -### Fixed - -* `MockObjectComparator` only works on instances of `PHPUnit\Framework\MockObject\MockObject`, but not on instances of `PHPUnit\Framework\MockObject\Stub` -* `MockObjectComparator` only ignores the `$__phpunit_invocationMocker` property, but not other properties with names prefixed with `__phpunit_` - -## [5.0.0] - 2023-02-03 - -### Changed - -* Methods now have parameter and return type declarations -* `Comparator::$factory` is now private, use `Comparator::factory()` instead -* `ComparisonFailure`, `DOMNodeComparator`, `DateTimeComparator`, `ExceptionComparator`, `MockObjectComparator`, `NumericComparator`, `ResourceComparator`, `SplObjectStorageComparator`, and `TypeComparator` are now `final` -* `ScalarComparator` and `DOMNodeComparator` now use `mb_strtolower($string, 'UTF-8')` instead of `strtolower($string)` - -### Removed - -* Removed `$identical` parameter from `ComparisonFailure::__construct()` -* Removed `Comparator::$exporter` -* Removed support for PHP 7.3, PHP 7.4, and PHP 8.0 - -## [4.0.8] - 2022-09-14 - -### Fixed - -* [#102](https://github.com/sebastianbergmann/comparator/pull/102): Fix `float` comparison precision - -## [4.0.7] - 2022-09-14 - -### Fixed - -* [#99](https://github.com/sebastianbergmann/comparator/pull/99): Fix weak comparison between `'0'` and `false` - -## [4.0.6] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Comparator\Exception` now correctly extends `\Throwable` - -## [4.0.5] - 2020-09-30 - -### Fixed - -* [#89](https://github.com/sebastianbergmann/comparator/pull/89): Handle PHP 8 `ValueError` - -## [4.0.4] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [4.0.3] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [4.0.2] - 2020-06-15 - -### Fixed - -* [#85](https://github.com/sebastianbergmann/comparator/issues/85): Version 4.0.1 breaks backward compatibility - -## [4.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [4.0.0] - 2020-02-07 - -### Removed - -* Removed support for PHP 7.1 and PHP 7.2 - -## [3.0.5] - 2022-09-14 - -### Fixed - -* [#102](https://github.com/sebastianbergmann/comparator/pull/102): Fix `float` comparison precision - -## [3.0.4] - 2022-09-14 - -### Fixed - -* [#99](https://github.com/sebastianbergmann/comparator/pull/99): Fix weak comparison between `'0'` and `false` - -## [3.0.3] - 2020-11-30 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.1` to `>=7.1` - -## [3.0.2] - 2018-07-12 - -### Changed - -* By default, `MockObjectComparator` is now tried before all other (default) comparators - -## [3.0.1] - 2018-06-14 - -### Fixed - -* [#53](https://github.com/sebastianbergmann/comparator/pull/53): `DOMNodeComparator` ignores `$ignoreCase` parameter -* [#58](https://github.com/sebastianbergmann/comparator/pull/58): `ScalarComparator` does not handle extremely ugly string comparison edge cases - -## [3.0.0] - 2018-04-18 - -### Fixed - -* [#48](https://github.com/sebastianbergmann/comparator/issues/48): `DateTimeComparator` does not support fractional second deltas - -### Removed - -* Removed support for PHP 7.0 - -## [2.1.3] - 2018-02-01 - -### Changed - -* This component is now compatible with version 3 of `sebastian/diff` - -## [2.1.2] - 2018-01-12 - -### Fixed - -* Fix comparison of `DateTimeImmutable` objects - -## [2.1.1] - 2017-12-22 - -### Fixed - -* [phpunit/#2923](https://github.com/sebastianbergmann/phpunit/issues/2923): Unexpected failed date matching - -## [2.1.0] - 2017-11-03 - -### Added - -* Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators -* Added support for `phpunit/phpunit-mock-objects` version `^5.0` - -[7.1.3]: https://github.com/sebastianbergmann/comparator/compare/7.1.2...7.1.3 -[7.1.2]: https://github.com/sebastianbergmann/comparator/compare/7.1.1...7.1.2 -[7.1.1]: https://github.com/sebastianbergmann/comparator/compare/7.1.0...7.1.1 -[7.1.0]: https://github.com/sebastianbergmann/comparator/compare/7.0.1...7.1.0 -[7.0.1]: https://github.com/sebastianbergmann/comparator/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/comparator/compare/6.3...7.0.0 -[6.3.2]: https://github.com/sebastianbergmann/comparator/compare/6.3.1...6.3.2 -[6.3.1]: https://github.com/sebastianbergmann/comparator/compare/6.3.0...6.3.1 -[6.3.0]: https://github.com/sebastianbergmann/comparator/compare/6.2.1...6.3.0 -[6.2.1]: https://github.com/sebastianbergmann/comparator/compare/6.2.0...6.2.1 -[6.2.0]: https://github.com/sebastianbergmann/comparator/compare/6.1.1...6.2.0 -[6.1.1]: https://github.com/sebastianbergmann/comparator/compare/6.1.0...6.1.1 -[6.1.0]: https://github.com/sebastianbergmann/comparator/compare/6.0.2...6.1.0 -[6.0.2]: https://github.com/sebastianbergmann/comparator/compare/6.0.1...6.0.2 -[6.0.1]: https://github.com/sebastianbergmann/comparator/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/comparator/compare/5.0...6.0.0 -[5.0.3]: https://github.com/sebastianbergmann/comparator/compare/5.0.2...5.0.3 -[5.0.2]: https://github.com/sebastianbergmann/comparator/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/comparator/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/comparator/compare/4.0.8...5.0.0 -[4.0.8]: https://github.com/sebastianbergmann/comparator/compare/4.0.7...4.0.8 -[4.0.7]: https://github.com/sebastianbergmann/comparator/compare/4.0.6...4.0.7 -[4.0.6]: https://github.com/sebastianbergmann/comparator/compare/4.0.5...4.0.6 -[4.0.5]: https://github.com/sebastianbergmann/comparator/compare/4.0.4...4.0.5 -[4.0.4]: https://github.com/sebastianbergmann/comparator/compare/4.0.3...4.0.4 -[4.0.3]: https://github.com/sebastianbergmann/comparator/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/sebastianbergmann/comparator/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/comparator/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/comparator/compare/3.0.5...4.0.0 -[3.0.5]: https://github.com/sebastianbergmann/comparator/compare/3.0.4...3.0.5 -[3.0.4]: https://github.com/sebastianbergmann/comparator/compare/3.0.3...3.0.4 -[3.0.3]: https://github.com/sebastianbergmann/comparator/compare/3.0.2...3.0.3 -[3.0.2]: https://github.com/sebastianbergmann/comparator/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/comparator/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/comparator/compare/2.1.3...3.0.0 -[2.1.3]: https://github.com/sebastianbergmann/comparator/compare/2.1.2...2.1.3 -[2.1.2]: https://github.com/sebastianbergmann/comparator/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/sebastianbergmann/comparator/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/sebastianbergmann/comparator/compare/2.0.2...2.1.0 diff --git a/vendor/sebastian/comparator/LICENSE b/vendor/sebastian/comparator/LICENSE deleted file mode 100644 index c5268a91..00000000 --- a/vendor/sebastian/comparator/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2002-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/comparator/README.md b/vendor/sebastian/comparator/README.md deleted file mode 100644 index 50971ad3..00000000 --- a/vendor/sebastian/comparator/README.md +++ /dev/null @@ -1,42 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/comparator/v)](https://packagist.org/packages/sebastian/comparator) -[![CI Status](https://github.com/sebastianbergmann/comparator/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/comparator/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/comparator/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/comparator) - -# sebastian/comparator - -This component provides the functionality to compare PHP values for equality. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/comparator -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/comparator -``` - -## Usage - -```php -getComparatorFor($date1, $date2); - -try { - $comparator->assertEquals($date1, $date2); - print "Dates match"; -} catch (ComparisonFailure $failure) { - print "Dates don't match"; -} -``` diff --git a/vendor/sebastian/comparator/SECURITY.md b/vendor/sebastian/comparator/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/comparator/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/comparator/composer.json b/vendor/sebastian/comparator/composer.json deleted file mode 100644 index c673f9bc..00000000 --- a/vendor/sebastian/comparator/composer.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "sebastian/comparator", - "description": "Provides the functionality to compare PHP values for equality", - "keywords": ["comparator","compare","equality"], - "homepage": "https://github.com/sebastianbergmann/comparator", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "security": "https://github.com/sebastianbergmann/comparator/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0", - "ext-dom": "*", - "ext-mbstring": "*" - }, - "suggest": { - "ext-bcmath": "For comparing BcMath\\Number objects" - }, - "require-dev": { - "phpunit/phpunit": "^12.2" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "7.1-dev" - } - } -} diff --git a/vendor/sebastian/comparator/src/ArrayComparator.php b/vendor/sebastian/comparator/src/ArrayComparator.php deleted file mode 100644 index f1e07909..00000000 --- a/vendor/sebastian/comparator/src/ArrayComparator.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function array_key_exists; -use function assert; -use function is_array; -use function sort; -use function sprintf; -use function str_replace; -use function trim; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -class ArrayComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return is_array($expected) && is_array($actual); - } - - /** - * Arrays are equal if they contain the same key-value pairs. - * The order of the keys does not matter. - * The types of key-value pairs do not matter. - * - * @param array $processed - * - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false, array &$processed = []): void - { - assert(is_array($expected)); - assert(is_array($actual)); - - if ($canonicalize) { - sort($expected); - sort($actual); - } - - $remaining = $actual; - $actualAsString = "Array (\n"; - $expectedAsString = "Array (\n"; - $equal = true; - $exporter = new Exporter; - - foreach ($expected as $key => $value) { - unset($remaining[$key]); - - if (!array_key_exists($key, $actual)) { - $expectedAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $exporter->shortenedExport($value), - ); - - $equal = false; - - continue; - } - - try { - $comparator = $this->factory()->getComparatorFor($value, $actual[$key]); - - /** @phpstan-ignore arguments.count */ - $comparator->assertEquals($value, $actual[$key], $delta, $canonicalize, $ignoreCase, $processed); - - $expectedAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $exporter->shortenedExport($value), - ); - - $actualAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $exporter->shortenedExport($actual[$key]), - ); - } catch (ComparisonFailure $e) { - $expectedAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $e->getExpectedAsString() !== '' ? $this->indent($e->getExpectedAsString()) : $exporter->shortenedExport($e->getExpected()), - ); - - $actualAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $e->getActualAsString() !== '' ? $this->indent($e->getActualAsString()) : $exporter->shortenedExport($e->getActual()), - ); - - $equal = false; - } - } - - foreach ($remaining as $key => $value) { - $actualAsString .= sprintf( - " %s => %s\n", - $exporter->export($key), - $exporter->shortenedExport($value), - ); - - $equal = false; - } - - $expectedAsString .= ')'; - $actualAsString .= ')'; - - if (!$equal) { - throw new ComparisonFailure( - $expected, - $actual, - $expectedAsString, - $actualAsString, - 'Failed asserting that two arrays are equal.', - ); - } - } - - private function indent(string $lines): string - { - return trim(str_replace("\n", "\n ", $lines)); - } -} diff --git a/vendor/sebastian/comparator/src/ClosureComparator.php b/vendor/sebastian/comparator/src/ClosureComparator.php deleted file mode 100644 index f02bb1de..00000000 --- a/vendor/sebastian/comparator/src/ClosureComparator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function spl_object_id; -use function sprintf; -use Closure; -use ReflectionFunction; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class ClosureComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof Closure && $actual instanceof Closure; - } - - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - assert($expected instanceof Closure); - assert($actual instanceof Closure); - - /** @phpstan-ignore equal.notAllowed */ - if ($expected == $actual) { - return; - } - - $expectedReflector = new ReflectionFunction($expected); - $actualReflector = new ReflectionFunction($actual); - - throw new ComparisonFailure( - $expected, - $actual, - 'Closure Object #' . spl_object_id($expected) . ' ()', - 'Closure Object #' . spl_object_id($actual) . ' ()', - sprintf( - 'Failed asserting that closure declared at %s:%d is equal to closure declared at %s:%d.', - $expectedReflector->getFileName(), - $expectedReflector->getStartLine(), - $actualReflector->getFileName(), - $actualReflector->getStartLine(), - ), - ); - } -} diff --git a/vendor/sebastian/comparator/src/Comparator.php b/vendor/sebastian/comparator/src/Comparator.php deleted file mode 100644 index 5caa817f..00000000 --- a/vendor/sebastian/comparator/src/Comparator.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - */ -abstract class Comparator -{ - private Factory $factory; - - public function setFactory(Factory $factory): void - { - $this->factory = $factory; - } - - abstract public function accepts(mixed $expected, mixed $actual): bool; - - /** - * @throws ComparisonFailure - */ - abstract public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void; - - protected function factory(): Factory - { - return $this->factory; - } -} diff --git a/vendor/sebastian/comparator/src/ComparisonFailure.php b/vendor/sebastian/comparator/src/ComparisonFailure.php deleted file mode 100644 index b8435ebc..00000000 --- a/vendor/sebastian/comparator/src/ComparisonFailure.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use RuntimeException; -use SebastianBergmann\Diff\Differ; -use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - */ -final class ComparisonFailure extends RuntimeException -{ - private mixed $expected; - private mixed $actual; - private string $expectedAsString; - private string $actualAsString; - - public function __construct(mixed $expected, mixed $actual, string $expectedAsString, string $actualAsString, string $message = '') - { - parent::__construct($message); - - $this->expected = $expected; - $this->actual = $actual; - $this->expectedAsString = $expectedAsString; - $this->actualAsString = $actualAsString; - } - - public function getActual(): mixed - { - return $this->actual; - } - - public function getExpected(): mixed - { - return $this->expected; - } - - public function getActualAsString(): string - { - return $this->actualAsString; - } - - public function getExpectedAsString(): string - { - return $this->expectedAsString; - } - - public function getDiff(): string - { - if ($this->actualAsString === '' && $this->expectedAsString === '') { - return ''; - } - - $differ = new Differ(new UnifiedDiffOutputBuilder("\n--- Expected\n+++ Actual\n")); - - return $differ->diff($this->expectedAsString, $this->actualAsString); - } - - public function toString(): string - { - return $this->getMessage() . $this->getDiff(); - } -} diff --git a/vendor/sebastian/comparator/src/DOMNodeComparator.php b/vendor/sebastian/comparator/src/DOMNodeComparator.php deleted file mode 100644 index 2964e94d..00000000 --- a/vendor/sebastian/comparator/src/DOMNodeComparator.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function mb_strtolower; -use function sprintf; -use DOMDocument; -use DOMNode; -use ValueError; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class DOMNodeComparator extends ObjectComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof DOMNode && $actual instanceof DOMNode; - } - - /** - * @param array $processed - * - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false, array &$processed = []): void - { - assert($expected instanceof DOMNode); - assert($actual instanceof DOMNode); - - $expectedAsString = $this->nodeToText($expected, $ignoreCase); - $actualAsString = $this->nodeToText($actual, $ignoreCase); - - if ($expectedAsString !== $actualAsString) { - $type = $expected instanceof DOMDocument ? 'documents' : 'nodes'; - - throw new ComparisonFailure( - $expected, - $actual, - $expectedAsString, - $actualAsString, - sprintf("Failed asserting that two DOM %s are equal.\n", $type), - ); - } - } - - /** - * Canonicalizes nodes, removes empty text nodes and merges adjacent text nodes, - * and optionally ignores case. - * - * @see https://github.com/sebastianbergmann/phpunit/pull/1236#issuecomment-41765023 - */ - private function nodeToText(DOMNode $node, bool $ignoreCase): string - { - $document = new DOMDocument; - - try { - $c14n = $node->C14N(); - - assert($c14n !== false && $c14n !== ''); - - @$document->loadXML($c14n); - // @codeCoverageIgnoreStart - } catch (ValueError) { - // @codeCoverageIgnoreEnd - } - - $document->formatOutput = true; - $document->normalizeDocument(); - - $text = $document->saveXML(); - - assert($text !== false); - - if ($ignoreCase) { - return mb_strtolower($text, 'UTF-8'); - } - - return $text; - } -} diff --git a/vendor/sebastian/comparator/src/DateTimeComparator.php b/vendor/sebastian/comparator/src/DateTimeComparator.php deleted file mode 100644 index 3b4da4c4..00000000 --- a/vendor/sebastian/comparator/src/DateTimeComparator.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function abs; -use function assert; -use function floor; -use function sprintf; -use DateInterval; -use DateTime; -use DateTimeImmutable; -use DateTimeZone; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class DateTimeComparator extends ObjectComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return ($expected instanceof DateTime || $expected instanceof DateTimeImmutable) && - ($actual instanceof DateTime || $actual instanceof DateTimeImmutable); - } - - /** - * @param array $processed - * - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false, array &$processed = []): void - { - assert($expected instanceof DateTime || $expected instanceof DateTimeImmutable); - assert($actual instanceof DateTime || $actual instanceof DateTimeImmutable); - - $absDelta = abs($delta); - $delta = new DateInterval(sprintf('PT%dS', $absDelta)); - $delta->f = $absDelta - floor($absDelta); - - $actualClone = (clone $actual) - ->setTimezone(new DateTimeZone('UTC')); - - $expectedLower = (clone $expected) - ->setTimezone(new DateTimeZone('UTC')) - ->sub($delta); - - $expectedUpper = (clone $expected) - ->setTimezone(new DateTimeZone('UTC')) - ->add($delta); - - if ($actualClone < $expectedLower || $actualClone > $expectedUpper) { - throw new ComparisonFailure( - $expected, - $actual, - $expected->format('Y-m-d\TH:i:s.uO'), - $actual->format('Y-m-d\TH:i:s.uO'), - 'Failed asserting that two DateTime objects are equal.', - ); - } - } -} diff --git a/vendor/sebastian/comparator/src/EnumerationComparator.php b/vendor/sebastian/comparator/src/EnumerationComparator.php deleted file mode 100644 index 7341edf6..00000000 --- a/vendor/sebastian/comparator/src/EnumerationComparator.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function sprintf; -use UnitEnum; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class EnumerationComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof UnitEnum && - $actual instanceof UnitEnum && - $expected::class === $actual::class; - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - assert($expected instanceof UnitEnum); - assert($actual instanceof UnitEnum); - - if ($expected === $actual) { - return; - } - - throw new ComparisonFailure( - $expected, - $actual, - '', - '', - sprintf( - 'Failed asserting that two values of enumeration %s are equal, %s does not match expected %s.', - $expected::class, - $actual->name, - $expected->name, - ), - ); - } -} diff --git a/vendor/sebastian/comparator/src/ExceptionComparator.php b/vendor/sebastian/comparator/src/ExceptionComparator.php deleted file mode 100644 index 6d119618..00000000 --- a/vendor/sebastian/comparator/src/ExceptionComparator.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use Exception; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class ExceptionComparator extends ObjectComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof Exception && $actual instanceof Exception; - } - - /** - * @return array - */ - protected function toArray(object $object): array - { - assert($object instanceof Exception); - - $array = parent::toArray($object); - - unset( - $array['file'], - $array['line'], - $array['trace'], - $array['string'], - $array['xdebug_message'], - ); - - return $array; - } -} diff --git a/vendor/sebastian/comparator/src/Factory.php b/vendor/sebastian/comparator/src/Factory.php deleted file mode 100644 index 7f330d62..00000000 --- a/vendor/sebastian/comparator/src/Factory.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use const PHP_VERSION; -use function array_unshift; -use function extension_loaded; -use function version_compare; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - */ -final class Factory -{ - private static ?Factory $instance = null; - - /** - * @var array - */ - private array $customComparators = []; - - /** - * @var list - */ - private array $defaultComparators = []; - - public static function getInstance(): self - { - if (self::$instance === null) { - self::$instance = new self; // @codeCoverageIgnore - } - - return self::$instance; - } - - public function __construct() - { - $this->registerDefaultComparators(); - } - - public function getComparatorFor(mixed $expected, mixed $actual): Comparator - { - foreach ($this->customComparators as $comparator) { - if ($comparator->accepts($expected, $actual)) { - return $comparator; - } - } - - foreach ($this->defaultComparators as $comparator) { - if ($comparator->accepts($expected, $actual)) { - return $comparator; - } - } - - // @codeCoverageIgnoreStart - throw new RuntimeException('No suitable Comparator implementation found'); - // @codeCoverageIgnoreEnd - } - - /** - * Registers a new comparator. - * - * This comparator will be returned by getComparatorFor() if its accept() method - * returns TRUE for the compared values. It has higher priority than the - * existing comparators, meaning that its accept() method will be invoked - * before those of the other comparators. - */ - public function register(Comparator $comparator): void - { - array_unshift($this->customComparators, $comparator); - - $comparator->setFactory($this); - } - - /** - * Unregisters a comparator. - * - * This comparator will no longer be considered by getComparatorFor(). - */ - public function unregister(Comparator $comparator): void - { - foreach ($this->customComparators as $key => $_comparator) { - if ($comparator === $_comparator) { - unset($this->customComparators[$key]); - } - } - } - - public function reset(): void - { - $this->customComparators = []; - } - - private function registerDefaultComparators(): void - { - $this->registerDefaultComparator(new ClosureComparator); - $this->registerDefaultComparator(new MockObjectComparator); - $this->registerDefaultComparator(new DateTimeComparator); - $this->registerDefaultComparator(new DOMNodeComparator); - $this->registerDefaultComparator(new SplObjectStorageComparator); - $this->registerDefaultComparator(new ExceptionComparator); - $this->registerDefaultComparator(new EnumerationComparator); - - if (extension_loaded('bcmath') && version_compare(PHP_VERSION, '8.4.0', '>=')) { - $this->registerDefaultComparator(new NumberComparator); - } - - $this->registerDefaultComparator(new ObjectComparator); - $this->registerDefaultComparator(new ResourceComparator); - $this->registerDefaultComparator(new ArrayComparator); - $this->registerDefaultComparator(new NumericComparator); - $this->registerDefaultComparator(new ScalarComparator); - $this->registerDefaultComparator(new TypeComparator); - } - - private function registerDefaultComparator(Comparator $comparator): void - { - $this->defaultComparators[] = $comparator; - - $comparator->setFactory($this); - } -} diff --git a/vendor/sebastian/comparator/src/MockObjectComparator.php b/vendor/sebastian/comparator/src/MockObjectComparator.php deleted file mode 100644 index f42ef4d9..00000000 --- a/vendor/sebastian/comparator/src/MockObjectComparator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function array_keys; -use function assert; -use function str_starts_with; -use PHPUnit\Framework\MockObject\Stub; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class MockObjectComparator extends ObjectComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof Stub && $actual instanceof Stub; - } - - /** - * @return array - */ - protected function toArray(object $object): array - { - assert($object instanceof Stub); - - $array = parent::toArray($object); - - foreach (array_keys($array) as $key) { - if (!str_starts_with($key, '__phpunit_')) { - continue; - } - - unset($array[$key]); - } - - return $array; - } -} diff --git a/vendor/sebastian/comparator/src/NumberComparator.php b/vendor/sebastian/comparator/src/NumberComparator.php deleted file mode 100644 index 8c606a75..00000000 --- a/vendor/sebastian/comparator/src/NumberComparator.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function is_int; -use function is_numeric; -use function is_string; -use function max; -use function number_format; -use BcMath\Number; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class NumberComparator extends ObjectComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return ($expected instanceof Number || $actual instanceof Number) && - ($expected instanceof Number || is_int($expected) || is_string($expected) && is_numeric($expected)) && - ($actual instanceof Number || is_int($actual) || is_string($actual) && is_numeric($actual)); - } - - /** - * @param array $processed - * - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false, array &$processed = []): void - { - if (!$expected instanceof Number) { - assert(is_string($expected) || is_int($expected)); - - $expected = new Number($expected); - } - - if (!$actual instanceof Number) { - assert(is_string($actual) || is_int($actual)); - - $actual = new Number($actual); - } - - $deltaNumber = new Number(number_format($delta, max($expected->scale, $actual->scale))); - - if ($actual < $expected - $deltaNumber || $actual > $expected + $deltaNumber) { - throw new ComparisonFailure( - $expected, - $actual, - (string) $expected, - (string) $actual, - 'Failed asserting that two Number objects are equal.', - ); - } - } -} diff --git a/vendor/sebastian/comparator/src/NumericComparator.php b/vendor/sebastian/comparator/src/NumericComparator.php deleted file mode 100644 index 77a04a3f..00000000 --- a/vendor/sebastian/comparator/src/NumericComparator.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function abs; -use function assert; -use function is_float; -use function is_infinite; -use function is_nan; -use function is_numeric; -use function is_string; -use function sprintf; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class NumericComparator extends ScalarComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - // all numerical values, but not if both of them are strings - return is_numeric($expected) && is_numeric($actual) && - !(is_string($expected) && is_string($actual)); - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - assert(is_numeric($expected)); - assert(is_numeric($actual)); - - if ($this->isInfinite($expected) && $this->isInfinite($actual)) { - if ($expected < 0 && $actual < 0) { - return; - } - - if ($expected > 0 && $actual > 0) { - return; - } - } - - if (($this->isInfinite($actual) xor $this->isInfinite($expected)) || - ($this->isNan($actual) || $this->isNan($expected)) || - abs($actual - $expected) > $delta) { - $exporter = new Exporter; - - throw new ComparisonFailure( - $expected, - $actual, - '', - '', - sprintf( - 'Failed asserting that %s matches expected %s.', - $exporter->export($actual), - $exporter->export($expected), - ), - ); - } - } - - private function isInfinite(mixed $value): bool - { - return is_float($value) && is_infinite($value); - } - - private function isNan(mixed $value): bool - { - return is_float($value) && is_nan($value); - } -} diff --git a/vendor/sebastian/comparator/src/ObjectComparator.php b/vendor/sebastian/comparator/src/ObjectComparator.php deleted file mode 100644 index da9a76ca..00000000 --- a/vendor/sebastian/comparator/src/ObjectComparator.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function in_array; -use function is_object; -use function sprintf; -use function substr_replace; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -class ObjectComparator extends ArrayComparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return is_object($expected) && is_object($actual); - } - - /** - * @param array $processed - * - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false, array &$processed = []): void - { - assert(is_object($expected)); - assert(is_object($actual)); - - if ($actual::class !== $expected::class) { - $exporter = new Exporter; - - throw new ComparisonFailure( - $expected, - $actual, - $exporter->export($expected), - $exporter->export($actual), - sprintf( - '%s is not instance of expected class "%s".', - $exporter->export($actual), - $expected::class, - ), - ); - } - - // don't compare twice to allow for cyclic dependencies - if (in_array([$actual, $expected], $processed, true) || - in_array([$expected, $actual], $processed, true)) { - return; - } - - $processed[] = [$actual, $expected]; - - // don't compare objects if they are identical - // this helps to avoid the error "maximum function nesting level reached" - // CAUTION: this conditional clause is not tested - if ($actual !== $expected) { - try { - parent::assertEquals( - $this->toArray($expected), - $this->toArray($actual), - $delta, - $canonicalize, - $ignoreCase, - $processed, - ); - } catch (ComparisonFailure $e) { - throw new ComparisonFailure( - $expected, - $actual, - // replace "Array" with "MyClass object" - substr_replace($e->getExpectedAsString(), $expected::class . ' Object', 0, 5), - substr_replace($e->getActualAsString(), $actual::class . ' Object', 0, 5), - 'Failed asserting that two objects are equal.', - ); - } - } - } - - /** - * @return array - */ - protected function toArray(object $object): array - { - return (new Exporter)->toArray($object); - } -} diff --git a/vendor/sebastian/comparator/src/ResourceComparator.php b/vendor/sebastian/comparator/src/ResourceComparator.php deleted file mode 100644 index 8691e7e1..00000000 --- a/vendor/sebastian/comparator/src/ResourceComparator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function is_resource; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class ResourceComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return is_resource($expected) && is_resource($actual); - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - assert(is_resource($expected)); - assert(is_resource($actual)); - - $exporter = new Exporter; - - /** @phpstan-ignore notEqual.notAllowed */ - if ($actual != $expected) { - throw new ComparisonFailure( - $expected, - $actual, - $exporter->export($expected), - $exporter->export($actual), - ); - } - } -} diff --git a/vendor/sebastian/comparator/src/ScalarComparator.php b/vendor/sebastian/comparator/src/ScalarComparator.php deleted file mode 100644 index f28d1022..00000000 --- a/vendor/sebastian/comparator/src/ScalarComparator.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use function is_bool; -use function is_object; -use function is_scalar; -use function is_string; -use function mb_strtolower; -use function method_exists; -use function sprintf; -use function strlen; -use function substr; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -class ScalarComparator extends Comparator -{ - private const int OVERLONG_THRESHOLD = 40; - private const int KEEP_CONTEXT_CHARS = 25; - - public function accepts(mixed $expected, mixed $actual): bool - { - return ((is_scalar($expected) xor null === $expected) && - (is_scalar($actual) xor null === $actual)) || - // allow comparison between strings and objects featuring __toString() - (is_string($expected) && is_object($actual) && method_exists($actual, '__toString')) || - (is_object($expected) && method_exists($expected, '__toString') && is_string($actual)); - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - $expectedToCompare = $expected; - $actualToCompare = $actual; - $exporter = new Exporter; - - // always compare as strings to avoid strange behaviour - // otherwise 0 == 'Foobar' - if ((is_string($expected) && !is_bool($actual)) || (is_string($actual) && !is_bool($expected))) { - /** @phpstan-ignore cast.string */ - $expectedToCompare = (string) $expectedToCompare; - - /** @phpstan-ignore cast.string */ - $actualToCompare = (string) $actualToCompare; - - if ($ignoreCase) { - $expectedToCompare = mb_strtolower($expectedToCompare, 'UTF-8'); - $actualToCompare = mb_strtolower($actualToCompare, 'UTF-8'); - } - } - - if ($expectedToCompare !== $actualToCompare && is_string($expected) && is_string($actual)) { - [$cutExpected, $cutActual] = self::removeOverlongCommonPrefix($expected, $actual); - [$cutExpected, $cutActual] = self::removeOverlongCommonSuffix($cutExpected, $cutActual); - - throw new ComparisonFailure( - $expected, - $actual, - $exporter->export($cutExpected), - $exporter->export($cutActual), - 'Failed asserting that two strings are equal.', - ); - } - - /** @phpstan-ignore notEqual.notAllowed */ - if ($expectedToCompare != $actualToCompare) { - throw new ComparisonFailure( - $expected, - $actual, - // no diff is required - '', - '', - sprintf( - 'Failed asserting that %s matches expected %s.', - $exporter->export($actual), - $exporter->export($expected), - ), - ); - } - } - - /** - * @return array{string, string} - */ - private static function removeOverlongCommonPrefix(string $string1, string $string2): array - { - $commonPrefix = self::findCommonPrefix($string1, $string2); - - if (strlen($commonPrefix) > self::OVERLONG_THRESHOLD) { - $string1 = '...' . substr($string1, strlen($commonPrefix) - self::KEEP_CONTEXT_CHARS); - $string2 = '...' . substr($string2, strlen($commonPrefix) - self::KEEP_CONTEXT_CHARS); - } - - return [$string1, $string2]; - } - - private static function findCommonPrefix(string $string1, string $string2): string - { - for ($i = 0; $i < strlen($string1); $i++) { - if (!isset($string2[$i]) || $string1[$i] !== $string2[$i]) { - break; - } - } - - assert(isset($i)); - - return substr($string1, 0, $i); - } - - /** - * @return array{string, string} - */ - private static function removeOverlongCommonSuffix(string $string1, string $string2): array - { - $commonSuffix = self::findCommonSuffix($string1, $string2); - - if (strlen($commonSuffix) > self::OVERLONG_THRESHOLD) { - $string1 = substr($string1, 0, -(strlen($commonSuffix) - self::KEEP_CONTEXT_CHARS)) . '...'; - $string2 = substr($string2, 0, -(strlen($commonSuffix) - self::KEEP_CONTEXT_CHARS)) . '...'; - } - - return [$string1, $string2]; - } - - private static function findCommonSuffix(string $string1, string $string2): string - { - if ($string1 === '' || $string2 === '') { - return ''; - } - - $lastCharIndex1 = strlen($string1) - 1; - $lastCharIndex2 = strlen($string2) - 1; - - if ($string1[$lastCharIndex1] !== $string2[$lastCharIndex2]) { - return ''; - } - - while ( - $lastCharIndex1 > 0 && - $lastCharIndex2 > 0 && - $string1[$lastCharIndex1] === $string2[$lastCharIndex2] - ) { - $lastCharIndex1--; - $lastCharIndex2--; - } - - return substr($string1, $lastCharIndex1 - strlen($string1) + 1); - } -} diff --git a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php b/vendor/sebastian/comparator/src/SplObjectStorageComparator.php deleted file mode 100644 index a32b588b..00000000 --- a/vendor/sebastian/comparator/src/SplObjectStorageComparator.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function assert; -use SebastianBergmann\Exporter\Exporter; -use SplObjectStorage; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class SplObjectStorageComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return $expected instanceof SplObjectStorage && $actual instanceof SplObjectStorage; - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - assert($expected instanceof SplObjectStorage); - assert($actual instanceof SplObjectStorage); - - $exporter = new Exporter; - - foreach ($actual as $object) { - if (!$expected->offsetExists($object)) { - throw new ComparisonFailure( - $expected, - $actual, - $exporter->export($expected), - $exporter->export($actual), - 'Failed asserting that two objects are equal.', - ); - } - } - - foreach ($expected as $object) { - if (!$actual->offsetExists($object)) { - throw new ComparisonFailure( - $expected, - $actual, - $exporter->export($expected), - $exporter->export($actual), - 'Failed asserting that two objects are equal.', - ); - } - } - } -} diff --git a/vendor/sebastian/comparator/src/TypeComparator.php b/vendor/sebastian/comparator/src/TypeComparator.php deleted file mode 100644 index c54468b8..00000000 --- a/vendor/sebastian/comparator/src/TypeComparator.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use function gettype; -use function sprintf; -use SebastianBergmann\Exporter\Exporter; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - * - * @internal This class is not covered by the backward compatibility promise for sebastian/comparator - */ -final class TypeComparator extends Comparator -{ - public function accepts(mixed $expected, mixed $actual): bool - { - return true; - } - - /** - * @throws ComparisonFailure - */ - public function assertEquals(mixed $expected, mixed $actual, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false): void - { - if (gettype($expected) !== gettype($actual)) { - throw new ComparisonFailure( - $expected, - $actual, - // we don't need a diff - '', - '', - sprintf( - '%s does not match expected type "%s".', - (new Exporter)->shortenedExport($actual), - gettype($expected), - ), - ); - } - } -} diff --git a/vendor/sebastian/comparator/src/exceptions/Exception.php b/vendor/sebastian/comparator/src/exceptions/Exception.php deleted file mode 100644 index 12213096..00000000 --- a/vendor/sebastian/comparator/src/exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/comparator/src/exceptions/RuntimeException.php b/vendor/sebastian/comparator/src/exceptions/RuntimeException.php deleted file mode 100644 index 1ad7d739..00000000 --- a/vendor/sebastian/comparator/src/exceptions/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Comparator; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for sebastian/comparator - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/sebastian/complexity/ChangeLog.md b/vendor/sebastian/complexity/ChangeLog.md deleted file mode 100644 index 6d06b2cb..00000000 --- a/vendor/sebastian/complexity/ChangeLog.md +++ /dev/null @@ -1,91 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [4.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [4.0.0] - 2024-02-02 - -### Removed - -* This component now requires PHP-Parser 5 -* This component is no longer supported on PHP 8.1 - -## [3.2.0] - 2023-12-21 - -### Added - -* `ComplexityCollection::sortByDescendingCyclomaticComplexity()` -* Support for `match` arms - -### Changed - -* This component is now compatible with `nikic/php-parser` 5.0 - -## [3.1.0] - 2023-09-28 - -### Added - -* `Complexity::isFunction()` and `Complexity::isMethod()` -* `ComplexityCollection::isFunction()` and `ComplexityCollection::isMethod()` -* `ComplexityCollection::mergeWith()` - -### Fixed - -* Anonymous classes are not processed correctly - -## [3.0.1] - 2023-08-31 - -### Fixed - -* [#7](https://github.com/sebastianbergmann/complexity/pull/7): `ComplexityCalculatingVisitor` tries to process interface methods - -## [3.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [2.0.2] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Complexity\Exception` now correctly extends `\Throwable` - -## [2.0.1] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [2.0.0] - 2020-07-25 - -### Removed - -* The `ParentConnectingVisitor` has been removed (it should have been marked as `@internal`) - -## [1.0.0] - 2020-07-22 - -* Initial release - -[5.0.0]: https://github.com/sebastianbergmann/complexity/compare/4.0...5.0.0 -[4.0.1]: https://github.com/sebastianbergmann/complexity/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/complexity/compare/3.2...4.0.0 -[3.2.0]: https://github.com/sebastianbergmann/complexity/compare/3.1.0...3.2.0 -[3.1.0]: https://github.com/sebastianbergmann/complexity/compare/3.0.1...3.1.0 -[3.0.1]: https://github.com/sebastianbergmann/complexity/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/complexity/compare/2.0.2...3.0.0 -[2.0.2]: https://github.com/sebastianbergmann/complexity/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/complexity/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/complexity/compare/1.0.0...2.0.0 -[1.0.0]: https://github.com/sebastianbergmann/complexity/compare/70ee0ad32d9e2be3f85beffa3e2eb474193f2487...1.0.0 diff --git a/vendor/sebastian/complexity/LICENSE b/vendor/sebastian/complexity/LICENSE deleted file mode 100644 index 0d534da3..00000000 --- a/vendor/sebastian/complexity/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2020-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/complexity/README.md b/vendor/sebastian/complexity/README.md deleted file mode 100644 index 7293280c..00000000 --- a/vendor/sebastian/complexity/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/complexity/v)](https://packagist.org/packages/sebastian/complexity) -[![CI Status](https://github.com/sebastianbergmann/complexity/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/complexity/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/complexity/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/complexity) - -# sebastian/complexity - -Library for calculating the complexity of PHP code units. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/complexity -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/complexity -``` diff --git a/vendor/sebastian/complexity/SECURITY.md b/vendor/sebastian/complexity/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/complexity/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/complexity/composer.json b/vendor/sebastian/complexity/composer.json deleted file mode 100644 index 994a5a3d..00000000 --- a/vendor/sebastian/complexity/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "sebastian/complexity", - "description": "Library for calculating the complexity of PHP code units", - "type": "library", - "homepage": "https://github.com/sebastianbergmann/complexity", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "security": "https://github.com/sebastianbergmann/complexity/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3", - "nikic/php-parser": "^5.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - } -} diff --git a/vendor/sebastian/complexity/src/Calculator.php b/vendor/sebastian/complexity/src/Calculator.php deleted file mode 100644 index 546cbd74..00000000 --- a/vendor/sebastian/complexity/src/Calculator.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use function assert; -use function file_exists; -use function file_get_contents; -use function is_readable; -use function is_string; -use PhpParser\Error; -use PhpParser\Node; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitor\NameResolver; -use PhpParser\NodeVisitor\ParentConnectingVisitor; -use PhpParser\ParserFactory; - -final class Calculator -{ - /** - * @param non-empty-string $sourceFile - * - * @throws RuntimeException - */ - public function calculateForSourceFile(string $sourceFile): ComplexityCollection - { - assert(file_exists($sourceFile)); - assert(is_readable($sourceFile)); - - $source = file_get_contents($sourceFile); - - assert(is_string($source)); - - return $this->calculateForSourceString($source); - } - - /** - * @throws RuntimeException - */ - public function calculateForSourceString(string $source): ComplexityCollection - { - try { - $nodes = (new ParserFactory)->createForHostVersion()->parse($source); - - assert($nodes !== null); - - return $this->calculateForAbstractSyntaxTree($nodes); - // @codeCoverageIgnoreStart - } catch (Error $error) { - throw new RuntimeException( - $error->getMessage(), - $error->getCode(), - $error, - ); - } - // @codeCoverageIgnoreEnd - } - - /** - * @param Node[] $nodes - * - * @throws RuntimeException - */ - public function calculateForAbstractSyntaxTree(array $nodes): ComplexityCollection - { - $traverser = new NodeTraverser; - $complexityCalculatingVisitor = new ComplexityCalculatingVisitor(true); - - $traverser->addVisitor(new NameResolver); - $traverser->addVisitor(new ParentConnectingVisitor); - $traverser->addVisitor($complexityCalculatingVisitor); - - try { - /* @noinspection UnusedFunctionResultInspection */ - $traverser->traverse($nodes); - // @codeCoverageIgnoreStart - } catch (Error $error) { - throw new RuntimeException( - $error->getMessage(), - $error->getCode(), - $error, - ); - } - // @codeCoverageIgnoreEnd - - return $complexityCalculatingVisitor->result(); - } -} diff --git a/vendor/sebastian/complexity/src/Complexity/Complexity.php b/vendor/sebastian/complexity/src/Complexity/Complexity.php deleted file mode 100644 index 554a15d8..00000000 --- a/vendor/sebastian/complexity/src/Complexity/Complexity.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use function str_contains; - -/** - * @immutable - */ -final readonly class Complexity -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var positive-int - */ - private int $cyclomaticComplexity; - - /** - * @param non-empty-string $name - * @param positive-int $cyclomaticComplexity - */ - public function __construct(string $name, int $cyclomaticComplexity) - { - $this->name = $name; - $this->cyclomaticComplexity = $cyclomaticComplexity; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } - - public function isFunction(): bool - { - return !$this->isMethod(); - } - - public function isMethod(): bool - { - return str_contains($this->name, '::'); - } -} diff --git a/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php b/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php deleted file mode 100644 index 90fc4d08..00000000 --- a/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use function array_filter; -use function array_merge; -use function array_reverse; -use function array_values; -use function count; -use function usort; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @psalm-immutable - */ -final readonly class ComplexityCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $items; - - public static function fromList(Complexity ...$items): self - { - return new self(array_values($items)); - } - - /** - * @param list $items - */ - private function __construct(array $items) - { - $this->items = $items; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->items; - } - - public function getIterator(): ComplexityCollectionIterator - { - return new ComplexityCollectionIterator($this); - } - - /** - * @return non-negative-int - */ - public function count(): int - { - return count($this->items); - } - - public function isEmpty(): bool - { - return empty($this->items); - } - - /** - * @return non-negative-int - */ - public function cyclomaticComplexity(): int - { - $cyclomaticComplexity = 0; - - foreach ($this as $item) { - $cyclomaticComplexity += $item->cyclomaticComplexity(); - } - - return $cyclomaticComplexity; - } - - public function isFunction(): self - { - return new self( - array_values( - array_filter( - $this->items, - static fn (Complexity $complexity): bool => $complexity->isFunction(), - ), - ), - ); - } - - public function isMethod(): self - { - return new self( - array_values( - array_filter( - $this->items, - static fn (Complexity $complexity): bool => $complexity->isMethod(), - ), - ), - ); - } - - public function mergeWith(self $other): self - { - return new self( - array_merge( - $this->asArray(), - $other->asArray(), - ), - ); - } - - public function sortByDescendingCyclomaticComplexity(): self - { - $items = $this->items; - - usort( - $items, - static function (Complexity $a, Complexity $b): int - { - return $a->cyclomaticComplexity() <=> $b->cyclomaticComplexity(); - }, - ); - - return new self(array_reverse($items)); - } -} diff --git a/vendor/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php b/vendor/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php deleted file mode 100644 index 6415ce62..00000000 --- a/vendor/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use Iterator; - -/** - * @template-implements Iterator - */ -final class ComplexityCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $items; - private int $position = 0; - - public function __construct(ComplexityCollection $items) - { - $this->items = $items->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return isset($this->items[$this->position]); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Complexity - { - return $this->items[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/sebastian/complexity/src/Exception/Exception.php b/vendor/sebastian/complexity/src/Exception/Exception.php deleted file mode 100644 index 897ecdcf..00000000 --- a/vendor/sebastian/complexity/src/Exception/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/complexity/src/Exception/RuntimeException.php b/vendor/sebastian/complexity/src/Exception/RuntimeException.php deleted file mode 100644 index 6c68a6f0..00000000 --- a/vendor/sebastian/complexity/src/Exception/RuntimeException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php b/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php deleted file mode 100644 index 41ef2f03..00000000 --- a/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use function assert; -use function is_array; -use PhpParser\Node; -use PhpParser\Node\Expr\New_; -use PhpParser\Node\Stmt; -use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\Node\Stmt\Function_; -use PhpParser\Node\Stmt\Interface_; -use PhpParser\Node\Stmt\Trait_; -use PhpParser\NodeTraverser; -use PhpParser\NodeVisitor; -use PhpParser\NodeVisitorAbstract; - -final class ComplexityCalculatingVisitor extends NodeVisitorAbstract -{ - /** - * @var list - */ - private array $result = []; - private bool $shortCircuitTraversal; - - public function __construct(bool $shortCircuitTraversal) - { - $this->shortCircuitTraversal = $shortCircuitTraversal; - } - - public function enterNode(Node $node): ?int - { - if (!$node instanceof ClassMethod && !$node instanceof Function_) { - return null; - } - - if ($node instanceof ClassMethod) { - if ($node->getAttribute('parent') instanceof Interface_) { - return null; - } - - if ($node->isAbstract()) { - return null; - } - - $name = $this->classMethodName($node); - } else { - $name = $this->functionName($node); - } - - $statements = $node->getStmts(); - - assert(is_array($statements)); - - $this->result[] = new Complexity( - $name, - $this->cyclomaticComplexity($statements), - ); - - if ($this->shortCircuitTraversal) { - return NodeVisitor::DONT_TRAVERSE_CHILDREN; - } - - return null; - } - - public function result(): ComplexityCollection - { - return ComplexityCollection::fromList(...$this->result); - } - - /** - * @param Stmt[] $statements - * - * @return positive-int - */ - private function cyclomaticComplexity(array $statements): int - { - $traverser = new NodeTraverser; - - $cyclomaticComplexityCalculatingVisitor = new CyclomaticComplexityCalculatingVisitor; - - $traverser->addVisitor($cyclomaticComplexityCalculatingVisitor); - - /* @noinspection UnusedFunctionResultInspection */ - $traverser->traverse($statements); - - return $cyclomaticComplexityCalculatingVisitor->cyclomaticComplexity(); - } - - /** - * @return non-empty-string - */ - private function classMethodName(ClassMethod $node): string - { - $parent = $node->getAttribute('parent'); - - assert($parent instanceof Class_ || $parent instanceof Trait_); - - if ($parent->getAttribute('parent') instanceof New_) { - return 'anonymous class'; - } - - assert(isset($parent->namespacedName)); - - return $parent->namespacedName->toString() . '::' . $node->name->toString(); - } - - /** - * @return non-empty-string - */ - private function functionName(Function_ $node): string - { - assert(isset($node->namespacedName)); - - return $node->namespacedName->toString(); - } -} diff --git a/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php b/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php deleted file mode 100644 index a5dd5fb9..00000000 --- a/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Complexity; - -use PhpParser\Node; -use PhpParser\Node\Expr\BinaryOp\BooleanAnd; -use PhpParser\Node\Expr\BinaryOp\BooleanOr; -use PhpParser\Node\Expr\BinaryOp\LogicalAnd; -use PhpParser\Node\Expr\BinaryOp\LogicalOr; -use PhpParser\Node\Expr\Ternary; -use PhpParser\Node\Stmt\Case_; -use PhpParser\Node\Stmt\Catch_; -use PhpParser\Node\Stmt\ElseIf_; -use PhpParser\Node\Stmt\For_; -use PhpParser\Node\Stmt\Foreach_; -use PhpParser\Node\Stmt\If_; -use PhpParser\Node\Stmt\While_; -use PhpParser\NodeVisitorAbstract; - -final class CyclomaticComplexityCalculatingVisitor extends NodeVisitorAbstract -{ - /** - * @var positive-int - */ - private int $cyclomaticComplexity = 1; - - public function enterNode(Node $node): null - { - switch ($node::class) { - case BooleanAnd::class: - case BooleanOr::class: - case Case_::class: - case Catch_::class: - case ElseIf_::class: - case For_::class: - case Foreach_::class: - case If_::class: - case LogicalAnd::class: - case LogicalOr::class: - case Node\MatchArm::class: - case Ternary::class: - case While_::class: - $this->cyclomaticComplexity++; - } - - return null; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } -} diff --git a/vendor/sebastian/diff/ChangeLog.md b/vendor/sebastian/diff/ChangeLog.md deleted file mode 100644 index 4d3379ba..00000000 --- a/vendor/sebastian/diff/ChangeLog.md +++ /dev/null @@ -1,179 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.3 - -## [6.0.2] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [6.0.1] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [6.0.0] - 2024-02-02 - -### Removed - -* `SebastianBergmann\Diff\Chunk::getStart()`, `SebastianBergmann\Diff\Chunk::getStartRange()`, `SebastianBergmann\Diff\Chunk::getEnd()`, `SebastianBergmann\Diff\Chunk::getEndRange()`, and `SebastianBergmann\Diff\Chunk::getLines()` -* `SebastianBergmann\Diff\Diff::getFrom()`, `SebastianBergmann\Diff\Diff::getTo()`, and `SebastianBergmann\Diff\Diff::getChunks()` -* `SebastianBergmann\Diff\Line::getContent()` and `SebastianBergmann\Diff\Diff::getType()` -* This component is no longer supported on PHP 8.1 - -## [5.1.1] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [5.1.0] - 2023-12-22 - -### Added - -* `SebastianBergmann\Diff\Chunk::start()`, `SebastianBergmann\Diff\Chunk::startRange()`, `SebastianBergmann\Diff\Chunk::end()`, `SebastianBergmann\Diff\Chunk::endRange()`, and `SebastianBergmann\Diff\Chunk::lines()` -* `SebastianBergmann\Diff\Diff::from()`, `SebastianBergmann\Diff\Diff::to()`, and `SebastianBergmann\Diff\Diff::chunks()` -* `SebastianBergmann\Diff\Line::content()` and `SebastianBergmann\Diff\Diff::type()` -* `SebastianBergmann\Diff\Line::isAdded()`,`SebastianBergmann\Diff\Line::isRemoved()`, and `SebastianBergmann\Diff\Line::isUnchanged()` - -### Changed - -* `SebastianBergmann\Diff\Diff` now implements `IteratorAggregate`, iterating over it yields the aggregated `SebastianBergmann\Diff\Chunk` objects -* `SebastianBergmann\Diff\Chunk` now implements `IteratorAggregate`, iterating over it yields the aggregated `SebastianBergmann\Diff\Line` objects - -### Deprecated - -* `SebastianBergmann\Diff\Chunk::getStart()`, `SebastianBergmann\Diff\Chunk::getStartRange()`, `SebastianBergmann\Diff\Chunk::getEnd()`, `SebastianBergmann\Diff\Chunk::getEndRange()`, and `SebastianBergmann\Diff\Chunk::getLines()` -* `SebastianBergmann\Diff\Diff::getFrom()`, `SebastianBergmann\Diff\Diff::getTo()`, and `SebastianBergmann\Diff\Diff::getChunks()` -* `SebastianBergmann\Diff\Line::getContent()` and `SebastianBergmann\Diff\Diff::getType()` - -## [5.0.3] - 2023-05-01 - -### Changed - -* [#119](https://github.com/sebastianbergmann/diff/pull/119): Improve performance of `TimeEfficientLongestCommonSubsequenceCalculator` - -## [5.0.2] - 2023-05-01 - -### Changed - -* [#118](https://github.com/sebastianbergmann/diff/pull/118): Improve performance of `MemoryEfficientLongestCommonSubsequenceCalculator` - -## [5.0.1] - 2023-03-23 - -### Fixed - -* [#115](https://github.com/sebastianbergmann/diff/pull/115): `Parser::parseFileDiff()` does not handle diffs correctly that only add lines or only remove lines - -## [5.0.0] - 2023-02-03 - -### Changed - -* Passing a `DiffOutputBuilderInterface` instance to `Differ::__construct()` is no longer optional - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 - -## [4.0.4] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Diff\Exception` now correctly extends `\Throwable` - -## [4.0.3] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [4.0.2] - 2020-06-30 - -### Added - -* This component is now supported on PHP 8 - -## [4.0.1] - 2020-05-08 - -### Fixed - -* [#99](https://github.com/sebastianbergmann/diff/pull/99): Regression in unified diff output of identical strings - -## [4.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -## [3.0.2] - 2019-02-04 - -### Changed - -* `Chunk::setLines()` now ensures that the `$lines` array only contains `Line` objects - -## [3.0.1] - 2018-06-10 - -### Fixed - -* Removed `"minimum-stability": "dev",` from `composer.json` - -## [3.0.0] - 2018-02-01 - -* The `StrictUnifiedDiffOutputBuilder` implementation of the `DiffOutputBuilderInterface` was added - -### Changed - -* The default `DiffOutputBuilderInterface` implementation now generates context lines (unchanged lines) - -### Removed - -* This component is no longer supported on PHP 7.0 - -### Fixed - -* [#70](https://github.com/sebastianbergmann/diff/issues/70): Diffing of arrays no longer works - -## [2.0.1] - 2017-08-03 - -### Fixed - -* [#66](https://github.com/sebastianbergmann/diff/pull/66): Restored backwards compatibility for PHPUnit 6.1.4, 6.2.0, 6.2.1, 6.2.2, and 6.2.3 - -## [2.0.0] - 2017-07-11 [YANKED] - -### Added - -* [#64](https://github.com/sebastianbergmann/diff/pull/64): Show line numbers for chunks of a diff - -### Removed - -* This component is no longer supported on PHP 5.6 - -[7.0.0]: https://github.com/sebastianbergmann/diff/compare/6.0...7.0.0 -[6.0.2]: https://github.com/sebastianbergmann/diff/compare/6.0.1...6.0.2 -[6.0.1]: https://github.com/sebastianbergmann/diff/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/diff/compare/5.1...6.0.0 -[5.1.1]: https://github.com/sebastianbergmann/diff/compare/5.1.0...5.1.1 -[5.1.0]: https://github.com/sebastianbergmann/diff/compare/5.0.3...5.1.0 -[5.0.3]: https://github.com/sebastianbergmann/diff/compare/5.0.2...5.0.3 -[5.0.2]: https://github.com/sebastianbergmann/diff/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/diff/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/diff/compare/4.0.4...5.0.0 -[4.0.4]: https://github.com/sebastianbergmann/diff/compare/4.0.3...4.0.4 -[4.0.3]: https://github.com/sebastianbergmann/diff/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/sebastianbergmann/diff/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/diff/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/diff/compare/3.0.2...4.0.0 -[3.0.2]: https://github.com/sebastianbergmann/diff/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/diff/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/diff/compare/2.0...3.0.0 -[2.0.1]: https://github.com/sebastianbergmann/diff/compare/c341c98ce083db77f896a0aa64f5ee7652915970...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/diff/compare/1.4...c341c98ce083db77f896a0aa64f5ee7652915970 diff --git a/vendor/sebastian/diff/LICENSE b/vendor/sebastian/diff/LICENSE deleted file mode 100644 index c5268a91..00000000 --- a/vendor/sebastian/diff/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2002-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/diff/README.md b/vendor/sebastian/diff/README.md deleted file mode 100644 index 6688692f..00000000 --- a/vendor/sebastian/diff/README.md +++ /dev/null @@ -1,151 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/diff/v)](https://packagist.org/packages/sebastian/diff) -[![CI Status](https://github.com/sebastianbergmann/diff/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/diff/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/diff/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/diff) - -# sebastian/diff - -Diff implementation for PHP, factored out of PHPUnit into a stand-alone component. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/diff -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/diff -``` - -### Usage - -#### Generating diff - -The `Differ` class can be used to generate a textual representation of the difference between two strings: - -```php -diff('foo', 'bar'); -``` - -The code above yields the output below: - -```diff ---- Original -+++ New -@@ @@ --foo -+bar -``` - -The `UnifiedDiffOutputBuilder` used in the example above generates output in "unified diff" -format and is used by PHPUnit, for example. - -The `StrictUnifiedDiffOutputBuilder` generates output in "strict unified diff" format with -hunks, similar to `diff -u` and compatible with `patch` or `git apply`. - -The `DiffOnlyOutputBuilder` generates output that only contains the lines that differ. - -If none of these three output builders match your use case then you can implement -`DiffOutputBuilderInterface` to generate custom output. - -#### Parsing diff - -The `Parser` class can be used to parse a unified diff into an object graph: - -```php -use SebastianBergmann\Diff\Parser; -use SebastianBergmann\Git; - -$git = new Git('/usr/local/src/money'); - -$diff = $git->getDiff( - '948a1a07768d8edd10dcefa8315c1cbeffb31833', - 'c07a373d2399f3e686234c4f7f088d635eb9641b' -); - -$parser = new Parser; - -print_r($parser->parse($diff)); -``` - -The code above yields the output below: - - Array - ( - [0] => SebastianBergmann\Diff\Diff Object - ( - [from:SebastianBergmann\Diff\Diff:private] => a/tests/MoneyTest.php - [to:SebastianBergmann\Diff\Diff:private] => b/tests/MoneyTest.php - [chunks:SebastianBergmann\Diff\Diff:private] => Array - ( - [0] => SebastianBergmann\Diff\Chunk Object - ( - [start:SebastianBergmann\Diff\Chunk:private] => 87 - [startRange:SebastianBergmann\Diff\Chunk:private] => 7 - [end:SebastianBergmann\Diff\Chunk:private] => 87 - [endRange:SebastianBergmann\Diff\Chunk:private] => 7 - [lines:SebastianBergmann\Diff\Chunk:private] => Array - ( - [0] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => * @covers SebastianBergmann\Money\Money::add - ) - - [1] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => * @covers SebastianBergmann\Money\Money::newMoney - ) - - [2] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => */ - ) - - [3] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 2 - [content:SebastianBergmann\Diff\Line:private] => public function testAnotherMoneyWithSameCurrencyObjectCanBeAdded() - ) - - [4] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 1 - [content:SebastianBergmann\Diff\Line:private] => public function testAnotherMoneyObjectWithSameCurrencyCanBeAdded() - ) - - [5] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => { - ) - - [6] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => $a = new Money(1, new Currency('EUR')); - ) - - [7] => SebastianBergmann\Diff\Line Object - ( - [type:SebastianBergmann\Diff\Line:private] => 3 - [content:SebastianBergmann\Diff\Line:private] => $b = new Money(2, new Currency('EUR')); - ) - ) - ) - ) - ) - ) - -Note: If the chunk size is 0 lines, i.e., `getStartRange()` or `getEndRange()` return 0, the number of line returned by `getStart()` or `getEnd()` is one lower than one would expect. It is the line number after which the chunk should be inserted or deleted; in all other cases, it gives the first line number of the replaced range of lines. diff --git a/vendor/sebastian/diff/SECURITY.md b/vendor/sebastian/diff/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/diff/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/diff/composer.json b/vendor/sebastian/diff/composer.json deleted file mode 100644 index 124d8ed6..00000000 --- a/vendor/sebastian/diff/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "sebastian/diff", - "description": "Diff implementation", - "keywords": ["diff", "udiff", "unidiff", "unified diff"], - "homepage": "https://github.com/sebastianbergmann/diff", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "security": "https://github.com/sebastianbergmann/diff/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - } -} diff --git a/vendor/sebastian/diff/src/Chunk.php b/vendor/sebastian/diff/src/Chunk.php deleted file mode 100644 index 18b5ce17..00000000 --- a/vendor/sebastian/diff/src/Chunk.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use ArrayIterator; -use IteratorAggregate; -use Traversable; - -/** - * @template-implements IteratorAggregate - */ -final class Chunk implements IteratorAggregate -{ - private int $start; - private int $startRange; - private int $end; - private int $endRange; - - /** - * @var list - */ - private array $lines; - - /** - * @param list $lines - */ - public function __construct(int $start = 0, int $startRange = 1, int $end = 0, int $endRange = 1, array $lines = []) - { - $this->start = $start; - $this->startRange = $startRange; - $this->end = $end; - $this->endRange = $endRange; - $this->lines = $lines; - } - - public function start(): int - { - return $this->start; - } - - public function startRange(): int - { - return $this->startRange; - } - - public function end(): int - { - return $this->end; - } - - public function endRange(): int - { - return $this->endRange; - } - - /** - * @return list - */ - public function lines(): array - { - return $this->lines; - } - - /** - * @param list $lines - */ - public function setLines(array $lines): void - { - $this->lines = $lines; - } - - public function getIterator(): Traversable - { - return new ArrayIterator($this->lines); - } -} diff --git a/vendor/sebastian/diff/src/Diff.php b/vendor/sebastian/diff/src/Diff.php deleted file mode 100644 index 372eb3d5..00000000 --- a/vendor/sebastian/diff/src/Diff.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use ArrayIterator; -use IteratorAggregate; -use Traversable; - -/** - * @template-implements IteratorAggregate - */ -final class Diff implements IteratorAggregate -{ - /** - * @var non-empty-string - */ - private string $from; - - /** - * @var non-empty-string - */ - private string $to; - - /** - * @var list - */ - private array $chunks; - - /** - * @param non-empty-string $from - * @param non-empty-string $to - * @param list $chunks - */ - public function __construct(string $from, string $to, array $chunks = []) - { - $this->from = $from; - $this->to = $to; - $this->chunks = $chunks; - } - - /** - * @return non-empty-string - */ - public function from(): string - { - return $this->from; - } - - /** - * @return non-empty-string - */ - public function to(): string - { - return $this->to; - } - - /** - * @return list - */ - public function chunks(): array - { - return $this->chunks; - } - - /** - * @param list $chunks - */ - public function setChunks(array $chunks): void - { - $this->chunks = $chunks; - } - - public function getIterator(): Traversable - { - return new ArrayIterator($this->chunks); - } -} diff --git a/vendor/sebastian/diff/src/Differ.php b/vendor/sebastian/diff/src/Differ.php deleted file mode 100644 index 44a4b445..00000000 --- a/vendor/sebastian/diff/src/Differ.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use const PHP_INT_SIZE; -use const PREG_SPLIT_DELIM_CAPTURE; -use const PREG_SPLIT_NO_EMPTY; -use function array_shift; -use function array_unshift; -use function array_values; -use function count; -use function current; -use function end; -use function is_string; -use function key; -use function min; -use function preg_split; -use function prev; -use function reset; -use function str_ends_with; -use function substr; -use SebastianBergmann\Diff\Output\DiffOutputBuilderInterface; - -final class Differ -{ - public const int OLD = 0; - public const int ADDED = 1; - public const int REMOVED = 2; - public const int DIFF_LINE_END_WARNING = 3; - public const int NO_LINE_END_EOF_WARNING = 4; - private DiffOutputBuilderInterface $outputBuilder; - - public function __construct(DiffOutputBuilderInterface $outputBuilder) - { - $this->outputBuilder = $outputBuilder; - } - - /** - * @param list|string $from - * @param list|string $to - */ - public function diff(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): string - { - $diff = $this->diffToArray($from, $to, $lcs); - - return $this->outputBuilder->getDiff($diff); - } - - /** - * @param list|string $from - * @param list|string $to - */ - public function diffToArray(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): array - { - if (is_string($from)) { - $from = $this->splitStringByLines($from); - } - - if (is_string($to)) { - $to = $this->splitStringByLines($to); - } - - [$from, $to, $start, $end] = self::getArrayDiffParted($from, $to); - - if ($lcs === null) { - $lcs = $this->selectLcsImplementation($from, $to); - } - - $common = $lcs->calculate(array_values($from), array_values($to)); - $diff = []; - - foreach ($start as $token) { - $diff[] = [$token, self::OLD]; - } - - reset($from); - reset($to); - - foreach ($common as $token) { - while ((/* from-token */ reset($from)) !== $token) { - $diff[] = [array_shift($from), self::REMOVED]; - } - - while ((/* to-token */ reset($to)) !== $token) { - $diff[] = [array_shift($to), self::ADDED]; - } - - $diff[] = [$token, self::OLD]; - - array_shift($from); - array_shift($to); - } - - while (($token = array_shift($from)) !== null) { - $diff[] = [$token, self::REMOVED]; - } - - while (($token = array_shift($to)) !== null) { - $diff[] = [$token, self::ADDED]; - } - - foreach ($end as $token) { - $diff[] = [$token, self::OLD]; - } - - if ($this->detectUnmatchedLineEndings($diff)) { - array_unshift($diff, ["#Warning: Strings contain different line endings!\n", self::DIFF_LINE_END_WARNING]); - } - - return $diff; - } - - private function splitStringByLines(string $input): array - { - return preg_split('/(.*\R)/', $input, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); - } - - private function selectLcsImplementation(array $from, array $to): LongestCommonSubsequenceCalculator - { - // We do not want to use the time-efficient implementation if its memory - // footprint will probably exceed this value. Note that the footprint - // calculation is only an estimation for the matrix and the LCS method - // will typically allocate a bit more memory than this. - $memoryLimit = 100 * 1024 * 1024; - - if ($this->calculateEstimatedFootprint($from, $to) > $memoryLimit) { - return new MemoryEfficientLongestCommonSubsequenceCalculator; - } - - return new TimeEfficientLongestCommonSubsequenceCalculator; - } - - private function calculateEstimatedFootprint(array $from, array $to): int - { - $itemSize = PHP_INT_SIZE === 4 ? 76 : 144; - - return $itemSize * min(count($from), count($to)) ** 2; - } - - private function detectUnmatchedLineEndings(array $diff): bool - { - $newLineBreaks = ['' => true]; - $oldLineBreaks = ['' => true]; - - foreach ($diff as $entry) { - if (self::OLD === $entry[1]) { - $ln = $this->getLinebreak($entry[0]); - $oldLineBreaks[$ln] = true; - $newLineBreaks[$ln] = true; - } elseif (self::ADDED === $entry[1]) { - $newLineBreaks[$this->getLinebreak($entry[0])] = true; - } elseif (self::REMOVED === $entry[1]) { - $oldLineBreaks[$this->getLinebreak($entry[0])] = true; - } - } - - // if either input or output is a single line without breaks than no warning should be raised - if (['' => true] === $newLineBreaks || ['' => true] === $oldLineBreaks) { - return false; - } - - // two-way compare - foreach ($newLineBreaks as $break => $set) { - if (!isset($oldLineBreaks[$break])) { - return true; - } - } - - foreach ($oldLineBreaks as $break => $set) { - if (!isset($newLineBreaks[$break])) { - return true; - } - } - - return false; - } - - private function getLinebreak($line): string - { - if (!is_string($line)) { - return ''; - } - - $lc = substr($line, -1); - - if ("\r" === $lc) { - return "\r"; - } - - if ("\n" !== $lc) { - return ''; - } - - if (str_ends_with($line, "\r\n")) { - return "\r\n"; - } - - return "\n"; - } - - private static function getArrayDiffParted(array &$from, array &$to): array - { - $start = []; - $end = []; - - reset($to); - - foreach ($from as $k => $v) { - $toK = key($to); - - if ($toK === $k && $v === $to[$k]) { - $start[$k] = $v; - - unset($from[$k], $to[$k]); - } else { - break; - } - } - - end($from); - end($to); - - do { - $fromK = key($from); - $toK = key($to); - - if (null === $fromK || null === $toK || current($from) !== current($to)) { - break; - } - - prev($from); - prev($to); - - $end = [$fromK => $from[$fromK]] + $end; - unset($from[$fromK], $to[$toK]); - } while (true); - - return [$from, $to, $start, $end]; - } -} diff --git a/vendor/sebastian/diff/src/Exception/ConfigurationException.php b/vendor/sebastian/diff/src/Exception/ConfigurationException.php deleted file mode 100644 index 4bd25d89..00000000 --- a/vendor/sebastian/diff/src/Exception/ConfigurationException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use function gettype; -use function is_object; -use function sprintf; -use Exception; - -final class ConfigurationException extends InvalidArgumentException -{ - public function __construct(string $option, string $expected, mixed $value, int $code = 0, ?Exception $previous = null) - { - parent::__construct( - sprintf( - 'Option "%s" must be %s, got "%s".', - $option, - $expected, - is_object($value) ? $value::class : (null === $value ? '' : gettype($value) . '#' . $value), - ), - $code, - $previous, - ); - } -} diff --git a/vendor/sebastian/diff/src/Exception/Exception.php b/vendor/sebastian/diff/src/Exception/Exception.php deleted file mode 100644 index e20d3203..00000000 --- a/vendor/sebastian/diff/src/Exception/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/diff/src/Exception/InvalidArgumentException.php b/vendor/sebastian/diff/src/Exception/InvalidArgumentException.php deleted file mode 100644 index 846ac3fb..00000000 --- a/vendor/sebastian/diff/src/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/sebastian/diff/src/Line.php b/vendor/sebastian/diff/src/Line.php deleted file mode 100644 index 6576beeb..00000000 --- a/vendor/sebastian/diff/src/Line.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -final class Line -{ - public const int ADDED = 1; - public const int REMOVED = 2; - public const int UNCHANGED = 3; - private int $type; - private string $content; - - public function __construct(int $type = self::UNCHANGED, string $content = '') - { - $this->type = $type; - $this->content = $content; - } - - public function content(): string - { - return $this->content; - } - - public function type(): int - { - return $this->type; - } - - public function isAdded(): bool - { - return $this->type === self::ADDED; - } - - public function isRemoved(): bool - { - return $this->type === self::REMOVED; - } - - public function isUnchanged(): bool - { - return $this->type === self::UNCHANGED; - } -} diff --git a/vendor/sebastian/diff/src/LongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/LongestCommonSubsequenceCalculator.php deleted file mode 100644 index dea8fe1c..00000000 --- a/vendor/sebastian/diff/src/LongestCommonSubsequenceCalculator.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -interface LongestCommonSubsequenceCalculator -{ - /** - * Calculates the longest common subsequence of two arrays. - */ - public function calculate(array $from, array $to): array; -} diff --git a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php deleted file mode 100644 index c9489230..00000000 --- a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use function array_fill; -use function array_merge; -use function array_reverse; -use function array_slice; -use function count; -use function in_array; - -final class MemoryEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator -{ - /** - * @inheritDoc - */ - public function calculate(array $from, array $to): array - { - $cFrom = count($from); - $cTo = count($to); - - if ($cFrom === 0) { - return []; - } - - if ($cFrom === 1) { - if (in_array($from[0], $to, true)) { - return [$from[0]]; - } - - return []; - } - - $i = (int) ($cFrom / 2); - $fromStart = array_slice($from, 0, $i); - $fromEnd = array_slice($from, $i); - $llB = $this->length($fromStart, $to); - $llE = $this->length(array_reverse($fromEnd), array_reverse($to)); - $jMax = 0; - $max = 0; - - for ($j = 0; $j <= $cTo; $j++) { - $m = $llB[$j] + $llE[$cTo - $j]; - - if ($m >= $max) { - $max = $m; - $jMax = $j; - } - } - - $toStart = array_slice($to, 0, $jMax); - $toEnd = array_slice($to, $jMax); - - return array_merge( - $this->calculate($fromStart, $toStart), - $this->calculate($fromEnd, $toEnd), - ); - } - - private function length(array $from, array $to): array - { - $current = array_fill(0, count($to) + 1, 0); - $cFrom = count($from); - $cTo = count($to); - - for ($i = 0; $i < $cFrom; $i++) { - $prev = $current; - - for ($j = 0; $j < $cTo; $j++) { - if ($from[$i] === $to[$j]) { - $current[$j + 1] = $prev[$j] + 1; - } else { - /** - * @noinspection PhpConditionCanBeReplacedWithMinMaxCallInspection - * - * We do not use max() here to avoid the function call overhead - */ - if ($current[$j] > $prev[$j + 1]) { - $current[$j + 1] = $current[$j]; - } else { - $current[$j + 1] = $prev[$j + 1]; - } - } - } - } - - return $current; - } -} diff --git a/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php b/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php deleted file mode 100644 index a4377d30..00000000 --- a/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff\Output; - -use function count; - -abstract class AbstractChunkOutputBuilder implements DiffOutputBuilderInterface -{ - /** - * Takes input of the diff array and returns the common parts. - * Iterates through diff line by line. - * - * @return array - */ - protected function getCommonChunks(array $diff, int $lineThreshold = 5): array - { - $diffSize = count($diff); - $capturing = false; - $chunkStart = 0; - $chunkSize = 0; - $commonChunks = []; - - for ($i = 0; $i < $diffSize; $i++) { - if ($diff[$i][1] === 0 /* OLD */) { - if ($capturing === false) { - $capturing = true; - $chunkStart = $i; - $chunkSize = 0; - } else { - $chunkSize++; - } - } elseif ($capturing !== false) { - if ($chunkSize >= $lineThreshold) { - $commonChunks[$chunkStart] = $chunkStart + $chunkSize; - } - - $capturing = false; - } - } - - if ($capturing !== false && $chunkSize >= $lineThreshold) { - $commonChunks[$chunkStart] = $chunkStart + $chunkSize; - } - - return $commonChunks; - } -} diff --git a/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php b/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php deleted file mode 100644 index 7b5d3a73..00000000 --- a/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff\Output; - -use function assert; -use function fclose; -use function fopen; -use function fwrite; -use function is_resource; -use function str_ends_with; -use function stream_get_contents; -use function substr; -use SebastianBergmann\Diff\Differ; - -/** - * Builds a diff string representation in a loose unified diff format - * listing only changes lines. Does not include line numbers. - */ -final class DiffOnlyOutputBuilder implements DiffOutputBuilderInterface -{ - private string $header; - - public function __construct(string $header = "--- Original\n+++ New\n") - { - $this->header = $header; - } - - public function getDiff(array $diff): string - { - $buffer = fopen('php://memory', 'r+b'); - - assert(is_resource($buffer)); - - if ('' !== $this->header) { - fwrite($buffer, $this->header); - - if (!str_ends_with($this->header, "\n")) { - fwrite($buffer, "\n"); - } - } - - foreach ($diff as $diffEntry) { - if ($diffEntry[1] === Differ::ADDED) { - fwrite($buffer, '+' . $diffEntry[0]); - } elseif ($diffEntry[1] === Differ::REMOVED) { - fwrite($buffer, '-' . $diffEntry[0]); - } elseif ($diffEntry[1] === Differ::DIFF_LINE_END_WARNING) { - fwrite($buffer, ' ' . $diffEntry[0]); - - continue; // Warnings should not be tested for line break, it will always be there - } else { /* Not changed (old) 0 */ - continue; // we didn't write the not-changed line, so do not add a line break either - } - - $lc = substr($diffEntry[0], -1); - - if ($lc !== "\n" && $lc !== "\r") { - fwrite($buffer, "\n"); // \No newline at end of file - } - } - - $diff = stream_get_contents($buffer, -1, 0); - fclose($buffer); - - return $diff; - } -} diff --git a/vendor/sebastian/diff/src/Output/DiffOutputBuilderInterface.php b/vendor/sebastian/diff/src/Output/DiffOutputBuilderInterface.php deleted file mode 100644 index 0e18f9f2..00000000 --- a/vendor/sebastian/diff/src/Output/DiffOutputBuilderInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff\Output; - -/** - * Defines how an output builder should take a generated - * diff array and return a string representation of that diff. - */ -interface DiffOutputBuilderInterface -{ - public function getDiff(array $diff): string; -} diff --git a/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php b/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php deleted file mode 100644 index 5c496186..00000000 --- a/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff\Output; - -use function array_merge; -use function array_splice; -use function assert; -use function count; -use function fclose; -use function fopen; -use function fwrite; -use function is_bool; -use function is_int; -use function is_resource; -use function is_string; -use function max; -use function min; -use function sprintf; -use function stream_get_contents; -use function substr; -use SebastianBergmann\Diff\ConfigurationException; -use SebastianBergmann\Diff\Differ; - -/** - * Strict Unified diff output builder. - * - * Generates (strict) Unified diff's (unidiffs) with hunks. - */ -final class StrictUnifiedDiffOutputBuilder implements DiffOutputBuilderInterface -{ - private static array $default = [ - 'collapseRanges' => true, // ranges of length one are rendered with the trailing `,1` - 'commonLineThreshold' => 6, // number of same lines before ending a new hunk and creating a new one (if needed) - 'contextLines' => 3, // like `diff: -u, -U NUM, --unified[=NUM]`, for patch/git apply compatibility best to keep at least @ 3 - 'fromFile' => null, - 'fromFileDate' => null, - 'toFile' => null, - 'toFileDate' => null, - ]; - private bool $changed; - private bool $collapseRanges; - - /** - * @var positive-int - */ - private int $commonLineThreshold; - private string $header; - - /** - * @var positive-int - */ - private int $contextLines; - - public function __construct(array $options = []) - { - $options = array_merge(self::$default, $options); - - if (!is_bool($options['collapseRanges'])) { - throw new ConfigurationException('collapseRanges', 'a bool', $options['collapseRanges']); - } - - if (!is_int($options['contextLines']) || $options['contextLines'] < 0) { - throw new ConfigurationException('contextLines', 'an int >= 0', $options['contextLines']); - } - - if (!is_int($options['commonLineThreshold']) || $options['commonLineThreshold'] <= 0) { - throw new ConfigurationException('commonLineThreshold', 'an int > 0', $options['commonLineThreshold']); - } - - $this->assertString($options, 'fromFile'); - $this->assertString($options, 'toFile'); - $this->assertStringOrNull($options, 'fromFileDate'); - $this->assertStringOrNull($options, 'toFileDate'); - - $this->header = sprintf( - "--- %s%s\n+++ %s%s\n", - $options['fromFile'], - null === $options['fromFileDate'] ? '' : "\t" . $options['fromFileDate'], - $options['toFile'], - null === $options['toFileDate'] ? '' : "\t" . $options['toFileDate'], - ); - - $this->collapseRanges = $options['collapseRanges']; - $this->commonLineThreshold = $options['commonLineThreshold']; - $this->contextLines = $options['contextLines']; - } - - public function getDiff(array $diff): string - { - if (0 === count($diff)) { - return ''; - } - - $this->changed = false; - - $buffer = fopen('php://memory', 'r+b'); - - assert(is_resource($buffer)); - - fwrite($buffer, $this->header); - - $this->writeDiffHunks($buffer, $diff); - - if (!$this->changed) { - fclose($buffer); - - return ''; - } - - $diff = stream_get_contents($buffer, -1, 0); - - fclose($buffer); - - // If the last char is not a linebreak: add it. - // This might happen when both the `from` and `to` do not have a trailing linebreak - $last = substr($diff, -1); - - return "\n" !== $last && "\r" !== $last - ? $diff . "\n" - : $diff; - } - - private function writeDiffHunks($output, array $diff): void - { - // detect "No newline at end of file" and insert into `$diff` if needed - - $upperLimit = count($diff); - - if (0 === $diff[$upperLimit - 1][1]) { - $lc = substr($diff[$upperLimit - 1][0], -1); - - if ("\n" !== $lc) { - array_splice($diff, $upperLimit, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]); - } - } else { - // search back for the last `+` and `-` line, - // check if it has a trailing linebreak, else add a warning under it - $toFind = [1 => true, 2 => true]; - - for ($i = $upperLimit - 1; $i >= 0; $i--) { - if (isset($toFind[$diff[$i][1]])) { - unset($toFind[$diff[$i][1]]); - $lc = substr($diff[$i][0], -1); - - if ("\n" !== $lc) { - array_splice($diff, $i + 1, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]); - } - - if (!count($toFind)) { - break; - } - } - } - } - - // write hunks to output buffer - - $cutOff = max($this->commonLineThreshold, $this->contextLines); - $hunkCapture = false; - $sameCount = $toRange = $fromRange = 0; - $toStart = $fromStart = 1; - $i = 0; - - /** @var int $i */ - foreach ($diff as $i => $entry) { - if (0 === $entry[1]) { // same - if (false === $hunkCapture) { - $fromStart++; - $toStart++; - - continue; - } - - $sameCount++; - $toRange++; - $fromRange++; - - if ($sameCount === $cutOff) { - $contextStartOffset = ($hunkCapture - $this->contextLines) < 0 - ? $hunkCapture - : $this->contextLines; - - // note: $contextEndOffset = $this->contextLines; - // - // because we never go beyond the end of the diff. - // with the cutoff/contextlines here the follow is never true; - // - // if ($i - $cutOff + $this->contextLines + 1 > \count($diff)) { - // $contextEndOffset = count($diff) - 1; - // } - // - // ; that would be true for a trailing incomplete hunk case which is dealt with after this loop - - $this->writeHunk( - $diff, - $hunkCapture - $contextStartOffset, - $i - $cutOff + $this->contextLines + 1, - $fromStart - $contextStartOffset, - $fromRange - $cutOff + $contextStartOffset + $this->contextLines, - $toStart - $contextStartOffset, - $toRange - $cutOff + $contextStartOffset + $this->contextLines, - $output, - ); - - $fromStart += $fromRange; - $toStart += $toRange; - - $hunkCapture = false; - $sameCount = $toRange = $fromRange = 0; - } - - continue; - } - - $sameCount = 0; - - if ($entry[1] === Differ::NO_LINE_END_EOF_WARNING) { - continue; - } - - $this->changed = true; - - if (false === $hunkCapture) { - $hunkCapture = $i; - } - - if (Differ::ADDED === $entry[1]) { // added - $toRange++; - } - - if (Differ::REMOVED === $entry[1]) { // removed - $fromRange++; - } - } - - if (false === $hunkCapture) { - return; - } - - // we end here when cutoff (commonLineThreshold) was not reached, but we were capturing a hunk, - // do not render hunk till end automatically because the number of context lines might be less than the commonLineThreshold - - $contextStartOffset = $hunkCapture - $this->contextLines < 0 - ? $hunkCapture - : $this->contextLines; - - // prevent trying to write out more common lines than there are in the diff _and_ - // do not write more than configured through the context lines - $contextEndOffset = min($sameCount, $this->contextLines); - - $fromRange -= $sameCount; - $toRange -= $sameCount; - - $this->writeHunk( - $diff, - $hunkCapture - $contextStartOffset, - $i - $sameCount + $contextEndOffset + 1, - $fromStart - $contextStartOffset, - $fromRange + $contextStartOffset + $contextEndOffset, - $toStart - $contextStartOffset, - $toRange + $contextStartOffset + $contextEndOffset, - $output, - ); - } - - private function writeHunk( - array $diff, - int $diffStartIndex, - int $diffEndIndex, - int $fromStart, - int $fromRange, - int $toStart, - int $toRange, - $output - ): void { - fwrite($output, '@@ -' . $fromStart); - - if (!$this->collapseRanges || 1 !== $fromRange) { - fwrite($output, ',' . $fromRange); - } - - fwrite($output, ' +' . $toStart); - - if (!$this->collapseRanges || 1 !== $toRange) { - fwrite($output, ',' . $toRange); - } - - fwrite($output, " @@\n"); - - for ($i = $diffStartIndex; $i < $diffEndIndex; $i++) { - if ($diff[$i][1] === Differ::ADDED) { - $this->changed = true; - fwrite($output, '+' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::REMOVED) { - $this->changed = true; - fwrite($output, '-' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::OLD) { - fwrite($output, ' ' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::NO_LINE_END_EOF_WARNING) { - $this->changed = true; - fwrite($output, $diff[$i][0]); - } - // } elseif ($diff[$i][1] === Differ::DIFF_LINE_END_WARNING) { // custom comment inserted by PHPUnit/diff package - // skip - // } else { - // unknown/invalid - // } - } - } - - private function assertString(array $options, string $option): void - { - if (!is_string($options[$option])) { - throw new ConfigurationException($option, 'a string', $options[$option]); - } - } - - private function assertStringOrNull(array $options, string $option): void - { - if (null !== $options[$option] && !is_string($options[$option])) { - throw new ConfigurationException($option, 'a string or ', $options[$option]); - } - } -} diff --git a/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php b/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php deleted file mode 100644 index d07ace6f..00000000 --- a/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php +++ /dev/null @@ -1,261 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff\Output; - -use function array_splice; -use function assert; -use function count; -use function fclose; -use function fopen; -use function fwrite; -use function is_resource; -use function max; -use function min; -use function str_ends_with; -use function stream_get_contents; -use function substr; -use SebastianBergmann\Diff\Differ; - -/** - * Builds a diff string representation in unified diff format in chunks. - */ -final class UnifiedDiffOutputBuilder extends AbstractChunkOutputBuilder -{ - private bool $collapseRanges = true; - private int $commonLineThreshold = 6; - - /** - * @var positive-int - */ - private int $contextLines = 3; - private string $header; - private bool $addLineNumbers; - - public function __construct(string $header = "--- Original\n+++ New\n", bool $addLineNumbers = false) - { - $this->header = $header; - $this->addLineNumbers = $addLineNumbers; - } - - public function getDiff(array $diff): string - { - $buffer = fopen('php://memory', 'r+b'); - - assert(is_resource($buffer)); - - if ('' !== $this->header) { - fwrite($buffer, $this->header); - - if (!str_ends_with($this->header, "\n")) { - fwrite($buffer, "\n"); - } - } - - if (0 !== count($diff)) { - $this->writeDiffHunks($buffer, $diff); - } - - $diff = stream_get_contents($buffer, -1, 0); - - fclose($buffer); - - // If the diff is non-empty and last char is not a linebreak: add it. - // This might happen when both the `from` and `to` do not have a trailing linebreak - $last = substr($diff, -1); - - return '' !== $diff && "\n" !== $last && "\r" !== $last - ? $diff . "\n" - : $diff; - } - - private function writeDiffHunks($output, array $diff): void - { - // detect "No newline at end of file" and insert into `$diff` if needed - - $upperLimit = count($diff); - - if (0 === $diff[$upperLimit - 1][1]) { - $lc = substr($diff[$upperLimit - 1][0], -1); - - if ("\n" !== $lc) { - array_splice($diff, $upperLimit, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]); - } - } else { - // search back for the last `+` and `-` line, - // check if it has trailing linebreak, else add a warning under it - $toFind = [1 => true, 2 => true]; - - for ($i = $upperLimit - 1; $i >= 0; $i--) { - if (isset($toFind[$diff[$i][1]])) { - unset($toFind[$diff[$i][1]]); - $lc = substr($diff[$i][0], -1); - - if ("\n" !== $lc) { - array_splice($diff, $i + 1, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]); - } - - if (!count($toFind)) { - break; - } - } - } - } - - // write hunks to output buffer - - $cutOff = max($this->commonLineThreshold, $this->contextLines); - $hunkCapture = false; - $sameCount = $toRange = $fromRange = 0; - $toStart = $fromStart = 1; - $i = 0; - - /** @var int $i */ - foreach ($diff as $i => $entry) { - if (0 === $entry[1]) { // same - if (false === $hunkCapture) { - $fromStart++; - $toStart++; - - continue; - } - - $sameCount++; - $toRange++; - $fromRange++; - - if ($sameCount === $cutOff) { - $contextStartOffset = ($hunkCapture - $this->contextLines) < 0 - ? $hunkCapture - : $this->contextLines; - - // note: $contextEndOffset = $this->contextLines; - // - // because we never go beyond the end of the diff. - // with the cutoff/contextlines here the follow is never true; - // - // if ($i - $cutOff + $this->contextLines + 1 > \count($diff)) { - // $contextEndOffset = count($diff) - 1; - // } - // - // ; that would be true for a trailing incomplete hunk case which is dealt with after this loop - - $this->writeHunk( - $diff, - $hunkCapture - $contextStartOffset, - $i - $cutOff + $this->contextLines + 1, - $fromStart - $contextStartOffset, - $fromRange - $cutOff + $contextStartOffset + $this->contextLines, - $toStart - $contextStartOffset, - $toRange - $cutOff + $contextStartOffset + $this->contextLines, - $output, - ); - - $fromStart += $fromRange; - $toStart += $toRange; - - $hunkCapture = false; - $sameCount = $toRange = $fromRange = 0; - } - - continue; - } - - $sameCount = 0; - - if ($entry[1] === Differ::NO_LINE_END_EOF_WARNING) { - continue; - } - - if (false === $hunkCapture) { - $hunkCapture = $i; - } - - if (Differ::ADDED === $entry[1]) { - $toRange++; - } - - if (Differ::REMOVED === $entry[1]) { - $fromRange++; - } - } - - if (false === $hunkCapture) { - return; - } - - // we end here when cutoff (commonLineThreshold) was not reached, but we were capturing a hunk, - // do not render hunk till end automatically because the number of context lines might be less than the commonLineThreshold - - $contextStartOffset = $hunkCapture - $this->contextLines < 0 - ? $hunkCapture - : $this->contextLines; - - // prevent trying to write out more common lines than there are in the diff _and_ - // do not write more than configured through the context lines - $contextEndOffset = min($sameCount, $this->contextLines); - - $fromRange -= $sameCount; - $toRange -= $sameCount; - - $this->writeHunk( - $diff, - $hunkCapture - $contextStartOffset, - $i - $sameCount + $contextEndOffset + 1, - $fromStart - $contextStartOffset, - $fromRange + $contextStartOffset + $contextEndOffset, - $toStart - $contextStartOffset, - $toRange + $contextStartOffset + $contextEndOffset, - $output, - ); - } - - private function writeHunk( - array $diff, - int $diffStartIndex, - int $diffEndIndex, - int $fromStart, - int $fromRange, - int $toStart, - int $toRange, - $output - ): void { - if ($this->addLineNumbers) { - fwrite($output, '@@ -' . $fromStart); - - if (!$this->collapseRanges || 1 !== $fromRange) { - fwrite($output, ',' . $fromRange); - } - - fwrite($output, ' +' . $toStart); - - if (!$this->collapseRanges || 1 !== $toRange) { - fwrite($output, ',' . $toRange); - } - - fwrite($output, " @@\n"); - } else { - fwrite($output, "@@ @@\n"); - } - - for ($i = $diffStartIndex; $i < $diffEndIndex; $i++) { - if ($diff[$i][1] === Differ::ADDED) { - fwrite($output, '+' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::REMOVED) { - fwrite($output, '-' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::OLD) { - fwrite($output, ' ' . $diff[$i][0]); - } elseif ($diff[$i][1] === Differ::NO_LINE_END_EOF_WARNING) { - fwrite($output, "\n"); // $diff[$i][0] - } else { /* Not changed (old) Differ::OLD or Warning Differ::DIFF_LINE_END_WARNING */ - fwrite($output, ' ' . $diff[$i][0]); - } - } - } -} diff --git a/vendor/sebastian/diff/src/Parser.php b/vendor/sebastian/diff/src/Parser.php deleted file mode 100644 index e63e690c..00000000 --- a/vendor/sebastian/diff/src/Parser.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use const PREG_UNMATCHED_AS_NULL; -use function array_pop; -use function assert; -use function count; -use function max; -use function preg_match; -use function preg_split; - -/** - * Unified diff parser. - */ -final class Parser -{ - /** - * @return Diff[] - */ - public function parse(string $string): array - { - $lines = preg_split('(\r\n|\r|\n)', $string); - - if (!empty($lines) && $lines[count($lines) - 1] === '') { - array_pop($lines); - } - - $lineCount = count($lines); - $diffs = []; - $diff = null; - $collected = []; - - for ($i = 0; $i < $lineCount; $i++) { - if (preg_match('#^---\h+"?(?P[^\\v\\t"]+)#', $lines[$i], $fromMatch) && - preg_match('#^\\+\\+\\+\\h+"?(?P[^\\v\\t"]+)#', $lines[$i + 1], $toMatch)) { - if ($diff !== null) { - $this->parseFileDiff($diff, $collected); - - $diffs[] = $diff; - $collected = []; - } - - assert(!empty($fromMatch['file'])); - assert(!empty($toMatch['file'])); - - $diff = new Diff($fromMatch['file'], $toMatch['file']); - - $i++; - } else { - if (preg_match('/^(?:diff --git |index [\da-f.]+|[+-]{3} [ab])/', $lines[$i])) { - continue; - } - - $collected[] = $lines[$i]; - } - } - - if ($diff !== null && count($collected)) { - $this->parseFileDiff($diff, $collected); - - $diffs[] = $diff; - } - - return $diffs; - } - - /** - * @param string[] $lines - */ - private function parseFileDiff(Diff $diff, array $lines): void - { - $chunks = []; - $chunk = null; - $diffLines = []; - - foreach ($lines as $line) { - if (preg_match('/^@@\s+-(?P\d+)(?:,\s*(?P\d+))?\s+\+(?P\d+)(?:,\s*(?P\d+))?\s+@@/', $line, $match, PREG_UNMATCHED_AS_NULL)) { - $chunk = new Chunk( - (int) $match['start'], - isset($match['startrange']) ? max(0, (int) $match['startrange']) : 1, - (int) $match['end'], - isset($match['endrange']) ? max(0, (int) $match['endrange']) : 1, - ); - - $chunks[] = $chunk; - $diffLines = []; - - continue; - } - - if (preg_match('/^(?P[+ -])?(?P.*)/', $line, $match)) { - $type = Line::UNCHANGED; - - if ($match['type'] === '+') { - $type = Line::ADDED; - } elseif ($match['type'] === '-') { - $type = Line::REMOVED; - } - - $diffLines[] = new Line($type, $match['line']); - - $chunk?->setLines($diffLines); - } - } - - $diff->setChunks($chunks); - } -} diff --git a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php deleted file mode 100644 index 98e856d5..00000000 --- a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Diff; - -use function array_reverse; -use function count; -use SplFixedArray; - -final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator -{ - /** - * @inheritDoc - */ - public function calculate(array $from, array $to): array - { - $common = []; - $fromLength = count($from); - $toLength = count($to); - $width = $fromLength + 1; - $matrix = new SplFixedArray($width * ($toLength + 1)); - - for ($i = 0; $i <= $fromLength; $i++) { - $matrix[$i] = 0; - } - - for ($j = 0; $j <= $toLength; $j++) { - $matrix[$j * $width] = 0; - } - - for ($i = 1; $i <= $fromLength; $i++) { - for ($j = 1; $j <= $toLength; $j++) { - $o = ($j * $width) + $i; - - // don't use max() to avoid function call overhead - $firstOrLast = $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0; - - if ($matrix[$o - 1] > $matrix[$o - $width]) { - if ($firstOrLast > $matrix[$o - 1]) { - $matrix[$o] = $firstOrLast; - } else { - $matrix[$o] = $matrix[$o - 1]; - } - } else { - if ($firstOrLast > $matrix[$o - $width]) { - $matrix[$o] = $firstOrLast; - } else { - $matrix[$o] = $matrix[$o - $width]; - } - } - } - } - - $i = $fromLength; - $j = $toLength; - - while ($i > 0 && $j > 0) { - if ($from[$i - 1] === $to[$j - 1]) { - $common[] = $from[$i - 1]; - $i--; - $j--; - } else { - $o = ($j * $width) + $i; - - if ($matrix[$o - $width] > $matrix[$o - 1]) { - $j--; - } else { - $i--; - } - } - } - - return array_reverse($common); - } -} diff --git a/vendor/sebastian/environment/ChangeLog.md b/vendor/sebastian/environment/ChangeLog.md deleted file mode 100644 index 1eee0cb4..00000000 --- a/vendor/sebastian/environment/ChangeLog.md +++ /dev/null @@ -1,277 +0,0 @@ -# Changes in sebastianbergmann/environment - -All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [8.0.3] - 2025-08-12 - -### Changed - -* [#75](https://github.com/sebastianbergmann/environment/pull/75): Make `Runtime::isOpcacheActive()` public - -## [8.0.2] - 2025-05-21 - -### Fixed - -* [#74](https://github.com/sebastianbergmann/environment/pull/74): Regression introduced in version 8.0.0 - -## [8.0.1] - 2025-05-21 - -### Fixed - -* Take Xdebug mode into account for `Runtime::canCollectCodeCoverage()` - -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [7.2.1] - 2025-05-21 - -### Fixed - -* Take Xdebug mode into account for `Runtime::canCollectCodeCoverage()` - -## [7.2.0] - 2024-07-03 - -### Changed - -* Synced `Console::hasColorSupport()` with Symfony's `StreamOutput::hasColorSupport()` implementation -* Removed code left over from a time before PHP 5.4 and when HHVM was still supported -* This project now uses PHPStan instead of Psalm for static analysis - -### Deprecated - -* The `Runtime::getBinary()` method is now deprecated, use `escapeshellarg(PHP_BINARY)` instead -* The `Runtime::getRawBinary()` method is now deprecated, use the `PHP_BINARY` constant instead - -## [7.1.0] - 2024-03-23 - -### Added - -* [#72](https://github.com/sebastianbergmann/environment/pull/72): `Runtime::getRawBinary()` - -## [7.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [6.1.1] - 2024-MM-DD - -### Changed - -* Synced `Console::hasColorSupport()` with Symfony's `StreamOutput::hasColorSupport()` implementation - -## [6.1.0] - 2024-03-23 - -### Added - -* [#72](https://github.com/sebastianbergmann/environment/pull/72): `Runtime::getRawBinary()` - -## [6.0.1] - 2023-04-11 - -### Fixed - -* [#68](https://github.com/sebastianbergmann/environment/pull/68): The Just-in-Time compiler is disabled when `opcache.jit_buffer_size` is set to `0` -* [#70](https://github.com/sebastianbergmann/environment/pull/70): The first `0` of `opcache.jit` only disables CPU-specific optimizations, not the Just-in-Time compiler itself - -## [6.0.0] - 2023-02-03 - -### Removed - -* Removed `SebastianBergmann\Environment\OperatingSystem::getFamily()` because this component is no longer supported on PHP versions that do not have `PHP_OS_FAMILY` -* Removed `SebastianBergmann\Environment\Runtime::isHHVM()` -* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 - -## [5.1.5] - 2022-MM-DD - -### Fixed - -* [#59](https://github.com/sebastianbergmann/environment/issues/59): Wrong usage of `stream_isatty()`, `fstat()` used without checking whether the function is available - -## [5.1.4] - 2022-04-03 - -### Fixed - -* [#63](https://github.com/sebastianbergmann/environment/pull/63): `Runtime::getCurrentSettings()` does not correctly process INI settings - -## [5.1.3] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [5.1.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [5.1.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [5.1.0] - 2020-04-14 - -### Added - -* `Runtime::performsJustInTimeCompilation()` returns `true` if PHP 8's JIT is active, `false` otherwise - -## [5.0.2] - 2020-03-31 - -### Fixed - -* [#55](https://github.com/sebastianbergmann/environment/issues/55): `stty` command is executed even if no tty is available - -## [5.0.1] - 2020-02-19 - -### Changed - -* `Runtime::getNameWithVersionAndCodeCoverageDriver()` now prioritizes PCOV over Xdebug when both extensions are loaded (just like php-code-coverage does) - -## [5.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -## [4.2.3] - 2019-11-20 - -### Changed - -* [#50](https://github.com/sebastianbergmann/environment/pull/50): Windows improvements to console capabilities - -### Fixed - -* [#49](https://github.com/sebastianbergmann/environment/issues/49): Detection how OpCache handles docblocks does not work correctly when PHPDBG is used - -## [4.2.2] - 2019-05-05 - -### Fixed - -* [#44](https://github.com/sebastianbergmann/environment/pull/44): `TypeError` in `Console::getNumberOfColumnsInteractive()` - -## [4.2.1] - 2019-04-25 - -### Fixed - -* Fixed an issue in `Runtime::getCurrentSettings()` - -## [4.2.0] - 2019-04-25 - -### Added - -* [#36](https://github.com/sebastianbergmann/environment/pull/36): `Runtime::getCurrentSettings()` - -## [4.1.0] - 2019-02-01 - -### Added - -* Implemented `Runtime::getNameWithVersionAndCodeCoverageDriver()` method -* [#34](https://github.com/sebastianbergmann/environment/pull/34): Support for PCOV extension - -## [4.0.2] - 2019-01-28 - -### Fixed - -* [#33](https://github.com/sebastianbergmann/environment/issues/33): `Runtime::discardsComments()` returns true too eagerly - -### Removed - -* Removed support for Zend Optimizer+ in `Runtime::discardsComments()` - -## [4.0.1] - 2018-11-25 - -### Fixed - -* [#31](https://github.com/sebastianbergmann/environment/issues/31): Regressions in `Console` class - -## [4.0.0] - 2018-10-23 [YANKED] - -### Fixed - -* [#25](https://github.com/sebastianbergmann/environment/pull/25): `Console::hasColorSupport()` does not work on Windows - -### Removed - -* This component is no longer supported on PHP 7.0 - -## [3.1.0] - 2017-07-01 - -### Added - -* [#21](https://github.com/sebastianbergmann/environment/issues/21): Equivalent of `PHP_OS_FAMILY` (for PHP < 7.2) - -## [3.0.4] - 2017-06-20 - -### Fixed - -* [#20](https://github.com/sebastianbergmann/environment/pull/20): PHP 7 mode of HHVM not forced - -## [3.0.3] - 2017-05-18 - -### Fixed - -* [#18](https://github.com/sebastianbergmann/environment/issues/18): `Uncaught TypeError: preg_match() expects parameter 2 to be string, null given` - -## [3.0.2] - 2017-04-21 - -### Fixed - -* [#17](https://github.com/sebastianbergmann/environment/issues/17): `Uncaught TypeError: trim() expects parameter 1 to be string, boolean given` - -## [3.0.1] - 2017-04-21 - -### Fixed - -* Fixed inverted logic in `Runtime::discardsComments()` - -## [3.0.0] - 2017-04-21 - -### Added - -* Implemented `Runtime::discardsComments()` for querying whether the PHP runtime discards annotations - -### Removed - -* This component is no longer supported on PHP 5.6 - -[8.0.3]: https://github.com/sebastianbergmann/environment/compare/8.0.2...8.0.3 -[8.0.2]: https://github.com/sebastianbergmann/environment/compare/8.0.1...8.0.2 -[8.0.1]: https://github.com/sebastianbergmann/environment/compare/8.0.0...8.0.1 -[8.0.0]: https://github.com/sebastianbergmann/environment/compare/7.2...8.0.0 -[7.2.1]: https://github.com/sebastianbergmann/environment/compare/7.2.0...7.2.1 -[7.2.0]: https://github.com/sebastianbergmann/environment/compare/7.1.0...7.2.0 -[7.1.0]: https://github.com/sebastianbergmann/environment/compare/7.0.0...7.1.0 -[7.0.0]: https://github.com/sebastianbergmann/environment/compare/6.1...7.0.0 -[6.1.1]: https://github.com/sebastianbergmann/environment/compare/6.1.0...6.1 -[6.1.0]: https://github.com/sebastianbergmann/environment/compare/6.0.1...6.1.0 -[6.0.1]: https://github.com/sebastianbergmann/environment/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/environment/compare/5.1.5...6.0.0 -[5.1.5]: https://github.com/sebastianbergmann/environment/compare/5.1.4...5.1.5 -[5.1.4]: https://github.com/sebastianbergmann/environment/compare/5.1.3...5.1.4 -[5.1.3]: https://github.com/sebastianbergmann/environment/compare/5.1.2...5.1.3 -[5.1.2]: https://github.com/sebastianbergmann/environment/compare/5.1.1...5.1.2 -[5.1.1]: https://github.com/sebastianbergmann/environment/compare/5.1.0...5.1.1 -[5.1.0]: https://github.com/sebastianbergmann/environment/compare/5.0.2...5.1.0 -[5.0.2]: https://github.com/sebastianbergmann/environment/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/environment/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/environment/compare/4.2.3...5.0.0 -[4.2.3]: https://github.com/sebastianbergmann/environment/compare/4.2.2...4.2.3 -[4.2.2]: https://github.com/sebastianbergmann/environment/compare/4.2.1...4.2.2 -[4.2.1]: https://github.com/sebastianbergmann/environment/compare/4.2.0...4.2.1 -[4.2.0]: https://github.com/sebastianbergmann/environment/compare/4.1.0...4.2.0 -[4.1.0]: https://github.com/sebastianbergmann/environment/compare/4.0.2...4.1.0 -[4.0.2]: https://github.com/sebastianbergmann/environment/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/environment/compare/66691f8e2dc4641909166b275a9a4f45c0e89092...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/environment/compare/3.1.0...66691f8e2dc4641909166b275a9a4f45c0e89092 -[3.1.0]: https://github.com/sebastianbergmann/environment/compare/3.0...3.1.0 -[3.0.4]: https://github.com/sebastianbergmann/environment/compare/3.0.3...3.0.4 -[3.0.3]: https://github.com/sebastianbergmann/environment/compare/3.0.2...3.0.3 -[3.0.2]: https://github.com/sebastianbergmann/environment/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/environment/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/environment/compare/2.0...3.0.0 - diff --git a/vendor/sebastian/environment/LICENSE b/vendor/sebastian/environment/LICENSE deleted file mode 100644 index 845fd0b1..00000000 --- a/vendor/sebastian/environment/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2014-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/environment/README.md b/vendor/sebastian/environment/README.md deleted file mode 100644 index f91287e3..00000000 --- a/vendor/sebastian/environment/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/environment/v)](https://packagist.org/packages/sebastian/environment) -[![CI Status](https://github.com/sebastianbergmann/environment/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/environment/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/environment/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/environment) - -# sebastian/environment - -This component provides functionality that helps writing PHP code that has runtime-specific (PHP / HHVM) execution paths. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/environment -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/environment -``` diff --git a/vendor/sebastian/environment/SECURITY.md b/vendor/sebastian/environment/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/environment/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/environment/composer.json b/vendor/sebastian/environment/composer.json deleted file mode 100644 index f7534d7b..00000000 --- a/vendor/sebastian/environment/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "sebastian/environment", - "description": "Provides functionality to handle HHVM/PHP environments", - "keywords": ["environment","hhvm","xdebug"], - "homepage": "https://github.com/sebastianbergmann/environment", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "security": "https://github.com/sebastianbergmann/environment/security/policy" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "suggest": { - "ext-posix": "*" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - } -} diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php deleted file mode 100644 index 525c1939..00000000 --- a/vendor/sebastian/environment/src/Console.php +++ /dev/null @@ -1,225 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Environment; - -use const DIRECTORY_SEPARATOR; -use const STDIN; -use const STDOUT; -use function assert; -use function defined; -use function fclose; -use function fstat; -use function function_exists; -use function getenv; -use function in_array; -use function is_array; -use function is_int; -use function is_resource; -use function is_string; -use function posix_isatty; -use function preg_match; -use function proc_close; -use function proc_open; -use function sapi_windows_vt100_support; -use function shell_exec; -use function stream_get_contents; -use function stream_isatty; -use function strtoupper; -use function trim; - -final class Console -{ - /** - * @var int - */ - public const int STDIN = 0; - - /** - * @var int - */ - public const int STDOUT = 1; - - /** - * @var int - */ - public const int STDERR = 2; - - /** - * Returns true if STDOUT supports colorization. - * - * This code has been copied and adapted from - * Symfony\Component\Console\Output\StreamOutput. - */ - public function hasColorSupport(): bool - { - if (!defined('STDOUT')) { - return false; - } - - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if (!@stream_isatty(STDOUT) && - !in_array(strtoupper((string) getenv('MSYSTEM')), ['MINGW32', 'MINGW64'], true)) { - return false; - } - - if ($this->isWindows() && - function_exists('sapi_windows_vt100_support') && - @sapi_windows_vt100_support(STDOUT)) { - return true; - } - - if ('Hyper' === getenv('TERM_PROGRAM') || - false !== getenv('COLORTERM') || - false !== getenv('ANSICON') || - 'ON' === getenv('ConEmuANSI')) { - return true; - } - - if ('dumb' === $term = (string) getenv('TERM')) { - return false; - } - - return (bool) preg_match('/^((screen|xterm|vt100|vt220|putty|rxvt|ansi|cygwin|linux).*)|(.*-256(color)?(-bce)?)$/', $term); - } - - /** - * Returns the number of columns of the terminal. - * - * @codeCoverageIgnore - */ - public function getNumberOfColumns(): int - { - if (!$this->isInteractive(defined('STDIN') ? STDIN : self::STDIN)) { - return 80; - } - - if ($this->isWindows()) { - return $this->getNumberOfColumnsWindows(); - } - - return $this->getNumberOfColumnsInteractive(); - } - - /** - * Returns if the file descriptor is an interactive terminal or not. - * - * Normally, we want to use a resource as a parameter, yet sadly it's not always available, - * eg when running code in interactive console (`php -a`), STDIN/STDOUT/STDERR constants are not defined. - * - * @param int|resource $fileDescriptor - */ - public function isInteractive(mixed $fileDescriptor = self::STDOUT): bool - { - assert(is_int($fileDescriptor) || is_resource($fileDescriptor)); - - if (is_resource($fileDescriptor)) { - if (function_exists('stream_isatty') && @stream_isatty($fileDescriptor)) { - return true; - } - - if (function_exists('fstat')) { - $stat = @fstat(STDOUT); - - return $stat !== false && 0o020000 === ($stat['mode'] & 0o170000); - } - - return false; - } - - return function_exists('posix_isatty') && @posix_isatty($fileDescriptor); - } - - private function isWindows(): bool - { - return DIRECTORY_SEPARATOR === '\\'; - } - - /** - * @codeCoverageIgnore - */ - private function getNumberOfColumnsInteractive(): int - { - if (function_exists('shell_exec')) { - $stty = shell_exec('stty size'); - - if ($stty === false || $stty === null) { - $stty = ''; - } - - if (preg_match('#\d+ (\d+)#', $stty, $match) === 1) { - if ((int) $match[1] > 0) { - return (int) $match[1]; - } - } - - $stty = shell_exec('stty'); - - if ($stty === false || $stty === null) { - $stty = ''; - } - - if (preg_match('#columns = (\d+);#', $stty, $match) === 1) { - if ((int) $match[1] > 0) { - return (int) $match[1]; - } - } - } - - return 80; - } - - /** - * @codeCoverageIgnore - */ - private function getNumberOfColumnsWindows(): int - { - $ansicon = getenv('ANSICON'); - $columns = 80; - - /** @phpstan-ignore booleanAnd.rightNotBoolean */ - if (is_string($ansicon) && preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim($ansicon), $matches)) { - $columns = (int) $matches[1]; - } elseif (function_exists('proc_open')) { - $process = proc_open( - 'mode CON', - [ - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ], - $pipes, - null, - null, - ['suppress_errors' => true], - ); - - assert(is_array($pipes)); - assert(isset($pipes[1]) && is_resource($pipes[1])); - assert(isset($pipes[2]) && is_resource($pipes[2])); - - if (is_resource($process)) { - $info = stream_get_contents($pipes[1]); - - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - /** @phpstan-ignore if.condNotBoolean */ - if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', (string) $info, $matches)) { - $columns = (int) $matches[2]; - } - } - } - - return $columns - 1; - } -} diff --git a/vendor/sebastian/environment/src/Runtime.php b/vendor/sebastian/environment/src/Runtime.php deleted file mode 100644 index e272f01a..00000000 --- a/vendor/sebastian/environment/src/Runtime.php +++ /dev/null @@ -1,296 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Environment; - -use const PHP_BINARY; -use const PHP_SAPI; -use const PHP_VERSION; -use function array_map; -use function array_merge; -use function assert; -use function escapeshellarg; -use function explode; -use function extension_loaded; -use function in_array; -use function ini_get; -use function is_array; -use function parse_ini_file; -use function php_ini_loaded_file; -use function php_ini_scanned_files; -use function phpversion; -use function sprintf; -use function strrpos; -use function version_compare; -use function xdebug_info; - -final class Runtime -{ - /** - * Returns true when Xdebug or PCOV is available or - * the runtime used is PHPDBG. - */ - public function canCollectCodeCoverage(): bool - { - if ($this->hasPHPDBGCodeCoverage()) { - return true; - } - - if ($this->hasPCOV()) { - return true; - } - - if (!$this->hasXdebug()) { - return false; - } - - $xdebugVersion = phpversion('xdebug'); - - assert($xdebugVersion !== false); - - if (version_compare($xdebugVersion, '3', '<')) { - return true; - } - - $xdebugMode = xdebug_info('mode'); - - assert(is_array($xdebugMode)); - - if (in_array('coverage', $xdebugMode, true)) { - return true; - } - - return false; - } - - /** - * Returns true when Zend OPcache is loaded, enabled, - * and is configured to discard comments. - */ - public function discardsComments(): bool - { - if (!$this->isOpcacheActive()) { - return false; - } - - if (ini_get('opcache.save_comments') !== '0') { - return false; - } - - return true; - } - - /** - * Returns true when Zend OPcache is loaded, enabled, - * and is configured to perform just-in-time compilation. - */ - public function performsJustInTimeCompilation(): bool - { - if (!$this->isOpcacheActive()) { - return false; - } - - if (ini_get('opcache.jit_buffer_size') === '0') { - return false; - } - - $jit = (string) ini_get('opcache.jit'); - - if (($jit === 'disable') || ($jit === 'off')) { - return false; - } - - if (strrpos($jit, '0') === 3) { - return false; - } - - return true; - } - - /** - * Returns the raw path to the binary of the current runtime. - * - * @deprecated - */ - public function getRawBinary(): string - { - return PHP_BINARY; - } - - /** - * Returns the escaped path to the binary of the current runtime. - * - * @deprecated - */ - public function getBinary(): string - { - return escapeshellarg(PHP_BINARY); - } - - public function getNameWithVersion(): string - { - return $this->getName() . ' ' . $this->getVersion(); - } - - public function getNameWithVersionAndCodeCoverageDriver(): string - { - if ($this->hasPCOV()) { - return sprintf( - '%s with PCOV %s', - $this->getNameWithVersion(), - phpversion('pcov'), - ); - } - - if ($this->hasXdebug()) { - return sprintf( - '%s with Xdebug %s', - $this->getNameWithVersion(), - phpversion('xdebug'), - ); - } - - return $this->getNameWithVersion(); - } - - public function getName(): string - { - if ($this->isPHPDBG()) { - // @codeCoverageIgnoreStart - return 'PHPDBG'; - // @codeCoverageIgnoreEnd - } - - return 'PHP'; - } - - public function getVendorUrl(): string - { - return 'https://www.php.net/'; - } - - public function getVersion(): string - { - return PHP_VERSION; - } - - /** - * Returns true when the runtime used is PHP and Xdebug is loaded. - */ - public function hasXdebug(): bool - { - return $this->isPHP() && extension_loaded('xdebug'); - } - - /** - * Returns true when the runtime used is PHP without the PHPDBG SAPI. - */ - public function isPHP(): bool - { - return !$this->isPHPDBG(); - } - - /** - * Returns true when the runtime used is PHP with the PHPDBG SAPI. - */ - public function isPHPDBG(): bool - { - return PHP_SAPI === 'phpdbg'; - } - - /** - * Returns true when the runtime used is PHP with the PHPDBG SAPI - * and the phpdbg_*_oplog() functions are available (PHP >= 7.0). - */ - public function hasPHPDBGCodeCoverage(): bool - { - return $this->isPHPDBG(); - } - - /** - * Returns true when the runtime used is PHP with PCOV loaded and enabled. - */ - public function hasPCOV(): bool - { - return $this->isPHP() && extension_loaded('pcov') && ini_get('pcov.enabled') === '1'; - } - - /** - * Parses the loaded php.ini file (if any) as well as all - * additional php.ini files from the additional ini dir for - * a list of all configuration settings loaded from files - * at startup. Then checks for each php.ini setting passed - * via the `$values` parameter whether this setting has - * been changed at runtime. Returns an array of strings - * where each string has the format `key=value` denoting - * the name of a changed php.ini setting with its new value. - * - * @param list $values - * - * @return array - */ - public function getCurrentSettings(array $values): array - { - $diff = []; - $files = []; - - $file = php_ini_loaded_file(); - - if ($file !== false) { - $files[] = $file; - } - - $scanned = php_ini_scanned_files(); - - if ($scanned !== false) { - $files = array_merge( - $files, - array_map( - 'trim', - explode(",\n", $scanned), - ), - ); - } - - foreach ($files as $ini) { - $config = parse_ini_file($ini, true); - - foreach ($values as $value) { - $set = ini_get($value); - - if ($set === false || $set === '') { - continue; - } - - if ((!isset($config[$value]) || ($set !== $config[$value]))) { - $diff[$value] = sprintf('%s=%s', $value, $set); - } - } - } - - return $diff; - } - - public function isOpcacheActive(): bool - { - if (!extension_loaded('Zend OPcache')) { - return false; - } - - if ((PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') && ini_get('opcache.enable_cli') === '1') { - return true; - } - - if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' && ini_get('opcache.enable') === '1') { - return true; - } - - return false; - } -} diff --git a/vendor/sebastian/exporter/ChangeLog.md b/vendor/sebastian/exporter/ChangeLog.md deleted file mode 100644 index 3d6ce312..00000000 --- a/vendor/sebastian/exporter/ChangeLog.md +++ /dev/null @@ -1,25 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [7.0.2] - 2025-09-24 - -### Changed - -* Suppress `unexpected NAN value was coerced to string` warning triggered on PHP 8.5 - -## [7.0.1] - 2025-09-22 - -### Changed - -* Suppress `not representable as an int, cast occurred` warning triggered on PHP 8.5 - -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -[7.0.2]: https://github.com/sebastianbergmann/exporter/compare/7.0.1...7.0.2 -[7.0.1]: https://github.com/sebastianbergmann/exporter/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/exporter/compare/6.3...7.0.0 diff --git a/vendor/sebastian/exporter/LICENSE b/vendor/sebastian/exporter/LICENSE deleted file mode 100644 index c5268a91..00000000 --- a/vendor/sebastian/exporter/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2002-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/exporter/README.md b/vendor/sebastian/exporter/README.md deleted file mode 100644 index 08319dff..00000000 --- a/vendor/sebastian/exporter/README.md +++ /dev/null @@ -1,175 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/exporter/v)](https://packagist.org/packages/sebastian/exporter) -[![CI Status](https://github.com/sebastianbergmann/exporter/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/exporter/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/exporter/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/exporter) - -# sebastian/exporter - -This component provides the functionality to export PHP variables for visualization. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/exporter -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/exporter -``` - -## Usage - -Exporting: - -```php - '' - 'string' => '' - 'code' => 0 - 'file' => '/home/sebastianbergmann/test.php' - 'line' => 34 - 'previous' => null -) -*/ - -print $exporter->export(new Exception); -``` - -## Data Types - -Exporting simple types: - -```php -export(46); - -// 4.0 -print $exporter->export(4.0); - -// 'hello, world!' -print $exporter->export('hello, world!'); - -// false -print $exporter->export(false); - -// NAN -print $exporter->export(acos(8)); - -// -INF -print $exporter->export(log(0)); - -// null -print $exporter->export(null); - -// resource(13) of type (stream) -print $exporter->export(fopen('php://stderr', 'w')); - -// Binary String: 0x000102030405 -print $exporter->export(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5)); -``` - -Exporting complex types: - -```php - Array &1 ( - 0 => 1 - 1 => 2 - 2 => 3 - ) - 1 => Array &2 ( - 0 => '' - 1 => 0 - 2 => false - ) -) -*/ - -print $exporter->export(array(array(1,2,3), array("",0,FALSE))); - -/* -Array &0 ( - 'self' => Array &1 ( - 'self' => Array &1 - ) -) -*/ - -$array = array(); -$array['self'] = &$array; -print $exporter->export($array); - -/* -stdClass Object &0000000003a66dcc0000000025e723e2 ( - 'self' => stdClass Object &0000000003a66dcc0000000025e723e2 -) -*/ - -$obj = new stdClass(); -$obj->self = $obj; -print $exporter->export($obj); -``` - -Compact exports: - -```php -shortenedExport(array()); - -// Array (...) -print $exporter->shortenedExport(array(1,2,3,4,5)); - -// stdClass Object () -print $exporter->shortenedExport(new stdClass); - -// Exception Object (...) -print $exporter->shortenedExport(new Exception); - -// this\nis\na\nsuper\nlong\nstring\nt...\nspace -print $exporter->shortenedExport( -<<=8.3", - "ext-mbstring": "*", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - } -} - diff --git a/vendor/sebastian/exporter/src/Exporter.php b/vendor/sebastian/exporter/src/Exporter.php deleted file mode 100644 index 25a04feb..00000000 --- a/vendor/sebastian/exporter/src/Exporter.php +++ /dev/null @@ -1,462 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Exporter; - -use const COUNT_RECURSIVE; -use function assert; -use function bin2hex; -use function count; -use function get_resource_type; -use function gettype; -use function implode; -use function ini_get; -use function ini_set; -use function is_array; -use function is_bool; -use function is_float; -use function is_object; -use function is_resource; -use function is_string; -use function mb_strlen; -use function mb_substr; -use function preg_match; -use function spl_object_id; -use function sprintf; -use function str_repeat; -use function str_replace; -use function strtr; -use function var_export; -use BackedEnum; -use Google\Protobuf\Internal\Message; -use ReflectionClass; -use ReflectionObject; -use SebastianBergmann\RecursionContext\Context as RecursionContext; -use SplObjectStorage; -use stdClass; -use UnitEnum; - -final readonly class Exporter -{ - /** - * @var non-negative-int - */ - private int $shortenArraysLongerThan; - - /** - * @var positive-int - */ - private int $maxLengthForStrings; - - /** - * @param non-negative-int $shortenArraysLongerThan - * @param positive-int $maxLengthForStrings - */ - public function __construct(int $shortenArraysLongerThan = 0, int $maxLengthForStrings = 40) - { - $this->shortenArraysLongerThan = $shortenArraysLongerThan; - $this->maxLengthForStrings = $maxLengthForStrings; - } - - /** - * Exports a value as a string. - * - * The output of this method is similar to the output of print_r(), but - * improved in various aspects: - * - * - NULL is rendered as "null" (instead of "") - * - TRUE is rendered as "true" (instead of "1") - * - FALSE is rendered as "false" (instead of "") - * - Strings are always quoted with single quotes - * - Carriage returns and newlines are normalized to \n - * - Recursion and repeated rendering is treated properly - */ - public function export(mixed $value, int $indentation = 0): string - { - return $this->recursiveExport($value, $indentation); - } - - /** - * @param array $data - * @param positive-int $maxLengthForStrings - */ - public function shortenedRecursiveExport(array &$data, int $maxLengthForStrings = 40, ?RecursionContext $processed = null): string - { - if ($maxLengthForStrings === 40) { - $maxLengthForStrings = $this->maxLengthForStrings; - } - - if ($processed === null) { - $processed = new RecursionContext; - } - - $overallCount = @count($data, COUNT_RECURSIVE); - $counter = 0; - - $export = $this->shortenedCountedRecursiveExport($data, $processed, $counter, $maxLengthForStrings); - - if ($this->shortenArraysLongerThan > 0 && - $overallCount > $this->shortenArraysLongerThan) { - $export .= sprintf(', ...%d more elements', $overallCount - $this->shortenArraysLongerThan); - } - - return $export; - } - - /** - * Exports a value into a single-line string. - * - * The output of this method is similar to the output of - * SebastianBergmann\Exporter\Exporter::export(). - * - * Newlines are replaced by the visible string '\n'. - * Contents of arrays and objects (if any) are replaced by '...'. - * - * @param positive-int $maxLengthForStrings - */ - public function shortenedExport(mixed $value, int $maxLengthForStrings = 40): string - { - if ($maxLengthForStrings === 40) { - $maxLengthForStrings = $this->maxLengthForStrings; - } - - if (is_string($value)) { - $string = str_replace("\n", '', $this->exportString($value)); - - if (mb_strlen($string) > $maxLengthForStrings) { - return mb_substr($string, 0, $maxLengthForStrings - 10) . '...' . mb_substr($string, -7); - } - - return $string; - } - - if ($value instanceof BackedEnum) { - return sprintf( - '%s Enum (%s, %s)', - $value::class, - $value->name, - $this->export($value->value), - ); - } - - if ($value instanceof UnitEnum) { - return sprintf( - '%s Enum (%s)', - $value::class, - $value->name, - ); - } - - if (is_object($value)) { - return sprintf( - '%s Object (%s)', - $value::class, - $this->countProperties($value) > 0 ? '...' : '', - ); - } - - if (is_array($value)) { - return sprintf( - '[%s]', - count($value) > 0 ? '...' : '', - ); - } - - return $this->export($value); - } - - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @return array - */ - public function toArray(mixed $value): array - { - if (!is_object($value)) { - return (array) $value; - } - - $array = []; - - foreach ((array) $value as $key => $val) { - // Exception traces commonly reference hundreds to thousands of - // objects currently loaded in memory. Including them in the result - // has a severe negative performance impact. - if ("\0Error\0trace" === $key || "\0Exception\0trace" === $key) { - continue; - } - - // properties are transformed to keys in the following way: - // private $propertyName => "\0ClassName\0propertyName" - // protected $propertyName => "\0*\0propertyName" - // public $propertyName => "propertyName" - if (preg_match('/\0.+\0(.+)/', (string) $key, $matches) === 1) { - $key = $matches[1]; - } - - // See https://github.com/php/php-src/commit/5721132 - if ($key === "\0gcdata") { - continue; - } - - $array[$key] = $val; - } - - // Some internal classes like SplObjectStorage do not work with the - // above (fast) mechanism nor with reflection in Zend. - // Format the output similarly to print_r() in this case - if ($value instanceof SplObjectStorage) { - foreach ($value as $_value) { - $array['Object #' . spl_object_id($_value)] = [ - 'obj' => $_value, - 'inf' => $value->getInfo(), - ]; - } - - $value->rewind(); - } - - return $array; - } - - public function countProperties(object $value): int - { - if (!$this->canBeReflected($value)) { - // @codeCoverageIgnoreStart - return count($this->toArray($value)); - // @codeCoverageIgnoreEnd - } - - if (!$value instanceof stdClass) { - // using ReflectionClass prevents initialization of potential lazy objects - return count((new ReflectionClass($value))->getProperties()); - } - - return count((new ReflectionObject($value))->getProperties()); - } - - /** - * @param array $data - * @param positive-int $maxLengthForStrings - */ - private function shortenedCountedRecursiveExport(array &$data, RecursionContext $processed, int &$counter, int $maxLengthForStrings): string - { - $result = []; - - $array = $data; - - /* @noinspection UnusedFunctionResultInspection */ - $processed->add($data); - - foreach ($array as $key => $value) { - if ($this->shortenArraysLongerThan > 0 && - $counter > $this->shortenArraysLongerThan) { - break; - } - - if (is_array($value)) { - assert(isset($data[$key]) && (is_array($data[$key]) || is_object($data[$key]))); - - if ($processed->contains($data[$key]) !== false) { - $result[] = '*RECURSION*'; - } else { - assert(is_array($data[$key])); - - $result[] = '[' . $this->shortenedCountedRecursiveExport($data[$key], $processed, $counter, $maxLengthForStrings) . ']'; - } - } else { - $result[] = $this->shortenedExport($value, $maxLengthForStrings); - } - - $counter++; - } - - return implode(', ', $result); - } - - private function recursiveExport(mixed &$value, int $indentation = 0, ?RecursionContext $processed = null): string - { - if ($value === null) { - return 'null'; - } - - if (is_bool($value)) { - return $value ? 'true' : 'false'; - } - - if (is_float($value)) { - return $this->exportFloat($value); - } - - if (gettype($value) === 'resource (closed)') { - return 'resource (closed)'; - } - - if (is_resource($value)) { - return sprintf( - 'resource(%d) of type (%s)', - /** @phpstan-ignore cast.useless */ - (int) $value, - get_resource_type($value), - ); - } - - if ($value instanceof BackedEnum) { - return sprintf( - '%s Enum #%d (%s, %s)', - $value::class, - spl_object_id($value), - $value->name, - $this->export($value->value), - ); - } - - if ($value instanceof UnitEnum) { - return sprintf( - '%s Enum #%d (%s)', - $value::class, - spl_object_id($value), - $value->name, - ); - } - - if (is_string($value)) { - return $this->exportString($value); - } - - if ($processed === null) { - $processed = new RecursionContext; - } - - if (is_array($value)) { - return $this->exportArray($value, $processed, $indentation); - } - - if (is_object($value)) { - return $this->exportObject($value, $processed, $indentation); - } - - return var_export($value, true); - } - - private function exportFloat(float $value): string - { - $precisionBackup = ini_get('precision'); - - ini_set('precision', '-1'); - - $valueAsString = @(string) $value; - - ini_set('precision', $precisionBackup); - - if ((string) @(int) $value === $valueAsString) { - return $valueAsString . '.0'; - } - - return $valueAsString; - } - - private function exportString(string $value): string - { - // Match for most non-printable chars somewhat taking multibyte chars into account - if (preg_match('/[^\x09-\x0d\x1b\x20-\xff]/', $value) === 1) { - return 'Binary String: 0x' . bin2hex($value); - } - - return "'" . - strtr( - $value, - [ - "\r\n" => '\r\n' . "\n", - "\n\r" => '\n\r' . "\n", - "\r" => '\r' . "\n", - "\n" => '\n' . "\n", - ], - ) . - "'"; - } - - /** - * @param array $value - */ - private function exportArray(array &$value, RecursionContext $processed, int $indentation): string - { - if (($key = $processed->contains($value)) !== false) { - return 'Array &' . $key; - } - - $array = $value; - $key = $processed->add($value); - $values = ''; - - if (count($array) > 0) { - $whitespace = str_repeat(' ', 4 * $indentation); - - foreach ($array as $k => $v) { - $values .= - $whitespace - . ' ' . - $this->recursiveExport($k, $indentation) - . ' => ' . - /** @phpstan-ignore offsetAccess.invalidOffset */ - $this->recursiveExport($value[$k], $indentation + 1, $processed) - . ",\n"; - } - - $values = "\n" . $values . $whitespace; - } - - return 'Array &' . (string) $key . ' [' . $values . ']'; - } - - private function exportObject(object $value, RecursionContext $processed, int $indentation): string - { - $class = $value::class; - - if ($processed->contains($value) !== false) { - return $class . ' Object #' . spl_object_id($value); - } - - $processed->add($value); - - $array = $this->toArray($value); - $buffer = ''; - - if (count($array) > 0) { - $whitespace = str_repeat(' ', 4 * $indentation); - - foreach ($array as $k => $v) { - $buffer .= - $whitespace - . ' ' . - $this->recursiveExport($k, $indentation) - . ' => ' . - $this->recursiveExport($v, $indentation + 1, $processed) - . ",\n"; - } - - $buffer = "\n" . $buffer . $whitespace; - } - - return $class . ' Object #' . spl_object_id($value) . ' (' . $buffer . ')'; - } - - private function canBeReflected(object $object): bool - { - /** @phpstan-ignore class.notFound */ - if ($object instanceof Message) { - // @codeCoverageIgnoreStart - return false; - // @codeCoverageIgnoreEnd - } - - return true; - } -} diff --git a/vendor/sebastian/global-state/ChangeLog.md b/vendor/sebastian/global-state/ChangeLog.md deleted file mode 100644 index 67830261..00000000 --- a/vendor/sebastian/global-state/ChangeLog.md +++ /dev/null @@ -1,150 +0,0 @@ -# Changes in sebastian/global-state - -All notable changes in `sebastian/global-state` are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [8.0.2] - 2025-08-29 - -### Changed - -* [#39](https://github.com/sebastianbergmann/global-state/pull/39): Restore nullable variables in super-global arrays - -## [8.0.1] - 2025-08-28 - -### Changed - -* [#38](https://github.com/sebastianbergmann/global-state/pull/38): Improve performance of `Snapshot::snapshotSuperGlobalArray()` - -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [7.0.2] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [7.0.1] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [7.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [6.0.2] - 2024-03-02 - -### Changed - -* Do not use implicitly nullable parameters - -## [6.0.1] - 2023-07-19 - -### Changed - -* Changed usage of `ReflectionProperty::setValue()` to be compatible with PHP 8.3 - -## [6.0.0] - 2023-02-03 - -### Changed - -* Renamed `SebastianBergmann\GlobalState\ExcludeList::addStaticAttribute()` to `SebastianBergmann\GlobalState\ExcludeList::addStaticProperty()` -* Renamed `SebastianBergmann\GlobalState\ExcludeList::isStaticAttributeExcluded()` to `SebastianBergmann\GlobalState\ExcludeList::isStaticPropertyExcluded()` -* Renamed `SebastianBergmann\GlobalState\Restorer::restoreStaticAttributes()` to `SebastianBergmann\GlobalState\Restorer::restoreStaticProperties()` -* Renamed `SebastianBergmann\GlobalState\Snapshot::staticAttributes()` to `SebastianBergmann\GlobalState\Snapshot::staticProperties()` - -### Removed - -* Removed `SebastianBergmann\GlobalState\Restorer::restoreFunctions()` -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [5.0.5] - 2022-02-14 - -### Fixed - -* [#34](https://github.com/sebastianbergmann/global-state/pull/34): Uninitialised typed static properties are not handled correctly - -## [5.0.4] - 2022-02-10 - -### Fixed - -* The `$includeTraits` parameter of `SebastianBergmann\GlobalState\Snapshot::__construct()` is not respected - -## [5.0.3] - 2021-06-11 - -### Changed - -* `SebastianBergmann\GlobalState\CodeExporter::globalVariables()` now generates code that is compatible with PHP 8.1 - -## [5.0.2] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\GlobalState\Exception` now correctly extends `\Throwable` - -## [5.0.1] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [5.0.0] - 2020-08-07 - -### Changed - -* The `SebastianBergmann\GlobalState\Blacklist` class has been renamed to `SebastianBergmann\GlobalState\ExcludeList` - -## [4.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.2 - -## [3.0.2] - 2022-02-10 - -### Fixed - -* The `$includeTraits` parameter of `SebastianBergmann\GlobalState\Snapshot::__construct()` is not respected - -## [3.0.1] - 2020-11-30 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2` - -## [3.0.0] - 2019-02-01 - -### Changed - -* `Snapshot::canBeSerialized()` now recursively checks arrays and object graphs for variables that cannot be serialized - -### Removed - -* This component is no longer supported on PHP 7.0 and PHP 7.1 - -[8.0.2]: https://github.com/sebastianbergmann/global-state/compare/8.0.1...8.0.2 -[8.0.1]: https://github.com/sebastianbergmann/global-state/compare/8.0.0...8.0.1 -[8.0.0]: https://github.com/sebastianbergmann/global-state/compare/7.0...8.0.0 -[7.0.2]: https://github.com/sebastianbergmann/global-state/compare/7.0.1...7.0.2 -[7.0.1]: https://github.com/sebastianbergmann/global-state/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/global-state/compare/6.0...7.0.0 -[6.0.2]: https://github.com/sebastianbergmann/global-state/compare/6.0.1...6.0.2 -[6.0.1]: https://github.com/sebastianbergmann/global-state/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/global-state/compare/5.0.5...6.0.0 -[5.0.5]: https://github.com/sebastianbergmann/global-state/compare/5.0.4...5.0.5 -[5.0.4]: https://github.com/sebastianbergmann/global-state/compare/5.0.3...5.0.4 -[5.0.3]: https://github.com/sebastianbergmann/global-state/compare/5.0.2...5.0.3 -[5.0.2]: https://github.com/sebastianbergmann/global-state/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/global-state/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/global-state/compare/4.0.0...5.0.0 -[4.0.0]: https://github.com/sebastianbergmann/global-state/compare/3.0.2...4.0.0 -[3.0.2]: https://github.com/sebastianbergmann/phpunit/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/phpunit/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/phpunit/compare/2.0.0...3.0.0 - diff --git a/vendor/sebastian/global-state/LICENSE b/vendor/sebastian/global-state/LICENSE deleted file mode 100644 index b687f39a..00000000 --- a/vendor/sebastian/global-state/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2001-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/global-state/README.md b/vendor/sebastian/global-state/README.md deleted file mode 100644 index 0d1ea0fe..00000000 --- a/vendor/sebastian/global-state/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/global-state/v)](https://packagist.org/packages/sebastian/global-state) -[![CI Status](https://github.com/sebastianbergmann/global-state/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/global-state/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/global-state/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/global-state) - -# sebastian/global-state - -Snapshotting of global state, factored out of PHPUnit into a stand-alone component. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/global-state -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/global-state -``` diff --git a/vendor/sebastian/global-state/SECURITY.md b/vendor/sebastian/global-state/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/global-state/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/global-state/composer.json b/vendor/sebastian/global-state/composer.json deleted file mode 100644 index ecd4b53e..00000000 --- a/vendor/sebastian/global-state/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "sebastian/global-state", - "description": "Snapshotting of global state", - "keywords": ["global state"], - "homepage": "https://www.github.com/sebastianbergmann/global-state", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "security": "https://github.com/sebastianbergmann/global-state/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture/" - ], - "files": [ - "tests/_fixture/SnapshotFunctions.php" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "8.0-dev" - } - } -} diff --git a/vendor/sebastian/global-state/src/CodeExporter.php b/vendor/sebastian/global-state/src/CodeExporter.php deleted file mode 100644 index d3238e58..00000000 --- a/vendor/sebastian/global-state/src/CodeExporter.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -use const PHP_EOL; -use function is_array; -use function is_scalar; -use function serialize; -use function sprintf; -use function var_export; - -final class CodeExporter -{ - public function constants(Snapshot $snapshot): string - { - $result = ''; - - foreach ($snapshot->constants() as $name => $value) { - $result .= sprintf( - 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", - $name, - $name, - $this->exportVariable($value), - ); - } - - return $result; - } - - public function globalVariables(Snapshot $snapshot): string - { - $result = <<<'EOT' -call_user_func( - function () - { - foreach (array_keys($GLOBALS) as $key) { - unset($GLOBALS[$key]); - } - } -); - - -EOT; - - foreach ($snapshot->globalVariables() as $name => $value) { - $result .= sprintf( - '$GLOBALS[%s] = %s;' . PHP_EOL, - $this->exportVariable($name), - $this->exportVariable($value), - ); - } - - return $result; - } - - public function iniSettings(Snapshot $snapshot): string - { - $result = ''; - - foreach ($snapshot->iniSettings() as $key => $value) { - $result .= sprintf( - '@ini_set(%s, %s);' . "\n", - $this->exportVariable($key), - $this->exportVariable($value), - ); - } - - return $result; - } - - private function exportVariable(mixed $variable): string - { - if (is_scalar($variable) || null === $variable || - (is_array($variable) && $this->arrayOnlyContainsScalars($variable))) { - return var_export($variable, true); - } - - return 'unserialize(' . var_export(serialize($variable), true) . ')'; - } - - /** - * @param array $array - */ - private function arrayOnlyContainsScalars(array $array): bool - { - $result = true; - - foreach ($array as $element) { - if (is_array($element)) { - $result = $this->arrayOnlyContainsScalars($element); - } elseif (!is_scalar($element) && null !== $element) { - $result = false; - } - - if ($result === false) { - break; - } - } - - return $result; - } -} diff --git a/vendor/sebastian/global-state/src/ExcludeList.php b/vendor/sebastian/global-state/src/ExcludeList.php deleted file mode 100644 index 07c29a0c..00000000 --- a/vendor/sebastian/global-state/src/ExcludeList.php +++ /dev/null @@ -1,138 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -use function in_array; -use function str_starts_with; -use ReflectionClass; - -final class ExcludeList -{ - /** - * @var array - */ - private array $globalVariables = []; - - /** - * @var list - */ - private array $classes = []; - - /** - * @var list - */ - private array $classNamePrefixes = []; - - /** - * @var list - */ - private array $parentClasses = []; - - /** - * @var list - */ - private array $interfaces = []; - - /** - * @var array> - */ - private array $staticProperties = []; - - /** - * @param non-empty-string $variableName - */ - public function addGlobalVariable(string $variableName): void - { - $this->globalVariables[$variableName] = true; - } - - /** - * @param non-empty-string $className - */ - public function addClass(string $className): void - { - $this->classes[] = $className; - } - - /** - * @param non-empty-string $className - */ - public function addSubclassesOf(string $className): void - { - $this->parentClasses[] = $className; - } - - /** - * @param non-empty-string $interfaceName - */ - public function addImplementorsOf(string $interfaceName): void - { - $this->interfaces[] = $interfaceName; - } - - /** - * @param non-empty-string $classNamePrefix - */ - public function addClassNamePrefix(string $classNamePrefix): void - { - $this->classNamePrefixes[] = $classNamePrefix; - } - - /** - * @param non-empty-string $className - * @param non-empty-string $propertyName - */ - public function addStaticProperty(string $className, string $propertyName): void - { - if (!isset($this->staticProperties[$className])) { - $this->staticProperties[$className] = []; - } - - $this->staticProperties[$className][$propertyName] = true; - } - - public function isGlobalVariableExcluded(string $variableName): bool - { - return isset($this->globalVariables[$variableName]); - } - - /** - * @param class-string $className - * @param non-empty-string $propertyName - */ - public function isStaticPropertyExcluded(string $className, string $propertyName): bool - { - if (in_array($className, $this->classes, true)) { - return true; - } - - foreach ($this->classNamePrefixes as $prefix) { - if (str_starts_with($className, $prefix)) { - return true; - } - } - - $class = new ReflectionClass($className); - - foreach ($this->parentClasses as $type) { - if ($class->isSubclassOf($type)) { - return true; - } - } - - foreach ($this->interfaces as $type) { - if ($class->implementsInterface($type)) { - return true; - } - } - - return isset($this->staticProperties[$className][$propertyName]); - } -} diff --git a/vendor/sebastian/global-state/src/Restorer.php b/vendor/sebastian/global-state/src/Restorer.php deleted file mode 100644 index 36fcd21a..00000000 --- a/vendor/sebastian/global-state/src/Restorer.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -use function array_diff; -use function array_key_exists; -use function array_keys; -use function array_merge; -use function assert; -use function in_array; -use function is_array; -use ReflectionClass; -use ReflectionProperty; - -final class Restorer -{ - public function restoreGlobalVariables(Snapshot $snapshot): void - { - $superGlobalArrays = $snapshot->superGlobalArrays(); - - foreach ($superGlobalArrays as $superGlobalArray) { - $this->restoreSuperGlobalArray($snapshot, $superGlobalArray); - } - - $globalVariables = $snapshot->globalVariables(); - - foreach (array_keys($GLOBALS) as $key) { - if ($key !== 'GLOBALS' && - !in_array($key, $superGlobalArrays, true) && - !$snapshot->excludeList()->isGlobalVariableExcluded((string) $key)) { - if (array_key_exists($key, $globalVariables)) { - $GLOBALS[$key] = $globalVariables[$key]; - } else { - unset($GLOBALS[$key]); - } - } - } - } - - public function restoreStaticProperties(Snapshot $snapshot): void - { - $current = new Snapshot($snapshot->excludeList(), false, false, false, false, true, false, false, false, false); - $newClasses = array_diff($current->classes(), $snapshot->classes()); - - unset($current); - - foreach ($snapshot->staticProperties() as $className => $staticProperties) { - foreach ($staticProperties as $name => $value) { - $reflector = new ReflectionProperty($className, $name); - $reflector->setValue(null, $value); - } - } - - foreach ($newClasses as $className) { - $class = new ReflectionClass($className); - $defaults = $class->getDefaultProperties(); - - foreach ($class->getProperties() as $property) { - if (!$property->isStatic()) { - continue; - } - - $name = $property->getName(); - - if ($snapshot->excludeList()->isStaticPropertyExcluded($className, $name)) { - continue; - } - - if (!isset($defaults[$name])) { - continue; - } - - $property->setValue(null, $defaults[$name]); - } - } - } - - private function restoreSuperGlobalArray(Snapshot $snapshot, string $superGlobalArray): void - { - $superGlobalVariables = $snapshot->superGlobalVariables(); - - if (isset($GLOBALS[$superGlobalArray], $superGlobalVariables[$superGlobalArray]) && - is_array($GLOBALS[$superGlobalArray])) { - $keys = array_keys( - array_merge( - $GLOBALS[$superGlobalArray], - $superGlobalVariables[$superGlobalArray], - ), - ); - - foreach ($keys as $key) { - assert(isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])); - - if (array_key_exists($key, $superGlobalVariables[$superGlobalArray])) { - $GLOBALS[$superGlobalArray][$key] = $superGlobalVariables[$superGlobalArray][$key]; - } else { - unset($GLOBALS[$superGlobalArray][$key]); - } - } - } - } -} diff --git a/vendor/sebastian/global-state/src/Snapshot.php b/vendor/sebastian/global-state/src/Snapshot.php deleted file mode 100644 index 66920d8d..00000000 --- a/vendor/sebastian/global-state/src/Snapshot.php +++ /dev/null @@ -1,463 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -use function array_keys; -use function array_merge; -use function array_reverse; -use function assert; -use function get_declared_classes; -use function get_declared_interfaces; -use function get_declared_traits; -use function get_defined_constants; -use function get_defined_functions; -use function get_included_files; -use function in_array; -use function ini_get_all; -use function is_array; -use function is_object; -use function is_resource; -use function is_scalar; -use function serialize; -use function unserialize; -use ReflectionClass; -use SebastianBergmann\ObjectReflector\ObjectReflector; -use SebastianBergmann\RecursionContext\Context; -use Throwable; - -/** - * A snapshot of global state. - */ -final class Snapshot -{ - private ExcludeList $excludeList; - - /** - * @var array - */ - private array $globalVariables = []; - - /** - * @var list - */ - private array $superGlobalArrays = []; - - /** - * @var array> - */ - private array $superGlobalVariables = []; - - /** - * @var array> - */ - private array $staticProperties = []; - - /** - * @var array - */ - private array $iniSettings = []; - - /** - * @var list - */ - private array $includedFiles = []; - - /** - * @var array - */ - private array $constants = []; - - /** - * @var list - */ - private array $functions = []; - - /** - * @var list - */ - private array $interfaces = []; - - /** - * @var list - */ - private array $classes = []; - - /** - * @var list - */ - private array $traits = []; - - public function __construct(?ExcludeList $excludeList = null, bool $includeGlobalVariables = true, bool $includeStaticProperties = true, bool $includeConstants = true, bool $includeFunctions = true, bool $includeClasses = true, bool $includeInterfaces = true, bool $includeTraits = true, bool $includeIniSettings = true, bool $includeIncludedFiles = true) - { - if ($excludeList === null) { - $excludeList = new ExcludeList; - } - - $this->excludeList = $excludeList; - - if ($includeConstants) { - $this->snapshotConstants(); - } - - if ($includeFunctions) { - $this->snapshotFunctions(); - } - - if ($includeClasses || $includeStaticProperties) { - $this->snapshotClasses(); - } - - if ($includeInterfaces) { - $this->snapshotInterfaces(); - } - - if ($includeGlobalVariables) { - $this->setupSuperGlobalArrays(); - $this->snapshotGlobals(); - } - - if ($includeStaticProperties) { - $this->snapshotStaticProperties(); - } - - if ($includeIniSettings) { - $iniSettings = ini_get_all(null, false); - - assert($iniSettings !== false); - - /* @phpstan-ignore assign.propertyType */ - $this->iniSettings = $iniSettings; - } - - if ($includeIncludedFiles) { - $this->includedFiles = get_included_files(); - } - - if ($includeTraits) { - $this->traits = get_declared_traits(); - } - } - - public function excludeList(): ExcludeList - { - return $this->excludeList; - } - - /** - * @return array - */ - public function globalVariables(): array - { - return $this->globalVariables; - } - - /** - * @return array> - */ - public function superGlobalVariables(): array - { - return $this->superGlobalVariables; - } - - /** - * @return list - */ - public function superGlobalArrays(): array - { - return $this->superGlobalArrays; - } - - /** - * @return array> - */ - public function staticProperties(): array - { - return $this->staticProperties; - } - - /** - * @return array - */ - public function iniSettings(): array - { - return $this->iniSettings; - } - - /** - * @return list - */ - public function includedFiles(): array - { - return $this->includedFiles; - } - - /** - * @return array - */ - public function constants(): array - { - return $this->constants; - } - - /** - * @return list - */ - public function functions(): array - { - return $this->functions; - } - - /** - * @return list - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return list - */ - public function classes(): array - { - return $this->classes; - } - - /** - * @return list - */ - public function traits(): array - { - return $this->traits; - } - - private function snapshotConstants(): void - { - $constants = get_defined_constants(true); - - if (isset($constants['user'])) { - $this->constants = $constants['user']; - } - } - - private function snapshotFunctions(): void - { - $functions = get_defined_functions(); - - $this->functions = $functions['user']; - } - - private function snapshotClasses(): void - { - foreach (array_reverse(get_declared_classes()) as $className) { - $class = new ReflectionClass($className); - - if (!$class->isUserDefined()) { - break; - } - - $this->classes[] = $className; - } - - $this->classes = array_reverse($this->classes); - } - - private function snapshotInterfaces(): void - { - foreach (array_reverse(get_declared_interfaces()) as $interfaceName) { - $class = new ReflectionClass($interfaceName); - - if (!$class->isUserDefined()) { - break; - } - - $this->interfaces[] = $interfaceName; - } - - $this->interfaces = array_reverse($this->interfaces); - } - - private function snapshotGlobals(): void - { - $superGlobalArrays = $this->superGlobalArrays(); - - foreach ($superGlobalArrays as $superGlobalArray) { - $this->snapshotSuperGlobalArray($superGlobalArray); - } - - foreach (array_keys($GLOBALS) as $key) { - if ($key !== 'GLOBALS' && - !in_array($key, $superGlobalArrays, true) && - !$this->excludeList->isGlobalVariableExcluded($key) && - $this->canBeSerialized($GLOBALS[$key]) - ) { - /* @phpstan-ignore assign.propertyType */ - $this->globalVariables[$key] = $this->copyWithSerialize($GLOBALS[$key]); - } - } - } - - private function snapshotSuperGlobalArray(string $superGlobalArray): void - { - $this->superGlobalVariables[$superGlobalArray] = []; - - if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) { - foreach ($GLOBALS[$superGlobalArray] as $key => $value) { - /* @phpstan-ignore assign.propertyType */ - $this->superGlobalVariables[$superGlobalArray][$key] = $this->copyWithSerialize($value); - } - } - } - - private function snapshotStaticProperties(): void - { - foreach ($this->classes as $className) { - $class = new ReflectionClass($className); - $snapshot = []; - - foreach ($class->getProperties() as $property) { - if ($property->isStatic()) { - $name = $property->getName(); - - if ($this->excludeList->isStaticPropertyExcluded($className, $name)) { - continue; - } - - if (!$property->isInitialized()) { - continue; - } - - $value = $property->getValue(); - - if ($this->canBeSerialized($value)) { - $snapshot[$name] = $this->copyWithSerialize($value); - } - } - } - - if ($snapshot !== []) { - $this->staticProperties[$className] = $snapshot; - } - } - } - - private function setupSuperGlobalArrays(): void - { - $this->superGlobalArrays = [ - '_ENV', - '_POST', - '_GET', - '_COOKIE', - '_SERVER', - '_FILES', - '_REQUEST', - ]; - } - - private function copyWithSerialize(mixed $variable): mixed - { - if (is_scalar($variable) || $variable === null) { - return $variable; - } - - /* @noinspection UnserializeExploitsInspection */ - return unserialize(serialize($variable)); - } - - private function canBeSerialized(mixed $variable): bool - { - if (is_scalar($variable) || $variable === null) { - return true; - } - - if (is_resource($variable)) { - return false; - } - - foreach ($this->enumerateObjectsAndResources($variable) as $value) { - if (is_resource($value)) { - return false; - } - - if (is_object($value)) { - $class = new ReflectionClass($value); - - if ($class->isAnonymous()) { - return false; - } - - try { - @serialize($value); - } catch (Throwable $t) { - return false; - } - } - } - - return true; - } - - /** - * @return array - */ - private function enumerateObjectsAndResources(mixed $variable, Context $processed = new Context): array - { - $result = []; - - /* @phpstan-ignore argument.type */ - if ($processed->contains($variable) !== false) { - return $result; - } - - $array = $variable; - - /* @noinspection UnusedFunctionResultInspection */ - $processed->add($variable); - - if (is_array($variable)) { - /** @phpstan-ignore foreach.nonIterable */ - foreach ($array as $element) { - if (!is_array($element) && !is_object($element) && !is_resource($element)) { - continue; - } - - if (!is_resource($element)) { - /** @noinspection SlowArrayOperationsInLoopInspection */ - $result = array_merge( - $result, - $this->enumerateObjectsAndResources($element, $processed), - ); - } else { - $result[] = $element; - } - } - } else { - $result[] = $variable; - - foreach ((new ObjectReflector)->getProperties($variable) as $value) { - if (!is_array($value) && !is_object($value) && !is_resource($value)) { - continue; - } - - if (!is_resource($value)) { - /** @noinspection SlowArrayOperationsInLoopInspection */ - $result = array_merge( - $result, - $this->enumerateObjectsAndResources($value, $processed), - ); - } else { - $result[] = $value; - } - } - } - - return $result; - } -} diff --git a/vendor/sebastian/global-state/src/exceptions/Exception.php b/vendor/sebastian/global-state/src/exceptions/Exception.php deleted file mode 100644 index 94432008..00000000 --- a/vendor/sebastian/global-state/src/exceptions/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/global-state/src/exceptions/RuntimeException.php b/vendor/sebastian/global-state/src/exceptions/RuntimeException.php deleted file mode 100644 index 79f02a11..00000000 --- a/vendor/sebastian/global-state/src/exceptions/RuntimeException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\GlobalState; - -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/sebastian/lines-of-code/ChangeLog.md b/vendor/sebastian/lines-of-code/ChangeLog.md deleted file mode 100644 index 4e724be6..00000000 --- a/vendor/sebastian/lines-of-code/ChangeLog.md +++ /dev/null @@ -1,77 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [4.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [3.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [3.0.0] - 2024-02-02 - -### Removed - -* This component now requires PHP-Parser 5 -* This component is no longer supported on PHP 8.1 - -## [2.0.2] - 2023-12-21 - -### Changed - -* This component is now compatible with `nikic/php-parser` 5.0 - -## [2.0.1] - 2023-08-31 - -### Changed - -* Improved type information - -## [2.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [1.0.3] - 2020-11-28 - -### Fixed - -* Files that do not contain a newline were not handled correctly - -### Changed - -* A line of code is no longer considered to be a Logical Line of Code if it does not contain an `Expr` node - -## [1.0.2] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\LinesOfCode\Exception` now correctly extends `\Throwable` - -## [1.0.1] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [1.0.0] - 2020-07-22 - -* Initial release - -[4.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/3.0...4.0.0 -[3.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/2.0...3.0.0 -[2.0.2]: https://github.com/sebastianbergmann/lines-of-code/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.3...2.0.0 -[1.0.3]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/f959e71f00e591288acc024afe9cb966c6cf9bd6...1.0.0 diff --git a/vendor/sebastian/lines-of-code/LICENSE b/vendor/sebastian/lines-of-code/LICENSE deleted file mode 100644 index 0d534da3..00000000 --- a/vendor/sebastian/lines-of-code/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2020-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/lines-of-code/README.md b/vendor/sebastian/lines-of-code/README.md deleted file mode 100644 index 765a0ebb..00000000 --- a/vendor/sebastian/lines-of-code/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/lines-of-code/v)](https://packagist.org/packages/sebastian/lines-of-code) -[![CI Status](https://github.com/sebastianbergmann/lines-of-code/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/lines-of-code/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/lines-of-code/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/lines-of-code) - -# sebastian/lines-of-code - -Library for counting the lines of code in PHP source code. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/lines-of-code -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/lines-of-code -``` diff --git a/vendor/sebastian/lines-of-code/SECURITY.md b/vendor/sebastian/lines-of-code/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/lines-of-code/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/lines-of-code/composer.json b/vendor/sebastian/lines-of-code/composer.json deleted file mode 100644 index 7c428050..00000000 --- a/vendor/sebastian/lines-of-code/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "sebastian/lines-of-code", - "description": "Library for counting the lines of code in PHP source code", - "type": "library", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3", - "nikic/php-parser": "^5.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "config": { - "platform": { - "php": "8.3" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "4.0-dev" - } - } -} diff --git a/vendor/sebastian/lines-of-code/src/Counter.php b/vendor/sebastian/lines-of-code/src/Counter.php deleted file mode 100644 index ed2d3ab0..00000000 --- a/vendor/sebastian/lines-of-code/src/Counter.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -use function assert; -use function file_get_contents; -use function substr_count; -use PhpParser\Error; -use PhpParser\Node; -use PhpParser\NodeTraverser; -use PhpParser\ParserFactory; - -final class Counter -{ - /** - * @throws RuntimeException - */ - public function countInSourceFile(string $sourceFile): LinesOfCode - { - $source = file_get_contents($sourceFile); - - assert($source !== false); - - return $this->countInSourceString($source); - } - - /** - * @throws RuntimeException - */ - public function countInSourceString(string $source): LinesOfCode - { - $linesOfCode = substr_count($source, "\n"); - - if ($linesOfCode === 0 && !empty($source)) { - $linesOfCode = 1; - } - - try { - $nodes = (new ParserFactory)->createForHostVersion()->parse($source); - - assert($nodes !== null); - - return $this->countInAbstractSyntaxTree($linesOfCode, $nodes); - // @codeCoverageIgnoreStart - } catch (Error $error) { - throw new RuntimeException( - $error->getMessage(), - $error->getCode(), - $error, - ); - } - // @codeCoverageIgnoreEnd - } - - /** - * @param non-negative-int $linesOfCode - * @param Node[] $nodes - * - * @throws RuntimeException - */ - public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): LinesOfCode - { - $traverser = new NodeTraverser; - $visitor = new LineCountingVisitor($linesOfCode); - - $traverser->addVisitor($visitor); - - try { - /* @noinspection UnusedFunctionResultInspection */ - $traverser->traverse($nodes); - // @codeCoverageIgnoreStart - } catch (Error $error) { - throw new RuntimeException( - $error->getMessage(), - $error->getCode(), - $error, - ); - } - // @codeCoverageIgnoreEnd - - return $visitor->result(); - } -} diff --git a/vendor/sebastian/lines-of-code/src/Exception/Exception.php b/vendor/sebastian/lines-of-code/src/Exception/Exception.php deleted file mode 100644 index 11d543aa..00000000 --- a/vendor/sebastian/lines-of-code/src/Exception/Exception.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -use Throwable; - -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php b/vendor/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php deleted file mode 100644 index 46a5c1b1..00000000 --- a/vendor/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -use LogicException; - -final class IllogicalValuesException extends LogicException implements Exception -{ -} diff --git a/vendor/sebastian/lines-of-code/src/Exception/RuntimeException.php b/vendor/sebastian/lines-of-code/src/Exception/RuntimeException.php deleted file mode 100644 index 4e6d66d0..00000000 --- a/vendor/sebastian/lines-of-code/src/Exception/RuntimeException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php b/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php deleted file mode 100644 index a461a98a..00000000 --- a/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -use function array_merge; -use function array_unique; -use function assert; -use function count; -use PhpParser\Comment; -use PhpParser\Node; -use PhpParser\Node\Expr; -use PhpParser\NodeVisitorAbstract; - -final class LineCountingVisitor extends NodeVisitorAbstract -{ - /** - * @var non-negative-int - */ - private readonly int $linesOfCode; - - /** - * @var Comment[] - */ - private array $comments = []; - - /** - * @var int[] - */ - private array $linesWithStatements = []; - - /** - * @param non-negative-int $linesOfCode - */ - public function __construct(int $linesOfCode) - { - $this->linesOfCode = $linesOfCode; - } - - public function enterNode(Node $node): null - { - $this->comments = array_merge($this->comments, $node->getComments()); - - if (!$node instanceof Expr) { - return null; - } - - $this->linesWithStatements[] = $node->getStartLine(); - - return null; - } - - public function result(): LinesOfCode - { - $commentLinesOfCode = 0; - - foreach ($this->comments() as $comment) { - $commentLinesOfCode += ($comment->getEndLine() - $comment->getStartLine() + 1); - } - - $nonCommentLinesOfCode = $this->linesOfCode - $commentLinesOfCode; - $logicalLinesOfCode = count(array_unique($this->linesWithStatements)); - - assert($commentLinesOfCode >= 0); - assert($nonCommentLinesOfCode >= 0); - - return new LinesOfCode( - $this->linesOfCode, - $commentLinesOfCode, - $nonCommentLinesOfCode, - $logicalLinesOfCode, - ); - } - - /** - * @return Comment[] - */ - private function comments(): array - { - $comments = []; - - foreach ($this->comments as $comment) { - $comments[$comment->getStartLine() . '_' . $comment->getStartTokenPos() . '_' . $comment->getEndLine() . '_' . $comment->getEndTokenPos()] = $comment; - } - - return $comments; - } -} diff --git a/vendor/sebastian/lines-of-code/src/LinesOfCode.php b/vendor/sebastian/lines-of-code/src/LinesOfCode.php deleted file mode 100644 index 2aa5b0e6..00000000 --- a/vendor/sebastian/lines-of-code/src/LinesOfCode.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\LinesOfCode; - -/** - * @immutable - */ -final readonly class LinesOfCode -{ - /** - * @var non-negative-int - */ - private int $linesOfCode; - - /** - * @var non-negative-int - */ - private int $commentLinesOfCode; - - /** - * @var non-negative-int - */ - private int $nonCommentLinesOfCode; - - /** - * @var non-negative-int - */ - private int $logicalLinesOfCode; - - /** - * @param non-negative-int $linesOfCode - * @param non-negative-int $commentLinesOfCode - * @param non-negative-int $nonCommentLinesOfCode - * @param non-negative-int $logicalLinesOfCode - * - * @throws IllogicalValuesException - */ - public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode, int $logicalLinesOfCode) - { - if ($linesOfCode - $commentLinesOfCode !== $nonCommentLinesOfCode) { - throw new IllogicalValuesException('$linesOfCode !== $commentLinesOfCode + $nonCommentLinesOfCode'); - } - - $this->linesOfCode = $linesOfCode; - $this->commentLinesOfCode = $commentLinesOfCode; - $this->nonCommentLinesOfCode = $nonCommentLinesOfCode; - $this->logicalLinesOfCode = $logicalLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function linesOfCode(): int - { - return $this->linesOfCode; - } - - /** - * @return non-negative-int - */ - public function commentLinesOfCode(): int - { - return $this->commentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function nonCommentLinesOfCode(): int - { - return $this->nonCommentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function logicalLinesOfCode(): int - { - return $this->logicalLinesOfCode; - } - - public function plus(self $other): self - { - return new self( - $this->linesOfCode() + $other->linesOfCode(), - $this->commentLinesOfCode() + $other->commentLinesOfCode(), - $this->nonCommentLinesOfCode() + $other->nonCommentLinesOfCode(), - $this->logicalLinesOfCode() + $other->logicalLinesOfCode(), - ); - } -} diff --git a/vendor/sebastian/object-enumerator/ChangeLog.md b/vendor/sebastian/object-enumerator/ChangeLog.md deleted file mode 100644 index 611c42d9..00000000 --- a/vendor/sebastian/object-enumerator/ChangeLog.md +++ /dev/null @@ -1,116 +0,0 @@ -# Change Log - -All notable changes to `sebastianbergmann/object-enumerator` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [6.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [6.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [5.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [4.0.4] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\ObjectEnumerator\Exception` now correctly extends `\Throwable` - -## [4.0.3] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [4.0.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [4.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [4.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.0, PHP 7.1, and PHP 7.2 - -## [3.0.3] - 2017-08-03 - -### Changed - -* Bumped required version of `sebastian/object-reflector` - -## [3.0.2] - 2017-03-12 - -### Changed - -* `sebastian/object-reflector` is now a dependency - -## [3.0.1] - 2017-03-12 - -### Fixed - -* Objects aggregated in inherited attributes are not enumerated - -## [3.0.0] - 2017-03-03 - -### Removed - -* This component is no longer supported on PHP 5.6 - -## [2.0.1] - 2017-02-18 - -### Fixed - -* Fixed [#2](https://github.com/sebastianbergmann/phpunit/pull/2): Exceptions in `ReflectionProperty::getValue()` are not handled - -## [2.0.0] - 2016-11-19 - -### Changed - -* This component is now compatible with `sebastian/recursion-context: ~1.0.4` - -## 1.0.0 - 2016-02-04 - -### Added - -* Initial release - -[7.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/6.0...7.0.0 -[6.0.1]: https://github.com/sebastianbergmann/object-enumerator/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/5.0...6.0.0 -[5.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.4...5.0.0 -[4.0.4]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.3...4.0.4 -[4.0.3]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/3.0.3...4.0.0 -[3.0.3]: https://github.com/sebastianbergmann/object-enumerator/compare/3.0.2...3.0.3 -[3.0.2]: https://github.com/sebastianbergmann/object-enumerator/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/object-enumerator/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/2.0...3.0.0 -[2.0.1]: https://github.com/sebastianbergmann/object-enumerator/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/1.0...2.0.0 - diff --git a/vendor/sebastian/object-enumerator/LICENSE b/vendor/sebastian/object-enumerator/LICENSE deleted file mode 100644 index ec89362e..00000000 --- a/vendor/sebastian/object-enumerator/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2016-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/object-enumerator/README.md b/vendor/sebastian/object-enumerator/README.md deleted file mode 100644 index bb244fae..00000000 --- a/vendor/sebastian/object-enumerator/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/object-enumerator/v)](https://packagist.org/packages/sebastian/object-enumerator) -[![CI Status](https://github.com/sebastianbergmann/object-enumerator/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-enumerator/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/object-enumerator/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/object-enumerator) - -# sebastian/object-enumerator - -Traverses array structures and object graphs to enumerate all referenced objects. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/object-enumerator -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/object-enumerator -``` diff --git a/vendor/sebastian/object-enumerator/SECURITY.md b/vendor/sebastian/object-enumerator/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/object-enumerator/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/object-enumerator/composer.json b/vendor/sebastian/object-enumerator/composer.json deleted file mode 100644 index 442e002e..00000000 --- a/vendor/sebastian/object-enumerator/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "sebastian/object-enumerator", - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - } -} diff --git a/vendor/sebastian/object-enumerator/src/Enumerator.php b/vendor/sebastian/object-enumerator/src/Enumerator.php deleted file mode 100644 index d67d8634..00000000 --- a/vendor/sebastian/object-enumerator/src/Enumerator.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\ObjectEnumerator; - -use function array_merge; -use function is_array; -use function is_object; -use SebastianBergmann\ObjectReflector\ObjectReflector; -use SebastianBergmann\RecursionContext\Context; - -final class Enumerator -{ - /** - * @param array|object $variable - * - * @return list - */ - public function enumerate(array|object $variable, Context $processed = new Context): array - { - $objects = []; - - if ($processed->contains($variable)) { - return $objects; - } - - $array = $variable; - - /* @noinspection UnusedFunctionResultInspection */ - $processed->add($variable); - - if (is_array($variable)) { - /** @phpstan-ignore foreach.nonIterable */ - foreach ($array as $element) { - if (!is_array($element) && !is_object($element)) { - continue; - } - - /** @noinspection SlowArrayOperationsInLoopInspection */ - $objects = array_merge( - $objects, - $this->enumerate($element, $processed), - ); - } - - return $objects; - } - - $objects[] = $variable; - - foreach ((new ObjectReflector)->getProperties($variable) as $value) { - if (!is_array($value) && !is_object($value)) { - continue; - } - - /** @noinspection SlowArrayOperationsInLoopInspection */ - $objects = array_merge( - $objects, - $this->enumerate($value, $processed), - ); - } - - return $objects; - } -} diff --git a/vendor/sebastian/object-reflector/ChangeLog.md b/vendor/sebastian/object-reflector/ChangeLog.md deleted file mode 100644 index ddc1ed64..00000000 --- a/vendor/sebastian/object-reflector/ChangeLog.md +++ /dev/null @@ -1,87 +0,0 @@ -# Change Log - -All notable changes to `sebastianbergmann/object-reflector` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [4.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [4.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [3.0.0] - 2023-02-03 - -### Changed - -* `ObjectReflector::getAttributes()` has been renamed to `ObjectReflector::getProperties()` - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [2.0.4] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\ObjectReflector\Exception` now correctly extends `\Throwable` - -## [2.0.3] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [2.0.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [2.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -## [2.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.0, PHP 7.1, and PHP 7.2 - -## [1.1.1] - 2017-03-29 - -* Fixed [#1](https://github.com/sebastianbergmann/object-reflector/issues/1): Attributes with non-string names are not handled correctly - -## [1.1.0] - 2017-03-16 - -### Changed - -* Changed implementation of `ObjectReflector::getattributes()` to use `(array)` cast instead of `ReflectionObject` - -## 1.0.0 - 2017-03-12 - -* Initial release - -[5.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/4.0...5.0.0 -[4.0.1]: https://github.com/sebastianbergmann/object-reflector/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/3.0...4.0.0 -[3.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.4...3.0.0 -[2.0.4]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/1.1.1...2.0.0 -[1.1.1]: https://github.com/sebastianbergmann/object-reflector/compare/1.1.0...1.1.1 -[1.1.0]: https://github.com/sebastianbergmann/object-reflector/compare/1.0.0...1.1.0 diff --git a/vendor/sebastian/object-reflector/LICENSE b/vendor/sebastian/object-reflector/LICENSE deleted file mode 100644 index e148db3f..00000000 --- a/vendor/sebastian/object-reflector/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2017-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/object-reflector/README.md b/vendor/sebastian/object-reflector/README.md deleted file mode 100644 index 1aca5734..00000000 --- a/vendor/sebastian/object-reflector/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/object-reflector/v)](https://packagist.org/packages/sebastian/object-reflector) -[![CI Status](https://github.com/sebastianbergmann/object-reflector/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-reflector/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/object-reflector/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/object-reflector) - -# sebastian/object-reflector - -Allows reflection of object properties, including inherited and private as well as protected ones. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/object-reflector -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/object-reflector -``` diff --git a/vendor/sebastian/object-reflector/SECURITY.md b/vendor/sebastian/object-reflector/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/object-reflector/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/object-reflector/composer.json b/vendor/sebastian/object-reflector/composer.json deleted file mode 100644 index d9286e95..00000000 --- a/vendor/sebastian/object-reflector/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "sebastian/object-reflector", - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "security": "https://github.com/sebastianbergmann/object-reflector/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "5.0-dev" - } - } -} diff --git a/vendor/sebastian/object-reflector/src/ObjectReflector.php b/vendor/sebastian/object-reflector/src/ObjectReflector.php deleted file mode 100644 index 919118fe..00000000 --- a/vendor/sebastian/object-reflector/src/ObjectReflector.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\ObjectReflector; - -use function count; -use function explode; - -final class ObjectReflector -{ - /** - * @return array - */ - public function getProperties(object $object): array - { - $properties = []; - $className = $object::class; - - foreach ((array) $object as $name => $value) { - $name = explode("\0", (string) $name); - - if (count($name) === 1) { - $name = $name[0]; - } elseif ($name[1] !== $className) { - $name = $name[1] . '::' . $name[2]; - } else { - $name = $name[2]; - } - - $properties[$name] = $value; - } - - return $properties; - } -} diff --git a/vendor/sebastian/recursion-context/ChangeLog.md b/vendor/sebastian/recursion-context/ChangeLog.md deleted file mode 100644 index 854244fa..00000000 --- a/vendor/sebastian/recursion-context/ChangeLog.md +++ /dev/null @@ -1,96 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [7.0.1] - 2025-08-13 - -### Changed - -* Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5 - -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [6.0.3] - 2025-08-13 - -### Changed - -* Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5 - -## [6.0.2] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [6.0.1] - 2024-06-17 - -### Changed - -* [#30](https://github.com/sebastianbergmann/recursion-context/pull/30): Use more efficient `spl_object_id()` over `spl_object_hash()` - -## [6.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [5.0.1] - 2025-08-10 - -### Changed - -* Do not use `SplObjectStorage` methods that will be deprecated in PHP 8.5 - -## [5.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [4.0.5] - 2023-02-03 - -### Fixed - -* [#26](https://github.com/sebastianbergmann/recursion-context/pull/26): Don't clobber `null` values if `array_key_exists(PHP_INT_MAX, $array)` - -## [4.0.4] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\RecursionContext\Exception` now correctly extends `\Throwable` - -## [4.0.3] - 2020-09-28 - -### Changed - -* [#21](https://github.com/sebastianbergmann/recursion-context/pull/21): Add type annotations for in/out parameters -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [4.0.2] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [4.0.1] - 2020-06-15 - -### Changed - -* Tests etc. are now ignored for archive exports - -[7.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/6.0...7.0.0 -[6.0.3]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.2...6.0.3 -[6.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.1...6.0.2 -[6.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/5.0...6.0.0 -[5.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.5...5.0.0 -[4.0.5]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.4...4.0.5 -[4.0.4]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.3...4.0.4 -[4.0.3]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.2...4.0.3 -[4.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.1...4.0.2 -[4.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.0...4.0.1 diff --git a/vendor/sebastian/recursion-context/LICENSE b/vendor/sebastian/recursion-context/LICENSE deleted file mode 100644 index c5268a91..00000000 --- a/vendor/sebastian/recursion-context/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2002-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/recursion-context/README.md b/vendor/sebastian/recursion-context/README.md deleted file mode 100644 index f1d87b61..00000000 --- a/vendor/sebastian/recursion-context/README.md +++ /dev/null @@ -1,19 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/recursion-context/v)](https://packagist.org/packages/sebastian/recursion-context) -[![CI Status](https://github.com/sebastianbergmann/recursion-context/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/recursion-context/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/recursion-context/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/recursion-context) - -# sebastian/recursion-context - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/recursion-context -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/recursion-context -``` diff --git a/vendor/sebastian/recursion-context/SECURITY.md b/vendor/sebastian/recursion-context/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/recursion-context/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/recursion-context/composer.json b/vendor/sebastian/recursion-context/composer.json deleted file mode 100644 index f37a207b..00000000 --- a/vendor/sebastian/recursion-context/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "sebastian/recursion-context", - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "security": "https://github.com/sebastianbergmann/recursion-context/security/policy" - }, - "prefer-stable": true, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "7.0-dev" - } - } -} diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php deleted file mode 100644 index fbeac8cd..00000000 --- a/vendor/sebastian/recursion-context/src/Context.php +++ /dev/null @@ -1,163 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\RecursionContext; - -use const PHP_INT_MAX; -use const PHP_INT_MIN; -use function array_key_exists; -use function array_pop; -use function array_slice; -use function count; -use function is_array; -use function is_int; -use function random_int; -use function spl_object_id; -use SplObjectStorage; - -final class Context -{ - /** - * @var list> - */ - private array $arrays = []; - - /** - * @var SplObjectStorage - */ - private SplObjectStorage $objects; - - public function __construct() - { - $this->objects = new SplObjectStorage; - } - - /** - * @codeCoverageIgnore - */ - public function __destruct() - { - foreach ($this->arrays as &$array) { - if (is_array($array)) { - array_pop($array); - array_pop($array); - } - } - } - - /** - * @template T of object|array - * - * @param T $value - * - * @param-out T $value - */ - public function add(array|object &$value): int - { - if (is_array($value)) { - /* @phpstan-ignore paramOut.type */ - return $this->addArray($value); - } - - return $this->addObject($value); - } - - /** - * @template T of object|array - * - * @param T $value - * - * @param-out T $value - */ - public function contains(array|object &$value): false|int - { - if (is_array($value)) { - return $this->containsArray($value); - } - - return $this->containsObject($value); - } - - /** - * @param array $array - */ - private function addArray(array &$array): int - { - $key = $this->containsArray($array); - - if ($key !== false) { - return $key; - } - - $key = count($this->arrays); - $this->arrays[] = &$array; - - if (!array_key_exists(PHP_INT_MAX, $array) && !array_key_exists(PHP_INT_MAX - 1, $array)) { - $array[] = $key; - $array[] = $this->objects; - } else { - /* Cover the improbable case, too. - * - * Note that array_slice() (used in containsArray()) will return the - * last two values added, *not necessarily* the highest integer keys - * in the array. Therefore, the order of these writes to $array is - * important, but the actual keys used is not. */ - do { - /** @noinspection PhpUnhandledExceptionInspection */ - $key = random_int(PHP_INT_MIN, PHP_INT_MAX); - } while (array_key_exists($key, $array)); - - $array[$key] = $key; - - do { - /** @noinspection PhpUnhandledExceptionInspection */ - $key = random_int(PHP_INT_MIN, PHP_INT_MAX); - } while (array_key_exists($key, $array)); - - $array[$key] = $this->objects; - } - - return $key; - } - - private function addObject(object $object): int - { - if (!$this->objects->offsetExists($object)) { - $this->objects->offsetSet($object); - } - - return spl_object_id($object); - } - - /** - * @param array $array - */ - private function containsArray(array $array): false|int - { - $end = array_slice($array, -2); - - if (isset($end[1]) && - $end[1] === $this->objects && - isset($end[0]) && - is_int($end[0])) { - return $end[0]; - } - - return false; - } - - private function containsObject(object $value): false|int - { - if ($this->objects->offsetExists($value)) { - return spl_object_id($value); - } - - return false; - } -} diff --git a/vendor/sebastian/type/ChangeLog.md b/vendor/sebastian/type/ChangeLog.md deleted file mode 100644 index e4a200d5..00000000 --- a/vendor/sebastian/type/ChangeLog.md +++ /dev/null @@ -1,246 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [6.0.3] - 2025-08-09 - -### Fixed - -* [#34](https://github.com/sebastianbergmann/type/pull/34): `infection.json` is missing from `.gitattributes` - -## [6.0.2] - 2025-03-18 - -### Fixed - -* [#33](https://github.com/sebastianbergmann/type/issues/33): `ReflectionMapper` does not handle unions that contain `iterable` correctly - -## [6.0.1] - 2025-03-18 - -### Fixed - -* [#33](https://github.com/sebastianbergmann/type/issues/33): `ReflectionMapper` does not handle unions that contain `iterable` correctly - -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [5.1.3] - 2025-08-09 - -### Fixed - -* [#34](https://github.com/sebastianbergmann/type/pull/34): `infection.json` is missing from `.gitattributes` - -## [5.1.2] - 2025-03-18 - -### Fixed - -* [#33](https://github.com/sebastianbergmann/type/issues/33): `ReflectionMapper` does not handle unions that contain `iterable` correctly - -## [5.1.1] - 2025-03-18 - -### Fixed - -* [#33](https://github.com/sebastianbergmann/type/issues/33): `ReflectionMapper` does not handle unions that contain `iterable` correctly - -## [5.1.0] - 2024-09-17 - -### Added - -* Added `ReflectionMapper::fromPropertyType()` for mapping `\ReflectionProperty` to a `Type` object - -## [5.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [5.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [4.0.0] - 2023-02-03 - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0 - -## [3.2.1] - 2023-02-03 - -### Fixed - -* [#28](https://github.com/sebastianbergmann/type/pull/28): Potential undefined offset warning/notice - -## [3.2.0] - 2022-09-12 - -### Added - -* [#25](https://github.com/sebastianbergmann/type/issues/25): Support Disjunctive Normal Form types -* Added `ReflectionMapper::fromParameterTypes()` -* Added `IntersectionType::types()` and `UnionType::types()` -* Added `UnionType::containsIntersectionTypes()` - -## [3.1.0] - 2022-08-29 - -### Added - -* [#21](https://github.com/sebastianbergmann/type/issues/21): Support `true` as stand-alone type - -## [3.0.0] - 2022-03-15 - -### Added - -* Support for intersection types introduced in PHP 8.1 -* Support for the `never` return type introduced in PHP 8.1 -* Added `Type::isCallable()`, `Type::isGenericObject()`, `Type::isIterable()`, `Type::isMixed()`, `Type::isNever()`, `Type::isNull()`, `Type::isObject()`, `Type::isSimple()`, `Type::isStatic()`, `Type::isUnion()`, `Type::isUnknown()`, and `Type::isVoid()` - -### Changed - -* Renamed `ReflectionMapper::fromMethodReturnType(ReflectionMethod $method)` to `ReflectionMapper::fromReturnType(ReflectionFunctionAbstract $functionOrMethod)` - -### Removed - -* Removed `Type::getReturnTypeDeclaration()` (use `Type::asString()` instead and prefix its result with `': '`) -* Removed `TypeName::getNamespaceName()` (use `TypeName::namespaceName()` instead) -* Removed `TypeName::getSimpleName()` (use `TypeName::simpleName()` instead) -* Removed `TypeName::getQualifiedName()` (use `TypeName::qualifiedName()` instead) - -## [2.3.4] - 2021-06-15 - -### Fixed - -* Fixed regression introduced in 2.3.3 - -## [2.3.3] - 2021-06-15 [YANKED] - -### Fixed - -* [#15](https://github.com/sebastianbergmann/type/issues/15): "false" pseudo type is not handled properly - -## [2.3.2] - 2021-06-04 - -### Fixed - -* Fixed handling of tentatively declared return types - -## [2.3.1] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\Type\Exception` now correctly extends `\Throwable` - -## [2.3.0] - 2020-10-06 - -### Added - -* [#14](https://github.com/sebastianbergmann/type/issues/14): Support for `static` return type that is introduced in PHP 8 - -## [2.2.2] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [2.2.1] - 2020-07-05 - -### Fixed - -* Fixed handling of `mixed` type in `ReflectionMapper::fromMethodReturnType()` - -## [2.2.0] - 2020-07-05 - -### Added - -* Added `MixedType` object for representing PHP 8's `mixed` type - -## [2.1.1] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [2.1.0] - 2020-06-01 - -### Added - -* Added `UnionType` object for representing PHP 8's Union Types -* Added `ReflectionMapper::fromMethodReturnType()` for mapping `\ReflectionMethod::getReturnType()` to a `Type` object -* Added `Type::name()` for retrieving the name of a type -* Added `Type::asString()` for retrieving a textual representation of a type - -### Changed - -* Deprecated `Type::getReturnTypeDeclaration()` (use `Type::asString()` instead and prefix its result with `': '`) -* Deprecated `TypeName::getNamespaceName()` (use `TypeName::namespaceName()` instead) -* Deprecated `TypeName::getSimpleName()` (use `TypeName::simpleName()` instead) -* Deprecated `TypeName::getQualifiedName()` (use `TypeName::qualifiedName()` instead) - -## [2.0.0] - 2020-02-07 - -### Removed - -* This component is no longer supported on PHP 7.2 - -## [1.1.3] - 2019-07-02 - -### Fixed - -* Fixed class name comparison in `ObjectType` to be case-insensitive - -## [1.1.2] - 2019-06-19 - -### Fixed - -* Fixed handling of `object` type - -## [1.1.1] - 2019-06-08 - -### Fixed - -* Fixed autoloading of `callback_function.php` fixture file - -## [1.1.0] - 2019-06-07 - -### Added - -* Added support for `callable` type -* Added support for `iterable` type - -## [1.0.0] - 2019-06-06 - -* Initial release based on [code contributed by Michel Hartmann to PHPUnit](https://github.com/sebastianbergmann/phpunit/pull/3673) - -[6.0.3]: https://github.com/sebastianbergmann/type/compare/6.0.2...6.0.3 -[6.0.2]: https://github.com/sebastianbergmann/type/compare/6.0.1...6.0.2 -[6.0.1]: https://github.com/sebastianbergmann/type/compare/6.0.0...6.0.1 -[6.0.0]: https://github.com/sebastianbergmann/type/compare/5.1...6.0.0 -[5.1.3]: https://github.com/sebastianbergmann/type/compare/5.1.2...5.1.3 -[5.1.2]: https://github.com/sebastianbergmann/type/compare/5.1.1...5.1.2 -[5.1.1]: https://github.com/sebastianbergmann/type/compare/5.1.0...5.1.1 -[5.1.0]: https://github.com/sebastianbergmann/type/compare/5.0.1...5.1.0 -[5.0.1]: https://github.com/sebastianbergmann/type/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/type/compare/4.0...5.0.0 -[4.0.0]: https://github.com/sebastianbergmann/type/compare/3.2.1...4.0.0 -[3.2.1]: https://github.com/sebastianbergmann/type/compare/3.2.0...3.2.1 -[3.2.0]: https://github.com/sebastianbergmann/type/compare/3.1.0...3.2.0 -[3.1.0]: https://github.com/sebastianbergmann/type/compare/3.0.0...3.1.0 -[3.0.0]: https://github.com/sebastianbergmann/type/compare/2.3.4...3.0.0 -[2.3.4]: https://github.com/sebastianbergmann/type/compare/ca39369c41313ed12c071ed38ecda8fcdb248859...2.3.4 -[2.3.3]: https://github.com/sebastianbergmann/type/compare/2.3.2...ca39369c41313ed12c071ed38ecda8fcdb248859 -[2.3.2]: https://github.com/sebastianbergmann/type/compare/2.3.1...2.3.2 -[2.3.1]: https://github.com/sebastianbergmann/type/compare/2.3.0...2.3.1 -[2.3.0]: https://github.com/sebastianbergmann/type/compare/2.2.2...2.3.0 -[2.2.2]: https://github.com/sebastianbergmann/type/compare/2.2.1...2.2.2 -[2.2.1]: https://github.com/sebastianbergmann/type/compare/2.2.0...2.2.1 -[2.2.0]: https://github.com/sebastianbergmann/type/compare/2.1.1...2.2.0 -[2.1.1]: https://github.com/sebastianbergmann/type/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/sebastianbergmann/type/compare/2.0.0...2.1.0 -[2.0.0]: https://github.com/sebastianbergmann/type/compare/1.1.3...2.0.0 -[1.1.3]: https://github.com/sebastianbergmann/type/compare/1.1.2...1.1.3 -[1.1.2]: https://github.com/sebastianbergmann/type/compare/1.1.1...1.1.2 -[1.1.1]: https://github.com/sebastianbergmann/type/compare/1.1.0...1.1.1 -[1.1.0]: https://github.com/sebastianbergmann/type/compare/1.0.0...1.1.0 -[1.0.0]: https://github.com/sebastianbergmann/type/compare/ff74aa41746bd8d10e931843ebf37d42da513ede...1.0.0 diff --git a/vendor/sebastian/type/LICENSE b/vendor/sebastian/type/LICENSE deleted file mode 100644 index 84a83221..00000000 --- a/vendor/sebastian/type/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2019-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/type/README.md b/vendor/sebastian/type/README.md deleted file mode 100644 index e9c8f0a2..00000000 --- a/vendor/sebastian/type/README.md +++ /dev/null @@ -1,21 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/type/v)](https://packagist.org/packages/sebastian/type) -[![CI Status](https://github.com/sebastianbergmann/type/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/type/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/type/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/type) - -# sebastian/type - -Collection of value objects that represent the types of the PHP type system. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/type -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/type -``` diff --git a/vendor/sebastian/type/SECURITY.md b/vendor/sebastian/type/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/type/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/type/composer.json b/vendor/sebastian/type/composer.json deleted file mode 100644 index e5b966df..00000000 --- a/vendor/sebastian/type/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "sebastian/type", - "description": "Collection of value objects that represent the types of the PHP type system", - "type": "library", - "homepage": "https://github.com/sebastianbergmann/type", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "security": "https://github.com/sebastianbergmann/type/security/policy" - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "phpunit/phpunit": "^12.0" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "autoload-dev": { - "classmap": [ - "tests/_fixture" - ], - "files": [ - "tests/_fixture/callback_function.php", - "tests/_fixture/functions_that_declare_return_types.php" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - } -} diff --git a/vendor/sebastian/type/src/Parameter.php b/vendor/sebastian/type/src/Parameter.php deleted file mode 100644 index 7898cefa..00000000 --- a/vendor/sebastian/type/src/Parameter.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final readonly class Parameter -{ - /** - * @var non-empty-string - */ - private string $name; - private Type $type; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name, Type $type) - { - $this->name = $name; - $this->type = $type; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - public function type(): Type - { - return $this->type; - } -} diff --git a/vendor/sebastian/type/src/ReflectionMapper.php b/vendor/sebastian/type/src/ReflectionMapper.php deleted file mode 100644 index 45db7fb4..00000000 --- a/vendor/sebastian/type/src/ReflectionMapper.php +++ /dev/null @@ -1,229 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function array_filter; -use function assert; -use ReflectionFunction; -use ReflectionIntersectionType; -use ReflectionMethod; -use ReflectionNamedType; -use ReflectionProperty; -use ReflectionType; -use ReflectionUnionType; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class ReflectionMapper -{ - /** - * @return list - */ - public function fromParameterTypes(ReflectionFunction|ReflectionMethod $reflector): array - { - $parameters = []; - - foreach ($reflector->getParameters() as $parameter) { - $name = $parameter->getName(); - - if (!$parameter->hasType()) { - $parameters[] = new Parameter($name, new UnknownType); - - continue; - } - - $type = $parameter->getType(); - - if ($type instanceof ReflectionNamedType) { - $parameters[] = new Parameter( - $name, - $this->mapNamedType($type, $reflector), - ); - - continue; - } - - if ($type instanceof ReflectionUnionType) { - $parameters[] = new Parameter( - $name, - $this->mapUnionType($type, $reflector), - ); - - continue; - } - - if ($type instanceof ReflectionIntersectionType) { - $parameters[] = new Parameter( - $name, - $this->mapIntersectionType($type, $reflector), - ); - } - } - - return $parameters; - } - - public function fromReturnType(ReflectionFunction|ReflectionMethod $reflector): Type - { - if (!$this->hasReturnType($reflector)) { - return new UnknownType; - } - - $returnType = $this->returnType($reflector); - - assert($returnType instanceof ReflectionNamedType || $returnType instanceof ReflectionUnionType || $returnType instanceof ReflectionIntersectionType); - - if ($returnType instanceof ReflectionNamedType) { - return $this->mapNamedType($returnType, $reflector); - } - - if ($returnType instanceof ReflectionUnionType) { - return $this->mapUnionType($returnType, $reflector); - } - - return $this->mapIntersectionType($returnType, $reflector); - } - - public function fromPropertyType(ReflectionProperty $reflector): Type - { - if (!$reflector->hasType()) { - return new UnknownType; - } - - $propertyType = $reflector->getType(); - - assert($propertyType instanceof ReflectionNamedType || $propertyType instanceof ReflectionUnionType || $propertyType instanceof ReflectionIntersectionType); - - if ($propertyType instanceof ReflectionNamedType) { - return $this->mapNamedType($propertyType, $reflector); - } - - if ($propertyType instanceof ReflectionUnionType) { - return $this->mapUnionType($propertyType, $reflector); - } - - return $this->mapIntersectionType($propertyType, $reflector); - } - - private function mapNamedType(ReflectionNamedType $type, ReflectionFunction|ReflectionMethod|ReflectionProperty $reflector): Type - { - $classScope = !$reflector instanceof ReflectionFunction; - $typeName = $type->getName(); - - assert($typeName !== ''); - - if ($classScope && $typeName === 'self') { - return ObjectType::fromName( - $reflector->getDeclaringClass()->getName(), - $type->allowsNull(), - ); - } - - if ($classScope && $typeName === 'static') { - return new StaticType( - TypeName::fromReflection($reflector->getDeclaringClass()), - $type->allowsNull(), - ); - } - - if ($typeName === 'mixed') { - return new MixedType; - } - - if ($classScope && $typeName === 'parent') { - $parentClass = $reflector->getDeclaringClass()->getParentClass(); - - assert($parentClass !== false); - - return ObjectType::fromName( - $parentClass->getName(), - $type->allowsNull(), - ); - } - - return Type::fromName( - $typeName, - $type->allowsNull(), - ); - } - - private function mapUnionType(ReflectionUnionType $type, ReflectionFunction|ReflectionMethod|ReflectionProperty $reflector): Type - { - $types = []; - $objectType = false; - $genericObjectType = false; - - foreach ($type->getTypes() as $_type) { - if ($_type instanceof ReflectionNamedType) { - $namedType = $this->mapNamedType($_type, $reflector); - - if ($namedType instanceof GenericObjectType) { - $genericObjectType = true; - } elseif ($namedType instanceof ObjectType) { - $objectType = true; - } - - $types[] = $namedType; - - continue; - } - - $types[] = $this->mapIntersectionType($_type, $reflector); - } - - if ($objectType && $genericObjectType) { - $types = array_filter( - $types, - static function (Type $type): bool - { - if ($type instanceof ObjectType) { - return false; - } - - return true; - }, - ); - } - - return new UnionType(...$types); - } - - private function mapIntersectionType(ReflectionIntersectionType $type, ReflectionFunction|ReflectionMethod|ReflectionProperty $reflector): Type - { - $types = []; - - foreach ($type->getTypes() as $_type) { - assert($_type instanceof ReflectionNamedType); - - $types[] = $this->mapNamedType($_type, $reflector); - } - - return new IntersectionType(...$types); - } - - private function hasReturnType(ReflectionFunction|ReflectionMethod $reflector): bool - { - if ($reflector->hasReturnType()) { - return true; - } - - return $reflector->hasTentativeReturnType(); - } - - private function returnType(ReflectionFunction|ReflectionMethod $reflector): ?ReflectionType - { - if ($reflector->hasReturnType()) { - return $reflector->getReturnType(); - } - - return $reflector->getTentativeReturnType(); - } -} diff --git a/vendor/sebastian/type/src/TypeName.php b/vendor/sebastian/type/src/TypeName.php deleted file mode 100644 index 865af983..00000000 --- a/vendor/sebastian/type/src/TypeName.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function array_pop; -use function assert; -use function explode; -use function implode; -use function substr; -use ReflectionClass; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final readonly class TypeName -{ - private ?string $namespaceName; - - /** - * @var non-empty-string - */ - private string $simpleName; - - /** - * @param class-string $fullClassName - */ - public static function fromQualifiedName(string $fullClassName): self - { - if ($fullClassName[0] === '\\') { - $fullClassName = substr($fullClassName, 1); - } - - $classNameParts = explode('\\', $fullClassName); - - $simpleName = array_pop($classNameParts); - $namespaceName = implode('\\', $classNameParts); - - assert($simpleName !== ''); - - return new self($namespaceName, $simpleName); - } - - /** - * @param ReflectionClass $type - */ - public static function fromReflection(ReflectionClass $type): self - { - $simpleName = $type->getShortName(); - - assert($simpleName !== ''); - - return new self( - $type->getNamespaceName(), - $simpleName, - ); - } - - /** - * @param non-empty-string $simpleName - */ - public function __construct(?string $namespaceName, string $simpleName) - { - if ($namespaceName === '') { - $namespaceName = null; - } - - $this->namespaceName = $namespaceName; - $this->simpleName = $simpleName; - } - - public function namespaceName(): ?string - { - return $this->namespaceName; - } - - /** - * @return non-empty-string - */ - public function simpleName(): string - { - return $this->simpleName; - } - - /** - * @return non-empty-string - */ - public function qualifiedName(): string - { - return $this->namespaceName === null - ? $this->simpleName - : $this->namespaceName . '\\' . $this->simpleName; - } - - public function isNamespaced(): bool - { - return $this->namespaceName !== null; - } -} diff --git a/vendor/sebastian/type/src/exception/Exception.php b/vendor/sebastian/type/src/exception/Exception.php deleted file mode 100644 index 07ae3fc6..00000000 --- a/vendor/sebastian/type/src/exception/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use Throwable; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -interface Exception extends Throwable -{ -} diff --git a/vendor/sebastian/type/src/exception/RuntimeException.php b/vendor/sebastian/type/src/exception/RuntimeException.php deleted file mode 100644 index dfb1db7c..00000000 --- a/vendor/sebastian/type/src/exception/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class RuntimeException extends \RuntimeException implements Exception -{ -} diff --git a/vendor/sebastian/type/src/type/CallableType.php b/vendor/sebastian/type/src/type/CallableType.php deleted file mode 100644 index dbe35548..00000000 --- a/vendor/sebastian/type/src/type/CallableType.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function assert; -use function class_exists; -use function count; -use function explode; -use function function_exists; -use function is_array; -use function is_object; -use function is_string; -use function str_contains; -use Closure; -use ReflectionClass; -use ReflectionObject; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class CallableType extends Type -{ - private bool $allowsNull; - - public function __construct(bool $nullable) - { - $this->allowsNull = $nullable; - } - - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if ($other instanceof self) { - return true; - } - - if ($other instanceof ObjectType) { - if ($this->isClosure($other)) { - return true; - } - - if ($this->hasInvokeMethod($other)) { - return true; - } - } - - if ($other instanceof SimpleType) { - if ($this->isFunction($other)) { - return true; - } - - if ($this->isClassCallback($other)) { - return true; - } - - if ($this->isObjectCallback($other)) { - return true; - } - } - - return false; - } - - /** - * @return 'callable' - */ - public function name(): string - { - return 'callable'; - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function isCallable(): bool - { - return true; - } - - private function isClosure(ObjectType $type): bool - { - return $type->className()->qualifiedName() === Closure::class; - } - - private function hasInvokeMethod(ObjectType $type): bool - { - $className = $type->className()->qualifiedName(); - - assert(class_exists($className)); - - return (new ReflectionClass($className))->hasMethod('__invoke'); - } - - private function isFunction(SimpleType $type): bool - { - if (!is_string($type->value())) { - return false; - } - - return function_exists($type->value()); - } - - private function isObjectCallback(SimpleType $type): bool - { - if (!is_array($type->value())) { - return false; - } - - if (count($type->value()) !== 2) { - return false; - } - - if (!isset($type->value()[0], $type->value()[1])) { - return false; - } - - if (!is_object($type->value()[0]) || !is_string($type->value()[1])) { - return false; - } - - [$object, $methodName] = $type->value(); - - return (new ReflectionObject($object))->hasMethod($methodName); - } - - private function isClassCallback(SimpleType $type): bool - { - if (!is_string($type->value()) && !is_array($type->value())) { - return false; - } - - if (is_string($type->value())) { - if (!str_contains($type->value(), '::')) { - return false; - } - - [$className, $methodName] = explode('::', $type->value()); - } - - if (is_array($type->value())) { - if (count($type->value()) !== 2) { - return false; - } - - if (!isset($type->value()[0], $type->value()[1])) { - return false; - } - - if (!is_string($type->value()[0]) || !is_string($type->value()[1])) { - return false; - } - - [$className, $methodName] = $type->value(); - } - - if (!class_exists($className)) { - return false; - } - - $class = new ReflectionClass($className); - - if (!$class->hasMethod($methodName)) { - return false; - } - - $method = $class->getMethod($methodName); - - return $method->isPublic() && $method->isStatic(); - } -} diff --git a/vendor/sebastian/type/src/type/FalseType.php b/vendor/sebastian/type/src/type/FalseType.php deleted file mode 100644 index 3de720a4..00000000 --- a/vendor/sebastian/type/src/type/FalseType.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class FalseType extends Type -{ - public function isAssignable(Type $other): bool - { - if ($other instanceof self) { - return true; - } - - return $other instanceof SimpleType && - $other->name() === 'bool' && - $other->value() === false; - } - - /** - * @return 'false' - */ - public function name(): string - { - return 'false'; - } - - public function allowsNull(): bool - { - return false; - } - - public function isFalse(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/GenericObjectType.php b/vendor/sebastian/type/src/type/GenericObjectType.php deleted file mode 100644 index efe1ae33..00000000 --- a/vendor/sebastian/type/src/type/GenericObjectType.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class GenericObjectType extends Type -{ - private bool $allowsNull; - - public function __construct(bool $nullable) - { - $this->allowsNull = $nullable; - } - - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if (!$other instanceof ObjectType) { - return false; - } - - return true; - } - - /** - * @return 'object' - */ - public function name(): string - { - return 'object'; - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function isGenericObject(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/IntersectionType.php b/vendor/sebastian/type/src/type/IntersectionType.php deleted file mode 100644 index f8cad8cb..00000000 --- a/vendor/sebastian/type/src/type/IntersectionType.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function assert; -use function count; -use function implode; -use function in_array; -use function sort; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class IntersectionType extends Type -{ - /** - * @var non-empty-list - */ - private array $types; - - /** - * @throws RuntimeException - */ - public function __construct(Type ...$types) - { - $this->ensureMinimumOfTwoTypes(...$types); - $this->ensureOnlyValidTypes(...$types); - $this->ensureNoDuplicateTypes(...$types); - - assert($types !== []); - - $this->types = $types; - } - - public function isAssignable(Type $other): bool - { - return $other->isObject(); - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return $this->name(); - } - - /** - * @return non-empty-string - */ - public function name(): string - { - $types = []; - - foreach ($this->types as $type) { - $types[] = $type->name(); - } - - sort($types); - - return implode('&', $types); - } - - public function allowsNull(): bool - { - return false; - } - - public function isIntersection(): bool - { - return true; - } - - /** - * @return non-empty-list - */ - public function types(): array - { - return $this->types; - } - - /** - * @throws RuntimeException - */ - private function ensureMinimumOfTwoTypes(Type ...$types): void - { - if (count($types) < 2) { - throw new RuntimeException( - 'An intersection type must be composed of at least two types', - ); - } - } - - /** - * @throws RuntimeException - */ - private function ensureOnlyValidTypes(Type ...$types): void - { - foreach ($types as $type) { - if (!$type->isObject()) { - throw new RuntimeException( - 'An intersection type can only be composed of interfaces and classes', - ); - } - } - } - - /** - * @throws RuntimeException - */ - private function ensureNoDuplicateTypes(Type ...$types): void - { - $names = []; - - foreach ($types as $type) { - assert($type instanceof ObjectType); - - $classQualifiedName = $type->className()->qualifiedName(); - - if (in_array($classQualifiedName, $names, true)) { - throw new RuntimeException('An intersection type must not contain duplicate types'); - } - - $names[] = $classQualifiedName; - } - } -} diff --git a/vendor/sebastian/type/src/type/IterableType.php b/vendor/sebastian/type/src/type/IterableType.php deleted file mode 100644 index 608ddc58..00000000 --- a/vendor/sebastian/type/src/type/IterableType.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function assert; -use function class_exists; -use function is_iterable; -use ReflectionClass; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class IterableType extends Type -{ - private bool $allowsNull; - - public function __construct(bool $nullable) - { - $this->allowsNull = $nullable; - } - - /** - * @throws RuntimeException - */ - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if ($other instanceof self) { - return true; - } - - if ($other instanceof SimpleType) { - return is_iterable($other->value()); - } - - if ($other instanceof ObjectType) { - $className = $other->className()->qualifiedName(); - - assert(class_exists($className)); - - return (new ReflectionClass($className))->isIterable(); - } - - return false; - } - - /** - * @return 'iterable' - */ - public function name(): string - { - return 'iterable'; - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function isIterable(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/MixedType.php b/vendor/sebastian/type/src/type/MixedType.php deleted file mode 100644 index c449d112..00000000 --- a/vendor/sebastian/type/src/type/MixedType.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class MixedType extends Type -{ - public function isAssignable(Type $other): bool - { - return !$other instanceof VoidType; - } - - /** - * @return 'mixed' - */ - public function asString(): string - { - return 'mixed'; - } - - /** - * @return 'mixed' - */ - public function name(): string - { - return 'mixed'; - } - - public function allowsNull(): bool - { - return true; - } - - public function isMixed(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/NeverType.php b/vendor/sebastian/type/src/type/NeverType.php deleted file mode 100644 index ae80b54a..00000000 --- a/vendor/sebastian/type/src/type/NeverType.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class NeverType extends Type -{ - public function isAssignable(Type $other): bool - { - return $other instanceof self; - } - - /** - * @return 'never' - */ - public function name(): string - { - return 'never'; - } - - public function allowsNull(): bool - { - return false; - } - - public function isNever(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/NullType.php b/vendor/sebastian/type/src/type/NullType.php deleted file mode 100644 index a261347e..00000000 --- a/vendor/sebastian/type/src/type/NullType.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class NullType extends Type -{ - public function isAssignable(Type $other): bool - { - return !($other instanceof VoidType); - } - - /** - * @return 'null' - */ - public function name(): string - { - return 'null'; - } - - /** - * @return 'null' - */ - public function asString(): string - { - return 'null'; - } - - public function allowsNull(): bool - { - return true; - } - - public function isNull(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/ObjectType.php b/vendor/sebastian/type/src/type/ObjectType.php deleted file mode 100644 index 4ff4592e..00000000 --- a/vendor/sebastian/type/src/type/ObjectType.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function is_subclass_of; -use function strcasecmp; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class ObjectType extends Type -{ - private TypeName $className; - private bool $allowsNull; - - public function __construct(TypeName $className, bool $allowsNull) - { - $this->className = $className; - $this->allowsNull = $allowsNull; - } - - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if ($other instanceof self) { - if (0 === strcasecmp($this->className->qualifiedName(), $other->className->qualifiedName())) { - return true; - } - - if (is_subclass_of($other->className->qualifiedName(), $this->className->qualifiedName(), true)) { - return true; - } - } - - return false; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->className->qualifiedName(); - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function className(): TypeName - { - return $this->className; - } - - public function isObject(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/SimpleType.php b/vendor/sebastian/type/src/type/SimpleType.php deleted file mode 100644 index b242b5cb..00000000 --- a/vendor/sebastian/type/src/type/SimpleType.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function strtolower; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class SimpleType extends Type -{ - /** - * @var non-empty-string - */ - private string $name; - private bool $allowsNull; - private mixed $value; - - /** - * @param non-empty-string $name - */ - public function __construct(string $name, bool $nullable, mixed $value = null) - { - $this->name = $this->normalize($name); - $this->allowsNull = $nullable; - $this->value = $value; - } - - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if ($this->name === 'bool' && $other->name() === 'true') { - return true; - } - - if ($this->name === 'bool' && $other->name() === 'false') { - return true; - } - - if ($other instanceof self) { - return $this->name === $other->name; - } - - return false; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function value(): mixed - { - return $this->value; - } - - public function isSimple(): bool - { - return true; - } - - /** - * @param non-empty-string $name - * - * @return non-empty-string - */ - private function normalize(string $name): string - { - $name = strtolower($name); - - return match ($name) { - 'boolean' => 'bool', - 'real', 'double' => 'float', - 'integer' => 'int', - '[]' => 'array', - default => $name, - }; - } -} diff --git a/vendor/sebastian/type/src/type/StaticType.php b/vendor/sebastian/type/src/type/StaticType.php deleted file mode 100644 index 1f7ba2ec..00000000 --- a/vendor/sebastian/type/src/type/StaticType.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function is_subclass_of; -use function strcasecmp; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class StaticType extends Type -{ - private TypeName $className; - private bool $allowsNull; - - public function __construct(TypeName $className, bool $allowsNull) - { - $this->className = $className; - $this->allowsNull = $allowsNull; - } - - public function isAssignable(Type $other): bool - { - if ($this->allowsNull && $other instanceof NullType) { - return true; - } - - if (!$other instanceof ObjectType) { - return false; - } - - if (0 === strcasecmp($this->className->qualifiedName(), $other->className()->qualifiedName())) { - return true; - } - - if (is_subclass_of($other->className()->qualifiedName(), $this->className->qualifiedName(), true)) { - return true; - } - - return false; - } - - /** - * @return 'static' - */ - public function name(): string - { - return 'static'; - } - - public function allowsNull(): bool - { - return $this->allowsNull; - } - - public function isStatic(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/TrueType.php b/vendor/sebastian/type/src/type/TrueType.php deleted file mode 100644 index d581ea23..00000000 --- a/vendor/sebastian/type/src/type/TrueType.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class TrueType extends Type -{ - public function isAssignable(Type $other): bool - { - if ($other instanceof self) { - return true; - } - - return $other instanceof SimpleType && - $other->name() === 'bool' && - $other->value() === true; - } - - /** - * @return 'true' - */ - public function name(): string - { - return 'true'; - } - - public function allowsNull(): bool - { - return false; - } - - public function isTrue(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/Type.php b/vendor/sebastian/type/src/type/Type.php deleted file mode 100644 index 0dee63f5..00000000 --- a/vendor/sebastian/type/src/type/Type.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function gettype; -use function is_object; -use function strtolower; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -abstract class Type -{ - public static function fromValue(mixed $value, bool $allowsNull): self - { - if ($allowsNull === false) { - if ($value === true) { - return new TrueType; - } - - if ($value === false) { - return new FalseType; - } - } - - $typeName = gettype($value); - - if (is_object($value)) { - return new ObjectType(TypeName::fromQualifiedName($value::class), $allowsNull); - } - - $type = self::fromName($typeName, $allowsNull); - - if ($type instanceof SimpleType) { - $type = new SimpleType($typeName, $allowsNull, $value); - } - - return $type; - } - - /** - * @param non-empty-string $typeName - */ - public static function fromName(string $typeName, bool $allowsNull): self - { - return match (strtolower($typeName)) { - 'callable' => new CallableType($allowsNull), - 'true' => new TrueType, - 'false' => new FalseType, - 'iterable' => new IterableType($allowsNull), - 'never' => new NeverType, - 'null' => new NullType, - 'object' => new GenericObjectType($allowsNull), - 'unknown type' => new UnknownType, - 'void' => new VoidType, - 'array', 'bool', 'boolean', 'double', 'float', 'int', 'integer', 'real', 'resource', 'resource (closed)', 'string' => new SimpleType($typeName, $allowsNull), - 'mixed' => new MixedType, - /** @phpstan-ignore argument.type */ - default => new ObjectType(TypeName::fromQualifiedName($typeName), $allowsNull), - }; - } - - public function asString(): string - { - return ($this->allowsNull() ? '?' : '') . $this->name(); - } - - /** - * @phpstan-assert-if-true CallableType $this - */ - public function isCallable(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true TrueType $this - */ - public function isTrue(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true FalseType $this - */ - public function isFalse(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true GenericObjectType $this - */ - public function isGenericObject(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true IntersectionType $this - */ - public function isIntersection(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true IterableType $this - */ - public function isIterable(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true MixedType $this - */ - public function isMixed(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true NeverType $this - */ - public function isNever(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true NullType $this - */ - public function isNull(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true ObjectType $this - */ - public function isObject(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true SimpleType $this - */ - public function isSimple(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true StaticType $this - */ - public function isStatic(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UnionType $this - */ - public function isUnion(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UnknownType $this - */ - public function isUnknown(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true VoidType $this - */ - public function isVoid(): bool - { - return false; - } - - abstract public function isAssignable(self $other): bool; - - /** - * @return non-empty-string - */ - abstract public function name(): string; - - abstract public function allowsNull(): bool; -} diff --git a/vendor/sebastian/type/src/type/UnionType.php b/vendor/sebastian/type/src/type/UnionType.php deleted file mode 100644 index 82eec56e..00000000 --- a/vendor/sebastian/type/src/type/UnionType.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -use function assert; -use function count; -use function implode; -use function sort; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class UnionType extends Type -{ - /** - * @var non-empty-list - */ - private array $types; - - /** - * @throws RuntimeException - */ - public function __construct(Type ...$types) - { - $this->ensureMinimumOfTwoTypes(...$types); - $this->ensureOnlyValidTypes(...$types); - - assert($types !== []); - - $this->types = $types; - } - - public function isAssignable(Type $other): bool - { - foreach ($this->types as $type) { - if ($type->isAssignable($other)) { - return true; - } - } - - return false; - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return $this->name(); - } - - /** - * @return non-empty-string - */ - public function name(): string - { - $types = []; - - foreach ($this->types as $type) { - if ($type->isIntersection()) { - $types[] = '(' . $type->name() . ')'; - - continue; - } - - $types[] = $type->name(); - } - - sort($types); - - return implode('|', $types); - } - - public function allowsNull(): bool - { - foreach ($this->types as $type) { - if ($type instanceof NullType) { - return true; - } - } - - return false; - } - - public function isUnion(): bool - { - return true; - } - - public function containsIntersectionTypes(): bool - { - foreach ($this->types as $type) { - if ($type->isIntersection()) { - return true; - } - } - - return false; - } - - /** - * @return non-empty-list - */ - public function types(): array - { - return $this->types; - } - - /** - * @throws RuntimeException - */ - private function ensureMinimumOfTwoTypes(Type ...$types): void - { - if (count($types) < 2) { - throw new RuntimeException( - 'A union type must be composed of at least two types', - ); - } - } - - /** - * @throws RuntimeException - */ - private function ensureOnlyValidTypes(Type ...$types): void - { - foreach ($types as $type) { - if ($type instanceof UnknownType) { - throw new RuntimeException( - 'A union type must not be composed of an unknown type', - ); - } - - if ($type instanceof VoidType) { - throw new RuntimeException( - 'A union type must not be composed of a void type', - ); - } - } - } -} diff --git a/vendor/sebastian/type/src/type/UnknownType.php b/vendor/sebastian/type/src/type/UnknownType.php deleted file mode 100644 index 41f8221d..00000000 --- a/vendor/sebastian/type/src/type/UnknownType.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class UnknownType extends Type -{ - public function isAssignable(Type $other): bool - { - return true; - } - - /** - * @return 'unknown type' - */ - public function name(): string - { - return 'unknown type'; - } - - /** - * @return '' - */ - public function asString(): string - { - return ''; - } - - public function allowsNull(): bool - { - return true; - } - - public function isUnknown(): bool - { - return true; - } -} diff --git a/vendor/sebastian/type/src/type/VoidType.php b/vendor/sebastian/type/src/type/VoidType.php deleted file mode 100644 index 7d98c133..00000000 --- a/vendor/sebastian/type/src/type/VoidType.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\Type; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for this library - */ -final class VoidType extends Type -{ - public function isAssignable(Type $other): bool - { - return $other instanceof self; - } - - /** - * @return 'void' - */ - public function name(): string - { - return 'void'; - } - - public function allowsNull(): bool - { - return false; - } - - public function isVoid(): bool - { - return true; - } -} diff --git a/vendor/sebastian/version/ChangeLog.md b/vendor/sebastian/version/ChangeLog.md deleted file mode 100644 index 53706bf0..00000000 --- a/vendor/sebastian/version/ChangeLog.md +++ /dev/null @@ -1,71 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - -## [5.0.2] - 2024-10-09 - -### Changed - -* [#21](https://github.com/sebastianbergmann/version/pull/21): Avoid spawning a shell for Git - -## [5.0.1] - 2024-07-03 - -### Changed - -* This project now uses PHPStan instead of Psalm for static analysis - -## [5.0.0] - 2024-02-02 - -### Removed - -* This component is no longer supported on PHP 8.1 - -## [4.0.1] - 2023-02-07 - -### Fixed - -* [#17](https://github.com/sebastianbergmann/version/pull/17): Release archive contains unnecessary assets - -## [4.0.0] - 2023-02-03 - -### Changed - -* `Version::getVersion()` has been renamed to `Version::asString()` - -### Removed - -* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 - -## [3.0.2] - 2020-09-28 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` - -## [3.0.1] - 2020-06-26 - -### Added - -* This component is now supported on PHP 8 - -## [3.0.0] - 2020-01-21 - -### Removed - -* This component is no longer supported on PHP 7.1 and PHP 7.2 - -[6.0.0]: https://github.com/sebastianbergmann/version/compare/5.0...6.0.0 -[5.0.2]: https://github.com/sebastianbergmann/version/compare/5.0.1...5.0.2 -[5.0.1]: https://github.com/sebastianbergmann/version/compare/5.0.0...5.0.1 -[5.0.0]: https://github.com/sebastianbergmann/version/compare/4.0...5.0.0 -[4.0.1]: https://github.com/sebastianbergmann/version/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/version/compare/3.0.2...4.0.0 -[3.0.2]: https://github.com/sebastianbergmann/version/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/version/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/version/compare/2.0.1...3.0.0 diff --git a/vendor/sebastian/version/LICENSE b/vendor/sebastian/version/LICENSE deleted file mode 100644 index 42f4747e..00000000 --- a/vendor/sebastian/version/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2013-2025, Sebastian Bergmann -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/version/README.md b/vendor/sebastian/version/README.md deleted file mode 100644 index fd8820c5..00000000 --- a/vendor/sebastian/version/README.md +++ /dev/null @@ -1,50 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/version/v)](https://packagist.org/packages/sebastian/version) - -# sebastian/version - -**sebastian/version** is a library that helps with managing the version number of Git-hosted PHP projects. - -## Installation - -You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - -``` -composer require sebastian/version -``` - -If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - -``` -composer require --dev sebastian/version -``` -## Usage - -The constructor of the `SebastianBergmann\Version` class expects two parameters: - -* `$release` is the version number of the latest release (`X.Y.Z`, for instance) or the name of the release series (`X.Y`) when no release has been made from that branch / for that release series yet. -* `$path` is the path to the directory (or a subdirectory thereof) where the sourcecode of the project can be found. Simply passing `__DIR__` here usually suffices. - -Apart from the constructor, the `SebastianBergmann\Version` class has a single public method: `asString()`. - -Here is a contrived example that shows the basic usage: - -```php -asString()); -``` -``` -string(18) "1.0.0-17-g00f3408" -``` - -When a new release is prepared, the string that is passed to the constructor as the first argument needs to be updated. - -### How SebastianBergmann\Version::asString() works - -* If `$path` is not (part of) a Git repository and `$release` is in `X.Y.Z` format then `$release` is returned as-is. -* If `$path` is not (part of) a Git repository and `$release` is in `X.Y` format then `$release` is returned suffixed with `-dev`. -* If `$path` is (part of) a Git repository and `$release` is in `X.Y.Z` format then the output of `git describe --tags` is returned as-is. -* If `$path` is (part of) a Git repository and `$release` is in `X.Y` format then a string is returned that begins with `X.Y` and ends with information from `git describe --tags`. diff --git a/vendor/sebastian/version/SECURITY.md b/vendor/sebastian/version/SECURITY.md deleted file mode 100644 index d88ff001..00000000 --- a/vendor/sebastian/version/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please email `sebastian@phpunit.de`. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -* The type of issue -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Web Context - -The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. - -The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. - -If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. - -Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. - diff --git a/vendor/sebastian/version/composer.json b/vendor/sebastian/version/composer.json deleted file mode 100644 index 9ba2b85a..00000000 --- a/vendor/sebastian/version/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "sebastian/version", - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "security": "https://github.com/sebastianbergmann/version/security/policy" - }, - "config": { - "platform": { - "php": "8.3.0" - }, - "optimize-autoloader": true, - "sort-packages": true - }, - "prefer-stable": true, - "require": { - "php": ">=8.3" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "6.0-dev" - } - } -} diff --git a/vendor/sebastian/version/src/Version.php b/vendor/sebastian/version/src/Version.php deleted file mode 100644 index 0fd9def7..00000000 --- a/vendor/sebastian/version/src/Version.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann; - -use const DIRECTORY_SEPARATOR; -use function assert; -use function end; -use function explode; -use function fclose; -use function is_array; -use function is_dir; -use function is_resource; -use function proc_close; -use function proc_open; -use function stream_get_contents; -use function substr_count; -use function trim; - -final readonly class Version -{ - /** - * @var non-empty-string - */ - private string $version; - - /** - * @param non-empty-string $release - * @param non-empty-string $path - */ - public function __construct(string $release, string $path) - { - $this->version = $this->generate($release, $path); - } - - /** - * @return non-empty-string - */ - public function asString(): string - { - return $this->version; - } - - /** - * @param non-empty-string $release - * @param non-empty-string $path - * - * @return non-empty-string - */ - private function generate(string $release, string $path): string - { - if (substr_count($release, '.') + 1 === 3) { - $version = $release; - } else { - $version = $release . '-dev'; - } - - $git = $this->getGitInformation($path); - - if (!$git) { - return $version; - } - - if (substr_count($release, '.') + 1 === 3) { - return $git; - } - - $git = explode('-', $git); - - return $release . '-' . end($git); - } - - /** - * @param non-empty-string $path - */ - private function getGitInformation(string $path): false|string - { - if (!is_dir($path . DIRECTORY_SEPARATOR . '.git')) { - return false; - } - - $process = @proc_open( - ['git', 'describe', '--tags'], - [ - 1 => ['pipe', 'w'], - 2 => ['pipe', 'w'], - ], - $pipes, - $path, - ); - - if (!is_resource($process)) { - return false; - } - - assert(is_array($pipes)); - assert(isset($pipes[1]) && is_resource($pipes[1])); - assert(isset($pipes[2]) && is_resource($pipes[2])); - - $result = trim((string) stream_get_contents($pipes[1])); - - fclose($pipes[1]); - fclose($pipes[2]); - - $returnCode = proc_close($process); - - if ($returnCode !== 0) { - return false; - } - - return $result; - } -} diff --git a/vendor/staabm/side-effects-detector/LICENSE b/vendor/staabm/side-effects-detector/LICENSE deleted file mode 100644 index 91188b68..00000000 --- a/vendor/staabm/side-effects-detector/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Markus Staab - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/staabm/side-effects-detector/README.md b/vendor/staabm/side-effects-detector/README.md deleted file mode 100644 index 5ef8ffea..00000000 --- a/vendor/staabm/side-effects-detector/README.md +++ /dev/null @@ -1,57 +0,0 @@ -Analyzes php-code for side-effects. - -When code has no side-effects it can e.g. be used with `eval($code)` in the same process without interfering. -[Side-effects are classified](https://github.com/staabm/side-effects-detector/blob/main/lib/SideEffect.php) into categories to filter them more easily depending on your use-case. - -## Install - -`composer require staabm/side-effects-detector` - -## Usage - -Example: - -```php -use staabm\SideEffectsDetector\SideEffectsDetector; - -$code = '=") or echo("skip because attributes are only available since PHP 8.0");'; - -$detector = new SideEffectsDetector(); -// [SideEffect::STANDARD_OUTPUT] -var_dump($detector->getSideEffects($code)); -``` - -In case functions are called which are not known to have side-effects - e.g. userland functions - `null` is returned. - -```php -use staabm\SideEffectsDetector\SideEffectsDetector; - -$code = 'getSideEffects($code)); -``` - -Code might have multiple side-effects: - -```php -use staabm\SideEffectsDetector\SideEffectsDetector; - -$code = 'getSideEffects($code)); -``` - - -## Disclaimer - -Non goals are: -- find the best possible answer for all cases -- add runtime dependencies - -If you are in need of a fully fledged side-effect analysis, use more advanced tools like PHPStan. - -Look at the test-suite to get an idea of [supported use-cases](https://github.com/staabm/side-effects-detector/blob/main/tests/SideEffectsDetectorTest.php). diff --git a/vendor/staabm/side-effects-detector/composer.json b/vendor/staabm/side-effects-detector/composer.json deleted file mode 100644 index 0ef6413e..00000000 --- a/vendor/staabm/side-effects-detector/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "staabm/side-effects-detector", - "license": "MIT", - "description": "A static analysis tool to detect side effects in PHP code", - "keywords": ["static analysis"], - "autoload": { - "classmap": ["lib/"] - }, - "autoload-dev": { - "classmap": [ - "tests/" - ] - }, - "require": { - "php": "^7.4 || ^8.0", - "ext-tokenizer": "*" - }, - "require-dev": { - "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.6", - "phpunit/phpunit": "^9.6.21", - "symfony/var-dumper": "^5.4.43", - "tomasvotruba/type-coverage": "1.0.0", - "tomasvotruba/unused-public": "1.0.0" - }, - "config": { - "optimize-autoloader": true, - "sort-packages": true, - "allow-plugins": { - "phpstan/extension-installer": true - } - }, - "scripts": { - "qa": ["@test", "@phpstan"], - "phpstan": "phpstan analyze", - "test": "phpunit" - } -} diff --git a/vendor/staabm/side-effects-detector/lib/SideEffect.php b/vendor/staabm/side-effects-detector/lib/SideEffect.php deleted file mode 100644 index 045a3aae..00000000 --- a/vendor/staabm/side-effects-detector/lib/SideEffect.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - private array $scopePollutingTokens = [ - T_CLASS, - T_FUNCTION, - T_NEW, - T_EVAL, - T_GLOBAL, - T_GOTO, - T_HALT_COMPILER, - T_INCLUDE, - T_INCLUDE_ONCE, - T_REQUIRE, - T_REQUIRE_ONCE, - T_THROW, - T_UNSET, - T_UNSET_CAST - ]; - - private const PROCESS_EXIT_TOKENS = [ - T_EXIT - ]; - - private const OUTPUT_TOKENS = [ - T_PRINT, - T_ECHO, - T_INLINE_HTML - ]; - - private const SCOPE_POLLUTING_FUNCTIONS = [ - 'putenv', - 'setlocale', - 'class_exists', - 'ini_set', - ]; - - private const STANDARD_OUTPUT_FUNCTIONS = [ - 'printf', - 'vprintf' - ]; - - private const INPUT_OUTPUT_FUNCTIONS = [ - 'fopen', - 'file_get_contents', - 'file_put_contents', - 'fwrite', - 'fputs', - 'fread', - 'unlink' - ]; - - /** - * @var array - */ - private array $functionMetadata; - - public function __construct() { - $functionMeta = require __DIR__ . '/functionMetadata.php'; - if (!is_array($functionMeta)) { - throw new \RuntimeException('Invalid function metadata'); - } - $this->functionMetadata = $functionMeta; - - if (defined('T_ENUM')) { - $this->scopePollutingTokens[] = T_ENUM; - } - } - - /** - * @api - * - * @return array - */ - public function getSideEffects(string $code): array { - $tokens = token_get_all($code); - - $sideEffects = []; - for ($i = 0; $i < count($tokens); $i++) { - $token = $tokens[$i]; - - if (!is_array($token)) { - continue; - } - - if ($this->isAnonymousFunction($tokens, $i)) { - continue; - } - - if (in_array($token[0], self::OUTPUT_TOKENS, true)) { - $sideEffects[] = SideEffect::STANDARD_OUTPUT; - continue; - } - if (in_array($token[0], self::PROCESS_EXIT_TOKENS, true)) { - $sideEffects[] = SideEffect::PROCESS_EXIT; - continue; - } - if (in_array($token[0], $this->scopePollutingTokens, true)) { - $sideEffects[] = SideEffect::SCOPE_POLLUTION; - - $i++; - if (in_array($token[0], [T_FUNCTION, T_CLASS], true)) { - $this->consumeWhitespaces($tokens, $i); - } - - // consume function/class-name - if ( - !array_key_exists($i, $tokens) - || !is_array($tokens[$i]) - || $tokens[$i][0] !== T_STRING - ) { - continue; - } - - $i++; - continue; - } - - $functionCall = $this->getFunctionCall($tokens, $i); - if ($functionCall !== null) { - $callSideEffect = $this->getFunctionCallSideEffect($functionCall); - if ($callSideEffect !== null) { - $sideEffects[] = $callSideEffect; - } - continue; - } - - $methodCall = $this->getMethodCall($tokens, $i); - if ($methodCall !== null) { - $sideEffects[] = SideEffect::MAYBE; - continue; - } - - $propertyAccess = $this->getPropertyAccess($tokens, $i); - if ($propertyAccess !== null) { - $sideEffects[] = SideEffect::SCOPE_POLLUTION; - continue; - } - - if ($this->isNonLocalVariable($tokens, $i)) { - $sideEffects[] = SideEffect::SCOPE_POLLUTION; - continue; - } - } - - return array_values(array_unique($sideEffects)); - } - - /** - * @return SideEffect::*|null - */ - private function getFunctionCallSideEffect(string $functionName): ?string { // @phpstan-ignore return.unusedType - if (in_array($functionName, self::STANDARD_OUTPUT_FUNCTIONS, true)) { - return SideEffect::STANDARD_OUTPUT; - } - - if (in_array($functionName, self::INPUT_OUTPUT_FUNCTIONS, true)) { - return SideEffect::INPUT_OUTPUT; - } - - if (in_array($functionName, self::SCOPE_POLLUTING_FUNCTIONS, true)) { - return SideEffect::SCOPE_POLLUTION; - } - - if (array_key_exists($functionName, $this->functionMetadata)) { - if ($this->functionMetadata[$functionName]['hasSideEffects'] === true) { - return SideEffect::UNKNOWN_CLASS; - } - } else { - try { - $reflectionFunction = new \ReflectionFunction($functionName); - $returnType = $reflectionFunction->getReturnType(); - if ($returnType === null) { - return SideEffect::MAYBE; // no reflection information -> we don't know - } - if ((string)$returnType === 'void') { - return SideEffect::UNKNOWN_CLASS; // functions with void return type must have side-effects - } - } catch (\ReflectionException $e) { - return SideEffect::MAYBE; // function does not exist -> we don't know - } - } - - return null; - } - - /** - * @param array $tokens - */ - private function getFunctionCall(array $tokens, int $index): ?string { - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || $tokens[$index][0] !== T_STRING - ) { - return null; - } - $functionName = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - array_key_exists($index, $tokens) - && $tokens[$index] === '(' - ) { - return $functionName; - } - - return null; - } - - /** - * @param array $tokens - */ - private function getMethodCall(array $tokens, int $index): ?string { - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_VARIABLE, T_STRING], true) - ) { - return null; - } - $callee = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_OBJECT_OPERATOR , T_DOUBLE_COLON ], true) - ) { - return null; - } - $operator = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_STRING], true) - ) { - return null; - } - $method = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - array_key_exists($index, $tokens) - && $tokens[$index] !== '(' - ) { - return null; - } - - return $callee . $operator . $method; - } - - /** - * @param array $tokens - */ - private function getPropertyAccess(array $tokens, int $index): ?string { - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_VARIABLE, T_STRING], true) - ) { - return null; - } - $objectOrClass = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_OBJECT_OPERATOR , T_DOUBLE_COLON ], true) - ) { - return null; - } - $operator = $tokens[$index][1]; - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || !in_array($tokens[$index][0], [T_STRING, T_VARIABLE], true) - ) { - return null; - } - $propName = $tokens[$index][1]; - - return $objectOrClass . $operator . $propName; - } - - /** - * @param array $tokens - */ - private function isAnonymousFunction(array $tokens, int $index): bool - { - if ( - !array_key_exists($index, $tokens) - || !is_array($tokens[$index]) - || $tokens[$index][0] !== T_FUNCTION - ) { - return false; - } - - $index++; - $this->consumeWhitespaces($tokens, $index); - - if ( - array_key_exists($index, $tokens) - && $tokens[$index] === '(' - ) { - return true; - } - - return false; - } - - /** - * @param array $tokens - */ - private function isNonLocalVariable(array $tokens, int $index): bool - { - if ( - array_key_exists($index, $tokens) - && is_array($tokens[$index]) - && $tokens[$index][0] === T_VARIABLE - ) { - if ( - in_array( - $tokens[$index][1], - [ - '$this', - '$GLOBALS', '$_SERVER', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_REQUEST', '$_ENV', - ], - true) - ) { - return true; - } - } - - return false; - } - - /** - * @param array $tokens - */ - private function consumeWhitespaces(array $tokens, int &$index): void { - while ( - array_key_exists($index, $tokens) - && is_array($tokens[$index]) - && $tokens[$index][0] === T_WHITESPACE - ) { - $index++; - } - } -} diff --git a/vendor/staabm/side-effects-detector/lib/functionMetadata.php b/vendor/staabm/side-effects-detector/lib/functionMetadata.php deleted file mode 100644 index 8a1748ab..00000000 --- a/vendor/staabm/side-effects-detector/lib/functionMetadata.php +++ /dev/null @@ -1,1588 +0,0 @@ - ['hasSideEffects' => true], - 'trigger_error' => ['hasSideEffects' => true], - 'putenv' => ['hasSideEffects' => true], - 'version_compare' => ['hasSideEffects' => false], - - // Intially copied from PHPStan - 'BackedEnum::from' => ['hasSideEffects' => false], - 'BackedEnum::tryFrom' => ['hasSideEffects' => false], - 'CURLFile::getFilename' => ['hasSideEffects' => false], - 'CURLFile::getMimeType' => ['hasSideEffects' => false], - 'CURLFile::getPostFilename' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\AlreadyExistsException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\AuthenticationException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ConfigurationException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\DivideByZeroException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\DomainException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ExecutionException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\InvalidArgumentException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\InvalidQueryException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\InvalidSyntaxException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\IsBootstrappingException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\LogicException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\OverloadedException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ProtocolException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\RangeException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ReadTimeoutException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\RuntimeException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ServerException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\TimeoutException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\TruncateException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\UnauthorizedException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\UnavailableException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\UnpreparedException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\ValidationException::__construct' => ['hasSideEffects' => false], - 'Cassandra\\Exception\\WriteTimeoutException::__construct' => ['hasSideEffects' => false], - 'Closure::bind' => ['hasSideEffects' => false], - 'Closure::bindTo' => ['hasSideEffects' => false], - 'Collator::__construct' => ['hasSideEffects' => false], - 'Collator::compare' => ['hasSideEffects' => false], - 'Collator::getAttribute' => ['hasSideEffects' => false], - 'Collator::getErrorCode' => ['hasSideEffects' => false], - 'Collator::getErrorMessage' => ['hasSideEffects' => false], - 'Collator::getLocale' => ['hasSideEffects' => false], - 'Collator::getSortKey' => ['hasSideEffects' => false], - 'Collator::getStrength' => ['hasSideEffects' => false], - 'DateTime::add' => ['hasSideEffects' => true], - 'DateTime::createFromFormat' => ['hasSideEffects' => false], - 'DateTime::createFromImmutable' => ['hasSideEffects' => false], - 'DateTime::diff' => ['hasSideEffects' => false], - 'DateTime::format' => ['hasSideEffects' => false], - 'DateTime::getLastErrors' => ['hasSideEffects' => false], - 'DateTime::getOffset' => ['hasSideEffects' => false], - 'DateTime::getTimestamp' => ['hasSideEffects' => false], - 'DateTime::getTimezone' => ['hasSideEffects' => false], - 'DateTime::modify' => ['hasSideEffects' => true], - 'DateTime::setDate' => ['hasSideEffects' => true], - 'DateTime::setISODate' => ['hasSideEffects' => true], - 'DateTime::setTime' => ['hasSideEffects' => true], - 'DateTime::setTimestamp' => ['hasSideEffects' => true], - 'DateTime::setTimezone' => ['hasSideEffects' => true], - 'DateTime::sub' => ['hasSideEffects' => true], - 'DateTimeImmutable::add' => ['hasSideEffects' => false], - 'DateTimeImmutable::createFromFormat' => ['hasSideEffects' => false], - 'DateTimeImmutable::createFromMutable' => ['hasSideEffects' => false], - 'DateTimeImmutable::diff' => ['hasSideEffects' => false], - 'DateTimeImmutable::format' => ['hasSideEffects' => false], - 'DateTimeImmutable::getLastErrors' => ['hasSideEffects' => false], - 'DateTimeImmutable::getOffset' => ['hasSideEffects' => false], - 'DateTimeImmutable::getTimestamp' => ['hasSideEffects' => false], - 'DateTimeImmutable::getTimezone' => ['hasSideEffects' => false], - 'DateTimeImmutable::modify' => ['hasSideEffects' => false], - 'DateTimeImmutable::setDate' => ['hasSideEffects' => false], - 'DateTimeImmutable::setISODate' => ['hasSideEffects' => false], - 'DateTimeImmutable::setTime' => ['hasSideEffects' => false], - 'DateTimeImmutable::setTimestamp' => ['hasSideEffects' => false], - 'DateTimeImmutable::setTimezone' => ['hasSideEffects' => false], - 'DateTimeImmutable::sub' => ['hasSideEffects' => false], - 'Error::__construct' => ['hasSideEffects' => false], - 'ErrorException::__construct' => ['hasSideEffects' => false], - 'Event::__construct' => ['hasSideEffects' => false], - 'EventBase::getFeatures' => ['hasSideEffects' => false], - 'EventBase::getMethod' => ['hasSideEffects' => false], - 'EventBase::getTimeOfDayCached' => ['hasSideEffects' => false], - 'EventBase::gotExit' => ['hasSideEffects' => false], - 'EventBase::gotStop' => ['hasSideEffects' => false], - 'EventBuffer::__construct' => ['hasSideEffects' => false], - 'EventBufferEvent::__construct' => ['hasSideEffects' => false], - 'EventBufferEvent::getDnsErrorString' => ['hasSideEffects' => false], - 'EventBufferEvent::getEnabled' => ['hasSideEffects' => false], - 'EventBufferEvent::getInput' => ['hasSideEffects' => false], - 'EventBufferEvent::getOutput' => ['hasSideEffects' => false], - 'EventConfig::__construct' => ['hasSideEffects' => false], - 'EventDnsBase::__construct' => ['hasSideEffects' => false], - 'EventHttpConnection::__construct' => ['hasSideEffects' => false], - 'EventHttpRequest::__construct' => ['hasSideEffects' => false], - 'EventHttpRequest::getCommand' => ['hasSideEffects' => false], - 'EventHttpRequest::getConnection' => ['hasSideEffects' => false], - 'EventHttpRequest::getHost' => ['hasSideEffects' => false], - 'EventHttpRequest::getInputBuffer' => ['hasSideEffects' => false], - 'EventHttpRequest::getInputHeaders' => ['hasSideEffects' => false], - 'EventHttpRequest::getOutputBuffer' => ['hasSideEffects' => false], - 'EventHttpRequest::getOutputHeaders' => ['hasSideEffects' => false], - 'EventHttpRequest::getResponseCode' => ['hasSideEffects' => false], - 'EventHttpRequest::getUri' => ['hasSideEffects' => false], - 'EventSslContext::__construct' => ['hasSideEffects' => false], - 'Exception::__construct' => ['hasSideEffects' => false], - 'Exception::getCode' => ['hasSideEffects' => false], - 'Exception::getFile' => ['hasSideEffects' => false], - 'Exception::getLine' => ['hasSideEffects' => false], - 'Exception::getMessage' => ['hasSideEffects' => false], - 'Exception::getPrevious' => ['hasSideEffects' => false], - 'Exception::getTrace' => ['hasSideEffects' => false], - 'Exception::getTraceAsString' => ['hasSideEffects' => false], - 'Gmagick::getcopyright' => ['hasSideEffects' => false], - 'Gmagick::getfilename' => ['hasSideEffects' => false], - 'Gmagick::getimagebackgroundcolor' => ['hasSideEffects' => false], - 'Gmagick::getimageblueprimary' => ['hasSideEffects' => false], - 'Gmagick::getimagebordercolor' => ['hasSideEffects' => false], - 'Gmagick::getimagechanneldepth' => ['hasSideEffects' => false], - 'Gmagick::getimagecolors' => ['hasSideEffects' => false], - 'Gmagick::getimagecolorspace' => ['hasSideEffects' => false], - 'Gmagick::getimagecompose' => ['hasSideEffects' => false], - 'Gmagick::getimagedelay' => ['hasSideEffects' => false], - 'Gmagick::getimagedepth' => ['hasSideEffects' => false], - 'Gmagick::getimagedispose' => ['hasSideEffects' => false], - 'Gmagick::getimageextrema' => ['hasSideEffects' => false], - 'Gmagick::getimagefilename' => ['hasSideEffects' => false], - 'Gmagick::getimageformat' => ['hasSideEffects' => false], - 'Gmagick::getimagegamma' => ['hasSideEffects' => false], - 'Gmagick::getimagegreenprimary' => ['hasSideEffects' => false], - 'Gmagick::getimageheight' => ['hasSideEffects' => false], - 'Gmagick::getimagehistogram' => ['hasSideEffects' => false], - 'Gmagick::getimageindex' => ['hasSideEffects' => false], - 'Gmagick::getimageinterlacescheme' => ['hasSideEffects' => false], - 'Gmagick::getimageiterations' => ['hasSideEffects' => false], - 'Gmagick::getimagematte' => ['hasSideEffects' => false], - 'Gmagick::getimagemattecolor' => ['hasSideEffects' => false], - 'Gmagick::getimageprofile' => ['hasSideEffects' => false], - 'Gmagick::getimageredprimary' => ['hasSideEffects' => false], - 'Gmagick::getimagerenderingintent' => ['hasSideEffects' => false], - 'Gmagick::getimageresolution' => ['hasSideEffects' => false], - 'Gmagick::getimagescene' => ['hasSideEffects' => false], - 'Gmagick::getimagesignature' => ['hasSideEffects' => false], - 'Gmagick::getimagetype' => ['hasSideEffects' => false], - 'Gmagick::getimageunits' => ['hasSideEffects' => false], - 'Gmagick::getimagewhitepoint' => ['hasSideEffects' => false], - 'Gmagick::getimagewidth' => ['hasSideEffects' => false], - 'Gmagick::getpackagename' => ['hasSideEffects' => false], - 'Gmagick::getquantumdepth' => ['hasSideEffects' => false], - 'Gmagick::getreleasedate' => ['hasSideEffects' => false], - 'Gmagick::getsamplingfactors' => ['hasSideEffects' => false], - 'Gmagick::getsize' => ['hasSideEffects' => false], - 'Gmagick::getversion' => ['hasSideEffects' => false], - 'GmagickDraw::getfillcolor' => ['hasSideEffects' => false], - 'GmagickDraw::getfillopacity' => ['hasSideEffects' => false], - 'GmagickDraw::getfont' => ['hasSideEffects' => false], - 'GmagickDraw::getfontsize' => ['hasSideEffects' => false], - 'GmagickDraw::getfontstyle' => ['hasSideEffects' => false], - 'GmagickDraw::getfontweight' => ['hasSideEffects' => false], - 'GmagickDraw::getstrokecolor' => ['hasSideEffects' => false], - 'GmagickDraw::getstrokeopacity' => ['hasSideEffects' => false], - 'GmagickDraw::getstrokewidth' => ['hasSideEffects' => false], - 'GmagickDraw::gettextdecoration' => ['hasSideEffects' => false], - 'GmagickDraw::gettextencoding' => ['hasSideEffects' => false], - 'GmagickPixel::getcolor' => ['hasSideEffects' => false], - 'GmagickPixel::getcolorcount' => ['hasSideEffects' => false], - 'GmagickPixel::getcolorvalue' => ['hasSideEffects' => false], - 'HttpMessage::getBody' => ['hasSideEffects' => false], - 'HttpMessage::getHeader' => ['hasSideEffects' => false], - 'HttpMessage::getHeaders' => ['hasSideEffects' => false], - 'HttpMessage::getHttpVersion' => ['hasSideEffects' => false], - 'HttpMessage::getInfo' => ['hasSideEffects' => false], - 'HttpMessage::getParentMessage' => ['hasSideEffects' => false], - 'HttpMessage::getRequestMethod' => ['hasSideEffects' => false], - 'HttpMessage::getRequestUrl' => ['hasSideEffects' => false], - 'HttpMessage::getResponseCode' => ['hasSideEffects' => false], - 'HttpMessage::getResponseStatus' => ['hasSideEffects' => false], - 'HttpMessage::getType' => ['hasSideEffects' => false], - 'HttpQueryString::get' => ['hasSideEffects' => false], - 'HttpQueryString::getArray' => ['hasSideEffects' => false], - 'HttpQueryString::getBool' => ['hasSideEffects' => false], - 'HttpQueryString::getFloat' => ['hasSideEffects' => false], - 'HttpQueryString::getInt' => ['hasSideEffects' => false], - 'HttpQueryString::getObject' => ['hasSideEffects' => false], - 'HttpQueryString::getString' => ['hasSideEffects' => false], - 'HttpRequest::getBody' => ['hasSideEffects' => false], - 'HttpRequest::getContentType' => ['hasSideEffects' => false], - 'HttpRequest::getCookies' => ['hasSideEffects' => false], - 'HttpRequest::getHeaders' => ['hasSideEffects' => false], - 'HttpRequest::getHistory' => ['hasSideEffects' => false], - 'HttpRequest::getMethod' => ['hasSideEffects' => false], - 'HttpRequest::getOptions' => ['hasSideEffects' => false], - 'HttpRequest::getPostFields' => ['hasSideEffects' => false], - 'HttpRequest::getPostFiles' => ['hasSideEffects' => false], - 'HttpRequest::getPutData' => ['hasSideEffects' => false], - 'HttpRequest::getPutFile' => ['hasSideEffects' => false], - 'HttpRequest::getQueryData' => ['hasSideEffects' => false], - 'HttpRequest::getRawPostData' => ['hasSideEffects' => false], - 'HttpRequest::getRawRequestMessage' => ['hasSideEffects' => false], - 'HttpRequest::getRawResponseMessage' => ['hasSideEffects' => false], - 'HttpRequest::getRequestMessage' => ['hasSideEffects' => false], - 'HttpRequest::getResponseBody' => ['hasSideEffects' => false], - 'HttpRequest::getResponseCode' => ['hasSideEffects' => false], - 'HttpRequest::getResponseCookies' => ['hasSideEffects' => false], - 'HttpRequest::getResponseData' => ['hasSideEffects' => false], - 'HttpRequest::getResponseHeader' => ['hasSideEffects' => false], - 'HttpRequest::getResponseInfo' => ['hasSideEffects' => false], - 'HttpRequest::getResponseMessage' => ['hasSideEffects' => false], - 'HttpRequest::getResponseStatus' => ['hasSideEffects' => false], - 'HttpRequest::getSslOptions' => ['hasSideEffects' => false], - 'HttpRequest::getUrl' => ['hasSideEffects' => false], - 'HttpRequestPool::getAttachedRequests' => ['hasSideEffects' => false], - 'HttpRequestPool::getFinishedRequests' => ['hasSideEffects' => false], - 'Imagick::getColorspace' => ['hasSideEffects' => false], - 'Imagick::getCompression' => ['hasSideEffects' => false], - 'Imagick::getCompressionQuality' => ['hasSideEffects' => false], - 'Imagick::getConfigureOptions' => ['hasSideEffects' => false], - 'Imagick::getFeatures' => ['hasSideEffects' => false], - 'Imagick::getFilename' => ['hasSideEffects' => false], - 'Imagick::getFont' => ['hasSideEffects' => false], - 'Imagick::getFormat' => ['hasSideEffects' => false], - 'Imagick::getGravity' => ['hasSideEffects' => false], - 'Imagick::getHDRIEnabled' => ['hasSideEffects' => false], - 'Imagick::getImage' => ['hasSideEffects' => false], - 'Imagick::getImageAlphaChannel' => ['hasSideEffects' => false], - 'Imagick::getImageArtifact' => ['hasSideEffects' => false], - 'Imagick::getImageAttribute' => ['hasSideEffects' => false], - 'Imagick::getImageBackgroundColor' => ['hasSideEffects' => false], - 'Imagick::getImageBlob' => ['hasSideEffects' => false], - 'Imagick::getImageBluePrimary' => ['hasSideEffects' => false], - 'Imagick::getImageBorderColor' => ['hasSideEffects' => false], - 'Imagick::getImageChannelDepth' => ['hasSideEffects' => false], - 'Imagick::getImageChannelDistortion' => ['hasSideEffects' => false], - 'Imagick::getImageChannelDistortions' => ['hasSideEffects' => false], - 'Imagick::getImageChannelExtrema' => ['hasSideEffects' => false], - 'Imagick::getImageChannelKurtosis' => ['hasSideEffects' => false], - 'Imagick::getImageChannelMean' => ['hasSideEffects' => false], - 'Imagick::getImageChannelRange' => ['hasSideEffects' => false], - 'Imagick::getImageChannelStatistics' => ['hasSideEffects' => false], - 'Imagick::getImageClipMask' => ['hasSideEffects' => false], - 'Imagick::getImageColormapColor' => ['hasSideEffects' => false], - 'Imagick::getImageColors' => ['hasSideEffects' => false], - 'Imagick::getImageColorspace' => ['hasSideEffects' => false], - 'Imagick::getImageCompose' => ['hasSideEffects' => false], - 'Imagick::getImageCompression' => ['hasSideEffects' => false], - 'Imagick::getImageCompressionQuality' => ['hasSideEffects' => false], - 'Imagick::getImageDelay' => ['hasSideEffects' => false], - 'Imagick::getImageDepth' => ['hasSideEffects' => false], - 'Imagick::getImageDispose' => ['hasSideEffects' => false], - 'Imagick::getImageDistortion' => ['hasSideEffects' => false], - 'Imagick::getImageExtrema' => ['hasSideEffects' => false], - 'Imagick::getImageFilename' => ['hasSideEffects' => false], - 'Imagick::getImageFormat' => ['hasSideEffects' => false], - 'Imagick::getImageGamma' => ['hasSideEffects' => false], - 'Imagick::getImageGeometry' => ['hasSideEffects' => false], - 'Imagick::getImageGravity' => ['hasSideEffects' => false], - 'Imagick::getImageGreenPrimary' => ['hasSideEffects' => false], - 'Imagick::getImageHeight' => ['hasSideEffects' => false], - 'Imagick::getImageHistogram' => ['hasSideEffects' => false], - 'Imagick::getImageIndex' => ['hasSideEffects' => false], - 'Imagick::getImageInterlaceScheme' => ['hasSideEffects' => false], - 'Imagick::getImageInterpolateMethod' => ['hasSideEffects' => false], - 'Imagick::getImageIterations' => ['hasSideEffects' => false], - 'Imagick::getImageLength' => ['hasSideEffects' => false], - 'Imagick::getImageMatte' => ['hasSideEffects' => false], - 'Imagick::getImageMatteColor' => ['hasSideEffects' => false], - 'Imagick::getImageMimeType' => ['hasSideEffects' => false], - 'Imagick::getImageOrientation' => ['hasSideEffects' => false], - 'Imagick::getImagePage' => ['hasSideEffects' => false], - 'Imagick::getImagePixelColor' => ['hasSideEffects' => false], - 'Imagick::getImageProfile' => ['hasSideEffects' => false], - 'Imagick::getImageProfiles' => ['hasSideEffects' => false], - 'Imagick::getImageProperties' => ['hasSideEffects' => false], - 'Imagick::getImageProperty' => ['hasSideEffects' => false], - 'Imagick::getImageRedPrimary' => ['hasSideEffects' => false], - 'Imagick::getImageRegion' => ['hasSideEffects' => false], - 'Imagick::getImageRenderingIntent' => ['hasSideEffects' => false], - 'Imagick::getImageResolution' => ['hasSideEffects' => false], - 'Imagick::getImageScene' => ['hasSideEffects' => false], - 'Imagick::getImageSignature' => ['hasSideEffects' => false], - 'Imagick::getImageSize' => ['hasSideEffects' => false], - 'Imagick::getImageTicksPerSecond' => ['hasSideEffects' => false], - 'Imagick::getImageTotalInkDensity' => ['hasSideEffects' => false], - 'Imagick::getImageType' => ['hasSideEffects' => false], - 'Imagick::getImageUnits' => ['hasSideEffects' => false], - 'Imagick::getImageVirtualPixelMethod' => ['hasSideEffects' => false], - 'Imagick::getImageWhitePoint' => ['hasSideEffects' => false], - 'Imagick::getImageWidth' => ['hasSideEffects' => false], - 'Imagick::getImagesBlob' => ['hasSideEffects' => false], - 'Imagick::getInterlaceScheme' => ['hasSideEffects' => false], - 'Imagick::getIteratorIndex' => ['hasSideEffects' => false], - 'Imagick::getNumberImages' => ['hasSideEffects' => false], - 'Imagick::getOption' => ['hasSideEffects' => false], - 'Imagick::getPage' => ['hasSideEffects' => false], - 'Imagick::getPixelIterator' => ['hasSideEffects' => false], - 'Imagick::getPixelRegionIterator' => ['hasSideEffects' => false], - 'Imagick::getPointSize' => ['hasSideEffects' => false], - 'Imagick::getSamplingFactors' => ['hasSideEffects' => false], - 'Imagick::getSize' => ['hasSideEffects' => false], - 'Imagick::getSizeOffset' => ['hasSideEffects' => false], - 'ImagickDraw::getBorderColor' => ['hasSideEffects' => false], - 'ImagickDraw::getClipPath' => ['hasSideEffects' => false], - 'ImagickDraw::getClipRule' => ['hasSideEffects' => false], - 'ImagickDraw::getClipUnits' => ['hasSideEffects' => false], - 'ImagickDraw::getDensity' => ['hasSideEffects' => false], - 'ImagickDraw::getFillColor' => ['hasSideEffects' => false], - 'ImagickDraw::getFillOpacity' => ['hasSideEffects' => false], - 'ImagickDraw::getFillRule' => ['hasSideEffects' => false], - 'ImagickDraw::getFont' => ['hasSideEffects' => false], - 'ImagickDraw::getFontFamily' => ['hasSideEffects' => false], - 'ImagickDraw::getFontResolution' => ['hasSideEffects' => false], - 'ImagickDraw::getFontSize' => ['hasSideEffects' => false], - 'ImagickDraw::getFontStretch' => ['hasSideEffects' => false], - 'ImagickDraw::getFontStyle' => ['hasSideEffects' => false], - 'ImagickDraw::getFontWeight' => ['hasSideEffects' => false], - 'ImagickDraw::getGravity' => ['hasSideEffects' => false], - 'ImagickDraw::getOpacity' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeAntialias' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeColor' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeDashArray' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeDashOffset' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeLineCap' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeLineJoin' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeMiterLimit' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeOpacity' => ['hasSideEffects' => false], - 'ImagickDraw::getStrokeWidth' => ['hasSideEffects' => false], - 'ImagickDraw::getTextAlignment' => ['hasSideEffects' => false], - 'ImagickDraw::getTextAntialias' => ['hasSideEffects' => false], - 'ImagickDraw::getTextDecoration' => ['hasSideEffects' => false], - 'ImagickDraw::getTextDirection' => ['hasSideEffects' => false], - 'ImagickDraw::getTextEncoding' => ['hasSideEffects' => false], - 'ImagickDraw::getTextInterLineSpacing' => ['hasSideEffects' => false], - 'ImagickDraw::getTextInterWordSpacing' => ['hasSideEffects' => false], - 'ImagickDraw::getTextKerning' => ['hasSideEffects' => false], - 'ImagickDraw::getTextUnderColor' => ['hasSideEffects' => false], - 'ImagickDraw::getVectorGraphics' => ['hasSideEffects' => false], - 'ImagickKernel::getMatrix' => ['hasSideEffects' => false], - 'ImagickPixel::getColor' => ['hasSideEffects' => false], - 'ImagickPixel::getColorAsString' => ['hasSideEffects' => false], - 'ImagickPixel::getColorCount' => ['hasSideEffects' => false], - 'ImagickPixel::getColorQuantum' => ['hasSideEffects' => false], - 'ImagickPixel::getColorValue' => ['hasSideEffects' => false], - 'ImagickPixel::getColorValueQuantum' => ['hasSideEffects' => false], - 'ImagickPixel::getHSL' => ['hasSideEffects' => false], - 'ImagickPixel::getIndex' => ['hasSideEffects' => false], - 'ImagickPixelIterator::getCurrentIteratorRow' => ['hasSideEffects' => false], - 'ImagickPixelIterator::getIteratorRow' => ['hasSideEffects' => false], - 'ImagickPixelIterator::getNextIteratorRow' => ['hasSideEffects' => false], - 'ImagickPixelIterator::getPreviousIteratorRow' => ['hasSideEffects' => false], - 'IntBackedEnum::from' => ['hasSideEffects' => false], - 'IntBackedEnum::tryFrom' => ['hasSideEffects' => false], - 'IntlBreakIterator::current' => ['hasSideEffects' => false], - 'IntlBreakIterator::getErrorCode' => ['hasSideEffects' => false], - 'IntlBreakIterator::getErrorMessage' => ['hasSideEffects' => false], - 'IntlBreakIterator::getIterator' => ['hasSideEffects' => false], - 'IntlBreakIterator::getLocale' => ['hasSideEffects' => false], - 'IntlBreakIterator::getPartsIterator' => ['hasSideEffects' => false], - 'IntlBreakIterator::getText' => ['hasSideEffects' => false], - 'IntlBreakIterator::isBoundary' => ['hasSideEffects' => false], - 'IntlCalendar::after' => ['hasSideEffects' => false], - 'IntlCalendar::before' => ['hasSideEffects' => false], - 'IntlCalendar::equals' => ['hasSideEffects' => false], - 'IntlCalendar::fieldDifference' => ['hasSideEffects' => false], - 'IntlCalendar::get' => ['hasSideEffects' => false], - 'IntlCalendar::getActualMaximum' => ['hasSideEffects' => false], - 'IntlCalendar::getActualMinimum' => ['hasSideEffects' => false], - 'IntlCalendar::getDayOfWeekType' => ['hasSideEffects' => false], - 'IntlCalendar::getErrorCode' => ['hasSideEffects' => false], - 'IntlCalendar::getErrorMessage' => ['hasSideEffects' => false], - 'IntlCalendar::getFirstDayOfWeek' => ['hasSideEffects' => false], - 'IntlCalendar::getGreatestMinimum' => ['hasSideEffects' => false], - 'IntlCalendar::getLeastMaximum' => ['hasSideEffects' => false], - 'IntlCalendar::getLocale' => ['hasSideEffects' => false], - 'IntlCalendar::getMaximum' => ['hasSideEffects' => false], - 'IntlCalendar::getMinimalDaysInFirstWeek' => ['hasSideEffects' => false], - 'IntlCalendar::getMinimum' => ['hasSideEffects' => false], - 'IntlCalendar::getRepeatedWallTimeOption' => ['hasSideEffects' => false], - 'IntlCalendar::getSkippedWallTimeOption' => ['hasSideEffects' => false], - 'IntlCalendar::getTime' => ['hasSideEffects' => false], - 'IntlCalendar::getTimeZone' => ['hasSideEffects' => false], - 'IntlCalendar::getType' => ['hasSideEffects' => false], - 'IntlCalendar::getWeekendTransition' => ['hasSideEffects' => false], - 'IntlCalendar::inDaylightTime' => ['hasSideEffects' => false], - 'IntlCalendar::isEquivalentTo' => ['hasSideEffects' => false], - 'IntlCalendar::isLenient' => ['hasSideEffects' => false], - 'IntlCalendar::isWeekend' => ['hasSideEffects' => false], - 'IntlCalendar::toDateTime' => ['hasSideEffects' => false], - 'IntlChar::hasBinaryProperty' => ['hasSideEffects' => false], - 'IntlCodePointBreakIterator::getLastCodePoint' => ['hasSideEffects' => false], - 'IntlDateFormatter::__construct' => ['hasSideEffects' => false], - 'IntlDateFormatter::getCalendar' => ['hasSideEffects' => false], - 'IntlDateFormatter::getCalendarObject' => ['hasSideEffects' => false], - 'IntlDateFormatter::getDateType' => ['hasSideEffects' => false], - 'IntlDateFormatter::getErrorCode' => ['hasSideEffects' => false], - 'IntlDateFormatter::getErrorMessage' => ['hasSideEffects' => false], - 'IntlDateFormatter::getLocale' => ['hasSideEffects' => false], - 'IntlDateFormatter::getPattern' => ['hasSideEffects' => false], - 'IntlDateFormatter::getTimeType' => ['hasSideEffects' => false], - 'IntlDateFormatter::getTimeZone' => ['hasSideEffects' => false], - 'IntlDateFormatter::getTimeZoneId' => ['hasSideEffects' => false], - 'IntlDateFormatter::isLenient' => ['hasSideEffects' => false], - 'IntlGregorianCalendar::getGregorianChange' => ['hasSideEffects' => false], - 'IntlGregorianCalendar::isLeapYear' => ['hasSideEffects' => false], - 'IntlPartsIterator::getBreakIterator' => ['hasSideEffects' => false], - 'IntlRuleBasedBreakIterator::__construct' => ['hasSideEffects' => false], - 'IntlRuleBasedBreakIterator::getBinaryRules' => ['hasSideEffects' => false], - 'IntlRuleBasedBreakIterator::getRuleStatus' => ['hasSideEffects' => false], - 'IntlRuleBasedBreakIterator::getRuleStatusVec' => ['hasSideEffects' => false], - 'IntlRuleBasedBreakIterator::getRules' => ['hasSideEffects' => false], - 'IntlTimeZone::getDSTSavings' => ['hasSideEffects' => false], - 'IntlTimeZone::getDisplayName' => ['hasSideEffects' => false], - 'IntlTimeZone::getErrorCode' => ['hasSideEffects' => false], - 'IntlTimeZone::getErrorMessage' => ['hasSideEffects' => false], - 'IntlTimeZone::getID' => ['hasSideEffects' => false], - 'IntlTimeZone::getRawOffset' => ['hasSideEffects' => false], - 'IntlTimeZone::hasSameRules' => ['hasSideEffects' => false], - 'IntlTimeZone::toDateTimeZone' => ['hasSideEffects' => false], - 'JsonIncrementalParser::__construct' => ['hasSideEffects' => false], - 'JsonIncrementalParser::get' => ['hasSideEffects' => false], - 'JsonIncrementalParser::getError' => ['hasSideEffects' => false], - 'MemcachedException::__construct' => ['hasSideEffects' => false], - 'MessageFormatter::__construct' => ['hasSideEffects' => false], - 'MessageFormatter::format' => ['hasSideEffects' => false], - 'MessageFormatter::getErrorCode' => ['hasSideEffects' => false], - 'MessageFormatter::getErrorMessage' => ['hasSideEffects' => false], - 'MessageFormatter::getLocale' => ['hasSideEffects' => false], - 'MessageFormatter::getPattern' => ['hasSideEffects' => false], - 'MessageFormatter::parse' => ['hasSideEffects' => false], - 'NumberFormatter::__construct' => ['hasSideEffects' => false], - 'NumberFormatter::format' => ['hasSideEffects' => false], - 'NumberFormatter::formatCurrency' => ['hasSideEffects' => false], - 'NumberFormatter::getAttribute' => ['hasSideEffects' => false], - 'NumberFormatter::getErrorCode' => ['hasSideEffects' => false], - 'NumberFormatter::getErrorMessage' => ['hasSideEffects' => false], - 'NumberFormatter::getLocale' => ['hasSideEffects' => false], - 'NumberFormatter::getPattern' => ['hasSideEffects' => false], - 'NumberFormatter::getSymbol' => ['hasSideEffects' => false], - 'NumberFormatter::getTextAttribute' => ['hasSideEffects' => false], - 'ReflectionAttribute::getArguments' => ['hasSideEffects' => false], - 'ReflectionAttribute::getName' => ['hasSideEffects' => false], - 'ReflectionAttribute::getTarget' => ['hasSideEffects' => false], - 'ReflectionAttribute::isRepeated' => ['hasSideEffects' => false], - 'ReflectionClass::getAttributes' => ['hasSideEffects' => false], - 'ReflectionClass::getConstant' => ['hasSideEffects' => false], - 'ReflectionClass::getConstants' => ['hasSideEffects' => false], - 'ReflectionClass::getConstructor' => ['hasSideEffects' => false], - 'ReflectionClass::getDefaultProperties' => ['hasSideEffects' => false], - 'ReflectionClass::getDocComment' => ['hasSideEffects' => false], - 'ReflectionClass::getEndLine' => ['hasSideEffects' => false], - 'ReflectionClass::getExtension' => ['hasSideEffects' => false], - 'ReflectionClass::getExtensionName' => ['hasSideEffects' => false], - 'ReflectionClass::getFileName' => ['hasSideEffects' => false], - 'ReflectionClass::getInterfaceNames' => ['hasSideEffects' => false], - 'ReflectionClass::getInterfaces' => ['hasSideEffects' => false], - 'ReflectionClass::getMethod' => ['hasSideEffects' => false], - 'ReflectionClass::getMethods' => ['hasSideEffects' => false], - 'ReflectionClass::getModifiers' => ['hasSideEffects' => false], - 'ReflectionClass::getName' => ['hasSideEffects' => false], - 'ReflectionClass::getNamespaceName' => ['hasSideEffects' => false], - 'ReflectionClass::getParentClass' => ['hasSideEffects' => false], - 'ReflectionClass::getProperties' => ['hasSideEffects' => false], - 'ReflectionClass::getProperty' => ['hasSideEffects' => false], - 'ReflectionClass::getReflectionConstant' => ['hasSideEffects' => false], - 'ReflectionClass::getReflectionConstants' => ['hasSideEffects' => false], - 'ReflectionClass::getShortName' => ['hasSideEffects' => false], - 'ReflectionClass::getStartLine' => ['hasSideEffects' => false], - 'ReflectionClass::getStaticProperties' => ['hasSideEffects' => false], - 'ReflectionClass::getStaticPropertyValue' => ['hasSideEffects' => false], - 'ReflectionClass::getTraitAliases' => ['hasSideEffects' => false], - 'ReflectionClass::getTraitNames' => ['hasSideEffects' => false], - 'ReflectionClass::getTraits' => ['hasSideEffects' => false], - 'ReflectionClass::isAbstract' => ['hasSideEffects' => false], - 'ReflectionClass::isAnonymous' => ['hasSideEffects' => false], - 'ReflectionClass::isCloneable' => ['hasSideEffects' => false], - 'ReflectionClass::isFinal' => ['hasSideEffects' => false], - 'ReflectionClass::isInstance' => ['hasSideEffects' => false], - 'ReflectionClass::isInstantiable' => ['hasSideEffects' => false], - 'ReflectionClass::isInterface' => ['hasSideEffects' => false], - 'ReflectionClass::isInternal' => ['hasSideEffects' => false], - 'ReflectionClass::isIterable' => ['hasSideEffects' => false], - 'ReflectionClass::isIterateable' => ['hasSideEffects' => false], - 'ReflectionClass::isReadOnly' => ['hasSideEffects' => false], - 'ReflectionClass::isSubclassOf' => ['hasSideEffects' => false], - 'ReflectionClass::isTrait' => ['hasSideEffects' => false], - 'ReflectionClass::isUserDefined' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getAttributes' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getDeclaringClass' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getDocComment' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getModifiers' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getName' => ['hasSideEffects' => false], - 'ReflectionClassConstant::getValue' => ['hasSideEffects' => false], - 'ReflectionClassConstant::isPrivate' => ['hasSideEffects' => false], - 'ReflectionClassConstant::isProtected' => ['hasSideEffects' => false], - 'ReflectionClassConstant::isPublic' => ['hasSideEffects' => false], - 'ReflectionEnumBackedCase::getBackingValue' => ['hasSideEffects' => false], - 'ReflectionEnumUnitCase::getEnum' => ['hasSideEffects' => false], - 'ReflectionEnumUnitCase::getValue' => ['hasSideEffects' => false], - 'ReflectionExtension::getClassNames' => ['hasSideEffects' => false], - 'ReflectionExtension::getClasses' => ['hasSideEffects' => false], - 'ReflectionExtension::getConstants' => ['hasSideEffects' => false], - 'ReflectionExtension::getDependencies' => ['hasSideEffects' => false], - 'ReflectionExtension::getFunctions' => ['hasSideEffects' => false], - 'ReflectionExtension::getINIEntries' => ['hasSideEffects' => false], - 'ReflectionExtension::getName' => ['hasSideEffects' => false], - 'ReflectionExtension::getVersion' => ['hasSideEffects' => false], - 'ReflectionExtension::isPersistent' => ['hasSideEffects' => false], - 'ReflectionExtension::isTemporary' => ['hasSideEffects' => false], - 'ReflectionFunction::getClosure' => ['hasSideEffects' => false], - 'ReflectionFunction::isDisabled' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getAttributes' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getClosureCalledClass' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getClosureScopeClass' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getClosureThis' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getClosureUsedVariables' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getDocComment' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getEndLine' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getExtension' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getExtensionName' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getFileName' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getName' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getNamespaceName' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getNumberOfParameters' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getNumberOfRequiredParameters' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getParameters' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getReturnType' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getShortName' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getStartLine' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getStaticVariables' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::getTentativeReturnType' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::hasTentativeReturnType' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isClosure' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isDeprecated' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isGenerator' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isInternal' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isStatic' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isUserDefined' => ['hasSideEffects' => false], - 'ReflectionFunctionAbstract::isVariadic' => ['hasSideEffects' => false], - 'ReflectionGenerator::getExecutingFile' => ['hasSideEffects' => false], - 'ReflectionGenerator::getExecutingGenerator' => ['hasSideEffects' => false], - 'ReflectionGenerator::getExecutingLine' => ['hasSideEffects' => false], - 'ReflectionGenerator::getFunction' => ['hasSideEffects' => false], - 'ReflectionGenerator::getThis' => ['hasSideEffects' => false], - 'ReflectionGenerator::getTrace' => ['hasSideEffects' => false], - 'ReflectionIntersectionType::getTypes' => ['hasSideEffects' => false], - 'ReflectionMethod::getClosure' => ['hasSideEffects' => false], - 'ReflectionMethod::getDeclaringClass' => ['hasSideEffects' => false], - 'ReflectionMethod::getModifiers' => ['hasSideEffects' => false], - 'ReflectionMethod::getPrototype' => ['hasSideEffects' => false], - 'ReflectionMethod::isAbstract' => ['hasSideEffects' => false], - 'ReflectionMethod::isConstructor' => ['hasSideEffects' => false], - 'ReflectionMethod::isDestructor' => ['hasSideEffects' => false], - 'ReflectionMethod::isFinal' => ['hasSideEffects' => false], - 'ReflectionMethod::isPrivate' => ['hasSideEffects' => false], - 'ReflectionMethod::isProtected' => ['hasSideEffects' => false], - 'ReflectionMethod::isPublic' => ['hasSideEffects' => false], - 'ReflectionMethod::isStatic' => ['hasSideEffects' => false], - 'ReflectionMethod::setAccessible' => ['hasSideEffects' => false], - 'ReflectionNamedType::getName' => ['hasSideEffects' => false], - 'ReflectionNamedType::isBuiltin' => ['hasSideEffects' => false], - 'ReflectionParameter::getAttributes' => ['hasSideEffects' => false], - 'ReflectionParameter::getClass' => ['hasSideEffects' => false], - 'ReflectionParameter::getDeclaringClass' => ['hasSideEffects' => false], - 'ReflectionParameter::getDeclaringFunction' => ['hasSideEffects' => false], - 'ReflectionParameter::getDefaultValue' => ['hasSideEffects' => false], - 'ReflectionParameter::getDefaultValueConstantName' => ['hasSideEffects' => false], - 'ReflectionParameter::getName' => ['hasSideEffects' => false], - 'ReflectionParameter::getPosition' => ['hasSideEffects' => false], - 'ReflectionParameter::getType' => ['hasSideEffects' => false], - 'ReflectionParameter::isArray' => ['hasSideEffects' => false], - 'ReflectionParameter::isCallable' => ['hasSideEffects' => false], - 'ReflectionParameter::isDefaultValueAvailable' => ['hasSideEffects' => false], - 'ReflectionParameter::isDefaultValueConstant' => ['hasSideEffects' => false], - 'ReflectionParameter::isOptional' => ['hasSideEffects' => false], - 'ReflectionParameter::isPassedByReference' => ['hasSideEffects' => false], - 'ReflectionParameter::isPromoted' => ['hasSideEffects' => false], - 'ReflectionParameter::isVariadic' => ['hasSideEffects' => false], - 'ReflectionProperty::getAttributes' => ['hasSideEffects' => false], - 'ReflectionProperty::getDeclaringClass' => ['hasSideEffects' => false], - 'ReflectionProperty::getDefaultValue' => ['hasSideEffects' => false], - 'ReflectionProperty::getDocComment' => ['hasSideEffects' => false], - 'ReflectionProperty::getModifiers' => ['hasSideEffects' => false], - 'ReflectionProperty::getName' => ['hasSideEffects' => false], - 'ReflectionProperty::getType' => ['hasSideEffects' => false], - 'ReflectionProperty::getValue' => ['hasSideEffects' => false], - 'ReflectionProperty::isDefault' => ['hasSideEffects' => false], - 'ReflectionProperty::isInitialized' => ['hasSideEffects' => false], - 'ReflectionProperty::isPrivate' => ['hasSideEffects' => false], - 'ReflectionProperty::isPromoted' => ['hasSideEffects' => false], - 'ReflectionProperty::isProtected' => ['hasSideEffects' => false], - 'ReflectionProperty::isPublic' => ['hasSideEffects' => false], - 'ReflectionProperty::isStatic' => ['hasSideEffects' => false], - 'ReflectionProperty::setAccessible' => ['hasSideEffects' => false], - 'ReflectionReference::getId' => ['hasSideEffects' => false], - 'ReflectionType::isBuiltin' => ['hasSideEffects' => false], - 'ReflectionUnionType::getTypes' => ['hasSideEffects' => false], - 'ReflectionZendExtension::getAuthor' => ['hasSideEffects' => false], - 'ReflectionZendExtension::getCopyright' => ['hasSideEffects' => false], - 'ReflectionZendExtension::getName' => ['hasSideEffects' => false], - 'ReflectionZendExtension::getURL' => ['hasSideEffects' => false], - 'ReflectionZendExtension::getVersion' => ['hasSideEffects' => false], - 'ResourceBundle::__construct' => ['hasSideEffects' => false], - 'ResourceBundle::count' => ['hasSideEffects' => false], - 'ResourceBundle::get' => ['hasSideEffects' => false], - 'ResourceBundle::getErrorCode' => ['hasSideEffects' => false], - 'ResourceBundle::getErrorMessage' => ['hasSideEffects' => false], - 'ResourceBundle::getIterator' => ['hasSideEffects' => false], - 'SQLiteException::__construct' => ['hasSideEffects' => false], - 'SimpleXMLElement::__construct' => ['hasSideEffects' => false], - 'SimpleXMLElement::children' => ['hasSideEffects' => false], - 'SimpleXMLElement::count' => ['hasSideEffects' => false], - 'SimpleXMLElement::current' => ['hasSideEffects' => false], - 'SimpleXMLElement::getChildren' => ['hasSideEffects' => false], - 'SimpleXMLElement::getDocNamespaces' => ['hasSideEffects' => false], - 'SimpleXMLElement::getName' => ['hasSideEffects' => false], - 'SimpleXMLElement::getNamespaces' => ['hasSideEffects' => false], - 'SimpleXMLElement::hasChildren' => ['hasSideEffects' => false], - 'SimpleXMLElement::offsetExists' => ['hasSideEffects' => false], - 'SimpleXMLElement::offsetGet' => ['hasSideEffects' => false], - 'SimpleXMLElement::valid' => ['hasSideEffects' => false], - 'SimpleXMLIterator::count' => ['hasSideEffects' => false], - 'SimpleXMLIterator::current' => ['hasSideEffects' => false], - 'SimpleXMLIterator::getChildren' => ['hasSideEffects' => false], - 'SimpleXMLIterator::hasChildren' => ['hasSideEffects' => false], - 'SimpleXMLIterator::valid' => ['hasSideEffects' => false], - 'SoapFault::__construct' => ['hasSideEffects' => false], - 'SplFileObject::fflush' => ['hasSideEffects' => true], - 'SplFileObject::fgetc' => ['hasSideEffects' => true], - 'SplFileObject::fgetcsv' => ['hasSideEffects' => true], - 'SplFileObject::fgets' => ['hasSideEffects' => true], - 'SplFileObject::fgetss' => ['hasSideEffects' => true], - 'SplFileObject::fpassthru' => ['hasSideEffects' => true], - 'SplFileObject::fputcsv' => ['hasSideEffects' => true], - 'SplFileObject::fread' => ['hasSideEffects' => true], - 'SplFileObject::fscanf' => ['hasSideEffects' => true], - 'SplFileObject::fseek' => ['hasSideEffects' => true], - 'SplFileObject::ftruncate' => ['hasSideEffects' => true], - 'SplFileObject::fwrite' => ['hasSideEffects' => true], - 'Spoofchecker::__construct' => ['hasSideEffects' => false], - 'StringBackedEnum::from' => ['hasSideEffects' => false], - 'StringBackedEnum::tryFrom' => ['hasSideEffects' => false], - 'StubTests\\CodeStyle\\BracesOneLineFixer::getDefinition' => ['hasSideEffects' => false], - 'StubTests\\Parsers\\ExpectedFunctionArgumentsInfo::__toString' => ['hasSideEffects' => false], - 'StubTests\\Parsers\\Visitors\\CoreStubASTVisitor::__construct' => ['hasSideEffects' => false], - 'StubTests\\StubsMetaExpectedArgumentsTest::getClassMemberFqn' => ['hasSideEffects' => false], - 'StubTests\\StubsParameterNamesTest::printParameters' => ['hasSideEffects' => false], - 'Transliterator::createInverse' => ['hasSideEffects' => false], - 'Transliterator::getErrorCode' => ['hasSideEffects' => false], - 'Transliterator::getErrorMessage' => ['hasSideEffects' => false], - 'Transliterator::transliterate' => ['hasSideEffects' => false], - 'UConverter::__construct' => ['hasSideEffects' => false], - 'UConverter::convert' => ['hasSideEffects' => false], - 'UConverter::getDestinationEncoding' => ['hasSideEffects' => false], - 'UConverter::getDestinationType' => ['hasSideEffects' => false], - 'UConverter::getErrorCode' => ['hasSideEffects' => false], - 'UConverter::getErrorMessage' => ['hasSideEffects' => false], - 'UConverter::getSourceEncoding' => ['hasSideEffects' => false], - 'UConverter::getSourceType' => ['hasSideEffects' => false], - 'UConverter::getStandards' => ['hasSideEffects' => false], - 'UConverter::getSubstChars' => ['hasSideEffects' => false], - 'UConverter::reasonText' => ['hasSideEffects' => false], - 'UnitEnum::cases' => ['hasSideEffects' => false], - 'WeakMap::count' => ['hasSideEffects' => false], - 'WeakMap::getIterator' => ['hasSideEffects' => false], - 'WeakMap::offsetExists' => ['hasSideEffects' => false], - 'WeakMap::offsetGet' => ['hasSideEffects' => false], - 'WeakReference::create' => ['hasSideEffects' => false], - 'WeakReference::get' => ['hasSideEffects' => false], - 'XmlReader::next' => ['hasSideEffects' => true], - 'XmlReader::read' => ['hasSideEffects' => true], - 'Zookeeper::getAcl' => ['hasSideEffects' => false], - 'Zookeeper::getChildren' => ['hasSideEffects' => false], - 'Zookeeper::getClientId' => ['hasSideEffects' => false], - 'Zookeeper::getRecvTimeout' => ['hasSideEffects' => false], - 'Zookeeper::getState' => ['hasSideEffects' => false], - '_' => ['hasSideEffects' => false], - 'abs' => ['hasSideEffects' => false], - 'acos' => ['hasSideEffects' => false], - 'acosh' => ['hasSideEffects' => false], - 'addcslashes' => ['hasSideEffects' => false], - 'addslashes' => ['hasSideEffects' => false], - 'apache_get_modules' => ['hasSideEffects' => false], - 'apache_get_version' => ['hasSideEffects' => false], - 'apache_getenv' => ['hasSideEffects' => false], - 'apache_request_headers' => ['hasSideEffects' => false], - 'array_change_key_case' => ['hasSideEffects' => false], - 'array_chunk' => ['hasSideEffects' => false], - 'array_column' => ['hasSideEffects' => false], - 'array_combine' => ['hasSideEffects' => false], - 'array_count_values' => ['hasSideEffects' => false], - 'array_diff' => ['hasSideEffects' => false], - 'array_diff_assoc' => ['hasSideEffects' => false], - 'array_diff_key' => ['hasSideEffects' => false], - 'array_diff_uassoc' => ['hasSideEffects' => false], - 'array_diff_ukey' => ['hasSideEffects' => false], - 'array_fill' => ['hasSideEffects' => false], - 'array_fill_keys' => ['hasSideEffects' => false], - 'array_flip' => ['hasSideEffects' => false], - 'array_intersect' => ['hasSideEffects' => false], - 'array_intersect_assoc' => ['hasSideEffects' => false], - 'array_intersect_key' => ['hasSideEffects' => false], - 'array_intersect_uassoc' => ['hasSideEffects' => false], - 'array_intersect_ukey' => ['hasSideEffects' => false], - 'array_is_list' => ['hasSideEffects' => false], - 'array_key_exists' => ['hasSideEffects' => false], - 'array_key_first' => ['hasSideEffects' => false], - 'array_key_last' => ['hasSideEffects' => false], - 'array_keys' => ['hasSideEffects' => false], - 'array_merge' => ['hasSideEffects' => false], - 'array_merge_recursive' => ['hasSideEffects' => false], - 'array_pad' => ['hasSideEffects' => false], - 'array_pop' => ['hasSideEffects' => true], - 'array_product' => ['hasSideEffects' => false], - 'array_push' => ['hasSideEffects' => true], - 'array_rand' => ['hasSideEffects' => false], - 'array_replace' => ['hasSideEffects' => false], - 'array_replace_recursive' => ['hasSideEffects' => false], - 'array_reverse' => ['hasSideEffects' => false], - 'array_search' => ['hasSideEffects' => false], - 'array_shift' => ['hasSideEffects' => true], - 'array_slice' => ['hasSideEffects' => false], - 'array_sum' => ['hasSideEffects' => false], - 'array_udiff' => ['hasSideEffects' => false], - 'array_udiff_assoc' => ['hasSideEffects' => false], - 'array_udiff_uassoc' => ['hasSideEffects' => false], - 'array_uintersect' => ['hasSideEffects' => false], - 'array_uintersect_assoc' => ['hasSideEffects' => false], - 'array_uintersect_uassoc' => ['hasSideEffects' => false], - 'array_unique' => ['hasSideEffects' => false], - 'array_unshift' => ['hasSideEffects' => true], - 'array_values' => ['hasSideEffects' => false], - 'asin' => ['hasSideEffects' => false], - 'asinh' => ['hasSideEffects' => false], - 'atan' => ['hasSideEffects' => false], - 'atan2' => ['hasSideEffects' => false], - 'atanh' => ['hasSideEffects' => false], - 'base64_decode' => ['hasSideEffects' => false], - 'base64_encode' => ['hasSideEffects' => false], - 'base_convert' => ['hasSideEffects' => false], - 'basename' => ['hasSideEffects' => false], - 'bcadd' => ['hasSideEffects' => false], - 'bccomp' => ['hasSideEffects' => false], - 'bcdiv' => ['hasSideEffects' => false], - 'bcmod' => ['hasSideEffects' => false], - 'bcmul' => ['hasSideEffects' => false], - 'bcpow' => ['hasSideEffects' => false], - 'bcpowmod' => ['hasSideEffects' => false], - 'bcsqrt' => ['hasSideEffects' => false], - 'bcsub' => ['hasSideEffects' => false], - 'bin2hex' => ['hasSideEffects' => false], - 'bindec' => ['hasSideEffects' => false], - 'boolval' => ['hasSideEffects' => false], - 'bzcompress' => ['hasSideEffects' => false], - 'bzdecompress' => ['hasSideEffects' => false], - 'bzerrno' => ['hasSideEffects' => false], - 'bzerror' => ['hasSideEffects' => false], - 'bzerrstr' => ['hasSideEffects' => false], - 'bzopen' => ['hasSideEffects' => false], - 'ceil' => ['hasSideEffects' => false], - 'checkdate' => ['hasSideEffects' => false], - 'checkdnsrr' => ['hasSideEffects' => false], - 'chgrp' => ['hasSideEffects' => true], - 'chmod' => ['hasSideEffects' => true], - 'chop' => ['hasSideEffects' => false], - 'chown' => ['hasSideEffects' => true], - 'chr' => ['hasSideEffects' => false], - 'chunk_split' => ['hasSideEffects' => false], - 'class_implements' => ['hasSideEffects' => false], - 'class_parents' => ['hasSideEffects' => false], - 'cli_get_process_title' => ['hasSideEffects' => false], - 'collator_compare' => ['hasSideEffects' => false], - 'collator_create' => ['hasSideEffects' => false], - 'collator_get_attribute' => ['hasSideEffects' => false], - 'collator_get_error_code' => ['hasSideEffects' => false], - 'collator_get_error_message' => ['hasSideEffects' => false], - 'collator_get_locale' => ['hasSideEffects' => false], - 'collator_get_sort_key' => ['hasSideEffects' => false], - 'collator_get_strength' => ['hasSideEffects' => false], - 'compact' => ['hasSideEffects' => false], - 'connection_aborted' => ['hasSideEffects' => true], - 'connection_status' => ['hasSideEffects' => true], - 'constant' => ['hasSideEffects' => false], - 'convert_cyr_string' => ['hasSideEffects' => false], - 'convert_uudecode' => ['hasSideEffects' => false], - 'convert_uuencode' => ['hasSideEffects' => false], - 'copy' => ['hasSideEffects' => true], - 'cos' => ['hasSideEffects' => false], - 'cosh' => ['hasSideEffects' => false], - 'count' => ['hasSideEffects' => false], - 'count_chars' => ['hasSideEffects' => false], - 'crc32' => ['hasSideEffects' => false], - 'crypt' => ['hasSideEffects' => false], - 'ctype_alnum' => ['hasSideEffects' => false], - 'ctype_alpha' => ['hasSideEffects' => false], - 'ctype_cntrl' => ['hasSideEffects' => false], - 'ctype_digit' => ['hasSideEffects' => false], - 'ctype_graph' => ['hasSideEffects' => false], - 'ctype_lower' => ['hasSideEffects' => false], - 'ctype_print' => ['hasSideEffects' => false], - 'ctype_punct' => ['hasSideEffects' => false], - 'ctype_space' => ['hasSideEffects' => false], - 'ctype_upper' => ['hasSideEffects' => false], - 'ctype_xdigit' => ['hasSideEffects' => false], - 'curl_copy_handle' => ['hasSideEffects' => false], - 'curl_errno' => ['hasSideEffects' => false], - 'curl_error' => ['hasSideEffects' => false], - 'curl_escape' => ['hasSideEffects' => false], - 'curl_file_create' => ['hasSideEffects' => false], - 'curl_getinfo' => ['hasSideEffects' => false], - 'curl_multi_errno' => ['hasSideEffects' => false], - 'curl_multi_getcontent' => ['hasSideEffects' => false], - 'curl_multi_info_read' => ['hasSideEffects' => false], - 'curl_share_errno' => ['hasSideEffects' => false], - 'curl_share_strerror' => ['hasSideEffects' => false], - 'curl_strerror' => ['hasSideEffects' => false], - 'curl_unescape' => ['hasSideEffects' => false], - 'curl_version' => ['hasSideEffects' => false], - 'current' => ['hasSideEffects' => false], - 'date' => ['hasSideEffects' => false], - 'date_create' => ['hasSideEffects' => false], - 'date_create_from_format' => ['hasSideEffects' => false], - 'date_create_immutable' => ['hasSideEffects' => false], - 'date_create_immutable_from_format' => ['hasSideEffects' => false], - 'date_default_timezone_get' => ['hasSideEffects' => false], - 'date_diff' => ['hasSideEffects' => false], - 'date_format' => ['hasSideEffects' => false], - 'date_get_last_errors' => ['hasSideEffects' => false], - 'date_interval_create_from_date_string' => ['hasSideEffects' => false], - 'date_interval_format' => ['hasSideEffects' => false], - 'date_offset_get' => ['hasSideEffects' => false], - 'date_parse' => ['hasSideEffects' => false], - 'date_parse_from_format' => ['hasSideEffects' => false], - 'date_sun_info' => ['hasSideEffects' => false], - 'date_sunrise' => ['hasSideEffects' => false], - 'date_sunset' => ['hasSideEffects' => false], - 'date_timestamp_get' => ['hasSideEffects' => false], - 'date_timezone_get' => ['hasSideEffects' => false], - 'datefmt_create' => ['hasSideEffects' => false], - 'datefmt_format' => ['hasSideEffects' => false], - 'datefmt_format_object' => ['hasSideEffects' => false], - 'datefmt_get_calendar' => ['hasSideEffects' => false], - 'datefmt_get_calendar_object' => ['hasSideEffects' => false], - 'datefmt_get_datetype' => ['hasSideEffects' => false], - 'datefmt_get_error_code' => ['hasSideEffects' => false], - 'datefmt_get_error_message' => ['hasSideEffects' => false], - 'datefmt_get_locale' => ['hasSideEffects' => false], - 'datefmt_get_pattern' => ['hasSideEffects' => false], - 'datefmt_get_timetype' => ['hasSideEffects' => false], - 'datefmt_get_timezone' => ['hasSideEffects' => false], - 'datefmt_get_timezone_id' => ['hasSideEffects' => false], - 'datefmt_is_lenient' => ['hasSideEffects' => false], - 'dcngettext' => ['hasSideEffects' => false], - 'decbin' => ['hasSideEffects' => false], - 'dechex' => ['hasSideEffects' => false], - 'decoct' => ['hasSideEffects' => false], - 'defined' => ['hasSideEffects' => false], - 'deflate_init' => ['hasSideEffects' => false], - 'deg2rad' => ['hasSideEffects' => false], - 'dirname' => ['hasSideEffects' => false], - 'disk_free_space' => ['hasSideEffects' => false], - 'disk_total_space' => ['hasSideEffects' => false], - 'diskfreespace' => ['hasSideEffects' => false], - 'dngettext' => ['hasSideEffects' => false], - 'doubleval' => ['hasSideEffects' => false], - 'error_get_last' => ['hasSideEffects' => false], - 'error_log' => ['hasSideEffects' => true], - 'escapeshellarg' => ['hasSideEffects' => false], - 'escapeshellcmd' => ['hasSideEffects' => false], - 'exp' => ['hasSideEffects' => false], - 'explode' => ['hasSideEffects' => false], - 'expm1' => ['hasSideEffects' => false], - 'extension_loaded' => ['hasSideEffects' => false], - 'fclose' => ['hasSideEffects' => true], - 'fdiv' => ['hasSideEffects' => false], - 'feof' => ['hasSideEffects' => false], - 'fflush' => ['hasSideEffects' => true], - 'fgetc' => ['hasSideEffects' => true], - 'fgetcsv' => ['hasSideEffects' => true], - 'fgets' => ['hasSideEffects' => true], - 'fgetss' => ['hasSideEffects' => true], - 'file' => ['hasSideEffects' => false], - 'file_exists' => ['hasSideEffects' => false], - 'file_get_contents' => ['hasSideEffects' => true], - 'file_put_contents' => ['hasSideEffects' => true], - 'fileatime' => ['hasSideEffects' => false], - 'filectime' => ['hasSideEffects' => false], - 'filegroup' => ['hasSideEffects' => false], - 'fileinode' => ['hasSideEffects' => false], - 'filemtime' => ['hasSideEffects' => false], - 'fileowner' => ['hasSideEffects' => false], - 'fileperms' => ['hasSideEffects' => false], - 'filesize' => ['hasSideEffects' => false], - 'filetype' => ['hasSideEffects' => false], - 'filter_has_var' => ['hasSideEffects' => false], - 'filter_id' => ['hasSideEffects' => false], - 'filter_input' => ['hasSideEffects' => false], - 'filter_input_array' => ['hasSideEffects' => false], - 'filter_list' => ['hasSideEffects' => false], - 'filter_var' => ['hasSideEffects' => false], - 'filter_var_array' => ['hasSideEffects' => false], - 'finfo::buffer' => ['hasSideEffects' => false], - 'finfo::file' => ['hasSideEffects' => false], - 'floatval' => ['hasSideEffects' => false], - 'flock' => ['hasSideEffects' => true], - 'floor' => ['hasSideEffects' => false], - 'fmod' => ['hasSideEffects' => false], - 'fnmatch' => ['hasSideEffects' => false], - 'fopen' => ['hasSideEffects' => true], - 'fpassthru' => ['hasSideEffects' => true], - 'fputcsv' => ['hasSideEffects' => true], - 'fputs' => ['hasSideEffects' => true], - 'fread' => ['hasSideEffects' => true], - 'fscanf' => ['hasSideEffects' => true], - 'fseek' => ['hasSideEffects' => true], - 'fstat' => ['hasSideEffects' => false], - 'ftell' => ['hasSideEffects' => false], - 'ftok' => ['hasSideEffects' => false], - 'ftruncate' => ['hasSideEffects' => true], - 'func_get_arg' => ['hasSideEffects' => false], - 'func_get_args' => ['hasSideEffects' => false], - 'func_num_args' => ['hasSideEffects' => false], - 'function_exists' => ['hasSideEffects' => false], - 'fwrite' => ['hasSideEffects' => true], - 'gc_enabled' => ['hasSideEffects' => false], - 'gc_status' => ['hasSideEffects' => false], - 'gd_info' => ['hasSideEffects' => false], - 'geoip_continent_code_by_name' => ['hasSideEffects' => false], - 'geoip_country_code3_by_name' => ['hasSideEffects' => false], - 'geoip_country_code_by_name' => ['hasSideEffects' => false], - 'geoip_country_name_by_name' => ['hasSideEffects' => false], - 'geoip_database_info' => ['hasSideEffects' => false], - 'geoip_db_avail' => ['hasSideEffects' => false], - 'geoip_db_filename' => ['hasSideEffects' => false], - 'geoip_db_get_all_info' => ['hasSideEffects' => false], - 'geoip_id_by_name' => ['hasSideEffects' => false], - 'geoip_isp_by_name' => ['hasSideEffects' => false], - 'geoip_org_by_name' => ['hasSideEffects' => false], - 'geoip_record_by_name' => ['hasSideEffects' => false], - 'geoip_region_by_name' => ['hasSideEffects' => false], - 'geoip_region_name_by_code' => ['hasSideEffects' => false], - 'geoip_time_zone_by_country_and_region' => ['hasSideEffects' => false], - 'get_browser' => ['hasSideEffects' => false], - 'get_called_class' => ['hasSideEffects' => false], - 'get_cfg_var' => ['hasSideEffects' => false], - 'get_class' => ['hasSideEffects' => false], - 'get_class_methods' => ['hasSideEffects' => false], - 'get_class_vars' => ['hasSideEffects' => false], - 'get_current_user' => ['hasSideEffects' => false], - 'get_debug_type' => ['hasSideEffects' => false], - 'get_declared_classes' => ['hasSideEffects' => false], - 'get_declared_interfaces' => ['hasSideEffects' => false], - 'get_declared_traits' => ['hasSideEffects' => false], - 'get_defined_constants' => ['hasSideEffects' => false], - 'get_defined_functions' => ['hasSideEffects' => false], - 'get_defined_vars' => ['hasSideEffects' => false], - 'get_extension_funcs' => ['hasSideEffects' => false], - 'get_headers' => ['hasSideEffects' => false], - 'get_html_translation_table' => ['hasSideEffects' => false], - 'get_include_path' => ['hasSideEffects' => false], - 'get_included_files' => ['hasSideEffects' => false], - 'get_loaded_extensions' => ['hasSideEffects' => false], - 'get_meta_tags' => ['hasSideEffects' => false], - 'get_object_vars' => ['hasSideEffects' => false], - 'get_parent_class' => ['hasSideEffects' => false], - 'get_required_files' => ['hasSideEffects' => false], - 'get_resource_id' => ['hasSideEffects' => false], - 'get_resources' => ['hasSideEffects' => false], - 'getallheaders' => ['hasSideEffects' => false], - 'getcwd' => ['hasSideEffects' => false], - 'getdate' => ['hasSideEffects' => false], - 'getenv' => ['hasSideEffects' => false], - 'gethostbyaddr' => ['hasSideEffects' => false], - 'gethostbyname' => ['hasSideEffects' => false], - 'gethostbynamel' => ['hasSideEffects' => false], - 'gethostname' => ['hasSideEffects' => false], - 'getlastmod' => ['hasSideEffects' => false], - 'getmygid' => ['hasSideEffects' => false], - 'getmyinode' => ['hasSideEffects' => false], - 'getmypid' => ['hasSideEffects' => false], - 'getmyuid' => ['hasSideEffects' => false], - 'getprotobyname' => ['hasSideEffects' => false], - 'getprotobynumber' => ['hasSideEffects' => false], - 'getrandmax' => ['hasSideEffects' => false], - 'getrusage' => ['hasSideEffects' => false], - 'getservbyname' => ['hasSideEffects' => false], - 'getservbyport' => ['hasSideEffects' => false], - 'gettext' => ['hasSideEffects' => false], - 'gettimeofday' => ['hasSideEffects' => false], - 'gettype' => ['hasSideEffects' => false], - 'glob' => ['hasSideEffects' => false], - 'gmdate' => ['hasSideEffects' => false], - 'gmmktime' => ['hasSideEffects' => false], - 'gmp_abs' => ['hasSideEffects' => false], - 'gmp_add' => ['hasSideEffects' => false], - 'gmp_and' => ['hasSideEffects' => false], - 'gmp_binomial' => ['hasSideEffects' => false], - 'gmp_cmp' => ['hasSideEffects' => false], - 'gmp_com' => ['hasSideEffects' => false], - 'gmp_div' => ['hasSideEffects' => false], - 'gmp_div_q' => ['hasSideEffects' => false], - 'gmp_div_qr' => ['hasSideEffects' => false], - 'gmp_div_r' => ['hasSideEffects' => false], - 'gmp_divexact' => ['hasSideEffects' => false], - 'gmp_export' => ['hasSideEffects' => false], - 'gmp_fact' => ['hasSideEffects' => false], - 'gmp_gcd' => ['hasSideEffects' => false], - 'gmp_gcdext' => ['hasSideEffects' => false], - 'gmp_hamdist' => ['hasSideEffects' => false], - 'gmp_import' => ['hasSideEffects' => false], - 'gmp_init' => ['hasSideEffects' => false], - 'gmp_intval' => ['hasSideEffects' => false], - 'gmp_invert' => ['hasSideEffects' => false], - 'gmp_jacobi' => ['hasSideEffects' => false], - 'gmp_kronecker' => ['hasSideEffects' => false], - 'gmp_lcm' => ['hasSideEffects' => false], - 'gmp_legendre' => ['hasSideEffects' => false], - 'gmp_mod' => ['hasSideEffects' => false], - 'gmp_mul' => ['hasSideEffects' => false], - 'gmp_neg' => ['hasSideEffects' => false], - 'gmp_nextprime' => ['hasSideEffects' => false], - 'gmp_or' => ['hasSideEffects' => false], - 'gmp_perfect_power' => ['hasSideEffects' => false], - 'gmp_perfect_square' => ['hasSideEffects' => false], - 'gmp_popcount' => ['hasSideEffects' => false], - 'gmp_pow' => ['hasSideEffects' => false], - 'gmp_powm' => ['hasSideEffects' => false], - 'gmp_prob_prime' => ['hasSideEffects' => false], - 'gmp_root' => ['hasSideEffects' => false], - 'gmp_rootrem' => ['hasSideEffects' => false], - 'gmp_scan0' => ['hasSideEffects' => false], - 'gmp_scan1' => ['hasSideEffects' => false], - 'gmp_sign' => ['hasSideEffects' => false], - 'gmp_sqrt' => ['hasSideEffects' => false], - 'gmp_sqrtrem' => ['hasSideEffects' => false], - 'gmp_strval' => ['hasSideEffects' => false], - 'gmp_sub' => ['hasSideEffects' => false], - 'gmp_testbit' => ['hasSideEffects' => false], - 'gmp_xor' => ['hasSideEffects' => false], - 'grapheme_stripos' => ['hasSideEffects' => false], - 'grapheme_stristr' => ['hasSideEffects' => false], - 'grapheme_strlen' => ['hasSideEffects' => false], - 'grapheme_strpos' => ['hasSideEffects' => false], - 'grapheme_strripos' => ['hasSideEffects' => false], - 'grapheme_strrpos' => ['hasSideEffects' => false], - 'grapheme_strstr' => ['hasSideEffects' => false], - 'grapheme_substr' => ['hasSideEffects' => false], - 'gzcompress' => ['hasSideEffects' => false], - 'gzdecode' => ['hasSideEffects' => false], - 'gzdeflate' => ['hasSideEffects' => false], - 'gzencode' => ['hasSideEffects' => false], - 'gzinflate' => ['hasSideEffects' => false], - 'gzuncompress' => ['hasSideEffects' => false], - 'hash' => ['hasSideEffects' => false], - 'hash_algos' => ['hasSideEffects' => false], - 'hash_copy' => ['hasSideEffects' => false], - 'hash_equals' => ['hasSideEffects' => false], - 'hash_file' => ['hasSideEffects' => false], - 'hash_hkdf' => ['hasSideEffects' => false], - 'hash_hmac' => ['hasSideEffects' => false], - 'hash_hmac_algos' => ['hasSideEffects' => false], - 'hash_hmac_file' => ['hasSideEffects' => false], - 'hash_init' => ['hasSideEffects' => false], - 'hash_pbkdf2' => ['hasSideEffects' => false], - 'headers_list' => ['hasSideEffects' => false], - 'hebrev' => ['hasSideEffects' => false], - 'hexdec' => ['hasSideEffects' => false], - 'hrtime' => ['hasSideEffects' => false], - 'html_entity_decode' => ['hasSideEffects' => false], - 'htmlentities' => ['hasSideEffects' => false], - 'htmlspecialchars' => ['hasSideEffects' => false], - 'htmlspecialchars_decode' => ['hasSideEffects' => false], - 'http_build_cookie' => ['hasSideEffects' => false], - 'http_build_query' => ['hasSideEffects' => false], - 'http_build_str' => ['hasSideEffects' => false], - 'http_cache_etag' => ['hasSideEffects' => false], - 'http_cache_last_modified' => ['hasSideEffects' => false], - 'http_chunked_decode' => ['hasSideEffects' => false], - 'http_date' => ['hasSideEffects' => false], - 'http_deflate' => ['hasSideEffects' => false], - 'http_get_request_body' => ['hasSideEffects' => false], - 'http_get_request_body_stream' => ['hasSideEffects' => false], - 'http_get_request_headers' => ['hasSideEffects' => false], - 'http_inflate' => ['hasSideEffects' => false], - 'http_match_etag' => ['hasSideEffects' => false], - 'http_match_modified' => ['hasSideEffects' => false], - 'http_match_request_header' => ['hasSideEffects' => false], - 'http_parse_cookie' => ['hasSideEffects' => false], - 'http_parse_headers' => ['hasSideEffects' => false], - 'http_parse_message' => ['hasSideEffects' => false], - 'http_parse_params' => ['hasSideEffects' => false], - 'http_request_body_encode' => ['hasSideEffects' => false], - 'http_request_method_exists' => ['hasSideEffects' => false], - 'http_request_method_name' => ['hasSideEffects' => false], - 'http_support' => ['hasSideEffects' => false], - 'hypot' => ['hasSideEffects' => false], - 'iconv' => ['hasSideEffects' => false], - 'iconv_get_encoding' => ['hasSideEffects' => false], - 'iconv_mime_decode' => ['hasSideEffects' => false], - 'iconv_mime_decode_headers' => ['hasSideEffects' => false], - 'iconv_mime_encode' => ['hasSideEffects' => false], - 'iconv_strlen' => ['hasSideEffects' => false], - 'iconv_strpos' => ['hasSideEffects' => false], - 'iconv_strrpos' => ['hasSideEffects' => false], - 'iconv_substr' => ['hasSideEffects' => false], - 'idate' => ['hasSideEffects' => false], - 'image_type_to_extension' => ['hasSideEffects' => false], - 'image_type_to_mime_type' => ['hasSideEffects' => false], - 'imagecolorat' => ['hasSideEffects' => false], - 'imagecolorclosest' => ['hasSideEffects' => false], - 'imagecolorclosestalpha' => ['hasSideEffects' => false], - 'imagecolorclosesthwb' => ['hasSideEffects' => false], - 'imagecolorexact' => ['hasSideEffects' => false], - 'imagecolorexactalpha' => ['hasSideEffects' => false], - 'imagecolorresolve' => ['hasSideEffects' => false], - 'imagecolorresolvealpha' => ['hasSideEffects' => false], - 'imagecolorsforindex' => ['hasSideEffects' => false], - 'imagecolorstotal' => ['hasSideEffects' => false], - 'imagecreate' => ['hasSideEffects' => false], - 'imagecreatefromstring' => ['hasSideEffects' => false], - 'imagecreatetruecolor' => ['hasSideEffects' => false], - 'imagefontheight' => ['hasSideEffects' => false], - 'imagefontwidth' => ['hasSideEffects' => false], - 'imageftbbox' => ['hasSideEffects' => false], - 'imagegetinterpolation' => ['hasSideEffects' => false], - 'imagegrabscreen' => ['hasSideEffects' => false], - 'imagegrabwindow' => ['hasSideEffects' => false], - 'imageistruecolor' => ['hasSideEffects' => false], - 'imagesx' => ['hasSideEffects' => false], - 'imagesy' => ['hasSideEffects' => false], - 'imagettfbbox' => ['hasSideEffects' => false], - 'imagetypes' => ['hasSideEffects' => false], - 'implode' => ['hasSideEffects' => false], - 'in_array' => ['hasSideEffects' => false], - 'inet_ntop' => ['hasSideEffects' => false], - 'inet_pton' => ['hasSideEffects' => false], - 'inflate_get_read_len' => ['hasSideEffects' => false], - 'inflate_get_status' => ['hasSideEffects' => false], - 'inflate_init' => ['hasSideEffects' => false], - 'ini_get' => ['hasSideEffects' => false], - 'ini_get_all' => ['hasSideEffects' => false], - 'intcal_get_maximum' => ['hasSideEffects' => false], - 'intdiv' => ['hasSideEffects' => false], - 'intl_error_name' => ['hasSideEffects' => false], - 'intl_get' => ['hasSideEffects' => false], - 'intl_get_error_code' => ['hasSideEffects' => false], - 'intl_get_error_message' => ['hasSideEffects' => false], - 'intl_is_failure' => ['hasSideEffects' => false], - 'intlcal_after' => ['hasSideEffects' => false], - 'intlcal_before' => ['hasSideEffects' => false], - 'intlcal_create_instance' => ['hasSideEffects' => false], - 'intlcal_equals' => ['hasSideEffects' => false], - 'intlcal_field_difference' => ['hasSideEffects' => false], - 'intlcal_from_date_time' => ['hasSideEffects' => false], - 'intlcal_get' => ['hasSideEffects' => false], - 'intlcal_get_actual_maximum' => ['hasSideEffects' => false], - 'intlcal_get_actual_minimum' => ['hasSideEffects' => false], - 'intlcal_get_available_locales' => ['hasSideEffects' => false], - 'intlcal_get_day_of_week_type' => ['hasSideEffects' => false], - 'intlcal_get_error_code' => ['hasSideEffects' => false], - 'intlcal_get_error_message' => ['hasSideEffects' => false], - 'intlcal_get_first_day_of_week' => ['hasSideEffects' => false], - 'intlcal_get_greatest_minimum' => ['hasSideEffects' => false], - 'intlcal_get_keyword_values_for_locale' => ['hasSideEffects' => false], - 'intlcal_get_least_maximum' => ['hasSideEffects' => false], - 'intlcal_get_locale' => ['hasSideEffects' => false], - 'intlcal_get_maximum' => ['hasSideEffects' => false], - 'intlcal_get_minimal_days_in_first_week' => ['hasSideEffects' => false], - 'intlcal_get_minimum' => ['hasSideEffects' => false], - 'intlcal_get_now' => ['hasSideEffects' => false], - 'intlcal_get_repeated_wall_time_option' => ['hasSideEffects' => false], - 'intlcal_get_skipped_wall_time_option' => ['hasSideEffects' => false], - 'intlcal_get_time' => ['hasSideEffects' => false], - 'intlcal_get_time_zone' => ['hasSideEffects' => false], - 'intlcal_get_type' => ['hasSideEffects' => false], - 'intlcal_get_weekend_transition' => ['hasSideEffects' => false], - 'intlcal_greates_minimum' => ['hasSideEffects' => false], - 'intlcal_in_daylight_time' => ['hasSideEffects' => false], - 'intlcal_is_equivalent_to' => ['hasSideEffects' => false], - 'intlcal_is_lenient' => ['hasSideEffects' => false], - 'intlcal_is_set' => ['hasSideEffects' => false], - 'intlcal_is_weekend' => ['hasSideEffects' => false], - 'intlcal_to_date_time' => ['hasSideEffects' => false], - 'intlgregcal_create_instance' => ['hasSideEffects' => false], - 'intlgregcal_get_gregorian_change' => ['hasSideEffects' => false], - 'intlgregcal_is_leap_year' => ['hasSideEffects' => false], - 'intltz_count_equivalent_ids' => ['hasSideEffects' => false], - 'intltz_create_default' => ['hasSideEffects' => false], - 'intltz_create_enumeration' => ['hasSideEffects' => false], - 'intltz_create_time_zone' => ['hasSideEffects' => false], - 'intltz_create_time_zone_id_enumeration' => ['hasSideEffects' => false], - 'intltz_from_date_time_zone' => ['hasSideEffects' => false], - 'intltz_get_canonical_id' => ['hasSideEffects' => false], - 'intltz_get_display_name' => ['hasSideEffects' => false], - 'intltz_get_dst_savings' => ['hasSideEffects' => false], - 'intltz_get_equivalent_id' => ['hasSideEffects' => false], - 'intltz_get_error_code' => ['hasSideEffects' => false], - 'intltz_get_error_message' => ['hasSideEffects' => false], - 'intltz_get_gmt' => ['hasSideEffects' => false], - 'intltz_get_id' => ['hasSideEffects' => false], - 'intltz_get_offset' => ['hasSideEffects' => false], - 'intltz_get_raw_offset' => ['hasSideEffects' => false], - 'intltz_get_region' => ['hasSideEffects' => false], - 'intltz_get_tz_data_version' => ['hasSideEffects' => false], - 'intltz_get_unknown' => ['hasSideEffects' => false], - 'intltz_getgmt' => ['hasSideEffects' => false], - 'intltz_has_same_rules' => ['hasSideEffects' => false], - 'intltz_to_date_time_zone' => ['hasSideEffects' => false], - 'intltz_use_daylight_time' => ['hasSideEffects' => false], - 'intlz_create_default' => ['hasSideEffects' => false], - 'intval' => ['hasSideEffects' => false], - 'ip2long' => ['hasSideEffects' => false], - 'iptcparse' => ['hasSideEffects' => false], - 'is_a' => ['hasSideEffects' => false], - 'is_array' => ['hasSideEffects' => false], - 'is_bool' => ['hasSideEffects' => false], - 'is_countable' => ['hasSideEffects' => false], - 'is_dir' => ['hasSideEffects' => false], - 'is_double' => ['hasSideEffects' => false], - 'is_executable' => ['hasSideEffects' => false], - 'is_file' => ['hasSideEffects' => false], - 'is_finite' => ['hasSideEffects' => false], - 'is_float' => ['hasSideEffects' => false], - 'is_infinite' => ['hasSideEffects' => false], - 'is_int' => ['hasSideEffects' => false], - 'is_integer' => ['hasSideEffects' => false], - 'is_iterable' => ['hasSideEffects' => false], - 'is_link' => ['hasSideEffects' => false], - 'is_long' => ['hasSideEffects' => false], - 'is_nan' => ['hasSideEffects' => false], - 'is_null' => ['hasSideEffects' => false], - 'is_numeric' => ['hasSideEffects' => false], - 'is_object' => ['hasSideEffects' => false], - 'is_readable' => ['hasSideEffects' => false], - 'is_real' => ['hasSideEffects' => false], - 'is_resource' => ['hasSideEffects' => false], - 'is_scalar' => ['hasSideEffects' => false], - 'is_string' => ['hasSideEffects' => false], - 'is_subclass_of' => ['hasSideEffects' => false], - 'is_uploaded_file' => ['hasSideEffects' => false], - 'is_writable' => ['hasSideEffects' => false], - 'is_writeable' => ['hasSideEffects' => false], - 'iterator_count' => ['hasSideEffects' => false], - 'join' => ['hasSideEffects' => false], - 'json_last_error' => ['hasSideEffects' => false], - 'json_last_error_msg' => ['hasSideEffects' => false], - 'json_validate' => ['hasSideEffects' => false], - 'key' => ['hasSideEffects' => false], - 'key_exists' => ['hasSideEffects' => false], - 'lcfirst' => ['hasSideEffects' => false], - 'lchgrp' => ['hasSideEffects' => true], - 'lchown' => ['hasSideEffects' => true], - 'libxml_get_errors' => ['hasSideEffects' => false], - 'libxml_get_last_error' => ['hasSideEffects' => false], - 'link' => ['hasSideEffects' => true], - 'linkinfo' => ['hasSideEffects' => false], - 'locale_accept_from_http' => ['hasSideEffects' => false], - 'locale_canonicalize' => ['hasSideEffects' => false], - 'locale_compose' => ['hasSideEffects' => false], - 'locale_filter_matches' => ['hasSideEffects' => false], - 'locale_get_all_variants' => ['hasSideEffects' => false], - 'locale_get_default' => ['hasSideEffects' => false], - 'locale_get_display_language' => ['hasSideEffects' => false], - 'locale_get_display_name' => ['hasSideEffects' => false], - 'locale_get_display_region' => ['hasSideEffects' => false], - 'locale_get_display_script' => ['hasSideEffects' => false], - 'locale_get_display_variant' => ['hasSideEffects' => false], - 'locale_get_keywords' => ['hasSideEffects' => false], - 'locale_get_primary_language' => ['hasSideEffects' => false], - 'locale_get_region' => ['hasSideEffects' => false], - 'locale_get_script' => ['hasSideEffects' => false], - 'locale_lookup' => ['hasSideEffects' => false], - 'locale_parse' => ['hasSideEffects' => false], - 'localeconv' => ['hasSideEffects' => false], - 'localtime' => ['hasSideEffects' => false], - 'log' => ['hasSideEffects' => false], - 'log10' => ['hasSideEffects' => false], - 'log1p' => ['hasSideEffects' => false], - 'long2ip' => ['hasSideEffects' => false], - 'lstat' => ['hasSideEffects' => false], - 'ltrim' => ['hasSideEffects' => false], - 'max' => ['hasSideEffects' => false], - 'mb_check_encoding' => ['hasSideEffects' => false], - 'mb_chr' => ['hasSideEffects' => false], - 'mb_convert_case' => ['hasSideEffects' => false], - 'mb_convert_encoding' => ['hasSideEffects' => false], - 'mb_convert_kana' => ['hasSideEffects' => false], - 'mb_decode_mimeheader' => ['hasSideEffects' => false], - 'mb_decode_numericentity' => ['hasSideEffects' => false], - 'mb_detect_encoding' => ['hasSideEffects' => false], - 'mb_encode_mimeheader' => ['hasSideEffects' => false], - 'mb_encode_numericentity' => ['hasSideEffects' => false], - 'mb_encoding_aliases' => ['hasSideEffects' => false], - 'mb_ereg_match' => ['hasSideEffects' => false], - 'mb_ereg_replace' => ['hasSideEffects' => false], - 'mb_ereg_search' => ['hasSideEffects' => false], - 'mb_ereg_search_getpos' => ['hasSideEffects' => false], - 'mb_ereg_search_getregs' => ['hasSideEffects' => false], - 'mb_ereg_search_pos' => ['hasSideEffects' => false], - 'mb_ereg_search_regs' => ['hasSideEffects' => false], - 'mb_ereg_search_setpos' => ['hasSideEffects' => false], - 'mb_eregi_replace' => ['hasSideEffects' => false], - 'mb_get_info' => ['hasSideEffects' => false], - 'mb_http_input' => ['hasSideEffects' => false], - 'mb_list_encodings' => ['hasSideEffects' => false], - 'mb_ord' => ['hasSideEffects' => false], - 'mb_output_handler' => ['hasSideEffects' => false], - 'mb_preferred_mime_name' => ['hasSideEffects' => false], - 'mb_scrub' => ['hasSideEffects' => false], - 'mb_split' => ['hasSideEffects' => false], - 'mb_str_pad' => ['hasSideEffects' => false], - 'mb_str_split' => ['hasSideEffects' => false], - 'mb_strcut' => ['hasSideEffects' => false], - 'mb_strimwidth' => ['hasSideEffects' => false], - 'mb_stripos' => ['hasSideEffects' => false], - 'mb_stristr' => ['hasSideEffects' => false], - 'mb_strlen' => ['hasSideEffects' => false], - 'mb_strpos' => ['hasSideEffects' => false], - 'mb_strrchr' => ['hasSideEffects' => false], - 'mb_strrichr' => ['hasSideEffects' => false], - 'mb_strripos' => ['hasSideEffects' => false], - 'mb_strrpos' => ['hasSideEffects' => false], - 'mb_strstr' => ['hasSideEffects' => false], - 'mb_strtolower' => ['hasSideEffects' => false], - 'mb_strtoupper' => ['hasSideEffects' => false], - 'mb_strwidth' => ['hasSideEffects' => false], - 'mb_substr' => ['hasSideEffects' => false], - 'mb_substr_count' => ['hasSideEffects' => false], - 'mbereg_search_setpos' => ['hasSideEffects' => false], - 'md5' => ['hasSideEffects' => false], - 'md5_file' => ['hasSideEffects' => false], - 'memory_get_peak_usage' => ['hasSideEffects' => false], - 'memory_get_usage' => ['hasSideEffects' => false], - 'metaphone' => ['hasSideEffects' => false], - 'method_exists' => ['hasSideEffects' => false], - 'mhash' => ['hasSideEffects' => false], - 'mhash_count' => ['hasSideEffects' => false], - 'mhash_get_block_size' => ['hasSideEffects' => false], - 'mhash_get_hash_name' => ['hasSideEffects' => false], - 'mhash_keygen_s2k' => ['hasSideEffects' => false], - 'microtime' => ['hasSideEffects' => false], - 'min' => ['hasSideEffects' => false], - 'mkdir' => ['hasSideEffects' => true], - 'mktime' => ['hasSideEffects' => false], - 'move_uploaded_file' => ['hasSideEffects' => true], - 'msgfmt_create' => ['hasSideEffects' => false], - 'msgfmt_format' => ['hasSideEffects' => false], - 'msgfmt_format_message' => ['hasSideEffects' => false], - 'msgfmt_get_error_code' => ['hasSideEffects' => false], - 'msgfmt_get_error_message' => ['hasSideEffects' => false], - 'msgfmt_get_locale' => ['hasSideEffects' => false], - 'msgfmt_get_pattern' => ['hasSideEffects' => false], - 'msgfmt_parse' => ['hasSideEffects' => false], - 'msgfmt_parse_message' => ['hasSideEffects' => false], - 'mt_getrandmax' => ['hasSideEffects' => false], - 'mt_rand' => ['hasSideEffects' => true], - 'net_get_interfaces' => ['hasSideEffects' => false], - 'ngettext' => ['hasSideEffects' => false], - 'nl2br' => ['hasSideEffects' => false], - 'nl_langinfo' => ['hasSideEffects' => false], - 'normalizer_get_raw_decomposition' => ['hasSideEffects' => false], - 'normalizer_is_normalized' => ['hasSideEffects' => false], - 'normalizer_normalize' => ['hasSideEffects' => false], - 'number_format' => ['hasSideEffects' => false], - 'numfmt_create' => ['hasSideEffects' => false], - 'numfmt_format' => ['hasSideEffects' => false], - 'numfmt_format_currency' => ['hasSideEffects' => false], - 'numfmt_get_attribute' => ['hasSideEffects' => false], - 'numfmt_get_error_code' => ['hasSideEffects' => false], - 'numfmt_get_error_message' => ['hasSideEffects' => false], - 'numfmt_get_locale' => ['hasSideEffects' => false], - 'numfmt_get_pattern' => ['hasSideEffects' => false], - 'numfmt_get_symbol' => ['hasSideEffects' => false], - 'numfmt_get_text_attribute' => ['hasSideEffects' => false], - 'numfmt_parse' => ['hasSideEffects' => false], - 'ob_etaghandler' => ['hasSideEffects' => false], - 'ob_get_contents' => ['hasSideEffects' => false], - 'ob_iconv_handler' => ['hasSideEffects' => false], - 'octdec' => ['hasSideEffects' => false], - 'ord' => ['hasSideEffects' => false], - 'pack' => ['hasSideEffects' => false], - 'pam_auth' => ['hasSideEffects' => false], - 'pam_chpass' => ['hasSideEffects' => false], - 'parse_ini_file' => ['hasSideEffects' => false], - 'parse_ini_string' => ['hasSideEffects' => false], - 'parse_url' => ['hasSideEffects' => false], - 'pathinfo' => ['hasSideEffects' => false], - 'pclose' => ['hasSideEffects' => true], - 'pcntl_errno' => ['hasSideEffects' => false], - 'pcntl_get_last_error' => ['hasSideEffects' => false], - 'pcntl_getpriority' => ['hasSideEffects' => false], - 'pcntl_strerror' => ['hasSideEffects' => false], - 'pcntl_wexitstatus' => ['hasSideEffects' => false], - 'pcntl_wifcontinued' => ['hasSideEffects' => false], - 'pcntl_wifexited' => ['hasSideEffects' => false], - 'pcntl_wifsignaled' => ['hasSideEffects' => false], - 'pcntl_wifstopped' => ['hasSideEffects' => false], - 'pcntl_wstopsig' => ['hasSideEffects' => false], - 'pcntl_wtermsig' => ['hasSideEffects' => false], - 'pdo_drivers' => ['hasSideEffects' => false], - 'php_ini_loaded_file' => ['hasSideEffects' => false], - 'php_ini_scanned_files' => ['hasSideEffects' => false], - 'php_logo_guid' => ['hasSideEffects' => false], - 'php_sapi_name' => ['hasSideEffects' => false], - 'php_strip_whitespace' => ['hasSideEffects' => false], - 'php_uname' => ['hasSideEffects' => false], - 'phpversion' => ['hasSideEffects' => false], - 'pi' => ['hasSideEffects' => false], - 'popen' => ['hasSideEffects' => true], - 'pos' => ['hasSideEffects' => false], - 'posix_ctermid' => ['hasSideEffects' => false], - 'posix_errno' => ['hasSideEffects' => false], - 'posix_get_last_error' => ['hasSideEffects' => false], - 'posix_getcwd' => ['hasSideEffects' => false], - 'posix_getegid' => ['hasSideEffects' => false], - 'posix_geteuid' => ['hasSideEffects' => false], - 'posix_getgid' => ['hasSideEffects' => false], - 'posix_getgrgid' => ['hasSideEffects' => false], - 'posix_getgrnam' => ['hasSideEffects' => false], - 'posix_getgroups' => ['hasSideEffects' => false], - 'posix_getlogin' => ['hasSideEffects' => false], - 'posix_getpgid' => ['hasSideEffects' => false], - 'posix_getpgrp' => ['hasSideEffects' => false], - 'posix_getpid' => ['hasSideEffects' => false], - 'posix_getppid' => ['hasSideEffects' => false], - 'posix_getpwnam' => ['hasSideEffects' => false], - 'posix_getpwuid' => ['hasSideEffects' => false], - 'posix_getrlimit' => ['hasSideEffects' => false], - 'posix_getsid' => ['hasSideEffects' => false], - 'posix_getuid' => ['hasSideEffects' => false], - 'posix_initgroups' => ['hasSideEffects' => false], - 'posix_isatty' => ['hasSideEffects' => false], - 'posix_strerror' => ['hasSideEffects' => false], - 'posix_times' => ['hasSideEffects' => false], - 'posix_ttyname' => ['hasSideEffects' => false], - 'posix_uname' => ['hasSideEffects' => false], - 'pow' => ['hasSideEffects' => false], - 'preg_grep' => ['hasSideEffects' => false], - 'preg_last_error' => ['hasSideEffects' => false], - 'preg_last_error_msg' => ['hasSideEffects' => false], - 'preg_quote' => ['hasSideEffects' => false], - 'preg_split' => ['hasSideEffects' => false], - 'property_exists' => ['hasSideEffects' => false], - 'quoted_printable_decode' => ['hasSideEffects' => false], - 'quoted_printable_encode' => ['hasSideEffects' => false], - 'quotemeta' => ['hasSideEffects' => false], - 'rad2deg' => ['hasSideEffects' => false], - 'rand' => ['hasSideEffects' => true], - 'random_bytes' => ['hasSideEffects' => true], - 'random_int' => ['hasSideEffects' => true], - 'range' => ['hasSideEffects' => false], - 'rawurldecode' => ['hasSideEffects' => false], - 'rawurlencode' => ['hasSideEffects' => false], - 'readfile' => ['hasSideEffects' => true], - 'readlink' => ['hasSideEffects' => false], - 'realpath' => ['hasSideEffects' => false], - 'realpath_cache_get' => ['hasSideEffects' => false], - 'realpath_cache_size' => ['hasSideEffects' => false], - 'rename' => ['hasSideEffects' => true], - 'resourcebundle_count' => ['hasSideEffects' => false], - 'resourcebundle_create' => ['hasSideEffects' => false], - 'resourcebundle_get' => ['hasSideEffects' => false], - 'resourcebundle_get_error_code' => ['hasSideEffects' => false], - 'resourcebundle_get_error_message' => ['hasSideEffects' => false], - 'resourcebundle_locales' => ['hasSideEffects' => false], - 'rewind' => ['hasSideEffects' => true], - 'rmdir' => ['hasSideEffects' => true], - 'round' => ['hasSideEffects' => false], - 'rtrim' => ['hasSideEffects' => false], - 'sha1' => ['hasSideEffects' => false], - 'sha1_file' => ['hasSideEffects' => false], - 'sin' => ['hasSideEffects' => false], - 'sinh' => ['hasSideEffects' => false], - 'sizeof' => ['hasSideEffects' => false], - 'soundex' => ['hasSideEffects' => false], - 'spl_classes' => ['hasSideEffects' => false], - 'spl_object_hash' => ['hasSideEffects' => false], - 'sprintf' => ['hasSideEffects' => false], - 'sqrt' => ['hasSideEffects' => false], - 'stat' => ['hasSideEffects' => false], - 'str_contains' => ['hasSideEffects' => false], - 'str_decrement' => ['hasSideEffects' => false], - 'str_ends_with' => ['hasSideEffects' => false], - 'str_getcsv' => ['hasSideEffects' => false], - 'str_increment' => ['hasSideEffects' => false], - 'str_pad' => ['hasSideEffects' => false], - 'str_repeat' => ['hasSideEffects' => false], - 'str_rot13' => ['hasSideEffects' => false], - 'str_split' => ['hasSideEffects' => false], - 'str_starts_with' => ['hasSideEffects' => false], - 'str_word_count' => ['hasSideEffects' => false], - 'strcasecmp' => ['hasSideEffects' => false], - 'strchr' => ['hasSideEffects' => false], - 'strcmp' => ['hasSideEffects' => false], - 'strcoll' => ['hasSideEffects' => false], - 'strcspn' => ['hasSideEffects' => false], - 'stream_get_filters' => ['hasSideEffects' => false], - 'stream_get_transports' => ['hasSideEffects' => false], - 'stream_get_wrappers' => ['hasSideEffects' => false], - 'stream_is_local' => ['hasSideEffects' => false], - 'stream_isatty' => ['hasSideEffects' => false], - 'strip_tags' => ['hasSideEffects' => false], - 'stripcslashes' => ['hasSideEffects' => false], - 'stripos' => ['hasSideEffects' => false], - 'stripslashes' => ['hasSideEffects' => false], - 'stristr' => ['hasSideEffects' => false], - 'strlen' => ['hasSideEffects' => false], - 'strnatcasecmp' => ['hasSideEffects' => false], - 'strnatcmp' => ['hasSideEffects' => false], - 'strncasecmp' => ['hasSideEffects' => false], - 'strncmp' => ['hasSideEffects' => false], - 'strpbrk' => ['hasSideEffects' => false], - 'strpos' => ['hasSideEffects' => false], - 'strptime' => ['hasSideEffects' => false], - 'strrchr' => ['hasSideEffects' => false], - 'strrev' => ['hasSideEffects' => false], - 'strripos' => ['hasSideEffects' => false], - 'strrpos' => ['hasSideEffects' => false], - 'strspn' => ['hasSideEffects' => false], - 'strstr' => ['hasSideEffects' => false], - 'strtolower' => ['hasSideEffects' => false], - 'strtotime' => ['hasSideEffects' => false], - 'strtoupper' => ['hasSideEffects' => false], - 'strtr' => ['hasSideEffects' => false], - 'strval' => ['hasSideEffects' => false], - 'substr' => ['hasSideEffects' => false], - 'substr_compare' => ['hasSideEffects' => false], - 'substr_count' => ['hasSideEffects' => false], - 'substr_replace' => ['hasSideEffects' => false], - 'symlink' => ['hasSideEffects' => true], - 'sys_getloadavg' => ['hasSideEffects' => false], - 'tan' => ['hasSideEffects' => false], - 'tanh' => ['hasSideEffects' => false], - 'tempnam' => ['hasSideEffects' => true], - 'timezone_abbreviations_list' => ['hasSideEffects' => false], - 'timezone_identifiers_list' => ['hasSideEffects' => false], - 'timezone_location_get' => ['hasSideEffects' => false], - 'timezone_name_from_abbr' => ['hasSideEffects' => false], - 'timezone_name_get' => ['hasSideEffects' => false], - 'timezone_offset_get' => ['hasSideEffects' => false], - 'timezone_open' => ['hasSideEffects' => false], - 'timezone_transitions_get' => ['hasSideEffects' => false], - 'timezone_version_get' => ['hasSideEffects' => false], - 'tmpfile' => ['hasSideEffects' => true], - 'token_get_all' => ['hasSideEffects' => false], - 'token_name' => ['hasSideEffects' => false], - 'touch' => ['hasSideEffects' => true], - 'transliterator_create' => ['hasSideEffects' => false], - 'transliterator_create_from_rules' => ['hasSideEffects' => false], - 'transliterator_create_inverse' => ['hasSideEffects' => false], - 'transliterator_get_error_code' => ['hasSideEffects' => false], - 'transliterator_get_error_message' => ['hasSideEffects' => false], - 'transliterator_list_ids' => ['hasSideEffects' => false], - 'transliterator_transliterate' => ['hasSideEffects' => false], - 'trim' => ['hasSideEffects' => false], - 'ucfirst' => ['hasSideEffects' => false], - 'ucwords' => ['hasSideEffects' => false], - 'umask' => ['hasSideEffects' => true], - 'unlink' => ['hasSideEffects' => true], - 'unpack' => ['hasSideEffects' => false], - 'urldecode' => ['hasSideEffects' => false], - 'urlencode' => ['hasSideEffects' => false], - 'utf8_decode' => ['hasSideEffects' => false], - 'utf8_encode' => ['hasSideEffects' => false], - 'vsprintf' => ['hasSideEffects' => false], - 'wordwrap' => ['hasSideEffects' => false], - 'xml_error_string' => ['hasSideEffects' => false], - 'xml_get_current_byte_index' => ['hasSideEffects' => false], - 'xml_get_current_column_number' => ['hasSideEffects' => false], - 'xml_get_current_line_number' => ['hasSideEffects' => false], - 'xml_get_error_code' => ['hasSideEffects' => false], - 'xml_parser_create' => ['hasSideEffects' => false], - 'xml_parser_create_ns' => ['hasSideEffects' => false], - 'xml_parser_get_option' => ['hasSideEffects' => false], - 'zend_version' => ['hasSideEffects' => false], - 'zlib_decode' => ['hasSideEffects' => false], - 'zlib_encode' => ['hasSideEffects' => false], - 'zlib_get_coding_type' => ['hasSideEffects' => false], - -]; diff --git a/vendor/symfony/cache-contracts/CHANGELOG.md b/vendor/symfony/cache-contracts/CHANGELOG.md deleted file mode 100644 index 7932e261..00000000 --- a/vendor/symfony/cache-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/cache-contracts/CacheInterface.php b/vendor/symfony/cache-contracts/CacheInterface.php deleted file mode 100644 index 3e4aaf65..00000000 --- a/vendor/symfony/cache-contracts/CacheInterface.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Covers most simple to advanced caching needs. - * - * @author Nicolas Grekas - */ -interface CacheInterface -{ - /** - * Fetches a value from the pool or computes it if not found. - * - * On cache misses, a callback is called that should return the missing value. - * This callback is given a PSR-6 CacheItemInterface instance corresponding to the - * requested key, that could be used e.g. for expiration control. It could also - * be an ItemInterface instance when its additional features are needed. - * - * @template T - * - * @param string $key The key of the item to retrieve from the cache - * @param (callable(CacheItemInterface,bool):T)|(callable(ItemInterface,bool):T)|CallbackInterface $callback - * @param float|null $beta A float that, as it grows, controls the likeliness of triggering - * early expiration. 0 disables it, INF forces immediate expiration. - * The default (or providing null) is implementation dependent but should - * typically be 1.0, which should provide optimal stampede protection. - * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration - * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()} - * - * @return T - * - * @throws InvalidArgumentException When $key is not valid or when $beta is negative - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed; - - /** - * Removes an item from the pool. - * - * @param string $key The key to delete - * - * @return bool True if the item was successfully removed, false if there was any error - * - * @throws InvalidArgumentException When $key is not valid - */ - public function delete(string $key): bool; -} diff --git a/vendor/symfony/cache-contracts/CacheTrait.php b/vendor/symfony/cache-contracts/CacheTrait.php deleted file mode 100644 index 4c5449b9..00000000 --- a/vendor/symfony/cache-contracts/CacheTrait.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(InvalidArgumentException::class); - -/** - * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes. - * - * @author Nicolas Grekas - */ -trait CacheTrait -{ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null, ?LoggerInterface $logger = null): mixed - { - if (0 > $beta ??= 1.0) { - throw new class(\sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {}; - } - - $item = $pool->getItem($key); - $recompute = !$item->isHit() || \INF === $beta; - $metadata = $item instanceof ItemInterface ? $item->getMetadata() : []; - - if (!$recompute && $metadata) { - $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false; - $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false; - - if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) { - // force applying defaultLifetime to expiry - $item->expiresAt(null); - $logger?->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [ - 'key' => $key, - 'delta' => \sprintf('%.1f', $expiry - $now), - ]); - } - } - - if ($recompute) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $pool->save($item); - } - } - - return $item->get(); - } -} diff --git a/vendor/symfony/cache-contracts/CallbackInterface.php b/vendor/symfony/cache-contracts/CallbackInterface.php deleted file mode 100644 index 15941e9c..00000000 --- a/vendor/symfony/cache-contracts/CallbackInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; - -/** - * Computes and returns the cached value of an item. - * - * @author Nicolas Grekas - * - * @template T - */ -interface CallbackInterface -{ - /** - * @param CacheItemInterface|ItemInterface $item The item to compute the value for - * @param bool &$save Should be set to false when the value should not be saved in the pool - * - * @return T The computed value for the passed item - */ - public function __invoke(CacheItemInterface $item, bool &$save): mixed; -} diff --git a/vendor/symfony/cache-contracts/ItemInterface.php b/vendor/symfony/cache-contracts/ItemInterface.php deleted file mode 100644 index 8c4c5125..00000000 --- a/vendor/symfony/cache-contracts/ItemInterface.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheException; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Augments PSR-6's CacheItemInterface with support for tags and metadata. - * - * @author Nicolas Grekas - */ -interface ItemInterface extends CacheItemInterface -{ - /** - * References the Unix timestamp stating when the item will expire. - */ - public const METADATA_EXPIRY = 'expiry'; - - /** - * References the time the item took to be created, in milliseconds. - */ - public const METADATA_CTIME = 'ctime'; - - /** - * References the list of tags that were assigned to the item, as string[]. - */ - public const METADATA_TAGS = 'tags'; - - /** - * Reserved characters that cannot be used in a key or tag. - */ - public const RESERVED_CHARACTERS = '{}()/\@:'; - - /** - * Adds a tag to a cache item. - * - * Tags are strings that follow the same validation rules as keys. - * - * @param string|string[] $tags A tag or array of tags - * - * @return $this - * - * @throws InvalidArgumentException When $tag is not valid - * @throws CacheException When the item comes from a pool that is not tag-aware - */ - public function tag(string|iterable $tags): static; - - /** - * Returns a list of metadata info that were saved alongside with the cached value. - * - * See ItemInterface::METADATA_* consts for keys potentially found in the returned array. - */ - public function getMetadata(): array; -} diff --git a/vendor/symfony/cache-contracts/LICENSE b/vendor/symfony/cache-contracts/LICENSE deleted file mode 100644 index 7536caea..00000000 --- a/vendor/symfony/cache-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache-contracts/NamespacedPoolInterface.php b/vendor/symfony/cache-contracts/NamespacedPoolInterface.php deleted file mode 100644 index cd67bc09..00000000 --- a/vendor/symfony/cache-contracts/NamespacedPoolInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Enables namespace-based invalidation by prefixing keys with backend-native namespace separators. - * - * Note that calling `withSubNamespace()` MUST NOT mutate the pool, but return a new instance instead. - * - * When tags are used, they MUST ignore sub-namespaces. - * - * @author Nicolas Grekas - */ -interface NamespacedPoolInterface -{ - /** - * @throws InvalidArgumentException If the namespace contains characters found in ItemInterface's RESERVED_CHARACTERS - */ - public function withSubNamespace(string $namespace): static; -} diff --git a/vendor/symfony/cache-contracts/README.md b/vendor/symfony/cache-contracts/README.md deleted file mode 100644 index ffe0833a..00000000 --- a/vendor/symfony/cache-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Cache Contracts -======================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php b/vendor/symfony/cache-contracts/TagAwareCacheInterface.php deleted file mode 100644 index 8e0b6be8..00000000 --- a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Allows invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareCacheInterface extends CacheInterface -{ - /** - * Invalidates cached items using tags. - * - * When implemented on a PSR-6 pool, invalidation should not apply - * to deferred items. Instead, they should be committed as usual. - * This allows replacing old tagged values by new ones without - * race conditions. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool True on success - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags): bool; -} diff --git a/vendor/symfony/cache-contracts/composer.json b/vendor/symfony/cache-contracts/composer.json deleted file mode 100644 index b713c290..00000000 --- a/vendor/symfony/cache-contracts/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/cache-contracts", - "type": "library", - "description": "Generic abstractions related to caching", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.1", - "psr/cache": "^3.0" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Cache\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "3.6-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractAdapter.php b/vendor/symfony/cache/Adapter/AbstractAdapter.php deleted file mode 100644 index 2b4bc8b2..00000000 --- a/vendor/symfony/cache/Adapter/AbstractAdapter.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; - -/** - * @author Nicolas Grekas - */ -abstract class AbstractAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = ':'; - - private static bool $apcuSupported; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - if ('' !== $namespace) { - if (str_contains($namespace, static::NS_SEPARATOR)) { - if (str_contains($namespace, static::NS_SEPARATOR.static::NS_SEPARATOR)) { - throw new InvalidArgumentException(\sprintf('Cache namespace "%s" contains empty sub-namespace.', $namespace)); - } - CacheItem::validateKey(str_replace(static::NS_SEPARATOR, '', $namespace)); - } else { - CacheItem::validateKey($namespace); - } - $this->namespace = $namespace.static::NS_SEPARATOR; - } - $this->rootNamespace = $this->namespace; - - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(\sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ??= \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - $item->unpack(); - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ??= \Closure::bind( - static function ($deferred, $namespace, &$expiredIds, $getId, $defaultLifetime) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - $byLifetime[$ttl][$getId($key)] = $item->pack(); - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Returns the best possible adapter that your runtime supports. - * - * Using ApcuAdapter makes system caches compatible with read-only filesystems. - */ - public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, ?LoggerInterface $logger = null): AdapterInterface - { - $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); - if (null !== $logger) { - $opcache->setLogger($logger); - } - - if (!self::$apcuSupported ??= ApcuAdapter::isSupported()) { - return $opcache; - } - - if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { - return $opcache; - } - - $apcu = new ApcuAdapter($namespace, intdiv($defaultLifetime, 5), $version); - if (null !== $logger) { - $apcu->setLogger($logger); - } - - return new ChainAdapter([$apcu, $opcache]); - } - - public static function createConnection(#[\SensitiveParameter] string $dsn, array $options = []): mixed - { - if (str_starts_with($dsn, 'redis:') || str_starts_with($dsn, 'rediss:') || str_starts_with($dsn, 'valkey:') || str_starts_with($dsn, 'valkeys:')) { - return RedisAdapter::createConnection($dsn, $options); - } - if (str_starts_with($dsn, 'memcached:')) { - return MemcachedAdapter::createConnection($dsn, $options); - } - if (str_starts_with($dsn, 'couchbase:')) { - if (class_exists(\CouchbaseBucket::class) && CouchbaseBucketAdapter::isSupported()) { - return CouchbaseBucketAdapter::createConnection($dsn, $options); - } - - return CouchbaseCollectionAdapter::createConnection($dsn, $options); - } - if (preg_match('/^(mysql|oci|pgsql|sqlsrv|sqlite):/', $dsn)) { - return PdoAdapter::createConnection($dsn, $options); - } - - throw new InvalidArgumentException('Unsupported DSN: it does not start with "redis[s]:", "valkey[s]:", "memcached:", "couchbase:", "mysql:", "oci:", "pgsql:", "sqlsrv:" nor "sqlite:".'); - } - - public function commit(): bool - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $this->namespace, $expiredIds, $this->getId(...), $this->defaultLifetime); - $retry = $this->deferred = []; - - if ($expiredIds) { - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $e = $this->doSave($values, $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->rootNamespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $e = $this->doSave([$id => $v], $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->rootNamespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php deleted file mode 100644 index 23db2b6e..00000000 --- a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php +++ /dev/null @@ -1,338 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\NamespacedPoolInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * Abstract for native TagAware adapters. - * - * To keep info on tags, the tags are both serialized as part of cache value and provided as tag ids - * to Adapters on operations when needed for storage to doSave(), doDelete() & doInvalidate(). - * - * @author Nicolas Grekas - * @author André Rømcke - * - * @internal - */ -abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, AdapterInterface, NamespacedPoolInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = ':'; - - private const TAGS_PREFIX = "\1tags\1"; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - if ('' !== $namespace) { - if (str_contains($namespace, static::NS_SEPARATOR)) { - if (str_contains($namespace, static::NS_SEPARATOR.static::NS_SEPARATOR)) { - throw new InvalidArgumentException(\sprintf('Cache namespace "%s" contains empty sub-namespace.', $namespace)); - } - CacheItem::validateKey(str_replace(static::NS_SEPARATOR, '', $namespace)); - } else { - CacheItem::validateKey($namespace); - } - $this->namespace = $namespace.static::NS_SEPARATOR; - } - $this->rootNamespace = $this->namespace; - - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(\sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ??= \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->isTaggable = true; - // If structure does not match what we expect return item as is (no value and not a hit) - if (!\is_array($value) || !\array_key_exists('value', $value)) { - return $item; - } - $item->isHit = $isHit; - // Extract value, tags and meta data from the cache value - $item->value = $value['value']; - $item->metadata[CacheItem::METADATA_TAGS] = isset($value['tags']) ? array_combine($value['tags'], $value['tags']) : []; - if (isset($value['meta'])) { - // For compactness these values are packed, & expiry is offset to reduce size - $v = unpack('Ve/Nc', $value['meta']); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ??= \Closure::bind( - static function ($deferred, &$expiredIds, $getId, $tagPrefix, $defaultLifetime, $rootNamespace) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - // Store Value and Tags on the cache value - if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) { - $value = ['value' => $item->value, 'tags' => $metadata[CacheItem::METADATA_TAGS]]; - unset($metadata[CacheItem::METADATA_TAGS]); - } else { - $value = ['value' => $item->value, 'tags' => []]; - } - - if ($metadata) { - // For compactness, expiry and creation duration are packed, using magic numbers as separators - $value['meta'] = pack('VN', (int) (0.1 + $metadata[CacheItem::METADATA_EXPIRY] - CacheItem::METADATA_EXPIRY_OFFSET), $metadata[CacheItem::METADATA_CTIME]); - } - - // Extract tag changes, these should be removed from values in doSave() - $value['tag-operations'] = ['add' => [], 'remove' => []]; - $oldTags = $item->metadata[CacheItem::METADATA_TAGS] ?? []; - foreach (array_diff_key($value['tags'], $oldTags) as $addedTag) { - $value['tag-operations']['add'][] = $getId($tagPrefix.$addedTag, $rootNamespace); - } - foreach (array_diff_key($oldTags, $value['tags']) as $removedTag) { - $value['tag-operations']['remove'][] = $getId($tagPrefix.$removedTag, $rootNamespace); - } - $value['tags'] = array_keys($value['tags']); - - $byLifetime[$ttl][$getId($key)] = $value; - $item->metadata = $item->newMetadata; - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * @param array[] $addTagData Hash where key is tag id, and array value is list of cache id's to add to tag - * @param array[] $removeTagData Hash where key is tag id, and array value is list of cache id's to remove to tag - * - * @return array The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array; - - /** - * Removes multiple items from the pool and their corresponding tags. - * - * @param array $ids An array of identifiers that should be removed from the pool - */ - abstract protected function doDelete(array $ids): bool; - - /** - * Removes relations between tags and deleted items. - * - * @param array $tagData Array of tag => key identifiers that should be removed from the pool - */ - abstract protected function doDeleteTagRelations(array $tagData): bool; - - /** - * Invalidates cached items using tags. - * - * @param string[] $tagIds An array of tags to invalidate, key is tag and value is tag id - */ - abstract protected function doInvalidate(array $tagIds): bool; - - /** - * Delete items and yields the tags they were bound to. - */ - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($this->doFetch($ids) as $id => $value) { - yield $id => \is_array($value) && \is_array($value['tags'] ?? null) ? $value['tags'] : []; - } - - $this->doDelete($ids); - } - - public function commit(): bool - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $expiredIds, $this->getId(...), self::TAGS_PREFIX, $this->defaultLifetime, $this->rootNamespace); - $retry = $this->deferred = []; - - if ($expiredIds) { - // Tags are not cleaned up in this case, however that is done on invalidateTags(). - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $values = $this->extractTagData($values, $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if ([] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->rootNamespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $values = $this->extractTagData([$id => $v], $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if ([] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = \sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->rootNamespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } - - public function deleteItems(array $keys): bool - { - if (!$keys) { - return true; - } - - $ok = true; - $ids = []; - $tagData = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - foreach ($this->doDeleteYieldTags(array_values($ids)) as $id => $tags) { - foreach ($tags as $tag) { - $tagData[$this->getId(self::TAGS_PREFIX.$tag, $this->rootNamespace)][] = $id; - } - } - } catch (\Exception) { - $ok = false; - } - - try { - if ((!$tagData || $this->doDeleteTagRelations($tagData)) && $ok) { - return true; - } - } catch (\Exception) { - } - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - public function invalidateTags(array $tags): bool - { - if (!$tags) { - return false; - } - - $tagIds = []; - foreach (array_unique($tags) as $tag) { - $tagIds[] = $this->getId(self::TAGS_PREFIX.$tag, $this->rootNamespace); - } - - try { - if ($this->doInvalidate($tagIds)) { - return true; - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to invalidate tags: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return false; - } - - /** - * Extracts tags operation data from $values set in mergeByLifetime, and returns values without it. - */ - private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array - { - $addTagData = $removeTagData = []; - foreach ($values as $id => $value) { - foreach ($value['tag-operations']['add'] as $tag => $tagId) { - $addTagData[$tagId][] = $id; - } - - foreach ($value['tag-operations']['remove'] as $tag => $tagId) { - $removeTagData[$tagId][] = $id; - } - - unset($values[$id]['tag-operations']); - } - - return $values; - } -} diff --git a/vendor/symfony/cache/Adapter/AdapterInterface.php b/vendor/symfony/cache/Adapter/AdapterInterface.php deleted file mode 100644 index e5567209..00000000 --- a/vendor/symfony/cache/Adapter/AdapterInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; - -// Help opcache.preload discover always-needed symbols -class_exists(CacheItem::class); - -/** - * Interface for adapters managing instances of Symfony's CacheItem. - * - * @author Kévin Dunglas - */ -interface AdapterInterface extends CacheItemPoolInterface -{ - public function getItem(mixed $key): CacheItem; - - /** - * @return iterable - */ - public function getItems(array $keys = []): iterable; - - public function clear(string $prefix = ''): bool; -} diff --git a/vendor/symfony/cache/Adapter/ApcuAdapter.php b/vendor/symfony/cache/Adapter/ApcuAdapter.php deleted file mode 100644 index b234909f..00000000 --- a/vendor/symfony/cache/Adapter/ApcuAdapter.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Nicolas Grekas - */ -class ApcuAdapter extends AbstractAdapter -{ - /** - * @throws CacheException if APCu is not enabled - */ - public function __construct( - string $namespace = '', - int $defaultLifetime = 0, - ?string $version = null, - private ?MarshallerInterface $marshaller = null, - ) { - if (!static::isSupported()) { - throw new CacheException('APCu is not enabled.'); - } - if ('cli' === \PHP_SAPI) { - ini_set('apc.use_request_time', 0); - } - parent::__construct($namespace, $defaultLifetime); - - if (null !== $version) { - CacheItem::validateKey($version); - - if (!apcu_exists($version.'@'.$namespace)) { - $this->doClear($namespace); - apcu_add($version.'@'.$namespace, null); - } - } - } - - public static function isSupported(): bool - { - return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL); - } - - protected function doFetch(array $ids): iterable - { - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - $values = []; - foreach (apcu_fetch($ids, $ok) ?: [] as $k => $v) { - if (null !== $v || $ok) { - $values[$k] = null !== $this->marshaller ? $this->marshaller->unmarshall($v) : $v; - } - } - - return $values; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - protected function doHave(string $id): bool - { - return apcu_exists($id); - } - - protected function doClear(string $namespace): bool - { - return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) - ? apcu_delete(new \APCUIterator(\sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) - : apcu_clear_cache(); - } - - protected function doDelete(array $ids): bool - { - foreach ($ids as $id) { - apcu_delete($id); - } - - return true; - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (null !== $this->marshaller && (!$values = $this->marshaller->marshall($values, $failed))) { - return $failed; - } - - if (false === $failures = apcu_store($values, null, $lifetime)) { - $failures = $values; - } - - return array_keys($failures); - } -} diff --git a/vendor/symfony/cache/Adapter/ArrayAdapter.php b/vendor/symfony/cache/Adapter/ArrayAdapter.php deleted file mode 100644 index c9ee94ee..00000000 --- a/vendor/symfony/cache/Adapter/ArrayAdapter.php +++ /dev/null @@ -1,399 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Clock\ClockInterface; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; - -/** - * An in-memory cache storage. - * - * Acts as a least-recently-used (LRU) storage when configured with a maximum number of items. - * - * @author Nicolas Grekas - */ -class ArrayAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface, LoggerAwareInterface, ResettableInterface -{ - use LoggerAwareTrait; - - private array $values = []; - private array $tags = []; - private array $expiries = []; - private array $subPools = []; - - private static \Closure $createCacheItem; - - /** - * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise - */ - public function __construct( - private int $defaultLifetime = 0, - private bool $storeSerialized = true, - private float $maxLifetime = 0, - private int $maxItems = 0, - private ?ClockInterface $clock = null, - ) { - if (0 > $maxLifetime) { - throw new InvalidArgumentException(\sprintf('Argument $maxLifetime must be positive, %F passed.', $maxLifetime)); - } - - if (0 > $maxItems) { - throw new InvalidArgumentException(\sprintf('Argument $maxItems must be a positive integer, %d passed.', $maxItems)); - } - - self::$createCacheItem ??= \Closure::bind( - static function ($key, $value, $isHit, $tags) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - if (null !== $tags) { - $item->metadata[CacheItem::METADATA_TAGS] = $tags; - } - - return $item; - }, - null, - CacheItem::class - ); - } - - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - $item = $this->getItem($key); - $metadata = $item->getMetadata(); - - // ArrayAdapter works in memory, we don't care about stampede protection - if (\INF === $beta || !$item->isHit()) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $this->save($item); - } - } - - return $item->get(); - } - - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - public function hasItem(mixed $key): bool - { - if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > $this->getCurrentTime()) { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - return true; - } - \assert('' !== CacheItem::validateKey($key)); - - return isset($this->expiries[$key]) && !$this->deleteItem($key); - } - - public function getItem(mixed $key): CacheItem - { - if (!$isHit = $this->hasItem($key)) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - - return (self::$createCacheItem)($key, $value, $isHit, $this->tags[$key] ?? null); - } - - public function getItems(array $keys = []): iterable - { - \assert(self::validateKeys($keys)); - - return $this->generateItems($keys, $this->getCurrentTime(), self::$createCacheItem); - } - - public function deleteItem(mixed $key): bool - { - \assert('' !== CacheItem::validateKey($key)); - unset($this->values[$key], $this->tags[$key], $this->expiries[$key]); - - return true; - } - - public function deleteItems(array $keys): bool - { - foreach ($keys as $key) { - $this->deleteItem($key); - } - - return true; - } - - public function save(CacheItemInterface $item): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $item = (array) $item; - $key = $item["\0*\0key"]; - $value = $item["\0*\0value"]; - $expiry = $item["\0*\0expiry"]; - - $now = $this->getCurrentTime(); - - if (null !== $expiry) { - if (!$expiry) { - $expiry = \PHP_INT_MAX; - } elseif ($expiry <= $now) { - $this->deleteItem($key); - - return true; - } - } - if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) { - return false; - } - if (null === $expiry && 0 < $this->defaultLifetime) { - $expiry = $this->defaultLifetime; - $expiry = $now + ($expiry > ($this->maxLifetime ?: $expiry) ? $this->maxLifetime : $expiry); - } elseif ($this->maxLifetime && (null === $expiry || $expiry > $now + $this->maxLifetime)) { - $expiry = $now + $this->maxLifetime; - } - - if ($this->maxItems) { - unset($this->values[$key], $this->tags[$key]); - - // Iterate items and vacuum expired ones while we are at it - foreach ($this->values as $k => $v) { - if ($this->expiries[$k] > $now && \count($this->values) < $this->maxItems) { - break; - } - - unset($this->values[$k], $this->tags[$k], $this->expiries[$k]); - } - } - - $this->values[$key] = $value; - $this->expiries[$key] = $expiry ?? \PHP_INT_MAX; - - if (null === $this->tags[$key] = $item["\0*\0newMetadata"][CacheItem::METADATA_TAGS] ?? null) { - unset($this->tags[$key]); - } - - return true; - } - - public function saveDeferred(CacheItemInterface $item): bool - { - return $this->save($item); - } - - public function commit(): bool - { - return true; - } - - public function clear(string $prefix = ''): bool - { - if ('' !== $prefix) { - $now = $this->getCurrentTime(); - - foreach ($this->values as $key => $value) { - if (!isset($this->expiries[$key]) || $this->expiries[$key] <= $now || str_starts_with($key, $prefix)) { - unset($this->values[$key], $this->tags[$key], $this->expiries[$key]); - } - } - - return true; - } - - foreach ($this->subPools as $pool) { - $pool->clear(); - } - - $this->subPools = $this->values = $this->tags = $this->expiries = []; - - return true; - } - - public function withSubNamespace(string $namespace): static - { - CacheItem::validateKey($namespace); - - $subPools = $this->subPools; - - if (isset($subPools[$namespace])) { - return $subPools[$namespace]; - } - - $this->subPools = []; - $clone = clone $this; - $clone->clear(); - - $subPools[$namespace] = $clone; - $this->subPools = $subPools; - - return $clone; - } - - /** - * Returns all cached values, with cache miss as null. - */ - public function getValues(): array - { - if (!$this->storeSerialized) { - return $this->values; - } - - $values = $this->values; - foreach ($values as $k => $v) { - if (null === $v || 'N;' === $v) { - continue; - } - if (!\is_string($v) || !isset($v[2]) || ':' !== $v[1]) { - $values[$k] = serialize($v); - } - } - - return $values; - } - - public function reset(): void - { - $this->clear(); - } - - public function __clone() - { - foreach ($this->subPools as $i => $pool) { - $this->subPools[$i] = clone $pool; - } - } - - private function generateItems(array $keys, float $now, \Closure $f): \Generator - { - foreach ($keys as $i => $key) { - if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > $now || !$this->deleteItem($key))) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - unset($keys[$i]); - - yield $key => $f($key, $value, $isHit, $this->tags[$key] ?? null); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - private function freeze($value, string $key): string|int|float|bool|array|\UnitEnum|null - { - if (null === $value) { - return 'N;'; - } - if (\is_string($value)) { - // Serialize strings if they could be confused with serialized objects or arrays - if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) { - return serialize($value); - } - } elseif (!\is_scalar($value)) { - try { - $serialized = serialize($value); - } catch (\Exception $e) { - if (!isset($this->expiries[$key])) { - unset($this->values[$key]); - } - $type = get_debug_type($value); - $message = \sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage()); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return null; - } - // Keep value serialized if it contains any objects or any internal references - if ('C' === $serialized[0] || 'O' === $serialized[0] || preg_match('/;[OCRr]:[1-9]/', $serialized)) { - return $serialized; - } - } - - return $value; - } - - private function unfreeze(string $key, bool &$isHit): mixed - { - if ('N;' === $value = $this->values[$key]) { - return null; - } - if (\is_string($value) && isset($value[2]) && ':' === $value[1]) { - try { - $value = unserialize($value); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to unserialize key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $value = false; - } - if (false === $value) { - $value = null; - $isHit = false; - - if (!$this->maxItems) { - $this->values[$key] = null; - } - } - } - - return $value; - } - - private function validateKeys(array $keys): bool - { - foreach ($keys as $key) { - if (!\is_string($key) || !isset($this->expiries[$key])) { - CacheItem::validateKey($key); - } - } - - return true; - } - - private function getCurrentTime(): float - { - return $this->clock?->now()->format('U.u') ?? microtime(true); - } -} diff --git a/vendor/symfony/cache/Adapter/ChainAdapter.php b/vendor/symfony/cache/Adapter/ChainAdapter.php deleted file mode 100644 index c27faeb1..00000000 --- a/vendor/symfony/cache/Adapter/ChainAdapter.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\BadMethodCallException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Chains several adapters together. - * - * Cached items are fetched from the first adapter having them in its data store. - * They are saved and deleted in all adapters at once. - * - * @author Kévin Dunglas - */ -class ChainAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - - private array $adapters = []; - private int $adapterCount; - - private static \Closure $syncItem; - - /** - * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items - * @param int $defaultLifetime The default lifetime of items propagated from lower adapters to upper ones - */ - public function __construct( - array $adapters, - private int $defaultLifetime = 0, - ) { - if (!$adapters) { - throw new InvalidArgumentException('At least one adapter must be specified.'); - } - - foreach ($adapters as $adapter) { - if (!$adapter instanceof CacheItemPoolInterface) { - throw new InvalidArgumentException(\sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); - } - if ('cli' === \PHP_SAPI && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOL)) { - continue; // skip putting APCu in the chain when the backend is disabled - } - - if ($adapter instanceof AdapterInterface) { - $this->adapters[] = $adapter; - } else { - $this->adapters[] = new ProxyAdapter($adapter); - } - } - $this->adapterCount = \count($this->adapters); - - self::$syncItem ??= \Closure::bind( - static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) { - $sourceItem->isTaggable = false; - $sourceMetadata ??= $sourceItem->metadata; - - $item->value = $sourceItem->value; - $item->isHit = $sourceItem->isHit; - $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata; - - if (isset($item->metadata[CacheItem::METADATA_EXPIRY])) { - $item->expiresAt(\DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $item->metadata[CacheItem::METADATA_EXPIRY]))); - } elseif (0 < $defaultLifetime) { - $item->expiresAfter($defaultLifetime); - } - - return $item; - }, - null, - CacheItem::class - ); - } - - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - $doSave = true; - $callback = static function (CacheItem $item, bool &$save) use ($callback, &$doSave) { - $value = $callback($item, $save); - $doSave = $save; - - return $value; - }; - - $wrap = function (?CacheItem $item = null, bool &$save = true) use ($key, $callback, $beta, &$wrap, &$doSave, &$metadata) { - static $lastItem; - static $i = 0; - $adapter = $this->adapters[$i]; - if (isset($this->adapters[++$i])) { - $callback = $wrap; - $beta = \INF === $beta ? \INF : 0; - } - if ($adapter instanceof CacheInterface) { - $value = $adapter->get($key, $callback, $beta, $metadata); - } else { - $value = $this->doGet($adapter, $key, $callback, $beta, $metadata); - } - if (null !== $item) { - (self::$syncItem)($lastItem ??= $item, $item, $this->defaultLifetime, $metadata); - } - $save = $doSave; - - return $value; - }; - - return $wrap(); - } - - public function getItem(mixed $key): CacheItem - { - $syncItem = self::$syncItem; - $misses = []; - - foreach ($this->adapters as $i => $adapter) { - $item = $adapter->getItem($key); - - if ($item->isHit()) { - while (0 <= --$i) { - $this->adapters[$i]->save($syncItem($item, $misses[$i], $this->defaultLifetime)); - } - - return $item; - } - - $misses[$i] = $item; - } - - return $item; - } - - public function getItems(array $keys = []): iterable - { - return $this->generateItems($this->adapters[0]->getItems($keys), 0); - } - - private function generateItems(iterable $items, int $adapterIndex): \Generator - { - $missing = []; - $misses = []; - $nextAdapterIndex = $adapterIndex + 1; - $nextAdapter = $this->adapters[$nextAdapterIndex] ?? null; - - foreach ($items as $k => $item) { - if (!$nextAdapter || $item->isHit()) { - yield $k => $item; - } else { - $missing[] = $k; - $misses[$k] = $item; - } - } - - if ($missing) { - $syncItem = self::$syncItem; - $adapter = $this->adapters[$adapterIndex]; - $items = $this->generateItems($nextAdapter->getItems($missing), $nextAdapterIndex); - - foreach ($items as $k => $item) { - if ($item->isHit()) { - $adapter->save($syncItem($item, $misses[$k], $this->defaultLifetime)); - } - - yield $k => $item; - } - } - } - - public function hasItem(mixed $key): bool - { - foreach ($this->adapters as $adapter) { - if ($adapter->hasItem($key)) { - return true; - } - } - - return false; - } - - public function clear(string $prefix = ''): bool - { - $cleared = true; - $i = $this->adapterCount; - - while ($i--) { - if ($this->adapters[$i] instanceof AdapterInterface) { - $cleared = $this->adapters[$i]->clear($prefix) && $cleared; - } else { - $cleared = $this->adapters[$i]->clear() && $cleared; - } - } - - return $cleared; - } - - public function deleteItem(mixed $key): bool - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItem($key) && $deleted; - } - - return $deleted; - } - - public function deleteItems(array $keys): bool - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItems($keys) && $deleted; - } - - return $deleted; - } - - public function save(CacheItemInterface $item): bool - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->save($item) && $saved; - } - - return $saved; - } - - public function saveDeferred(CacheItemInterface $item): bool - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->saveDeferred($item) && $saved; - } - - return $saved; - } - - public function commit(): bool - { - $committed = true; - $i = $this->adapterCount; - - while ($i--) { - $committed = $this->adapters[$i]->commit() && $committed; - } - - return $committed; - } - - public function prune(): bool - { - $pruned = true; - - foreach ($this->adapters as $adapter) { - if ($adapter instanceof PruneableInterface) { - $pruned = $adapter->prune() && $pruned; - } - } - - return $pruned; - } - - public function withSubNamespace(string $namespace): static - { - $clone = clone $this; - $adapters = []; - - foreach ($this->adapters as $adapter) { - if (!$adapter instanceof NamespacedPoolInterface) { - throw new BadMethodCallException('All adapters must implement NamespacedPoolInterface to support namespaces.'); - } - - $adapters[] = $adapter->withSubNamespace($namespace); - } - $clone->adapters = $adapters; - - return $clone; - } - - public function reset(): void - { - foreach ($this->adapters as $adapter) { - if ($adapter instanceof ResetInterface) { - $adapter->reset(); - } - } - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php deleted file mode 100644 index 106d7fdd..00000000 --- a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php +++ /dev/null @@ -1,237 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -trigger_deprecation('symfony/cache', '7.1', 'The "%s" class is deprecated, use "%s" instead.', CouchbaseBucketAdapter::class, CouchbaseCollectionAdapter::class); - -/** - * @author Antonio Jose Cerezo Aranda - * - * @deprecated since Symfony 7.1, use {@see CouchbaseCollectionAdapter} instead - */ -class CouchbaseBucketAdapter extends AbstractAdapter -{ - private const THIRTY_DAYS_IN_SECONDS = 2592000; - private const MAX_KEY_LENGTH = 250; - private const KEY_NOT_FOUND = 13; - private const VALID_DSN_OPTIONS = [ - 'operationTimeout', - 'configTimeout', - 'configNodeTimeout', - 'n1qlTimeout', - 'httpTimeout', - 'configDelay', - 'htconfigIdleTimeout', - 'durabilityInterval', - 'durabilityTimeout', - ]; - - private MarshallerInterface $marshaller; - - public function __construct( - private \CouchbaseBucket $bucket, - string $namespace = '', - int $defaultLifetime = 0, - ?MarshallerInterface $marshaller = null, - ) { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function createConnection(#[\SensitiveParameter] array|string $servers, array $options = []): \CouchbaseBucket - { - if (\is_string($servers)) { - $servers = [$servers]; - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - set_error_handler(static fn ($type, $msg, $file, $line) => throw new \ErrorException($msg, 0, $type, $file, $line)); - - $dsnPattern = '/^(?couchbase(?:s)?)\:\/\/(?:(?[^\:]+)\:(?[^\@]{6,})@)?' - .'(?[^\:]+(?:\:\d+)?)(?:\/(?[^\?]+))(?:\?(?.*))?$/i'; - - $newServers = []; - $protocol = 'couchbase'; - try { - $options = self::initOptions($options); - $username = $options['username']; - $password = $options['password']; - - foreach ($servers as $dsn) { - if (!str_starts_with($dsn, 'couchbase:')) { - throw new InvalidArgumentException('Invalid Couchbase DSN: it does not start with "couchbase:".'); - } - - preg_match($dsnPattern, $dsn, $matches); - - $username = $matches['username'] ?: $username; - $password = $matches['password'] ?: $password; - $protocol = $matches['protocol'] ?: $protocol; - - if (isset($matches['options'])) { - $optionsInDsn = self::getOptions($matches['options']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $matches['host']; - } - - $connectionString = $protocol.'://'.implode(',', $newServers); - - $client = new \CouchbaseCluster($connectionString); - $client->authenticateAs($username, $password); - - $bucket = $client->openBucket($matches['bucketName']); - - unset($options['username'], $options['password']); - foreach ($options as $option => $value) { - if ($value) { - $bucket->$option = $value; - } - } - - return $bucket; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '2.6.0', '>=') && version_compare(phpversion('couchbase'), '3.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - if (\in_array($key, static::VALID_DSN_OPTIONS, true)) { - $results[$key] = $value; - } - } - - return $results; - } - - private static function initOptions(array $options): array - { - $options['username'] ??= ''; - $options['password'] ??= ''; - $options['operationTimeout'] ??= 0; - $options['configTimeout'] ??= 0; - $options['configNodeTimeout'] ??= 0; - $options['n1qlTimeout'] ??= 0; - $options['httpTimeout'] ??= 0; - $options['configDelay'] ??= 0; - $options['htconfigIdleTimeout'] ??= 0; - $options['durabilityInterval'] ??= 0; - $options['durabilityTimeout'] ??= 0; - - return $options; - } - - protected function doFetch(array $ids): iterable - { - $resultsCouchbase = $this->bucket->get($ids); - - $results = []; - foreach ($resultsCouchbase as $key => $value) { - if (null !== $value->error) { - continue; - } - $results[$key] = $this->marshaller->unmarshall($value->value); - } - - return $results; - } - - protected function doHave(string $id): bool - { - return false !== $this->bucket->get($id); - } - - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - $this->bucket->manager()->flush(); - - return true; - } - - return false; - } - - protected function doDelete(array $ids): bool - { - $results = $this->bucket->remove(array_values($ids)); - - foreach ($results as $key => $result) { - if (null !== $result->error && static::KEY_NOT_FOUND !== $result->error->getCode()) { - continue; - } - unset($results[$key]); - } - - return 0 === \count($results); - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $lifetime = $this->normalizeExpiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - $result = $this->bucket->upsert($key, $value, ['expiry' => $lifetime]); - - if (null !== $result->error) { - $ko[$key] = $result; - } - } - - return [] === $ko ? true : $ko; - } - - private function normalizeExpiry(int $expiry): int - { - if ($expiry && $expiry > static::THIRTY_DAYS_IN_SECONDS) { - $expiry += time(); - } - - return $expiry; - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php deleted file mode 100644 index 9646bc34..00000000 --- a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Couchbase\Bucket; -use Couchbase\Cluster; -use Couchbase\ClusterOptions; -use Couchbase\Collection; -use Couchbase\DocumentNotFoundException; -use Couchbase\UpsertOptions; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Antonio Jose Cerezo Aranda - */ -class CouchbaseCollectionAdapter extends AbstractAdapter -{ - private const MAX_KEY_LENGTH = 250; - - private MarshallerInterface $marshaller; - - public function __construct( - private Collection $connection, - string $namespace = '', - int $defaultLifetime = 0, - ?MarshallerInterface $marshaller = null, - ) { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.5 < 4.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function createConnection(#[\SensitiveParameter] array|string $dsn, array $options = []): Bucket|Collection - { - if (\is_string($dsn)) { - $dsn = [$dsn]; - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.5 < 4.0.0 is required.'); - } - - set_error_handler(static fn ($type, $msg, $file, $line) => throw new \ErrorException($msg, 0, $type, $file, $line)); - - $pathPattern = '/^(?:\/(?[^\/\?]+))(?:(?:\/(?[^\/]+))(?:\/(?[^\/\?]+)))?(?:\/)?$/'; - $newServers = []; - $protocol = 'couchbase'; - try { - $username = $options['username'] ?? ''; - $password = $options['password'] ?? ''; - - foreach ($dsn as $server) { - if (!str_starts_with($server, 'couchbase:')) { - throw new InvalidArgumentException('Invalid Couchbase DSN: it does not start with "couchbase:".'); - } - - $params = parse_url($server); - - $username = isset($params['user']) ? rawurldecode($params['user']) : $username; - $password = isset($params['pass']) ? rawurldecode($params['pass']) : $password; - $protocol = $params['scheme'] ?? $protocol; - - if (isset($params['query'])) { - $optionsInDsn = self::getOptions($params['query']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $params['host']; - } - - $option = isset($params['query']) ? '?'.$params['query'] : ''; - $connectionString = $protocol.'://'.implode(',', $newServers).$option; - - $clusterOptions = new ClusterOptions(); - $clusterOptions->credentials($username, $password); - - $client = new Cluster($connectionString, $clusterOptions); - - preg_match($pathPattern, $params['path'] ?? '', $matches); - $bucket = $client->bucket($matches['bucketName']); - $collection = $bucket->defaultCollection(); - if (!empty($matches['scopeName'])) { - $scope = $bucket->scope($matches['scopeName']); - $collection = $scope->collection($matches['collectionName']); - } - - return $collection; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '3.0.5', '>=') && version_compare(phpversion('couchbase'), '4.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - $results[$key] = $value; - } - - return $results; - } - - protected function doFetch(array $ids): array - { - $results = []; - foreach ($ids as $id) { - try { - $resultCouchbase = $this->connection->get($id); - } catch (DocumentNotFoundException) { - continue; - } - - $content = $resultCouchbase->value ?? $resultCouchbase->content(); - - $results[$id] = $this->marshaller->unmarshall($content); - } - - return $results; - } - - protected function doHave($id): bool - { - return $this->connection->exists($id)->exists(); - } - - protected function doClear($namespace): bool - { - return false; - } - - protected function doDelete(array $ids): bool - { - $idsErrors = []; - foreach ($ids as $id) { - try { - $result = $this->connection->remove($id); - - if (null === $result->mutationToken()) { - $idsErrors[] = $id; - } - } catch (DocumentNotFoundException) { - } - } - - return 0 === \count($idsErrors); - } - - protected function doSave(array $values, $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $upsertOptions = new UpsertOptions(); - $upsertOptions->expiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - try { - $this->connection->upsert($key, $value, $upsertOptions); - } catch (\Exception) { - $ko[$key] = ''; - } - } - - return [] === $ko ? true : $ko; - } -} diff --git a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php b/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php deleted file mode 100644 index 8e52dfee..00000000 --- a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php +++ /dev/null @@ -1,398 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\DBAL\ArrayParameterType; -use Doctrine\DBAL\Configuration; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\Exception\TableNotFoundException; -use Doctrine\DBAL\ParameterType; -use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; -use Doctrine\DBAL\Schema\Name\Identifier; -use Doctrine\DBAL\Schema\Name\UnqualifiedName; -use Doctrine\DBAL\Schema\PrimaryKeyConstraint; -use Doctrine\DBAL\Schema\Schema; -use Doctrine\DBAL\Tools\DsnParser; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface -{ - private const MAX_KEY_LENGTH = 255; - - private MarshallerInterface $marshaller; - private Connection $conn; - private string $platformName; - private string $table = 'cache_items'; - private string $idCol = 'item_id'; - private string $dataCol = 'item_data'; - private string $lifetimeCol = 'item_lifetime'; - private string $timeCol = 'item_time'; - - /** - * You can either pass an existing database Doctrine DBAL Connection or - * a DSN string that will be used to connect to the database. - * - * The cache table is created automatically when possible. - * Otherwise, use the createTable() method. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct( - Connection|string $connOrDsn, - private string $namespace = '', - int $defaultLifetime = 0, - array $options = [], - ?MarshallerInterface $marshaller = null, - ) { - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof Connection) { - $this->conn = $connOrDsn; - } else { - if (!class_exists(DriverManager::class)) { - throw new InvalidArgumentException('Failed to parse DSN. Try running "composer require doctrine/dbal".'); - } - $params = (new DsnParser([ - 'db2' => 'ibm_db2', - 'mssql' => 'pdo_sqlsrv', - 'mysql' => 'pdo_mysql', - 'mysql2' => 'pdo_mysql', - 'postgres' => 'pdo_pgsql', - 'postgresql' => 'pdo_pgsql', - 'pgsql' => 'pdo_pgsql', - 'sqlite' => 'pdo_sqlite', - 'sqlite3' => 'pdo_sqlite', - ]))->parse($connOrDsn); - - $config = new Configuration(); - $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); - - $this->conn = DriverManager::getConnection($params, $config); - } - - $this->maxIdLength = self::MAX_KEY_LENGTH; - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws DBALException When the table already exists - */ - public function createTable(): void - { - $schema = new Schema(); - $this->addTableToSchema($schema); - - foreach ($schema->toSql($this->conn->getDatabasePlatform()) as $sql) { - $this->conn->executeStatement($sql); - } - } - - public function configureSchema(Schema $schema, Connection $forConnection, \Closure $isSameDatabase): void - { - if ($schema->hasTable($this->table)) { - return; - } - - if ($forConnection !== $this->conn && !$isSameDatabase($this->conn->executeStatement(...))) { - return; - } - - $this->addTableToSchema($schema); - } - - public function prune(): bool - { - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ?"; - $params = [time()]; - $paramTypes = [ParameterType::INTEGER]; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE ?"; - $params[] = \sprintf('%s%%', $this->namespace); - $paramTypes[] = ParameterType::STRING; - } - - try { - $this->conn->executeStatement($deleteSql, $params, $paramTypes); - } catch (TableNotFoundException) { - } - - return true; - } - - protected function doFetch(array $ids): iterable - { - $now = time(); - $expired = []; - - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN (?)"; - $result = $this->conn->executeQuery($sql, [ - $now, - $ids, - ], [ - ParameterType::INTEGER, - ArrayParameterType::STRING, - ])->iterateNumeric(); - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN (?)"; - $this->conn->executeStatement($sql, [ - $now, - $expired, - ], [ - ParameterType::INTEGER, - ArrayParameterType::STRING, - ]); - } - } - - protected function doHave(string $id): bool - { - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = ? AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ?)"; - $result = $this->conn->executeQuery($sql, [ - $id, - time(), - ], [ - ParameterType::STRING, - ParameterType::INTEGER, - ]); - - return (bool) $result->fetchOne(); - } - - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - $sql = $this->conn->getDatabasePlatform()->getTruncateTableSQL($this->table); - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $this->conn->executeStatement($sql); - } catch (TableNotFoundException) { - } - - return true; - } - - protected function doDelete(array $ids): bool - { - $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; - try { - $this->conn->executeStatement($sql, [array_values($ids)], [ArrayParameterType::STRING]); - } catch (TableNotFoundException) { - } - - return true; - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $platformName = $this->getPlatformName(); - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?)"; - - switch ($platformName) { - case 'mysql': - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci': - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv': - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite': - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql': - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $platformName = null; - $sql = "UPDATE $this->table SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ? WHERE $this->idCol = ?"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $this->conn->prepare($sql); - } catch (TableNotFoundException) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $stmt = $this->conn->prepare($sql); - } - - if ('sqlsrv' === $platformName || 'oci' === $platformName) { - $bind = static function ($id, $data) use ($stmt) { - $stmt->bindValue(1, $id); - $stmt->bindValue(2, $id); - $stmt->bindValue(3, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(6, $data, ParameterType::LARGE_OBJECT); - }; - $stmt->bindValue(4, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(5, $now, ParameterType::INTEGER); - $stmt->bindValue(7, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(8, $now, ParameterType::INTEGER); - } elseif (null !== $platformName) { - $bind = static function ($id, $data) use ($stmt) { - $stmt->bindValue(1, $id); - $stmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); - }; - $stmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(4, $now, ParameterType::INTEGER); - } else { - $stmt->bindValue(2, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(3, $now, ParameterType::INTEGER); - - $insertStmt = $this->conn->prepare($insertSql); - $insertStmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $insertStmt->bindValue(4, $now, ParameterType::INTEGER); - - $bind = static function ($id, $data) use ($stmt, $insertStmt) { - $stmt->bindValue(1, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(4, $id); - $insertStmt->bindValue(1, $id); - $insertStmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); - }; - } - - foreach ($values as $id => $data) { - $bind($id, $data); - try { - $rowCount = $stmt->executeStatement(); - } catch (TableNotFoundException) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $rowCount = $stmt->executeStatement(); - } - if (null === $platformName && 0 === $rowCount) { - try { - $insertStmt->executeStatement(); - } catch (DBALException) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - /** - * @internal - */ - protected function getId(mixed $key, ?string $namespace = null): string - { - if ('pgsql' !== $this->platformName ??= $this->getPlatformName()) { - return parent::getId($key, $namespace); - } - - if (str_contains($key, "\0") || str_contains($key, '%') || !preg_match('//u', $key)) { - $key = rawurlencode($key); - } - - return parent::getId($key, $namespace); - } - - private function getPlatformName(): string - { - if (isset($this->platformName)) { - return $this->platformName; - } - - $platform = $this->conn->getDatabasePlatform(); - - if (interface_exists(DBALException::class)) { - // DBAL 4+ - $sqlitePlatformClass = 'Doctrine\DBAL\Platforms\SQLitePlatform'; - } else { - $sqlitePlatformClass = 'Doctrine\DBAL\Platforms\SqlitePlatform'; - } - - return $this->platformName = match (true) { - $platform instanceof \Doctrine\DBAL\Platforms\AbstractMySQLPlatform => 'mysql', - $platform instanceof $sqlitePlatformClass => 'sqlite', - $platform instanceof \Doctrine\DBAL\Platforms\PostgreSQLPlatform => 'pgsql', - $platform instanceof \Doctrine\DBAL\Platforms\OraclePlatform => 'oci', - $platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform => 'sqlsrv', - default => $platform::class, - }; - } - - private function addTableToSchema(Schema $schema): void - { - $types = [ - 'mysql' => 'binary', - 'sqlite' => 'text', - ]; - - $table = $schema->createTable($this->table); - $table->addColumn($this->idCol, $types[$this->getPlatformName()] ?? 'string', ['length' => 255]); - $table->addColumn($this->dataCol, 'blob', ['length' => 16777215]); - $table->addColumn($this->lifetimeCol, 'integer', ['unsigned' => true, 'notnull' => false]); - $table->addColumn($this->timeCol, 'integer', ['unsigned' => true]); - - if (class_exists(PrimaryKeyConstraint::class)) { - $table->addPrimaryKeyConstraint(new PrimaryKeyConstraint(null, [new UnqualifiedName(Identifier::unquoted($this->idCol))], true)); - } else { - $table->setPrimaryKey([$this->idCol]); - } - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemAdapter.php b/vendor/symfony/cache/Adapter/FilesystemAdapter.php deleted file mode 100644 index 13daa568..00000000 --- a/vendor/symfony/cache/Adapter/FilesystemAdapter.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -class FilesystemAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemTrait; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php b/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php deleted file mode 100644 index 80edee43..00000000 --- a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php +++ /dev/null @@ -1,267 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -/** - * Stores tag id <> cache id relationship as a symlink, and lookup on invalidation calls. - * - * @author Nicolas Grekas - * @author André Rømcke - */ -class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements PruneableInterface -{ - use FilesystemTrait { - prune as private doPrune; - doClear as private doClearCache; - doSave as private doSaveCache; - } - - /** - * Folder used for tag symlinks. - */ - private const TAG_FOLDER = 'tags'; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null) - { - $this->marshaller = new TagAwareMarshaller($marshaller); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } - - public function prune(): bool - { - $ok = $this->doPrune(); - - set_error_handler(static function () {}); - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - try { - foreach ($this->scanHashDir($this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR) as $dir) { - $dir .= \DIRECTORY_SEPARATOR; - $keepDir = false; - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($dir.$chars[$i])) { - continue; - } - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($d = $dir.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - foreach (scandir($d, \SCANDIR_SORT_NONE) ?: [] as $link) { - if ('.' === $link || '..' === $link) { - continue; - } - if ('_' !== $dir[-2] && realpath($d.\DIRECTORY_SEPARATOR.$link)) { - $keepDir = true; - } else { - unlink($d.\DIRECTORY_SEPARATOR.$link); - } - } - $keepDir ?: rmdir($d); - } - $keepDir ?: rmdir($dir.$chars[$i]); - } - $keepDir ?: rmdir($dir); - } - } finally { - restore_error_handler(); - } - - return $ok; - } - - protected function doClear(string $namespace): bool - { - $ok = $this->doClearCache($namespace); - - if ('' !== $namespace) { - return $ok; - } - - set_error_handler(static function () {}); - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - $this->tmpSuffix ??= str_replace('/', '-', base64_encode(random_bytes(6))); - - try { - foreach ($this->scanHashDir($this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR) as $dir) { - if (rename($dir, $renamed = substr_replace($dir, $this->tmpSuffix.'_', -9))) { - $dir = $renamed.\DIRECTORY_SEPARATOR; - } else { - $dir .= \DIRECTORY_SEPARATOR; - $renamed = null; - } - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($dir.$chars[$i])) { - continue; - } - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($d = $dir.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - foreach (scandir($d, \SCANDIR_SORT_NONE) ?: [] as $link) { - if ('.' !== $link && '..' !== $link && (null !== $renamed || !realpath($d.\DIRECTORY_SEPARATOR.$link))) { - unlink($d.\DIRECTORY_SEPARATOR.$link); - } - } - null === $renamed ?: rmdir($d); - } - null === $renamed ?: rmdir($dir.$chars[$i]); - } - null === $renamed ?: rmdir($renamed); - } - } finally { - restore_error_handler(); - } - - return $ok; - } - - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array - { - $failed = $this->doSaveCache($values, $lifetime); - - // Add Tags as symlinks - foreach ($addTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - $file = $this->getFile($id); - - if (!@symlink($file, $tagLink = $this->getFile($id, true, $tagFolder)) && !is_link($tagLink)) { - @unlink($file); - $failed[] = $id; - } - } - } - - // Unlink removed Tags - foreach ($removeTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return $failed; - } - - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - - if (!@unlink($file)) { - fclose($h); - continue; - } - - $meta = explode("\n", fread($h, 4096), 3)[2] ?? ''; - - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 < \strlen($meta) && "\x9D" === $meta[0] && "\0" === $meta[5] && "\x5F" === $meta[9]) { - $meta[9] = "\0"; - $tagLen = unpack('Nlen', $meta, 9)['len']; - $meta = substr($meta, 13, $tagLen); - - if (0 < $tagLen -= \strlen($meta)) { - $meta .= fread($h, $tagLen); - } - - try { - yield $id => '' === $meta ? [] : $this->marshaller->unmarshall($meta); - } catch (\Exception) { - yield $id => []; - } - } - - fclose($h); - } - } - - protected function doDeleteTagRelations(array $tagData): bool - { - foreach ($tagData as $tagId => $idList) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($idList as $id) { - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return true; - } - - protected function doInvalidate(array $tagIds): bool - { - foreach ($tagIds as $tagId) { - if (!is_dir($tagFolder = $this->getTagFolder($tagId))) { - continue; - } - - $this->tmpSuffix ??= str_replace('/', '-', base64_encode(random_bytes(6))); - - set_error_handler(static function () {}); - - try { - if (rename($tagFolder, $renamed = substr_replace($tagFolder, $this->tmpSuffix.'_', -10))) { - $tagFolder = $renamed.\DIRECTORY_SEPARATOR; - } else { - $renamed = null; - } - - foreach ($this->scanHashDir($tagFolder) as $itemLink) { - unlink(realpath($itemLink) ?: $itemLink); - unlink($itemLink); - } - - if (null === $renamed) { - continue; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - for ($j = 0; $j < 38; ++$j) { - rmdir($tagFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]); - } - rmdir($tagFolder.$chars[$i]); - } - rmdir($renamed); - } finally { - restore_error_handler(); - } - } - - return true; - } - - private function getTagFolder(string $tagId): string - { - return $this->getFile($tagId, false, $this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR; - } -} diff --git a/vendor/symfony/cache/Adapter/MemcachedAdapter.php b/vendor/symfony/cache/Adapter/MemcachedAdapter.php deleted file mode 100644 index d882ef1b..00000000 --- a/vendor/symfony/cache/Adapter/MemcachedAdapter.php +++ /dev/null @@ -1,329 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Rob Frawley 2nd - * @author Nicolas Grekas - */ -class MemcachedAdapter extends AbstractAdapter -{ - /** - * We are replacing characters that are illegal in Memcached keys with reserved characters from - * {@see \Symfony\Contracts\Cache\ItemInterface::RESERVED_CHARACTERS} that are legal in Memcached. - * Note: don’t use {@see AbstractAdapter::NS_SEPARATOR}. - */ - private const RESERVED_MEMCACHED = " \n\r\t\v\f\0"; - private const RESERVED_PSR6 = '@()\{}/'; - private const MAX_KEY_LENGTH = 250; - - private MarshallerInterface $marshaller; - private \Memcached $client; - private \Memcached $lazyClient; - - /** - * Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged. - * Using a RedisAdapter is recommended instead. If you cannot do otherwise, be aware that: - * - the Memcached::OPT_BINARY_PROTOCOL must be enabled - * (that's the default when using MemcachedAdapter::createConnection()); - * - tags eviction by Memcached's LRU algorithm will break by-tags invalidation; - * your Memcached memory should be large enough to never trigger LRU. - * - * Using a MemcachedAdapter as a pure items store is fine. - */ - public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Memcached > 3.1.5 is required.'); - } - $this->maxIdLength = self::MAX_KEY_LENGTH; - - if ('Memcached' === $client::class) { - $opt = $client->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - $this->maxIdLength -= \strlen($client->getOption(\Memcached::OPT_PREFIX_KEY)); - $this->client = $client; - } else { - $this->lazyClient = $client; - } - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function isSupported(): bool - { - return \extension_loaded('memcached') && version_compare(phpversion('memcached'), '3.1.6', '>='); - } - - /** - * Creates a Memcached instance. - * - * By default, the binary protocol, no block, and libketama compatible options are enabled. - * - * Examples for servers: - * - 'memcached://user:pass@localhost?weight=33' - * - [['localhost', 11211, 33]] - * - * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs - * - * @throws \ErrorException When invalid options or servers are provided - */ - public static function createConnection(#[\SensitiveParameter] array|string $servers, array $options = []): \Memcached - { - if (\is_string($servers)) { - $servers = [$servers]; - } - if (!static::isSupported()) { - throw new CacheException('Memcached > 3.1.5 is required.'); - } - set_error_handler(static fn ($type, $msg, $file, $line) => throw new \ErrorException($msg, 0, $type, $file, $line)); - try { - $client = new \Memcached($options['persistent_id'] ?? null); - $username = $options['username'] ?? null; - $password = $options['password'] ?? null; - - // parse any DSN in $servers - foreach ($servers as $i => $dsn) { - if (\is_array($dsn)) { - continue; - } - if (!str_starts_with($dsn, 'memcached:')) { - throw new InvalidArgumentException('Invalid Memcached DSN: it does not start with "memcached:".'); - } - $params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) { - if (!empty($m[2])) { - [$username, $password] = explode(':', $m[2], 2) + [1 => null]; - $username = rawurldecode($username); - $password = null !== $password ? rawurldecode($password) : null; - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException('Invalid Memcached DSN.'); - } - $query = $hosts = []; - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException('Invalid Memcached DSN: query parameter "host" must be an array.'); - } - foreach ($hosts as $host => $weight) { - if (false === $port = strrpos($host, ':')) { - $hosts[$host] = [$host, 11211, (int) $weight]; - } else { - $hosts[$host] = [substr($host, 0, $port), (int) substr($host, 1 + $port), (int) $weight]; - } - } - $hosts = array_values($hosts); - unset($query['host']); - } - if ($hosts && !isset($params['host']) && !isset($params['path'])) { - unset($servers[$i]); - $servers = array_merge($servers, $hosts); - continue; - } - } - if (!isset($params['host']) && !isset($params['path'])) { - throw new InvalidArgumentException('Invalid Memcached DSN: missing host or path.'); - } - if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) { - $params['weight'] = $m[1]; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } - $params += [ - 'host' => $params['host'] ?? $params['path'], - 'port' => isset($params['host']) ? 11211 : null, - 'weight' => 0, - ]; - if ($query) { - $params += $query; - $options = $query + $options; - } - - $servers[$i] = [$params['host'], $params['port'], $params['weight']]; - - if ($hosts) { - $servers = array_merge($servers, $hosts); - } - } - - // set client's options - unset($options['persistent_id'], $options['username'], $options['password'], $options['weight'], $options['lazy']); - $options = array_change_key_case($options, \CASE_UPPER); - $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); - $client->setOption(\Memcached::OPT_NO_BLOCK, true); - $client->setOption(\Memcached::OPT_TCP_NODELAY, true); - if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) { - $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true); - } - foreach ($options as $name => $value) { - if (\is_int($name)) { - continue; - } - if ('HASH' === $name || 'SERIALIZER' === $name || 'DISTRIBUTION' === $name) { - $value = \constant('Memcached::'.$name.'_'.strtoupper($value)); - } - unset($options[$name]); - - if (\defined('Memcached::OPT_'.$name)) { - $options[\constant('Memcached::OPT_'.$name)] = $value; - } - } - $client->setOptions($options + [\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP]); - - // set client's servers, taking care of persistent connections - if (!$client->isPristine()) { - $oldServers = []; - foreach ($client->getServerList() as $server) { - $oldServers[] = [$server['host'], $server['port']]; - } - - $newServers = []; - foreach ($servers as $server) { - if (1 < \count($server)) { - $server = array_values($server); - unset($server[2]); - $server[1] = (int) $server[1]; - } - $newServers[] = $server; - } - - if ($oldServers !== $newServers) { - $client->resetServerList(); - $client->addServers($servers); - } - } else { - $client->addServers($servers); - } - - if (null !== $username || null !== $password) { - if (!method_exists($client, 'setSaslAuthData')) { - trigger_error('Missing SASL support: the memcached extension must be compiled with --enable-memcached-sasl.'); - } - $client->setSaslAuthData($username, $password); - } - - return $client; - } finally { - restore_error_handler(); - } - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - if ($lifetime && $lifetime > 30 * 86400) { - $lifetime += time(); - } - - $encodedValues = []; - foreach ($values as $key => $value) { - $encodedValues[self::encodeKey($key)] = $value; - } - - return $this->checkResultCode($this->getClient()->setMulti($encodedValues, $lifetime)) ? $failed : false; - } - - protected function doFetch(array $ids): iterable - { - try { - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - - $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds)); - - $result = []; - foreach ($encodedResult as $key => $value) { - $result[self::decodeKey($key)] = $this->marshaller->unmarshall($value); - } - - return $result; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - } - - protected function doHave(string $id): bool - { - return false !== $this->getClient()->get(self::encodeKey($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); - } - - protected function doDelete(array $ids): bool - { - $ok = true; - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) { - if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) { - $ok = false; - } - } - - return $ok; - } - - protected function doClear(string $namespace): bool - { - return '' === $namespace && $this->getClient()->flush(); - } - - private function checkResultCode(mixed $result): mixed - { - $code = $this->client->getResultCode(); - - if (\Memcached::RES_SUCCESS === $code || \Memcached::RES_NOTFOUND === $code) { - return $result; - } - - throw new CacheException('MemcachedAdapter client error: '.strtolower($this->client->getResultMessage())); - } - - private function getClient(): \Memcached - { - if (isset($this->client)) { - return $this->client; - } - - $opt = $this->lazyClient->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - if ('' !== $prefix = (string) $this->lazyClient->getOption(\Memcached::OPT_PREFIX_KEY)) { - throw new CacheException(\sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix)); - } - - return $this->client = $this->lazyClient; - } - - private static function encodeKey(string $key): string - { - return strtr($key, self::RESERVED_MEMCACHED, self::RESERVED_PSR6); - } - - private static function decodeKey(string $key): string - { - return strtr($key, self::RESERVED_PSR6, self::RESERVED_MEMCACHED); - } -} diff --git a/vendor/symfony/cache/Adapter/NullAdapter.php b/vendor/symfony/cache/Adapter/NullAdapter.php deleted file mode 100644 index 35553ea1..00000000 --- a/vendor/symfony/cache/Adapter/NullAdapter.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; - -/** - * @author Titouan Galopin - */ -class NullAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface -{ - private static \Closure $createCacheItem; - - public function __construct() - { - self::$createCacheItem ??= \Closure::bind( - static function ($key) { - $item = new CacheItem(); - $item->key = $key; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - } - - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - $save = true; - - return $callback((self::$createCacheItem)($key), $save); - } - - public function getItem(mixed $key): CacheItem - { - return (self::$createCacheItem)($key); - } - - public function getItems(array $keys = []): iterable - { - return $this->generateItems($keys); - } - - public function hasItem(mixed $key): bool - { - return false; - } - - public function clear(string $prefix = ''): bool - { - return true; - } - - public function deleteItem(mixed $key): bool - { - return true; - } - - public function deleteItems(array $keys): bool - { - return true; - } - - public function save(CacheItemInterface $item): bool - { - return true; - } - - public function saveDeferred(CacheItemInterface $item): bool - { - return true; - } - - public function commit(): bool - { - return true; - } - - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - public function withSubNamespace(string $namespace): static - { - return clone $this; - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - - foreach ($keys as $key) { - yield $key => $f($key); - } - } -} diff --git a/vendor/symfony/cache/Adapter/ParameterNormalizer.php b/vendor/symfony/cache/Adapter/ParameterNormalizer.php deleted file mode 100644 index 483df1c0..00000000 --- a/vendor/symfony/cache/Adapter/ParameterNormalizer.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -/** - * @author Lars Strojny - */ -final class ParameterNormalizer -{ - public static function normalizeDuration(string $duration): int - { - if (is_numeric($duration)) { - return $duration; - } - - if (false !== $time = strtotime($duration, 0)) { - return $time; - } - - try { - return \DateTimeImmutable::createFromFormat('U', 0)->add(new \DateInterval($duration))->getTimestamp(); - } catch (\Exception $e) { - throw new \InvalidArgumentException(\sprintf('Cannot parse date interval "%s".', $duration), 0, $e); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PdoAdapter.php b/vendor/symfony/cache/Adapter/PdoAdapter.php deleted file mode 100644 index 7d6cb2df..00000000 --- a/vendor/symfony/cache/Adapter/PdoAdapter.php +++ /dev/null @@ -1,398 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class PdoAdapter extends AbstractAdapter implements PruneableInterface -{ - private const MAX_KEY_LENGTH = 255; - - private MarshallerInterface $marshaller; - private \PDO $conn; - private string $dsn; - private string $driver; - private string $serverVersion; - private string $table = 'cache_items'; - private string $idCol = 'item_id'; - private string $dataCol = 'item_data'; - private string $lifetimeCol = 'item_lifetime'; - private string $timeCol = 'item_time'; - private ?string $username = null; - private ?string $password = null; - private array $connectionOptions = []; - private string $namespace; - - /** - * You can either pass an existing database connection as PDO instance or - * a DSN string that will be used to lazy-connect to the database when the - * cache is actually used. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * - * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string - * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct(#[\SensitiveParameter] \PDO|string $connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], ?MarshallerInterface $marshaller = null) - { - if (\is_string($connOrDsn) && str_contains($connOrDsn, '://')) { - throw new InvalidArgumentException(\sprintf('Usage of Doctrine DBAL URL with "%s" is not supported. Use a PDO DSN or "%s" instead.', __CLASS__, DoctrineDbalAdapter::class)); - } - - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new InvalidArgumentException(\sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->conn = $connOrDsn; - } else { - $this->dsn = $connOrDsn; - } - - $this->maxIdLength = self::MAX_KEY_LENGTH; - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->namespace = $namespace; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - public static function createConnection(#[\SensitiveParameter] string $dsn, array $options = []): \PDO|string - { - if ($options['lazy'] ?? true) { - return $dsn; - } - - $pdo = new \PDO($dsn); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - return $pdo; - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable(): void - { - $sql = match ($driver = $this->getDriver()) { - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - 'mysql' => "CREATE TABLE $this->table ($this->idCol VARBINARY(255) NOT NULL PRIMARY KEY, $this->dataCol MEDIUMBLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB", - 'sqlite' => "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", - 'pgsql' => "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", - 'oci' => "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", - 'sqlsrv' => "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)", - default => throw new \DomainException(\sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $driver)), - }; - - $this->getConnection()->exec($sql); - } - - public function prune(): bool - { - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= :time"; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE :namespace"; - } - - $connection = $this->getConnection(); - - try { - $delete = $connection->prepare($deleteSql); - } catch (\PDOException) { - return true; - } - $delete->bindValue(':time', time(), \PDO::PARAM_INT); - - if ('' !== $this->namespace) { - $delete->bindValue(':namespace', \sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); - } - try { - return $delete->execute(); - } catch (\PDOException) { - return true; - } - } - - protected function doFetch(array $ids): iterable - { - $connection = $this->getConnection(); - - $now = time(); - $expired = []; - - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($ids as $id) { - $stmt->bindValue(++$i, $id); - } - $result = $stmt->execute(); - - if (\is_object($result)) { - $result = $result->iterateNumeric(); - } else { - $stmt->setFetchMode(\PDO::FETCH_NUM); - $result = $stmt; - } - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = str_pad('', (\count($expired) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($expired as $id) { - $stmt->bindValue(++$i, $id); - } - $stmt->execute(); - } - } - - protected function doHave(string $id): bool - { - $connection = $this->getConnection(); - - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)"; - $stmt = $connection->prepare($sql); - - $stmt->bindValue(':id', $id); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->execute(); - - return (bool) $stmt->fetchColumn(); - } - - protected function doClear(string $namespace): bool - { - $conn = $this->getConnection(); - - if ('' === $namespace) { - if ('sqlite' === $this->getDriver()) { - $sql = "DELETE FROM $this->table"; - } else { - $sql = "TRUNCATE TABLE $this->table"; - } - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $conn->exec($sql); - } catch (\PDOException) { - } - - return true; - } - - protected function doDelete(array $ids): bool - { - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->idCol IN ($sql)"; - try { - $stmt = $this->getConnection()->prepare($sql); - $stmt->execute(array_values($ids)); - } catch (\PDOException) { - } - - return true; - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $conn = $this->getConnection(); - - $driver = $this->getDriver(); - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; - - switch (true) { - case 'mysql' === $driver: - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci' === $driver: - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv' === $driver && version_compare($this->getServerVersion(), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $driver: - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql' === $driver && version_compare($this->getServerVersion(), '9.5', '>='): - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $driver = null; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $conn->prepare($sql); - } catch (\PDOException $e) { - if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) { - $this->createTable(); - } - $stmt = $conn->prepare($sql); - } - - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. - if ('sqlsrv' === $driver || 'oci' === $driver) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, \PDO::PARAM_LOB); - $stmt->bindValue(4, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(5, $now, \PDO::PARAM_INT); - $stmt->bindParam(6, $data, \PDO::PARAM_LOB); - $stmt->bindValue(7, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(8, $now, \PDO::PARAM_INT); - } else { - $stmt->bindParam(':id', $id); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - if (null === $driver) { - $insertStmt = $conn->prepare($insertSql); - - $insertStmt->bindParam(':id', $id); - $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $insertStmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $insertStmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - - foreach ($values as $id => $data) { - try { - $stmt->execute(); - } catch (\PDOException $e) { - if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) { - $this->createTable(); - } - $stmt->execute(); - } - if (null === $driver && !$stmt->rowCount()) { - try { - $insertStmt->execute(); - } catch (\PDOException) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - /** - * @internal - */ - protected function getId(mixed $key, ?string $namespace = null): string - { - if ('pgsql' !== $this->getDriver()) { - return parent::getId($key, $namespace); - } - - if (str_contains($key, "\0") || str_contains($key, '%') || !preg_match('//u', $key)) { - $key = rawurlencode($key); - } - - return parent::getId($key, $namespace); - } - - private function getConnection(): \PDO - { - if (!isset($this->conn)) { - $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions); - $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - } - - return $this->conn; - } - - private function getDriver(): string - { - return $this->driver ??= $this->getConnection()->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - private function getServerVersion(): string - { - return $this->serverVersion ??= $this->getConnection()->getAttribute(\PDO::ATTR_SERVER_VERSION); - } - - private function isTableMissing(\PDOException $exception): bool - { - $driver = $this->getDriver(); - [$sqlState, $code] = $exception->errorInfo ?? [null, $exception->getCode()]; - - return match ($driver) { - 'pgsql' => '42P01' === $sqlState, - 'sqlite' => str_contains($exception->getMessage(), 'no such table:'), - 'oci' => 942 === $code, - 'sqlsrv' => 208 === $code, - 'mysql' => 1146 === $code, - default => false, - }; - } -} diff --git a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/vendor/symfony/cache/Adapter/PhpArrayAdapter.php deleted file mode 100644 index bffe9a0f..00000000 --- a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php +++ /dev/null @@ -1,388 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\CachedValueInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Component\VarExporter\VarExporter; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0. - * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter. - * - * @author Titouan Galopin - * @author Nicolas Grekas - */ -class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private array $keys; - private array $values; - - private static \Closure $createCacheItem; - private static array $valuesCache = []; - - /** - * @param string $file The PHP file where values are cached - * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit - */ - public function __construct( - private string $file, - AdapterInterface $fallbackPool, - ) { - $this->pool = $fallbackPool; - self::$createCacheItem ??= \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * This adapter takes advantage of how PHP stores arrays in its latest versions. - * - * @param string $file The PHP file were values are cached - * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hit - */ - public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface - { - if (!$fallbackPool instanceof AdapterInterface) { - $fallbackPool = new ProxyAdapter($fallbackPool); - } - - return new static($file, $fallbackPool); - } - - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - if (!isset($this->values)) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - get_from_pool: - if ($this->pool instanceof CacheInterface) { - return $this->pool->get($key, $callback, $beta, $metadata); - } - - return $this->doGet($this->pool, $key, $callback, $beta, $metadata); - } - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - return null; - } - if (!$value instanceof CachedValueInterface) { - return $value; - } - try { - return $value->getValue(); - } catch (\Throwable) { - unset($this->keys[$key]); - goto get_from_pool; - } - } - - public function getItem(mixed $key): CacheItem - { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (!isset($this->values)) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - return $this->pool->getItem($key); - } - - $value = $this->values[$this->keys[$key]]; - $isHit = true; - - if ('N;' === $value) { - $value = null; - } elseif ($value instanceof CachedValueInterface) { - try { - $value = $value->getValue(); - } catch (\Throwable) { - $value = null; - $isHit = false; - } - } - - return (self::$createCacheItem)($key, $value, $isHit); - } - - public function getItems(array $keys = []): iterable - { - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - } - if (!isset($this->values)) { - $this->initialize(); - } - - return $this->generateItems($keys); - } - - public function hasItem(mixed $key): bool - { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (!isset($this->values)) { - $this->initialize(); - } - - return isset($this->keys[$key]) || $this->pool->hasItem($key); - } - - public function deleteItem(mixed $key): bool - { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (!isset($this->values)) { - $this->initialize(); - } - - return !isset($this->keys[$key]) && $this->pool->deleteItem($key); - } - - public function deleteItems(array $keys): bool - { - $deleted = true; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - - if (isset($this->keys[$key])) { - $deleted = false; - } else { - $fallbackKeys[] = $key; - } - } - if (!isset($this->values)) { - $this->initialize(); - } - - if ($fallbackKeys) { - $deleted = $this->pool->deleteItems($fallbackKeys) && $deleted; - } - - return $deleted; - } - - public function save(CacheItemInterface $item): bool - { - if (!isset($this->values)) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->save($item); - } - - public function saveDeferred(CacheItemInterface $item): bool - { - if (!isset($this->values)) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->saveDeferred($item); - } - - public function commit(): bool - { - return $this->pool->commit(); - } - - public function clear(string $prefix = ''): bool - { - $this->keys = $this->values = []; - - $cleared = @unlink($this->file) || !file_exists($this->file); - unset(self::$valuesCache[$this->file]); - - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($prefix) && $cleared; - } - - return $this->pool->clear() && $cleared; - } - - /** - * Store an array of cached values. - * - * @param array $values The cached values - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(array $values): array - { - if (file_exists($this->file)) { - if (!is_file($this->file)) { - throw new InvalidArgumentException(\sprintf('Cache path exists and is not a file: "%s".', $this->file)); - } - - if (!is_writable($this->file)) { - throw new InvalidArgumentException(\sprintf('Cache file is not writable: "%s".', $this->file)); - } - } else { - $directory = \dirname($this->file); - - if (!is_dir($directory) && !@mkdir($directory, 0777, true)) { - throw new InvalidArgumentException(\sprintf('Cache directory does not exist and cannot be created: "%s".', $directory)); - } - - if (!is_writable($directory)) { - throw new InvalidArgumentException(\sprintf('Cache directory is not writable: "%s".', $directory)); - } - } - - $preload = []; - $dumpedValues = ''; - $dumpedMap = []; - $dump = <<<'EOF' - $value) { - CacheItem::validateKey(\is_int($key) ? (string) $key : $key); - $isStaticValue = true; - - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue, $preload); - } catch (\Exception $e) { - throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - if (!$isStaticValue) { - $value = 'new class() implements \\'.CachedValueInterface::class." { public function getValue(): mixed { return {$value}; } }"; - } - $hash = hash('xxh128', $value); - - if (null === $id = $dumpedMap[$hash] ?? null) { - $id = $dumpedMap[$hash] = \count($dumpedMap); - $dumpedValues .= "{$id} => {$value},\n"; - } - - $dump .= var_export($key, true)." => {$id},\n"; - } - - $dump .= "\n], [\n\n{$dumpedValues}\n]];\n"; - - $tmpFile = tempnam(\dirname($this->file), basename($this->file)); - - file_put_contents($tmpFile, $dump); - @chmod($tmpFile, 0666 & ~umask()); - unset($serialized, $value, $dump); - - @rename($tmpFile, $this->file); - unset(self::$valuesCache[$this->file]); - - $this->initialize(); - - return $preload; - } - - /** - * Load the cache file. - */ - private function initialize(): void - { - if (isset(self::$valuesCache[$this->file])) { - $values = self::$valuesCache[$this->file]; - } elseif (!is_file($this->file)) { - $this->keys = $this->values = []; - - return; - } else { - $values = self::$valuesCache[$this->file] = (include $this->file) ?: [[], []]; - } - - if (2 !== \count($values) || !isset($values[0], $values[1])) { - $this->keys = $this->values = []; - } else { - [$this->keys, $this->values] = $values; - } - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (isset($this->keys[$key])) { - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - yield $key => $f($key, null, true); - } elseif ($value instanceof CachedValueInterface) { - try { - yield $key => $f($key, $value->getValue(), true); - } catch (\Throwable) { - yield $key => $f($key, null, false); - } - } else { - yield $key => $f($key, $value, true); - } - } else { - $fallbackKeys[] = $key; - } - } - - if ($fallbackKeys) { - yield from $this->pool->getItems($fallbackKeys); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php b/vendor/symfony/cache/Adapter/PhpFilesAdapter.php deleted file mode 100644 index 75f67f40..00000000 --- a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php +++ /dev/null @@ -1,315 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\CachedValueInterface; -use Symfony\Component\Cache\Traits\FilesystemCommonTrait; -use Symfony\Component\VarExporter\VarExporter; - -/** - * @author Piotr Stankowski - * @author Nicolas Grekas - * @author Rob Frawley 2nd - */ -class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemCommonTrait { - doClear as private doCommonClear; - doDelete as private doCommonDelete; - } - - private \Closure $includeHandler; - private array $values = []; - private array $files = []; - - private static int $startTime; - private static array $valuesCache = []; - - /** - * @param bool $appendOnly Set to `true` to gain extra performance when the items stored in this pool never expire. - * Doing so is encouraged because it fits perfectly OPcache's memory model. - * - * @throws CacheException if OPcache is not enabled - */ - public function __construct( - string $namespace = '', - int $defaultLifetime = 0, - ?string $directory = null, - private bool $appendOnly = false, - ) { - self::$startTime ??= $_SERVER['REQUEST_TIME'] ?? time(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - $this->includeHandler = static function ($type, $msg, $file, $line) { - throw new \ErrorException($msg, 0, $type, $file, $line); - }; - } - - public static function isSupported(): bool - { - self::$startTime ??= $_SERVER['REQUEST_TIME'] ?? time(); - - return \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOL)); - } - - public function prune(): bool - { - $time = time(); - $pruned = true; - $getExpiry = true; - - set_error_handler($this->includeHandler); - try { - foreach ($this->scanHashDir($this->directory) as $file) { - try { - if (\is_array($expiresAt = include $file)) { - $expiresAt = $expiresAt[0]; - } - } catch (\ErrorException $e) { - $expiresAt = $time; - } - - if ($time >= $expiresAt) { - $pruned = ($this->doUnlink($file) || !file_exists($file)) && $pruned; - } - } - } finally { - restore_error_handler(); - } - - return $pruned; - } - - protected function doFetch(array $ids): iterable - { - if ($this->appendOnly) { - $now = 0; - $missingIds = []; - } else { - $now = time(); - $missingIds = $ids; - $ids = []; - } - $values = []; - - while (true) { - $getExpiry = false; - - foreach ($ids as $id) { - if (null === $value = $this->values[$id] ?? null) { - $missingIds[] = $id; - } elseif ('N;' === $value) { - $values[$id] = null; - } elseif (!\is_object($value)) { - $values[$id] = $value; - } elseif ($value instanceof CachedValueInterface) { - $values[$id] = $value->getValue(); - } elseif (!$value instanceof LazyValue) { - $values[$id] = $value; - } elseif (false === $values[$id] = include $value->file) { - unset($values[$id], $this->values[$id]); - $missingIds[] = $id; - } - if (!$this->appendOnly) { - unset($this->values[$id]); - } - } - - if (!$missingIds) { - return $values; - } - - set_error_handler($this->includeHandler); - try { - $getExpiry = true; - - foreach ($missingIds as $k => $id) { - try { - $file = $this->files[$id] ??= $this->getFile($id); - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $this->values[$id]] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $this->values[$id]] = $expiresAt; - } elseif ($now < $expiresAt) { - $this->values[$id] = new LazyValue($file); - } - - if ($now >= $expiresAt) { - unset($this->values[$id], $missingIds[$k], self::$valuesCache[$file]); - } - } catch (\ErrorException $e) { - unset($missingIds[$k]); - } - } - } finally { - restore_error_handler(); - } - - $ids = $missingIds; - $missingIds = []; - } - } - - protected function doHave(string $id): bool - { - if ($this->appendOnly && isset($this->values[$id])) { - return true; - } - - set_error_handler($this->includeHandler); - try { - $file = $this->files[$id] ??= $this->getFile($id); - $getExpiry = true; - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $value] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $value] = $expiresAt; - } elseif ($this->appendOnly) { - $value = new LazyValue($file); - } - } catch (\ErrorException) { - return false; - } finally { - restore_error_handler(); - } - if ($this->appendOnly) { - $now = 0; - $this->values[$id] = $value; - } else { - $now = time(); - } - - return $now < $expiresAt; - } - - protected function doSave(array $values, int $lifetime): array|bool - { - $ok = true; - $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; - $allowCompile = self::isSupported(); - - foreach ($values as $key => $value) { - unset($this->values[$key]); - $isStaticValue = true; - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue); - } catch (\Exception $e) { - throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(\sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - $encodedKey = rawurlencode($key); - - if ($isStaticValue) { - $value = "return [{$expiry}, {$value}];"; - } elseif ($this->appendOnly) { - $value = "return [{$expiry}, new class() implements \\".CachedValueInterface::class." { public function getValue(): mixed { return {$value}; } }];"; - } else { - // We cannot use a closure here because of https://bugs.php.net/76982 - $value = str_replace('\Symfony\Component\VarExporter\Internal\\', '', $value); - $value = "namespace Symfony\Component\VarExporter\Internal;\n\nreturn \$getExpiry ? {$expiry} : {$value};"; - } - - $file = $this->files[$key] = $this->getFile($key, true); - // Since OPcache only compiles files older than the script execution start, set the file's mtime in the past - $ok = $this->write($file, "directory)) { - throw new CacheException(\sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $ok; - } - - protected function doClear(string $namespace): bool - { - $this->values = []; - - return $this->doCommonClear($namespace); - } - - protected function doDelete(array $ids): bool - { - foreach ($ids as $id) { - unset($this->values[$id]); - } - - return $this->doCommonDelete($ids); - } - - protected function doUnlink(string $file): bool - { - unset(self::$valuesCache[$file]); - - if (self::isSupported()) { - @opcache_invalidate($file, true); - } - - return @unlink($file); - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - $encodedKey = substr(fgets($h), 8); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} - -/** - * @internal - */ -class LazyValue -{ - public function __construct( - public string $file, - ) { - } -} diff --git a/vendor/symfony/cache/Adapter/ProxyAdapter.php b/vendor/symfony/cache/Adapter/ProxyAdapter.php deleted file mode 100644 index d692dbf3..00000000 --- a/vendor/symfony/cache/Adapter/ProxyAdapter.php +++ /dev/null @@ -1,226 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; - -/** - * @author Nicolas Grekas - */ -class ProxyAdapter implements AdapterInterface, NamespacedPoolInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private string $namespace = ''; - private int $namespaceLen; - private string $poolHash; - private int $defaultLifetime; - - private static \Closure $createCacheItem; - private static \Closure $setInnerItem; - - public function __construct(CacheItemPoolInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - if ('' !== $namespace) { - if ($pool instanceof NamespacedPoolInterface) { - $pool = $pool->withSubNamespace($namespace); - $this->namespace = $namespace = ''; - } else { - \assert('' !== CacheItem::validateKey($namespace)); - $this->namespace = $namespace; - } - } - $this->pool = $pool; - $this->poolHash = spl_object_hash($pool); - $this->namespaceLen = \strlen($namespace); - $this->defaultLifetime = $defaultLifetime; - self::$createCacheItem ??= \Closure::bind( - static function ($key, $innerItem, $poolHash) { - $item = new CacheItem(); - $item->key = $key; - - if (null === $innerItem) { - return $item; - } - - $item->value = $innerItem->get(); - $item->isHit = $innerItem->isHit(); - $item->innerItem = $innerItem; - $item->poolHash = $poolHash; - - if (!$item->unpack() && $innerItem instanceof CacheItem) { - $item->metadata = $innerItem->metadata; - } - $innerItem->set(null); - - return $item; - }, - null, - CacheItem::class - ); - self::$setInnerItem ??= \Closure::bind( - static function (CacheItemInterface $innerItem, CacheItem $item, $expiry = null) { - $innerItem->set($item->pack()); - $innerItem->expiresAt(($expiry ?? $item->expiry) ? \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $expiry ?? $item->expiry)) : null); - }, - null, - CacheItem::class - ); - } - - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - if (!$this->pool instanceof CacheInterface) { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - return $this->pool->get($this->getId($key), function ($innerItem, bool &$save) use ($key, $callback) { - $item = (self::$createCacheItem)($key, $innerItem, $this->poolHash); - $item->set($value = $callback($item, $save)); - (self::$setInnerItem)($innerItem, $item); - - return $value; - }, $beta, $metadata); - } - - public function getItem(mixed $key): CacheItem - { - $item = $this->pool->getItem($this->getId($key)); - - return (self::$createCacheItem)($key, $item, $this->poolHash); - } - - public function getItems(array $keys = []): iterable - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->generateItems($this->pool->getItems($keys)); - } - - public function hasItem(mixed $key): bool - { - return $this->pool->hasItem($this->getId($key)); - } - - public function clear(string $prefix = ''): bool - { - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($this->namespace.$prefix); - } - - return $this->pool->clear(); - } - - public function deleteItem(mixed $key): bool - { - return $this->pool->deleteItem($this->getId($key)); - } - - public function deleteItems(array $keys): bool - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->pool->deleteItems($keys); - } - - public function save(CacheItemInterface $item): bool - { - return $this->doSave($item, __FUNCTION__); - } - - public function saveDeferred(CacheItemInterface $item): bool - { - return $this->doSave($item, __FUNCTION__); - } - - public function commit(): bool - { - return $this->pool->commit(); - } - - public function withSubNamespace(string $namespace): static - { - $clone = clone $this; - - if ($clone->pool instanceof NamespacedPoolInterface) { - $clone->pool = $clone->pool->withSubNamespace($namespace); - } else { - $clone->namespace .= CacheItem::validateKey($namespace); - $clone->namespaceLen = \strlen($clone->namespace); - } - - return $clone; - } - - private function doSave(CacheItemInterface $item, string $method): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $castItem = (array) $item; - - if (null === $castItem["\0*\0expiry"] && 0 < $this->defaultLifetime) { - $castItem["\0*\0expiry"] = microtime(true) + $this->defaultLifetime; - } - - if ($castItem["\0*\0poolHash"] === $this->poolHash && $castItem["\0*\0innerItem"]) { - $innerItem = $castItem["\0*\0innerItem"]; - } elseif ($this->pool instanceof AdapterInterface) { - // this is an optimization specific for AdapterInterface implementations - // so we can save a round-trip to the backend by just creating a new item - $innerItem = (self::$createCacheItem)($this->namespace.$castItem["\0*\0key"], null, $this->poolHash); - } else { - $innerItem = $this->pool->getItem($this->namespace.$castItem["\0*\0key"]); - } - - (self::$setInnerItem)($innerItem, $item, $castItem["\0*\0expiry"]); - - return $this->pool->$method($innerItem); - } - - private function generateItems(iterable $items): \Generator - { - $f = self::$createCacheItem; - - foreach ($items as $key => $item) { - if ($this->namespaceLen) { - $key = substr($key, $this->namespaceLen); - } - - yield $key => $f($key, $item, $this->poolHash); - } - } - - private function getId(mixed $key): string - { - \assert('' !== CacheItem::validateKey($key)); - - return $this->namespace.$key; - } -} diff --git a/vendor/symfony/cache/Adapter/Psr16Adapter.php b/vendor/symfony/cache/Adapter/Psr16Adapter.php deleted file mode 100644 index a72b037b..00000000 --- a/vendor/symfony/cache/Adapter/Psr16Adapter.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ProxyTrait; - -/** - * Turns a PSR-16 cache into a PSR-6 one. - * - * @author Nicolas Grekas - */ -class Psr16Adapter extends AbstractAdapter implements PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = '_'; - - private object $miss; - - public function __construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - parent::__construct($namespace, $defaultLifetime); - - $this->pool = $pool; - $this->miss = new \stdClass(); - } - - protected function doFetch(array $ids): iterable - { - foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { - if ($this->miss !== $value) { - yield $key => $value; - } - } - } - - protected function doHave(string $id): bool - { - return $this->pool->has($id); - } - - protected function doClear(string $namespace): bool - { - return $this->pool->clear(); - } - - protected function doDelete(array $ids): bool - { - return $this->pool->deleteMultiple($ids); - } - - protected function doSave(array $values, int $lifetime): array|bool - { - return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisAdapter.php b/vendor/symfony/cache/Adapter/RedisAdapter.php deleted file mode 100644 index f31f0d7d..00000000 --- a/vendor/symfony/cache/Adapter/RedisAdapter.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Traits\RedisTrait; - -class RedisAdapter extends AbstractAdapter -{ - use RedisTrait; - - public function __construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|\Relay\Relay|\Relay\Cluster $redis, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - $this->init($redis, $namespace, $defaultLifetime, $marshaller); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php deleted file mode 100644 index 779c4d91..00000000 --- a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\PredisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Relay\Relay; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Component\Cache\Marshaller\DeflateMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\Traits\RedisTrait; - -/** - * Stores tag id <> cache id relationship as a Redis Set. - * - * Set (tag relation info) is stored without expiry (non-volatile), while cache always gets an expiry (volatile) even - * if not set by caller. Thus if you configure redis with the right eviction policy you can be safe this tag <> cache - * relationship survives eviction (cache cleanup when Redis runs out of memory). - * - * Redis server 2.8+ with any `volatile-*` eviction policy, OR `noeviction` if you're sure memory will NEVER fill up - * - * Design limitations: - * - Max 4 billion cache keys per cache tag as limited by Redis Set datatype. - * E.g. If you use a "all" items tag for expiry instead of clear(), that limits you to 4 billion cache items also. - * - * @see https://redis.io/topics/lru-cache#eviction-policies Documentation for Redis eviction policies. - * @see https://redis.io/topics/data-types#sets Documentation for Redis Set datatype. - * - * @author Nicolas Grekas - * @author André Rømcke - */ -class RedisTagAwareAdapter extends AbstractTagAwareAdapter -{ - use RedisTrait; - - /** - * On cache items without a lifetime set, we set it to 100 days. This is to make sure cache items are - * preferred to be evicted over tag Sets, if eviction policy is configured according to requirements. - */ - private const DEFAULT_CACHE_TTL = 8640000; - - /** - * detected eviction policy used on Redis server. - */ - private string $redisEvictionPolicy; - - public function __construct( - \Redis|Relay|\Relay\Cluster|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, - private string $namespace = '', - int $defaultLifetime = 0, - ?MarshallerInterface $marshaller = null, - ) { - if ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof ClusterInterface && !$redis->getConnection() instanceof PredisCluster) { - throw new InvalidArgumentException(\sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); - } - - $isRelay = $redis instanceof Relay || $redis instanceof \Relay\Cluster; - if ($isRelay || \defined('Redis::OPT_COMPRESSION') && \in_array($redis::class, [\Redis::class, \RedisArray::class, \RedisCluster::class], true)) { - $compression = $redis->getOption($isRelay ? Relay::OPT_COMPRESSION : \Redis::OPT_COMPRESSION); - - foreach (\is_array($compression) ? $compression : [$compression] as $c) { - if ($isRelay ? Relay::COMPRESSION_NONE : \Redis::COMPRESSION_NONE !== $c) { - throw new InvalidArgumentException(\sprintf('redis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class)); - } - } - } - - $this->init($redis, $namespace, $defaultLifetime, new TagAwareMarshaller($marshaller)); - } - - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $delTagData = []): array - { - $eviction = $this->getRedisEvictionPolicy(); - if ('noeviction' !== $eviction && !str_starts_with($eviction, 'volatile-')) { - throw new LogicException(\sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction)); - } - - // serialize values - if (!$serialized = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - // While pipeline isn't supported on RedisCluster, other setups will at least benefit from doing this in one op - $results = $this->pipeline(static function () use ($serialized, $lifetime, $addTagData, $delTagData, $failed) { - // Store cache items, force a ttl if none is set, as there is no MSETEX we need to set each one - foreach ($serialized as $id => $value) { - yield 'setEx' => [ - $id, - 0 >= $lifetime ? self::DEFAULT_CACHE_TTL : $lifetime, - $value, - ]; - } - - // Add and Remove Tags - foreach ($addTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sAdd' => array_merge([$tagId], $ids); - } - } - - foreach ($delTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sRem' => array_merge([$tagId], $ids); - } - } - }); - - foreach ($results as $id => $result) { - // Skip results of SADD/SREM operations, they'll be 1 or 0 depending on if set value already existed or not - if (is_numeric($result)) { - continue; - } - // setEx results - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - protected function doDeleteYieldTags(array $ids): iterable - { - $lua = <<<'EOLUA' - local v = redis.call('GET', KEYS[1]) - local e = redis.pcall('UNLINK', KEYS[1]) - - if type(e) ~= 'number' then - redis.call('DEL', KEYS[1]) - end - - if not v or v:len() <= 13 or v:byte(1) ~= 0x9D or v:byte(6) ~= 0 or v:byte(10) ~= 0x5F then - return '' - end - - return v:sub(14, 13 + v:byte(13) + v:byte(12) * 256 + v:byte(11) * 65536) -EOLUA; - - $results = $this->pipeline(function () use ($ids, $lua) { - foreach ($ids as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id] : [$lua, [$id], 1]; - } - }); - - foreach ($results as $id => $result) { - if ($result instanceof \RedisException || $result instanceof \Relay\Exception || $result instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to delete key "{key}": '.$result->getMessage(), ['key' => substr($id, \strlen($this->rootNamespace)), 'exception' => $result]); - - continue; - } - - try { - yield $id => !\is_string($result) || '' === $result ? [] : $this->marshaller->unmarshall($result); - } catch (\Exception) { - yield $id => []; - } - } - } - - protected function doDeleteTagRelations(array $tagData): bool - { - $results = $this->pipeline(static function () use ($tagData) { - foreach ($tagData as $tagId => $idList) { - array_unshift($idList, $tagId); - yield 'sRem' => $idList; - } - }); - foreach ($results as $result) { - // no-op - } - - return true; - } - - protected function doInvalidate(array $tagIds): bool - { - // This script scans the set of items linked to tag: it empties the set - // and removes the linked items. When the set is still not empty after - // the scan, it means we're in cluster mode and that the linked items - // are on other nodes: we move the links to a temporary set and we - // garbage collect that set from the client side. - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local cursor = '0' - local id = KEYS[1] - repeat - local result = redis.call('SSCAN', id, cursor, 'COUNT', 5000); - cursor = result[1]; - local rems = {} - - for _, v in ipairs(result[2]) do - local ok, _ = pcall(redis.call, 'DEL', ARGV[1]..v) - if ok then - table.insert(rems, v) - end - end - if 0 < #rems then - redis.call('SREM', id, unpack(rems)) - end - until '0' == cursor; - - redis.call('SUNIONSTORE', '{'..id..'}'..id, id) - redis.call('DEL', id) - - return redis.call('SSCAN', '{'..id..'}'..id, '0', 'COUNT', 5000) -EOLUA; - - $results = $this->pipeline(function () use ($tagIds, $lua) { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - } elseif (\is_array($prefix = $this->redis->getOption(($this->redis instanceof Relay || $this->redis instanceof \Relay\Cluster) ? Relay::OPT_PREFIX : \Redis::OPT_PREFIX) ?? '')) { - $prefix = current($prefix); - } - - foreach ($tagIds as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id, $prefix] : [$lua, [$id, $prefix], 1]; - } - }); - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local id = KEYS[1] - local cursor = table.remove(ARGV) - redis.call('SREM', '{'..id..'}'..id, unpack(ARGV)) - - return redis.call('SSCAN', '{'..id..'}'..id, cursor, 'COUNT', 5000) -EOLUA; - - $success = true; - foreach ($results as $id => $values) { - if ($values instanceof \RedisException || $values instanceof \Relay\Exception || $values instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to invalidate key "{key}": '.$values->getMessage(), ['key' => substr($id, \strlen($this->namespace)), 'exception' => $values]); - $success = false; - - continue; - } - - [$cursor, $ids] = $values; - - while ($ids || '0' !== $cursor) { - $this->doDelete($ids); - - $evalArgs = [$id, $cursor]; - array_splice($evalArgs, 1, 0, $ids); - - if ($this->redis instanceof \Predis\ClientInterface) { - array_unshift($evalArgs, $lua, 1); - } else { - $evalArgs = [$lua, $evalArgs, 1]; - } - - $results = $this->pipeline(function () use ($evalArgs) { - yield 'eval' => $evalArgs; - }); - - foreach ($results as [$cursor, $ids]) { - // no-op - } - } - } - - return $success; - } - - private function getRedisEvictionPolicy(): string - { - if (isset($this->redisEvictionPolicy)) { - return $this->redisEvictionPolicy; - } - - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { - // Predis supports info command only on the master in replication environments - $hosts = [$host->getClientFor('master')]; - } - - foreach ($hosts as $host) { - $info = $host->info('Memory'); - - if (false === $info || null === $info || $info instanceof ErrorInterface) { - continue; - } - - $info = $info['Memory'] ?? $info; - - return $this->redisEvictionPolicy = $info['maxmemory_policy'] ?? ''; - } - - return $this->redisEvictionPolicy = ''; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapter.php b/vendor/symfony/cache/Adapter/TagAwareAdapter.php deleted file mode 100644 index 75abad2f..00000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapter.php +++ /dev/null @@ -1,387 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\BadMethodCallException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\NamespacedPoolInterface; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * Implements simple and robust tag-based invalidation suitable for use with volatile caches. - * - * This adapter works by storing a version for each tags. When saving an item, it is stored together with its tags and - * their corresponding versions. When retrieving an item, those tag versions are compared to the current version of - * each tags. Invalidation is achieved by deleting tags, thereby ensuring that their versions change even when the - * storage is out of space. When versions of non-existing tags are requested for item commits, this adapter assigns a - * new random version to them. - * - * @author Nicolas Grekas - * @author Sergey Belyshkin - */ -class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, NamespacedPoolInterface, PruneableInterface, ResettableInterface, LoggerAwareInterface -{ - use ContractsTrait; - use LoggerAwareTrait; - - public const TAGS_PREFIX = "\1tags\1"; - - private array $deferred = []; - private AdapterInterface $pool; - private AdapterInterface $tags; - private array $knownTagVersions = []; - - private static \Closure $setCacheItemTags; - private static \Closure $setTagVersions; - private static \Closure $getTagsByKey; - private static \Closure $saveTags; - - public function __construct( - AdapterInterface $itemsPool, - ?AdapterInterface $tagsPool = null, - private float $knownTagVersionsTtl = 0.15, - ) { - $this->pool = $itemsPool; - $this->tags = $tagsPool ?? $itemsPool; - self::$setCacheItemTags ??= \Closure::bind( - static function (array $items, array $itemTags) { - foreach ($items as $key => $item) { - $item->isTaggable = true; - - if (isset($itemTags[$key])) { - $tags = array_keys($itemTags[$key]); - $item->metadata[CacheItem::METADATA_TAGS] = array_combine($tags, $tags); - } else { - $item->value = null; - $item->isHit = false; - $item->metadata = []; - } - } - - return $items; - }, - null, - CacheItem::class - ); - self::$setTagVersions ??= \Closure::bind( - static function (array $items, array $tagVersions) { - foreach ($items as $item) { - $item->newMetadata[CacheItem::METADATA_TAGS] = array_intersect_key($tagVersions, $item->newMetadata[CacheItem::METADATA_TAGS] ?? []); - } - }, - null, - CacheItem::class - ); - self::$getTagsByKey ??= \Closure::bind( - static function ($deferred) { - $tagsByKey = []; - foreach ($deferred as $key => $item) { - $tagsByKey[$key] = $item->newMetadata[CacheItem::METADATA_TAGS] ?? []; - $item->metadata = $item->newMetadata; - } - - return $tagsByKey; - }, - null, - CacheItem::class - ); - self::$saveTags ??= \Closure::bind( - static function (AdapterInterface $tagsAdapter, array $tags) { - ksort($tags); - - foreach ($tags as $v) { - $v->expiry = 0; - $tagsAdapter->saveDeferred($v); - } - - return $tagsAdapter->commit(); - }, - null, - CacheItem::class - ); - } - - public function invalidateTags(array $tags): bool - { - $ids = []; - foreach ($tags as $tag) { - \assert('' !== CacheItem::validateKey($tag)); - unset($this->knownTagVersions[$tag]); - $ids[] = $tag.static::TAGS_PREFIX; - } - - return !$tags || $this->tags->deleteItems($ids); - } - - public function hasItem(mixed $key): bool - { - return $this->getItem($key)->isHit(); - } - - public function getItem(mixed $key): CacheItem - { - foreach ($this->getItems([$key]) as $item) { - return $item; - } - } - - public function getItems(array $keys = []): iterable - { - $tagKeys = []; - $commit = false; - - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $commit = $commit || isset($this->deferred[$key]); - } - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->pool->getItems($keys); - } catch (InvalidArgumentException $e) { - $this->pool->getItems($keys); // Should throw an exception - - throw $e; - } - - $bufferedItems = $itemTags = []; - - foreach ($items as $key => $item) { - if (null !== $tags = $item->getMetadata()[CacheItem::METADATA_TAGS] ?? null) { - $itemTags[$key] = $tags; - } - - $bufferedItems[$key] = $item; - - if (null === $tags) { - $key = "\0tags\0".$key; - $tagKeys[$key] = $key; // BC with pools populated before v6.1 - } - } - - if ($tagKeys) { - foreach ($this->pool->getItems($tagKeys) as $key => $item) { - if ($item->isHit()) { - $itemTags[substr($key, \strlen("\0tags\0"))] = $item->get() ?: []; - } - } - } - - $tagVersions = $this->getTagVersions($itemTags, false); - foreach ($itemTags as $key => $tags) { - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - unset($itemTags[$key]); - continue 2; - } - } - } - $tagVersions = null; - - return (self::$setCacheItemTags)($bufferedItems, $itemTags); - } - - public function clear(string $prefix = ''): bool - { - if ('' !== $prefix) { - foreach ($this->deferred as $key => $item) { - if (str_starts_with($key, $prefix)) { - unset($this->deferred[$key]); - } - } - - return $this->pool->clear($prefix); - } else { - $this->deferred = []; - } - - return $this->pool->clear(); - } - - public function deleteItem(mixed $key): bool - { - return $this->deleteItems([$key]); - } - - public function deleteItems(array $keys): bool - { - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $keys[] = "\0tags\0".$key; // BC with pools populated before v6.1 - } - } - - return $this->pool->deleteItems($keys); - } - - public function save(CacheItemInterface $item): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - public function saveDeferred(CacheItemInterface $item): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - public function commit(): bool - { - if (!$items = $this->deferred) { - return true; - } - - $tagVersions = $this->getTagVersions((self::$getTagsByKey)($items), true); - (self::$setTagVersions)($items, $tagVersions); - - $ok = true; - foreach ($items as $key => $item) { - if ($this->pool->saveDeferred($item)) { - unset($this->deferred[$key]); - } else { - $ok = false; - } - } - $ok = $this->pool->commit() && $ok; - - $tagVersions = array_keys($tagVersions); - (self::$setTagVersions)($items, array_combine($tagVersions, $tagVersions)); - - return $ok; - } - - /** - * @throws BadMethodCallException When the item pool is not a NamespacedPoolInterface - */ - public function withSubNamespace(string $namespace): static - { - if (!$this->pool instanceof NamespacedPoolInterface) { - throw new BadMethodCallException(\sprintf('Cannot call "%s::withSubNamespace()": this class doesn\'t implement "%s".', get_debug_type($this->pool), NamespacedPoolInterface::class)); - } - - $knownTagVersions = &$this->knownTagVersions; // ensures clones share the same array - $clone = clone $this; - $clone->deferred = []; - $clone->pool = $this->pool->withSubNamespace($namespace); - - return $clone; - } - - public function prune(): bool - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - public function reset(): void - { - $this->commit(); - $this->knownTagVersions = []; - $this->pool instanceof ResettableInterface && $this->pool->reset(); - $this->tags instanceof ResettableInterface && $this->tags->reset(); - } - - public function __serialize(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __unserialize(array $data): void - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->commit(); - } - - private function getTagVersions(array $tagsByKey, bool $persistTags): array - { - $tagVersions = []; - $fetchTagVersions = $persistTags; - - foreach ($tagsByKey as $tags) { - $tagVersions += $tags; - if ($fetchTagVersions) { - continue; - } - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - $fetchTagVersions = true; - } - } - } - - if (!$tagVersions) { - return []; - } - - $now = microtime(true); - $tags = []; - foreach ($tagVersions as $tag => $version) { - $tags[$tag.static::TAGS_PREFIX] = $tag; - $knownTagVersion = $this->knownTagVersions[$tag] ?? [0, null]; - if ($fetchTagVersions || $now > $knownTagVersion[0] || $knownTagVersion[1] !== $version) { - // reuse previously fetched tag versions until the expiration - $fetchTagVersions = true; - } - } - - if (!$fetchTagVersions) { - return $tagVersions; - } - - $newTags = []; - $newVersion = null; - $expiration = $now + $this->knownTagVersionsTtl; - foreach ($this->tags->getItems(array_keys($tags)) as $tag => $version) { - unset($this->knownTagVersions[$tag = $tags[$tag]]); // update FIFO - if (null !== $tagVersions[$tag] = $version->get()) { - $this->knownTagVersions[$tag] = [$expiration, $tagVersions[$tag]]; - } elseif ($persistTags) { - $newTags[$tag] = $version->set($newVersion ??= random_bytes(6)); - $tagVersions[$tag] = $newVersion; - $this->knownTagVersions[$tag] = [$expiration, $newVersion]; - } - } - - if ($newTags) { - (self::$saveTags)($this->tags, $newTags); - } - - while ($now > ($this->knownTagVersions[$tag = array_key_first($this->knownTagVersions) ?? ''][0] ?? \INF)) { - unset($this->knownTagVersions[$tag]); - } - - return $tagVersions; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php b/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php deleted file mode 100644 index 9242779c..00000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\InvalidArgumentException; - -/** - * Interface for invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareAdapterInterface extends AdapterInterface -{ - /** - * Invalidates cached items using tags. - * - * @param string[] $tags An array of tags to invalidate - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags): bool; -} diff --git a/vendor/symfony/cache/Adapter/TraceableAdapter.php b/vendor/symfony/cache/Adapter/TraceableAdapter.php deleted file mode 100644 index 3e1bf2bf..00000000 --- a/vendor/symfony/cache/Adapter/TraceableAdapter.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\BadMethodCallException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\NamespacedPoolInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * An adapter that collects data about all cache calls. - * - * @author Aaron Scherer - * @author Tobias Nyholm - * @author Nicolas Grekas - */ -class TraceableAdapter implements AdapterInterface, CacheInterface, NamespacedPoolInterface, PruneableInterface, ResettableInterface -{ - private string $namespace = ''; - private array $calls = []; - - public function __construct( - protected AdapterInterface $pool, - protected readonly ?\Closure $disabled = null, - ) { - } - - /** - * @throws BadMethodCallException When the item pool is not a CacheInterface - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed - { - if (!$this->pool instanceof CacheInterface) { - throw new BadMethodCallException(\sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); - } - if ($this->disabled?->__invoke()) { - return $this->pool->get($key, $callback, $beta, $metadata); - } - - $isHit = true; - $callback = function (CacheItem $item, bool &$save) use ($callback, &$isHit) { - $isHit = $item->isHit(); - - return $callback($item, $save); - }; - - $event = $this->start(__FUNCTION__); - try { - $value = $this->pool->get($key, $callback, $beta, $metadata); - $event->result[$key] = get_debug_type($value); - } finally { - $event->end = microtime(true); - } - if ($isHit) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $value; - } - - public function getItem(mixed $key): CacheItem - { - if ($this->disabled?->__invoke()) { - return $this->pool->getItem($key); - } - $event = $this->start(__FUNCTION__); - try { - $item = $this->pool->getItem($key); - } finally { - $event->end = microtime(true); - } - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $item; - } - - public function hasItem(mixed $key): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->hasItem($key); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->hasItem($key); - } finally { - $event->end = microtime(true); - } - } - - public function deleteItem(mixed $key): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->deleteItem($key); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - public function save(CacheItemInterface $item): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->save($item); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->save($item); - } finally { - $event->end = microtime(true); - } - } - - public function saveDeferred(CacheItemInterface $item): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->saveDeferred($item); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->saveDeferred($item); - } finally { - $event->end = microtime(true); - } - } - - public function getItems(array $keys = []): iterable - { - if ($this->disabled?->__invoke()) { - return $this->pool->getItems($keys); - } - $event = $this->start(__FUNCTION__); - try { - $result = $this->pool->getItems($keys); - } finally { - $event->end = microtime(true); - } - $f = function () use ($result, $event) { - $event->result = []; - foreach ($result as $key => $item) { - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - yield $key => $item; - } - }; - - return $f(); - } - - public function clear(string $prefix = ''): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->clear($prefix); - } - $event = $this->start(__FUNCTION__); - try { - if ($this->pool instanceof AdapterInterface) { - return $event->result = $this->pool->clear($prefix); - } - - return $event->result = $this->pool->clear(); - } finally { - $event->end = microtime(true); - } - } - - public function deleteItems(array $keys): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->deleteItems($keys); - } - $event = $this->start(__FUNCTION__); - $event->result['keys'] = $keys; - try { - return $event->result['result'] = $this->pool->deleteItems($keys); - } finally { - $event->end = microtime(true); - } - } - - public function commit(): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->commit(); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->commit(); - } finally { - $event->end = microtime(true); - } - } - - public function prune(): bool - { - if (!$this->pool instanceof PruneableInterface) { - return false; - } - if ($this->disabled?->__invoke()) { - return $this->pool->prune(); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->prune(); - } finally { - $event->end = microtime(true); - } - } - - public function reset(): void - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - - $this->clearCalls(); - } - - public function delete(string $key): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->deleteItem($key); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - public function getCalls(): array - { - return $this->calls; - } - - public function clearCalls(): void - { - $this->calls = []; - } - - public function getPool(): AdapterInterface - { - return $this->pool; - } - - /** - * @throws BadMethodCallException When the item pool is not a NamespacedPoolInterface - */ - public function withSubNamespace(string $namespace): static - { - if (!$this->pool instanceof NamespacedPoolInterface) { - throw new BadMethodCallException(\sprintf('Cannot call "%s::withSubNamespace()": this class doesn\'t implement "%s".', get_debug_type($this->pool), NamespacedPoolInterface::class)); - } - - $calls = &$this->calls; // ensures clones share the same array - $clone = clone $this; - $clone->namespace .= CacheItem::validateKey($namespace).':'; - $clone->pool = $this->pool->withSubNamespace($namespace); - - return $clone; - } - - protected function start(string $name): TraceableAdapterEvent - { - $this->calls[] = $event = new TraceableAdapterEvent(); - $event->name = $name; - $event->start = microtime(true); - $event->namespace = $this->namespace; - - return $event; - } -} - -/** - * @internal - */ -class TraceableAdapterEvent -{ - public string $name; - public float $start; - public float $end; - public array|bool $result; - public int $hits = 0; - public int $misses = 0; - public string $namespace; -} diff --git a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php b/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php deleted file mode 100644 index bde27c68..00000000 --- a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * @author Robin Chalas - */ -class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface -{ - public function __construct(TagAwareAdapterInterface $pool, ?\Closure $disabled = null) - { - parent::__construct($pool, $disabled); - } - - public function invalidateTags(array $tags): bool - { - if ($this->disabled?->__invoke()) { - return $this->pool->invalidateTags($tags); - } - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->invalidateTags($tags); - } finally { - $event->end = microtime(true); - } - } -} diff --git a/vendor/symfony/cache/CHANGELOG.md b/vendor/symfony/cache/CHANGELOG.md deleted file mode 100644 index d7b18246..00000000 --- a/vendor/symfony/cache/CHANGELOG.md +++ /dev/null @@ -1,162 +0,0 @@ -CHANGELOG -========= - -7.3 ---- - - * Add support for `\Relay\Cluster` in `RedisAdapter` - * Add support for `valkey:` / `valkeys:` schemes - * Add support for namespace-based invalidation - * Rename options "redis_cluster" and "redis_sentinel" to "cluster" and "sentinel" respectively - -7.2 ---- - - * `igbinary_serialize()` is no longer used instead of `serialize()` by default when the igbinary extension is installed, - due to behavior compatibilities between the two - * Add optional `Psr\Clock\ClockInterface` parameter to `ArrayAdapter` - -7.1 ---- - - * Add option `sentinel_master` as an alias for `redis_sentinel` - * Deprecate `CouchbaseBucketAdapter`, use `CouchbaseCollectionAdapter` - * Add support for URL encoded characters in Couchbase DSN - * Add support for using DSN with PDOAdapter - * The algorithm for the default cache namespace changed from SHA256 to XXH128 - -7.0 ---- - - * Add parameter `$isSameDatabase` to `DoctrineDbalAdapter::configureSchema()` - * Drop support for Postgres < 9.5 and SQL Server < 2008 in `DoctrineDbalAdapter` - -6.4 ---- - - * `EarlyExpirationHandler` no longer implements `MessageHandlerInterface`, rely on `AsMessageHandler` instead - -6.3 ---- - - * Add support for Relay PHP extension for Redis - * Updates to allow Redis cluster connections using predis/predis:^2.0 - * Add optional parameter `$isSameDatabase` to `DoctrineDbalAdapter::configureSchema()` - -6.1 ---- - - * Add support for ACL auth in RedisAdapter - * Improve reliability and performance of `TagAwareAdapter` by making tag versions an integral part of item value - -6.0 ---- - - * Remove `DoctrineProvider` and `DoctrineAdapter` - * Remove support of Doctrine DBAL in `PdoAdapter` - -5.4 ---- - - * Deprecate `DoctrineProvider` and `DoctrineAdapter` because these classes have been added to the `doctrine/cache` package - * Add `DoctrineDbalAdapter` identical to `PdoAdapter` for `Doctrine\DBAL\Connection` or DBAL URL - * Deprecate usage of `PdoAdapter` with `Doctrine\DBAL\Connection` or DBAL URL - -5.3 ---- - - * added support for connecting to Redis Sentinel clusters when using the Redis PHP extension - * add support for a custom serializer to the `ApcuAdapter` class - -5.2.0 ------ - - * added integration with Messenger to allow computing cached values in a worker - * allow ISO 8601 time intervals to specify default lifetime - -5.1.0 ------ - - * added max-items + LRU + max-lifetime capabilities to `ArrayCache` - * added `CouchbaseBucketAdapter` - * added context `cache-adapter` to log messages - -5.0.0 ------ - - * removed all PSR-16 implementations in the `Simple` namespace - * removed `SimpleCacheAdapter` - * removed `AbstractAdapter::unserialize()` - * removed `CacheItem::getPreviousTags()` - -4.4.0 ------ - - * added support for connecting to Redis Sentinel clusters - * added argument `$prefix` to `AdapterInterface::clear()` - * improved `RedisTagAwareAdapter` to support Redis server >= 2.8 and up to 4B items per tag - * added `TagAwareMarshaller` for optimized data storage when using `AbstractTagAwareAdapter` - * added `DeflateMarshaller` to compress serialized values - * removed support for phpredis 4 `compression` - * [BC BREAK] `RedisTagAwareAdapter` is not compatible with `RedisCluster` from `Predis` anymore, use `phpredis` instead - * Marked the `CacheDataCollector` class as `@final`. - * added `SodiumMarshaller` to encrypt/decrypt values using libsodium - -4.3.0 ------ - - * removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it - * deprecated all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead - * deprecated `SimpleCacheAdapter`, use `Psr16Adapter` instead - -4.2.0 ------ - - * added support for connecting to Redis clusters via DSN - * added support for configuring multiple Memcached servers via DSN - * added `MarshallerInterface` and `DefaultMarshaller` to allow changing the serializer and provide one that automatically uses igbinary when available - * implemented `CacheInterface`, which provides stampede protection via probabilistic early expiration and should become the preferred way to use a cache - * added sub-second expiry accuracy for backends that support it - * added support for phpredis 4 `compression` and `tcp_keepalive` options - * added automatic table creation when using Doctrine DBAL with PDO-based backends - * throw `LogicException` when `CacheItem::tag()` is called on an item coming from a non tag-aware pool - * deprecated `CacheItem::getPreviousTags()`, use `CacheItem::getMetadata()` instead - * deprecated the `AbstractAdapter::unserialize()` and `AbstractCache::unserialize()` methods - * added `CacheCollectorPass` (originally in `FrameworkBundle`) - * added `CachePoolClearerPass` (originally in `FrameworkBundle`) - * added `CachePoolPass` (originally in `FrameworkBundle`) - * added `CachePoolPrunerPass` (originally in `FrameworkBundle`) - -3.4.0 ------ - - * added using options from Memcached DSN - * added PruneableInterface so PSR-6 or PSR-16 cache implementations can declare support for manual stale cache pruning - * added prune logic to FilesystemTrait, PhpFilesTrait, PdoTrait, TagAwareAdapter and ChainTrait - * now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, PhpFilesCache, PdoAdapter, PdoCache, ChainAdapter, and - ChainCache implement PruneableInterface and support manual stale cache pruning - -3.3.0 ------ - - * added CacheItem::getPreviousTags() to get bound tags coming from the pool storage if any - * added PSR-16 "Simple Cache" implementations for all existing PSR-6 adapters - * added Psr6Cache and SimpleCacheAdapter for bidirectional interoperability between PSR-6 and PSR-16 - * added MemcachedAdapter (PSR-6) and MemcachedCache (PSR-16) - * added TraceableAdapter (PSR-6) and TraceableCache (PSR-16) - -3.2.0 ------ - - * added TagAwareAdapter for tags-based invalidation - * added PdoAdapter with PDO and Doctrine DBAL support - * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only) - * added NullAdapter - -3.1.0 ------ - - * added the component with strict PSR-6 implementations - * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter - * added AbstractAdapter, ChainAdapter and ProxyAdapter - * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache diff --git a/vendor/symfony/cache/CacheItem.php b/vendor/symfony/cache/CacheItem.php deleted file mode 100644 index 4ce8e0cd..00000000 --- a/vendor/symfony/cache/CacheItem.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas - */ -final class CacheItem implements ItemInterface -{ - private const METADATA_EXPIRY_OFFSET = 1527506807; - private const VALUE_WRAPPER = "\xA9"; - - protected string $key; - protected mixed $value = null; - protected bool $isHit = false; - protected float|int|null $expiry = null; - protected array $metadata = []; - protected array $newMetadata = []; - protected ?CacheItemInterface $innerItem = null; - protected ?string $poolHash = null; - protected bool $isTaggable = false; - - public function getKey(): string - { - return $this->key; - } - - public function get(): mixed - { - return $this->value; - } - - public function isHit(): bool - { - return $this->isHit; - } - - /** - * @return $this - */ - public function set($value): static - { - $this->value = $value; - - return $this; - } - - /** - * @return $this - */ - public function expiresAt(?\DateTimeInterface $expiration): static - { - $this->expiry = null !== $expiration ? (float) $expiration->format('U.u') : null; - - return $this; - } - - /** - * @return $this - */ - public function expiresAfter(mixed $time): static - { - if (null === $time) { - $this->expiry = null; - } elseif ($time instanceof \DateInterval) { - $this->expiry = microtime(true) + \DateTimeImmutable::createFromFormat('U', 0)->add($time)->format('U.u'); - } elseif (\is_int($time)) { - $this->expiry = $time + microtime(true); - } else { - throw new InvalidArgumentException(\sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time))); - } - - return $this; - } - - public function tag(mixed $tags): static - { - if (!$this->isTaggable) { - throw new LogicException(\sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); - } - if (!\is_array($tags) && !$tags instanceof \Traversable) { // don't use is_iterable(), it's slow - $tags = [$tags]; - } - foreach ($tags as $tag) { - if (!\is_string($tag) && !$tag instanceof \Stringable) { - throw new InvalidArgumentException(\sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', get_debug_type($tag))); - } - $tag = (string) $tag; - if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) { - continue; - } - if ('' === $tag) { - throw new InvalidArgumentException('Cache tag length must be greater than zero.'); - } - if (false !== strpbrk($tag, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(\sprintf('Cache tag "%s" contains reserved characters "%s".', $tag, self::RESERVED_CHARACTERS)); - } - $this->newMetadata[self::METADATA_TAGS][$tag] = $tag; - } - - return $this; - } - - public function getMetadata(): array - { - return $this->metadata; - } - - /** - * Validates a cache key according to PSR-6. - * - * @param mixed $key The key to validate - * - * @throws InvalidArgumentException When $key is not valid - */ - public static function validateKey($key): string - { - if (!\is_string($key)) { - throw new InvalidArgumentException(\sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if ('' === $key) { - throw new InvalidArgumentException('Cache key length must be greater than zero.'); - } - if (false !== strpbrk($key, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(\sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); - } - - return $key; - } - - /** - * Internal logging helper. - * - * @internal - */ - public static function log(?LoggerInterface $logger, string $message, array $context = []): void - { - if ($logger) { - $logger->warning($message, $context); - } else { - $replace = []; - foreach ($context as $k => $v) { - if (\is_scalar($v)) { - $replace['{'.$k.'}'] = $v; - } - } - @trigger_error(strtr($message, $replace), \E_USER_WARNING); - } - } - - private function pack(): mixed - { - if (!$m = $this->newMetadata) { - return $this->value; - } - $valueWrapper = self::VALUE_WRAPPER; - - return new $valueWrapper($this->value, $m + ['expiry' => $this->expiry]); - } - - private function unpack(): bool - { - $v = $this->value; - $valueWrapper = self::VALUE_WRAPPER; - - if ($v instanceof $valueWrapper) { - $this->value = $v->value; - $this->metadata = $v->metadata; - - return true; - } - - if (!\is_array($v) || 1 !== \count($v) || 10 !== \strlen($k = (string) array_key_first($v)) || "\x9D" !== $k[0] || "\0" !== $k[5] || "\x5F" !== $k[9]) { - return false; - } - - // BC with pools populated before v6.1 - $this->value = $v[$k]; - $this->metadata = unpack('Vexpiry/Nctime', substr($k, 1, -1)); - $this->metadata['expiry'] += self::METADATA_EXPIRY_OFFSET; - - return true; - } -} diff --git a/vendor/symfony/cache/DataCollector/CacheDataCollector.php b/vendor/symfony/cache/DataCollector/CacheDataCollector.php deleted file mode 100644 index 22a5a039..00000000 --- a/vendor/symfony/cache/DataCollector/CacheDataCollector.php +++ /dev/null @@ -1,185 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DataCollector; - -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableAdapterEvent; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; - -/** - * @author Aaron Scherer - * @author Tobias Nyholm - * - * @final - */ -class CacheDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var TraceableAdapter[] - */ - private array $instances = []; - - public function addInstance(string $name, TraceableAdapter $instance): void - { - $this->instances[$name] = $instance; - } - - public function collect(Request $request, Response $response, ?\Throwable $exception = null): void - { - $this->lateCollect(); - } - - public function reset(): void - { - $this->data = []; - foreach ($this->instances as $instance) { - $instance->clearCalls(); - } - } - - public function lateCollect(): void - { - $empty = ['calls' => [], 'adapters' => [], 'config' => [], 'options' => [], 'statistics' => []]; - $this->data = ['instances' => $empty, 'total' => $empty]; - foreach ($this->instances as $name => $instance) { - $this->data['instances']['calls'][$name] = $instance->getCalls(); - $this->data['instances']['adapters'][$name] = get_debug_type($instance->getPool()); - } - - $this->data['instances']['statistics'] = $this->calculateStatistics(); - $this->data['total']['statistics'] = $this->calculateTotalStatistics(); - $this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']); - } - - public function getName(): string - { - return 'cache'; - } - - /** - * Method returns amount of logged Cache reads: "get" calls. - */ - public function getStatistics(): array - { - return $this->data['instances']['statistics']; - } - - /** - * Method returns the statistic totals. - */ - public function getTotals(): array - { - return $this->data['total']['statistics']; - } - - /** - * Method returns all logged Cache call objects. - */ - public function getCalls(): mixed - { - return $this->data['instances']['calls']; - } - - /** - * Method returns all logged Cache adapter classes. - */ - public function getAdapters(): array - { - return $this->data['instances']['adapters']; - } - - private function calculateStatistics(): array - { - $statistics = []; - foreach ($this->data['instances']['calls'] as $name => $calls) { - $statistics[$name] = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - /** @var TraceableAdapterEvent $call */ - foreach ($calls as $call) { - ++$statistics[$name]['calls']; - $statistics[$name]['time'] += ($call->end ?? microtime(true)) - $call->start; - if ('get' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - ++$statistics[$name]['writes']; - } - } elseif ('getItem' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - } - } elseif ('getItems' === $call->name) { - $statistics[$name]['reads'] += $call->hits + $call->misses; - $statistics[$name]['hits'] += $call->hits; - $statistics[$name]['misses'] += $call->misses; - } elseif ('hasItem' === $call->name) { - ++$statistics[$name]['reads']; - foreach ($call->result ?? [] as $result) { - ++$statistics[$name][$result ? 'hits' : 'misses']; - } - } elseif ('save' === $call->name) { - ++$statistics[$name]['writes']; - } elseif ('deleteItem' === $call->name) { - ++$statistics[$name]['deletes']; - } - } - if ($statistics[$name]['reads']) { - $statistics[$name]['hit_read_ratio'] = round(100 * $statistics[$name]['hits'] / $statistics[$name]['reads'], 2); - } else { - $statistics[$name]['hit_read_ratio'] = null; - } - } - - return $statistics; - } - - private function calculateTotalStatistics(): array - { - $statistics = $this->getStatistics(); - $totals = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - foreach ($statistics as $name => $values) { - foreach ($totals as $key => $value) { - $totals[$key] += $statistics[$name][$key]; - } - } - if ($totals['reads']) { - $totals['hit_read_ratio'] = round(100 * $totals['hits'] / $totals['reads'], 2); - } else { - $totals['hit_read_ratio'] = null; - } - - return $totals; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php b/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php deleted file mode 100644 index 0b8d6aed..00000000 --- a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface; -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Inject a data collector to all the cache services to be able to get detailed statistics. - * - * @author Tobias Nyholm - */ -class CacheCollectorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - if (!$container->hasDefinition('data_collector.cache')) { - return; - } - - foreach ($container->findTaggedServiceIds('cache.pool') as $id => $attributes) { - $poolName = $attributes[0]['name'] ?? $id; - - $this->addToCollector($id, $poolName, $container); - } - } - - private function addToCollector(string $id, string $name, ContainerBuilder $container): void - { - $definition = $container->getDefinition($id); - if ($definition->isAbstract()) { - return; - } - - $collectorDefinition = $container->getDefinition('data_collector.cache'); - $recorder = new Definition(is_subclass_of($definition->getClass(), TagAwareAdapterInterface::class) ? TraceableTagAwareAdapter::class : TraceableAdapter::class); - $recorder->setTags($definition->getTags()); - if (!$definition->isPublic() || !$definition->isPrivate()) { - $recorder->setPublic($definition->isPublic()); - } - $recorder->setArguments([new Reference($innerId = $id.'.recorder_inner'), new Reference('profiler.is_disabled_state_checker', ContainerBuilder::IGNORE_ON_INVALID_REFERENCE)]); - - foreach ($definition->getMethodCalls() as [$method, $args]) { - if ('setCallbackWrapper' !== $method || !$args[0] instanceof Definition || !($args[0]->getArguments()[2] ?? null) instanceof Definition) { - continue; - } - if ([new Reference($id), 'setCallbackWrapper'] == $args[0]->getArguments()[2]->getFactory()) { - $args[0]->getArguments()[2]->setFactory([new Reference($innerId), 'setCallbackWrapper']); - } - } - - $definition->setTags([]); - $definition->setPublic(false); - - $container->setDefinition($innerId, $definition); - $container->setDefinition($id, $recorder); - - // Tell the collector to add the new instance - $collectorDefinition->addMethodCall('addInstance', [$name, new Reference($id)]); - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php deleted file mode 100644 index 54497209..00000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class CachePoolClearerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - $container->getParameterBag()->remove('cache.prefix.seed'); - - foreach ($container->findTaggedServiceIds('cache.pool.clearer') as $id => $attr) { - $clearer = $container->getDefinition($id); - $pools = []; - foreach ($clearer->getArgument(0) as $name => $ref) { - if ($container->hasDefinition($ref)) { - $pools[$name] = new Reference($ref); - } - } - $clearer->replaceArgument(0, $pools); - } - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPass.php deleted file mode 100644 index 2725d3ba..00000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\ParameterNormalizer; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\Messenger\EarlyExpirationDispatcher; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class CachePoolPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - if ($container->hasParameter('cache.prefix.seed')) { - $seed = $container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed')); - } else { - $seed = '_'.$container->getParameter('kernel.project_dir'); - $seed .= '.'.$container->getParameter('kernel.container_class'); - } - - $needsMessageHandler = false; - $allPools = []; - $clearers = []; - $attributes = [ - 'provider', - 'name', - 'namespace', - 'default_lifetime', - 'early_expiration_message_bus', - 'reset', - ]; - foreach ($container->findTaggedServiceIds('cache.pool') as $id => $tags) { - $adapter = $pool = $container->getDefinition($id); - if ($pool->isAbstract()) { - continue; - } - $class = $adapter->getClass(); - $providers = $adapter->getArguments(); - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $class = $class ?: $adapter->getClass(); - $providers += $adapter->getArguments(); - if ($t = $adapter->getTag('cache.pool')) { - $tags[0] += $t[0]; - } - } - $name = $tags[0]['name'] ?? $id; - if (!isset($tags[0]['namespace'])) { - $namespaceSeed = $seed; - if (null !== $class) { - $namespaceSeed .= '.'.$class; - } - - $tags[0]['namespace'] = $this->getNamespace($namespaceSeed, $name); - } - if (isset($tags[0]['clearer'])) { - $clearer = $tags[0]['clearer']; - while ($container->hasAlias($clearer)) { - $clearer = (string) $container->getAlias($clearer); - } - } else { - $clearer = null; - } - unset($tags[0]['clearer'], $tags[0]['name']); - - if (isset($tags[0]['provider'])) { - $tags[0]['provider'] = new Reference(static::getServiceProvider($container, $tags[0]['provider'])); - } - - if (ChainAdapter::class === $class) { - $adapters = []; - foreach ($providers['index_0'] ?? $providers[0] as $provider => $adapter) { - if ($adapter instanceof ChildDefinition) { - $chainedPool = $adapter; - } else { - $chainedPool = $adapter = new ChildDefinition($adapter); - } - - $chainedTags = [\is_int($provider) ? [] : ['provider' => $provider]]; - $chainedClass = ''; - - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $chainedClass = $chainedClass ?: $adapter->getClass(); - if ($t = $adapter->getTag('cache.pool')) { - $chainedTags[0] += $t[0]; - } - } - - if (ChainAdapter::class === $chainedClass) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent())); - } - - $i = 0; - - if (isset($chainedTags[0]['provider'])) { - $chainedPool->replaceArgument($i++, new Reference(static::getServiceProvider($container, $chainedTags[0]['provider']))); - } - - if (isset($tags[0]['namespace']) && !\in_array($adapter->getClass(), [ArrayAdapter::class, NullAdapter::class], true)) { - $chainedPool->replaceArgument($i++, $tags[0]['namespace']); - } - - if (isset($tags[0]['default_lifetime'])) { - $chainedPool->replaceArgument($i++, $tags[0]['default_lifetime']); - } - - $adapters[] = $chainedPool; - } - - $pool->replaceArgument(0, $adapters); - unset($tags[0]['provider'], $tags[0]['namespace']); - $i = 1; - } else { - $i = 0; - } - - foreach ($attributes as $attr) { - if (!isset($tags[0][$attr])) { - // no-op - } elseif ('reset' === $attr) { - if ($tags[0][$attr]) { - $pool->addTag('kernel.reset', ['method' => $tags[0][$attr]]); - } - } elseif ('early_expiration_message_bus' === $attr) { - $needsMessageHandler = true; - $pool->addMethodCall('setCallbackWrapper', [(new Definition(EarlyExpirationDispatcher::class)) - ->addArgument(new Reference($tags[0]['early_expiration_message_bus'])) - ->addArgument(new Reference('reverse_container')) - ->addArgument((new Definition('callable')) - ->setFactory([new Reference($id), 'setCallbackWrapper']) - ->addArgument(null) - ), - ]); - $pool->addTag('container.reversible'); - } elseif ('namespace' !== $attr || !\in_array($class, [ArrayAdapter::class, NullAdapter::class, TagAwareAdapter::class], true)) { - $argument = $tags[0][$attr]; - - if ('default_lifetime' === $attr && !is_numeric($argument)) { - $argument = (new Definition('int', [$argument])) - ->setFactory([ParameterNormalizer::class, 'normalizeDuration']); - } - - $pool->replaceArgument($i++, $argument); - } - unset($tags[0][$attr]); - } - if (!empty($tags[0])) { - throw new InvalidArgumentException(\sprintf('Invalid "cache.pool" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $id, implode('", "', array_keys($tags[0])))); - } - - if (null !== $clearer) { - $clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - $allPools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - if (!$needsMessageHandler) { - $container->removeDefinition('cache.early_expiration_handler'); - } - - $notAliasedCacheClearerId = 'cache.global_clearer'; - while ($container->hasAlias($notAliasedCacheClearerId)) { - $notAliasedCacheClearerId = (string) $container->getAlias($notAliasedCacheClearerId); - } - if ($container->hasDefinition($notAliasedCacheClearerId)) { - $clearers[$notAliasedCacheClearerId] = $allPools; - } - - foreach ($clearers as $id => $pools) { - $clearer = $container->getDefinition($id); - if ($clearer instanceof ChildDefinition) { - $clearer->replaceArgument(0, $pools); - } else { - $clearer->setArgument(0, $pools); - } - $clearer->addTag('cache.pool.clearer'); - } - - $allPoolsKeys = array_keys($allPools); - - if ($container->hasDefinition('console.command.cache_pool_list')) { - $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, $allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_clear')) { - $container->getDefinition('console.command.cache_pool_clear')->addArgument($allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_delete')) { - $container->getDefinition('console.command.cache_pool_delete')->addArgument($allPoolsKeys); - } - } - - private function getNamespace(string $seed, string $id): string - { - return substr(str_replace('/', '-', base64_encode(hash('xxh128', $id.$seed, true))), 0, 10); - } - - /** - * @internal - */ - public static function getServiceProvider(ContainerBuilder $container, string $name): string - { - $container->resolveEnvPlaceholders($name, null, $usedEnvs); - - if ($usedEnvs || preg_match('#^[a-z]++:#', $name)) { - $dsn = $name; - - if (!$container->hasDefinition($name = '.cache_connection.'.ContainerBuilder::hash($dsn))) { - $definition = new Definition(AbstractAdapter::class); - $definition->setFactory([AbstractAdapter::class, 'createConnection']); - $definition->setArguments([$dsn, ['lazy' => true]]); - $container->setDefinition($name, $definition); - } - } - - return $name; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php deleted file mode 100644 index 68386f57..00000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Rob Frawley 2nd - */ -class CachePoolPrunerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - if (!$container->hasDefinition('console.command.cache_pool_prune')) { - return; - } - - $services = []; - - foreach ($container->findTaggedServiceIds('cache.pool') as $id => $tags) { - $class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass()); - - if (!$reflection = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - - if ($reflection->implementsInterface(PruneableInterface::class)) { - $services[$id] = new Reference($id); - } - } - - $container->getDefinition('console.command.cache_pool_prune')->replaceArgument(0, new IteratorArgument($services)); - } -} diff --git a/vendor/symfony/cache/Exception/BadMethodCallException.php b/vendor/symfony/cache/Exception/BadMethodCallException.php deleted file mode 100644 index d81f9d26..00000000 --- a/vendor/symfony/cache/Exception/BadMethodCallException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class BadMethodCallException extends \BadMethodCallException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class BadMethodCallException extends \BadMethodCallException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/CacheException.php b/vendor/symfony/cache/Exception/CacheException.php deleted file mode 100644 index d2e975b2..00000000 --- a/vendor/symfony/cache/Exception/CacheException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class CacheException extends \Exception implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/InvalidArgumentException.php b/vendor/symfony/cache/Exception/InvalidArgumentException.php deleted file mode 100644 index 7f9584a2..00000000 --- a/vendor/symfony/cache/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\InvalidArgumentException as Psr6CacheInterface; -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/LogicException.php b/vendor/symfony/cache/Exception/LogicException.php deleted file mode 100644 index 9ffa7ed6..00000000 --- a/vendor/symfony/cache/Exception/LogicException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class LogicException extends \LogicException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/LICENSE b/vendor/symfony/cache/LICENSE deleted file mode 100644 index 0223acd4..00000000 --- a/vendor/symfony/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache/LockRegistry.php b/vendor/symfony/cache/LockRegistry.php deleted file mode 100644 index 6923b40b..00000000 --- a/vendor/symfony/cache/LockRegistry.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Log\LoggerInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * LockRegistry is used internally by existing adapters to protect against cache stampede. - * - * It does so by wrapping the computation of items in a pool of locks. - * Foreach each apps, there can be at most 20 concurrent processes that - * compute items at the same time and only one per cache-key. - * - * @author Nicolas Grekas - */ -final class LockRegistry -{ - private static array $openedFiles = []; - private static ?array $lockedFiles = null; - private static \Exception $signalingException; - private static \Closure $signalingCallback; - - /** - * The number of items in this list controls the max number of concurrent processes. - */ - private static array $files = [ - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ApcuAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ChainAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseBucketAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseCollectionAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineDbalAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'MemcachedAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'NullAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ParameterNormalizer.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PdoAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpFilesAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ProxyAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'Psr16Adapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableTagAwareAdapter.php', - ]; - - /** - * Defines a set of existing files that will be used as keys to acquire locks. - * - * @return array The previously defined set of files - */ - public static function setFiles(array $files): array - { - $previousFiles = self::$files; - self::$files = $files; - - foreach (self::$openedFiles as $file) { - if ($file) { - flock($file, \LOCK_UN); - fclose($file); - } - } - self::$openedFiles = self::$lockedFiles = []; - - return $previousFiles; - } - - public static function compute(callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, ?\Closure $setMetadata = null, ?LoggerInterface $logger = null): mixed - { - if ('\\' === \DIRECTORY_SEPARATOR && null === self::$lockedFiles) { - // disable locking on Windows by default - self::$files = self::$lockedFiles = []; - } - - $key = self::$files ? abs(crc32($item->getKey())) % \count(self::$files) : -1; - - if ($key < 0 || self::$lockedFiles || !$lock = self::open($key)) { - return $callback($item, $save); - } - - self::$signalingException ??= unserialize("O:9:\"Exception\":1:{s:16:\"\0Exception\0trace\";a:0:{}}"); - self::$signalingCallback ??= fn () => throw self::$signalingException; - - while (true) { - try { - // race to get the lock in non-blocking mode - $locked = flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); - - if ($locked || !$wouldBlock) { - $logger?->info(\sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]); - self::$lockedFiles[$key] = true; - - $value = $callback($item, $save); - - if ($save) { - if ($setMetadata) { - $setMetadata($item); - } - - $pool->save($item->set($value)); - $save = false; - } - - return $value; - } - // if we failed the race, retry locking in blocking mode to wait for the winner - $logger?->info('Item "{key}" is locked, waiting for it to be released', ['key' => $item->getKey()]); - flock($lock, \LOCK_SH); - } finally { - flock($lock, \LOCK_UN); - unset(self::$lockedFiles[$key]); - } - - try { - $value = $pool->get($item->getKey(), self::$signalingCallback, 0); - $logger?->info('Item "{key}" retrieved after lock was released', ['key' => $item->getKey()]); - $save = false; - - return $value; - } catch (\Exception $e) { - if (self::$signalingException !== $e) { - throw $e; - } - $logger?->info('Item "{key}" not found while lock was released, now retrying', ['key' => $item->getKey()]); - } - } - - return null; - } - - /** - * @return resource|false - */ - private static function open(int $key) - { - if (null !== $h = self::$openedFiles[$key] ?? null) { - return $h; - } - set_error_handler(static fn () => null); - try { - $h = fopen(self::$files[$key], 'r+'); - } finally { - restore_error_handler(); - } - - return self::$openedFiles[$key] = $h ?: @fopen(self::$files[$key], 'r'); - } -} diff --git a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php b/vendor/symfony/cache/Marshaller/DefaultMarshaller.php deleted file mode 100644 index 02ebcfad..00000000 --- a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Serializes/unserializes values using igbinary_serialize() if available, serialize() otherwise. - * - * @author Nicolas Grekas - */ -class DefaultMarshaller implements MarshallerInterface -{ - private bool $useIgbinarySerialize = false; - private bool $throwOnSerializationFailure = false; - - public function __construct(?bool $useIgbinarySerialize = null, bool $throwOnSerializationFailure = false) - { - if ($useIgbinarySerialize && (!\extension_loaded('igbinary') || version_compare('3.1.6', phpversion('igbinary'), '>'))) { - throw new CacheException(\extension_loaded('igbinary') ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.'); - } - $this->useIgbinarySerialize = true === $useIgbinarySerialize; - $this->throwOnSerializationFailure = $throwOnSerializationFailure; - } - - public function marshall(array $values, ?array &$failed): array - { - $serialized = $failed = []; - - foreach ($values as $id => $value) { - try { - if ($this->useIgbinarySerialize) { - $serialized[$id] = igbinary_serialize($value); - } else { - $serialized[$id] = serialize($value); - } - } catch (\Exception $e) { - if ($this->throwOnSerializationFailure) { - throw new \ValueError($e->getMessage(), 0, $e); - } - $failed[] = $id; - } - } - - return $serialized; - } - - public function unmarshall(string $value): mixed - { - if ('b:0;' === $value) { - return false; - } - if ('N;' === $value) { - return null; - } - static $igbinaryNull; - if ($value === $igbinaryNull ??= \extension_loaded('igbinary') ? igbinary_serialize(null) : false) { - return null; - } - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - if (':' === ($value[1] ?? ':')) { - if (false !== $value = unserialize($value)) { - return $value; - } - } elseif (false === $igbinaryNull) { - throw new \RuntimeException('Failed to unserialize values, did you forget to install the "igbinary" extension?'); - } elseif (null !== $value = igbinary_unserialize($value)) { - return $value; - } - - throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize values.'); - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class): never - { - throw new \DomainException('Class not found: '.$class); - } -} diff --git a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php b/vendor/symfony/cache/Marshaller/DeflateMarshaller.php deleted file mode 100644 index f35241c5..00000000 --- a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Compresses values using gzdeflate(). - * - * @author Nicolas Grekas - */ -class DeflateMarshaller implements MarshallerInterface -{ - public function __construct( - private MarshallerInterface $marshaller, - ) { - if (!\function_exists('gzdeflate')) { - throw new CacheException('The "zlib" PHP extension is not loaded.'); - } - } - - public function marshall(array $values, ?array &$failed): array - { - return array_map('gzdeflate', $this->marshaller->marshall($values, $failed)); - } - - public function unmarshall(string $value): mixed - { - if (false !== $inflatedValue = @gzinflate($value)) { - $value = $inflatedValue; - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/MarshallerInterface.php b/vendor/symfony/cache/Marshaller/MarshallerInterface.php deleted file mode 100644 index 5b81aad2..00000000 --- a/vendor/symfony/cache/Marshaller/MarshallerInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * Serializes/unserializes PHP values. - * - * Implementations of this interface MUST deal with errors carefully. They MUST - * also deal with forward and backward compatibility at the storage format level. - * - * @author Nicolas Grekas - */ -interface MarshallerInterface -{ - /** - * Serializes a list of values. - * - * When serialization fails for a specific value, no exception should be - * thrown. Instead, its key should be listed in $failed. - */ - public function marshall(array $values, ?array &$failed): array; - - /** - * Unserializes a single value and throws an exception if anything goes wrong. - * - * @throws \Exception Whenever unserialization fails - */ - public function unmarshall(string $value): mixed; -} diff --git a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php b/vendor/symfony/cache/Marshaller/SodiumMarshaller.php deleted file mode 100644 index 77d16e8b..00000000 --- a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * Encrypt/decrypt values using Libsodium. - * - * @author Ahmed TAILOULOUTE - */ -class SodiumMarshaller implements MarshallerInterface -{ - private MarshallerInterface $marshaller; - - /** - * @param string[] $decryptionKeys The key at index "0" is required and is used to decrypt and encrypt values; - * more rotating keys can be provided to decrypt values; - * each key must be generated using sodium_crypto_box_keypair() - */ - public function __construct( - private array $decryptionKeys, - ?MarshallerInterface $marshaller = null, - ) { - if (!self::isSupported()) { - throw new CacheException('The "sodium" PHP extension is not loaded.'); - } - - if (!isset($decryptionKeys[0])) { - throw new InvalidArgumentException('At least one decryption key must be provided at index "0".'); - } - - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function isSupported(): bool - { - return \function_exists('sodium_crypto_box_seal'); - } - - public function marshall(array $values, ?array &$failed): array - { - $encryptionKey = sodium_crypto_box_publickey($this->decryptionKeys[0]); - - $encryptedValues = []; - foreach ($this->marshaller->marshall($values, $failed) as $k => $v) { - $encryptedValues[$k] = sodium_crypto_box_seal($v, $encryptionKey); - } - - return $encryptedValues; - } - - public function unmarshall(string $value): mixed - { - foreach ($this->decryptionKeys as $k) { - if (false !== $decryptedValue = @sodium_crypto_box_seal_open($value, $k)) { - $value = $decryptedValue; - break; - } - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php b/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php deleted file mode 100644 index 825f32cc..00000000 --- a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * A marshaller optimized for data structures generated by AbstractTagAwareAdapter. - * - * @author Nicolas Grekas - */ -class TagAwareMarshaller implements MarshallerInterface -{ - private MarshallerInterface $marshaller; - - public function __construct(?MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public function marshall(array $values, ?array &$failed): array - { - $failed = $notSerialized = $serialized = []; - - foreach ($values as $id => $value) { - if (\is_array($value) && \is_array($value['tags'] ?? null) && \array_key_exists('value', $value) && \count($value) === 2 + (\is_string($value['meta'] ?? null) && 8 === \strlen($value['meta']))) { - // if the value is an array with keys "tags", "value" and "meta", use a compact serialization format - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F allow detecting this format quickly in unmarshall() - - $v = $this->marshaller->marshall($value, $f); - - if ($f) { - $f = []; - $failed[] = $id; - } else { - if ([] === $value['tags']) { - $v['tags'] = ''; - } - - $serialized[$id] = "\x9D".($value['meta'] ?? "\0\0\0\0\0\0\0\0").pack('N', \strlen($v['tags'])).$v['tags'].$v['value']; - $serialized[$id][9] = "\x5F"; - } - } else { - // other arbitrary values are serialized using the decorated marshaller below - $notSerialized[$id] = $value; - } - } - - if ($notSerialized) { - $serialized += $this->marshaller->marshall($notSerialized, $f); - $failed = array_merge($failed, $f); - } - - return $serialized; - } - - public function unmarshall(string $value): mixed - { - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 >= \strlen($value) || "\x9D" !== $value[0] || "\0" !== $value[5] || "\x5F" !== $value[9]) { - return $this->marshaller->unmarshall($value); - } - - // data consists of value, tags and metadata which we need to unpack - $meta = substr($value, 1, 12); - $meta[8] = "\0"; - $tagLen = unpack('Nlen', $meta, 8)['len']; - $meta = substr($meta, 0, 8); - - return [ - 'value' => $this->marshaller->unmarshall(substr($value, 13 + $tagLen)), - 'tags' => $tagLen ? $this->marshaller->unmarshall(substr($value, 13, $tagLen)) : [], - 'meta' => "\0\0\0\0\0\0\0\0" === $meta ? null : $meta, - ]; - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php b/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php deleted file mode 100644 index d9726347..00000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Stamp\HandledStamp; - -/** - * Sends the computation of cached values to a message bus. - */ -class EarlyExpirationDispatcher -{ - private ?\Closure $callbackWrapper; - - public function __construct( - private MessageBusInterface $bus, - private ReverseContainer $reverseContainer, - ?callable $callbackWrapper = null, - ) { - $this->callbackWrapper = null === $callbackWrapper ? null : $callbackWrapper(...); - } - - public function __invoke(callable $callback, CacheItem $item, bool &$save, AdapterInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger = null): mixed - { - if (!$item->isHit() || null === $message = EarlyExpirationMessage::create($this->reverseContainer, $callback, $item, $pool)) { - // The item is stale or the callback cannot be reversed: we must compute the value now - $logger?->info('Computing item "{key}" online: '.($item->isHit() ? 'callback cannot be reversed' : 'item is stale'), ['key' => $item->getKey()]); - - return null !== $this->callbackWrapper ? ($this->callbackWrapper)($callback, $item, $save, $pool, $setMetadata, $logger) : $callback($item, $save); - } - - $envelope = $this->bus->dispatch($message); - - if ($logger) { - if ($envelope->last(HandledStamp::class)) { - $logger->info('Item "{key}" was computed online', ['key' => $item->getKey()]); - } else { - $logger->info('Item "{key}" sent for recomputation', ['key' => $item->getKey()]); - } - } - - // The item's value is not stale, no need to write it to the backend - $save = false; - - return $message->getItem()->get() ?? $item->get(); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php b/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php deleted file mode 100644 index adaeb5bb..00000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\Attribute\AsMessageHandler; - -/** - * Computes cached values sent to a message bus. - */ -#[AsMessageHandler] -class EarlyExpirationHandler -{ - private array $processedNonces = []; - - public function __construct( - private ReverseContainer $reverseContainer, - ) { - } - - public function __invoke(EarlyExpirationMessage $message): void - { - $item = $message->getItem(); - $metadata = $item->getMetadata(); - $expiry = $metadata[CacheItem::METADATA_EXPIRY] ?? 0; - $ctime = $metadata[CacheItem::METADATA_CTIME] ?? 0; - - if ($expiry && $ctime) { - // skip duplicate or expired messages - - $processingNonce = [$expiry, $ctime]; - $pool = $message->getPool(); - $key = $item->getKey(); - - if (($this->processedNonces[$pool][$key] ?? null) === $processingNonce) { - return; - } - - if (microtime(true) >= $expiry) { - return; - } - - $this->processedNonces[$pool] = [$key => $processingNonce] + ($this->processedNonces[$pool] ?? []); - - if (\count($this->processedNonces[$pool]) > 100) { - array_pop($this->processedNonces[$pool]); - } - } - - static $setMetadata; - - $setMetadata ??= \Closure::bind( - function (CacheItem $item, float $startTime) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } - }, - null, - CacheItem::class - ); - - $startTime = microtime(true); - $pool = $message->findPool($this->reverseContainer); - $callback = $message->findCallback($this->reverseContainer); - $save = true; - $value = $callback($item, $save); - $setMetadata($item, $startTime); - $pool->save($item->set($value)); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php b/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php deleted file mode 100644 index de8256b9..00000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; - -/** - * Conveys a cached value that needs to be computed. - */ -final class EarlyExpirationMessage -{ - public static function create(ReverseContainer $reverseContainer, callable $callback, CacheItem $item, AdapterInterface $pool): ?self - { - try { - $item = clone $item; - $item->set(null); - } catch (\Exception) { - return null; - } - - $pool = $reverseContainer->getId($pool); - - if (\is_object($callback)) { - if (null === $id = $reverseContainer->getId($callback)) { - return null; - } - - $callback = '@'.$id; - } elseif (!\is_array($callback)) { - $callback = (string) $callback; - } elseif (!\is_object($callback[0])) { - $callback = [(string) $callback[0], (string) $callback[1]]; - } else { - if (null === $id = $reverseContainer->getId($callback[0])) { - return null; - } - - $callback = ['@'.$id, (string) $callback[1]]; - } - - return new self($item, $pool, $callback); - } - - public function getItem(): CacheItem - { - return $this->item; - } - - public function getPool(): string - { - return $this->pool; - } - - /** - * @return string|string[] - */ - public function getCallback(): string|array - { - return $this->callback; - } - - public function findPool(ReverseContainer $reverseContainer): AdapterInterface - { - return $reverseContainer->getService($this->pool); - } - - public function findCallback(ReverseContainer $reverseContainer): callable - { - if (\is_string($callback = $this->callback)) { - return '@' === $callback[0] ? $reverseContainer->getService(substr($callback, 1)) : $callback; - } - if ('@' === $callback[0][0]) { - $callback[0] = $reverseContainer->getService(substr($callback[0], 1)); - } - - return $callback; - } - - private function __construct( - private CacheItem $item, - private string $pool, - private string|array $callback, - ) { - } -} diff --git a/vendor/symfony/cache/PruneableInterface.php b/vendor/symfony/cache/PruneableInterface.php deleted file mode 100644 index 3095c80f..00000000 --- a/vendor/symfony/cache/PruneableInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -/** - * Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items. - */ -interface PruneableInterface -{ - public function prune(): bool; -} diff --git a/vendor/symfony/cache/Psr16Cache.php b/vendor/symfony/cache/Psr16Cache.php deleted file mode 100644 index 01494d71..00000000 --- a/vendor/symfony/cache/Psr16Cache.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Cache\CacheException as Psr6CacheException; -use Psr\Cache\CacheItemPoolInterface; -use Psr\SimpleCache\CacheException as SimpleCacheException; -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Traits\ProxyTrait; - -/** - * Turns a PSR-6 cache into a PSR-16 one. - * - * @author Nicolas Grekas - */ -class Psr16Cache implements CacheInterface, PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - private ?\Closure $createCacheItem = null; - private ?CacheItem $cacheItemPrototype = null; - private static \Closure $packCacheItem; - - public function __construct(CacheItemPoolInterface $pool) - { - $this->pool = $pool; - - if (!$pool instanceof AdapterInterface) { - return; - } - $cacheItemPrototype = &$this->cacheItemPrototype; - $createCacheItem = \Closure::bind( - static function ($key, $value, $allowInt = false) use (&$cacheItemPrototype) { - $item = clone $cacheItemPrototype; - $item->poolHash = $item->innerItem = null; - if ($allowInt && \is_int($key)) { - $item->key = (string) $key; - } else { - \assert('' !== CacheItem::validateKey($key)); - $item->key = $key; - } - $item->value = $value; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - $this->createCacheItem = function ($key, $value, $allowInt = false) use ($createCacheItem) { - if (null === $this->cacheItemPrototype) { - $this->get($allowInt && \is_int($key) ? (string) $key : $key); - } - $this->createCacheItem = $createCacheItem; - - return $createCacheItem($key, null, $allowInt)->set($value); - }; - self::$packCacheItem ??= \Closure::bind( - static function (CacheItem $item) { - $item->newMetadata = $item->metadata; - - return $item->pack(); - }, - null, - CacheItem::class - ); - } - - public function get($key, $default = null): mixed - { - try { - $item = $this->pool->getItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null === $this->cacheItemPrototype) { - $this->cacheItemPrototype = clone $item; - $this->cacheItemPrototype->set(null); - } - - return $item->isHit() ? $item->get() : $default; - } - - public function set($key, $value, $ttl = null): bool - { - try { - if (null !== $f = $this->createCacheItem) { - $item = $f($key, $value); - } else { - $item = $this->pool->getItem($key)->set($value); - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - - return $this->pool->save($item); - } - - public function delete($key): bool - { - try { - return $this->pool->deleteItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - public function clear(): bool - { - return $this->pool->clear(); - } - - public function getMultiple($keys, $default = null): iterable - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(\sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - $items = $this->pool->getItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $values = []; - - if (!$this->pool instanceof AdapterInterface) { - foreach ($items as $key => $item) { - $values[$key] = $item->isHit() ? $item->get() : $default; - } - - return $values; - } - - foreach ($items as $key => $item) { - $values[$key] = $item->isHit() ? (self::$packCacheItem)($item) : $default; - } - - return $values; - } - - public function setMultiple($values, $ttl = null): bool - { - $valuesIsArray = \is_array($values); - if (!$valuesIsArray && !$values instanceof \Traversable) { - throw new InvalidArgumentException(\sprintf('Cache values must be array or Traversable, "%s" given.', get_debug_type($values))); - } - $items = []; - - try { - if (null !== $f = $this->createCacheItem) { - $valuesIsArray = false; - foreach ($values as $key => $value) { - $items[$key] = $f($key, $value, true); - } - } elseif ($valuesIsArray) { - $items = []; - foreach ($values as $key => $value) { - $items[] = (string) $key; - } - $items = $this->pool->getItems($items); - } else { - foreach ($values as $key => $value) { - if (\is_int($key)) { - $key = (string) $key; - } - $items[$key] = $this->pool->getItem($key)->set($value); - } - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $ok = true; - - foreach ($items as $key => $item) { - if ($valuesIsArray) { - $item->set($values[$key]); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - $ok = $this->pool->saveDeferred($item) && $ok; - } - - return $this->pool->commit() && $ok; - } - - public function deleteMultiple($keys): bool - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(\sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - return $this->pool->deleteItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - public function has($key): bool - { - try { - return $this->pool->hasItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/vendor/symfony/cache/README.md b/vendor/symfony/cache/README.md deleted file mode 100644 index c466d578..00000000 --- a/vendor/symfony/cache/README.md +++ /dev/null @@ -1,19 +0,0 @@ -Symfony PSR-6 implementation for caching -======================================== - -The Cache component provides extended -[PSR-6](https://www.php-fig.org/psr/psr-6/) implementations for adding cache to -your applications. It is designed to have a low overhead so that caching is -fastest. It ships with adapters for the most widespread caching backends. -It also provides a [PSR-16](https://www.php-fig.org/psr/psr-16/) adapter, -and implementations for [symfony/cache-contracts](https://github.com/symfony/cache-contracts)' -`CacheInterface` and `TagAwareCacheInterface`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/cache.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/cache/ResettableInterface.php b/vendor/symfony/cache/ResettableInterface.php deleted file mode 100644 index 7b0a853f..00000000 --- a/vendor/symfony/cache/ResettableInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Resets a pool's local state. - */ -interface ResettableInterface extends ResetInterface -{ -} diff --git a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/vendor/symfony/cache/Traits/AbstractAdapterTrait.php deleted file mode 100644 index 92e106fb..00000000 --- a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php +++ /dev/null @@ -1,403 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait AbstractAdapterTrait -{ - use LoggerAwareTrait; - - /** - * needs to be set by class, signature is function(string , mixed , bool ). - */ - private static \Closure $createCacheItem; - - /** - * needs to be set by class, signature is function(array , string , array <&expiredIds>). - */ - private static \Closure $mergeByLifetime; - - private readonly string $rootNamespace; - private string $namespace = ''; - private int $defaultLifetime; - private string $namespaceVersion = ''; - private bool $versioningIsEnabled = false; - private array $deferred = []; - private array $ids = []; - - /** - * The maximum length to enforce for identifiers or null when no limit applies. - */ - protected ?int $maxIdLength = null; - - /** - * Fetches several cache items. - * - * @param array $ids The cache identifiers to fetch - */ - abstract protected function doFetch(array $ids): iterable; - - /** - * Confirms if the cache contains specified cache item. - * - * @param string $id The identifier for which to check existence - */ - abstract protected function doHave(string $id): bool; - - /** - * Deletes all items in the pool. - * - * @param string $namespace The prefix used for all identifiers managed by this pool - */ - abstract protected function doClear(string $namespace): bool; - - /** - * Removes multiple items from the pool. - * - * @param array $ids An array of identifiers that should be removed from the pool - */ - abstract protected function doDelete(array $ids): bool; - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * - * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime): array|bool; - - public function hasItem(mixed $key): bool - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - try { - return $this->doHave($id); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached: '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - public function clear(string $prefix = ''): bool - { - $this->deferred = []; - if ($cleared = $this->versioningIsEnabled) { - $rootNamespace = $this->rootNamespace ??= $this->namespace; - if ('' === $namespaceVersionToClear = $this->namespaceVersion) { - foreach ($this->doFetch([static::NS_SEPARATOR.$rootNamespace]) as $v) { - $namespaceVersionToClear = $v; - } - } - $namespaceToClear = $rootNamespace.$namespaceVersionToClear; - $namespaceVersion = self::formatNamespaceVersion(mt_rand()); - try { - $e = $this->doSave([static::NS_SEPARATOR.$rootNamespace => $namespaceVersion], 0); - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $cleared = false; - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } else { - $this->namespaceVersion = $namespaceVersion; - $this->ids = []; - } - } else { - $namespaceToClear = $this->namespace.$prefix; - } - - try { - return $this->doClear($namespaceToClear) || $cleared; - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - public function deleteItem(mixed $key): bool - { - return $this->deleteItems([$key]); - } - - public function deleteItems(array $keys): bool - { - $ids = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - if ($this->doDelete($ids)) { - return true; - } - } catch (\Exception) { - } - - $ok = true; - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - public function getItem(mixed $key): CacheItem - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - $isHit = false; - $value = null; - - try { - foreach ($this->doFetch([$id]) as $value) { - $isHit = true; - } - - return (self::$createCacheItem)($key, $value, $isHit); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return (self::$createCacheItem)($key, null, false); - } - - public function getItems(array $keys = []): iterable - { - $ids = []; - $commit = false; - - foreach ($keys as $key) { - $ids[] = $this->getId($key); - $commit = $commit || isset($this->deferred[$key]); - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->doFetch($ids); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $items = []; - } - $ids = array_combine($ids, $keys); - - return $this->generateItems($items, $ids); - } - - public function save(CacheItemInterface $item): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - public function saveDeferred(CacheItemInterface $item): bool - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - public function withSubNamespace(string $namespace): static - { - $this->rootNamespace ??= $this->namespace; - - $clone = clone $this; - $clone->namespace .= CacheItem::validateKey($namespace).static::NS_SEPARATOR; - - return $clone; - } - - /** - * Enables/disables versioning of items. - * - * When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed, - * but old keys may need garbage collection and extra round-trips to the back-end are required. - * - * Calling this method also clears the memoized namespace version and thus forces a resynchronization of it. - * - * @return bool the previous state of versioning - */ - public function enableVersioning(bool $enable = true): bool - { - $wasEnabled = $this->versioningIsEnabled; - $this->versioningIsEnabled = $enable; - $this->namespaceVersion = ''; - $this->ids = []; - - return $wasEnabled; - } - - public function reset(): void - { - if ($this->deferred) { - $this->commit(); - } - $this->namespaceVersion = ''; - $this->ids = []; - } - - public function __serialize(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __unserialize(array $data): void - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if ($this->deferred) { - $this->commit(); - } - } - - private function generateItems(iterable $items, array &$keys): \Generator - { - $f = self::$createCacheItem; - - try { - foreach ($items as $id => $value) { - if (!isset($keys[$id])) { - throw new InvalidArgumentException(\sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); - } - $key = $keys[$id]; - unset($keys[$id]); - yield $key => $f($key, $value, true); - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - /** - * @internal - */ - protected function getId(mixed $key, ?string $namespace = null): string - { - $namespace ??= $this->namespace; - - if ('' !== $this->namespaceVersion) { - $namespace .= $this->namespaceVersion; - } elseif ($this->versioningIsEnabled) { - $rootNamespace = $this->rootNamespace ??= $this->namespace; - $this->ids = []; - $this->namespaceVersion = '1'.static::NS_SEPARATOR; - try { - foreach ($this->doFetch([static::NS_SEPARATOR.$rootNamespace]) as $v) { - $this->namespaceVersion = $v; - } - $e = true; - if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) { - $this->namespaceVersion = self::formatNamespaceVersion(time()); - $e = $this->doSave([static::NS_SEPARATOR.$rootNamespace => $this->namespaceVersion], 0); - } - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - - $namespace .= $this->namespaceVersion; - } - - if (\is_string($key) && isset($this->ids[$key])) { - $id = $this->ids[$key]; - } else { - \assert('' !== CacheItem::validateKey($key)); - $this->ids[$key] = $key; - - if (\count($this->ids) > 1000) { - $this->ids = \array_slice($this->ids, 500, null, true); // stop memory leak if there are many keys - } - - if (null === $this->maxIdLength) { - return $namespace.$key; - } - if (\strlen($id = $namespace.$key) <= $this->maxIdLength) { - return $id; - } - - // Use xxh128 to favor speed over security, which is not an issue here - $this->ids[$key] = $id = substr_replace(base64_encode(hash('xxh128', $key, true)), static::NS_SEPARATOR, -(\strlen($this->namespaceVersion) + 2)); - } - $id = $namespace.$id; - - if (null !== $this->maxIdLength && \strlen($id) > $this->maxIdLength) { - return base64_encode(hash('xxh128', $id, true)); - } - - return $id; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class): never - { - throw new \DomainException('Class not found: '.$class); - } - - private static function formatNamespaceVersion(int $value): string - { - return strtr(substr_replace(base64_encode(pack('V', $value)), static::NS_SEPARATOR, 5), '/', '_'); - } -} diff --git a/vendor/symfony/cache/Traits/CachedValueInterface.php b/vendor/symfony/cache/Traits/CachedValueInterface.php deleted file mode 100644 index 8e95f60b..00000000 --- a/vendor/symfony/cache/Traits/CachedValueInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @internal - */ -interface CachedValueInterface -{ - public function getValue(): mixed; -} diff --git a/vendor/symfony/cache/Traits/ContractsTrait.php b/vendor/symfony/cache/Traits/ContractsTrait.php deleted file mode 100644 index d461582d..00000000 --- a/vendor/symfony/cache/Traits/ContractsTrait.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\LockRegistry; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\CacheTrait; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait ContractsTrait -{ - use CacheTrait { - doGet as private contractsGet; - } - - private \Closure $callbackWrapper; - private array $computing = []; - - /** - * Wraps the callback passed to ->get() in a callable. - * - * @return callable the previous callback wrapper - */ - public function setCallbackWrapper(?callable $callbackWrapper): callable - { - if (!isset($this->callbackWrapper)) { - $this->callbackWrapper = LockRegistry::compute(...); - - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { - $this->setCallbackWrapper(null); - } - } - - if (null !== $callbackWrapper && !$callbackWrapper instanceof \Closure) { - $callbackWrapper = $callbackWrapper(...); - } - - $previousWrapper = $this->callbackWrapper; - $this->callbackWrapper = $callbackWrapper ?? static fn (callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger) => $callback($item, $save); - - return $previousWrapper; - } - - private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null): mixed - { - if (0 > $beta ??= 1.0) { - throw new InvalidArgumentException(\sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); - } - - static $setMetadata; - - $setMetadata ??= \Closure::bind( - static function (CacheItem $item, float $startTime, ?array &$metadata) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $metadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = $metadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } else { - unset($metadata[CacheItem::METADATA_EXPIRY], $metadata[CacheItem::METADATA_CTIME], $metadata[CacheItem::METADATA_TAGS]); - } - }, - null, - CacheItem::class - ); - - $this->callbackWrapper ??= LockRegistry::compute(...); - - return $this->contractsGet($pool, $key, function (CacheItem $item, bool &$save) use ($pool, $callback, $setMetadata, &$metadata, $key) { - // don't wrap nor save recursive calls - if (isset($this->computing[$key])) { - $value = $callback($item, $save); - $save = false; - - return $value; - } - - $this->computing[$key] = $key; - $startTime = microtime(true); - - if (!isset($this->callbackWrapper)) { - $this->setCallbackWrapper($this->setCallbackWrapper(null)); - } - - try { - $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (CacheItem $item) use ($setMetadata, $startTime, &$metadata) { - $setMetadata($item, $startTime, $metadata); - }, $this->logger ?? null); - $setMetadata($item, $startTime, $metadata); - - return $value; - } finally { - unset($this->computing[$key]); - } - }, $beta, $metadata, $this->logger ?? null); - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/vendor/symfony/cache/Traits/FilesystemCommonTrait.php deleted file mode 100644 index cc538aad..00000000 --- a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait FilesystemCommonTrait -{ - private string $directory; - private string $tmpSuffix; - - private function init(string $namespace, ?string $directory): void - { - if (!isset($directory[0])) { - $directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfony-cache'; - } else { - $directory = realpath($directory) ?: $directory; - } - if (isset($namespace[0])) { - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(\sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - $directory .= \DIRECTORY_SEPARATOR.$namespace; - } else { - $directory .= \DIRECTORY_SEPARATOR.'@'; - } - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - $directory .= \DIRECTORY_SEPARATOR; - // On Windows the whole path is limited to 258 chars - if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) { - throw new InvalidArgumentException(\sprintf('Cache directory too long (%s).', $directory)); - } - - $this->directory = $directory; - } - - protected function doClear(string $namespace): bool - { - $ok = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if ('' !== $namespace && !str_starts_with($this->getFileKey($file), $namespace)) { - continue; - } - - $ok = ($this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - protected function doDelete(array $ids): bool - { - $ok = true; - - foreach ($ids as $id) { - $file = $this->getFile($id); - $ok = (!is_file($file) || $this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - protected function doUnlink(string $file): bool - { - return @unlink($file); - } - - private function write(string $file, string $data, ?int $expiresAt = null): bool - { - $unlink = false; - set_error_handler(static fn ($type, $message, $file, $line) => throw new \ErrorException($message, 0, $type, $file, $line)); - try { - $tmp = $this->directory.$this->tmpSuffix ??= str_replace('/', '-', base64_encode(random_bytes(6))); - try { - $h = fopen($tmp, 'x'); - } catch (\ErrorException $e) { - if (!str_contains($e->getMessage(), 'File exists')) { - throw $e; - } - - $tmp = $this->directory.$this->tmpSuffix = str_replace('/', '-', base64_encode(random_bytes(6))); - $h = fopen($tmp, 'x'); - } - fwrite($h, $data); - fclose($h); - $unlink = true; - - if (null !== $expiresAt) { - touch($tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $success = copy($tmp, $file); - } else { - $success = rename($tmp, $file); - $unlink = !$success; - } - - return $success; - } finally { - restore_error_handler(); - - if ($unlink) { - @unlink($tmp); - } - } - } - - private function getFile(string $id, bool $mkdir = false, ?string $directory = null): string - { - // Use xxh128 to favor speed over security, which is not an issue here - $hash = str_replace('/', '-', base64_encode(hash('xxh128', static::class.$id, true))); - $dir = ($directory ?? $this->directory).strtoupper($hash[0].\DIRECTORY_SEPARATOR.$hash[1].\DIRECTORY_SEPARATOR); - - if ($mkdir && !is_dir($dir)) { - @mkdir($dir, 0777, true); - } - - return $dir.substr($hash, 2, 20); - } - - private function getFileKey(string $file): string - { - return ''; - } - - private function scanHashDir(string $directory): \Generator - { - if (!is_dir($directory)) { - return; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($directory.$chars[$i])) { - continue; - } - - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($dir = $directory.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - - foreach (@scandir($dir, \SCANDIR_SORT_NONE) ?: [] as $file) { - if ('.' !== $file && '..' !== $file) { - yield $dir.\DIRECTORY_SEPARATOR.$file; - } - } - } - } - } - - public function __serialize(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __unserialize(array $data): void - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (method_exists(parent::class, '__destruct')) { - parent::__destruct(); - } - if (isset($this->tmpSuffix) && is_file($this->directory.$this->tmpSuffix)) { - unlink($this->directory.$this->tmpSuffix); - } - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemTrait.php b/vendor/symfony/cache/Traits/FilesystemTrait.php deleted file mode 100644 index 05fa10e9..00000000 --- a/vendor/symfony/cache/Traits/FilesystemTrait.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Nicolas Grekas - * @author Rob Frawley 2nd - * - * @internal - */ -trait FilesystemTrait -{ - use FilesystemCommonTrait; - - private MarshallerInterface $marshaller; - - public function prune(): bool - { - $time = time(); - $pruned = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if (!$h = @fopen($file, 'r')) { - continue; - } - - if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) { - fclose($h); - $pruned = (@unlink($file) || !file_exists($file)) && $pruned; - } else { - fclose($h); - } - } - - return $pruned; - } - - protected function doFetch(array $ids): iterable - { - $values = []; - $now = time(); - - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - if (($expiresAt = (int) fgets($h)) && $now >= $expiresAt) { - fclose($h); - @unlink($file); - } else { - $i = rawurldecode(rtrim(fgets($h))); - $value = stream_get_contents($h); - fclose($h); - if ($i === $id) { - $values[$id] = $this->marshaller->unmarshall($value); - } - } - } - - return $values; - } - - protected function doHave(string $id): bool - { - $file = $this->getFile($id); - - return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id])); - } - - protected function doSave(array $values, int $lifetime): array|bool - { - $expiresAt = $lifetime ? (time() + $lifetime) : 0; - $values = $this->marshaller->marshall($values, $failed); - - foreach ($values as $id => $value) { - if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) { - $failed[] = $id; - } - } - - if ($failed && !is_writable($this->directory)) { - throw new CacheException(\sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $failed; - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - fgets($h); // expiry - $encodedKey = fgets($h); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} diff --git a/vendor/symfony/cache/Traits/ProxyTrait.php b/vendor/symfony/cache/Traits/ProxyTrait.php deleted file mode 100644 index ba7c11fb..00000000 --- a/vendor/symfony/cache/Traits/ProxyTrait.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Nicolas Grekas - * - * @internal - */ -trait ProxyTrait -{ - private object $pool; - - public function prune(): bool - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - public function reset(): void - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - } -} diff --git a/vendor/symfony/cache/Traits/Redis5Proxy.php b/vendor/symfony/cache/Traits/Redis5Proxy.php deleted file mode 100644 index b2402f25..00000000 --- a/vendor/symfony/cache/Traits/Redis5Proxy.php +++ /dev/null @@ -1,1225 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class Redis5Proxy extends \Redis implements ResetInterface, LazyObjectInterface -{ - use RedisProxyTrait { - resetLazyObject as reset; - } - - public function __construct() - { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function _prefix($key) - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function _serialize($value) - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize($value) - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _pack($value) - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack($value) - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function _compress($value) - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress($value) - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function acl($subcmd, ...$args) - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append($key, $value) - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function auth(#[\SensitiveParameter] $auth) - { - return $this->initializeLazyObject()->auth(...\func_get_args()); - } - - public function bgSave() - { - return $this->initializeLazyObject()->bgSave(...\func_get_args()); - } - - public function bgrewriteaof() - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function bitcount($key) - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function bitop($operation, $ret_key, $key, ...$other_keys) - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos($key, $bit, $start = null, $end = null) - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function blPop($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->blPop(...\func_get_args()); - } - - public function brPop($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->brPop(...\func_get_args()); - } - - public function brpoplpush($src, $dst, $timeout) - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function bzPopMax($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->bzPopMax(...\func_get_args()); - } - - public function bzPopMin($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->bzPopMin(...\func_get_args()); - } - - public function clearLastError() - { - return $this->initializeLazyObject()->clearLastError(...\func_get_args()); - } - - public function client($cmd, ...$args) - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function close() - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function command(...$args) - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function config($cmd, $key, $value = null) - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function connect($host, $port = null, $timeout = null, $retry_interval = null) - { - return $this->initializeLazyObject()->connect(...\func_get_args()); - } - - public function dbSize() - { - return $this->initializeLazyObject()->dbSize(...\func_get_args()); - } - - public function debug($key) - { - return $this->initializeLazyObject()->debug(...\func_get_args()); - } - - public function decr($key) - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function decrBy($key, $value) - { - return $this->initializeLazyObject()->decrBy(...\func_get_args()); - } - - public function del($key, ...$other_keys) - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function discard() - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function dump($key) - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function echo($msg) - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function eval($script, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function evalsha($script_sha, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function exec() - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function exists($key, ...$other_keys) - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function expire($key, $timeout) - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function expireAt($key, $timestamp) - { - return $this->initializeLazyObject()->expireAt(...\func_get_args()); - } - - public function flushAll($async = null) - { - return $this->initializeLazyObject()->flushAll(...\func_get_args()); - } - - public function flushDB($async = null) - { - return $this->initializeLazyObject()->flushDB(...\func_get_args()); - } - - public function geoadd($key, $lng, $lat, $member, ...$other_triples) - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null) - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function geohash($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function geopos($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function georadiusbymember($key, $member, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function get($key) - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getAuth() - { - return $this->initializeLazyObject()->getAuth(...\func_get_args()); - } - - public function getBit($key, $offset) - { - return $this->initializeLazyObject()->getBit(...\func_get_args()); - } - - public function getDBNum() - { - return $this->initializeLazyObject()->getDBNum(...\func_get_args()); - } - - public function getHost() - { - return $this->initializeLazyObject()->getHost(...\func_get_args()); - } - - public function getLastError() - { - return $this->initializeLazyObject()->getLastError(...\func_get_args()); - } - - public function getMode() - { - return $this->initializeLazyObject()->getMode(...\func_get_args()); - } - - public function getOption($option) - { - return $this->initializeLazyObject()->getOption(...\func_get_args()); - } - - public function getPersistentID() - { - return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); - } - - public function getPort() - { - return $this->initializeLazyObject()->getPort(...\func_get_args()); - } - - public function getRange($key, $start, $end) - { - return $this->initializeLazyObject()->getRange(...\func_get_args()); - } - - public function getReadTimeout() - { - return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); - } - - public function getSet($key, $value) - { - return $this->initializeLazyObject()->getSet(...\func_get_args()); - } - - public function getTimeout() - { - return $this->initializeLazyObject()->getTimeout(...\func_get_args()); - } - - public function hDel($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->hDel(...\func_get_args()); - } - - public function hExists($key, $member) - { - return $this->initializeLazyObject()->hExists(...\func_get_args()); - } - - public function hGet($key, $member) - { - return $this->initializeLazyObject()->hGet(...\func_get_args()); - } - - public function hGetAll($key) - { - return $this->initializeLazyObject()->hGetAll(...\func_get_args()); - } - - public function hIncrBy($key, $member, $value) - { - return $this->initializeLazyObject()->hIncrBy(...\func_get_args()); - } - - public function hIncrByFloat($key, $member, $value) - { - return $this->initializeLazyObject()->hIncrByFloat(...\func_get_args()); - } - - public function hKeys($key) - { - return $this->initializeLazyObject()->hKeys(...\func_get_args()); - } - - public function hLen($key) - { - return $this->initializeLazyObject()->hLen(...\func_get_args()); - } - - public function hMget($key, $keys) - { - return $this->initializeLazyObject()->hMget(...\func_get_args()); - } - - public function hMset($key, $pairs) - { - return $this->initializeLazyObject()->hMset(...\func_get_args()); - } - - public function hSet($key, $member, $value) - { - return $this->initializeLazyObject()->hSet(...\func_get_args()); - } - - public function hSetNx($key, $member, $value) - { - return $this->initializeLazyObject()->hSetNx(...\func_get_args()); - } - - public function hStrLen($key, $member) - { - return $this->initializeLazyObject()->hStrLen(...\func_get_args()); - } - - public function hVals($key) - { - return $this->initializeLazyObject()->hVals(...\func_get_args()); - } - - public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function incr($key) - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function incrBy($key, $value) - { - return $this->initializeLazyObject()->incrBy(...\func_get_args()); - } - - public function incrByFloat($key, $value) - { - return $this->initializeLazyObject()->incrByFloat(...\func_get_args()); - } - - public function info($option = null) - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function isConnected() - { - return $this->initializeLazyObject()->isConnected(...\func_get_args()); - } - - public function keys($pattern) - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function lInsert($key, $position, $pivot, $value) - { - return $this->initializeLazyObject()->lInsert(...\func_get_args()); - } - - public function lLen($key) - { - return $this->initializeLazyObject()->lLen(...\func_get_args()); - } - - public function lPop($key) - { - return $this->initializeLazyObject()->lPop(...\func_get_args()); - } - - public function lPush($key, $value) - { - return $this->initializeLazyObject()->lPush(...\func_get_args()); - } - - public function lPushx($key, $value) - { - return $this->initializeLazyObject()->lPushx(...\func_get_args()); - } - - public function lSet($key, $index, $value) - { - return $this->initializeLazyObject()->lSet(...\func_get_args()); - } - - public function lastSave() - { - return $this->initializeLazyObject()->lastSave(...\func_get_args()); - } - - public function lindex($key, $index) - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function lrange($key, $start, $end) - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lrem($key, $value, $count) - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function ltrim($key, $start, $stop) - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public function mget($keys) - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function migrate($host, $port, $key, $db, $timeout, $copy = null, $replace = null) - { - return $this->initializeLazyObject()->migrate(...\func_get_args()); - } - - public function move($key, $dbindex) - { - return $this->initializeLazyObject()->move(...\func_get_args()); - } - - public function mset($pairs) - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx($pairs) - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function multi($mode = null) - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function object($field, $key) - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function pconnect($host, $port = null, $timeout = null) - { - return $this->initializeLazyObject()->pconnect(...\func_get_args()); - } - - public function persist($key) - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function pexpire($key, $timestamp) - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function pexpireAt($key, $timestamp) - { - return $this->initializeLazyObject()->pexpireAt(...\func_get_args()); - } - - public function pfadd($key, $elements) - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfcount($key) - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - - public function pfmerge($dstkey, $keys) - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function ping() - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function pipeline() - { - return $this->initializeLazyObject()->pipeline(...\func_get_args()); - } - - public function psetex($key, $expire, $value) - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function psubscribe($patterns, $callback) - { - return $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function pttl($key) - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function publish($channel, $message) - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function pubsub($cmd, ...$args) - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function punsubscribe($pattern, ...$other_patterns) - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function rPop($key) - { - return $this->initializeLazyObject()->rPop(...\func_get_args()); - } - - public function rPush($key, $value) - { - return $this->initializeLazyObject()->rPush(...\func_get_args()); - } - - public function rPushx($key, $value) - { - return $this->initializeLazyObject()->rPushx(...\func_get_args()); - } - - public function randomKey() - { - return $this->initializeLazyObject()->randomKey(...\func_get_args()); - } - - public function rawcommand($cmd, ...$args) - { - return $this->initializeLazyObject()->rawcommand(...\func_get_args()); - } - - public function rename($key, $newkey) - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renameNx($key, $newkey) - { - return $this->initializeLazyObject()->renameNx(...\func_get_args()); - } - - public function restore($ttl, $key, $value) - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function role() - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function rpoplpush($src, $dst) - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function sAdd($key, $value) - { - return $this->initializeLazyObject()->sAdd(...\func_get_args()); - } - - public function sAddArray($key, $options) - { - return $this->initializeLazyObject()->sAddArray(...\func_get_args()); - } - - public function sDiff($key, ...$other_keys) - { - return $this->initializeLazyObject()->sDiff(...\func_get_args()); - } - - public function sDiffStore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sDiffStore(...\func_get_args()); - } - - public function sInter($key, ...$other_keys) - { - return $this->initializeLazyObject()->sInter(...\func_get_args()); - } - - public function sInterStore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sInterStore(...\func_get_args()); - } - - public function sMembers($key) - { - return $this->initializeLazyObject()->sMembers(...\func_get_args()); - } - - public function sMisMember($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->sMisMember(...\func_get_args()); - } - - public function sMove($src, $dst, $value) - { - return $this->initializeLazyObject()->sMove(...\func_get_args()); - } - - public function sPop($key) - { - return $this->initializeLazyObject()->sPop(...\func_get_args()); - } - - public function sRandMember($key, $count = null) - { - return $this->initializeLazyObject()->sRandMember(...\func_get_args()); - } - - public function sUnion($key, ...$other_keys) - { - return $this->initializeLazyObject()->sUnion(...\func_get_args()); - } - - public function sUnionStore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sUnionStore(...\func_get_args()); - } - - public function save() - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function scan(&$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function scard($key) - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script($cmd, ...$args) - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function select($dbindex) - { - return $this->initializeLazyObject()->select(...\func_get_args()); - } - - public function set($key, $value, $opts = null) - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function setBit($key, $offset, $value) - { - return $this->initializeLazyObject()->setBit(...\func_get_args()); - } - - public function setOption($option, $value) - { - return $this->initializeLazyObject()->setOption(...\func_get_args()); - } - - public function setRange($key, $offset, $value) - { - return $this->initializeLazyObject()->setRange(...\func_get_args()); - } - - public function setex($key, $expire, $value) - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function setnx($key, $value) - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function sismember($key, $value) - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function slaveof($host = null, $port = null) - { - return $this->initializeLazyObject()->slaveof(...\func_get_args()); - } - - public function slowlog($arg, $option = null) - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function sort($key, $options = null) - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function sortAsc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) - { - return $this->initializeLazyObject()->sortAsc(...\func_get_args()); - } - - public function sortAscAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) - { - return $this->initializeLazyObject()->sortAscAlpha(...\func_get_args()); - } - - public function sortDesc($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) - { - return $this->initializeLazyObject()->sortDesc(...\func_get_args()); - } - - public function sortDescAlpha($key, $pattern = null, $get = null, $start = null, $end = null, $getList = null) - { - return $this->initializeLazyObject()->sortDescAlpha(...\func_get_args()); - } - - public function srem($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function strlen($key) - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function subscribe($channels, $callback) - { - return $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function swapdb($srcdb, $dstdb) - { - return $this->initializeLazyObject()->swapdb(...\func_get_args()); - } - - public function time() - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function ttl($key) - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function type($key) - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function unlink($key, ...$other_keys) - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function unsubscribe($channel, ...$other_channels) - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function unwatch() - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function wait($numslaves, $timeout) - { - return $this->initializeLazyObject()->wait(...\func_get_args()); - } - - public function watch($key, ...$other_keys) - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function xack($str_key, $str_group, $arr_ids) - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xdel($str_key, $arr_ids) - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xinfo($str_cmd, $str_key = null, $str_group = null) - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xlen($key) - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange($str_key, $str_start, $str_end, $i_count = null) - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xread($arr_streams, $i_count = null, $i_block = null) - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xrevrange($str_key, $str_start, $str_end, $i_count = null) - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xtrim($str_key, $i_maxlen, $boo_approximate = null) - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zAdd($key, $score, $value, ...$extra_args) - { - return $this->initializeLazyObject()->zAdd(...\func_get_args()); - } - - public function zCard($key) - { - return $this->initializeLazyObject()->zCard(...\func_get_args()); - } - - public function zCount($key, $min, $max) - { - return $this->initializeLazyObject()->zCount(...\func_get_args()); - } - - public function zIncrBy($key, $value, $member) - { - return $this->initializeLazyObject()->zIncrBy(...\func_get_args()); - } - - public function zLexCount($key, $min, $max) - { - return $this->initializeLazyObject()->zLexCount(...\func_get_args()); - } - - public function zPopMax($key) - { - return $this->initializeLazyObject()->zPopMax(...\func_get_args()); - } - - public function zPopMin($key) - { - return $this->initializeLazyObject()->zPopMin(...\func_get_args()); - } - - public function zRange($key, $start, $end, $scores = null) - { - return $this->initializeLazyObject()->zRange(...\func_get_args()); - } - - public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) - { - return $this->initializeLazyObject()->zRangeByLex(...\func_get_args()); - } - - public function zRangeByScore($key, $start, $end, $options = null) - { - return $this->initializeLazyObject()->zRangeByScore(...\func_get_args()); - } - - public function zRank($key, $member) - { - return $this->initializeLazyObject()->zRank(...\func_get_args()); - } - - public function zRem($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->zRem(...\func_get_args()); - } - - public function zRemRangeByLex($key, $min, $max) - { - return $this->initializeLazyObject()->zRemRangeByLex(...\func_get_args()); - } - - public function zRemRangeByRank($key, $start, $end) - { - return $this->initializeLazyObject()->zRemRangeByRank(...\func_get_args()); - } - - public function zRemRangeByScore($key, $min, $max) - { - return $this->initializeLazyObject()->zRemRangeByScore(...\func_get_args()); - } - - public function zRevRange($key, $start, $end, $scores = null) - { - return $this->initializeLazyObject()->zRevRange(...\func_get_args()); - } - - public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) - { - return $this->initializeLazyObject()->zRevRangeByLex(...\func_get_args()); - } - - public function zRevRangeByScore($key, $start, $end, $options = null) - { - return $this->initializeLazyObject()->zRevRangeByScore(...\func_get_args()); - } - - public function zRevRank($key, $member) - { - return $this->initializeLazyObject()->zRevRank(...\func_get_args()); - } - - public function zScore($key, $member) - { - return $this->initializeLazyObject()->zScore(...\func_get_args()); - } - - public function zinterstore($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zunionstore($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } - - public function delete($key, ...$other_keys) - { - return $this->initializeLazyObject()->delete(...\func_get_args()); - } - - public function evaluate($script, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->evaluate(...\func_get_args()); - } - - public function evaluateSha($script_sha, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->evaluateSha(...\func_get_args()); - } - - public function getKeys($pattern) - { - return $this->initializeLazyObject()->getKeys(...\func_get_args()); - } - - public function getMultiple($keys) - { - return $this->initializeLazyObject()->getMultiple(...\func_get_args()); - } - - public function lGet($key, $index) - { - return $this->initializeLazyObject()->lGet(...\func_get_args()); - } - - public function lGetRange($key, $start, $end) - { - return $this->initializeLazyObject()->lGetRange(...\func_get_args()); - } - - public function lRemove($key, $value, $count) - { - return $this->initializeLazyObject()->lRemove(...\func_get_args()); - } - - public function lSize($key) - { - return $this->initializeLazyObject()->lSize(...\func_get_args()); - } - - public function listTrim($key, $start, $stop) - { - return $this->initializeLazyObject()->listTrim(...\func_get_args()); - } - - public function open($host, $port = null, $timeout = null, $retry_interval = null) - { - return $this->initializeLazyObject()->open(...\func_get_args()); - } - - public function popen($host, $port = null, $timeout = null) - { - return $this->initializeLazyObject()->popen(...\func_get_args()); - } - - public function renameKey($key, $newkey) - { - return $this->initializeLazyObject()->renameKey(...\func_get_args()); - } - - public function sContains($key, $value) - { - return $this->initializeLazyObject()->sContains(...\func_get_args()); - } - - public function sGetMembers($key) - { - return $this->initializeLazyObject()->sGetMembers(...\func_get_args()); - } - - public function sRemove($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->sRemove(...\func_get_args()); - } - - public function sSize($key) - { - return $this->initializeLazyObject()->sSize(...\func_get_args()); - } - - public function sendEcho($msg) - { - return $this->initializeLazyObject()->sendEcho(...\func_get_args()); - } - - public function setTimeout($key, $timeout) - { - return $this->initializeLazyObject()->setTimeout(...\func_get_args()); - } - - public function substr($key, $start, $end) - { - return $this->initializeLazyObject()->substr(...\func_get_args()); - } - - public function zDelete($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->zDelete(...\func_get_args()); - } - - public function zDeleteRangeByRank($key, $min, $max) - { - return $this->initializeLazyObject()->zDeleteRangeByRank(...\func_get_args()); - } - - public function zDeleteRangeByScore($key, $min, $max) - { - return $this->initializeLazyObject()->zDeleteRangeByScore(...\func_get_args()); - } - - public function zInter($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zInter(...\func_get_args()); - } - - public function zRemove($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->zRemove(...\func_get_args()); - } - - public function zRemoveRangeByScore($key, $min, $max) - { - return $this->initializeLazyObject()->zRemoveRangeByScore(...\func_get_args()); - } - - public function zReverseRange($key, $start, $end, $scores = null) - { - return $this->initializeLazyObject()->zReverseRange(...\func_get_args()); - } - - public function zSize($key) - { - return $this->initializeLazyObject()->zSize(...\func_get_args()); - } - - public function zUnion($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zUnion(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/Redis6Proxy.php b/vendor/symfony/cache/Traits/Redis6Proxy.php deleted file mode 100644 index c7e05cd3..00000000 --- a/vendor/symfony/cache/Traits/Redis6Proxy.php +++ /dev/null @@ -1,1266 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class Redis6Proxy extends \Redis implements ResetInterface, LazyObjectInterface -{ - use Redis6ProxyTrait; - use RedisProxyTrait { - resetLazyObject as reset; - } - - public function __construct($options = null) - { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function _compress($value): string - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress($value): string - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function _prefix($key): string - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function _serialize($value): string - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize($value): mixed - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _pack($value): string - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack($value): mixed - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function acl($subcmd, ...$args): mixed - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append($key, $value): \Redis|false|int - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function auth(#[\SensitiveParameter] $credentials): \Redis|bool - { - return $this->initializeLazyObject()->auth(...\func_get_args()); - } - - public function bgSave(): \Redis|bool - { - return $this->initializeLazyObject()->bgSave(...\func_get_args()); - } - - public function bgrewriteaof(): \Redis|bool - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function bitcount($key, $start = 0, $end = -1, $bybit = false): \Redis|false|int - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function bitop($operation, $deskey, $srckey, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \Redis|false|int - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function blPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null - { - return $this->initializeLazyObject()->blPop(...\func_get_args()); - } - - public function brPop($key_or_keys, $timeout_or_key, ...$extra_args): \Redis|array|false|null - { - return $this->initializeLazyObject()->brPop(...\func_get_args()); - } - - public function brpoplpush($src, $dst, $timeout): \Redis|false|string - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function bzPopMax($key, $timeout_or_key, ...$extra_args): \Redis|array|false - { - return $this->initializeLazyObject()->bzPopMax(...\func_get_args()); - } - - public function bzPopMin($key, $timeout_or_key, ...$extra_args): \Redis|array|false - { - return $this->initializeLazyObject()->bzPopMin(...\func_get_args()); - } - - public function bzmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null - { - return $this->initializeLazyObject()->bzmpop(...\func_get_args()); - } - - public function zmpop($keys, $from, $count = 1): \Redis|array|false|null - { - return $this->initializeLazyObject()->zmpop(...\func_get_args()); - } - - public function blmpop($timeout, $keys, $from, $count = 1): \Redis|array|false|null - { - return $this->initializeLazyObject()->blmpop(...\func_get_args()); - } - - public function lmpop($keys, $from, $count = 1): \Redis|array|false|null - { - return $this->initializeLazyObject()->lmpop(...\func_get_args()); - } - - public function clearLastError(): bool - { - return $this->initializeLazyObject()->clearLastError(...\func_get_args()); - } - - public function client($opt, ...$args): mixed - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function close(): bool - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function command($opt = null, ...$args): mixed - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function config($operation, $key_or_settings = null, $value = null): mixed - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function connect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool - { - return $this->initializeLazyObject()->connect(...\func_get_args()); - } - - public function copy($src, $dst, $options = null): \Redis|bool - { - return $this->initializeLazyObject()->copy(...\func_get_args()); - } - - public function dbSize(): \Redis|false|int - { - return $this->initializeLazyObject()->dbSize(...\func_get_args()); - } - - public function debug($key): \Redis|string - { - return $this->initializeLazyObject()->debug(...\func_get_args()); - } - - public function decr($key, $by = 1): \Redis|false|int - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function decrBy($key, $value): \Redis|false|int - { - return $this->initializeLazyObject()->decrBy(...\func_get_args()); - } - - public function del($key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function delete($key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->delete(...\func_get_args()); - } - - public function discard(): \Redis|bool - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function echo($str): \Redis|false|string - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function eval($script, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function eval_ro($script_sha, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval_ro(...\func_get_args()); - } - - public function evalsha($sha1, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function evalsha_ro($sha1, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); - } - - public function exec(): \Redis|array|false - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function exists($key, ...$other_keys): \Redis|bool|int - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function expire($key, $timeout, $mode = null): \Redis|bool - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function expireAt($key, $timestamp, $mode = null): \Redis|bool - { - return $this->initializeLazyObject()->expireAt(...\func_get_args()); - } - - public function failover($to = null, $abort = false, $timeout = 0): \Redis|bool - { - return $this->initializeLazyObject()->failover(...\func_get_args()); - } - - public function expiretime($key): \Redis|false|int - { - return $this->initializeLazyObject()->expiretime(...\func_get_args()); - } - - public function pexpiretime($key): \Redis|false|int - { - return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); - } - - public function fcall($fn, $keys = [], $args = []): mixed - { - return $this->initializeLazyObject()->fcall(...\func_get_args()); - } - - public function fcall_ro($fn, $keys = [], $args = []): mixed - { - return $this->initializeLazyObject()->fcall_ro(...\func_get_args()); - } - - public function flushAll($sync = null): \Redis|bool - { - return $this->initializeLazyObject()->flushAll(...\func_get_args()); - } - - public function flushDB($sync = null): \Redis|bool - { - return $this->initializeLazyObject()->flushDB(...\func_get_args()); - } - - public function function($operation, ...$args): \Redis|array|bool|string - { - return $this->initializeLazyObject()->function(...\func_get_args()); - } - - public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Redis|false|int - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null): \Redis|false|float - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function geohash($key, $member, ...$other_members): \Redis|array|false - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function geopos($key, $member, ...$other_members): \Redis|array|false - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function geosearch($key, $position, $shape, $unit, $options = []): array - { - return $this->initializeLazyObject()->geosearch(...\func_get_args()); - } - - public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Redis|array|false|int - { - return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); - } - - public function get($key): mixed - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getAuth(): mixed - { - return $this->initializeLazyObject()->getAuth(...\func_get_args()); - } - - public function getBit($key, $idx): \Redis|false|int - { - return $this->initializeLazyObject()->getBit(...\func_get_args()); - } - - public function getEx($key, $options = []): \Redis|bool|string - { - return $this->initializeLazyObject()->getEx(...\func_get_args()); - } - - public function getDBNum(): int - { - return $this->initializeLazyObject()->getDBNum(...\func_get_args()); - } - - public function getDel($key): \Redis|bool|string - { - return $this->initializeLazyObject()->getDel(...\func_get_args()); - } - - public function getHost(): string - { - return $this->initializeLazyObject()->getHost(...\func_get_args()); - } - - public function getLastError(): ?string - { - return $this->initializeLazyObject()->getLastError(...\func_get_args()); - } - - public function getMode(): int - { - return $this->initializeLazyObject()->getMode(...\func_get_args()); - } - - public function getOption($option): mixed - { - return $this->initializeLazyObject()->getOption(...\func_get_args()); - } - - public function getPersistentID(): ?string - { - return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); - } - - public function getPort(): int - { - return $this->initializeLazyObject()->getPort(...\func_get_args()); - } - - public function getRange($key, $start, $end): \Redis|false|string - { - return $this->initializeLazyObject()->getRange(...\func_get_args()); - } - - public function lcs($key1, $key2, $options = null): \Redis|array|false|int|string - { - return $this->initializeLazyObject()->lcs(...\func_get_args()); - } - - public function getReadTimeout(): float - { - return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); - } - - public function getset($key, $value): \Redis|false|string - { - return $this->initializeLazyObject()->getset(...\func_get_args()); - } - - public function getTimeout(): false|float - { - return $this->initializeLazyObject()->getTimeout(...\func_get_args()); - } - - public function getTransferredBytes(): array - { - return $this->initializeLazyObject()->getTransferredBytes(...\func_get_args()); - } - - public function clearTransferredBytes(): void - { - $this->initializeLazyObject()->clearTransferredBytes(...\func_get_args()); - } - - public function hDel($key, $field, ...$other_fields): \Redis|false|int - { - return $this->initializeLazyObject()->hDel(...\func_get_args()); - } - - public function hExists($key, $field): \Redis|bool - { - return $this->initializeLazyObject()->hExists(...\func_get_args()); - } - - public function hGet($key, $member): mixed - { - return $this->initializeLazyObject()->hGet(...\func_get_args()); - } - - public function hGetAll($key): \Redis|array|false - { - return $this->initializeLazyObject()->hGetAll(...\func_get_args()); - } - - public function hIncrBy($key, $field, $value): \Redis|false|int - { - return $this->initializeLazyObject()->hIncrBy(...\func_get_args()); - } - - public function hIncrByFloat($key, $field, $value): \Redis|false|float - { - return $this->initializeLazyObject()->hIncrByFloat(...\func_get_args()); - } - - public function hKeys($key): \Redis|array|false - { - return $this->initializeLazyObject()->hKeys(...\func_get_args()); - } - - public function hLen($key): \Redis|false|int - { - return $this->initializeLazyObject()->hLen(...\func_get_args()); - } - - public function hMget($key, $fields): \Redis|array|false - { - return $this->initializeLazyObject()->hMget(...\func_get_args()); - } - - public function hMset($key, $fieldvals): \Redis|bool - { - return $this->initializeLazyObject()->hMset(...\func_get_args()); - } - - public function hSetNx($key, $field, $value): \Redis|bool - { - return $this->initializeLazyObject()->hSetNx(...\func_get_args()); - } - - public function hStrLen($key, $field): \Redis|false|int - { - return $this->initializeLazyObject()->hStrLen(...\func_get_args()); - } - - public function hVals($key): \Redis|array|false - { - return $this->initializeLazyObject()->hVals(...\func_get_args()); - } - - public function hscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|bool - { - return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function incr($key, $by = 1): \Redis|false|int - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function incrBy($key, $value): \Redis|false|int - { - return $this->initializeLazyObject()->incrBy(...\func_get_args()); - } - - public function incrByFloat($key, $value): \Redis|false|float - { - return $this->initializeLazyObject()->incrByFloat(...\func_get_args()); - } - - public function info(...$sections): \Redis|array|false - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function isConnected(): bool - { - return $this->initializeLazyObject()->isConnected(...\func_get_args()); - } - - public function keys($pattern) - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function lInsert($key, $pos, $pivot, $value) - { - return $this->initializeLazyObject()->lInsert(...\func_get_args()); - } - - public function lLen($key): \Redis|false|int - { - return $this->initializeLazyObject()->lLen(...\func_get_args()); - } - - public function lMove($src, $dst, $wherefrom, $whereto): \Redis|false|string - { - return $this->initializeLazyObject()->lMove(...\func_get_args()); - } - - public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string - { - return $this->initializeLazyObject()->blmove(...\func_get_args()); - } - - public function lPop($key, $count = 0): \Redis|array|bool|string - { - return $this->initializeLazyObject()->lPop(...\func_get_args()); - } - - public function lPos($key, $value, $options = null): \Redis|array|bool|int|null - { - return $this->initializeLazyObject()->lPos(...\func_get_args()); - } - - public function lPush($key, ...$elements): \Redis|false|int - { - return $this->initializeLazyObject()->lPush(...\func_get_args()); - } - - public function rPush($key, ...$elements): \Redis|false|int - { - return $this->initializeLazyObject()->rPush(...\func_get_args()); - } - - public function lPushx($key, $value): \Redis|false|int - { - return $this->initializeLazyObject()->lPushx(...\func_get_args()); - } - - public function rPushx($key, $value): \Redis|false|int - { - return $this->initializeLazyObject()->rPushx(...\func_get_args()); - } - - public function lSet($key, $index, $value): \Redis|bool - { - return $this->initializeLazyObject()->lSet(...\func_get_args()); - } - - public function lastSave(): int - { - return $this->initializeLazyObject()->lastSave(...\func_get_args()); - } - - public function lindex($key, $index): mixed - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function lrange($key, $start, $end): \Redis|array|false - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lrem($key, $value, $count = 0): \Redis|false|int - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function ltrim($key, $start, $end): \Redis|bool - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Redis|bool - { - return $this->initializeLazyObject()->migrate(...\func_get_args()); - } - - public function move($key, $index): \Redis|bool - { - return $this->initializeLazyObject()->move(...\func_get_args()); - } - - public function mset($key_values): \Redis|bool - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx($key_values): \Redis|bool - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function multi($value = \Redis::MULTI): \Redis|bool - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function object($subcommand, $key): \Redis|false|int|string - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function open($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool - { - return $this->initializeLazyObject()->open(...\func_get_args()); - } - - public function pconnect($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool - { - return $this->initializeLazyObject()->pconnect(...\func_get_args()); - } - - public function persist($key): \Redis|bool - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function pexpire($key, $timeout, $mode = null): bool - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function pexpireAt($key, $timestamp, $mode = null): \Redis|bool - { - return $this->initializeLazyObject()->pexpireAt(...\func_get_args()); - } - - public function pfadd($key, $elements): \Redis|int - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfcount($key_or_keys): \Redis|false|int - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - - public function pfmerge($dst, $srckeys): \Redis|bool - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function ping($message = null): \Redis|bool|string - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function pipeline(): \Redis|bool - { - return $this->initializeLazyObject()->pipeline(...\func_get_args()); - } - - public function popen($host, $port = 6379, $timeout = 0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0, $context = null): bool - { - return $this->initializeLazyObject()->popen(...\func_get_args()); - } - - public function psetex($key, $expire, $value): \Redis|bool - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function psubscribe($patterns, $cb): bool - { - return $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function pttl($key): \Redis|false|int - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function publish($channel, $message): \Redis|false|int - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function pubsub($command, $arg = null): mixed - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function punsubscribe($patterns): \Redis|array|bool - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function rPop($key, $count = 0): \Redis|array|bool|string - { - return $this->initializeLazyObject()->rPop(...\func_get_args()); - } - - public function randomKey(): \Redis|false|string - { - return $this->initializeLazyObject()->randomKey(...\func_get_args()); - } - - public function rawcommand($command, ...$args): mixed - { - return $this->initializeLazyObject()->rawcommand(...\func_get_args()); - } - - public function rename($old_name, $new_name): \Redis|bool - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renameNx($key_src, $key_dst): \Redis|bool - { - return $this->initializeLazyObject()->renameNx(...\func_get_args()); - } - - public function restore($key, $ttl, $value, $options = null): \Redis|bool - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function role(): mixed - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function rpoplpush($srckey, $dstkey): \Redis|false|string - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function sAdd($key, $value, ...$other_values): \Redis|false|int - { - return $this->initializeLazyObject()->sAdd(...\func_get_args()); - } - - public function sAddArray($key, $values): int - { - return $this->initializeLazyObject()->sAddArray(...\func_get_args()); - } - - public function sDiff($key, ...$other_keys): \Redis|array|false - { - return $this->initializeLazyObject()->sDiff(...\func_get_args()); - } - - public function sDiffStore($dst, $key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->sDiffStore(...\func_get_args()); - } - - public function sInter($key, ...$other_keys): \Redis|array|false - { - return $this->initializeLazyObject()->sInter(...\func_get_args()); - } - - public function sintercard($keys, $limit = -1): \Redis|false|int - { - return $this->initializeLazyObject()->sintercard(...\func_get_args()); - } - - public function sInterStore($key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->sInterStore(...\func_get_args()); - } - - public function sMembers($key): \Redis|array|false - { - return $this->initializeLazyObject()->sMembers(...\func_get_args()); - } - - public function sMisMember($key, $member, ...$other_members): \Redis|array|false - { - return $this->initializeLazyObject()->sMisMember(...\func_get_args()); - } - - public function sMove($src, $dst, $value): \Redis|bool - { - return $this->initializeLazyObject()->sMove(...\func_get_args()); - } - - public function sPop($key, $count = 0): \Redis|array|false|string - { - return $this->initializeLazyObject()->sPop(...\func_get_args()); - } - - public function sUnion($key, ...$other_keys): \Redis|array|false - { - return $this->initializeLazyObject()->sUnion(...\func_get_args()); - } - - public function sUnionStore($dst, $key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->sUnionStore(...\func_get_args()); - } - - public function save(): \Redis|bool - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function scan(&$iterator, $pattern = null, $count = 0, $type = null): array|false - { - return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function scard($key): \Redis|false|int - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script($command, ...$args): mixed - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function select($db): \Redis|bool - { - return $this->initializeLazyObject()->select(...\func_get_args()); - } - - public function set($key, $value, $options = null): \Redis|bool|string - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function setBit($key, $idx, $value): \Redis|false|int - { - return $this->initializeLazyObject()->setBit(...\func_get_args()); - } - - public function setRange($key, $index, $value): \Redis|false|int - { - return $this->initializeLazyObject()->setRange(...\func_get_args()); - } - - public function setOption($option, $value): bool - { - return $this->initializeLazyObject()->setOption(...\func_get_args()); - } - - public function setex($key, $expire, $value) - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function setnx($key, $value): \Redis|bool - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function sismember($key, $value): \Redis|bool - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function slaveof($host = null, $port = 6379): \Redis|bool - { - return $this->initializeLazyObject()->slaveof(...\func_get_args()); - } - - public function replicaof($host = null, $port = 6379): \Redis|bool - { - return $this->initializeLazyObject()->replicaof(...\func_get_args()); - } - - public function touch($key_or_array, ...$more_keys): \Redis|false|int - { - return $this->initializeLazyObject()->touch(...\func_get_args()); - } - - public function slowlog($operation, $length = 0): mixed - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function sort($key, $options = null): mixed - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function sort_ro($key, $options = null): mixed - { - return $this->initializeLazyObject()->sort_ro(...\func_get_args()); - } - - public function sortAsc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array - { - return $this->initializeLazyObject()->sortAsc(...\func_get_args()); - } - - public function sortAscAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array - { - return $this->initializeLazyObject()->sortAscAlpha(...\func_get_args()); - } - - public function sortDesc($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array - { - return $this->initializeLazyObject()->sortDesc(...\func_get_args()); - } - - public function sortDescAlpha($key, $pattern = null, $get = null, $offset = -1, $count = -1, $store = null): array - { - return $this->initializeLazyObject()->sortDescAlpha(...\func_get_args()); - } - - public function srem($key, $value, ...$other_values): \Redis|false|int - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false - { - return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function ssubscribe($channels, $cb): bool - { - return $this->initializeLazyObject()->ssubscribe(...\func_get_args()); - } - - public function strlen($key): \Redis|false|int - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function subscribe($channels, $cb): bool - { - return $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function sunsubscribe($channels): \Redis|array|bool - { - return $this->initializeLazyObject()->sunsubscribe(...\func_get_args()); - } - - public function swapdb($src, $dst): \Redis|bool - { - return $this->initializeLazyObject()->swapdb(...\func_get_args()); - } - - public function time(): \Redis|array - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function ttl($key): \Redis|false|int - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function type($key): \Redis|false|int - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function unlink($key, ...$other_keys): \Redis|false|int - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function unsubscribe($channels): \Redis|array|bool - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function unwatch(): \Redis|bool - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function watch($key, ...$other_keys): \Redis|bool - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function wait($numreplicas, $timeout): false|int - { - return $this->initializeLazyObject()->wait(...\func_get_args()); - } - - public function xack($key, $group, $ids): false|int - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Redis|false|string - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Redis|array|bool - { - return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); - } - - public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Redis|array|bool - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xdel($key, $ids): \Redis|false|int - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xlen($key): \Redis|false|int - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \Redis|array|false - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange($key, $start, $end, $count = -1): \Redis|array|bool - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xread($streams, $count = -1, $block = -1): \Redis|array|bool - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Redis|array|bool - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xrevrange($key, $end, $start, $count = -1): \Redis|array|bool - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Redis|false|int - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zAdd($key, $score_or_options, ...$more_scores_and_mems): \Redis|false|float|int - { - return $this->initializeLazyObject()->zAdd(...\func_get_args()); - } - - public function zCard($key): \Redis|false|int - { - return $this->initializeLazyObject()->zCard(...\func_get_args()); - } - - public function zCount($key, $start, $end): \Redis|false|int - { - return $this->initializeLazyObject()->zCount(...\func_get_args()); - } - - public function zIncrBy($key, $value, $member): \Redis|false|float - { - return $this->initializeLazyObject()->zIncrBy(...\func_get_args()); - } - - public function zLexCount($key, $min, $max): \Redis|false|int - { - return $this->initializeLazyObject()->zLexCount(...\func_get_args()); - } - - public function zMscore($key, $member, ...$other_members): \Redis|array|false - { - return $this->initializeLazyObject()->zMscore(...\func_get_args()); - } - - public function zPopMax($key, $count = null): \Redis|array|false - { - return $this->initializeLazyObject()->zPopMax(...\func_get_args()); - } - - public function zPopMin($key, $count = null): \Redis|array|false - { - return $this->initializeLazyObject()->zPopMin(...\func_get_args()); - } - - public function zRange($key, $start, $end, $options = null): \Redis|array|false - { - return $this->initializeLazyObject()->zRange(...\func_get_args()); - } - - public function zRangeByLex($key, $min, $max, $offset = -1, $count = -1): \Redis|array|false - { - return $this->initializeLazyObject()->zRangeByLex(...\func_get_args()); - } - - public function zRangeByScore($key, $start, $end, $options = []): \Redis|array|false - { - return $this->initializeLazyObject()->zRangeByScore(...\func_get_args()); - } - - public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \Redis|false|int - { - return $this->initializeLazyObject()->zrangestore(...\func_get_args()); - } - - public function zRandMember($key, $options = null): \Redis|array|string - { - return $this->initializeLazyObject()->zRandMember(...\func_get_args()); - } - - public function zRank($key, $member): \Redis|false|int - { - return $this->initializeLazyObject()->zRank(...\func_get_args()); - } - - public function zRem($key, $member, ...$other_members): \Redis|false|int - { - return $this->initializeLazyObject()->zRem(...\func_get_args()); - } - - public function zRemRangeByLex($key, $min, $max): \Redis|false|int - { - return $this->initializeLazyObject()->zRemRangeByLex(...\func_get_args()); - } - - public function zRemRangeByRank($key, $start, $end): \Redis|false|int - { - return $this->initializeLazyObject()->zRemRangeByRank(...\func_get_args()); - } - - public function zRemRangeByScore($key, $start, $end): \Redis|false|int - { - return $this->initializeLazyObject()->zRemRangeByScore(...\func_get_args()); - } - - public function zRevRange($key, $start, $end, $scores = null): \Redis|array|false - { - return $this->initializeLazyObject()->zRevRange(...\func_get_args()); - } - - public function zRevRangeByLex($key, $max, $min, $offset = -1, $count = -1): \Redis|array|false - { - return $this->initializeLazyObject()->zRevRangeByLex(...\func_get_args()); - } - - public function zRevRangeByScore($key, $max, $min, $options = []): \Redis|array|false - { - return $this->initializeLazyObject()->zRevRangeByScore(...\func_get_args()); - } - - public function zRevRank($key, $member): \Redis|false|int - { - return $this->initializeLazyObject()->zRevRank(...\func_get_args()); - } - - public function zScore($key, $member): \Redis|false|float - { - return $this->initializeLazyObject()->zScore(...\func_get_args()); - } - - public function zdiff($keys, $options = null): \Redis|array|false - { - return $this->initializeLazyObject()->zdiff(...\func_get_args()); - } - - public function zdiffstore($dst, $keys): \Redis|false|int - { - return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); - } - - public function zinter($keys, $weights = null, $options = null): \Redis|array|false - { - return $this->initializeLazyObject()->zinter(...\func_get_args()); - } - - public function zintercard($keys, $limit = -1): \Redis|false|int - { - return $this->initializeLazyObject()->zintercard(...\func_get_args()); - } - - public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zscan($key, &$iterator, $pattern = null, $count = 0): \Redis|array|false - { - return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zunion($keys, $weights = null, $options = null): \Redis|array|false - { - return $this->initializeLazyObject()->zunion(...\func_get_args()); - } - - public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \Redis|false|int - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/Redis6ProxyTrait.php b/vendor/symfony/cache/Traits/Redis6ProxyTrait.php deleted file mode 100644 index bb8d9784..00000000 --- a/vendor/symfony/cache/Traits/Redis6ProxyTrait.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -if (version_compare(phpversion('redis'), '6.1.0-dev', '>=')) { - /** - * @internal - */ - trait Redis6ProxyTrait - { - public function dump($key): \Redis|string|false - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function hRandField($key, $options = null): \Redis|array|string|false - { - return $this->initializeLazyObject()->hRandField(...\func_get_args()); - } - - public function hSet($key, ...$fields_and_vals): \Redis|false|int - { - return $this->initializeLazyObject()->hSet(...\func_get_args()); - } - - public function mget($keys): \Redis|array|false - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function sRandMember($key, $count = 0): mixed - { - return $this->initializeLazyObject()->sRandMember(...\func_get_args()); - } - - public function waitaof($numlocal, $numreplicas, $timeout): \Redis|array|false - { - return $this->initializeLazyObject()->waitaof(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait Redis6ProxyTrait - { - public function dump($key): \Redis|string - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function hRandField($key, $options = null): \Redis|array|string - { - return $this->initializeLazyObject()->hRandField(...\func_get_args()); - } - - public function hSet($key, $member, $value): \Redis|false|int - { - return $this->initializeLazyObject()->hSet(...\func_get_args()); - } - - public function mget($keys): \Redis|array - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function sRandMember($key, $count = 0): \Redis|array|false|string - { - return $this->initializeLazyObject()->sRandMember(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/RedisCluster5Proxy.php b/vendor/symfony/cache/Traits/RedisCluster5Proxy.php deleted file mode 100644 index 43f34047..00000000 --- a/vendor/symfony/cache/Traits/RedisCluster5Proxy.php +++ /dev/null @@ -1,980 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class RedisCluster5Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface -{ - use RedisProxyTrait { - resetLazyObject as reset; - } - - public function __construct($name, $seeds = null, $timeout = null, $read_timeout = null, $persistent = null, #[\SensitiveParameter] $auth = null) - { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function _masters() - { - return $this->initializeLazyObject()->_masters(...\func_get_args()); - } - - public function _prefix($key) - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function _redir() - { - return $this->initializeLazyObject()->_redir(...\func_get_args()); - } - - public function _serialize($value) - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize($value) - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _compress($value) - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress($value) - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function _pack($value) - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack($value) - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function acl($key_or_address, $subcmd, ...$args) - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append($key, $value) - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function bgrewriteaof($key_or_address) - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function bgsave($key_or_address) - { - return $this->initializeLazyObject()->bgsave(...\func_get_args()); - } - - public function bitcount($key) - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function bitop($operation, $ret_key, $key, ...$other_keys) - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos($key, $bit, $start = null, $end = null) - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function blpop($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->blpop(...\func_get_args()); - } - - public function brpop($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->brpop(...\func_get_args()); - } - - public function brpoplpush($src, $dst, $timeout) - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function clearlasterror() - { - return $this->initializeLazyObject()->clearlasterror(...\func_get_args()); - } - - public function bzpopmax($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); - } - - public function bzpopmin($key, $timeout_or_key, ...$extra_args) - { - return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); - } - - public function client($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function close() - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function cluster($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->cluster(...\func_get_args()); - } - - public function command(...$args) - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function config($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function dbsize($key_or_address) - { - return $this->initializeLazyObject()->dbsize(...\func_get_args()); - } - - public function decr($key) - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function decrby($key, $value) - { - return $this->initializeLazyObject()->decrby(...\func_get_args()); - } - - public function del($key, ...$other_keys) - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function discard() - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function dump($key) - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function echo($msg) - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function eval($script, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function evalsha($script_sha, $args = null, $num_keys = null) - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function exec() - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function exists($key) - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function expire($key, $timeout) - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function expireat($key, $timestamp) - { - return $this->initializeLazyObject()->expireat(...\func_get_args()); - } - - public function flushall($key_or_address, $async = null) - { - return $this->initializeLazyObject()->flushall(...\func_get_args()); - } - - public function flushdb($key_or_address, $async = null) - { - return $this->initializeLazyObject()->flushdb(...\func_get_args()); - } - - public function geoadd($key, $lng, $lat, $member, ...$other_triples) - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null) - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function geohash($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function geopos($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function georadius($key, $lng, $lan, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadius_ro($key, $lng, $lan, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function georadiusbymember($key, $member, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro($key, $member, $radius, $unit, $opts = null) - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function get($key) - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getbit($key, $offset) - { - return $this->initializeLazyObject()->getbit(...\func_get_args()); - } - - public function getlasterror() - { - return $this->initializeLazyObject()->getlasterror(...\func_get_args()); - } - - public function getmode() - { - return $this->initializeLazyObject()->getmode(...\func_get_args()); - } - - public function getoption($option) - { - return $this->initializeLazyObject()->getoption(...\func_get_args()); - } - - public function getrange($key, $start, $end) - { - return $this->initializeLazyObject()->getrange(...\func_get_args()); - } - - public function getset($key, $value) - { - return $this->initializeLazyObject()->getset(...\func_get_args()); - } - - public function hdel($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->hdel(...\func_get_args()); - } - - public function hexists($key, $member) - { - return $this->initializeLazyObject()->hexists(...\func_get_args()); - } - - public function hget($key, $member) - { - return $this->initializeLazyObject()->hget(...\func_get_args()); - } - - public function hgetall($key) - { - return $this->initializeLazyObject()->hgetall(...\func_get_args()); - } - - public function hincrby($key, $member, $value) - { - return $this->initializeLazyObject()->hincrby(...\func_get_args()); - } - - public function hincrbyfloat($key, $member, $value) - { - return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); - } - - public function hkeys($key) - { - return $this->initializeLazyObject()->hkeys(...\func_get_args()); - } - - public function hlen($key) - { - return $this->initializeLazyObject()->hlen(...\func_get_args()); - } - - public function hmget($key, $keys) - { - return $this->initializeLazyObject()->hmget(...\func_get_args()); - } - - public function hmset($key, $pairs) - { - return $this->initializeLazyObject()->hmset(...\func_get_args()); - } - - public function hscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->hscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function hset($key, $member, $value) - { - return $this->initializeLazyObject()->hset(...\func_get_args()); - } - - public function hsetnx($key, $member, $value) - { - return $this->initializeLazyObject()->hsetnx(...\func_get_args()); - } - - public function hstrlen($key, $member) - { - return $this->initializeLazyObject()->hstrlen(...\func_get_args()); - } - - public function hvals($key) - { - return $this->initializeLazyObject()->hvals(...\func_get_args()); - } - - public function incr($key) - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function incrby($key, $value) - { - return $this->initializeLazyObject()->incrby(...\func_get_args()); - } - - public function incrbyfloat($key, $value) - { - return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); - } - - public function info($key_or_address, $option = null) - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function keys($pattern) - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function lastsave($key_or_address) - { - return $this->initializeLazyObject()->lastsave(...\func_get_args()); - } - - public function lget($key, $index) - { - return $this->initializeLazyObject()->lget(...\func_get_args()); - } - - public function lindex($key, $index) - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function linsert($key, $position, $pivot, $value) - { - return $this->initializeLazyObject()->linsert(...\func_get_args()); - } - - public function llen($key) - { - return $this->initializeLazyObject()->llen(...\func_get_args()); - } - - public function lpop($key) - { - return $this->initializeLazyObject()->lpop(...\func_get_args()); - } - - public function lpush($key, $value) - { - return $this->initializeLazyObject()->lpush(...\func_get_args()); - } - - public function lpushx($key, $value) - { - return $this->initializeLazyObject()->lpushx(...\func_get_args()); - } - - public function lrange($key, $start, $end) - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lrem($key, $value) - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function lset($key, $index, $value) - { - return $this->initializeLazyObject()->lset(...\func_get_args()); - } - - public function ltrim($key, $start, $stop) - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public function mget($keys) - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function mset($pairs) - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx($pairs) - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function multi() - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function object($field, $key) - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function persist($key) - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function pexpire($key, $timestamp) - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function pexpireat($key, $timestamp) - { - return $this->initializeLazyObject()->pexpireat(...\func_get_args()); - } - - public function pfadd($key, $elements) - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfcount($key) - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - - public function pfmerge($dstkey, $keys) - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function ping($key_or_address) - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function psetex($key, $expire, $value) - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function psubscribe($patterns, $callback) - { - return $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function pttl($key) - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function publish($channel, $message) - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function pubsub($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function punsubscribe($pattern, ...$other_patterns) - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function randomkey($key_or_address) - { - return $this->initializeLazyObject()->randomkey(...\func_get_args()); - } - - public function rawcommand($cmd, ...$args) - { - return $this->initializeLazyObject()->rawcommand(...\func_get_args()); - } - - public function rename($key, $newkey) - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renamenx($key, $newkey) - { - return $this->initializeLazyObject()->renamenx(...\func_get_args()); - } - - public function restore($ttl, $key, $value) - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function role() - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function rpop($key) - { - return $this->initializeLazyObject()->rpop(...\func_get_args()); - } - - public function rpoplpush($src, $dst) - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function rpush($key, $value) - { - return $this->initializeLazyObject()->rpush(...\func_get_args()); - } - - public function rpushx($key, $value) - { - return $this->initializeLazyObject()->rpushx(...\func_get_args()); - } - - public function sadd($key, $value) - { - return $this->initializeLazyObject()->sadd(...\func_get_args()); - } - - public function saddarray($key, $options) - { - return $this->initializeLazyObject()->saddarray(...\func_get_args()); - } - - public function save($key_or_address) - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function scan(&$i_iterator, $str_node, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->scan($i_iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function scard($key) - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function sdiff($key, ...$other_keys) - { - return $this->initializeLazyObject()->sdiff(...\func_get_args()); - } - - public function sdiffstore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); - } - - public function set($key, $value, $opts = null) - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function setbit($key, $offset, $value) - { - return $this->initializeLazyObject()->setbit(...\func_get_args()); - } - - public function setex($key, $expire, $value) - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function setnx($key, $value) - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function setoption($option, $value) - { - return $this->initializeLazyObject()->setoption(...\func_get_args()); - } - - public function setrange($key, $offset, $value) - { - return $this->initializeLazyObject()->setrange(...\func_get_args()); - } - - public function sinter($key, ...$other_keys) - { - return $this->initializeLazyObject()->sinter(...\func_get_args()); - } - - public function sinterstore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sinterstore(...\func_get_args()); - } - - public function sismember($key, $value) - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function slowlog($key_or_address, $arg = null, ...$other_args) - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function smembers($key) - { - return $this->initializeLazyObject()->smembers(...\func_get_args()); - } - - public function smove($src, $dst, $value) - { - return $this->initializeLazyObject()->smove(...\func_get_args()); - } - - public function sort($key, $options = null) - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function spop($key) - { - return $this->initializeLazyObject()->spop(...\func_get_args()); - } - - public function srandmember($key, $count = null) - { - return $this->initializeLazyObject()->srandmember(...\func_get_args()); - } - - public function srem($key, $value) - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->sscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function strlen($key) - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function subscribe($channels, $callback) - { - return $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function sunion($key, ...$other_keys) - { - return $this->initializeLazyObject()->sunion(...\func_get_args()); - } - - public function sunionstore($dst, $key, ...$other_keys) - { - return $this->initializeLazyObject()->sunionstore(...\func_get_args()); - } - - public function time() - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function ttl($key) - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function type($key) - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function unsubscribe($channel, ...$other_channels) - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function unlink($key, ...$other_keys) - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function unwatch() - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function watch($key, ...$other_keys) - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function xack($str_key, $str_group, $arr_ids) - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xadd($str_key, $str_id, $arr_fields, $i_maxlen = null, $boo_approximate = null) - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function xclaim($str_key, $str_group, $str_consumer, $i_min_idle, $arr_ids, $arr_opts = null) - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xdel($str_key, $arr_ids) - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xgroup($str_operation, $str_key = null, $str_arg1 = null, $str_arg2 = null, $str_arg3 = null) - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xinfo($str_cmd, $str_key = null, $str_group = null) - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xlen($key) - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xpending($str_key, $str_group, $str_start = null, $str_end = null, $i_count = null, $str_consumer = null) - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange($str_key, $str_start, $str_end, $i_count = null) - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xread($arr_streams, $i_count = null, $i_block = null) - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup($str_group, $str_consumer, $arr_streams, $i_count = null, $i_block = null) - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xrevrange($str_key, $str_start, $str_end, $i_count = null) - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xtrim($str_key, $i_maxlen, $boo_approximate = null) - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zadd($key, $score, $value, ...$extra_args) - { - return $this->initializeLazyObject()->zadd(...\func_get_args()); - } - - public function zcard($key) - { - return $this->initializeLazyObject()->zcard(...\func_get_args()); - } - - public function zcount($key, $min, $max) - { - return $this->initializeLazyObject()->zcount(...\func_get_args()); - } - - public function zincrby($key, $value, $member) - { - return $this->initializeLazyObject()->zincrby(...\func_get_args()); - } - - public function zinterstore($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zlexcount($key, $min, $max) - { - return $this->initializeLazyObject()->zlexcount(...\func_get_args()); - } - - public function zpopmax($key) - { - return $this->initializeLazyObject()->zpopmax(...\func_get_args()); - } - - public function zpopmin($key) - { - return $this->initializeLazyObject()->zpopmin(...\func_get_args()); - } - - public function zrange($key, $start, $end, $scores = null) - { - return $this->initializeLazyObject()->zrange(...\func_get_args()); - } - - public function zrangebylex($key, $min, $max, $offset = null, $limit = null) - { - return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); - } - - public function zrangebyscore($key, $start, $end, $options = null) - { - return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); - } - - public function zrank($key, $member) - { - return $this->initializeLazyObject()->zrank(...\func_get_args()); - } - - public function zrem($key, $member, ...$other_members) - { - return $this->initializeLazyObject()->zrem(...\func_get_args()); - } - - public function zremrangebylex($key, $min, $max) - { - return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); - } - - public function zremrangebyrank($key, $min, $max) - { - return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); - } - - public function zremrangebyscore($key, $min, $max) - { - return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); - } - - public function zrevrange($key, $start, $end, $scores = null) - { - return $this->initializeLazyObject()->zrevrange(...\func_get_args()); - } - - public function zrevrangebylex($key, $min, $max, $offset = null, $limit = null) - { - return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); - } - - public function zrevrangebyscore($key, $start, $end, $options = null) - { - return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); - } - - public function zrevrank($key, $member) - { - return $this->initializeLazyObject()->zrevrank(...\func_get_args()); - } - - public function zscan($str_key, &$i_iterator, $str_pattern = null, $i_count = null) - { - return $this->initializeLazyObject()->zscan($str_key, $i_iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zscore($key, $member) - { - return $this->initializeLazyObject()->zscore(...\func_get_args()); - } - - public function zunionstore($key, $keys, $weights = null, $aggregate = null) - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/RedisCluster6Proxy.php b/vendor/symfony/cache/Traits/RedisCluster6Proxy.php deleted file mode 100644 index 38dedf7a..00000000 --- a/vendor/symfony/cache/Traits/RedisCluster6Proxy.php +++ /dev/null @@ -1,1136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class RedisCluster6Proxy extends \RedisCluster implements ResetInterface, LazyObjectInterface -{ - use RedisCluster6ProxyTrait; - use RedisProxyTrait { - resetLazyObject as reset; - } - - public function __construct($name, $seeds = null, $timeout = 0, $read_timeout = 0, $persistent = false, #[\SensitiveParameter] $auth = null, $context = null) - { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function _compress($value): string - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress($value): string - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function _serialize($value): bool|string - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize($value): mixed - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _pack($value): string - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack($value): mixed - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function _prefix($key): bool|string - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function _masters(): array - { - return $this->initializeLazyObject()->_masters(...\func_get_args()); - } - - public function _redir(): ?string - { - return $this->initializeLazyObject()->_redir(...\func_get_args()); - } - - public function acl($key_or_address, $subcmd, ...$args): mixed - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append($key, $value): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function bgrewriteaof($key_or_address): \RedisCluster|bool - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function bgsave($key_or_address): \RedisCluster|bool - { - return $this->initializeLazyObject()->bgsave(...\func_get_args()); - } - - public function bitcount($key, $start = 0, $end = -1, $bybit = false): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function bitop($operation, $deskey, $srckey, ...$otherkeys): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos($key, $bit, $start = 0, $end = -1, $bybit = false): \RedisCluster|false|int - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function blpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->blpop(...\func_get_args()); - } - - public function brpop($key, $timeout_or_key, ...$extra_args): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->brpop(...\func_get_args()); - } - - public function brpoplpush($srckey, $deskey, $timeout): mixed - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function lmove($src, $dst, $wherefrom, $whereto): \Redis|false|string - { - return $this->initializeLazyObject()->lmove(...\func_get_args()); - } - - public function blmove($src, $dst, $wherefrom, $whereto, $timeout): \Redis|false|string - { - return $this->initializeLazyObject()->blmove(...\func_get_args()); - } - - public function bzpopmax($key, $timeout_or_key, ...$extra_args): array - { - return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); - } - - public function bzpopmin($key, $timeout_or_key, ...$extra_args): array - { - return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); - } - - public function bzmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->bzmpop(...\func_get_args()); - } - - public function zmpop($keys, $from, $count = 1): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->zmpop(...\func_get_args()); - } - - public function blmpop($timeout, $keys, $from, $count = 1): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->blmpop(...\func_get_args()); - } - - public function lmpop($keys, $from, $count = 1): \RedisCluster|array|false|null - { - return $this->initializeLazyObject()->lmpop(...\func_get_args()); - } - - public function clearlasterror(): bool - { - return $this->initializeLazyObject()->clearlasterror(...\func_get_args()); - } - - public function client($key_or_address, $subcommand, $arg = null): array|bool|string - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function close(): bool - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function cluster($key_or_address, $command, ...$extra_args): mixed - { - return $this->initializeLazyObject()->cluster(...\func_get_args()); - } - - public function command(...$extra_args): mixed - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function config($key_or_address, $subcommand, ...$extra_args): mixed - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function dbsize($key_or_address): \RedisCluster|int - { - return $this->initializeLazyObject()->dbsize(...\func_get_args()); - } - - public function copy($src, $dst, $options = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->copy(...\func_get_args()); - } - - public function decr($key, $by = 1): \RedisCluster|false|int - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function decrby($key, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->decrby(...\func_get_args()); - } - - public function decrbyfloat($key, $value): float - { - return $this->initializeLazyObject()->decrbyfloat(...\func_get_args()); - } - - public function del($key, ...$other_keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function discard(): bool - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function dump($key): \RedisCluster|false|string - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function echo($key_or_address, $msg): \RedisCluster|false|string - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function eval($script, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function eval_ro($script, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval_ro(...\func_get_args()); - } - - public function evalsha($script_sha, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function evalsha_ro($script_sha, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); - } - - public function exec(): array|false - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function exists($key, ...$other_keys): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function touch($key, ...$other_keys): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->touch(...\func_get_args()); - } - - public function expire($key, $timeout, $mode = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function expireat($key, $timestamp, $mode = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->expireat(...\func_get_args()); - } - - public function expiretime($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->expiretime(...\func_get_args()); - } - - public function pexpiretime($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); - } - - public function flushall($key_or_address, $async = false): \RedisCluster|bool - { - return $this->initializeLazyObject()->flushall(...\func_get_args()); - } - - public function flushdb($key_or_address, $async = false): \RedisCluster|bool - { - return $this->initializeLazyObject()->flushdb(...\func_get_args()); - } - - public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \RedisCluster|false|int - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geodist($key, $src, $dest, $unit = null): \RedisCluster|false|float - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function geohash($key, $member, ...$other_members): \RedisCluster|array|false - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function geopos($key, $member, ...$other_members): \RedisCluster|array|false - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function geosearch($key, $position, $shape, $unit, $options = []): \RedisCluster|array - { - return $this->initializeLazyObject()->geosearch(...\func_get_args()); - } - - public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \RedisCluster|array|false|int - { - return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); - } - - public function get($key): mixed - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getbit($key, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->getbit(...\func_get_args()); - } - - public function getlasterror(): ?string - { - return $this->initializeLazyObject()->getlasterror(...\func_get_args()); - } - - public function getmode(): int - { - return $this->initializeLazyObject()->getmode(...\func_get_args()); - } - - public function getoption($option): mixed - { - return $this->initializeLazyObject()->getoption(...\func_get_args()); - } - - public function getrange($key, $start, $end): \RedisCluster|false|string - { - return $this->initializeLazyObject()->getrange(...\func_get_args()); - } - - public function lcs($key1, $key2, $options = null): \RedisCluster|array|false|int|string - { - return $this->initializeLazyObject()->lcs(...\func_get_args()); - } - - public function getset($key, $value): \RedisCluster|bool|string - { - return $this->initializeLazyObject()->getset(...\func_get_args()); - } - - public function gettransferredbytes(): array|false - { - return $this->initializeLazyObject()->gettransferredbytes(...\func_get_args()); - } - - public function cleartransferredbytes(): void - { - $this->initializeLazyObject()->cleartransferredbytes(...\func_get_args()); - } - - public function hdel($key, $member, ...$other_members): \RedisCluster|false|int - { - return $this->initializeLazyObject()->hdel(...\func_get_args()); - } - - public function hexists($key, $member): \RedisCluster|bool - { - return $this->initializeLazyObject()->hexists(...\func_get_args()); - } - - public function hget($key, $member): mixed - { - return $this->initializeLazyObject()->hget(...\func_get_args()); - } - - public function hgetall($key): \RedisCluster|array|false - { - return $this->initializeLazyObject()->hgetall(...\func_get_args()); - } - - public function hincrby($key, $member, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->hincrby(...\func_get_args()); - } - - public function hincrbyfloat($key, $member, $value): \RedisCluster|false|float - { - return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); - } - - public function hkeys($key): \RedisCluster|array|false - { - return $this->initializeLazyObject()->hkeys(...\func_get_args()); - } - - public function hlen($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->hlen(...\func_get_args()); - } - - public function hmget($key, $keys): \RedisCluster|array|false - { - return $this->initializeLazyObject()->hmget(...\func_get_args()); - } - - public function hmset($key, $key_values): \RedisCluster|bool - { - return $this->initializeLazyObject()->hmset(...\func_get_args()); - } - - public function hscan($key, &$iterator, $pattern = null, $count = 0): array|bool - { - return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function hrandfield($key, $options = null): \RedisCluster|array|string - { - return $this->initializeLazyObject()->hrandfield(...\func_get_args()); - } - - public function hset($key, $member, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->hset(...\func_get_args()); - } - - public function hsetnx($key, $member, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->hsetnx(...\func_get_args()); - } - - public function hstrlen($key, $field): \RedisCluster|false|int - { - return $this->initializeLazyObject()->hstrlen(...\func_get_args()); - } - - public function hvals($key): \RedisCluster|array|false - { - return $this->initializeLazyObject()->hvals(...\func_get_args()); - } - - public function incr($key, $by = 1): \RedisCluster|false|int - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function incrby($key, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->incrby(...\func_get_args()); - } - - public function incrbyfloat($key, $value): \RedisCluster|false|float - { - return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); - } - - public function info($key_or_address, ...$sections): \RedisCluster|array|false - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function keys($pattern): \RedisCluster|array|false - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function lastsave($key_or_address): \RedisCluster|false|int - { - return $this->initializeLazyObject()->lastsave(...\func_get_args()); - } - - public function lget($key, $index): \RedisCluster|bool|string - { - return $this->initializeLazyObject()->lget(...\func_get_args()); - } - - public function lindex($key, $index): mixed - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function linsert($key, $pos, $pivot, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->linsert(...\func_get_args()); - } - - public function llen($key): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->llen(...\func_get_args()); - } - - public function lpop($key, $count = 0): \RedisCluster|array|bool|string - { - return $this->initializeLazyObject()->lpop(...\func_get_args()); - } - - public function lpos($key, $value, $options = null): \Redis|array|bool|int|null - { - return $this->initializeLazyObject()->lpos(...\func_get_args()); - } - - public function lpush($key, $value, ...$other_values): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->lpush(...\func_get_args()); - } - - public function lpushx($key, $value): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->lpushx(...\func_get_args()); - } - - public function lrange($key, $start, $end): \RedisCluster|array|false - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lrem($key, $value, $count = 0): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function lset($key, $index, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->lset(...\func_get_args()); - } - - public function ltrim($key, $start, $end): \RedisCluster|bool - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public function mget($keys): \RedisCluster|array|false - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function mset($key_values): \RedisCluster|bool - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx($key_values): \RedisCluster|array|false - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function multi($value = \Redis::MULTI): \RedisCluster|bool - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function object($subcommand, $key): \RedisCluster|false|int|string - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function persist($key): \RedisCluster|bool - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function pexpire($key, $timeout, $mode = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function pexpireat($key, $timestamp, $mode = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->pexpireat(...\func_get_args()); - } - - public function pfadd($key, $elements): \RedisCluster|bool - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfcount($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - - public function pfmerge($key, $keys): \RedisCluster|bool - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function ping($key_or_address, $message = null): mixed - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function psetex($key, $timeout, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function psubscribe($patterns, $callback): void - { - $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function pttl($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function pubsub($key_or_address, ...$values): mixed - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function punsubscribe($pattern, ...$other_patterns): array|bool - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function randomkey($key_or_address): \RedisCluster|bool|string - { - return $this->initializeLazyObject()->randomkey(...\func_get_args()); - } - - public function rawcommand($key_or_address, $command, ...$args): mixed - { - return $this->initializeLazyObject()->rawcommand(...\func_get_args()); - } - - public function rename($key_src, $key_dst): \RedisCluster|bool - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renamenx($key, $newkey): \RedisCluster|bool - { - return $this->initializeLazyObject()->renamenx(...\func_get_args()); - } - - public function restore($key, $timeout, $value, $options = null): \RedisCluster|bool - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function role($key_or_address): mixed - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function rpop($key, $count = 0): \RedisCluster|array|bool|string - { - return $this->initializeLazyObject()->rpop(...\func_get_args()); - } - - public function rpoplpush($src, $dst): \RedisCluster|bool|string - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function rpush($key, ...$elements): \RedisCluster|false|int - { - return $this->initializeLazyObject()->rpush(...\func_get_args()); - } - - public function rpushx($key, $value): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->rpushx(...\func_get_args()); - } - - public function sadd($key, $value, ...$other_values): \RedisCluster|false|int - { - return $this->initializeLazyObject()->sadd(...\func_get_args()); - } - - public function saddarray($key, $values): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->saddarray(...\func_get_args()); - } - - public function save($key_or_address): \RedisCluster|bool - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function scan(&$iterator, $key_or_address, $pattern = null, $count = 0): array|bool - { - return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function scard($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script($key_or_address, ...$args): mixed - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function sdiff($key, ...$other_keys): \RedisCluster|array|false - { - return $this->initializeLazyObject()->sdiff(...\func_get_args()); - } - - public function sdiffstore($dst, $key, ...$other_keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); - } - - public function set($key, $value, $options = null): \RedisCluster|bool|string - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function setbit($key, $offset, $onoff): \RedisCluster|false|int - { - return $this->initializeLazyObject()->setbit(...\func_get_args()); - } - - public function setex($key, $expire, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function setnx($key, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function setoption($option, $value): bool - { - return $this->initializeLazyObject()->setoption(...\func_get_args()); - } - - public function setrange($key, $offset, $value): \RedisCluster|false|int - { - return $this->initializeLazyObject()->setrange(...\func_get_args()); - } - - public function sinter($key, ...$other_keys): \RedisCluster|array|false - { - return $this->initializeLazyObject()->sinter(...\func_get_args()); - } - - public function sintercard($keys, $limit = -1): \RedisCluster|false|int - { - return $this->initializeLazyObject()->sintercard(...\func_get_args()); - } - - public function sinterstore($key, ...$other_keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->sinterstore(...\func_get_args()); - } - - public function sismember($key, $value): \RedisCluster|bool - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function smismember($key, $member, ...$other_members): \RedisCluster|array|false - { - return $this->initializeLazyObject()->smismember(...\func_get_args()); - } - - public function slowlog($key_or_address, ...$args): mixed - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function smembers($key): \RedisCluster|array|false - { - return $this->initializeLazyObject()->smembers(...\func_get_args()); - } - - public function smove($src, $dst, $member): \RedisCluster|bool - { - return $this->initializeLazyObject()->smove(...\func_get_args()); - } - - public function sort($key, $options = null): \RedisCluster|array|bool|int|string - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function sort_ro($key, $options = null): \RedisCluster|array|bool|int|string - { - return $this->initializeLazyObject()->sort_ro(...\func_get_args()); - } - - public function spop($key, $count = 0): \RedisCluster|array|false|string - { - return $this->initializeLazyObject()->spop(...\func_get_args()); - } - - public function srandmember($key, $count = 0): \RedisCluster|array|false|string - { - return $this->initializeLazyObject()->srandmember(...\func_get_args()); - } - - public function srem($key, $value, ...$other_values): \RedisCluster|false|int - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sscan($key, &$iterator, $pattern = null, $count = 0): array|false - { - return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function strlen($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function subscribe($channels, $cb): void - { - $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function sunion($key, ...$other_keys): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->sunion(...\func_get_args()); - } - - public function sunionstore($dst, $key, ...$other_keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->sunionstore(...\func_get_args()); - } - - public function time($key_or_address): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function ttl($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function type($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function unsubscribe($channels): array|bool - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function unlink($key, ...$other_keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function unwatch(): bool - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function watch($key, ...$other_keys): \RedisCluster|bool - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function xack($key, $group, $ids): \RedisCluster|false|int - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xadd($key, $id, $values, $maxlen = 0, $approx = false): \RedisCluster|false|string - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function xclaim($key, $group, $consumer, $min_iddle, $ids, $options): \RedisCluster|array|false|string - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xdel($key, $ids): \RedisCluster|false|int - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); - } - - public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xlen($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null): \RedisCluster|array|false - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange($key, $start, $end, $count = -1): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xread($streams, $count = -1, $block = -1): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xrevrange($key, $start, $end, $count = -1): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xtrim($key, $maxlen, $approx = false, $minid = false, $limit = -1): \RedisCluster|false|int - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zadd($key, $score_or_options, ...$more_scores_and_mems): \RedisCluster|false|float|int - { - return $this->initializeLazyObject()->zadd(...\func_get_args()); - } - - public function zcard($key): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zcard(...\func_get_args()); - } - - public function zcount($key, $start, $end): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zcount(...\func_get_args()); - } - - public function zincrby($key, $value, $member): \RedisCluster|false|float - { - return $this->initializeLazyObject()->zincrby(...\func_get_args()); - } - - public function zinterstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zintercard($keys, $limit = -1): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zintercard(...\func_get_args()); - } - - public function zlexcount($key, $min, $max): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zlexcount(...\func_get_args()); - } - - public function zpopmax($key, $value = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zpopmax(...\func_get_args()); - } - - public function zpopmin($key, $value = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zpopmin(...\func_get_args()); - } - - public function zrange($key, $start, $end, $options = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zrange(...\func_get_args()); - } - - public function zrangestore($dstkey, $srckey, $start, $end, $options = null): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zrangestore(...\func_get_args()); - } - - public function zrandmember($key, $options = null): \RedisCluster|array|string - { - return $this->initializeLazyObject()->zrandmember(...\func_get_args()); - } - - public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \RedisCluster|array|false - { - return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); - } - - public function zrangebyscore($key, $start, $end, $options = []): \RedisCluster|array|false - { - return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); - } - - public function zrank($key, $member): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zrank(...\func_get_args()); - } - - public function zrem($key, $value, ...$other_values): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zrem(...\func_get_args()); - } - - public function zremrangebylex($key, $min, $max): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); - } - - public function zremrangebyrank($key, $min, $max): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); - } - - public function zremrangebyscore($key, $min, $max): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); - } - - public function zrevrange($key, $min, $max, $options = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zrevrange(...\func_get_args()); - } - - public function zrevrangebylex($key, $min, $max, $options = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); - } - - public function zrevrangebyscore($key, $min, $max, $options = null): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); - } - - public function zrevrank($key, $member): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zrevrank(...\func_get_args()); - } - - public function zscan($key, &$iterator, $pattern = null, $count = 0): \RedisCluster|array|bool - { - return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zscore($key, $member): \RedisCluster|false|float - { - return $this->initializeLazyObject()->zscore(...\func_get_args()); - } - - public function zmscore($key, $member, ...$other_members): \Redis|array|false - { - return $this->initializeLazyObject()->zmscore(...\func_get_args()); - } - - public function zunionstore($dst, $keys, $weights = null, $aggregate = null): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } - - public function zinter($keys, $weights = null, $options = null): \RedisCluster|array|false - { - return $this->initializeLazyObject()->zinter(...\func_get_args()); - } - - public function zdiffstore($dst, $keys): \RedisCluster|false|int - { - return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); - } - - public function zunion($keys, $weights = null, $options = null): \RedisCluster|array|false - { - return $this->initializeLazyObject()->zunion(...\func_get_args()); - } - - public function zdiff($keys, $options = null): \RedisCluster|array|false - { - return $this->initializeLazyObject()->zdiff(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php b/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php deleted file mode 100644 index 5033c013..00000000 --- a/vendor/symfony/cache/Traits/RedisCluster6ProxyTrait.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -if (version_compare(phpversion('redis'), '6.1.0-dev', '>')) { - /** - * @internal - */ - trait RedisCluster6ProxyTrait - { - public function getex($key, $options = []): \RedisCluster|string|false - { - return $this->initializeLazyObject()->getex(...\func_get_args()); - } - - public function publish($channel, $message): \RedisCluster|bool|int - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function waitaof($key_or_address, $numlocal, $numreplicas, $timeout): \RedisCluster|array|false - { - return $this->initializeLazyObject()->waitaof(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait RedisCluster6ProxyTrait - { - public function publish($channel, $message): \RedisCluster|bool - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php b/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php deleted file mode 100644 index f5c0baa3..00000000 --- a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * This file acts as a wrapper to the \RedisCluster implementation so it can accept the same type of calls as - * individual \Redis objects. - * - * Calls are made to individual nodes via: RedisCluster->{method}($host, ...args)' - * according to https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#directed-node-commands - * - * @author Jack Thomas - * - * @internal - */ -class RedisClusterNodeProxy -{ - public function __construct( - private array $host, - private \RedisCluster $redis, - ) { - } - - public function __call(string $method, array $args) - { - return $this->redis->{$method}($this->host, ...$args); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - return $this->redis->scan($iIterator, $this->host, $strPattern, $iCount); - } - - public function getOption($name) - { - return $this->redis->getOption($name); - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterProxy.php b/vendor/symfony/cache/Traits/RedisClusterProxy.php deleted file mode 100644 index c67d5341..00000000 --- a/vendor/symfony/cache/Traits/RedisClusterProxy.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -class_alias(6.0 <= (float) phpversion('redis') ? RedisCluster6Proxy::class : RedisCluster5Proxy::class, RedisClusterProxy::class); - -if (false) { - /** - * @internal - */ - class RedisClusterProxy extends \RedisCluster - { - } -} diff --git a/vendor/symfony/cache/Traits/RedisProxy.php b/vendor/symfony/cache/Traits/RedisProxy.php deleted file mode 100644 index 7f4537b1..00000000 --- a/vendor/symfony/cache/Traits/RedisProxy.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -class_alias(6.0 <= (float) phpversion('redis') ? Redis6Proxy::class : Redis5Proxy::class, RedisProxy::class); - -if (false) { - /** - * @internal - */ - class RedisProxy extends \Redis - { - } -} diff --git a/vendor/symfony/cache/Traits/RedisProxyTrait.php b/vendor/symfony/cache/Traits/RedisProxyTrait.php deleted file mode 100644 index 1acbdf19..00000000 --- a/vendor/symfony/cache/Traits/RedisProxyTrait.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @internal - */ -trait RedisProxyTrait -{ - private \Closure $initializer; - private ?parent $realInstance = null; - - public static function createLazyProxy(\Closure $initializer, ?self $instance = null): static - { - $instance ??= (new \ReflectionClass(static::class))->newInstanceWithoutConstructor(); - $instance->realInstance = null; - $instance->initializer = $initializer; - - return $instance; - } - - public function isLazyObjectInitialized(bool $partial = false): bool - { - return isset($this->realInstance); - } - - public function initializeLazyObject(): object - { - return $this->realInstance ??= ($this->initializer)(); - } - - public function resetLazyObject(): bool - { - $this->realInstance = null; - - return true; - } - - public function __destruct() - { - } -} diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php deleted file mode 100644 index 827a4cd0..00000000 --- a/vendor/symfony/cache/Traits/RedisTrait.php +++ /dev/null @@ -1,791 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Predis\Command\Redis\UNLINK; -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\RedisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Connection\Cluster\ClusterInterface as Predis2ClusterInterface; -use Predis\Connection\Cluster\RedisCluster as Predis2RedisCluster; -use Predis\Connection\Replication\ReplicationInterface as Predis2ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Relay\Cluster as RelayCluster; -use Relay\Relay; -use Relay\Sentinel; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Aurimas Niekis - * @author Nicolas Grekas - * - * @internal - */ -trait RedisTrait -{ - private static array $defaultConnectionOptions = [ - 'class' => null, - 'persistent' => false, - 'persistent_id' => null, - 'timeout' => 30, - 'read_timeout' => 0, - 'retry_interval' => 0, - 'tcp_keepalive' => 0, - 'lazy' => null, - 'cluster' => false, - 'cluster_command_timeout' => 0, - 'cluster_relay_context' => [], - 'sentinel' => null, - 'dbindex' => 0, - 'failover' => 'none', - 'ssl' => null, // see https://php.net/context.ssl - ]; - private \Redis|Relay|RelayCluster|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis; - private MarshallerInterface $marshaller; - - private function init(\Redis|Relay|RelayCluster|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller): void - { - parent::__construct($namespace, $defaultLifetime); - - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(\sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) { - $options = clone $redis->getOptions(); - \Closure::bind(function () { $this->options['exceptions'] = false; }, $options, $options)(); - $redis = new $redis($redis->getConnection(), $options); - } - - $this->redis = $redis; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * Creates a Redis connection using a DSN configuration. - * - * Example DSN: - * - redis://localhost - * - redis://example.com:1234 - * - redis://secret@example.com/13 - * - redis:///var/run/redis.sock - * - redis://secret@/var/run/redis.sock/13 - * - * @param array $options See self::$defaultConnectionOptions - * - * @throws InvalidArgumentException when the DSN is invalid - */ - public static function createConnection(#[\SensitiveParameter] string $dsn, array $options = []): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|Relay|RelayCluster - { - $scheme = match (true) { - str_starts_with($dsn, 'redis:') => 'redis', - str_starts_with($dsn, 'rediss:') => 'rediss', - str_starts_with($dsn, 'valkey:') => 'valkey', - str_starts_with($dsn, 'valkeys:') => 'valkeys', - default => throw new InvalidArgumentException('Invalid Redis DSN: it does not start with "redis[s]:" nor "valkey[s]:".'), - }; - - if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) { - throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.'); - } - - $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?[^:@]*+):)?(?[^@]*+)@)?#', function ($m) use (&$auth) { - if (isset($m['password'])) { - if (\in_array($m['user'], ['', 'default'], true)) { - $auth = rawurldecode($m['password']); - } else { - $auth = [rawurldecode($m['user']), rawurldecode($m['password'])]; - } - - if ('' === $auth) { - $auth = null; - } - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException('Invalid Redis DSN.'); - } - - $query = $hosts = []; - - $tls = 'rediss' === $scheme || 'valkeys' === $scheme; - $tcpScheme = $tls ? 'tls' : 'tcp'; - - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException('Invalid Redis DSN: query parameter "host" must be an array.'); - } - foreach ($hosts as $host => $parameters) { - if (\is_string($parameters)) { - parse_str($parameters, $parameters); - } - if (false === $i = strrpos($host, ':')) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => $host, 'port' => 6379] + $parameters; - } elseif ($port = (int) substr($host, 1 + $i)) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => substr($host, 0, $i), 'port' => $port] + $parameters; - } else { - $hosts[$host] = ['scheme' => 'unix', 'path' => substr($host, 0, $i)] + $parameters; - } - } - $hosts = array_values($hosts); - } - } - - if (isset($params['host']) || isset($params['path'])) { - if (!isset($params['dbindex']) && isset($params['path'])) { - if (preg_match('#/(\d+)?$#', $params['path'], $m)) { - $params['dbindex'] = $m[1] ?? $query['dbindex'] ?? '0'; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } elseif (isset($params['host'])) { - throw new InvalidArgumentException('Invalid Redis DSN: parameter "dbindex" must be a number.'); - } - } - - if (isset($params['host'])) { - array_unshift($hosts, ['scheme' => $tcpScheme, 'host' => $params['host'], 'port' => $params['port'] ?? 6379]); - } else { - array_unshift($hosts, ['scheme' => 'unix', 'path' => $params['path']]); - } - } - - if (!$hosts) { - throw new InvalidArgumentException('Invalid Redis DSN: missing host.'); - } - - if (isset($params['dbindex'], $query['dbindex']) && $params['dbindex'] !== $query['dbindex']) { - throw new InvalidArgumentException('Invalid Redis DSN: path and query "dbindex" parameters mismatch.'); - } - - $params += $query + $options + self::$defaultConnectionOptions; - - $aliases = [ - 'sentinel_master' => 'sentinel', - 'redis_sentinel' => 'sentinel', - 'redis_cluster' => 'cluster', - ]; - foreach ($aliases as $alias => $key) { - $params[$key] = match (true) { - \array_key_exists($key, $query) => $query[$key], - \array_key_exists($alias, $query) => $query[$alias], - \array_key_exists($key, $options) => $options[$key], - \array_key_exists($alias, $options) => $options[$alias], - default => $params[$key], - }; - } - - if (isset($params['sentinel']) && !class_exists(\Predis\Client::class) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) { - throw new CacheException('Redis Sentinel support requires one of: "predis/predis", "ext-redis >= 5.2", "ext-relay".'); - } - - foreach (['lazy', 'persistent', 'cluster'] as $option) { - if (!\is_bool($params[$option] ?? false)) { - $params[$option] = filter_var($params[$option], \FILTER_VALIDATE_BOOLEAN); - } - } - - if ($params['cluster'] && isset($params['sentinel'])) { - throw new InvalidArgumentException('Cannot use both "cluster" and "sentinel" at the same time.'); - } - - $class = $params['class'] ?? match (true) { - $params['cluster'] => match (true) { - \extension_loaded('redis') => \RedisCluster::class, - \extension_loaded('relay') => RelayCluster::class, - default => \Predis\Client::class, - }, - isset($params['sentinel']) => match (true) { - \extension_loaded('redis') => \Redis::class, - \extension_loaded('relay') => Relay::class, - default => \Predis\Client::class, - }, - 1 < \count($hosts) && \extension_loaded('redis') => \RedisArray::class, - \extension_loaded('redis') => \Redis::class, - \extension_loaded('relay') => Relay::class, - default => \Predis\Client::class, - }; - - if (isset($params['sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) { - throw new CacheException(\sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class)); - } - - $isRedisExt = is_a($class, \Redis::class, true); - $isRelayExt = !$isRedisExt && is_a($class, Relay::class, true); - - if ($isRedisExt || $isRelayExt) { - $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; - - $initializer = static function () use ($class, $isRedisExt, $connect, $params, $auth, $hosts, $tls) { - $sentinelClass = $isRedisExt ? \RedisSentinel::class : Sentinel::class; - $redis = new $class(); - $hostIndex = 0; - do { - $host = $hosts[$hostIndex]['host'] ?? $hosts[$hostIndex]['path']; - $port = $hosts[$hostIndex]['port'] ?? 0; - $passAuth = isset($params['auth']) && (!$isRedisExt || \defined('Redis::OPT_NULL_MULTIBULK_AS_NULL')); - $address = false; - - if (isset($hosts[$hostIndex]['host']) && $tls) { - $host = 'tls://'.$host; - } - - if (!isset($params['sentinel'])) { - break; - } - - try { - if (version_compare(phpversion('redis'), '6.0.0', '>=') && $isRedisExt) { - $options = [ - 'host' => $host, - 'port' => $port, - 'connectTimeout' => (float) $params['timeout'], - 'persistent' => $params['persistent_id'], - 'retryInterval' => (int) $params['retry_interval'], - 'readTimeout' => (float) $params['read_timeout'], - ]; - - if ($passAuth) { - $options['auth'] = $params['auth']; - } - - $sentinel = new \RedisSentinel($options); - } else { - $extra = $passAuth ? [$params['auth']] : []; - - $sentinel = @new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra); - } - - if ($address = @$sentinel->getMasterAddrByName($params['sentinel'])) { - [$host, $port] = $address; - } - } catch (\RedisException|\Relay\Exception $redisException) { - } - } while (++$hostIndex < \count($hosts) && !$address); - - if (isset($params['sentinel']) && !$address) { - throw new InvalidArgumentException(\sprintf('Failed to retrieve master information from sentinel "%s".', $params['sentinel']), previous: $redisException ?? null); - } - - try { - $extra = [ - 'stream' => self::filterSslOptions($params['ssl'] ?? []) ?: null, - ]; - - if (isset($params['auth'])) { - $extra['auth'] = $params['auth']; - } - @$redis->{$connect}($host, $port, (float) $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') || !$isRedisExt ? [$extra] : []); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $isConnected = $redis->isConnected(); - } finally { - restore_error_handler(); - } - if (!$isConnected) { - $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? \sprintf(' (%s)', $error[1]) : ''; - throw new InvalidArgumentException('Redis connection failed: '.$error.'.'); - } - - if ((null !== $auth && !$redis->auth($auth)) - // Due to a bug in phpredis we must always select the dbindex if persistent pooling is enabled - // @see https://github.com/phpredis/phpredis/issues/1920 - // @see https://github.com/symfony/symfony/issues/51578 - || (($params['dbindex'] || ('pconnect' === $connect && '0' !== \ini_get('redis.pconnect.pooling_enabled'))) && !$redis->select($params['dbindex'])) - ) { - $e = preg_replace('/^ERR /', '', $redis->getLastError()); - throw new InvalidArgumentException('Redis connection failed: '.$e.'.'); - } - - if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { - $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } catch (\RedisException|\Relay\Exception $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - return $redis; - }; - - if ($params['lazy']) { - $redis = $isRedisExt ? RedisProxy::createLazyProxy($initializer) : RelayProxy::createLazyProxy($initializer); - } else { - $redis = $initializer(); - } - } elseif (is_a($class, \RedisArray::class, true)) { - foreach ($hosts as $i => $host) { - $hosts[$i] = match ($host['scheme']) { - 'tcp' => $host['host'].':'.$host['port'], - 'tls' => 'tls://'.$host['host'].':'.$host['port'], - default => $host['path'], - }; - } - $params['lazy_connect'] = $params['lazy'] ?? true; - $params['connect_timeout'] = $params['timeout']; - - try { - $redis = new $class($hosts, $params); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { - $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } elseif (is_a($class, RelayCluster::class, true)) { - if (version_compare(phpversion('relay'), '0.10.0', '<')) { - throw new InvalidArgumentException('Using RelayCluster is supported from ext-relay 0.10.0 or higher.'); - } - - $initializer = static function () use ($class, $params, $hosts) { - foreach ($hosts as $i => $host) { - $hosts[$i] = match ($host['scheme']) { - 'tcp' => $host['host'].':'.$host['port'], - 'tls' => 'tls://'.$host['host'].':'.$host['port'], - default => $host['path'], - }; - } - - try { - $context = $params['cluster_relay_context']; - $context['stream'] = self::filterSslOptions($params['ssl'] ?? []) ?: null; - - foreach ($context as $name => $value) { - match ($name) { - 'use-cache', 'client-tracking', 'throw-on-error', 'client-invalidations', 'reply-literal', 'persistent', - => $context[$name] = filter_var($value, \FILTER_VALIDATE_BOOLEAN), - 'max-retries', 'serializer', 'compression', 'compression-level', - => $context[$name] = filter_var($value, \FILTER_VALIDATE_INT), - default => null, - }; - } - - $relayCluster = new $class( - name: null, - seeds: $hosts, - connect_timeout: $params['timeout'], - command_timeout: $params['cluster_command_timeout'], - persistent: $params['persistent'], - auth: $params['auth'] ?? null, - context: $context, - ); - } catch (\Relay\Exception $e) { - throw new InvalidArgumentException('Relay cluster connection failed: '.$e->getMessage()); - } - - if (0 < $params['tcp_keepalive']) { - $relayCluster->setOption(Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - - if (0 < $params['read_timeout']) { - $relayCluster->setOption(Relay::OPT_READ_TIMEOUT, $params['read_timeout']); - } - - return $relayCluster; - }; - - $redis = $params['lazy'] ? RelayClusterProxy::createLazyProxy($initializer) : $initializer(); - } elseif (is_a($class, \RedisCluster::class, true)) { - $initializer = static function () use ($isRedisExt, $class, $params, $hosts) { - foreach ($hosts as $i => $host) { - $hosts[$i] = match ($host['scheme']) { - 'tcp' => $host['host'].':'.$host['port'], - 'tls' => 'tls://'.$host['host'].':'.$host['port'], - default => $host['path'], - }; - } - - try { - $redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], $params['persistent'], $params['auth'] ?? '', ...\defined('Redis::SCAN_PREFIX') ? [$params['ssl'] ?? null] : []); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && (!$isRedisExt || \defined('Redis::OPT_TCP_KEEPALIVE'))) { - $redis->setOption($isRedisExt ? \Redis::OPT_TCP_KEEPALIVE : Relay::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, match ($params['failover']) { - 'error' => \RedisCluster::FAILOVER_ERROR, - 'distribute' => \RedisCluster::FAILOVER_DISTRIBUTE, - 'slaves' => \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES, - 'none' => \RedisCluster::FAILOVER_NONE, - }); - - return $redis; - }; - - $redis = $params['lazy'] ? RedisClusterProxy::createLazyProxy($initializer) : $initializer(); - } elseif (is_a($class, \Predis\ClientInterface::class, true)) { - if ($params['cluster']) { - $params['cluster'] = 'redis'; - } else { - unset($params['cluster']); - } - if (isset($params['sentinel'])) { - $params['replication'] = 'sentinel'; - $params['service'] = $params['sentinel']; - } - $params += ['parameters' => []]; - $params['parameters'] += [ - 'persistent' => $params['persistent'], - 'timeout' => $params['timeout'], - 'read_write_timeout' => $params['read_timeout'], - 'tcp_nodelay' => true, - ]; - if ($params['dbindex']) { - $params['parameters']['database'] = $params['dbindex']; - } - if (null !== $auth) { - if (\is_array($auth)) { - // ACL - $params['parameters']['username'] = $auth[0]; - $params['parameters']['password'] = $auth[1]; - } else { - $params['parameters']['password'] = $auth; - } - } - - if (isset($params['ssl'])) { - foreach ($hosts as $i => $host) { - $hosts[$i]['ssl'] ??= $params['ssl']; - } - } - - if (1 === \count($hosts) && !isset($params['cluster']) & !isset($params['sentinel'])) { - $hosts = $hosts[0]; - } elseif (\in_array($params['failover'], ['slaves', 'distribute'], true) && !isset($params['replication'])) { - $params['replication'] = true; - $hosts[0] += ['alias' => 'master']; - } - $params['exceptions'] = false; - - $redis = new $class($hosts, array_diff_key($params, array_diff_key(self::$defaultConnectionOptions, ['cluster' => null]))); - if (isset($params['sentinel'])) { - $redis->getConnection()->setSentinelTimeout($params['timeout']); - } - } elseif (class_exists($class, false)) { - throw new InvalidArgumentException(\sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class)); - } else { - throw new InvalidArgumentException(\sprintf('Class "%s" does not exist.', $class)); - } - - return $redis; - } - - protected function doFetch(array $ids): iterable - { - if (!$ids) { - return []; - } - - $result = []; - - if (($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) || $this->redis instanceof RelayCluster) { - $values = $this->pipeline(function () use ($ids) { - foreach ($ids as $id) { - yield 'get' => [$id]; - } - }); - } else { - $values = $this->redis->mget($ids); - - if (!\is_array($values) || \count($values) !== \count($ids)) { - return []; - } - - $values = array_combine($ids, $values); - } - - foreach ($values as $id => $v) { - if ($v) { - $result[$id] = $this->marshaller->unmarshall($v); - } - } - - return $result; - } - - protected function doHave(string $id): bool - { - return (bool) $this->redis->exists($id); - } - - protected function doClear(string $namespace): bool - { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - $prefixLen = \strlen($prefix ?? ''); - } - - $cleared = true; - - if ($this->redis instanceof RelayCluster) { - $prefix = Relay::SCAN_PREFIX & $this->redis->getOption(Relay::OPT_SCAN) ? '' : $this->redis->getOption(Relay::OPT_PREFIX); - $prefixLen = \strlen($prefix); - $pattern = $prefix.$namespace.'*'; - foreach ($this->redis->_masters() as $ipAndPort) { - $address = implode(':', $ipAndPort); - $cursor = null; - do { - $keys = $this->redis->scan($cursor, $address, $pattern, 1000); - if (isset($keys[1]) && \is_array($keys[1])) { - $cursor = $keys[0]; - $keys = $keys[1]; - } - - if ($keys) { - if ($prefixLen) { - foreach ($keys as $i => $key) { - $keys[$i] = substr($key, $prefixLen); - } - } - $this->doDelete($keys); - } - } while ($cursor); - } - - return $cleared; - } - - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client) { - $connection = $host->getConnection(); - - if ($connection instanceof ReplicationInterface) { - $hosts = [$host->getClientFor('master')]; - } elseif ($connection instanceof Predis2ReplicationInterface) { - $connection->switchToMaster(); - - $hosts = [$host]; - } - } - - foreach ($hosts as $host) { - if (!isset($namespace[0])) { - $cleared = $host->flushDb() && $cleared; - continue; - } - - $info = $host->info('Server'); - $info = !$info instanceof ErrorInterface ? $info['Server'] ?? $info : ['redis_version' => '2.0']; - - if ($host instanceof Relay) { - $prefix = Relay::SCAN_PREFIX & $host->getOption(Relay::OPT_SCAN) ? '' : $host->getOption(Relay::OPT_PREFIX); - $prefixLen = \strlen($host->getOption(Relay::OPT_PREFIX) ?? ''); - } elseif (!$host instanceof \Predis\ClientInterface) { - $prefix = \defined('Redis::SCAN_PREFIX') && (\Redis::SCAN_PREFIX & $host->getOption(\Redis::OPT_SCAN)) ? '' : $host->getOption(\Redis::OPT_PREFIX); - $prefixLen = \strlen($host->getOption(\Redis::OPT_PREFIX) ?? ''); - } - $pattern = $prefix.$namespace.'*'; - - if (!version_compare($info['redis_version'], '2.8', '>=')) { - // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS - // can hang your server when it is executed against large databases (millions of items). - // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above. - $unlink = version_compare($info['redis_version'], '4.0', '>=') ? 'UNLINK' : 'DEL'; - $args = $this->redis instanceof \Predis\ClientInterface ? [0, $pattern] : [[$pattern], 0]; - $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]) for i=1,#keys,5000 do redis.call('$unlink',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $args[0], $args[1]) && $cleared; - continue; - } - - $cursor = null; - do { - $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor ?? 0, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000); - if (isset($keys[1]) && \is_array($keys[1])) { - $cursor = $keys[0]; - $keys = $keys[1]; - } - if ($keys) { - if ($prefixLen) { - foreach ($keys as $i => $key) { - $keys[$i] = substr($key, $prefixLen); - } - } - $this->doDelete($keys); - } - } while ($cursor); - } - - return $cleared; - } - - protected function doDelete(array $ids): bool - { - if (!$ids) { - return true; - } - - if ($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) { - static $del; - $del ??= (class_exists(UNLINK::class) ? 'unlink' : 'del'); - - $this->pipeline(function () use ($ids, $del) { - foreach ($ids as $id) { - yield $del => [$id]; - } - })->rewind(); - } else { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($ids); - } catch (\Throwable) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($ids); - } - } - - return true; - } - - protected function doSave(array $values, int $lifetime): array|bool - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $results = $this->pipeline(function () use ($values, $lifetime) { - foreach ($values as $id => $value) { - if (0 >= $lifetime) { - yield 'set' => [$id, $value]; - } else { - yield 'setEx' => [$id, $lifetime, $value]; - } - } - }); - - foreach ($results as $id => $result) { - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - private function pipeline(\Closure $generator, ?object $redis = null): \Generator - { - $ids = []; - $redis ??= $this->redis; - - if ($redis instanceof \RedisCluster || $redis instanceof RelayCluster || ($redis instanceof \Predis\ClientInterface && ($redis->getConnection() instanceof RedisCluster || $redis->getConnection() instanceof Predis2RedisCluster))) { - // phpredis & predis don't support pipelining with RedisCluster - // \Relay\Cluster does not support multi with pipeline mode - // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining - // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 - $results = []; - foreach ($generator() as $command => $args) { - $results[] = $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? ($redis instanceof \Predis\ClientInterface ? $args[2] : $args[1][0]) : $args[0]; - } - } elseif ($redis instanceof \Predis\ClientInterface) { - $results = $redis->pipeline(static function ($redis) use ($generator, &$ids) { - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[2] : $args[0]; - } - }); - } elseif ($redis instanceof \RedisArray) { - $connections = $results = []; - foreach ($generator() as $command => $args) { - $id = 'eval' === $command ? $args[1][0] : $args[0]; - if (!isset($connections[$h = $redis->_target($id)])) { - $connections[$h] = [$redis->_instance($h), -1]; - $connections[$h][0]->multi(\Redis::PIPELINE); - } - $connections[$h][0]->{$command}(...$args); - $results[] = [$h, ++$connections[$h][1]]; - $ids[] = $id; - } - foreach ($connections as $h => $c) { - $connections[$h] = $c[0]->exec(); - } - foreach ($results as $k => [$h, $c]) { - $results[$k] = $connections[$h][$c]; - } - } else { - $redis->multi($redis instanceof Relay ? Relay::PIPELINE : \Redis::PIPELINE); - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[1][0] : $args[0]; - } - $results = $redis->exec(); - } - - if (!$redis instanceof \Predis\ClientInterface && 'eval' === $command && $redis->getLastError()) { - $e = $redis instanceof Relay ? new \Relay\Exception($redis->getLastError()) : new \RedisException($redis->getLastError()); - $results = array_map(fn ($v) => false === $v ? $e : $v, (array) $results); - } - - if (\is_bool($results)) { - return; - } - - foreach ($ids as $k => $id) { - yield $id => $results[$k]; - } - } - - private function getHosts(): array - { - $hosts = [$this->redis]; - if ($this->redis instanceof \Predis\ClientInterface) { - $connection = $this->redis->getConnection(); - if (($connection instanceof ClusterInterface || $connection instanceof Predis2ClusterInterface) && $connection instanceof \Traversable) { - $hosts = []; - foreach ($connection as $c) { - $hosts[] = new \Predis\Client($c); - } - } - } elseif ($this->redis instanceof \RedisArray) { - $hosts = []; - foreach ($this->redis->_hosts() as $host) { - $hosts[] = $this->redis->_instance($host); - } - } elseif ($this->redis instanceof \RedisCluster) { - $hosts = []; - foreach ($this->redis->_masters() as $host) { - $hosts[] = new RedisClusterNodeProxy($host, $this->redis); - } - } - - return $hosts; - } - - private static function filterSslOptions(array $options): array - { - foreach ($options as $name => $value) { - match ($name) { - 'allow_self_signed', 'capture_peer_cert', 'capture_peer_cert_chain', 'disable_compression', 'SNI_enabled', 'verify_peer', 'verify_peer_name', - => $options[$name] = filter_var($value, \FILTER_VALIDATE_BOOLEAN), - default => null, - }; - } - - return $options; - } -} diff --git a/vendor/symfony/cache/Traits/Relay/BgsaveTrait.php b/vendor/symfony/cache/Traits/Relay/BgsaveTrait.php deleted file mode 100644 index f5cddcb8..00000000 --- a/vendor/symfony/cache/Traits/Relay/BgsaveTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.11', '>=')) { - /** - * @internal - */ - trait BgsaveTrait - { - public function bgsave($arg = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->bgsave(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait BgsaveTrait - { - public function bgsave($schedule = false): \Relay\Relay|bool - { - return $this->initializeLazyObject()->bgsave(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/CopyTrait.php b/vendor/symfony/cache/Traits/Relay/CopyTrait.php deleted file mode 100644 index 84d52f44..00000000 --- a/vendor/symfony/cache/Traits/Relay/CopyTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.8.1', '>=')) { - /** - * @internal - */ - trait CopyTrait - { - public function copy($src, $dst, $options = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->copy(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait CopyTrait - { - public function copy($src, $dst, $options = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->copy(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/FtTrait.php b/vendor/symfony/cache/Traits/Relay/FtTrait.php deleted file mode 100644 index 8accd793..00000000 --- a/vendor/symfony/cache/Traits/Relay/FtTrait.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait FtTrait - { - public function ftAggregate($index, $query, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftAggregate(...\func_get_args()); - } - - public function ftAliasAdd($index, $alias): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftAliasAdd(...\func_get_args()); - } - - public function ftAliasDel($alias): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftAliasDel(...\func_get_args()); - } - - public function ftAliasUpdate($index, $alias): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftAliasUpdate(...\func_get_args()); - } - - public function ftAlter($index, $schema, $skipinitialscan = false): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftAlter(...\func_get_args()); - } - - public function ftConfig($operation, $option, $value = null): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->ftConfig(...\func_get_args()); - } - - public function ftCreate($index, $schema, $options = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftCreate(...\func_get_args()); - } - - public function ftCursor($operation, $index, $cursor, $options = null): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->ftCursor(...\func_get_args()); - } - - public function ftDictAdd($dict, $term, ...$other_terms): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->ftDictAdd(...\func_get_args()); - } - - public function ftDictDel($dict, $term, ...$other_terms): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->ftDictDel(...\func_get_args()); - } - - public function ftDictDump($dict): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftDictDump(...\func_get_args()); - } - - public function ftDropIndex($index, $dd = false): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftDropIndex(...\func_get_args()); - } - - public function ftExplain($index, $query, $dialect = 0): \Relay\Relay|false|string - { - return $this->initializeLazyObject()->ftExplain(...\func_get_args()); - } - - public function ftExplainCli($index, $query, $dialect = 0): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftExplainCli(...\func_get_args()); - } - - public function ftInfo($index): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftInfo(...\func_get_args()); - } - - public function ftProfile($index, $command, $query, $limited = false): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftProfile(...\func_get_args()); - } - - public function ftSearch($index, $query, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftSearch(...\func_get_args()); - } - - public function ftSpellCheck($index, $query, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftSpellCheck(...\func_get_args()); - } - - public function ftSynDump($index): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftSynDump(...\func_get_args()); - } - - public function ftSynUpdate($index, $synonym, $term_or_terms, $skipinitialscan = false): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ftSynUpdate(...\func_get_args()); - } - - public function ftTagVals($index, $tag): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->ftTagVals(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait FtTrait - { - } -} diff --git a/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php b/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php deleted file mode 100644 index a358f80b..00000000 --- a/vendor/symfony/cache/Traits/Relay/GeosearchTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait GeosearchTrait - { - public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->geosearch(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait GeosearchTrait - { - public function geosearch($key, $position, $shape, $unit, $options = []): \Relay\Relay|array - { - return $this->initializeLazyObject()->geosearch(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/GetWithMetaTrait.php b/vendor/symfony/cache/Traits/Relay/GetWithMetaTrait.php deleted file mode 100644 index 79a75ede..00000000 --- a/vendor/symfony/cache/Traits/Relay/GetWithMetaTrait.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.10.1', '>=')) { - /** - * @internal - */ - trait GetWithMetaTrait - { - public function getWithMeta($key): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->getWithMeta(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait GetWithMetaTrait - { - } -} diff --git a/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php b/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php deleted file mode 100644 index f26333e9..00000000 --- a/vendor/symfony/cache/Traits/Relay/GetrangeTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait GetrangeTrait - { - public function getrange($key, $start, $end): mixed - { - return $this->initializeLazyObject()->getrange(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait GetrangeTrait - { - public function getrange($key, $start, $end): \Relay\Relay|false|string - { - return $this->initializeLazyObject()->getrange(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/HsetTrait.php b/vendor/symfony/cache/Traits/Relay/HsetTrait.php deleted file mode 100644 index 83342446..00000000 --- a/vendor/symfony/cache/Traits/Relay/HsetTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait HsetTrait - { - public function hset($key, ...$keys_and_vals): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hset(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait HsetTrait - { - public function hset($key, $mem, $val, ...$kvals): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hset(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/IsTrackedTrait.php b/vendor/symfony/cache/Traits/Relay/IsTrackedTrait.php deleted file mode 100644 index 28520802..00000000 --- a/vendor/symfony/cache/Traits/Relay/IsTrackedTrait.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.11.1', '>=')) { - /** - * @internal - */ - trait IsTrackedTrait - { - public function isTracked($key): bool - { - return $this->initializeLazyObject()->isTracked(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait IsTrackedTrait - { - } -} diff --git a/vendor/symfony/cache/Traits/Relay/MoveTrait.php b/vendor/symfony/cache/Traits/Relay/MoveTrait.php deleted file mode 100644 index 18086f61..00000000 --- a/vendor/symfony/cache/Traits/Relay/MoveTrait.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait MoveTrait - { - public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): mixed - { - return $this->initializeLazyObject()->blmove(...\func_get_args()); - } - - public function lmove($srckey, $dstkey, $srcpos, $dstpos): mixed - { - return $this->initializeLazyObject()->lmove(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait MoveTrait - { - public function blmove($srckey, $dstkey, $srcpos, $dstpos, $timeout): \Relay\Relay|false|string|null - { - return $this->initializeLazyObject()->blmove(...\func_get_args()); - } - - public function lmove($srckey, $dstkey, $srcpos, $dstpos): \Relay\Relay|false|string|null - { - return $this->initializeLazyObject()->lmove(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php b/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php deleted file mode 100644 index 661ec476..00000000 --- a/vendor/symfony/cache/Traits/Relay/NullableReturnTrait.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait NullableReturnTrait - { - public function dump($key): \Relay\Relay|false|string|null - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float|null - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string|null - { - return $this->initializeLazyObject()->hrandfield(...\func_get_args()); - } - - public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string|null - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int|null - { - return $this->initializeLazyObject()->zrank(...\func_get_args()); - } - - public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int|null - { - return $this->initializeLazyObject()->zrevrank(...\func_get_args()); - } - - public function zscore($key, $member): \Relay\Relay|false|float|null - { - return $this->initializeLazyObject()->zscore(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait NullableReturnTrait - { - public function dump($key): \Relay\Relay|false|string - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function geodist($key, $src, $dst, $unit = null): \Relay\Relay|false|float - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function hrandfield($hash, $options = null): \Relay\Relay|array|false|string - { - return $this->initializeLazyObject()->hrandfield(...\func_get_args()); - } - - public function xadd($key, $id, $values, $maxlen = 0, $approx = false, $nomkstream = false): \Relay\Relay|false|string - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function zrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int - { - return $this->initializeLazyObject()->zrank(...\func_get_args()); - } - - public function zrevrank($key, $rank, $withscore = false): \Relay\Relay|array|false|int - { - return $this->initializeLazyObject()->zrevrank(...\func_get_args()); - } - - public function zscore($key, $member): \Relay\Relay|false|float - { - return $this->initializeLazyObject()->zscore(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/PfcountTrait.php b/vendor/symfony/cache/Traits/Relay/PfcountTrait.php deleted file mode 100644 index 84e5c597..00000000 --- a/vendor/symfony/cache/Traits/Relay/PfcountTrait.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait PfcountTrait - { - public function pfcount($key_or_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait PfcountTrait - { - public function pfcount($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - } -} diff --git a/vendor/symfony/cache/Traits/Relay/Relay11Trait.php b/vendor/symfony/cache/Traits/Relay/Relay11Trait.php deleted file mode 100644 index eeeeb456..00000000 --- a/vendor/symfony/cache/Traits/Relay/Relay11Trait.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.11.0', '>=')) { - /** - * @internal - */ - trait Relay11Trait - { - public function cmsIncrBy($key, $field, $value, ...$fields_and_falues): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->cmsIncrBy(...\func_get_args()); - } - - public function cmsInfo($key): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->cmsInfo(...\func_get_args()); - } - - public function cmsInitByDim($key, $width, $depth): \Relay\Relay|bool - { - return $this->initializeLazyObject()->cmsInitByDim(...\func_get_args()); - } - - public function cmsInitByProb($key, $error, $probability): \Relay\Relay|bool - { - return $this->initializeLazyObject()->cmsInitByProb(...\func_get_args()); - } - - public function cmsMerge($dstkey, $keys, $weights = []): \Relay\Relay|bool - { - return $this->initializeLazyObject()->cmsMerge(...\func_get_args()); - } - - public function cmsQuery($key, ...$fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->cmsQuery(...\func_get_args()); - } - - public function commandlog($subcmd, ...$args): \Relay\Relay|array|bool|int - { - return $this->initializeLazyObject()->commandlog(...\func_get_args()); - } - - public function hexpire($hash, $ttl, $fields, $mode = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hexpire(...\func_get_args()); - } - - public function hexpireat($hash, $ttl, $fields, $mode = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hexpireat(...\func_get_args()); - } - - public function hexpiretime($hash, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hexpiretime(...\func_get_args()); - } - - public function hgetdel($key, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hgetdel(...\func_get_args()); - } - - public function hgetex($hash, $fields, $expiry = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hgetex(...\func_get_args()); - } - - public function hpersist($hash, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hpersist(...\func_get_args()); - } - - public function hpexpire($hash, $ttl, $fields, $mode = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hpexpire(...\func_get_args()); - } - - public function hpexpireat($hash, $ttl, $fields, $mode = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hpexpireat(...\func_get_args()); - } - - public function hpexpiretime($hash, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hpexpiretime(...\func_get_args()); - } - - public function hpttl($hash, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hpttl(...\func_get_args()); - } - - public function hsetex($key, $fields, $expiry = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hsetex(...\func_get_args()); - } - - public function httl($hash, $fields): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->httl(...\func_get_args()); - } - - public function serverName(): false|string - { - return $this->initializeLazyObject()->serverName(...\func_get_args()); - } - - public function serverVersion(): false|string - { - return $this->initializeLazyObject()->serverVersion(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait Relay11Trait - { - } -} diff --git a/vendor/symfony/cache/Traits/Relay/SwapdbTrait.php b/vendor/symfony/cache/Traits/Relay/SwapdbTrait.php deleted file mode 100644 index 46cb2fec..00000000 --- a/vendor/symfony/cache/Traits/Relay/SwapdbTrait.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits\Relay; - -if (version_compare(phpversion('relay'), '0.9.0', '>=')) { - /** - * @internal - */ - trait SwapdbTrait - { - public function swapdb($index1, $index2): \Relay\Relay|bool - { - return $this->initializeLazyObject()->swapdb(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait SwapdbTrait - { - } -} diff --git a/vendor/symfony/cache/Traits/RelayClusterProxy.php b/vendor/symfony/cache/Traits/RelayClusterProxy.php deleted file mode 100644 index af524c80..00000000 --- a/vendor/symfony/cache/Traits/RelayClusterProxy.php +++ /dev/null @@ -1,1204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Relay\Cluster; -use Relay\Relay; -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class RelayClusterProxy extends Cluster implements ResetInterface, LazyObjectInterface -{ - use RedisProxyTrait { - resetLazyObject as reset; - } - - public function __construct( - ?string $name, - ?array $seeds = null, - int|float $connect_timeout = 0, - int|float $command_timeout = 0, - bool $persistent = false, - #[\SensitiveParameter] mixed $auth = null, - ?array $context = null, - ) { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function close(): bool - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function listen(?callable $callback): bool - { - return $this->initializeLazyObject()->listen(...\func_get_args()); - } - - public function onFlushed(?callable $callback): bool - { - return $this->initializeLazyObject()->onFlushed(...\func_get_args()); - } - - public function onInvalidated(?callable $callback, ?string $pattern = null): bool - { - return $this->initializeLazyObject()->onInvalidated(...\func_get_args()); - } - - public function dispatchEvents(): false|int - { - return $this->initializeLazyObject()->dispatchEvents(...\func_get_args()); - } - - public function dump(mixed $key): Cluster|string|false - { - return $this->initializeLazyObject()->dump(...\func_get_args()); - } - - public function getOption(int $option): mixed - { - return $this->initializeLazyObject()->getOption(...\func_get_args()); - } - - public function setOption(int $option, mixed $value): bool - { - return $this->initializeLazyObject()->setOption(...\func_get_args()); - } - - public function getTransferredBytes(): array|false - { - return $this->initializeLazyObject()->getTransferredBytes(...\func_get_args()); - } - - public function getrange(mixed $key, int $start, int $end): Cluster|string|false - { - return $this->initializeLazyObject()->getrange(...\func_get_args()); - } - - public function addIgnorePatterns(string ...$pattern): int - { - return $this->initializeLazyObject()->addIgnorePatterns(...\func_get_args()); - } - - public function addAllowPatterns(string ...$pattern): int - { - return $this->initializeLazyObject()->addAllowPatterns(...\func_get_args()); - } - - public function _serialize(mixed $value): string - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize(string $value): mixed - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _compress(string $value): string - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress(string $value): string - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function _pack(mixed $value): string - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack(string $value): mixed - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function _prefix(mixed $value): string - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function getLastError(): ?string - { - return $this->initializeLazyObject()->getLastError(...\func_get_args()); - } - - public function clearLastError(): bool - { - return $this->initializeLazyObject()->clearLastError(...\func_get_args()); - } - - public function clearTransferredBytes(): bool - { - return $this->initializeLazyObject()->clearTransferredBytes(...\func_get_args()); - } - - public function endpointId(): array|false - { - return $this->initializeLazyObject()->endpointId(...\func_get_args()); - } - - public function rawCommand(array|string $key_or_address, string $cmd, mixed ...$args): mixed - { - return $this->initializeLazyObject()->rawCommand(...\func_get_args()); - } - - public function cluster(array|string $key_or_address, string $operation, mixed ...$args): mixed - { - return $this->initializeLazyObject()->cluster(...\func_get_args()); - } - - public function info(array|string $key_or_address, string ...$sections): Cluster|array|false - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function flushdb(array|string $key_or_address, ?bool $sync = null): Cluster|bool - { - return $this->initializeLazyObject()->flushdb(...\func_get_args()); - } - - public function flushall(array|string $key_or_address, ?bool $sync = null): Cluster|bool - { - return $this->initializeLazyObject()->flushall(...\func_get_args()); - } - - public function dbsize(array|string $key_or_address): Cluster|int|false - { - return $this->initializeLazyObject()->dbsize(...\func_get_args()); - } - - public function waitaof(array|string $key_or_address, int $numlocal, int $numremote, int $timeout): Relay|array|false - { - return $this->initializeLazyObject()->waitaof(...\func_get_args()); - } - - public function restore(mixed $key, int $ttl, string $value, ?array $options = null): Cluster|bool - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function echo(array|string $key_or_address, string $message): Cluster|string|false - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function ping(array|string $key_or_address, ?string $message = null): Cluster|bool|string - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function idleTime(): int - { - return $this->initializeLazyObject()->idleTime(...\func_get_args()); - } - - public function randomkey(array|string $key_or_address): Cluster|bool|string - { - return $this->initializeLazyObject()->randomkey(...\func_get_args()); - } - - public function time(array|string $key_or_address): Cluster|array|false - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function bgrewriteaof(array|string $key_or_address): Cluster|bool - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function lastsave(array|string $key_or_address): Cluster|false|int - { - return $this->initializeLazyObject()->lastsave(...\func_get_args()); - } - - public function lcs(mixed $key1, mixed $key2, ?array $options = null): mixed - { - return $this->initializeLazyObject()->lcs(...\func_get_args()); - } - - public function bgsave(array|string $key_or_address, bool $schedule = false): Cluster|bool - { - return $this->initializeLazyObject()->bgsave(...\func_get_args()); - } - - public function save(array|string $key_or_address): Cluster|bool - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function role(array|string $key_or_address): Cluster|array|false - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function ttl(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function pttl(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function exists(mixed ...$keys): Cluster|bool|int - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function eval(mixed $script, array $args = [], int $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function eval_ro(mixed $script, array $args = [], int $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval_ro(...\func_get_args()); - } - - public function evalsha(string $sha, array $args = [], int $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function evalsha_ro(string $sha, array $args = [], int $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); - } - - public function client(array|string $key_or_address, string $operation, mixed ...$args): mixed - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function geoadd(mixed $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options): Cluster|false|int - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geodist(mixed $key, string $src, string $dst, ?string $unit = null): Cluster|float|false - { - return $this->initializeLazyObject()->geodist(...\func_get_args()); - } - - public function geohash(mixed $key, string $member, string ...$other_members): Cluster|array|false - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function georadius(mixed $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadiusbymember(mixed $key, string $member, float $radius, string $unit, array $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro(mixed $key, string $member, float $radius, string $unit, array $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function georadius_ro(mixed $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function geosearchstore(mixed $dstkey, mixed $srckey, array|string $position, array|int|float $shape, string $unit, array $options = []): Cluster|false|int - { - return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); - } - - public function geosearch(mixed $key, array|string $position, array|int|float $shape, string $unit, array $options = []): Cluster|array|false - { - return $this->initializeLazyObject()->geosearch(...\func_get_args()); - } - - public function get(mixed $key): mixed - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getset(mixed $key, mixed $value): mixed - { - return $this->initializeLazyObject()->getset(...\func_get_args()); - } - - public function setrange(mixed $key, int $start, mixed $value): Cluster|false|int - { - return $this->initializeLazyObject()->setrange(...\func_get_args()); - } - - public function getbit(mixed $key, int $pos): Cluster|false|int - { - return $this->initializeLazyObject()->getbit(...\func_get_args()); - } - - public function bitcount(mixed $key, int $start = 0, int $end = -1, bool $by_bit = false): Cluster|false|int - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function config(array|string $key_or_address, string $operation, mixed ...$args): mixed - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function command(mixed ...$args): Cluster|array|false|int - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function bitop(string $operation, string $dstkey, string $srckey, string ...$other_keys): Cluster|false|int - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos(mixed $key, int $bit, ?int $start = null, ?int $end = null, bool $by_bit = false): Cluster|false|int - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function blmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos, float $timeout): Cluster|string|false|null - { - return $this->initializeLazyObject()->blmove(...\func_get_args()); - } - - public function lmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos): Cluster|string|false|null - { - return $this->initializeLazyObject()->lmove(...\func_get_args()); - } - - public function setbit(mixed $key, int $pos, int $value): Cluster|false|int - { - return $this->initializeLazyObject()->setbit(...\func_get_args()); - } - - public function acl(array|string $key_or_address, string $operation, string ...$args): mixed - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append(mixed $key, mixed $value): Cluster|false|int - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function set(mixed $key, mixed $value, mixed $options = null): Cluster|string|bool - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function getex(mixed $key, ?array $options = null): mixed - { - return $this->initializeLazyObject()->getex(...\func_get_args()); - } - - public function setex(mixed $key, int $seconds, mixed $value): Cluster|bool - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function pfadd(mixed $key, array $elements): Cluster|false|int - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfcount(mixed $key): Cluster|int|false - { - return $this->initializeLazyObject()->pfcount(...\func_get_args()); - } - - public function pfmerge(string $dstkey, array $srckeys): Cluster|bool - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function psetex(mixed $key, int $milliseconds, mixed $value): Cluster|bool - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function publish(string $channel, string $message): Cluster|false|int - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function pubsub(array|string $key_or_address, string $operation, mixed ...$args): mixed - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function setnx(mixed $key, mixed $value): Cluster|bool - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function mget(array $keys): Cluster|array|false - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function mset(array $kvals): Cluster|array|bool - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx(array $kvals): Cluster|array|bool - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function rename(mixed $key, mixed $newkey): Cluster|bool - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renamenx(mixed $key, mixed $newkey): Cluster|bool - { - return $this->initializeLazyObject()->renamenx(...\func_get_args()); - } - - public function del(mixed ...$keys): Cluster|bool|int - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function unlink(mixed ...$keys): Cluster|false|int - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function expire(mixed $key, int $seconds, ?string $mode = null): Cluster|bool - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function pexpire(mixed $key, int $milliseconds): Cluster|bool - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function expireat(mixed $key, int $timestamp): Cluster|bool - { - return $this->initializeLazyObject()->expireat(...\func_get_args()); - } - - public function expiretime(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->expiretime(...\func_get_args()); - } - - public function pexpireat(mixed $key, int $timestamp_ms): Cluster|bool - { - return $this->initializeLazyObject()->pexpireat(...\func_get_args()); - } - - public static function flushMemory(?string $endpointId = null, ?int $db = null): bool - { - return Cluster::flushMemory(...\func_get_args()); - } - - public function pexpiretime(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); - } - - public function persist(mixed $key): Cluster|bool - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function type(mixed $key): Cluster|bool|int|string - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function lrange(mixed $key, int $start, int $stop): Cluster|array|false - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lpush(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->lpush(...\func_get_args()); - } - - public function rpush(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->rpush(...\func_get_args()); - } - - public function lpushx(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->lpushx(...\func_get_args()); - } - - public function rpushx(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->rpushx(...\func_get_args()); - } - - public function lset(mixed $key, int $index, mixed $member): Cluster|bool - { - return $this->initializeLazyObject()->lset(...\func_get_args()); - } - - public function lpop(mixed $key, int $count = 1): mixed - { - return $this->initializeLazyObject()->lpop(...\func_get_args()); - } - - public function lpos(mixed $key, mixed $value, ?array $options = null): mixed - { - return $this->initializeLazyObject()->lpos(...\func_get_args()); - } - - public function rpop(mixed $key, int $count = 1): mixed - { - return $this->initializeLazyObject()->rpop(...\func_get_args()); - } - - public function rpoplpush(mixed $srckey, mixed $dstkey): mixed - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function brpoplpush(mixed $srckey, mixed $dstkey, float $timeout): mixed - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function blpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null - { - return $this->initializeLazyObject()->blpop(...\func_get_args()); - } - - public function blmpop(float $timeout, array $keys, string $from, int $count = 1): mixed - { - return $this->initializeLazyObject()->blmpop(...\func_get_args()); - } - - public function bzmpop(float $timeout, array $keys, string $from, int $count = 1): Cluster|array|false|null - { - return $this->initializeLazyObject()->bzmpop(...\func_get_args()); - } - - public function lmpop(array $keys, string $from, int $count = 1): mixed - { - return $this->initializeLazyObject()->lmpop(...\func_get_args()); - } - - public function zmpop(array $keys, string $from, int $count = 1): Cluster|array|false|null - { - return $this->initializeLazyObject()->zmpop(...\func_get_args()); - } - - public function brpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null - { - return $this->initializeLazyObject()->brpop(...\func_get_args()); - } - - public function bzpopmax(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null - { - return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); - } - - public function bzpopmin(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null - { - return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); - } - - public function object(string $op, mixed $key): mixed - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function geopos(mixed $key, mixed ...$members): Cluster|array|false - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function lrem(mixed $key, mixed $member, int $count = 0): Cluster|false|int - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function lindex(mixed $key, int $index): mixed - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function linsert(mixed $key, string $op, mixed $pivot, mixed $element): Cluster|false|int - { - return $this->initializeLazyObject()->linsert(...\func_get_args()); - } - - public function ltrim(mixed $key, int $start, int $end): Cluster|bool - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public static function maxMemory(): int - { - return Cluster::maxMemory(); - } - - public function hget(mixed $key, mixed $member): mixed - { - return $this->initializeLazyObject()->hget(...\func_get_args()); - } - - public function hstrlen(mixed $key, mixed $member): Cluster|false|int - { - return $this->initializeLazyObject()->hstrlen(...\func_get_args()); - } - - public function hgetall(mixed $key): Cluster|array|false - { - return $this->initializeLazyObject()->hgetall(...\func_get_args()); - } - - public function hkeys(mixed $key): Cluster|array|false - { - return $this->initializeLazyObject()->hkeys(...\func_get_args()); - } - - public function hvals(mixed $key): Cluster|array|false - { - return $this->initializeLazyObject()->hvals(...\func_get_args()); - } - - public function hmget(mixed $key, array $members): Cluster|array|false - { - return $this->initializeLazyObject()->hmget(...\func_get_args()); - } - - public function hmset(mixed $key, array $members): Cluster|bool - { - return $this->initializeLazyObject()->hmset(...\func_get_args()); - } - - public function hexists(mixed $key, mixed $member): Cluster|bool - { - return $this->initializeLazyObject()->hexists(...\func_get_args()); - } - - public function hrandfield(mixed $key, ?array $options = null): Cluster|array|string|false - { - return $this->initializeLazyObject()->hrandfield(...\func_get_args()); - } - - public function hsetnx(mixed $key, mixed $member, mixed $value): Cluster|bool - { - return $this->initializeLazyObject()->hsetnx(...\func_get_args()); - } - - public function hset(mixed $key, mixed ...$keys_and_vals): Cluster|int|false - { - return $this->initializeLazyObject()->hset(...\func_get_args()); - } - - public function hdel(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->hdel(...\func_get_args()); - } - - public function hincrby(mixed $key, mixed $member, int $value): Cluster|false|int - { - return $this->initializeLazyObject()->hincrby(...\func_get_args()); - } - - public function hincrbyfloat(mixed $key, mixed $member, float $value): Cluster|bool|float - { - return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); - } - - public function incr(mixed $key, int $by = 1): Cluster|false|int - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function decr(mixed $key, int $by = 1): Cluster|false|int - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function incrby(mixed $key, int $value): Cluster|false|int - { - return $this->initializeLazyObject()->incrby(...\func_get_args()); - } - - public function decrby(mixed $key, int $value): Cluster|false|int - { - return $this->initializeLazyObject()->decrby(...\func_get_args()); - } - - public function incrbyfloat(mixed $key, float $value): Cluster|false|float - { - return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); - } - - public function sdiff(mixed $key, mixed ...$other_keys): Cluster|array|false - { - return $this->initializeLazyObject()->sdiff(...\func_get_args()); - } - - public function sdiffstore(mixed $key, mixed ...$other_keys): Cluster|false|int - { - return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); - } - - public function sinter(mixed $key, mixed ...$other_keys): Cluster|array|false - { - return $this->initializeLazyObject()->sinter(...\func_get_args()); - } - - public function sintercard(array $keys, int $limit = -1): Cluster|false|int - { - return $this->initializeLazyObject()->sintercard(...\func_get_args()); - } - - public function sinterstore(mixed $key, mixed ...$other_keys): Cluster|false|int - { - return $this->initializeLazyObject()->sinterstore(...\func_get_args()); - } - - public function sunion(mixed $key, mixed ...$other_keys): Cluster|array|false - { - return $this->initializeLazyObject()->sunion(...\func_get_args()); - } - - public function sunionstore(mixed $key, mixed ...$other_keys): Cluster|false|int - { - return $this->initializeLazyObject()->sunionstore(...\func_get_args()); - } - - public function subscribe(array $channels, callable $callback): bool - { - return $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function unsubscribe(array $channels = []): bool - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function psubscribe(array $patterns, callable $callback): bool - { - return $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function punsubscribe(array $patterns = []): bool - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function ssubscribe(array $channels, callable $callback): bool - { - return $this->initializeLazyObject()->ssubscribe(...\func_get_args()); - } - - public function sunsubscribe(array $channels = []): bool - { - return $this->initializeLazyObject()->sunsubscribe(...\func_get_args()); - } - - public function touch(array|string $key_or_array, mixed ...$more_keys): Cluster|false|int - { - return $this->initializeLazyObject()->touch(...\func_get_args()); - } - - public function multi(int $mode = Relay::MULTI): Cluster|bool - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function exec(): array|false - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function watch(mixed $key, mixed ...$other_keys): Cluster|bool - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function unwatch(): Cluster|bool - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function discard(): bool - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function getMode(bool $masked = false): int - { - return $this->initializeLazyObject()->getMode(...\func_get_args()); - } - - public function scan(mixed &$iterator, array|string $key_or_address, mixed $match = null, int $count = 0, ?string $type = null): array|false - { - return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function hscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false - { - return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function sscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false - { - return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false - { - return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zscore(mixed $key, mixed $member): Cluster|float|false - { - return $this->initializeLazyObject()->zscore(...\func_get_args()); - } - - public function keys(mixed $pattern): Cluster|array|false - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function slowlog(array|string $key_or_address, string $operation, mixed ...$args): Cluster|array|bool|int - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function xadd(mixed $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false): Cluster|string|false - { - return $this->initializeLazyObject()->xadd(...\func_get_args()); - } - - public function smembers(mixed $key): Cluster|array|false - { - return $this->initializeLazyObject()->smembers(...\func_get_args()); - } - - public function sismember(mixed $key, mixed $member): Cluster|bool - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function smismember(mixed $key, mixed ...$members): Cluster|array|false - { - return $this->initializeLazyObject()->smismember(...\func_get_args()); - } - - public function srem(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sadd(mixed $key, mixed $member, mixed ...$members): Cluster|false|int - { - return $this->initializeLazyObject()->sadd(...\func_get_args()); - } - - public function sort(mixed $key, array $options = []): Cluster|array|false|int - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function sort_ro(mixed $key, array $options = []): Cluster|array|false|int - { - return $this->initializeLazyObject()->sort_ro(...\func_get_args()); - } - - public function smove(mixed $srckey, mixed $dstkey, mixed $member): Cluster|bool - { - return $this->initializeLazyObject()->smove(...\func_get_args()); - } - - public function spop(mixed $key, int $count = 1): mixed - { - return $this->initializeLazyObject()->spop(...\func_get_args()); - } - - public function srandmember(mixed $key, int $count = 1): mixed - { - return $this->initializeLazyObject()->srandmember(...\func_get_args()); - } - - public function scard(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script(array|string $key_or_address, string $operation, string ...$args): mixed - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function strlen(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function hlen(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->hlen(...\func_get_args()); - } - - public function llen(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->llen(...\func_get_args()); - } - - public function xack(mixed $key, string $group, array $ids): Cluster|false|int - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xclaim(mixed $key, string $group, string $consumer, int $min_idle, array $ids, array $options): Cluster|array|bool - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xautoclaim(mixed $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false): Cluster|array|bool - { - return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); - } - - public function xlen(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xgroup(string $operation, mixed $key = null, ?string $group = null, ?string $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2): mixed - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xdel(mixed $key, array $ids): Cluster|false|int - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xinfo(string $operation, ?string $arg1 = null, ?string $arg2 = null, int $count = -1): mixed - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xpending(mixed $key, string $group, ?string $start = null, ?string $end = null, int $count = -1, ?string $consumer = null, int $idle = 0): Cluster|array|false - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange(mixed $key, string $start, string $end, int $count = -1): Cluster|array|false - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xread(array $streams, int $count = -1, int $block = -1): Cluster|array|bool|null - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup(mixed $key, string $consumer, array $streams, int $count = 1, int $block = 1): Cluster|array|bool|null - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xrevrange(mixed $key, string $end, string $start, int $count = -1): Cluster|array|bool - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xtrim(mixed $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1): Cluster|false|int - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zadd(mixed $key, mixed ...$args): mixed - { - return $this->initializeLazyObject()->zadd(...\func_get_args()); - } - - public function zrandmember(mixed $key, ?array $options = null): mixed - { - return $this->initializeLazyObject()->zrandmember(...\func_get_args()); - } - - public function zrange(mixed $key, string $start, string $end, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zrange(...\func_get_args()); - } - - public function zrevrange(mixed $key, int $start, int $end, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zrevrange(...\func_get_args()); - } - - public function zrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); - } - - public function zrevrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); - } - - public function zrevrank(mixed $key, mixed $rank, bool $withscore = false): Cluster|array|int|false - { - return $this->initializeLazyObject()->zrevrank(...\func_get_args()); - } - - public function zrangestore(mixed $dstkey, mixed $srckey, mixed $start, mixed $end, mixed $options = null): Cluster|false|int - { - return $this->initializeLazyObject()->zrangestore(...\func_get_args()); - } - - public function zrank(mixed $key, mixed $rank, bool $withscore = false): Cluster|array|int|false - { - return $this->initializeLazyObject()->zrank(...\func_get_args()); - } - - public function zrangebylex(mixed $key, mixed $min, mixed $max, int $offset = -1, int $count = -1): Cluster|array|false - { - return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); - } - - public function zrevrangebylex(mixed $key, mixed $max, mixed $min, int $offset = -1, int $count = -1): Cluster|array|false - { - return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); - } - - public function zrem(mixed $key, mixed ...$args): Cluster|false|int - { - return $this->initializeLazyObject()->zrem(...\func_get_args()); - } - - public function zremrangebylex(mixed $key, mixed $min, mixed $max): Cluster|false|int - { - return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); - } - - public function zremrangebyrank(mixed $key, int $start, int $end): Cluster|false|int - { - return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); - } - - public function zremrangebyscore(mixed $key, mixed $min, mixed $max): Cluster|false|int - { - return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); - } - - public function zcard(mixed $key): Cluster|false|int - { - return $this->initializeLazyObject()->zcard(...\func_get_args()); - } - - public function zcount(mixed $key, mixed $min, mixed $max): Cluster|false|int - { - return $this->initializeLazyObject()->zcount(...\func_get_args()); - } - - public function zdiff(array $keys, ?array $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zdiff(...\func_get_args()); - } - - public function zdiffstore(mixed $dstkey, array $keys): Cluster|false|int - { - return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); - } - - public function zincrby(mixed $key, float $score, mixed $member): Cluster|false|float - { - return $this->initializeLazyObject()->zincrby(...\func_get_args()); - } - - public function zlexcount(mixed $key, mixed $min, mixed $max): Cluster|false|int - { - return $this->initializeLazyObject()->zlexcount(...\func_get_args()); - } - - public function zmscore(mixed $key, mixed ...$members): Cluster|array|false - { - return $this->initializeLazyObject()->zmscore(...\func_get_args()); - } - - public function zinter(array $keys, ?array $weights = null, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zinter(...\func_get_args()); - } - - public function zintercard(array $keys, int $limit = -1): Cluster|false|int - { - return $this->initializeLazyObject()->zintercard(...\func_get_args()); - } - - public function zinterstore(mixed $dstkey, array $keys, ?array $weights = null, mixed $options = null): Cluster|false|int - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zunion(array $keys, ?array $weights = null, mixed $options = null): Cluster|array|false - { - return $this->initializeLazyObject()->zunion(...\func_get_args()); - } - - public function zunionstore(mixed $dstkey, array $keys, ?array $weights = null, mixed $options = null): Cluster|false|int - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } - - public function zpopmin(mixed $key, int $count = 1): Cluster|array|false - { - return $this->initializeLazyObject()->zpopmin(...\func_get_args()); - } - - public function zpopmax(mixed $key, int $count = 1): Cluster|array|false - { - return $this->initializeLazyObject()->zpopmax(...\func_get_args()); - } - - public function _getKeys(): array|false - { - return $this->initializeLazyObject()->_getKeys(...\func_get_args()); - } - - public function _masters(): array - { - return $this->initializeLazyObject()->_masters(...\func_get_args()); - } - - public function copy(mixed $srckey, mixed $dstkey, ?array $options = null): Cluster|bool - { - return $this->initializeLazyObject()->copy(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/RelayProxy.php b/vendor/symfony/cache/Traits/RelayProxy.php deleted file mode 100644 index 43b89567..00000000 --- a/vendor/symfony/cache/Traits/RelayProxy.php +++ /dev/null @@ -1,1272 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Traits\Relay\BgsaveTrait; -use Symfony\Component\Cache\Traits\Relay\CopyTrait; -use Symfony\Component\Cache\Traits\Relay\FtTrait; -use Symfony\Component\Cache\Traits\Relay\GeosearchTrait; -use Symfony\Component\Cache\Traits\Relay\GetrangeTrait; -use Symfony\Component\Cache\Traits\Relay\GetWithMetaTrait; -use Symfony\Component\Cache\Traits\Relay\HsetTrait; -use Symfony\Component\Cache\Traits\Relay\IsTrackedTrait; -use Symfony\Component\Cache\Traits\Relay\MoveTrait; -use Symfony\Component\Cache\Traits\Relay\NullableReturnTrait; -use Symfony\Component\Cache\Traits\Relay\PfcountTrait; -use Symfony\Component\Cache\Traits\Relay\Relay11Trait; -use Symfony\Component\Cache\Traits\Relay\SwapdbTrait; -use Symfony\Component\VarExporter\LazyObjectInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class); -class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class); - -/** - * @internal - */ -class RelayProxy extends \Relay\Relay implements ResetInterface, LazyObjectInterface -{ - use BgsaveTrait; - use CopyTrait; - use FtTrait; - use GeosearchTrait; - use GetrangeTrait; - use GetWithMetaTrait; - use HsetTrait; - use IsTrackedTrait; - use MoveTrait; - use NullableReturnTrait; - use PfcountTrait; - use RedisProxyTrait { - resetLazyObject as reset; - } - use RelayProxyTrait; - use Relay11Trait; - use SwapdbTrait; - - public function __construct($host = null, $port = 6379, $connect_timeout = 0.0, $command_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0) - { - $this->initializeLazyObject()->__construct(...\func_get_args()); - } - - public function connect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool - { - return $this->initializeLazyObject()->connect(...\func_get_args()); - } - - public function pconnect($host, $port = 6379, $timeout = 0.0, $persistent_id = null, $retry_interval = 0, $read_timeout = 0.0, #[\SensitiveParameter] $context = [], $database = 0): bool - { - return $this->initializeLazyObject()->pconnect(...\func_get_args()); - } - - public function close(): bool - { - return $this->initializeLazyObject()->close(...\func_get_args()); - } - - public function pclose(): bool - { - return $this->initializeLazyObject()->pclose(...\func_get_args()); - } - - public function listen($callback): bool - { - return $this->initializeLazyObject()->listen(...\func_get_args()); - } - - public function onFlushed($callback): bool - { - return $this->initializeLazyObject()->onFlushed(...\func_get_args()); - } - - public function onInvalidated($callback, $pattern = null): bool - { - return $this->initializeLazyObject()->onInvalidated(...\func_get_args()); - } - - public function dispatchEvents(): false|int - { - return $this->initializeLazyObject()->dispatchEvents(...\func_get_args()); - } - - public function getOption($option): mixed - { - return $this->initializeLazyObject()->getOption(...\func_get_args()); - } - - public function option($option, $value = null): mixed - { - return $this->initializeLazyObject()->option(...\func_get_args()); - } - - public function setOption($option, $value): bool - { - return $this->initializeLazyObject()->setOption(...\func_get_args()); - } - - public function addIgnorePatterns(...$pattern): int - { - return $this->initializeLazyObject()->addIgnorePatterns(...\func_get_args()); - } - - public function addAllowPatterns(...$pattern): int - { - return $this->initializeLazyObject()->addAllowPatterns(...\func_get_args()); - } - - public function getTimeout(): false|float - { - return $this->initializeLazyObject()->getTimeout(...\func_get_args()); - } - - public function timeout(): false|float - { - return $this->initializeLazyObject()->timeout(...\func_get_args()); - } - - public function getReadTimeout(): false|float - { - return $this->initializeLazyObject()->getReadTimeout(...\func_get_args()); - } - - public function readTimeout(): false|float - { - return $this->initializeLazyObject()->readTimeout(...\func_get_args()); - } - - public function getBytes(): array - { - return $this->initializeLazyObject()->getBytes(...\func_get_args()); - } - - public function bytes(): array - { - return $this->initializeLazyObject()->bytes(...\func_get_args()); - } - - public function getHost(): false|string - { - return $this->initializeLazyObject()->getHost(...\func_get_args()); - } - - public function isConnected(): bool - { - return $this->initializeLazyObject()->isConnected(...\func_get_args()); - } - - public function getPort(): false|int - { - return $this->initializeLazyObject()->getPort(...\func_get_args()); - } - - public function getAuth(): mixed - { - return $this->initializeLazyObject()->getAuth(...\func_get_args()); - } - - public function getDbNum(): mixed - { - return $this->initializeLazyObject()->getDbNum(...\func_get_args()); - } - - public function _serialize($value): mixed - { - return $this->initializeLazyObject()->_serialize(...\func_get_args()); - } - - public function _unserialize($value): mixed - { - return $this->initializeLazyObject()->_unserialize(...\func_get_args()); - } - - public function _compress($value): string - { - return $this->initializeLazyObject()->_compress(...\func_get_args()); - } - - public function _uncompress($value): string - { - return $this->initializeLazyObject()->_uncompress(...\func_get_args()); - } - - public function _pack($value): string - { - return $this->initializeLazyObject()->_pack(...\func_get_args()); - } - - public function _unpack($value): mixed - { - return $this->initializeLazyObject()->_unpack(...\func_get_args()); - } - - public function _prefix($value): string - { - return $this->initializeLazyObject()->_prefix(...\func_get_args()); - } - - public function getLastError(): ?string - { - return $this->initializeLazyObject()->getLastError(...\func_get_args()); - } - - public function clearLastError(): bool - { - return $this->initializeLazyObject()->clearLastError(...\func_get_args()); - } - - public function endpointId(): false|string - { - return $this->initializeLazyObject()->endpointId(...\func_get_args()); - } - - public function getPersistentID(): false|string - { - return $this->initializeLazyObject()->getPersistentID(...\func_get_args()); - } - - public function socketId(): false|string - { - return $this->initializeLazyObject()->socketId(...\func_get_args()); - } - - public function rawCommand($cmd, ...$args): mixed - { - return $this->initializeLazyObject()->rawCommand(...\func_get_args()); - } - - public function select($db): \Relay\Relay|bool - { - return $this->initializeLazyObject()->select(...\func_get_args()); - } - - public function auth(#[\SensitiveParameter] $auth): bool - { - return $this->initializeLazyObject()->auth(...\func_get_args()); - } - - public function info(...$sections): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->info(...\func_get_args()); - } - - public function flushdb($sync = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->flushdb(...\func_get_args()); - } - - public function flushall($sync = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->flushall(...\func_get_args()); - } - - public function fcall($name, $keys = [], $argv = [], $handler = null): mixed - { - return $this->initializeLazyObject()->fcall(...\func_get_args()); - } - - public function fcall_ro($name, $keys = [], $argv = [], $handler = null): mixed - { - return $this->initializeLazyObject()->fcall_ro(...\func_get_args()); - } - - public function function($op, ...$args): mixed - { - return $this->initializeLazyObject()->function(...\func_get_args()); - } - - public function dbsize(): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->dbsize(...\func_get_args()); - } - - public function replicaof($host = null, $port = 0): \Relay\Relay|bool - { - return $this->initializeLazyObject()->replicaof(...\func_get_args()); - } - - public function waitaof($numlocal, $numremote, $timeout): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->waitaof(...\func_get_args()); - } - - public function restore($key, $ttl, $value, $options = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->restore(...\func_get_args()); - } - - public function migrate($host, $port, $key, $dstdb, $timeout, $copy = false, $replace = false, #[\SensitiveParameter] $credentials = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->migrate(...\func_get_args()); - } - - public function echo($arg): \Relay\Relay|bool|string - { - return $this->initializeLazyObject()->echo(...\func_get_args()); - } - - public function ping($arg = null): \Relay\Relay|bool|string - { - return $this->initializeLazyObject()->ping(...\func_get_args()); - } - - public function idleTime(): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->idleTime(...\func_get_args()); - } - - public function randomkey(): \Relay\Relay|bool|null|string - { - return $this->initializeLazyObject()->randomkey(...\func_get_args()); - } - - public function time(): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->time(...\func_get_args()); - } - - public function bgrewriteaof(): \Relay\Relay|bool - { - return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args()); - } - - public function lastsave(): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->lastsave(...\func_get_args()); - } - - public function lcs($key1, $key2, $options = null): mixed - { - return $this->initializeLazyObject()->lcs(...\func_get_args()); - } - - public function save(): \Relay\Relay|bool - { - return $this->initializeLazyObject()->save(...\func_get_args()); - } - - public function role(): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->role(...\func_get_args()); - } - - public function ttl($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->ttl(...\func_get_args()); - } - - public function pttl($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->pttl(...\func_get_args()); - } - - public function exists(...$keys): \Relay\Relay|bool|int - { - return $this->initializeLazyObject()->exists(...\func_get_args()); - } - - public function eval($script, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval(...\func_get_args()); - } - - public function eval_ro($script, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->eval_ro(...\func_get_args()); - } - - public function evalsha($sha, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha(...\func_get_args()); - } - - public function evalsha_ro($sha, $args = [], $num_keys = 0): mixed - { - return $this->initializeLazyObject()->evalsha_ro(...\func_get_args()); - } - - public function client($operation, ...$args): mixed - { - return $this->initializeLazyObject()->client(...\func_get_args()); - } - - public function geoadd($key, $lng, $lat, $member, ...$other_triples_and_options): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->geoadd(...\func_get_args()); - } - - public function geohash($key, $member, ...$other_members): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->geohash(...\func_get_args()); - } - - public function georadius($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius(...\func_get_args()); - } - - public function georadiusbymember($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember(...\func_get_args()); - } - - public function georadiusbymember_ro($key, $member, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args()); - } - - public function georadius_ro($key, $lng, $lat, $radius, $unit, $options = []): mixed - { - return $this->initializeLazyObject()->georadius_ro(...\func_get_args()); - } - - public function geosearchstore($dst, $src, $position, $shape, $unit, $options = []): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->geosearchstore(...\func_get_args()); - } - - public function get($key): mixed - { - return $this->initializeLazyObject()->get(...\func_get_args()); - } - - public function getset($key, $value): mixed - { - return $this->initializeLazyObject()->getset(...\func_get_args()); - } - - public function setrange($key, $start, $value): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->setrange(...\func_get_args()); - } - - public function getbit($key, $pos): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->getbit(...\func_get_args()); - } - - public function bitcount($key, $start = 0, $end = -1, $by_bit = false): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->bitcount(...\func_get_args()); - } - - public function bitfield($key, ...$args): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->bitfield(...\func_get_args()); - } - - public function config($operation, $key = null, $value = null): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->config(...\func_get_args()); - } - - public function command(...$args): \Relay\Relay|array|false|int - { - return $this->initializeLazyObject()->command(...\func_get_args()); - } - - public function bitop($operation, $dstkey, $srckey, ...$other_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->bitop(...\func_get_args()); - } - - public function bitpos($key, $bit, $start = null, $end = null, $bybit = false): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->bitpos(...\func_get_args()); - } - - public function setbit($key, $pos, $val): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->setbit(...\func_get_args()); - } - - public function acl($cmd, ...$args): mixed - { - return $this->initializeLazyObject()->acl(...\func_get_args()); - } - - public function append($key, $value): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->append(...\func_get_args()); - } - - public function set($key, $value, $options = null): mixed - { - return $this->initializeLazyObject()->set(...\func_get_args()); - } - - public function getex($key, $options = null): mixed - { - return $this->initializeLazyObject()->getex(...\func_get_args()); - } - - public function getdel($key): mixed - { - return $this->initializeLazyObject()->getdel(...\func_get_args()); - } - - public function setex($key, $seconds, $value): \Relay\Relay|bool - { - return $this->initializeLazyObject()->setex(...\func_get_args()); - } - - public function pfadd($key, $elements): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->pfadd(...\func_get_args()); - } - - public function pfmerge($dst, $srckeys): \Relay\Relay|bool - { - return $this->initializeLazyObject()->pfmerge(...\func_get_args()); - } - - public function psetex($key, $milliseconds, $value): \Relay\Relay|bool - { - return $this->initializeLazyObject()->psetex(...\func_get_args()); - } - - public function publish($channel, $message): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->publish(...\func_get_args()); - } - - public function pubsub($operation, ...$args): mixed - { - return $this->initializeLazyObject()->pubsub(...\func_get_args()); - } - - public function spublish($channel, $message): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->spublish(...\func_get_args()); - } - - public function setnx($key, $value): \Relay\Relay|bool - { - return $this->initializeLazyObject()->setnx(...\func_get_args()); - } - - public function mget($keys): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->mget(...\func_get_args()); - } - - public function move($key, $db): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->move(...\func_get_args()); - } - - public function mset($kvals): \Relay\Relay|bool - { - return $this->initializeLazyObject()->mset(...\func_get_args()); - } - - public function msetnx($kvals): \Relay\Relay|bool - { - return $this->initializeLazyObject()->msetnx(...\func_get_args()); - } - - public function rename($key, $newkey): \Relay\Relay|bool - { - return $this->initializeLazyObject()->rename(...\func_get_args()); - } - - public function renamenx($key, $newkey): \Relay\Relay|bool - { - return $this->initializeLazyObject()->renamenx(...\func_get_args()); - } - - public function del(...$keys): \Relay\Relay|bool|int - { - return $this->initializeLazyObject()->del(...\func_get_args()); - } - - public function unlink(...$keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->unlink(...\func_get_args()); - } - - public function expire($key, $seconds, $mode = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->expire(...\func_get_args()); - } - - public function pexpire($key, $milliseconds): \Relay\Relay|bool - { - return $this->initializeLazyObject()->pexpire(...\func_get_args()); - } - - public function expireat($key, $timestamp): \Relay\Relay|bool - { - return $this->initializeLazyObject()->expireat(...\func_get_args()); - } - - public function expiretime($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->expiretime(...\func_get_args()); - } - - public function pexpireat($key, $timestamp_ms): \Relay\Relay|bool - { - return $this->initializeLazyObject()->pexpireat(...\func_get_args()); - } - - public function pexpiretime($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->pexpiretime(...\func_get_args()); - } - - public function persist($key): \Relay\Relay|bool - { - return $this->initializeLazyObject()->persist(...\func_get_args()); - } - - public function type($key): \Relay\Relay|bool|int|string - { - return $this->initializeLazyObject()->type(...\func_get_args()); - } - - public function lrange($key, $start, $stop): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->lrange(...\func_get_args()); - } - - public function lpush($key, $mem, ...$mems): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->lpush(...\func_get_args()); - } - - public function rpush($key, $mem, ...$mems): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->rpush(...\func_get_args()); - } - - public function lpushx($key, $mem, ...$mems): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->lpushx(...\func_get_args()); - } - - public function rpushx($key, $mem, ...$mems): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->rpushx(...\func_get_args()); - } - - public function lset($key, $index, $mem): \Relay\Relay|bool - { - return $this->initializeLazyObject()->lset(...\func_get_args()); - } - - public function lpop($key, $count = 1): mixed - { - return $this->initializeLazyObject()->lpop(...\func_get_args()); - } - - public function lpos($key, $value, $options = null): \Relay\Relay|array|false|int|null - { - return $this->initializeLazyObject()->lpos(...\func_get_args()); - } - - public function rpop($key, $count = 1): mixed - { - return $this->initializeLazyObject()->rpop(...\func_get_args()); - } - - public function rpoplpush($source, $dest): mixed - { - return $this->initializeLazyObject()->rpoplpush(...\func_get_args()); - } - - public function brpoplpush($source, $dest, $timeout): mixed - { - return $this->initializeLazyObject()->brpoplpush(...\func_get_args()); - } - - public function blpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->blpop(...\func_get_args()); - } - - public function blmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->blmpop(...\func_get_args()); - } - - public function bzmpop($timeout, $keys, $from, $count = 1): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->bzmpop(...\func_get_args()); - } - - public function lmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->lmpop(...\func_get_args()); - } - - public function zmpop($keys, $from, $count = 1): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->zmpop(...\func_get_args()); - } - - public function brpop($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->brpop(...\func_get_args()); - } - - public function bzpopmax($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->bzpopmax(...\func_get_args()); - } - - public function bzpopmin($key, $timeout_or_key, ...$extra_args): \Relay\Relay|array|false|null - { - return $this->initializeLazyObject()->bzpopmin(...\func_get_args()); - } - - public function object($op, $key): mixed - { - return $this->initializeLazyObject()->object(...\func_get_args()); - } - - public function geopos($key, ...$members): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->geopos(...\func_get_args()); - } - - public function lrem($key, $mem, $count = 0): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->lrem(...\func_get_args()); - } - - public function lindex($key, $index): mixed - { - return $this->initializeLazyObject()->lindex(...\func_get_args()); - } - - public function linsert($key, $op, $pivot, $element): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->linsert(...\func_get_args()); - } - - public function ltrim($key, $start, $end): \Relay\Relay|bool - { - return $this->initializeLazyObject()->ltrim(...\func_get_args()); - } - - public function hget($hash, $member): mixed - { - return $this->initializeLazyObject()->hget(...\func_get_args()); - } - - public function hstrlen($hash, $member): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hstrlen(...\func_get_args()); - } - - public function hgetall($hash): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hgetall(...\func_get_args()); - } - - public function hkeys($hash): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hkeys(...\func_get_args()); - } - - public function hvals($hash): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hvals(...\func_get_args()); - } - - public function hmget($hash, $members): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->hmget(...\func_get_args()); - } - - public function hmset($hash, $members): \Relay\Relay|bool - { - return $this->initializeLazyObject()->hmset(...\func_get_args()); - } - - public function hexists($hash, $member): \Relay\Relay|bool - { - return $this->initializeLazyObject()->hexists(...\func_get_args()); - } - - public function hsetnx($hash, $member, $value): \Relay\Relay|bool - { - return $this->initializeLazyObject()->hsetnx(...\func_get_args()); - } - - public function hdel($key, $mem, ...$mems): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hdel(...\func_get_args()); - } - - public function hincrby($key, $mem, $value): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hincrby(...\func_get_args()); - } - - public function hincrbyfloat($key, $mem, $value): \Relay\Relay|bool|float - { - return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args()); - } - - public function incr($key, $by = 1): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->incr(...\func_get_args()); - } - - public function decr($key, $by = 1): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->decr(...\func_get_args()); - } - - public function incrby($key, $value): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->incrby(...\func_get_args()); - } - - public function decrby($key, $value): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->decrby(...\func_get_args()); - } - - public function incrbyfloat($key, $value): \Relay\Relay|false|float - { - return $this->initializeLazyObject()->incrbyfloat(...\func_get_args()); - } - - public function sdiff($key, ...$other_keys): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->sdiff(...\func_get_args()); - } - - public function sdiffstore($key, ...$other_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->sdiffstore(...\func_get_args()); - } - - public function sinter($key, ...$other_keys): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->sinter(...\func_get_args()); - } - - public function sintercard($keys, $limit = -1): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->sintercard(...\func_get_args()); - } - - public function sinterstore($key, ...$other_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->sinterstore(...\func_get_args()); - } - - public function sunion($key, ...$other_keys): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->sunion(...\func_get_args()); - } - - public function sunionstore($key, ...$other_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->sunionstore(...\func_get_args()); - } - - public function subscribe($channels, $callback): bool - { - return $this->initializeLazyObject()->subscribe(...\func_get_args()); - } - - public function unsubscribe($channels = []): bool - { - return $this->initializeLazyObject()->unsubscribe(...\func_get_args()); - } - - public function psubscribe($patterns, $callback): bool - { - return $this->initializeLazyObject()->psubscribe(...\func_get_args()); - } - - public function punsubscribe($patterns = []): bool - { - return $this->initializeLazyObject()->punsubscribe(...\func_get_args()); - } - - public function ssubscribe($channels, $callback): bool - { - return $this->initializeLazyObject()->ssubscribe(...\func_get_args()); - } - - public function sunsubscribe($channels = []): bool - { - return $this->initializeLazyObject()->sunsubscribe(...\func_get_args()); - } - - public function touch($key_or_array, ...$more_keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->touch(...\func_get_args()); - } - - public function pipeline(): \Relay\Relay|bool - { - return $this->initializeLazyObject()->pipeline(...\func_get_args()); - } - - public function multi($mode = 0): \Relay\Relay|bool - { - return $this->initializeLazyObject()->multi(...\func_get_args()); - } - - public function exec(): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->exec(...\func_get_args()); - } - - public function wait($replicas, $timeout): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->wait(...\func_get_args()); - } - - public function watch($key, ...$other_keys): \Relay\Relay|bool - { - return $this->initializeLazyObject()->watch(...\func_get_args()); - } - - public function unwatch(): \Relay\Relay|bool - { - return $this->initializeLazyObject()->unwatch(...\func_get_args()); - } - - public function discard(): bool - { - return $this->initializeLazyObject()->discard(...\func_get_args()); - } - - public function getMode($masked = false): int - { - return $this->initializeLazyObject()->getMode(...\func_get_args()); - } - - public function clearBytes(): void - { - $this->initializeLazyObject()->clearBytes(...\func_get_args()); - } - - public function scan(&$iterator, $match = null, $count = 0, $type = null): array|false - { - return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1)); - } - - public function hscan($key, &$iterator, $match = null, $count = 0): array|false - { - return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function sscan($key, &$iterator, $match = null, $count = 0): array|false - { - return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function zscan($key, &$iterator, $match = null, $count = 0): array|false - { - return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2)); - } - - public function keys($pattern): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->keys(...\func_get_args()); - } - - public function slowlog($operation, ...$extra_args): \Relay\Relay|array|bool|int - { - return $this->initializeLazyObject()->slowlog(...\func_get_args()); - } - - public function smembers($set): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->smembers(...\func_get_args()); - } - - public function sismember($set, $member): \Relay\Relay|bool - { - return $this->initializeLazyObject()->sismember(...\func_get_args()); - } - - public function smismember($set, ...$members): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->smismember(...\func_get_args()); - } - - public function srem($set, $member, ...$members): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->srem(...\func_get_args()); - } - - public function sadd($set, $member, ...$members): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->sadd(...\func_get_args()); - } - - public function sort($key, $options = []): \Relay\Relay|array|false|int - { - return $this->initializeLazyObject()->sort(...\func_get_args()); - } - - public function sort_ro($key, $options = []): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->sort_ro(...\func_get_args()); - } - - public function smove($srcset, $dstset, $member): \Relay\Relay|bool - { - return $this->initializeLazyObject()->smove(...\func_get_args()); - } - - public function spop($set, $count = 1): mixed - { - return $this->initializeLazyObject()->spop(...\func_get_args()); - } - - public function srandmember($set, $count = 1): mixed - { - return $this->initializeLazyObject()->srandmember(...\func_get_args()); - } - - public function scard($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->scard(...\func_get_args()); - } - - public function script($command, ...$args): mixed - { - return $this->initializeLazyObject()->script(...\func_get_args()); - } - - public function strlen($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->strlen(...\func_get_args()); - } - - public function hlen($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->hlen(...\func_get_args()); - } - - public function llen($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->llen(...\func_get_args()); - } - - public function xack($key, $group, $ids): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->xack(...\func_get_args()); - } - - public function xclaim($key, $group, $consumer, $min_idle, $ids, $options): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->xclaim(...\func_get_args()); - } - - public function xautoclaim($key, $group, $consumer, $min_idle, $start, $count = -1, $justid = false): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->xautoclaim(...\func_get_args()); - } - - public function xlen($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->xlen(...\func_get_args()); - } - - public function xgroup($operation, $key = null, $group = null, $id_or_consumer = null, $mkstream = false, $entries_read = -2): mixed - { - return $this->initializeLazyObject()->xgroup(...\func_get_args()); - } - - public function xdel($key, $ids): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->xdel(...\func_get_args()); - } - - public function xinfo($operation, $arg1 = null, $arg2 = null, $count = -1): mixed - { - return $this->initializeLazyObject()->xinfo(...\func_get_args()); - } - - public function xpending($key, $group, $start = null, $end = null, $count = -1, $consumer = null, $idle = 0): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->xpending(...\func_get_args()); - } - - public function xrange($key, $start, $end, $count = -1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->xrange(...\func_get_args()); - } - - public function xrevrange($key, $end, $start, $count = -1): \Relay\Relay|array|bool - { - return $this->initializeLazyObject()->xrevrange(...\func_get_args()); - } - - public function xread($streams, $count = -1, $block = -1): \Relay\Relay|array|bool|null - { - return $this->initializeLazyObject()->xread(...\func_get_args()); - } - - public function xreadgroup($group, $consumer, $streams, $count = 1, $block = 1): \Relay\Relay|array|bool|null - { - return $this->initializeLazyObject()->xreadgroup(...\func_get_args()); - } - - public function xtrim($key, $threshold, $approx = false, $minid = false, $limit = -1): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->xtrim(...\func_get_args()); - } - - public function zadd($key, ...$args): mixed - { - return $this->initializeLazyObject()->zadd(...\func_get_args()); - } - - public function zrandmember($key, $options = null): mixed - { - return $this->initializeLazyObject()->zrandmember(...\func_get_args()); - } - - public function zrange($key, $start, $end, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrange(...\func_get_args()); - } - - public function zrevrange($key, $start, $end, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrevrange(...\func_get_args()); - } - - public function zrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrangebyscore(...\func_get_args()); - } - - public function zrevrangebyscore($key, $start, $end, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args()); - } - - public function zrangestore($dst, $src, $start, $end, $options = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zrangestore(...\func_get_args()); - } - - public function zrangebylex($key, $min, $max, $offset = -1, $count = -1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrangebylex(...\func_get_args()); - } - - public function zrevrangebylex($key, $max, $min, $offset = -1, $count = -1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args()); - } - - public function zrem($key, ...$args): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zrem(...\func_get_args()); - } - - public function zremrangebylex($key, $min, $max): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zremrangebylex(...\func_get_args()); - } - - public function zremrangebyrank($key, $start, $end): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args()); - } - - public function zremrangebyscore($key, $min, $max): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args()); - } - - public function zcard($key): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zcard(...\func_get_args()); - } - - public function zcount($key, $min, $max): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zcount(...\func_get_args()); - } - - public function zdiff($keys, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zdiff(...\func_get_args()); - } - - public function zdiffstore($dst, $keys): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zdiffstore(...\func_get_args()); - } - - public function zincrby($key, $score, $mem): \Relay\Relay|false|float - { - return $this->initializeLazyObject()->zincrby(...\func_get_args()); - } - - public function zlexcount($key, $min, $max): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zlexcount(...\func_get_args()); - } - - public function zmscore($key, ...$mems): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zmscore(...\func_get_args()); - } - - public function zinter($keys, $weights = null, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zinter(...\func_get_args()); - } - - public function zintercard($keys, $limit = -1): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zintercard(...\func_get_args()); - } - - public function zinterstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zinterstore(...\func_get_args()); - } - - public function zunion($keys, $weights = null, $options = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zunion(...\func_get_args()); - } - - public function zunionstore($dst, $keys, $weights = null, $options = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->zunionstore(...\func_get_args()); - } - - public function zpopmin($key, $count = 1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zpopmin(...\func_get_args()); - } - - public function zpopmax($key, $count = 1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->zpopmax(...\func_get_args()); - } - - public function _getKeys() - { - return $this->initializeLazyObject()->_getKeys(...\func_get_args()); - } -} diff --git a/vendor/symfony/cache/Traits/RelayProxyTrait.php b/vendor/symfony/cache/Traits/RelayProxyTrait.php deleted file mode 100644 index 6077b44f..00000000 --- a/vendor/symfony/cache/Traits/RelayProxyTrait.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -if (version_compare(phpversion('relay'), '0.8.1', '>=')) { - /** - * @internal - */ - trait RelayProxyTrait - { - public function jsonArrAppend($key, $value_or_array, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrAppend(...\func_get_args()); - } - - public function jsonArrIndex($key, $path, $value, $start = 0, $stop = -1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrIndex(...\func_get_args()); - } - - public function jsonArrInsert($key, $path, $index, $value, ...$other_values): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrInsert(...\func_get_args()); - } - - public function jsonArrLen($key, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrLen(...\func_get_args()); - } - - public function jsonArrPop($key, $path = null, $index = -1): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrPop(...\func_get_args()); - } - - public function jsonArrTrim($key, $path, $start, $stop): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonArrTrim(...\func_get_args()); - } - - public function jsonClear($key, $path = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->jsonClear(...\func_get_args()); - } - - public function jsonDebug($command, $key, $path = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->jsonDebug(...\func_get_args()); - } - - public function jsonDel($key, $path = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->jsonDel(...\func_get_args()); - } - - public function jsonForget($key, $path = null): \Relay\Relay|false|int - { - return $this->initializeLazyObject()->jsonForget(...\func_get_args()); - } - - public function jsonGet($key, $options = [], ...$paths): mixed - { - return $this->initializeLazyObject()->jsonGet(...\func_get_args()); - } - - public function jsonMerge($key, $path, $value): \Relay\Relay|bool - { - return $this->initializeLazyObject()->jsonMerge(...\func_get_args()); - } - - public function jsonMget($key_or_array, $path): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonMget(...\func_get_args()); - } - - public function jsonMset($key, $path, $value, ...$other_triples): \Relay\Relay|bool - { - return $this->initializeLazyObject()->jsonMset(...\func_get_args()); - } - - public function jsonNumIncrBy($key, $path, $value): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonNumIncrBy(...\func_get_args()); - } - - public function jsonNumMultBy($key, $path, $value): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonNumMultBy(...\func_get_args()); - } - - public function jsonObjKeys($key, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonObjKeys(...\func_get_args()); - } - - public function jsonObjLen($key, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonObjLen(...\func_get_args()); - } - - public function jsonResp($key, $path = null): \Relay\Relay|array|false|int|string - { - return $this->initializeLazyObject()->jsonResp(...\func_get_args()); - } - - public function jsonSet($key, $path, $value, $condition = null): \Relay\Relay|bool - { - return $this->initializeLazyObject()->jsonSet(...\func_get_args()); - } - - public function jsonStrAppend($key, $value, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonStrAppend(...\func_get_args()); - } - - public function jsonStrLen($key, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonStrLen(...\func_get_args()); - } - - public function jsonToggle($key, $path): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonToggle(...\func_get_args()); - } - - public function jsonType($key, $path = null): \Relay\Relay|array|false - { - return $this->initializeLazyObject()->jsonType(...\func_get_args()); - } - } -} else { - /** - * @internal - */ - trait RelayProxyTrait - { - } -} diff --git a/vendor/symfony/cache/Traits/ValueWrapper.php b/vendor/symfony/cache/Traits/ValueWrapper.php deleted file mode 100644 index 718a23d3..00000000 --- a/vendor/symfony/cache/Traits/ValueWrapper.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * A short namespace-less class to serialize items with metadata. - * - * @author Nicolas Grekas - * - * @internal - */ -class -{ - private const EXPIRY_OFFSET = 1648206727; - private const INT32_MAX = 2147483647; - - public readonly mixed $value; - public readonly array $metadata; - - public function __construct(mixed $value, array $metadata) - { - $this->value = $value; - $this->metadata = $metadata; - } - - public function __serialize(): array - { - // pack 31-bits ctime into 14bits - $c = $this->metadata['ctime'] ?? 0; - $c = match (true) { - $c > self::INT32_MAX - 2 => self::INT32_MAX, - $c > 0 => 1 + $c, - default => 1, - }; - $e = 0; - while (!(0x40000000 & $c)) { - $c <<= 1; - ++$e; - } - $c = (0x7FE0 & ($c >> 16)) | $e; - - $pack = pack('Vn', (int) (0.1 + ($this->metadata['expiry'] ?: self::INT32_MAX + self::EXPIRY_OFFSET) - self::EXPIRY_OFFSET), $c); - - if (isset($this->metadata['tags'])) { - $pack[4] = $pack[4] | "\x80"; - } - - return [$pack => $this->value] + ($this->metadata['tags'] ?? []); - } - - public function __unserialize(array $data): void - { - $pack = array_key_first($data); - $this->value = $data[$pack]; - - if ($hasTags = "\x80" === ($pack[4] & "\x80")) { - unset($data[$pack]); - $pack[4] = $pack[4] & "\x7F"; - } - - $metadata = unpack('Vexpiry/nctime', $pack); - $metadata['expiry'] += self::EXPIRY_OFFSET; - - if (!$metadata['ctime'] = ((0x4000 | $metadata['ctime']) << 16 >> (0x1F & $metadata['ctime'])) - 1) { - unset($metadata['ctime']); - } - - if ($hasTags) { - $metadata['tags'] = $data; - } - - $this->metadata = $metadata; - } -} diff --git a/vendor/symfony/cache/composer.json b/vendor/symfony/cache/composer.json deleted file mode 100644 index c89d6672..00000000 --- a/vendor/symfony/cache/composer.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "symfony/cache", - "type": "library", - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "keywords": ["caching", "psr6"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "provide": { - "psr/cache-implementation": "2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0", - "symfony/cache-implementation": "1.1|2.0|3.0" - }, - "require": { - "php": ">=8.2", - "psr/cache": "^2.0|^3.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^3.6", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.4|^7.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/filesystem": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/dependency-injection": "<6.4", - "symfony/http-kernel": "<6.4", - "symfony/var-dumper": "<6.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Cache\\": "" }, - "classmap": [ - "Traits/ValueWrapper.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/config/Builder/ClassBuilder.php b/vendor/symfony/config/Builder/ClassBuilder.php deleted file mode 100644 index 5ae8bda1..00000000 --- a/vendor/symfony/config/Builder/ClassBuilder.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Build PHP classes to generate config. - * - * @internal - * - * @author Tobias Nyholm - */ -class ClassBuilder -{ - private string $name; - - /** @var Property[] */ - private array $properties = []; - - /** @var Method[] */ - private array $methods = []; - private array $require = []; - private array $use = []; - private array $implements = []; - private bool $allowExtraKeys = false; - - public function __construct( - private string $namespace, - string $name, - ) { - $this->name = ucfirst($this->camelCase($name)).'Config'; - } - - public function getDirectory(): string - { - return str_replace('\\', \DIRECTORY_SEPARATOR, $this->namespace); - } - - public function getFilename(): string - { - return $this->name.'.php'; - } - - public function build(): string - { - $rootPath = explode(\DIRECTORY_SEPARATOR, $this->getDirectory()); - $require = ''; - foreach ($this->require as $class) { - // figure out relative path. - $path = explode(\DIRECTORY_SEPARATOR, $class->getDirectory()); - $path[] = $class->getFilename(); - foreach ($rootPath as $key => $value) { - if ($path[$key] !== $value) { - break; - } - unset($path[$key]); - } - $require .= \sprintf('require_once __DIR__.\DIRECTORY_SEPARATOR.\'%s\';', implode('\'.\DIRECTORY_SEPARATOR.\'', $path))."\n"; - } - $use = $require ? "\n" : ''; - foreach (array_keys($this->use) as $statement) { - $use .= \sprintf('use %s;', $statement)."\n"; - } - - $implements = [] === $this->implements ? '' : 'implements '.implode(', ', $this->implements); - $body = ''; - foreach ($this->properties as $property) { - $body .= ' '.$property->getContent()."\n"; - } - foreach ($this->methods as $method) { - $lines = explode("\n", $method->getContent()); - foreach ($lines as $line) { - $body .= ($line ? ' '.$line : '')."\n"; - } - } - - return strtr(' $this->namespace, 'REQUIRE' => $require, 'USE' => $use, 'CLASS' => $this->getName(), 'IMPLEMENTS' => $implements, 'BODY' => $body]); - } - - public function addRequire(self $class): void - { - $this->require[] = $class; - } - - public function addUse(string $class): void - { - $this->use[$class] = true; - } - - public function addImplements(string $interface): void - { - $this->implements[] = '\\'.ltrim($interface, '\\'); - } - - public function addMethod(string $name, string $body, array $params = []): void - { - $this->methods[] = new Method(strtr($body, ['NAME' => $this->camelCase($name)] + $params)); - } - - public function addProperty(string $name, ?string $classType = null, ?string $defaultValue = null): Property - { - $property = new Property($name, '_' !== $name[0] ? $this->camelCase($name) : $name); - if (null !== $classType) { - $property->setType($classType); - } - $this->properties[] = $property; - $defaultValue = null !== $defaultValue ? \sprintf(' = %s', $defaultValue) : ''; - $property->setContent(\sprintf('private $%s%s;', $property->getName(), $defaultValue)); - - return $property; - } - - public function getProperties(): array - { - return $this->properties; - } - - private function camelCase(string $input): string - { - $output = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input)))); - - return preg_replace('#\W#', '', $output); - } - - public function getName(): string - { - return $this->name; - } - - public function getNamespace(): string - { - return $this->namespace; - } - - public function getFqcn(): string - { - return '\\'.$this->namespace.'\\'.$this->name; - } - - public function setAllowExtraKeys(bool $allowExtraKeys): void - { - $this->allowExtraKeys = $allowExtraKeys; - } - - public function shouldAllowExtraKeys(): bool - { - return $this->allowExtraKeys; - } -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderGenerator.php b/vendor/symfony/config/Builder/ConfigBuilderGenerator.php deleted file mode 100644 index d7689901..00000000 --- a/vendor/symfony/config/Builder/ConfigBuilderGenerator.php +++ /dev/null @@ -1,609 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\BooleanNode; -use Symfony\Component\Config\Definition\Builder\ExprBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\FloatNode; -use Symfony\Component\Config\Definition\IntegerNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; -use Symfony\Component\Config\Definition\VariableNode; -use Symfony\Component\Config\Loader\ParamConfigurator; - -/** - * Generate ConfigBuilders to help create valid config. - * - * @author Tobias Nyholm - */ -class ConfigBuilderGenerator implements ConfigBuilderGeneratorInterface -{ - /** - * @var ClassBuilder[] - */ - private array $classes = []; - - public function __construct( - private string $outputDir, - ) { - } - - /** - * @return \Closure that will return the root config class - */ - public function build(ConfigurationInterface $configuration): \Closure - { - $this->classes = []; - - $rootNode = $configuration->getConfigTreeBuilder()->buildTree(); - $rootClass = new ClassBuilder('Symfony\\Config', $rootNode->getName()); - - $path = $this->getFullPath($rootClass); - if (!is_file($path)) { - // Generate the class if the file not exists - $this->classes[] = $rootClass; - $this->buildNode($rootNode, $rootClass, $this->getSubNamespace($rootClass)); - $rootClass->addImplements(ConfigBuilderInterface::class); - $rootClass->addMethod('getExtensionAlias', ' -public function NAME(): string -{ - return \'ALIAS\'; -}', ['ALIAS' => $rootNode->getPath()]); - - $this->writeClasses(); - } - - return function () use ($path, $rootClass) { - require_once $path; - $className = $rootClass->getFqcn(); - - return new $className(); - }; - } - - private function getFullPath(ClassBuilder $class): string - { - $directory = $this->outputDir.\DIRECTORY_SEPARATOR.$class->getDirectory(); - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - - return $directory.\DIRECTORY_SEPARATOR.$class->getFilename(); - } - - private function writeClasses(): void - { - foreach ($this->classes as $class) { - $this->buildConstructor($class); - $this->buildToArray($class); - if ($class->getProperties()) { - $class->addProperty('_usedProperties', null, '[]'); - } - $this->buildSetExtraKey($class); - - file_put_contents($this->getFullPath($class), $class->build()); - } - - $this->classes = []; - } - - private function buildNode(NodeInterface $node, ClassBuilder $class, string $namespace): void - { - if (!$node instanceof ArrayNode) { - throw new \LogicException('The node was expected to be an ArrayNode. This Configuration includes an edge case not supported yet.'); - } - - foreach ($node->getChildren() as $child) { - match (true) { - $child instanceof ScalarNode => $this->handleScalarNode($child, $class), - $child instanceof PrototypedArrayNode => $this->handlePrototypedArrayNode($child, $class, $namespace), - $child instanceof VariableNode => $this->handleVariableNode($child, $class), - $child instanceof ArrayNode => $this->handleArrayNode($child, $class, $namespace), - default => throw new \RuntimeException(\sprintf('Unknown node "%s".', $child::class)), - }; - } - } - - private function handleArrayNode(ArrayNode $node, ClassBuilder $class, string $namespace): void - { - $childClass = new ClassBuilder($namespace, $node->getName()); - $childClass->setAllowExtraKeys($node->shouldIgnoreExtraKeys()); - $class->addRequire($childClass); - $this->classes[] = $childClass; - - $nodeTypes = $this->getParameterTypes($node); - $paramType = $this->getParamType($nodeTypes); - - $hasNormalizationClosures = $this->hasNormalizationClosures($node); - $comment = $this->getComment($node); - if ($hasNormalizationClosures && 'array' !== $paramType) { - $comment = \sprintf(" * @template TValue of %s\n * @param TValue \$value\n%s", $paramType, $comment); - $comment .= \sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); - $comment .= \sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); - } - if ('' !== $comment) { - $comment = "/**\n$comment*/\n"; - } - - $property = $class->addProperty( - $node->getName(), - $this->getType($childClass->getFqcn(), $hasNormalizationClosures) - ); - $body = $hasNormalizationClosures && 'array' !== $paramType ? ' -COMMENTpublic function NAME(PARAM_TYPE $value = []): CLASS|static -{ - if (!\is_array($value)) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; - } - - if (!$this->PROPERTY instanceof CLASS) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = new CLASS($value); - } elseif (0 < \func_num_args()) { - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); - } - - return $this->PROPERTY; -}' : ' -COMMENTpublic function NAME(array $value = []): CLASS -{ - if (null === $this->PROPERTY) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = new CLASS($value); - } elseif (0 < \func_num_args()) { - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); - } - - return $this->PROPERTY; -}'; - $class->addUse(InvalidConfigurationException::class); - $class->addMethod($node->getName(), $body, [ - 'COMMENT' => $comment, - 'PROPERTY' => $property->getName(), - 'CLASS' => $childClass->getFqcn(), - 'PARAM_TYPE' => $paramType, - ]); - - $this->buildNode($node, $childClass, $this->getSubNamespace($childClass)); - } - - private function handleVariableNode(VariableNode $node, ClassBuilder $class): void - { - $comment = $this->getComment($node); - $property = $class->addProperty($node->getName()); - $class->addUse(ParamConfigurator::class); - - $body = ' -/** -COMMENT * - * @return $this - */ -public function NAME(mixed $valueDEFAULT): static -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - $class->addMethod($node->getName(), $body, [ - 'PROPERTY' => $property->getName(), - 'COMMENT' => $comment, - 'DEFAULT' => $node->hasDefaultValue() ? ' = '.var_export($node->getDefaultValue(), true) : '', - ]); - } - - private function handlePrototypedArrayNode(PrototypedArrayNode $node, ClassBuilder $class, string $namespace): void - { - $name = $this->getSingularName($node); - $prototype = $node->getPrototype(); - $methodName = $name; - $hasNormalizationClosures = $this->hasNormalizationClosures($node) || $this->hasNormalizationClosures($prototype); - - $nodeParameterTypes = $this->getParameterTypes($node); - $prototypeParameterTypes = $this->getParameterTypes($prototype); - $noKey = null === $key = $node->getKeyAttribute(); - if (!$prototype instanceof ArrayNode || ($prototype instanceof PrototypedArrayNode && $prototype->getPrototype() instanceof ScalarNode)) { - $class->addUse(ParamConfigurator::class); - $property = $class->addProperty($node->getName()); - if ($noKey) { - // This is an array of values; don't use singular name - $nodeTypesWithoutArray = array_filter($nodeParameterTypes, static fn ($type) => 'array' !== $type); - $body = ' -/** - * @param ParamConfigurator|listEXTRA_TYPE $value - * - * @return $this - */ -public function NAME(PARAM_TYPE $value): static -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - - $class->addMethod($node->getName(), $body, [ - 'PROPERTY' => $property->getName(), - 'PROTOTYPE_TYPE' => implode('|', $prototypeParameterTypes), - 'EXTRA_TYPE' => $nodeTypesWithoutArray ? '|'.implode('|', $nodeTypesWithoutArray) : '', - 'PARAM_TYPE' => $this->getParamType($nodeParameterTypes, true), - ]); - } else { - $body = ' -/** - * @return $this - */ -public function NAME(string $VAR, TYPE $VALUE): static -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY[$VAR] = $VALUE; - - return $this; -}'; - - $class->addMethod($methodName, $body, [ - 'PROPERTY' => $property->getName(), - 'TYPE' => $this->getParamType($prototypeParameterTypes, true), - 'VAR' => '' === $key ? 'key' : $key, - 'VALUE' => 'value' === $key ? 'data' : 'value', - ]); - } - - return; - } - - $childClass = new ClassBuilder($namespace, $name); - if ($prototype instanceof ArrayNode) { - $childClass->setAllowExtraKeys($prototype->shouldIgnoreExtraKeys()); - } - $class->addRequire($childClass); - $this->classes[] = $childClass; - - $property = $class->addProperty( - $node->getName(), - $this->getType($childClass->getFqcn().'[]', $hasNormalizationClosures) - ); - - $paramType = $this->getParamType($noKey ? $nodeParameterTypes : $prototypeParameterTypes); - - $comment = $this->getComment($node); - if ($hasNormalizationClosures && 'array' !== $paramType) { - $comment = \sprintf(" * @template TValue of %s\n * @param TValue \$value\n%s", $paramType, $comment); - $comment .= \sprintf(' * @return %s|$this'."\n", $childClass->getFqcn()); - $comment .= \sprintf(' * @psalm-return (TValue is array ? %s : static)'."\n ", $childClass->getFqcn()); - } - if ('' !== $comment) { - $comment = "/**\n$comment*/\n"; - } - - if ($noKey) { - $body = $hasNormalizationClosures && 'array' !== $paramType ? ' -COMMENTpublic function NAME(PARAM_TYPE $value = []): CLASS|static -{ - $this->_usedProperties[\'PROPERTY\'] = true; - if (!\is_array($value)) { - $this->PROPERTY[] = $value; - - return $this; - } - - return $this->PROPERTY[] = new CLASS($value); -}' : ' -COMMENTpublic function NAME(array $value = []): CLASS -{ - $this->_usedProperties[\'PROPERTY\'] = true; - - return $this->PROPERTY[] = new CLASS($value); -}'; - $class->addMethod($methodName, $body, [ - 'COMMENT' => $comment, - 'PROPERTY' => $property->getName(), - 'CLASS' => $childClass->getFqcn(), - 'PARAM_TYPE' => $paramType, - ]); - } else { - $body = $hasNormalizationClosures && 'array' !== $paramType ? ' -COMMENTpublic function NAME(string $VAR, PARAM_TYPE $VALUE = []): CLASS|static -{ - if (!\is_array($VALUE)) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY[$VAR] = $VALUE; - - return $this; - } - - if (!isset($this->PROPERTY[$VAR]) || !$this->PROPERTY[$VAR] instanceof CLASS) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY[$VAR] = new CLASS($VALUE); - } elseif (1 < \func_num_args()) { - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); - } - - return $this->PROPERTY[$VAR]; -}' : ' -COMMENTpublic function NAME(string $VAR, array $VALUE = []): CLASS -{ - if (!isset($this->PROPERTY[$VAR])) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY[$VAR] = new CLASS($VALUE); - } elseif (1 < \func_num_args()) { - throw new InvalidConfigurationException(\'The node created by "NAME()" has already been initialized. You cannot pass values the second time you call NAME().\'); - } - - return $this->PROPERTY[$VAR]; -}'; - $class->addUse(InvalidConfigurationException::class); - $class->addMethod($methodName, str_replace('$value', '$VAR', $body), [ - 'COMMENT' => $comment, 'PROPERTY' => $property->getName(), - 'CLASS' => $childClass->getFqcn(), - 'VAR' => '' === $key ? 'key' : $key, - 'VALUE' => 'value' === $key ? 'data' : 'value', - 'PARAM_TYPE' => $paramType, - ]); - } - - $this->buildNode($prototype, $childClass, $namespace.'\\'.$childClass->getName()); - } - - private function handleScalarNode(ScalarNode $node, ClassBuilder $class): void - { - $comment = $this->getComment($node); - $property = $class->addProperty($node->getName()); - $class->addUse(ParamConfigurator::class); - - $body = ' -/** -COMMENT * @return $this - */ -public function NAME($value): static -{ - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = $value; - - return $this; -}'; - - $class->addMethod($node->getName(), $body, ['PROPERTY' => $property->getName(), 'COMMENT' => $comment]); - } - - private function getParameterTypes(NodeInterface $node): array - { - $paramTypes = []; - if ($node instanceof BaseNode) { - $types = $node->getNormalizedTypes(); - if (\in_array(ExprBuilder::TYPE_ANY, $types, true)) { - $paramTypes[] = 'mixed'; - } - if (\in_array(ExprBuilder::TYPE_STRING, $types, true)) { - $paramTypes[] = 'string'; - } - } - if ($node instanceof BooleanNode) { - $paramTypes[] = 'bool'; - } elseif ($node instanceof IntegerNode) { - $paramTypes[] = 'int'; - } elseif ($node instanceof FloatNode) { - $paramTypes[] = 'float'; - } elseif ($node instanceof EnumNode) { - $paramTypes[] = 'mixed'; - } elseif ($node instanceof ArrayNode) { - $paramTypes[] = 'array'; - } elseif ($node instanceof VariableNode) { - $paramTypes[] = 'mixed'; - } - - return array_unique($paramTypes); - } - - private function getComment(BaseNode $node): string - { - $comment = ''; - if ('' !== $info = (string) $node->getInfo()) { - $comment .= $info."\n"; - } - - if (!$node instanceof ArrayNode) { - foreach ((array) ($node->getExample() ?? []) as $example) { - $comment .= '@example '.$example."\n"; - } - - if ('' !== $default = $node->getDefaultValue()) { - $comment .= '@default '.(null === $default ? 'null' : var_export($default, true))."\n"; - } - - if ($node instanceof EnumNode) { - $comment .= \sprintf('@param ParamConfigurator|%s $value', implode('|', array_unique(array_map(fn ($a) => !$a instanceof \UnitEnum ? var_export($a, true) : '\\'.ltrim(var_export($a, true), '\\'), $node->getValues()))))."\n"; - } else { - $parameterTypes = $this->getParameterTypes($node); - $comment .= '@param ParamConfigurator|'.implode('|', $parameterTypes).' $value'."\n"; - } - } else { - foreach ((array) ($node->getExample() ?? []) as $example) { - $comment .= '@example '.json_encode($example)."\n"; - } - - if ($node->hasDefaultValue() && [] != $default = $node->getDefaultValue()) { - $comment .= '@default '.json_encode($default)."\n"; - } - } - - if ($node->isDeprecated()) { - $comment .= '@deprecated '.$node->getDeprecation($node->getName(), $node->getParent()->getName())['message']."\n"; - } - - return $comment ? ' * '.str_replace("\n", "\n * ", rtrim($comment, "\n"))."\n" : ''; - } - - /** - * Pick a good singular name. - */ - private function getSingularName(PrototypedArrayNode $node): string - { - $name = $node->getName(); - if (!str_ends_with($name, 's')) { - return $name; - } - - $parent = $node->getParent(); - $mappings = $parent instanceof ArrayNode ? $parent->getXmlRemappings() : []; - foreach ($mappings as $map) { - if ($map[1] === $name) { - $name = $map[0]; - break; - } - } - - return $name; - } - - private function buildToArray(ClassBuilder $class): void - { - $body = '$output = [];'; - foreach ($class->getProperties() as $p) { - $code = '$this->PROPERTY'; - if (null !== $p->getType()) { - if ($p->isArray()) { - $code = $p->areScalarsAllowed() - ? 'array_map(fn ($v) => $v instanceof CLASS ? $v->toArray() : $v, $this->PROPERTY)' - : 'array_map(fn ($v) => $v->toArray(), $this->PROPERTY)' - ; - } else { - $code = $p->areScalarsAllowed() - ? '$this->PROPERTY instanceof CLASS ? $this->PROPERTY->toArray() : $this->PROPERTY' - : '$this->PROPERTY->toArray()' - ; - } - } - - $body .= strtr(' - if (isset($this->_usedProperties[\'PROPERTY\'])) { - $output[\'ORG_NAME\'] = '.$code.'; - }', ['PROPERTY' => $p->getName(), 'ORG_NAME' => $p->getOriginalName(), 'CLASS' => $p->getType()]); - } - - $extraKeys = $class->shouldAllowExtraKeys() ? ' + $this->_extraKeys' : ''; - - $class->addMethod('toArray', ' -public function NAME(): array -{ - '.$body.' - - return $output'.$extraKeys.'; -}'); - } - - private function buildConstructor(ClassBuilder $class): void - { - $body = ''; - foreach ($class->getProperties() as $p) { - $code = '$value[\'ORG_NAME\']'; - if (null !== $p->getType()) { - if ($p->isArray()) { - $code = $p->areScalarsAllowed() - ? 'array_map(fn ($v) => \is_array($v) ? new '.$p->getType().'($v) : $v, $value[\'ORG_NAME\'])' - : 'array_map(fn ($v) => new '.$p->getType().'($v), $value[\'ORG_NAME\'])' - ; - } else { - $code = $p->areScalarsAllowed() - ? '\is_array($value[\'ORG_NAME\']) ? new '.$p->getType().'($value[\'ORG_NAME\']) : $value[\'ORG_NAME\']' - : 'new '.$p->getType().'($value[\'ORG_NAME\'])' - ; - } - } - - $body .= strtr(' - if (array_key_exists(\'ORG_NAME\', $value)) { - $this->_usedProperties[\'PROPERTY\'] = true; - $this->PROPERTY = '.$code.'; - unset($value[\'ORG_NAME\']); - } -', ['PROPERTY' => $p->getName(), 'ORG_NAME' => $p->getOriginalName()]); - } - - if ($class->shouldAllowExtraKeys()) { - $body .= ' - $this->_extraKeys = $value; -'; - } else { - $body .= ' - if ([] !== $value) { - throw new InvalidConfigurationException(sprintf(\'The following keys are not supported by "%s": \', __CLASS__).implode(\', \', array_keys($value))); - }'; - - $class->addUse(InvalidConfigurationException::class); - } - - $class->addMethod('__construct', ' -public function __construct(array $value = []) -{'.$body.' -}'); - } - - private function buildSetExtraKey(ClassBuilder $class): void - { - if (!$class->shouldAllowExtraKeys()) { - return; - } - - $class->addUse(ParamConfigurator::class); - - $class->addProperty('_extraKeys'); - - $class->addMethod('set', ' -/** - * @param ParamConfigurator|mixed $value - * - * @return $this - */ -public function NAME(string $key, mixed $value): static -{ - $this->_extraKeys[$key] = $value; - - return $this; -}'); - } - - private function getSubNamespace(ClassBuilder $rootClass): string - { - return \sprintf('%s\\%s', $rootClass->getNamespace(), substr($rootClass->getName(), 0, -6)); - } - - private function hasNormalizationClosures(NodeInterface $node): bool - { - try { - $r = new \ReflectionProperty($node, 'normalizationClosures'); - } catch (\ReflectionException) { - return false; - } - - return [] !== $r->getValue($node); - } - - private function getType(string $classType, bool $hasNormalizationClosures): string - { - return $classType.($hasNormalizationClosures ? '|scalar' : ''); - } - - private function getParamType(array $types, bool $withParamConfigurator = false): string - { - return \in_array('mixed', $types, true) ? 'mixed' : ($withParamConfigurator ? 'ParamConfigurator|' : '').implode('|', $types); - } -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php b/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php deleted file mode 100644 index c52c9e5d..00000000 --- a/vendor/symfony/config/Builder/ConfigBuilderGeneratorInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -use Symfony\Component\Config\Definition\ConfigurationInterface; - -/** - * Generates ConfigBuilders to help create valid config. - * - * @author Tobias Nyholm - */ -interface ConfigBuilderGeneratorInterface -{ - /** - * @return \Closure that will return the root config class - */ - public function build(ConfigurationInterface $configuration): \Closure; -} diff --git a/vendor/symfony/config/Builder/ConfigBuilderInterface.php b/vendor/symfony/config/Builder/ConfigBuilderInterface.php deleted file mode 100644 index fd3129c5..00000000 --- a/vendor/symfony/config/Builder/ConfigBuilderInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * A ConfigBuilder provides helper methods to build a large complex array. - * - * @author Tobias Nyholm - */ -interface ConfigBuilderInterface -{ - /** - * Gets all configuration represented as an array. - */ - public function toArray(): array; - - /** - * Gets the alias for the extension which config we are building. - */ - public function getExtensionAlias(): string; -} diff --git a/vendor/symfony/config/Builder/Method.php b/vendor/symfony/config/Builder/Method.php deleted file mode 100644 index 8fba068a..00000000 --- a/vendor/symfony/config/Builder/Method.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Represents a method when building classes. - * - * @internal - * - * @author Tobias Nyholm - */ -class Method -{ - public function __construct( - private string $content, - ) { - } - - public function getContent(): string - { - return $this->content; - } -} diff --git a/vendor/symfony/config/Builder/Property.php b/vendor/symfony/config/Builder/Property.php deleted file mode 100644 index ede5351c..00000000 --- a/vendor/symfony/config/Builder/Property.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Builder; - -/** - * Represents a property when building classes. - * - * @internal - * - * @author Tobias Nyholm - */ -class Property -{ - private bool $array = false; - private bool $scalarsAllowed = false; - private ?string $type = null; - private ?string $content = null; - - public function __construct( - private string $originalName, - private string $name, - ) { - } - - public function getName(): string - { - return $this->name; - } - - public function getOriginalName(): string - { - return $this->originalName; - } - - public function setType(string $type): void - { - $this->array = false; - $this->type = $type; - - if (str_ends_with($type, '|scalar')) { - $this->scalarsAllowed = true; - $this->type = $type = substr($type, 0, -7); - } - - if (str_ends_with($type, '[]')) { - $this->array = true; - $this->type = substr($type, 0, -2); - } - } - - public function getType(): ?string - { - return $this->type; - } - - public function getContent(): ?string - { - return $this->content; - } - - public function setContent(string $content): void - { - $this->content = $content; - } - - public function isArray(): bool - { - return $this->array; - } - - public function areScalarsAllowed(): bool - { - return $this->scalarsAllowed; - } -} diff --git a/vendor/symfony/config/CHANGELOG.md b/vendor/symfony/config/CHANGELOG.md deleted file mode 100644 index 6ee63f82..00000000 --- a/vendor/symfony/config/CHANGELOG.md +++ /dev/null @@ -1,183 +0,0 @@ -CHANGELOG -========= - -7.3 ---- - - * Add `ExprBuilder::ifFalse()` - * Add support for info on `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()` - * Allow using an enum FQCN with `EnumNode` - * Add `NodeDefinition::docUrl()` - -7.2 ---- - - * Add `#[WhenNot]` attribute to prevent service from being registered in a specific environment - * Generate a meta file in JSON format for resource tracking - * Add `SkippingResourceChecker` - * Add support for `defaultNull()` on `BooleanNode` - * Add `StringNode` and `StringNodeDefinition` - * Add `ArrayNodeDefinition::stringPrototype()` method - * Add `NodeBuilder::stringNode()` method - -7.1 ---- - - * Allow custom meta location in `ResourceCheckerConfigCache` - * Allow custom meta location in `ConfigCache` - -7.0 ---- - - * Require explicit argument when calling `NodeBuilder::setParent()` - -6.3 ---- - - * Allow enum values in `EnumNode` - -6.2 ---- - - * Deprecate calling `NodeBuilder::setParent()` without any arguments - * Add a more accurate typehint in generated PHP config - -6.1 ---- - - * Allow using environment variables in `EnumNode` - * Add Node's information in generated Config - * Add `DefinitionFileLoader` class to load a TreeBuilder definition from an external file - * Add `DefinitionConfigurator` helper - -6.0 ---- - - * Remove `BaseNode::getDeprecationMessage()` - -5.3.0 ------ - - * Add support for generating `ConfigBuilder` for extensions - -5.1.0 ------ - - * updated the signature of method `NodeDefinition::setDeprecated()` to `NodeDefinition::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `BaseNode::setDeprecated()` to `BaseNode::setDeprecation(string $package, string $version, string $message)` - * deprecated passing a null message to `BaseNode::setDeprecated()` to un-deprecate a node - * deprecated `BaseNode::getDeprecationMessage()`, use `BaseNode::getDeprecation()` instead - -5.0.0 ------ - - * Dropped support for constructing a `TreeBuilder` without passing root node information. - * Removed the `root()` method in `TreeBuilder`, pass the root node information to the constructor instead - * Added method `getChildNodeDefinitions()` to ParentNodeDefinitionInterface - * Removed `FileLoaderLoadException`, use `LoaderLoadException` instead - -4.4.0 ------ - - * added a way to exclude patterns of resources from being imported by the `import()` method - -4.3.0 ------ - - * deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` - * made `Resource\*` classes final and not implement `Serializable` anymore - * deprecated the `root()` method in `TreeBuilder`, pass the root node information to the constructor instead - -4.2.0 ------ - - * deprecated constructing a `TreeBuilder` without passing root node information - * renamed `FileLoaderLoadException` to `LoaderLoadException` - -4.1.0 ------ - - * added `setPathSeparator` method to `NodeBuilder` class - * added third `$pathSeparator` constructor argument to `BaseNode` - * the `Processor` class has been made final - -4.0.0 ------ - - * removed `ConfigCachePass` - -3.4.0 ------ - - * added `setDeprecated()` method to indicate a deprecated node - * added `XmlUtils::parse()` method to parse an XML string - * deprecated `ConfigCachePass` - -3.3.0 ------ - - * added `ReflectionClassResource` class - * added second `$exists` constructor argument to `ClassExistenceResource` - * made `ClassExistenceResource` work with interfaces and traits - * added `ConfigCachePass` (originally in FrameworkBundle) - * added `castToArray()` helper to turn any config value into an array - -3.0.0 ------ - - * removed `ReferenceDumper` class - * removed the `ResourceInterface::isFresh()` method - * removed `BCResourceInterfaceChecker` class - * removed `ResourceInterface::getResource()` method - -2.8.0 ------ - -The edge case of defining just one value for nodes of type Enum is now allowed: - -```php -$rootNode - ->children() - ->enumNode('variable') - ->values(['value']) - ->end() - ->end() -; -``` - -Before: `InvalidArgumentException` (variable must contain at least two -distinct elements). -After: the code will work as expected and it will restrict the values of the -`variable` option to just `value`. - - * deprecated the `ResourceInterface::isFresh()` method. If you implement custom resource types and they - can be validated that way, make them implement the new `SelfCheckingResourceInterface`. - * deprecated the getResource() method in ResourceInterface. You can still call this method - on concrete classes implementing the interface, but it does not make sense at the interface - level as you need to know about the particular type of resource at hand to understand the - semantics of the returned value. - -2.7.0 ------ - - * added `ConfigCacheInterface`, `ConfigCacheFactoryInterface` and a basic `ConfigCacheFactory` - implementation to delegate creation of ConfigCache instances - -2.2.0 ------ - - * added `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()` - to ease configuration when some sections are respectively disabled / enabled - by default. - * added a `normalizeKeys()` method for array nodes (to avoid key normalization) - * added numerical type handling for config definitions - * added convenience methods for optional configuration sections to `ArrayNodeDefinition` - * added a utils class for XML manipulations - -2.1.0 ------ - - * added a way to add documentation on configuration - * implemented `Serializable` on resources - * `LoaderResolverInterface` is now used instead of `LoaderResolver` for type - hinting diff --git a/vendor/symfony/config/ConfigCache.php b/vendor/symfony/config/ConfigCache.php deleted file mode 100644 index cee286f4..00000000 --- a/vendor/symfony/config/ConfigCache.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Config\Resource\SelfCheckingResourceChecker; -use Symfony\Component\Config\Resource\SkippingResourceChecker; - -/** - * ConfigCache caches arbitrary content in files on disk. - * - * When in debug mode, those metadata resources that implement - * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will - * be used to check cache freshness. - * - * @author Fabien Potencier - * @author Matthias Pigulla - */ -class ConfigCache extends ResourceCheckerConfigCache -{ - /** - * @param string $file The absolute cache path - * @param bool $debug Whether debugging is enabled or not - * @param string|null $metaFile The absolute path to the meta file - * @param class-string[]|null $skippedResourceTypes - */ - public function __construct( - string $file, - private bool $debug, - ?string $metaFile = null, - ?array $skippedResourceTypes = null, - ) { - $checkers = []; - if ($this->debug) { - if (null !== $skippedResourceTypes) { - $checkers[] = new SkippingResourceChecker($skippedResourceTypes); - } - $checkers[] = new SelfCheckingResourceChecker(); - } - - parent::__construct($file, $checkers, $metaFile); - } - - /** - * Checks if the cache is still fresh. - * - * This implementation always returns true when debug is off and the - * cache file exists. - */ - public function isFresh(): bool - { - if (!$this->debug && is_file($this->getPath())) { - return true; - } - - return parent::isFresh(); - } -} diff --git a/vendor/symfony/config/ConfigCacheFactory.php b/vendor/symfony/config/ConfigCacheFactory.php deleted file mode 100644 index 27a18e75..00000000 --- a/vendor/symfony/config/ConfigCacheFactory.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * Basic implementation of ConfigCacheFactoryInterface that - * creates an instance of the default ConfigCache. - * - * This factory and/or cache do not support cache validation - * by means of ResourceChecker instances (that is, service-based). - * - * @author Matthias Pigulla - */ -class ConfigCacheFactory implements ConfigCacheFactoryInterface -{ - /** - * @param bool $debug The debug flag to pass to ConfigCache - */ - public function __construct( - private bool $debug, - ) { - } - - public function cache(string $file, callable $callback): ConfigCacheInterface - { - $cache = new ConfigCache($file, $this->debug); - if (!$cache->isFresh()) { - $callback($cache); - } - - return $cache; - } -} diff --git a/vendor/symfony/config/ConfigCacheFactoryInterface.php b/vendor/symfony/config/ConfigCacheFactoryInterface.php deleted file mode 100644 index 01c90d1e..00000000 --- a/vendor/symfony/config/ConfigCacheFactoryInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * Interface for a ConfigCache factory. This factory creates - * an instance of ConfigCacheInterface and initializes the - * cache if necessary. - * - * @author Matthias Pigulla - */ -interface ConfigCacheFactoryInterface -{ - /** - * Creates a cache instance and (re-)initializes it if necessary. - * - * @param string $file The absolute cache file path - * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback - */ - public function cache(string $file, callable $callable): ConfigCacheInterface; -} diff --git a/vendor/symfony/config/ConfigCacheInterface.php b/vendor/symfony/config/ConfigCacheInterface.php deleted file mode 100644 index 7b9d3889..00000000 --- a/vendor/symfony/config/ConfigCacheInterface.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Interface for ConfigCache. - * - * @author Matthias Pigulla - */ -interface ConfigCacheInterface -{ - /** - * Gets the cache file path. - */ - public function getPath(): string; - - /** - * Checks if the cache is still fresh. - * - * This check should take the metadata passed to the write() method into consideration. - */ - public function isFresh(): bool; - - /** - * Writes the given content into the cache file. Metadata will be stored - * independently and can be used to check cache freshness at a later time. - * - * @param string $content The content to write into the cache - * @param ResourceInterface[]|null $metadata An array of ResourceInterface instances - * - * @throws \RuntimeException When the cache file cannot be written - */ - public function write(string $content, ?array $metadata = null): void; -} diff --git a/vendor/symfony/config/Definition/ArrayNode.php b/vendor/symfony/config/Definition/ArrayNode.php deleted file mode 100644 index 5301b724..00000000 --- a/vendor/symfony/config/Definition/ArrayNode.php +++ /dev/null @@ -1,379 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * Represents an Array node in the config tree. - * - * @author Johannes M. Schmitt - */ -class ArrayNode extends BaseNode implements PrototypeNodeInterface -{ - protected array $xmlRemappings = []; - protected array $children = []; - protected bool $allowFalse = false; - protected bool $allowNewKeys = true; - protected bool $addIfNotSet = false; - protected bool $performDeepMerging = true; - protected bool $ignoreExtraKeys = false; - protected bool $removeExtraKeys = true; - protected bool $normalizeKeys = true; - - public function setNormalizeKeys(bool $normalizeKeys): void - { - $this->normalizeKeys = $normalizeKeys; - } - - /** - * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. - * After running this method, all keys are normalized to foo_bar. - * - * If you have a mixed key like foo-bar_moo, it will not be altered. - * The key will also not be altered if the target key already exists. - */ - protected function preNormalize(mixed $value): mixed - { - if (!$this->normalizeKeys || !\is_array($value)) { - return $value; - } - - $normalized = []; - - foreach ($value as $k => $v) { - if (str_contains($k, '-') && !str_contains($k, '_') && !\array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { - $normalized[$normalizedKey] = $v; - } else { - $normalized[$k] = $v; - } - } - - return $normalized; - } - - /** - * Retrieves the children of this node. - * - * @return array - */ - public function getChildren(): array - { - return $this->children; - } - - /** - * Sets the xml remappings that should be performed. - * - * @param array $remappings An array of the form [[string, string]] - */ - public function setXmlRemappings(array $remappings): void - { - $this->xmlRemappings = $remappings; - } - - /** - * Gets the xml remappings that should be performed. - * - * @return array an array of the form [[string, string]] - */ - public function getXmlRemappings(): array - { - return $this->xmlRemappings; - } - - /** - * Sets whether to add default values for this array if it has not been - * defined in any of the configuration files. - */ - public function setAddIfNotSet(bool $boolean): void - { - $this->addIfNotSet = $boolean; - } - - /** - * Sets whether false is allowed as value indicating that the array should be unset. - */ - public function setAllowFalse(bool $allow): void - { - $this->allowFalse = $allow; - } - - /** - * Sets whether new keys can be defined in subsequent configurations. - */ - public function setAllowNewKeys(bool $allow): void - { - $this->allowNewKeys = $allow; - } - - /** - * Sets if deep merging should occur. - */ - public function setPerformDeepMerging(bool $boolean): void - { - $this->performDeepMerging = $boolean; - } - - /** - * Whether extra keys should just be ignored without an exception. - * - * @param bool $boolean To allow extra keys - * @param bool $remove To remove extra keys - */ - public function setIgnoreExtraKeys(bool $boolean, bool $remove = true): void - { - $this->ignoreExtraKeys = $boolean; - $this->removeExtraKeys = $this->ignoreExtraKeys && $remove; - } - - /** - * Returns true when extra keys should be ignored without an exception. - */ - public function shouldIgnoreExtraKeys(): bool - { - return $this->ignoreExtraKeys; - } - - public function setName(string $name): void - { - $this->name = $name; - } - - public function hasDefaultValue(): bool - { - return $this->addIfNotSet; - } - - public function getDefaultValue(): mixed - { - if (!$this->hasDefaultValue()) { - throw new \RuntimeException(\sprintf('The node at path "%s" has no default value.', $this->getPath())); - } - - $defaults = []; - foreach ($this->children as $name => $child) { - if ($child->hasDefaultValue()) { - $defaults[$name] = $child->getDefaultValue(); - } - } - - return $defaults; - } - - /** - * Adds a child node. - * - * @throws \InvalidArgumentException when the child node has no name - * @throws \InvalidArgumentException when the child node's name is not unique - */ - public function addChild(NodeInterface $node): void - { - $name = $node->getName(); - if ('' === $name) { - throw new \InvalidArgumentException('Child nodes must be named.'); - } - if (isset($this->children[$name])) { - throw new \InvalidArgumentException(\sprintf('A child node named "%s" already exists.', $name)); - } - - $this->children[$name] = $node; - } - - /** - * @throws UnsetKeyException - * @throws InvalidConfigurationException if the node doesn't have enough children - */ - protected function finalizeValue(mixed $value): mixed - { - if (false === $value) { - throw new UnsetKeyException(\sprintf('Unsetting key for path "%s", value: false.', $this->getPath())); - } - - foreach ($this->children as $name => $child) { - if (!\array_key_exists($name, $value)) { - if ($child->isRequired()) { - $message = \sprintf('The child config "%s" under "%s" must be configured', $name, $this->getPath()); - if ($child->getInfo()) { - $message .= \sprintf(': %s', $child->getInfo()); - } else { - $message .= '.'; - } - $ex = new InvalidConfigurationException($message); - $ex->setPath($this->getPath()); - - throw $ex; - } - - if ($child->hasDefaultValue()) { - $value[$name] = $child->getDefaultValue(); - } - - continue; - } - - if ($child->isDeprecated()) { - $deprecation = $child->getDeprecation($name, $this->getPath()); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - try { - $value[$name] = $child->finalize($value[$name]); - } catch (UnsetKeyException) { - unset($value[$name]); - } - } - - return $value; - } - - protected function validateType(mixed $value): void - { - if (!\is_array($value) && (!$this->allowFalse || false !== $value)) { - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "array", but got "%s"', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - /** - * @throws InvalidConfigurationException - */ - protected function normalizeValue(mixed $value): mixed - { - if (false === $value) { - return $value; - } - - $value = $this->remapXml($value); - - $normalized = []; - foreach ($value as $name => $val) { - if (isset($this->children[$name])) { - try { - $normalized[$name] = $this->children[$name]->normalize($val); - } catch (UnsetKeyException) { - } - unset($value[$name]); - } elseif (!$this->removeExtraKeys) { - $normalized[$name] = $val; - } - } - - // if extra fields are present, throw exception - if (\count($value) && !$this->ignoreExtraKeys) { - $proposals = array_keys($this->children); - sort($proposals); - $guesses = []; - - foreach (array_keys($value) as $subject) { - $minScore = \INF; - foreach ($proposals as $proposal) { - $distance = levenshtein($subject, $proposal); - if ($distance <= $minScore && $distance < 3) { - $guesses[$proposal] = $distance; - $minScore = $distance; - } - } - } - - $msg = \sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()); - - if (\count($guesses)) { - asort($guesses); - $msg .= \sprintf('. Did you mean "%s"?', implode('", "', array_keys($guesses))); - } else { - $msg .= \sprintf('. Available option%s %s "%s".', 1 === \count($proposals) ? '' : 's', 1 === \count($proposals) ? 'is' : 'are', implode('", "', $proposals)); - } - - $ex = new InvalidConfigurationException($msg); - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $normalized; - } - - /** - * Remaps multiple singular values to a single plural value. - */ - protected function remapXml(array $value): array - { - foreach ($this->xmlRemappings as [$singular, $plural]) { - if (!isset($value[$singular])) { - continue; - } - - $value[$plural] = Processor::normalizeConfig($value, $singular, $plural); - unset($value[$singular]); - } - - return $value; - } - - /** - * @throws InvalidConfigurationException - * @throws \RuntimeException - */ - protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed - { - if (false === $rightSide) { - // if this is still false after the last config has been merged the - // finalization pass will take care of removing this key entirely - return false; - } - - if (false === $leftSide || !$this->performDeepMerging) { - return $rightSide; - } - - foreach ($rightSide as $k => $v) { - // no conflict - if (!\array_key_exists($k, $leftSide)) { - if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(\sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - - $leftSide[$k] = $v; - continue; - } - - if (!isset($this->children[$k])) { - if (!$this->ignoreExtraKeys || $this->removeExtraKeys) { - throw new \RuntimeException('merge() expects a normalized config array.'); - } - - $leftSide[$k] = $v; - continue; - } - - $leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v); - } - - return $leftSide; - } - - protected function allowPlaceholders(): bool - { - return false; - } -} diff --git a/vendor/symfony/config/Definition/BaseNode.php b/vendor/symfony/config/Definition/BaseNode.php deleted file mode 100644 index 9cfd6923..00000000 --- a/vendor/symfony/config/Definition/BaseNode.php +++ /dev/null @@ -1,512 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\Exception; -use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * The base node class. - * - * @author Johannes M. Schmitt - */ -abstract class BaseNode implements NodeInterface -{ - public const DEFAULT_PATH_SEPARATOR = '.'; - - private static array $placeholderUniquePrefixes = []; - private static array $placeholders = []; - - protected string $name; - protected array $normalizationClosures = []; - protected array $normalizedTypes = []; - protected array $finalValidationClosures = []; - protected bool $allowOverwrite = true; - protected bool $required = false; - protected array $deprecation = []; - protected array $equivalentValues = []; - protected array $attributes = []; - - private mixed $handlingPlaceholder = null; - - /** - * @throws \InvalidArgumentException if the name contains a period - */ - public function __construct( - ?string $name, - protected ?NodeInterface $parent = null, - protected string $pathSeparator = self::DEFAULT_PATH_SEPARATOR, - ) { - if (str_contains($name = (string) $name, $pathSeparator)) { - throw new \InvalidArgumentException('The name must not contain ".'.$pathSeparator.'".'); - } - - $this->name = $name; - } - - /** - * Register possible (dummy) values for a dynamic placeholder value. - * - * Matching configuration values will be processed with a provided value, one by one. After a provided value is - * successfully processed the configuration value is returned as is, thus preserving the placeholder. - * - * @internal - */ - public static function setPlaceholder(string $placeholder, array $values): void - { - if (!$values) { - throw new \InvalidArgumentException('At least one value must be provided.'); - } - - self::$placeholders[$placeholder] = $values; - } - - /** - * Adds a common prefix for dynamic placeholder values. - * - * Matching configuration values will be skipped from being processed and are returned as is, thus preserving the - * placeholder. An exact match provided by {@see setPlaceholder()} might take precedence. - * - * @internal - */ - public static function setPlaceholderUniquePrefix(string $prefix): void - { - self::$placeholderUniquePrefixes[] = $prefix; - } - - /** - * Resets all current placeholders available. - * - * @internal - */ - public static function resetPlaceholders(): void - { - self::$placeholderUniquePrefixes = []; - self::$placeholders = []; - } - - public function setAttribute(string $key, mixed $value): void - { - $this->attributes[$key] = $value; - } - - public function getAttribute(string $key, mixed $default = null): mixed - { - return $this->attributes[$key] ?? $default; - } - - public function hasAttribute(string $key): bool - { - return isset($this->attributes[$key]); - } - - public function getAttributes(): array - { - return $this->attributes; - } - - public function setAttributes(array $attributes): void - { - $this->attributes = $attributes; - } - - public function removeAttribute(string $key): void - { - unset($this->attributes[$key]); - } - - /** - * Sets an info message. - */ - public function setInfo(string $info): void - { - $this->setAttribute('info', $info); - } - - /** - * Returns info message. - */ - public function getInfo(): ?string - { - return $this->getAttribute('info'); - } - - /** - * Sets the example configuration for this node. - */ - public function setExample(string|array $example): void - { - $this->setAttribute('example', $example); - } - - /** - * Retrieves the example configuration for this node. - */ - public function getExample(): string|array|null - { - return $this->getAttribute('example'); - } - - /** - * Adds an equivalent value. - */ - public function addEquivalentValue(mixed $originalValue, mixed $equivalentValue): void - { - $this->equivalentValues[] = [$originalValue, $equivalentValue]; - } - - /** - * Set this node as required. - */ - public function setRequired(bool $boolean): void - { - $this->required = $boolean; - } - - /** - * Sets this node as deprecated. - * - * You can use %node% and %path% placeholders in your message to display, - * respectively, the node name and its complete path. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message the deprecation message to use - */ - public function setDeprecated(string $package, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.'): void - { - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - } - - /** - * Sets if this node can be overridden. - */ - public function setAllowOverwrite(bool $allow): void - { - $this->allowOverwrite = $allow; - } - - /** - * Sets the closures used for normalization. - * - * @param \Closure[] $closures An array of Closures used for normalization - */ - public function setNormalizationClosures(array $closures): void - { - $this->normalizationClosures = $closures; - } - - /** - * Sets the list of types supported by normalization. - * - * see ExprBuilder::TYPE_* constants. - */ - public function setNormalizedTypes(array $types): void - { - $this->normalizedTypes = $types; - } - - /** - * Gets the list of types supported by normalization. - * - * see ExprBuilder::TYPE_* constants. - */ - public function getNormalizedTypes(): array - { - return $this->normalizedTypes; - } - - /** - * Sets the closures used for final validation. - * - * @param \Closure[] $closures An array of Closures used for final validation - */ - public function setFinalValidationClosures(array $closures): void - { - $this->finalValidationClosures = $closures; - } - - public function isRequired(): bool - { - return $this->required; - } - - /** - * Checks if this node is deprecated. - */ - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @param string $node The configuration node name - * @param string $path The path of the node - */ - public function getDeprecation(string $node, string $path): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => strtr($this->deprecation['message'], ['%node%' => $node, '%path%' => $path]), - ]; - } - - public function getName(): string - { - return $this->name; - } - - public function getPath(): string - { - if (null !== $this->parent) { - return $this->parent->getPath().$this->pathSeparator.$this->name; - } - - return $this->name; - } - - final public function merge(mixed $leftSide, mixed $rightSide): mixed - { - if (!$this->allowOverwrite) { - throw new ForbiddenOverwriteException(\sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath())); - } - - if ($leftSide !== $leftPlaceholders = self::resolvePlaceholderValue($leftSide)) { - foreach ($leftPlaceholders as $leftPlaceholder) { - $this->handlingPlaceholder = $leftSide; - try { - $this->merge($leftPlaceholder, $rightSide); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $rightSide; - } - - if ($rightSide !== $rightPlaceholders = self::resolvePlaceholderValue($rightSide)) { - foreach ($rightPlaceholders as $rightPlaceholder) { - $this->handlingPlaceholder = $rightSide; - try { - $this->merge($leftSide, $rightPlaceholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $rightSide; - } - - $this->doValidateType($leftSide); - $this->doValidateType($rightSide); - - return $this->mergeValues($leftSide, $rightSide); - } - - final public function normalize(mixed $value): mixed - { - $value = $this->preNormalize($value); - - // run custom normalization closures - foreach ($this->normalizationClosures as $closure) { - $value = $closure($value); - } - - // resolve placeholder value - if ($value !== $placeholders = self::resolvePlaceholderValue($value)) { - foreach ($placeholders as $placeholder) { - $this->handlingPlaceholder = $value; - try { - $this->normalize($placeholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $value; - } - - // replace value with their equivalent - foreach ($this->equivalentValues as $data) { - if ($data[0] === $value) { - $value = $data[1]; - } - } - - // validate type - $this->doValidateType($value); - - // normalize value - return $this->normalizeValue($value); - } - - /** - * Normalizes the value before any other normalization is applied. - */ - protected function preNormalize(mixed $value): mixed - { - return $value; - } - - /** - * Returns parent node for this node. - */ - public function getParent(): ?NodeInterface - { - return $this->parent; - } - - final public function finalize(mixed $value): mixed - { - if ($value !== $placeholders = self::resolvePlaceholderValue($value)) { - foreach ($placeholders as $placeholder) { - $this->handlingPlaceholder = $value; - try { - $this->finalize($placeholder); - } finally { - $this->handlingPlaceholder = null; - } - } - - return $value; - } - - $this->doValidateType($value); - - $value = $this->finalizeValue($value); - - // Perform validation on the final value if a closure has been set. - // The closure is also allowed to return another value. - foreach ($this->finalValidationClosures as $closure) { - try { - $value = $closure($value); - } catch (Exception $e) { - if ($e instanceof UnsetKeyException && null !== $this->handlingPlaceholder) { - continue; - } - - throw $e; - } catch (\Exception $e) { - throw new InvalidConfigurationException(\sprintf('Invalid configuration for path "%s": ', $this->getPath()).$e->getMessage(), $e->getCode(), $e); - } - } - - return $value; - } - - /** - * Validates the type of a Node. - * - * @throws InvalidTypeException when the value is invalid - */ - abstract protected function validateType(mixed $value): void; - - /** - * Normalizes the value. - */ - abstract protected function normalizeValue(mixed $value): mixed; - - /** - * Merges two values together. - */ - abstract protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed; - - /** - * Finalizes a value. - */ - abstract protected function finalizeValue(mixed $value): mixed; - - /** - * Tests if placeholder values are allowed for this node. - */ - protected function allowPlaceholders(): bool - { - return true; - } - - /** - * Tests if a placeholder is being handled currently. - */ - protected function isHandlingPlaceholder(): bool - { - return null !== $this->handlingPlaceholder; - } - - /** - * Gets allowed dynamic types for this node. - */ - protected function getValidPlaceholderTypes(): array - { - return []; - } - - private static function resolvePlaceholderValue(mixed $value): mixed - { - if (\is_string($value)) { - if (isset(self::$placeholders[$value])) { - return self::$placeholders[$value]; - } - - foreach (self::$placeholderUniquePrefixes as $placeholderUniquePrefix) { - if (str_starts_with($value, $placeholderUniquePrefix)) { - return []; - } - } - } - - return $value; - } - - private function doValidateType(mixed $value): void - { - if (null !== $this->handlingPlaceholder && !$this->allowPlaceholders()) { - $e = new InvalidTypeException(\sprintf('A dynamic value is not compatible with a "%s" node type at path "%s".', static::class, $this->getPath())); - $e->setPath($this->getPath()); - - throw $e; - } - - if (null === $this->handlingPlaceholder || null === $value) { - $this->validateType($value); - - return; - } - - $knownTypes = array_keys(self::$placeholders[$this->handlingPlaceholder]); - $validTypes = $this->getValidPlaceholderTypes(); - - if ($validTypes && array_diff($knownTypes, $validTypes)) { - $e = new InvalidTypeException(\sprintf( - 'Invalid type for path "%s". Expected %s, but got %s.', - $this->getPath(), - 1 === \count($validTypes) ? '"'.reset($validTypes).'"' : 'one of "'.implode('", "', $validTypes).'"', - 1 === \count($knownTypes) ? '"'.reset($knownTypes).'"' : 'one of "'.implode('", "', $knownTypes).'"' - )); - if ($hint = $this->getInfo()) { - $e->addHint($hint); - } - $e->setPath($this->getPath()); - - throw $e; - } - - $this->validateType($value); - } -} diff --git a/vendor/symfony/config/Definition/BooleanNode.php b/vendor/symfony/config/Definition/BooleanNode.php deleted file mode 100644 index b4ed0f0e..00000000 --- a/vendor/symfony/config/Definition/BooleanNode.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a Boolean value in the config tree. - * - * @author Johannes M. Schmitt - */ -class BooleanNode extends ScalarNode -{ - public function __construct( - ?string $name, - ?NodeInterface $parent = null, - string $pathSeparator = self::DEFAULT_PATH_SEPARATOR, - private bool $nullable = false, - ) { - parent::__construct($name, $parent, $pathSeparator); - } - - protected function validateType(mixed $value): void - { - if (!\is_bool($value)) { - if (null === $value && $this->nullable) { - return; - } - - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "bool%s", but got "%s".', $this->getPath(), $this->nullable ? '" or "null' : '', get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - protected function isValueEmpty(mixed $value): bool - { - // a boolean value cannot be empty - return false; - } - - protected function getValidPlaceholderTypes(): array - { - return ['bool']; - } -} diff --git a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php deleted file mode 100644 index 6d20316b..00000000 --- a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php +++ /dev/null @@ -1,528 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; - -/** - * This class provides a fluent interface for defining an array node. - * - * @author Johannes M. Schmitt - */ -class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface -{ - protected bool $performDeepMerging = true; - protected bool $ignoreExtraKeys = false; - protected bool $removeExtraKeys = true; - protected array $children = []; - protected NodeDefinition $prototype; - protected bool $atLeastOne = false; - protected bool $allowNewKeys = true; - protected ?string $key = null; - protected bool $removeKeyItem = false; - protected bool $addDefaults = false; - protected int|string|array|false|null $addDefaultChildren = false; - protected NodeBuilder $nodeBuilder; - protected bool $normalizeKeys = true; - - public function __construct(?string $name, ?NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = []; - $this->trueEquivalent = []; - } - - public function setBuilder(NodeBuilder $builder): void - { - $this->nodeBuilder = $builder; - } - - public function children(): NodeBuilder - { - return $this->getNodeBuilder(); - } - - /** - * Sets a prototype for child nodes. - */ - public function prototype(string $type): NodeDefinition - { - return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this); - } - - public function variablePrototype(): VariableNodeDefinition - { - return $this->prototype('variable'); - } - - public function scalarPrototype(): ScalarNodeDefinition - { - return $this->prototype('scalar'); - } - - public function stringPrototype(): StringNodeDefinition - { - return $this->prototype('string'); - } - - public function booleanPrototype(): BooleanNodeDefinition - { - return $this->prototype('boolean'); - } - - public function integerPrototype(): IntegerNodeDefinition - { - return $this->prototype('integer'); - } - - public function floatPrototype(): FloatNodeDefinition - { - return $this->prototype('float'); - } - - public function arrayPrototype(): self - { - return $this->prototype('array'); - } - - public function enumPrototype(): EnumNodeDefinition - { - return $this->prototype('enum'); - } - - /** - * Adds the default value if the node is not set in the configuration. - * - * This method is applicable to concrete nodes only (not to prototype nodes). - * If this function has been called and the node is not set during the finalization - * phase, it's default value will be derived from its children default values. - * - * @return $this - */ - public function addDefaultsIfNotSet(): static - { - $this->addDefaults = true; - - return $this; - } - - /** - * Adds children with a default value when none are defined. - * - * This method is applicable to prototype nodes only. - * - * @param int|string|array|null $children The number of children|The child name|The children names to be added - * - * @return $this - */ - public function addDefaultChildrenIfNoneSet(int|string|array|null $children = null): static - { - $this->addDefaultChildren = $children; - - return $this; - } - - /** - * Requires the node to have at least one element. - * - * This method is applicable to prototype nodes only. - * - * @return $this - */ - public function requiresAtLeastOneElement(): static - { - $this->atLeastOne = true; - - return $this; - } - - /** - * Disallows adding news keys in a subsequent configuration. - * - * If used all keys have to be defined in the same configuration file. - * - * @return $this - */ - public function disallowNewKeysInSubsequentConfigs(): static - { - $this->allowNewKeys = false; - - return $this; - } - - /** - * Sets a normalization rule for XML configurations. - * - * @param string $singular The key to remap - * @param string|null $plural The plural of the key for irregular plurals - * - * @return $this - */ - public function fixXmlConfig(string $singular, ?string $plural = null): static - { - $this->normalization()->remap($singular, $plural); - - return $this; - } - - /** - * Sets the attribute which value is to be used as key. - * - * This is useful when you have an indexed array that should be an - * associative array. You can select an item from within the array - * to be the key of the particular item. For example, if "id" is the - * "key", then: - * - * [ - * ['id' => 'my_name', 'foo' => 'bar'], - * ]; - * - * becomes - * - * [ - * 'my_name' => ['foo' => 'bar'], - * ]; - * - * If you'd like "'id' => 'my_name'" to still be present in the resulting - * array, then you can set the second argument of this method to false. - * - * This method is applicable to prototype nodes only. - * - * @param string $name The name of the key - * @param bool $removeKeyItem Whether or not the key item should be removed - * - * @return $this - */ - public function useAttributeAsKey(string $name, bool $removeKeyItem = true): static - { - $this->key = $name; - $this->removeKeyItem = $removeKeyItem; - - return $this; - } - - /** - * Sets whether the node can be unset. - * - * @return $this - */ - public function canBeUnset(bool $allow = true): static - { - $this->merge()->allowUnset($allow); - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is disabled. If any configuration is specified then - * the node will be automatically enabled: - * - * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden - * enableableArrayNode: ~ # The config is enabled & use the default values - * enableableArrayNode: true # The config is enabled & use the default values - * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden - * enableableArrayNode: {enabled: false, ...} # The config is disabled - * enableableArrayNode: false # The config is disabled - * - * @param string|null $info A description of what happens when the node is enabled or disabled - * - * @return $this - */ - public function canBeEnabled(/* ?string $info = null */): static - { - $disabledNode = $this - ->addDefaultsIfNotSet() - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->beforeNormalization() - ->ifArray() - ->then(function (array $v) { - $v['enabled'] ??= true; - - return $v; - }) - ->end() - ->children() - ->booleanNode('enabled') - ->defaultFalse() - ; - - $info = 1 <= \func_num_args() ? func_get_arg(0) : null; - if ($info) { - $disabledNode->info($info); - } - - return $this; - } - - /** - * Adds an "enabled" boolean to enable the current section. - * - * By default, the section is enabled. - * - * @param string|null $info A description of what happens when the node is enabled or disabled - * - * @return $this - */ - public function canBeDisabled(/* ?string $info = null */): static - { - $enabledNode = $this - ->addDefaultsIfNotSet() - ->treatFalseLike(['enabled' => false]) - ->treatTrueLike(['enabled' => true]) - ->treatNullLike(['enabled' => true]) - ->children() - ->booleanNode('enabled') - ->defaultTrue() - ; - - $info = 1 <= \func_num_args() ? func_get_arg(0) : null; - if ($info) { - $enabledNode->info($info); - } - - return $this; - } - - /** - * Disables the deep merging of the node. - * - * @return $this - */ - public function performNoDeepMerging(): static - { - $this->performDeepMerging = false; - - return $this; - } - - /** - * Allows extra config keys to be specified under an array without - * throwing an exception. - * - * Those config values are ignored and removed from the resulting - * array. This should be used only in special cases where you want - * to send an entire configuration array through a special tree that - * processes only part of the array. - * - * @param bool $remove Whether to remove the extra keys - * - * @return $this - */ - public function ignoreExtraKeys(bool $remove = true): static - { - $this->ignoreExtraKeys = true; - $this->removeExtraKeys = $remove; - - return $this; - } - - /** - * Sets whether to enable key normalization. - * - * @return $this - */ - public function normalizeKeys(bool $bool): static - { - $this->normalizeKeys = $bool; - - return $this; - } - - public function append(NodeDefinition $node): static - { - $this->children[$node->name ?? ''] = $node->setParent($this); - - return $this; - } - - /** - * Returns a node builder to be used to add children and prototype. - */ - protected function getNodeBuilder(): NodeBuilder - { - $this->nodeBuilder ??= new NodeBuilder(); - - return $this->nodeBuilder->setParent($this); - } - - protected function createNode(): NodeInterface - { - if (!isset($this->prototype)) { - $node = new ArrayNode($this->name, $this->parent, $this->pathSeparator); - - $this->validateConcreteNode($node); - - $node->setAddIfNotSet($this->addDefaults); - - foreach ($this->children as $child) { - $child->parent = $node; - $node->addChild($child->getNode()); - } - } else { - $node = new PrototypedArrayNode($this->name, $this->parent, $this->pathSeparator); - - $this->validatePrototypeNode($node); - - if (null !== $this->key) { - $node->setKeyAttribute($this->key, $this->removeKeyItem); - } - - if (true === $this->atLeastOne || false === $this->allowEmptyValue) { - $node->setMinNumberOfElements(1); - } - - if ($this->default) { - if (!\is_array($this->defaultValue)) { - throw new \InvalidArgumentException(\sprintf('%s: the default value of an array node has to be an array.', $node->getPath())); - } - - $node->setDefaultValue($this->defaultValue); - } - - if (false !== $this->addDefaultChildren) { - $node->setAddChildrenIfNoneSet($this->addDefaultChildren); - if ($this->prototype instanceof static && !isset($this->prototype->prototype)) { - $this->prototype->addDefaultsIfNotSet(); - } - } - - $this->prototype->parent = $node; - $node->setPrototype($this->prototype->getNode()); - } - - $node->setAllowNewKeys($this->allowNewKeys); - $node->addEquivalentValue(null, $this->nullEquivalent); - $node->addEquivalentValue(true, $this->trueEquivalent); - $node->addEquivalentValue(false, $this->falseEquivalent); - $node->setPerformDeepMerging($this->performDeepMerging); - $node->setRequired($this->required); - $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys); - $node->setNormalizeKeys($this->normalizeKeys); - - if ($this->deprecation) { - $node->setDeprecated($this->deprecation['package'], $this->deprecation['version'], $this->deprecation['message']); - } - - if (isset($this->normalization)) { - $node->setNormalizationClosures($this->normalization->before); - $node->setNormalizedTypes($this->normalization->declaredTypes); - $node->setXmlRemappings($this->normalization->remappings); - } - - if (isset($this->merge)) { - $node->setAllowOverwrite($this->merge->allowOverwrite); - $node->setAllowFalse($this->merge->allowFalse); - } - - if (isset($this->validation)) { - $node->setFinalValidationClosures($this->validation->rules); - } - - return $node; - } - - /** - * Validate the configuration of a concrete node. - * - * @throws InvalidDefinitionException - */ - protected function validateConcreteNode(ArrayNode $node): void - { - $path = $node->getPath(); - - if (null !== $this->key) { - throw new InvalidDefinitionException(\sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (false === $this->allowEmptyValue) { - throw new InvalidDefinitionException(\sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (true === $this->atLeastOne) { - throw new InvalidDefinitionException(\sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path)); - } - - if ($this->default) { - throw new InvalidDefinitionException(\sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path)); - } - - if (false !== $this->addDefaultChildren) { - throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path)); - } - } - - /** - * Validate the configuration of a prototype node. - * - * @throws InvalidDefinitionException - */ - protected function validatePrototypeNode(PrototypedArrayNode $node): void - { - $path = $node->getPath(); - - if ($this->addDefaults) { - throw new InvalidDefinitionException(\sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path)); - } - - if (false !== $this->addDefaultChildren) { - if ($this->default) { - throw new InvalidDefinitionException(\sprintf('A default value and default children might not be used together at path "%s".', $path)); - } - - if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) { - throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path)); - } - - if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) { - throw new InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path)); - } - } - } - - /** - * @return NodeDefinition[] - */ - public function getChildNodeDefinitions(): array - { - return $this->children; - } - - /** - * Finds a node defined by the given $nodePath. - * - * @param string $nodePath The path of the node to find. e.g "doctrine.orm.mappings" - */ - public function find(string $nodePath): NodeDefinition - { - $firstPathSegment = (false === $pathSeparatorPos = strpos($nodePath, $this->pathSeparator)) - ? $nodePath - : substr($nodePath, 0, $pathSeparatorPos); - - if (null === $node = ($this->children[$firstPathSegment] ?? null)) { - throw new \RuntimeException(\sprintf('Node with name "%s" does not exist in the current node "%s".', $firstPathSegment, $this->name)); - } - - if (false === $pathSeparatorPos) { - return $node; - } - - return $node->find(substr($nodePath, $pathSeparatorPos + \strlen($this->pathSeparator))); - } -} diff --git a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php deleted file mode 100644 index bc03c9c9..00000000 --- a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\BooleanNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class BooleanNodeDefinition extends ScalarNodeDefinition -{ - public function __construct(?string $name, ?NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = true; - } - - /** - * Instantiate a Node. - */ - protected function instantiateNode(): BooleanNode - { - return new BooleanNode($this->name, $this->parent, $this->pathSeparator, null === $this->nullEquivalent); - } - - /** - * @throws InvalidDefinitionException - */ - public function cannotBeEmpty(): static - { - throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.'); - } - - public function defaultNull(): static - { - $this->nullEquivalent = null; - - return parent::defaultNull(); - } - - public function defaultValue(mixed $value): static - { - if (null === $value) { - $this->nullEquivalent = null; - } - - return parent::defaultValue($value); - } -} diff --git a/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php b/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php deleted file mode 100644 index cf646a14..00000000 --- a/vendor/symfony/config/Definition/Builder/BuilderAwareInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that can be implemented by nodes which build other nodes. - * - * @author Roland Franssen - */ -interface BuilderAwareInterface -{ - /** - * Sets a custom children builder. - */ - public function setBuilder(NodeBuilder $builder): void; -} diff --git a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php b/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php deleted file mode 100644 index a020c5f2..00000000 --- a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\EnumNode; - -/** - * Enum Node Definition. - * - * @author Johannes M. Schmitt - */ -class EnumNodeDefinition extends ScalarNodeDefinition -{ - private array $values; - private string $enumFqcn; - - /** - * @return $this - */ - public function values(array $values): static - { - if (!$values) { - throw new \InvalidArgumentException('->values() must be called with at least one value.'); - } - - $this->values = $values; - - return $this; - } - - /** - * @param class-string<\UnitEnum> $enumFqcn - * - * @return $this - */ - public function enumFqcn(string $enumFqcn): static - { - if (!enum_exists($enumFqcn)) { - throw new \InvalidArgumentException(\sprintf('The enum class "%s" does not exist.', $enumFqcn)); - } - - $this->enumFqcn = $enumFqcn; - - return $this; - } - - /** - * Instantiate a Node. - * - * @throws \RuntimeException - */ - protected function instantiateNode(): EnumNode - { - if (!isset($this->values) && !isset($this->enumFqcn)) { - throw new \RuntimeException('You must call either ->values() or ->enumFqcn() on enum nodes.'); - } - - if (isset($this->values) && isset($this->enumFqcn)) { - throw new \RuntimeException('You must call either ->values() or ->enumFqcn() on enum nodes but not both.'); - } - - return new EnumNode($this->name, $this->parent, $this->values ?? [], $this->pathSeparator, $this->enumFqcn ?? null); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/vendor/symfony/config/Definition/Builder/ExprBuilder.php deleted file mode 100644 index 624e22d5..00000000 --- a/vendor/symfony/config/Definition/Builder/ExprBuilder.php +++ /dev/null @@ -1,265 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * This class builds an if expression. - * - * @author Johannes M. Schmitt - * @author Christophe Coevoet - */ -class ExprBuilder -{ - public const TYPE_ANY = 'any'; - public const TYPE_STRING = 'string'; - public const TYPE_NULL = 'null'; - public const TYPE_ARRAY = 'array'; - - public string $allowedTypes; - public ?\Closure $ifPart = null; - public ?\Closure $thenPart = null; - - public function __construct( - protected NodeDefinition $node, - ) { - } - - /** - * Marks the expression as being always used. - * - * @return $this - */ - public function always(?\Closure $then = null): static - { - $this->ifPart = static fn () => true; - $this->allowedTypes = self::TYPE_ANY; - - if (null !== $then) { - $this->thenPart = $then; - } - - return $this; - } - - /** - * Sets a closure to use as tests. - * - * The default one tests if the value is true. - * - * @return $this - */ - public function ifTrue(?\Closure $closure = null): static - { - $this->ifPart = $closure ?? static fn ($v) => true === $v; - $this->allowedTypes = self::TYPE_ANY; - - return $this; - } - - /** - * Sets a closure to use as tests. - * - * The default one tests if the value is false. - * - * @return $this - */ - public function ifFalse(?\Closure $closure = null): static - { - $this->ifPart = $closure ? static fn ($v) => !$closure($v) : static fn ($v) => false === $v; - $this->allowedTypes = self::TYPE_ANY; - - return $this; - } - - /** - * Tests if the value is a string. - * - * @return $this - */ - public function ifString(): static - { - $this->ifPart = \is_string(...); - $this->allowedTypes = self::TYPE_STRING; - - return $this; - } - - /** - * Tests if the value is null. - * - * @return $this - */ - public function ifNull(): static - { - $this->ifPart = \is_null(...); - $this->allowedTypes = self::TYPE_NULL; - - return $this; - } - - /** - * Tests if the value is empty. - * - * @return $this - */ - public function ifEmpty(): static - { - $this->ifPart = static fn ($v) => !$v; - $this->allowedTypes = self::TYPE_ANY; - - return $this; - } - - /** - * Tests if the value is an array. - * - * @return $this - */ - public function ifArray(): static - { - $this->ifPart = \is_array(...); - $this->allowedTypes = self::TYPE_ARRAY; - - return $this; - } - - /** - * Tests if the value is in an array. - * - * @return $this - */ - public function ifInArray(array $array): static - { - $this->ifPart = static fn ($v) => \in_array($v, $array, true); - $this->allowedTypes = self::TYPE_ANY; - - return $this; - } - - /** - * Tests if the value is not in an array. - * - * @return $this - */ - public function ifNotInArray(array $array): static - { - $this->ifPart = static fn ($v) => !\in_array($v, $array, true); - $this->allowedTypes = self::TYPE_ANY; - - return $this; - } - - /** - * Transforms variables of any type into an array. - * - * @return $this - */ - public function castToArray(): static - { - $this->ifPart = static fn ($v) => !\is_array($v); - $this->allowedTypes = self::TYPE_ANY; - $this->thenPart = static fn ($v) => [$v]; - - return $this; - } - - /** - * Sets the closure to run if the test pass. - * - * @return $this - */ - public function then(\Closure $closure): static - { - $this->thenPart = $closure; - - return $this; - } - - /** - * Sets a closure returning an empty array. - * - * @return $this - */ - public function thenEmptyArray(): static - { - $this->thenPart = static fn () => []; - - return $this; - } - - /** - * Sets a closure marking the value as invalid at processing time. - * - * if you want to add the value of the node in your message just use a %s placeholder. - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function thenInvalid(string $message): static - { - $this->thenPart = static fn ($v) => throw new \InvalidArgumentException(\sprintf($message, json_encode($v))); - - return $this; - } - - /** - * Sets a closure unsetting this key of the array at processing time. - * - * @return $this - * - * @throws UnsetKeyException - */ - public function thenUnset(): static - { - $this->thenPart = static fn () => throw new UnsetKeyException('Unsetting key.'); - - return $this; - } - - /** - * Returns the related node. - * - * @throws \RuntimeException - */ - public function end(): NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition - { - if (null === $this->ifPart) { - throw new \RuntimeException('You must specify an if part.'); - } - if (null === $this->thenPart) { - throw new \RuntimeException('You must specify a then part.'); - } - - return $this->node; - } - - /** - * Builds the expressions. - * - * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build - */ - public static function buildExpressions(array $expressions): array - { - foreach ($expressions as $k => $expr) { - if ($expr instanceof self) { - $if = $expr->ifPart; - $then = $expr->thenPart; - $expressions[$k] = static fn ($v) => $if($v) ? $then($v) : $v; - } - } - - return $expressions; - } -} diff --git a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php b/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php deleted file mode 100644 index 337e971b..00000000 --- a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\FloatNode; - -/** - * This class provides a fluent interface for defining a float node. - * - * @author Jeanmonod David - */ -class FloatNodeDefinition extends NumericNodeDefinition -{ - /** - * Instantiates a Node. - */ - protected function instantiateNode(): FloatNode - { - return new FloatNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php b/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php deleted file mode 100644 index 2af81df4..00000000 --- a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\IntegerNode; - -/** - * This class provides a fluent interface for defining an integer node. - * - * @author Jeanmonod David - */ -class IntegerNodeDefinition extends NumericNodeDefinition -{ - /** - * Instantiates a Node. - */ - protected function instantiateNode(): IntegerNode - { - return new IntegerNode($this->name, $this->parent, $this->min, $this->max, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/MergeBuilder.php b/vendor/symfony/config/Definition/Builder/MergeBuilder.php deleted file mode 100644 index b90865cf..00000000 --- a/vendor/symfony/config/Definition/Builder/MergeBuilder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds merge conditions. - * - * @author Johannes M. Schmitt - */ -class MergeBuilder -{ - public bool $allowFalse = false; - public bool $allowOverwrite = true; - - public function __construct( - protected NodeDefinition $node, - ) { - } - - /** - * Sets whether the node can be unset. - * - * @return $this - */ - public function allowUnset(bool $allow = true): static - { - $this->allowFalse = $allow; - - return $this; - } - - /** - * Sets whether the node can be overwritten. - * - * @return $this - */ - public function denyOverwrite(bool $deny = true): static - { - $this->allowOverwrite = !$deny; - - return $this; - } - - /** - * Returns the related node. - */ - public function end(): NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition - { - return $this->node; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/vendor/symfony/config/Definition/Builder/NodeBuilder.php deleted file mode 100644 index b3fa7bfd..00000000 --- a/vendor/symfony/config/Definition/Builder/NodeBuilder.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class provides a fluent interface for building a node. - * - * @author Johannes M. Schmitt - */ -class NodeBuilder implements NodeParentInterface -{ - protected (NodeDefinition&ParentNodeDefinitionInterface)|null $parent = null; - protected array $nodeMapping; - - public function __construct() - { - $this->nodeMapping = [ - 'variable' => VariableNodeDefinition::class, - 'scalar' => ScalarNodeDefinition::class, - 'boolean' => BooleanNodeDefinition::class, - 'integer' => IntegerNodeDefinition::class, - 'float' => FloatNodeDefinition::class, - 'array' => ArrayNodeDefinition::class, - 'enum' => EnumNodeDefinition::class, - 'string' => StringNodeDefinition::class, - ]; - } - - /** - * Set the parent node. - * - * @return $this - */ - public function setParent((NodeDefinition&ParentNodeDefinitionInterface)|null $parent): static - { - $this->parent = $parent; - - return $this; - } - - /** - * Creates a child array node. - */ - public function arrayNode(string $name): ArrayNodeDefinition - { - return $this->node($name, 'array'); - } - - /** - * Creates a child scalar node. - */ - public function scalarNode(string $name): ScalarNodeDefinition - { - return $this->node($name, 'scalar'); - } - - /** - * Creates a child Boolean node. - */ - public function booleanNode(string $name): BooleanNodeDefinition - { - return $this->node($name, 'boolean'); - } - - /** - * Creates a child integer node. - */ - public function integerNode(string $name): IntegerNodeDefinition - { - return $this->node($name, 'integer'); - } - - /** - * Creates a child float node. - */ - public function floatNode(string $name): FloatNodeDefinition - { - return $this->node($name, 'float'); - } - - /** - * Creates a child EnumNode. - */ - public function enumNode(string $name): EnumNodeDefinition - { - return $this->node($name, 'enum'); - } - - /** - * Creates a child variable node. - */ - public function variableNode(string $name): VariableNodeDefinition - { - return $this->node($name, 'variable'); - } - - /** - * Creates a child string node. - */ - public function stringNode(string $name): StringNodeDefinition - { - return $this->node($name, 'string'); - } - - /** - * Returns the parent node. - */ - public function end(): NodeDefinition&ParentNodeDefinitionInterface - { - return $this->parent; - } - - /** - * Creates a child node. - * - * @throws \RuntimeException When the node type is not registered - * @throws \RuntimeException When the node class is not found - */ - public function node(?string $name, string $type): NodeDefinition - { - $class = $this->getNodeClass($type); - - $node = new $class($name); - - $this->append($node); - - return $node; - } - - /** - * Appends a node definition. - * - * Usage: - * - * $node = new ArrayNodeDefinition('name') - * ->children() - * ->scalarNode('foo')->end() - * ->scalarNode('baz')->end() - * ->append($this->getBarNodeDefinition()) - * ->end() - * ; - * - * @return $this - */ - public function append(NodeDefinition $node): static - { - if ($node instanceof BuilderAwareInterface) { - $builder = clone $this; - $builder->setParent(null); - $node->setBuilder($builder); - } - - if (null !== $this->parent) { - $this->parent->append($node); - // Make this builder the node parent to allow for a fluid interface - $node->setParent($this); - } - - return $this; - } - - /** - * Adds or overrides a node Type. - * - * @param string $type The name of the type - * @param string $class The fully qualified name the node definition class - * - * @return $this - */ - public function setNodeClass(string $type, string $class): static - { - $this->nodeMapping[strtolower($type)] = $class; - - return $this; - } - - /** - * Returns the class name of the node definition. - * - * @throws \RuntimeException When the node type is not registered - * @throws \RuntimeException When the node class is not found - */ - protected function getNodeClass(string $type): string - { - $type = strtolower($type); - - if (!isset($this->nodeMapping[$type])) { - throw new \RuntimeException(\sprintf('The node type "%s" is not registered.', $type)); - } - - $class = $this->nodeMapping[$type]; - - if (!class_exists($class)) { - throw new \RuntimeException(\sprintf('The node class "%s" does not exist.', $class)); - } - - return $class; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/vendor/symfony/config/Definition/Builder/NodeDefinition.php deleted file mode 100644 index fdfbdabd..00000000 --- a/vendor/symfony/config/Definition/Builder/NodeDefinition.php +++ /dev/null @@ -1,359 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Composer\InstalledVersions; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; -use Symfony\Component\Config\Definition\NodeInterface; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -abstract class NodeDefinition implements NodeParentInterface -{ - protected ?string $name = null; - protected NormalizationBuilder $normalization; - protected ValidationBuilder $validation; - protected mixed $defaultValue; - protected bool $default = false; - protected bool $required = false; - protected array $deprecation = []; - protected MergeBuilder $merge; - protected bool $allowEmptyValue = true; - protected mixed $nullEquivalent = null; - protected mixed $trueEquivalent = true; - protected mixed $falseEquivalent = false; - protected string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR; - protected NodeParentInterface|NodeInterface|null $parent; - protected array $attributes = []; - - public function __construct(?string $name, ?NodeParentInterface $parent = null) - { - $this->parent = $parent; - $this->name = $name; - } - - /** - * Sets the parent node. - * - * @return $this - */ - public function setParent(NodeParentInterface $parent): static - { - $this->parent = $parent; - - return $this; - } - - /** - * Sets info message. - * - * @return $this - */ - public function info(string $info): static - { - return $this->attribute('info', $info); - } - - /** - * Sets example configuration. - * - * @return $this - */ - public function example(string|array $example): static - { - return $this->attribute('example', $example); - } - - /** - * Sets the documentation URI, as usually put in the "@see" tag of a doc block. This - * can either be a URL or a file path. You can use the placeholders {package}, - * {version:major} and {version:minor} in the URI. - * - * @return $this - */ - public function docUrl(string $uri, ?string $package = null): static - { - if ($package) { - preg_match('/^(\d+)\.(\d+)\.(\d+)/', InstalledVersions::getVersion($package) ?? '', $m); - } - - return $this->attribute('docUrl', strtr($uri, [ - '{package}' => $package ?? '', - '{version:major}' => $m[1] ?? '', - '{version:minor}' => $m[2] ?? '', - ])); - } - - /** - * Sets an attribute on the node. - * - * @return $this - */ - public function attribute(string $key, mixed $value): static - { - $this->attributes[$key] = $value; - - return $this; - } - - /** - * Returns the parent node. - * - * @return NodeParentInterface|NodeBuilder|self|ArrayNodeDefinition|VariableNodeDefinition - */ - public function end(): NodeParentInterface - { - return $this->parent; - } - - /** - * Creates the node. - */ - public function getNode(bool $forceRootNode = false): NodeInterface - { - if ($forceRootNode) { - $this->parent = null; - } - - if (isset($this->normalization)) { - $allowedTypes = []; - foreach ($this->normalization->before as $expr) { - $allowedTypes[] = $expr->allowedTypes; - } - $allowedTypes = array_unique($allowedTypes); - $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before); - $this->normalization->declaredTypes = $allowedTypes; - } - - if (isset($this->validation)) { - $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules); - } - - $node = $this->createNode(); - if ($node instanceof BaseNode) { - $node->setAttributes($this->attributes); - } - - return $node; - } - - /** - * Sets the default value. - * - * @return $this - */ - public function defaultValue(mixed $value): static - { - $this->default = true; - $this->defaultValue = $value; - - return $this; - } - - /** - * Sets the node as required. - * - * @return $this - */ - public function isRequired(): static - { - $this->required = true; - - return $this; - } - - /** - * Sets the node as deprecated. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message the deprecation message to use - * - * You can use %node% and %path% placeholders in your message to display, - * respectively, the node name and its complete path - * - * @return $this - */ - public function setDeprecated(string $package, string $version, string $message = 'The child node "%node%" at path "%path%" is deprecated.'): static - { - $this->deprecation = [ - 'package' => $package, - 'version' => $version, - 'message' => $message, - ]; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains null. - * - * @return $this - */ - public function treatNullLike(mixed $value): static - { - $this->nullEquivalent = $value; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains true. - * - * @return $this - */ - public function treatTrueLike(mixed $value): static - { - $this->trueEquivalent = $value; - - return $this; - } - - /** - * Sets the equivalent value used when the node contains false. - * - * @return $this - */ - public function treatFalseLike(mixed $value): static - { - $this->falseEquivalent = $value; - - return $this; - } - - /** - * Sets null as the default value. - * - * @return $this - */ - public function defaultNull(): static - { - return $this->defaultValue(null); - } - - /** - * Sets true as the default value. - * - * @return $this - */ - public function defaultTrue(): static - { - return $this->defaultValue(true); - } - - /** - * Sets false as the default value. - * - * @return $this - */ - public function defaultFalse(): static - { - return $this->defaultValue(false); - } - - /** - * Sets an expression to run before the normalization. - */ - public function beforeNormalization(): ExprBuilder - { - return $this->normalization()->before(); - } - - /** - * Denies the node value being empty. - * - * @return $this - */ - public function cannotBeEmpty(): static - { - $this->allowEmptyValue = false; - - return $this; - } - - /** - * Sets an expression to run for the validation. - * - * The expression receives the value of the node and must return it. It can - * modify it. - * An exception should be thrown when the node is not valid. - */ - public function validate(): ExprBuilder - { - return $this->validation()->rule(); - } - - /** - * Sets whether the node can be overwritten. - * - * @return $this - */ - public function cannotBeOverwritten(bool $deny = true): static - { - $this->merge()->denyOverwrite($deny); - - return $this; - } - - /** - * Gets the builder for validation rules. - */ - protected function validation(): ValidationBuilder - { - return $this->validation ??= new ValidationBuilder($this); - } - - /** - * Gets the builder for merging rules. - */ - protected function merge(): MergeBuilder - { - return $this->merge ??= new MergeBuilder($this); - } - - /** - * Gets the builder for normalization rules. - */ - protected function normalization(): NormalizationBuilder - { - return $this->normalization ??= new NormalizationBuilder($this); - } - - /** - * Instantiate and configure the node according to this definition. - * - * @throws InvalidDefinitionException When the definition is invalid - */ - abstract protected function createNode(): NodeInterface; - - /** - * Set PathSeparator to use. - * - * @return $this - */ - public function setPathSeparator(string $separator): static - { - if ($this instanceof ParentNodeDefinitionInterface) { - foreach ($this->getChildNodeDefinitions() as $child) { - $child->setPathSeparator($separator); - } - } - - $this->pathSeparator = $separator; - - return $this; - } -} diff --git a/vendor/symfony/config/Definition/Builder/NodeParentInterface.php b/vendor/symfony/config/Definition/Builder/NodeParentInterface.php deleted file mode 100644 index 305e9931..00000000 --- a/vendor/symfony/config/Definition/Builder/NodeParentInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that must be implemented by all node parents. - * - * @author Victor Berchet - */ -interface NodeParentInterface -{ -} diff --git a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php b/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php deleted file mode 100644 index 8a8141c1..00000000 --- a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds normalization conditions. - * - * @author Johannes M. Schmitt - */ -class NormalizationBuilder -{ - public array $before = []; - public array $declaredTypes = []; - public array $remappings = []; - - public function __construct( - protected NodeDefinition $node, - ) { - } - - /** - * Registers a key to remap to its plural form. - * - * @param string $key The key to remap - * @param string|null $plural The plural of the key in case of irregular plural - * - * @return $this - */ - public function remap(string $key, ?string $plural = null): static - { - $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural]; - - return $this; - } - - /** - * Registers a closure to run before the normalization or an expression builder to build it if null is provided. - * - * @return ExprBuilder|$this - */ - public function before(?\Closure $closure = null): ExprBuilder|static - { - if (null !== $closure) { - $this->before[] = $closure; - - return $this; - } - - return $this->before[] = new ExprBuilder($this->node); - } -} diff --git a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php deleted file mode 100644 index 06dc9799..00000000 --- a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; - -/** - * Abstract class that contains common code of integer and float node definitions. - * - * @author David Jeanmonod - */ -abstract class NumericNodeDefinition extends ScalarNodeDefinition -{ - protected int|float|null $min = null; - protected int|float|null $max = null; - - /** - * Ensures that the value is smaller than the given reference. - * - * @return $this - * - * @throws \InvalidArgumentException when the constraint is inconsistent - */ - public function max(int|float $max): static - { - if (isset($this->min) && $this->min > $max) { - throw new \InvalidArgumentException(\sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min)); - } - $this->max = $max; - - return $this; - } - - /** - * Ensures that the value is bigger than the given reference. - * - * @return $this - * - * @throws \InvalidArgumentException when the constraint is inconsistent - */ - public function min(int|float $min): static - { - if (isset($this->max) && $this->max < $min) { - throw new \InvalidArgumentException(\sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max)); - } - $this->min = $min; - - return $this; - } - - /** - * @throws InvalidDefinitionException - */ - public function cannotBeEmpty(): static - { - throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.'); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php b/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php deleted file mode 100644 index 7b8a7eb8..00000000 --- a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * An interface that must be implemented by nodes which can have children. - * - * @author Victor Berchet - */ -interface ParentNodeDefinitionInterface extends BuilderAwareInterface -{ - /** - * Returns a builder to add children nodes. - */ - public function children(): NodeBuilder; - - /** - * Appends a node definition. - * - * Usage: - * - * $node = $parentNode - * ->children() - * ->scalarNode('foo')->end() - * ->scalarNode('baz')->end() - * ->append($this->getBarNodeDefinition()) - * ->end() - * ; - * - * @return $this - */ - public function append(NodeDefinition $node): static; - - /** - * Gets the child node definitions. - * - * @return NodeDefinition[] - */ - public function getChildNodeDefinitions(): array; -} diff --git a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php deleted file mode 100644 index 37a0af02..00000000 --- a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\ScalarNode; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class ScalarNodeDefinition extends VariableNodeDefinition -{ - /** - * Instantiate a Node. - */ - protected function instantiateNode(): ScalarNode - { - return new ScalarNode($this->name, $this->parent, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php b/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php deleted file mode 100644 index c86f1bfd..00000000 --- a/vendor/symfony/config/Definition/Builder/StringNodeDefinition.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\StringNode; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Raffaele Carelle - */ -class StringNodeDefinition extends ScalarNodeDefinition -{ - public function __construct(?string $name, ?NodeParentInterface $parent = null) - { - parent::__construct($name, $parent); - - $this->nullEquivalent = ''; - } - - protected function instantiateNode(): StringNode - { - return new StringNode($this->name, $this->parent, $this->pathSeparator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/TreeBuilder.php b/vendor/symfony/config/Definition/Builder/TreeBuilder.php deleted file mode 100644 index 5170e19d..00000000 --- a/vendor/symfony/config/Definition/Builder/TreeBuilder.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\NodeInterface; - -/** - * This is the entry class for building a config tree. - * - * @author Johannes M. Schmitt - */ -class TreeBuilder implements NodeParentInterface -{ - protected ?NodeInterface $tree = null; - protected ?NodeDefinition $root = null; - - public function __construct(string $name, string $type = 'array', ?NodeBuilder $builder = null) - { - $builder ??= new NodeBuilder(); - $this->root = $builder->node($name, $type)->setParent($this); - } - - /** - * @return NodeDefinition|ArrayNodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array') - */ - public function getRootNode(): NodeDefinition|ArrayNodeDefinition - { - return $this->root; - } - - /** - * Builds the tree. - * - * @throws \RuntimeException - */ - public function buildTree(): NodeInterface - { - return $this->tree ??= $this->root->getNode(true); - } - - public function setPathSeparator(string $separator): void - { - // unset last built as changing path separator changes all nodes - $this->tree = null; - - $this->root->setPathSeparator($separator); - } -} diff --git a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php b/vendor/symfony/config/Definition/Builder/ValidationBuilder.php deleted file mode 100644 index ad223934..00000000 --- a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -/** - * This class builds validation conditions. - * - * @author Christophe Coevoet - */ -class ValidationBuilder -{ - public array $rules = []; - - public function __construct( - protected NodeDefinition $node, - ) { - } - - /** - * Registers a closure to run as normalization or an expression builder to build it if null is provided. - * - * @return ExprBuilder|$this - */ - public function rule(?\Closure $closure = null): ExprBuilder|static - { - if (null !== $closure) { - $this->rules[] = $closure; - - return $this; - } - - return $this->rules[] = new ExprBuilder($this->node); - } -} diff --git a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php b/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php deleted file mode 100644 index a4cc53a5..00000000 --- a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Builder; - -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\VariableNode; - -/** - * This class provides a fluent interface for defining a node. - * - * @author Johannes M. Schmitt - */ -class VariableNodeDefinition extends NodeDefinition -{ - /** - * Instantiate a Node. - */ - protected function instantiateNode(): VariableNode - { - return new VariableNode($this->name, $this->parent, $this->pathSeparator); - } - - protected function createNode(): NodeInterface - { - $node = $this->instantiateNode(); - - if (isset($this->normalization)) { - $node->setNormalizationClosures($this->normalization->before); - } - - if (isset($this->merge)) { - $node->setAllowOverwrite($this->merge->allowOverwrite); - } - - if (true === $this->default) { - $node->setDefaultValue($this->defaultValue); - } - - $node->setAllowEmptyValue($this->allowEmptyValue); - $node->addEquivalentValue(null, $this->nullEquivalent); - $node->addEquivalentValue(true, $this->trueEquivalent); - $node->addEquivalentValue(false, $this->falseEquivalent); - $node->setRequired($this->required); - - if ($this->deprecation) { - $node->setDeprecated($this->deprecation['package'], $this->deprecation['version'], $this->deprecation['message']); - } - - if (isset($this->validation)) { - $node->setFinalValidationClosures($this->validation->rules); - } - - return $node; - } -} diff --git a/vendor/symfony/config/Definition/ConfigurableInterface.php b/vendor/symfony/config/Definition/ConfigurableInterface.php deleted file mode 100644 index cd464616..00000000 --- a/vendor/symfony/config/Definition/ConfigurableInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator; - -/** - * @author Yonel Ceruto - */ -interface ConfigurableInterface -{ - /** - * Generates the configuration tree builder. - */ - public function configure(DefinitionConfigurator $definition): void; -} diff --git a/vendor/symfony/config/Definition/Configuration.php b/vendor/symfony/config/Definition/Configuration.php deleted file mode 100644 index 32954a66..00000000 --- a/vendor/symfony/config/Definition/Configuration.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator; -use Symfony\Component\Config\Definition\Loader\DefinitionFileLoader; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * @author Yonel Ceruto - * - * @final - */ -class Configuration implements ConfigurationInterface -{ - public function __construct( - private ConfigurableInterface $subject, - private ?ContainerBuilder $container, - private string $alias, - ) { - } - - public function getConfigTreeBuilder(): TreeBuilder - { - $treeBuilder = new TreeBuilder($this->alias); - $file = (new \ReflectionObject($this->subject))->getFileName(); - $loader = new DefinitionFileLoader($treeBuilder, new FileLocator(\dirname($file)), $this->container); - $configurator = new DefinitionConfigurator($treeBuilder, $loader, $file, $file); - - $this->subject->configure($configurator); - - return $treeBuilder; - } -} diff --git a/vendor/symfony/config/Definition/ConfigurationInterface.php b/vendor/symfony/config/Definition/ConfigurationInterface.php deleted file mode 100644 index 97a325bb..00000000 --- a/vendor/symfony/config/Definition/ConfigurationInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; - -/** - * Configuration interface. - * - * @author Victor Berchet - */ -interface ConfigurationInterface -{ - /** - * Generates the configuration tree builder. - */ - public function getConfigTreeBuilder(): TreeBuilder; -} diff --git a/vendor/symfony/config/Definition/Configurator/DefinitionConfigurator.php b/vendor/symfony/config/Definition/Configurator/DefinitionConfigurator.php deleted file mode 100644 index 13fe45ca..00000000 --- a/vendor/symfony/config/Definition/Configurator/DefinitionConfigurator.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Configurator; - -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\Loader\DefinitionFileLoader; - -/** - * @author Yonel Ceruto - */ -class DefinitionConfigurator -{ - public function __construct( - private TreeBuilder $treeBuilder, - private DefinitionFileLoader $loader, - private string $path, - private string $file, - ) { - } - - public function import(string $resource, ?string $type = null, bool $ignoreErrors = false): void - { - $this->loader->setCurrentDir(\dirname($this->path)); - $this->loader->import($resource, $type, $ignoreErrors, $this->file); - } - - public function rootNode(): NodeDefinition|ArrayNodeDefinition - { - return $this->treeBuilder->getRootNode(); - } - - public function setPathSeparator(string $separator): void - { - $this->treeBuilder->setPathSeparator($separator); - } -} diff --git a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php deleted file mode 100644 index 2131c713..00000000 --- a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php +++ /dev/null @@ -1,293 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Dumper; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\BooleanNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\FloatNode; -use Symfony\Component\Config\Definition\IntegerNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; - -/** - * Dumps an XML reference configuration for the given configuration/node instance. - * - * @author Wouter J - */ -class XmlReferenceDumper -{ - private ?string $reference = null; - - public function dump(ConfigurationInterface $configuration, ?string $namespace = null): string - { - return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace); - } - - public function dumpNode(NodeInterface $node, ?string $namespace = null): string - { - $this->reference = ''; - $this->writeNode($node, 0, true, $namespace); - $ref = $this->reference; - $this->reference = null; - - return $ref; - } - - private function writeNode(NodeInterface $node, int $depth = 0, bool $root = false, ?string $namespace = null): void - { - $rootName = ($root ? 'config' : $node->getName()); - $rootNamespace = ($namespace ?: ($root ? 'http://example.org/schema/dic/'.$node->getName() : null)); - - // xml remapping - if ($node->getParent()) { - $remapping = array_filter($node->getParent()->getXmlRemappings(), fn (array $mapping) => $rootName === $mapping[1]); - - if (\count($remapping)) { - [$singular] = current($remapping); - $rootName = $singular; - } - } - $rootName = str_replace('_', '-', $rootName); - - $rootAttributes = []; - $rootAttributeComments = []; - $rootChildren = []; - $rootComments = []; - - if ($node instanceof ArrayNode) { - $children = $node->getChildren(); - - // comments about the root node - if ($rootInfo = $node->getInfo()) { - $rootComments[] = $rootInfo; - } - - if ($rootNamespace) { - $rootComments[] = 'Namespace: '.$rootNamespace; - } - - // render prototyped nodes - if ($node instanceof PrototypedArrayNode) { - $prototype = $node->getPrototype(); - - $info = 'prototype'; - if (null !== $prototype->getInfo()) { - $info .= ': '.$prototype->getInfo(); - } - array_unshift($rootComments, $info); - - if ($key = $node->getKeyAttribute()) { - $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key; - } - - if ($prototype instanceof PrototypedArrayNode) { - $prototype->setName($key ?? ''); - $children = [$key => $prototype]; - } elseif ($prototype instanceof ArrayNode) { - $children = $prototype->getChildren(); - } else { - if ($prototype->hasDefaultValue()) { - $prototypeValue = $prototype->getDefaultValue(); - } else { - $prototypeValue = match ($prototype::class) { - ScalarNode::class => 'scalar value', - FloatNode::class, - IntegerNode::class => 'numeric value', - BooleanNode::class => 'true|false', - EnumNode::class => $prototype->getPermissibleValues('|'), - default => 'value', - }; - } - } - } - - // get attributes and elements - foreach ($children as $child) { - if ($child instanceof ArrayNode) { - // get elements - $rootChildren[] = $child; - - continue; - } - - // get attributes - - // metadata - $name = str_replace('_', '-', $child->getName()); - $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world - - // comments - $comments = []; - if ($child instanceof BaseNode && $info = $child->getInfo()) { - $comments[] = $info; - } - - if ($child instanceof BaseNode && $example = $child->getExample()) { - $comments[] = 'Example: '.(\is_array($example) ? implode(', ', $example) : $example); - } - - if ($child->isRequired()) { - $comments[] = 'Required'; - } - - if ($child instanceof BaseNode && $child->isDeprecated()) { - $deprecation = $child->getDeprecation($child->getName(), $node->getPath()); - $comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - if ($child instanceof EnumNode) { - $comments[] = 'One of '.$child->getPermissibleValues('; '); - } - - if (\count($comments)) { - $rootAttributeComments[$name] = implode(";\n", $comments); - } - - // default values - if ($child->hasDefaultValue()) { - $value = $child->getDefaultValue(); - } - - // append attribute - $rootAttributes[$name] = $value; - } - } - - // render comments - - // root node comment - if (\count($rootComments)) { - foreach ($rootComments as $comment) { - $this->writeLine('', $depth); - } - } - - // attribute comments - if (\count($rootAttributeComments)) { - foreach ($rootAttributeComments as $attrName => $comment) { - $commentDepth = $depth + 4 + \strlen($attrName) + 2; - $commentLines = explode("\n", $comment); - $multiline = (\count($commentLines) > 1); - $comment = implode(\PHP_EOL.str_repeat(' ', $commentDepth), $commentLines); - - if ($multiline) { - $this->writeLine('', $depth); - } else { - $this->writeLine('', $depth); - } - } - } - - // render start tag + attributes - $rootIsVariablePrototype = isset($prototypeValue); - $rootIsEmptyTag = (0 === \count($rootChildren) && !$rootIsVariablePrototype); - $rootOpenTag = '<'.$rootName; - if (1 >= ($attributesCount = \count($rootAttributes))) { - if (1 === $attributesCount) { - $rootOpenTag .= \sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes))); - } - - $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>'; - - if ($rootIsVariablePrototype) { - $rootOpenTag .= $prototypeValue.''; - } - - $this->writeLine($rootOpenTag, $depth); - } else { - $this->writeLine($rootOpenTag, $depth); - - $i = 1; - - foreach ($rootAttributes as $attrName => $attrValue) { - $attr = \sprintf('%s="%s"', $attrName, $this->writeValue($attrValue)); - - $this->writeLine($attr, $depth + 4); - - if ($attributesCount === $i++) { - $this->writeLine($rootIsEmptyTag ? '/>' : '>', $depth); - - if ($rootIsVariablePrototype) { - $rootOpenTag .= $prototypeValue.''; - } - } - } - } - - // render children tags - foreach ($rootChildren as $child) { - $this->writeLine(''); - $this->writeNode($child, $depth + 4); - } - - // render end tag - if (!$rootIsEmptyTag && !$rootIsVariablePrototype) { - $this->writeLine(''); - - $rootEndTag = ''; - $this->writeLine($rootEndTag, $depth); - } - } - - /** - * Outputs a single config reference line. - */ - private function writeLine(string $text, int $indent = 0): void - { - $indent = \strlen($text) + $indent; - $format = '%'.$indent.'s'; - - $this->reference .= \sprintf($format, $text).\PHP_EOL; - } - - /** - * Renders the string conversion of the value. - */ - private function writeValue(mixed $value): string - { - if ('%%%%not_defined%%%%' === $value) { - return ''; - } - - if (\is_string($value) || is_numeric($value)) { - return $value; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - if (null === $value) { - return 'null'; - } - - if (!$value) { - return ''; - } - - if (\is_array($value)) { - return implode(',', $value); - } - - return ''; - } -} diff --git a/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php b/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php deleted file mode 100644 index 267444d9..00000000 --- a/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Dumper; - -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\EnumNode; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; -use Symfony\Component\Yaml\Inline; - -/** - * Dumps a Yaml reference configuration for the given configuration/node instance. - * - * @author Kevin Bond - */ -class YamlReferenceDumper -{ - private ?string $reference = null; - - public function dump(ConfigurationInterface $configuration): string - { - return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()); - } - - public function dumpAtPath(ConfigurationInterface $configuration, string $path): string - { - $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree(); - - foreach (explode('.', $path) as $step) { - if (!$node instanceof ArrayNode) { - throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); - } - - /** @var NodeInterface[] $children */ - $children = $node instanceof PrototypedArrayNode ? $this->getPrototypeChildren($node) : $node->getChildren(); - - foreach ($children as $child) { - if ($child->getName() === $step) { - $node = $child; - - continue 2; - } - } - - throw new \UnexpectedValueException(\sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path)); - } - - return $this->dumpNode($node); - } - - public function dumpNode(NodeInterface $node): string - { - $this->reference = ''; - $this->writeNode($node); - $ref = $this->reference; - $this->reference = null; - - return $ref; - } - - private function writeNode(NodeInterface $node, ?NodeInterface $parentNode = null, int $depth = 0, bool $prototypedArray = false): void - { - $comments = []; - $default = ''; - $defaultArray = null; - $children = null; - $example = null; - if ($node instanceof BaseNode) { - $example = $node->getExample(); - } - - // defaults - if ($node instanceof ArrayNode) { - $children = $node->getChildren(); - - if ($node instanceof PrototypedArrayNode) { - $children = $this->getPrototypeChildren($node); - } - - if (!$children && !($node->hasDefaultValue() && \count($defaultArray = $node->getDefaultValue()))) { - $default = '[]'; - } - } elseif ($node instanceof EnumNode) { - $comments[] = 'One of '.$node->getPermissibleValues('; '); - $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~'; - } else { - $default = '~'; - - if ($node->hasDefaultValue()) { - $default = $node->getDefaultValue(); - - if (\is_array($default)) { - if (\count($defaultArray = $node->getDefaultValue())) { - $default = ''; - } elseif (!\is_array($example)) { - $default = '[]'; - } - } else { - $default = Inline::dump($default); - } - } - } - - // required? - if ($node->isRequired()) { - $comments[] = 'Required'; - } - - // deprecated? - if ($node instanceof BaseNode && $node->isDeprecated()) { - $deprecation = $node->getDeprecation($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath()); - $comments[] = \sprintf('Deprecated (%s)', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - // example - if ($example && !\is_array($example)) { - $comments[] = 'Example: '.Inline::dump($example); - } - - $default = '' != (string) $default ? ' '.$default : ''; - $comments = \count($comments) ? '# '.implode(', ', $comments) : ''; - - $key = $prototypedArray ? '-' : $node->getName().':'; - $text = rtrim(\sprintf('%-21s%s %s', $key, $default, $comments), ' '); - - if ($node instanceof BaseNode && $info = $node->getInfo()) { - $this->writeLine(''); - // indenting multi-line info - $info = str_replace("\n", \sprintf("\n%".($depth * 4).'s# ', ' '), $info); - $this->writeLine('# '.$info, $depth * 4); - } - - $this->writeLine($text, $depth * 4); - - // output defaults - if ($defaultArray) { - $this->writeLine(''); - - $message = \count($defaultArray) > 1 ? 'Defaults' : 'Default'; - - $this->writeLine('# '.$message.':', $depth * 4 + 4); - - $this->writeArray($defaultArray, $depth + 1); - } - - if (\is_array($example)) { - $this->writeLine(''); - - $message = \count($example) > 1 ? 'Examples' : 'Example'; - - $this->writeLine('# '.$message.':', $depth * 4 + 4); - - $this->writeArray(array_map(Inline::dump(...), $example), $depth + 1, true); - } - - if ($children) { - foreach ($children as $childNode) { - $this->writeNode($childNode, $node, $depth + 1, $node instanceof PrototypedArrayNode && !$node->getKeyAttribute()); - } - } - } - - /** - * Outputs a single config reference line. - */ - private function writeLine(string $text, int $indent = 0): void - { - $indent = \strlen($text) + $indent; - $format = '%'.$indent.'s'; - - $this->reference .= \sprintf($format, $text)."\n"; - } - - private function writeArray(array $array, int $depth, bool $asComment = false): void - { - $isIndexed = array_is_list($array); - - foreach ($array as $key => $value) { - if (\is_array($value)) { - $val = ''; - } else { - $val = $value; - } - - $prefix = $asComment ? '# ' : ''; - - if ($isIndexed) { - $this->writeLine($prefix.'- '.$val, $depth * 4); - } else { - $this->writeLine(\sprintf('%s%-20s %s', $prefix, $key.':', $val), $depth * 4); - } - - if (\is_array($value)) { - $this->writeArray($value, $depth + 1, $asComment); - } - } - } - - private function getPrototypeChildren(PrototypedArrayNode $node): array - { - $prototype = $node->getPrototype(); - $key = $node->getKeyAttribute(); - - // Do not expand prototype if it isn't an array node nor uses attribute as key - if (!$key && !$prototype instanceof ArrayNode) { - return $node->getChildren(); - } - - if ($prototype instanceof ArrayNode) { - $keyNode = new ArrayNode($key, $node); - $children = $prototype->getChildren(); - - if ($prototype instanceof PrototypedArrayNode && $prototype->getKeyAttribute()) { - $children = $this->getPrototypeChildren($prototype); - } - - // add children - foreach ($children as $childNode) { - $keyNode->addChild($childNode); - } - } else { - $keyNode = new ScalarNode($key, $node); - } - - $info = 'Prototype'; - if (null !== $prototype->getInfo()) { - $info .= ': '.$prototype->getInfo(); - } - $keyNode->setInfo($info); - - return [$key => $keyNode]; - } -} diff --git a/vendor/symfony/config/Definition/EnumNode.php b/vendor/symfony/config/Definition/EnumNode.php deleted file mode 100644 index 401bb48f..00000000 --- a/vendor/symfony/config/Definition/EnumNode.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * Node which only allows a finite set of values. - * - * @author Johannes M. Schmitt - */ -class EnumNode extends ScalarNode -{ - private array $values; - private ?string $enumFqcn = null; - - /** - * @param class-string<\UnitEnum>|null $enumFqcn - */ - public function __construct(?string $name, ?NodeInterface $parent = null, array $values = [], string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR, ?string $enumFqcn = null) - { - if (!$values && !$enumFqcn) { - throw new \InvalidArgumentException('$values must contain at least one element.'); - } - - if ($values && $enumFqcn) { - throw new \InvalidArgumentException('$values or $enumFqcn cannot be both set.'); - } - - if (null !== $enumFqcn) { - if (!enum_exists($enumFqcn)) { - throw new \InvalidArgumentException(\sprintf('The "%s" enum does not exist.', $enumFqcn)); - } - - $values = $enumFqcn::cases(); - $this->enumFqcn = $enumFqcn; - } - - foreach ($values as $value) { - if (null === $value || \is_scalar($value)) { - continue; - } - - if (!$value instanceof \UnitEnum) { - throw new \InvalidArgumentException(\sprintf('"%s" only supports scalar, enum, or null values, "%s" given.', __CLASS__, get_debug_type($value))); - } - - if ($value::class !== ($enumClass ??= $value::class)) { - throw new \InvalidArgumentException(\sprintf('"%s" only supports one type of enum, "%s" and "%s" passed.', __CLASS__, $enumClass, $value::class)); - } - } - - parent::__construct($name, $parent, $pathSeparator); - $this->values = $values; - } - - public function getValues(): array - { - return $this->values; - } - - public function getEnumFqcn(): ?string - { - return $this->enumFqcn; - } - - /** - * @internal - */ - public function getPermissibleValues(string $separator): string - { - if (is_subclass_of($this->enumFqcn, \BackedEnum::class)) { - return implode($separator, array_column($this->enumFqcn::cases(), 'value')); - } - - return implode($separator, array_unique(array_map(static function (mixed $value): string { - if (!$value instanceof \UnitEnum) { - return json_encode($value); - } - - return ltrim(var_export($value, true), '\\'); - }, $this->values))); - } - - protected function validateType(mixed $value): void - { - if ($value instanceof \UnitEnum) { - return; - } - - parent::validateType($value); - } - - protected function finalizeValue(mixed $value): mixed - { - $value = parent::finalizeValue($value); - - if (!$this->enumFqcn) { - if (!\in_array($value, $this->values, true)) { - throw $this->createInvalidValueException($value); - } - - return $value; - } - - if ($value instanceof $this->enumFqcn) { - return $value; - } - - if (!is_subclass_of($this->enumFqcn, \BackedEnum::class)) { - // value is not an instance of the enum, and the enum is not - // backed, meaning no cast is possible - throw $this->createInvalidValueException($value); - } - - if ($value instanceof \UnitEnum && !$value instanceof $this->enumFqcn) { - throw new InvalidConfigurationException(\sprintf('The value should be part of the "%s" enum, got a value from the "%s" enum.', $this->enumFqcn, get_debug_type($value))); - } - - if (!\is_string($value) && !\is_int($value)) { - throw new InvalidConfigurationException(\sprintf('Only strings and integers can be cast to a case of the "%s" enum, got value of type "%s".', $this->enumFqcn, get_debug_type($value))); - } - - try { - return $this->enumFqcn::from($value); - } catch (\TypeError|\ValueError) { - throw $this->createInvalidValueException($value); - } - } - - private function createInvalidValueException(mixed $value): InvalidConfigurationException - { - $displayValue = match (true) { - \is_int($value) => $value, - \is_string($value) => \sprintf('"%s"', $value), - default => \sprintf('of type "%s"', get_debug_type($value)), - }; - - $message = \sprintf('The value %s is not allowed for path "%s". Permissible values: %s.', $displayValue, $this->getPath(), $this->getPermissibleValues(', ')); - if ($this->enumFqcn) { - $message = substr_replace($message, \sprintf(' (cases of the "%s" enum)', $this->enumFqcn), -1, 0); - } - - $e = new InvalidConfigurationException($message); - $e->setPath($this->getPath()); - - return $e; - } -} diff --git a/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php b/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php deleted file mode 100644 index 48dd9325..00000000 --- a/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown whenever the key of an array is not unique. This can - * only be the case if the configuration is coming from an XML file. - * - * @author Johannes M. Schmitt - */ -class DuplicateKeyException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/Exception.php b/vendor/symfony/config/Definition/Exception/Exception.php deleted file mode 100644 index 8933a492..00000000 --- a/vendor/symfony/config/Definition/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * Base exception for all configuration exceptions. - * - * @author Johannes M. Schmitt - */ -class Exception extends \RuntimeException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php b/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php deleted file mode 100644 index 726c07fb..00000000 --- a/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown when a configuration path is overwritten from a - * subsequent configuration file, but the entry node specifically forbids this. - * - * @author Johannes M. Schmitt - */ -class ForbiddenOverwriteException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php b/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php deleted file mode 100644 index e3f29f8e..00000000 --- a/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * A very general exception which can be thrown whenever non of the more specific - * exceptions is suitable. - * - * @author Johannes M. Schmitt - */ -class InvalidConfigurationException extends Exception -{ - private ?string $path = null; - private bool $containsHints = false; - - public function setPath(string $path): void - { - $this->path = $path; - } - - public function getPath(): ?string - { - return $this->path; - } - - /** - * Adds extra information that is suffixed to the original exception message. - */ - public function addHint(string $hint): void - { - if (!$this->containsHints) { - $this->message .= "\nHint: ".$hint; - $this->containsHints = true; - } else { - $this->message .= ', '.$hint; - } - } -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php b/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php deleted file mode 100644 index 98310dae..00000000 --- a/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * Thrown when an error is detected in a node Definition. - * - * @author Victor Berchet - */ -class InvalidDefinitionException extends Exception -{ -} diff --git a/vendor/symfony/config/Definition/Exception/InvalidTypeException.php b/vendor/symfony/config/Definition/Exception/InvalidTypeException.php deleted file mode 100644 index d7ca8c9d..00000000 --- a/vendor/symfony/config/Definition/Exception/InvalidTypeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is thrown if an invalid type is encountered. - * - * @author Johannes M. Schmitt - */ -class InvalidTypeException extends InvalidConfigurationException -{ -} diff --git a/vendor/symfony/config/Definition/Exception/UnsetKeyException.php b/vendor/symfony/config/Definition/Exception/UnsetKeyException.php deleted file mode 100644 index 863181a3..00000000 --- a/vendor/symfony/config/Definition/Exception/UnsetKeyException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Exception; - -/** - * This exception is usually not encountered by the end-user, but only used - * internally to signal the parent scope to unset a key. - * - * @author Johannes M. Schmitt - */ -class UnsetKeyException extends Exception -{ -} diff --git a/vendor/symfony/config/Definition/FloatNode.php b/vendor/symfony/config/Definition/FloatNode.php deleted file mode 100644 index 8b922804..00000000 --- a/vendor/symfony/config/Definition/FloatNode.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a float value in the config tree. - * - * @author Jeanmonod David - */ -class FloatNode extends NumericNode -{ - protected function validateType(mixed $value): void - { - // Integers are also accepted, we just cast them - if (\is_int($value)) { - $value = (float) $value; - } - - if (!\is_float($value)) { - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "float", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - protected function getValidPlaceholderTypes(): array - { - return ['float']; - } -} diff --git a/vendor/symfony/config/Definition/IntegerNode.php b/vendor/symfony/config/Definition/IntegerNode.php deleted file mode 100644 index 6fa3e603..00000000 --- a/vendor/symfony/config/Definition/IntegerNode.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents an integer value in the config tree. - * - * @author Jeanmonod David - */ -class IntegerNode extends NumericNode -{ - protected function validateType(mixed $value): void - { - if (!\is_int($value)) { - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "int", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - protected function getValidPlaceholderTypes(): array - { - return ['int']; - } -} diff --git a/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php b/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php deleted file mode 100644 index 09147f79..00000000 --- a/vendor/symfony/config/Definition/Loader/DefinitionFileLoader.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition\Loader; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * DefinitionFileLoader loads config definitions from a PHP file. - * - * The PHP file is required. - * - * @author Yonel Ceruto - */ -class DefinitionFileLoader extends FileLoader -{ - public function __construct( - private TreeBuilder $treeBuilder, - FileLocatorInterface $locator, - private ?ContainerBuilder $container = null, - ) { - parent::__construct($locator); - } - - public function load(mixed $resource, ?string $type = null): mixed - { - // the loader variable is exposed to the included file below - $loader = $this; - - $path = $this->locator->locate($resource); - $this->setCurrentDir(\dirname($path)); - $this->container?->fileExists($path); - - // the closure forbids access to the private scope in the included file - $load = \Closure::bind(static function ($file) use ($loader) { - return include $file; - }, null, ProtectedDefinitionFileLoader::class); - - $callback = $load($path); - - if (\is_object($callback) && \is_callable($callback)) { - $this->executeCallback($callback, new DefinitionConfigurator($this->treeBuilder, $this, $path, $resource), $path); - } - - return null; - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'php' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'php' === $type; - } - - private function executeCallback(callable $callback, DefinitionConfigurator $configurator, string $path): void - { - $callback = $callback(...); - - $arguments = []; - $r = new \ReflectionFunction($callback); - - foreach ($r->getParameters() as $parameter) { - $reflectionType = $parameter->getType(); - - if (!$reflectionType instanceof \ReflectionNamedType) { - throw new \InvalidArgumentException(\sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s").', $parameter->getName(), $path, DefinitionConfigurator::class)); - } - - $arguments[] = match ($reflectionType->getName()) { - DefinitionConfigurator::class => $configurator, - TreeBuilder::class => $this->treeBuilder, - FileLoader::class, self::class => $this, - }; - } - - $callback(...$arguments); - } -} - -/** - * @internal - */ -final class ProtectedDefinitionFileLoader extends DefinitionFileLoader -{ -} diff --git a/vendor/symfony/config/Definition/NodeInterface.php b/vendor/symfony/config/Definition/NodeInterface.php deleted file mode 100644 index d1715870..00000000 --- a/vendor/symfony/config/Definition/NodeInterface.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * Common Interface among all nodes. - * - * In most cases, it is better to inherit from BaseNode instead of implementing - * this interface yourself. - * - * @author Johannes M. Schmitt - */ -interface NodeInterface -{ - /** - * Returns the name of the node. - */ - public function getName(): string; - - /** - * Returns the path of the node. - */ - public function getPath(): string; - - /** - * Returns true when the node is required. - */ - public function isRequired(): bool; - - /** - * Returns true when the node has a default value. - */ - public function hasDefaultValue(): bool; - - /** - * Returns the default value of the node. - * - * @throws \RuntimeException if the node has no default value - */ - public function getDefaultValue(): mixed; - - /** - * Normalizes a value. - * - * @throws InvalidTypeException if the value type is invalid - */ - public function normalize(mixed $value): mixed; - - /** - * Merges two values together. - * - * @throws ForbiddenOverwriteException if the configuration path cannot be overwritten - * @throws InvalidTypeException if the value type is invalid - */ - public function merge(mixed $leftSide, mixed $rightSide): mixed; - - /** - * Finalizes a value. - * - * @throws InvalidTypeException if the value type is invalid - * @throws InvalidConfigurationException if the value is invalid configuration - */ - public function finalize(mixed $value): mixed; -} diff --git a/vendor/symfony/config/Definition/NumericNode.php b/vendor/symfony/config/Definition/NumericNode.php deleted file mode 100644 index a97850c9..00000000 --- a/vendor/symfony/config/Definition/NumericNode.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * This node represents a numeric value in the config tree. - * - * @author David Jeanmonod - */ -class NumericNode extends ScalarNode -{ - public function __construct( - ?string $name, - ?NodeInterface $parent = null, - protected int|float|null $min = null, - protected int|float|null $max = null, - string $pathSeparator = BaseNode::DEFAULT_PATH_SEPARATOR, - ) { - parent::__construct($name, $parent, $pathSeparator); - } - - protected function finalizeValue(mixed $value): mixed - { - $value = parent::finalizeValue($value); - - $errorMsg = null; - if (isset($this->min) && $value < $this->min) { - $errorMsg = \sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min); - } - if (isset($this->max) && $value > $this->max) { - $errorMsg = \sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max); - } - if (isset($errorMsg)) { - $ex = new InvalidConfigurationException($errorMsg); - $ex->setPath($this->getPath()); - throw $ex; - } - - return $value; - } - - protected function isValueEmpty(mixed $value): bool - { - // a numeric value cannot be empty - return false; - } -} diff --git a/vendor/symfony/config/Definition/Processor.php b/vendor/symfony/config/Definition/Processor.php deleted file mode 100644 index 272ddcc4..00000000 --- a/vendor/symfony/config/Definition/Processor.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -/** - * This class is the entry point for config normalization/merging/finalization. - * - * @author Johannes M. Schmitt - * - * @final - */ -class Processor -{ - /** - * Processes an array of configurations. - * - * @param array $configs An array of configuration items to process - */ - public function process(NodeInterface $configTree, array $configs): array - { - $currentConfig = []; - foreach ($configs as $config) { - $config = $configTree->normalize($config); - $currentConfig = $configTree->merge($currentConfig, $config); - } - - return $configTree->finalize($currentConfig); - } - - /** - * Processes an array of configurations. - * - * @param array $configs An array of configuration items to process - */ - public function processConfiguration(ConfigurationInterface $configuration, array $configs): array - { - return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs); - } - - /** - * Normalizes a configuration entry. - * - * This method returns a normalize configuration array for a given key - * to remove the differences due to the original format (YAML and XML mainly). - * - * Here is an example. - * - * The configuration in XML: - * - * twig.extension.foo - * twig.extension.bar - * - * And the same configuration in YAML: - * - * extensions: ['twig.extension.foo', 'twig.extension.bar'] - * - * @param array $config A config array - * @param string $key The key to normalize - * @param string|null $plural The plural form of the key if it is irregular - */ - public static function normalizeConfig(array $config, string $key, ?string $plural = null): array - { - $plural ??= $key.'s'; - - if (isset($config[$plural])) { - return $config[$plural]; - } - - if (isset($config[$key])) { - if (\is_string($config[$key]) || !\is_int(key($config[$key]))) { - // only one - return [$config[$key]]; - } - - return $config[$key]; - } - - return []; - } -} diff --git a/vendor/symfony/config/Definition/PrototypeNodeInterface.php b/vendor/symfony/config/Definition/PrototypeNodeInterface.php deleted file mode 100644 index 109889f3..00000000 --- a/vendor/symfony/config/Definition/PrototypeNodeInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -/** - * This interface must be implemented by nodes which can be used as prototypes. - * - * @author Johannes M. Schmitt - */ -interface PrototypeNodeInterface extends NodeInterface -{ - /** - * Sets the name of the node. - */ - public function setName(string $name): void; -} diff --git a/vendor/symfony/config/Definition/PrototypedArrayNode.php b/vendor/symfony/config/Definition/PrototypedArrayNode.php deleted file mode 100644 index a901dab7..00000000 --- a/vendor/symfony/config/Definition/PrototypedArrayNode.php +++ /dev/null @@ -1,329 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\DuplicateKeyException; -use Symfony\Component\Config\Definition\Exception\Exception; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\Exception\UnsetKeyException; - -/** - * Represents a prototyped Array node in the config tree. - * - * @author Johannes M. Schmitt - */ -class PrototypedArrayNode extends ArrayNode -{ - protected PrototypeNodeInterface $prototype; - protected ?string $keyAttribute = null; - protected bool $removeKeyAttribute = false; - protected int $minNumberOfElements = 0; - protected array $defaultValue = []; - protected ?array $defaultChildren = null; - /** - * @var NodeInterface[] An array of the prototypes of the simplified value children - */ - private array $valuePrototypes = []; - - /** - * Sets the minimum number of elements that a prototype based node must - * contain. By default this is zero, meaning no elements. - */ - public function setMinNumberOfElements(int $number): void - { - $this->minNumberOfElements = $number; - } - - /** - * Sets the attribute which value is to be used as key. - * - * This is useful when you have an indexed array that should be an - * associative array. You can select an item from within the array - * to be the key of the particular item. For example, if "id" is the - * "key", then: - * - * [ - * ['id' => 'my_name', 'foo' => 'bar'], - * ]; - * - * becomes - * - * [ - * 'my_name' => ['foo' => 'bar'], - * ]; - * - * If you'd like "'id' => 'my_name'" to still be present in the resulting - * array, then you can set the second argument of this method to false. - * - * @param string $attribute The name of the attribute which value is to be used as a key - * @param bool $remove Whether or not to remove the key - */ - public function setKeyAttribute(string $attribute, bool $remove = true): void - { - $this->keyAttribute = $attribute; - $this->removeKeyAttribute = $remove; - } - - /** - * Retrieves the name of the attribute which value should be used as key. - */ - public function getKeyAttribute(): ?string - { - return $this->keyAttribute; - } - - /** - * Sets the default value of this node. - */ - public function setDefaultValue(array $value): void - { - $this->defaultValue = $value; - } - - public function hasDefaultValue(): bool - { - return true; - } - - /** - * Adds default children when none are set. - * - * @param int|string|array|null $children The number of children|The child name|The children names to be added - */ - public function setAddChildrenIfNoneSet(int|string|array|null $children = ['defaults']): void - { - if (null === $children) { - $this->defaultChildren = ['defaults']; - } else { - $this->defaultChildren = \is_int($children) && $children > 0 ? range(1, $children) : (array) $children; - } - } - - /** - * The default value could be either explicited or derived from the prototype - * default value. - */ - public function getDefaultValue(): mixed - { - if (null !== $this->defaultChildren) { - $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : []; - $defaults = []; - foreach (array_values($this->defaultChildren) as $i => $name) { - $defaults[null === $this->keyAttribute ? $i : $name] = $default; - } - - return $defaults; - } - - return $this->defaultValue; - } - - /** - * Sets the node prototype. - */ - public function setPrototype(PrototypeNodeInterface $node): void - { - $this->prototype = $node; - } - - /** - * Retrieves the prototype. - */ - public function getPrototype(): PrototypeNodeInterface - { - return $this->prototype; - } - - /** - * Disable adding concrete children for prototyped nodes. - * - * @throws Exception - */ - public function addChild(NodeInterface $node): never - { - throw new Exception('A prototyped array node cannot have concrete children.'); - } - - protected function finalizeValue(mixed $value): mixed - { - if (false === $value) { - throw new UnsetKeyException(\sprintf('Unsetting key for path "%s", value: false.', $this->getPath())); - } - - foreach ($value as $k => $v) { - $prototype = $this->getPrototypeForChild($k); - try { - $value[$k] = $prototype->finalize($v); - } catch (UnsetKeyException) { - unset($value[$k]); - } - } - - if (\count($value) < $this->minNumberOfElements) { - $ex = new InvalidConfigurationException(\sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements)); - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $value; - } - - /** - * @throws DuplicateKeyException - */ - protected function normalizeValue(mixed $value): mixed - { - if (false === $value) { - return $value; - } - - $value = $this->remapXml($value); - - $isList = array_is_list($value); - $normalized = []; - foreach ($value as $k => $v) { - if (null !== $this->keyAttribute && \is_array($v)) { - if (!isset($v[$this->keyAttribute]) && \is_int($k) && $isList) { - $ex = new InvalidConfigurationException(\sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } elseif (isset($v[$this->keyAttribute])) { - $k = $v[$this->keyAttribute]; - - if (\is_float($k)) { - $k = var_export($k, true); - } - - // remove the key attribute when required - if ($this->removeKeyAttribute) { - unset($v[$this->keyAttribute]); - } - - // if only "value" is left - if (array_keys($v) === ['value']) { - $v = $v['value']; - if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && \array_key_exists('value', $children)) { - $valuePrototype = current($this->valuePrototypes) ?: clone $children['value']; - $valuePrototype->parent = $this; - $originalClosures = $this->prototype->normalizationClosures; - $valuePrototypeClosures = $valuePrototype->normalizationClosures; - $valuePrototype->normalizationClosures = array_merge($originalClosures, $valuePrototypeClosures); - $this->valuePrototypes[$k] = $valuePrototype; - } - } - } - - if (\array_key_exists($k, $normalized)) { - $ex = new DuplicateKeyException(\sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - $prototype = $this->getPrototypeForChild($k); - if (null !== $this->keyAttribute || !$isList) { - $normalized[$k] = $prototype->normalize($v); - } else { - $normalized[] = $prototype->normalize($v); - } - } - - return $normalized; - } - - protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed - { - if (false === $rightSide) { - // if this is still false after the last config has been merged the - // finalization pass will take care of removing this key entirely - return false; - } - - if (false === $leftSide || !$this->performDeepMerging) { - return $rightSide; - } - - $isList = array_is_list($rightSide); - foreach ($rightSide as $k => $v) { - // prototype, and key is irrelevant there are no named keys, append the element - if (null === $this->keyAttribute && $isList) { - $leftSide[] = $v; - continue; - } - - // no conflict - if (!\array_key_exists($k, $leftSide)) { - if (!$this->allowNewKeys) { - $ex = new InvalidConfigurationException(\sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file.', $this->getPath())); - $ex->setPath($this->getPath()); - - throw $ex; - } - - $leftSide[$k] = $v; - continue; - } - - $prototype = $this->getPrototypeForChild($k); - $leftSide[$k] = $prototype->merge($leftSide[$k], $v); - } - - return $leftSide; - } - - /** - * Returns a prototype for the child node that is associated to $key in the value array. - * For general child nodes, this will be $this->prototype. - * But if $this->removeKeyAttribute is true and there are only two keys in the child node: - * one is same as this->keyAttribute and the other is 'value', then the prototype will be different. - * - * For example, assume $this->keyAttribute is 'name' and the value array is as follows: - * - * [ - * [ - * 'name' => 'name001', - * 'value' => 'value001' - * ] - * ] - * - * Now, the key is 0 and the child node is: - * - * [ - * 'name' => 'name001', - * 'value' => 'value001' - * ] - * - * When normalizing the value array, the 'name' element will removed from the child node - * and its value becomes the new key of the child node: - * - * [ - * 'name001' => ['value' => 'value001'] - * ] - * - * Now only 'value' element is left in the child node which can be further simplified into a string: - * - * ['name001' => 'value001'] - * - * Now, the key becomes 'name001' and the child node becomes 'value001' and - * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. - */ - private function getPrototypeForChild(string $key): mixed - { - $prototype = $this->valuePrototypes[$key] ?? $this->prototype; - $prototype->setName($key); - - return $prototype; - } -} diff --git a/vendor/symfony/config/Definition/ScalarNode.php b/vendor/symfony/config/Definition/ScalarNode.php deleted file mode 100644 index 34176924..00000000 --- a/vendor/symfony/config/Definition/ScalarNode.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a scalar value in the config tree. - * - * The following values are considered scalars: - * * booleans - * * strings - * * null - * * integers - * * floats - * - * @author Johannes M. Schmitt - */ -class ScalarNode extends VariableNode -{ - protected function validateType(mixed $value): void - { - if (!\is_scalar($value) && null !== $value) { - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "scalar", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - protected function isValueEmpty(mixed $value): bool - { - // assume environment variables are never empty (which in practice is likely to be true during runtime) - // not doing so breaks many configs that are valid today - if ($this->isHandlingPlaceholder()) { - return false; - } - - return null === $value || '' === $value; - } - - protected function getValidPlaceholderTypes(): array - { - return ['bool', 'int', 'float', 'string']; - } -} diff --git a/vendor/symfony/config/Definition/StringNode.php b/vendor/symfony/config/Definition/StringNode.php deleted file mode 100644 index 6687b882..00000000 --- a/vendor/symfony/config/Definition/StringNode.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidTypeException; - -/** - * This node represents a String value in the config tree. - * - * @author Raffaele Carelle - */ -class StringNode extends ScalarNode -{ - protected function validateType(mixed $value): void - { - if (!\is_string($value)) { - $ex = new InvalidTypeException(\sprintf('Invalid type for path "%s". Expected "string", but got "%s".', $this->getPath(), get_debug_type($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - } - - protected function getValidPlaceholderTypes(): array - { - return ['string']; - } -} diff --git a/vendor/symfony/config/Definition/VariableNode.php b/vendor/symfony/config/Definition/VariableNode.php deleted file mode 100644 index ed1b903a..00000000 --- a/vendor/symfony/config/Definition/VariableNode.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Definition; - -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; - -/** - * This node represents a value of variable type in the config tree. - * - * This node is intended for values of arbitrary type. - * Any PHP type is accepted as a value. - * - * @author Jeremy Mikola - */ -class VariableNode extends BaseNode implements PrototypeNodeInterface -{ - protected bool $defaultValueSet = false; - protected mixed $defaultValue = null; - protected bool $allowEmptyValue = true; - - public function setDefaultValue(mixed $value): void - { - $this->defaultValueSet = true; - $this->defaultValue = $value; - } - - public function hasDefaultValue(): bool - { - return $this->defaultValueSet; - } - - public function getDefaultValue(): mixed - { - $v = $this->defaultValue; - - return $v instanceof \Closure ? $v() : $v; - } - - /** - * Sets if this node is allowed to have an empty value. - * - * @param bool $boolean True if this entity will accept empty values - */ - public function setAllowEmptyValue(bool $boolean): void - { - $this->allowEmptyValue = $boolean; - } - - public function setName(string $name): void - { - $this->name = $name; - } - - protected function validateType(mixed $value): void - { - } - - protected function finalizeValue(mixed $value): mixed - { - // deny environment variables only when using custom validators - // this avoids ever passing an empty value to final validation closures - if (!$this->allowEmptyValue && $this->isHandlingPlaceholder() && $this->finalValidationClosures) { - $e = new InvalidConfigurationException(\sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath())); - if ($hint = $this->getInfo()) { - $e->addHint($hint); - } - $e->setPath($this->getPath()); - - throw $e; - } - - if (!$this->allowEmptyValue && $this->isValueEmpty($value)) { - $ex = new InvalidConfigurationException(\sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value))); - if ($hint = $this->getInfo()) { - $ex->addHint($hint); - } - $ex->setPath($this->getPath()); - - throw $ex; - } - - return $value; - } - - protected function normalizeValue(mixed $value): mixed - { - return $value; - } - - protected function mergeValues(mixed $leftSide, mixed $rightSide): mixed - { - return $rightSide; - } - - /** - * Evaluates if the given value is to be treated as empty. - * - * By default, PHP's empty() function is used to test for emptiness. This - * method may be overridden by subtypes to better match their understanding - * of empty data. - * - * @see finalizeValue() - */ - protected function isValueEmpty(mixed $value): bool - { - return !$value; - } -} diff --git a/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php b/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php deleted file mode 100644 index d39bde04..00000000 --- a/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * Exception class for when a circular reference is detected when importing resources. - * - * @author Fabien Potencier - */ -class FileLoaderImportCircularReferenceException extends LoaderLoadException -{ - public function __construct(array $resources, int $code = 0, ?\Throwable $previous = null) - { - $message = \sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]); - - \Exception::__construct($message, $code, $previous); - } -} diff --git a/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php b/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php deleted file mode 100644 index d9e5b4f3..00000000 --- a/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * File locator exception if a file does not exist. - * - * @author Leo Feyer - */ -class FileLocatorFileNotFoundException extends \InvalidArgumentException -{ - public function __construct( - string $message = '', - int $code = 0, - ?\Throwable $previous = null, - private array $paths = [], - ) { - parent::__construct($message, $code, $previous); - } - - public function getPaths(): array - { - return $this->paths; - } -} diff --git a/vendor/symfony/config/Exception/LoaderLoadException.php b/vendor/symfony/config/Exception/LoaderLoadException.php deleted file mode 100644 index ce486a35..00000000 --- a/vendor/symfony/config/Exception/LoaderLoadException.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -/** - * Exception class for when a resource cannot be loaded or imported. - * - * @author Ryan Weaver - */ -class LoaderLoadException extends \Exception -{ - /** - * @param mixed $resource The resource that could not be imported - * @param string|null $sourceResource The original resource importing the new resource - * @param int $code The error code - * @param \Throwable|null $previous A previous exception - * @param string|null $type The type of resource - */ - public function __construct(mixed $resource, ?string $sourceResource = null, int $code = 0, ?\Throwable $previous = null, ?string $type = null) - { - if (!\is_string($resource)) { - try { - $resource = json_encode($resource, \JSON_THROW_ON_ERROR); - } catch (\JsonException) { - $resource = \sprintf('resource of type "%s"', get_debug_type($resource)); - } - } - - $message = ''; - if ($previous) { - // Include the previous exception, to help the user see what might be the underlying cause - - // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim... - if (str_ends_with($previous->getMessage(), '.')) { - $trimmedMessage = substr($previous->getMessage(), 0, -1); - $message .= \sprintf('%s', $trimmedMessage).' in '; - } else { - $message .= \sprintf('%s', $previous->getMessage()).' in '; - } - $message .= $resource.' '; - - // show tweaked trace to complete the human readable sentence - if (null === $sourceResource) { - $message .= \sprintf('(which is loaded in resource "%s")', $resource); - } else { - $message .= \sprintf('(which is being imported from "%s")', $sourceResource); - } - $message .= '.'; - - // if there's no previous message, present it the default way - } elseif (null === $sourceResource) { - $message .= \sprintf('Cannot load resource "%s".', $resource); - } else { - $message .= \sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource); - } - - // Is the resource located inside a bundle? - if ('@' === $resource[0]) { - $parts = explode(\DIRECTORY_SEPARATOR, $resource); - $bundle = substr($parts[0], 1); - $message .= \sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle); - $message .= \sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource); - } elseif (null !== $type) { - $message .= \sprintf(' Make sure there is a loader supporting the "%s" type.', $type); - } - - parent::__construct($message, $code, $previous); - } - - protected function varToString(mixed $var): string - { - if (\is_object($var)) { - return \sprintf('Object(%s)', $var::class); - } - - if (\is_array($var)) { - $a = []; - foreach ($var as $k => $v) { - $a[] = \sprintf('%s => %s', $k, $this->varToString($v)); - } - - return \sprintf('Array(%s)', implode(', ', $a)); - } - - if (\is_resource($var)) { - return \sprintf('Resource(%s)', get_resource_type($var)); - } - - if (null === $var) { - return 'null'; - } - - if (false === $var) { - return 'false'; - } - - if (true === $var) { - return 'true'; - } - - return (string) $var; - } -} diff --git a/vendor/symfony/config/Exception/LogicException.php b/vendor/symfony/config/Exception/LogicException.php deleted file mode 100644 index d227aece..00000000 --- a/vendor/symfony/config/Exception/LogicException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Exception; - -class LogicException extends \LogicException -{ -} diff --git a/vendor/symfony/config/FileLocator.php b/vendor/symfony/config/FileLocator.php deleted file mode 100644 index 3a5064ed..00000000 --- a/vendor/symfony/config/FileLocator.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; - -/** - * FileLocator uses an array of pre-defined paths to find files. - * - * @author Fabien Potencier - */ -class FileLocator implements FileLocatorInterface -{ - protected array $paths; - - /** - * @param string|string[] $paths A path or an array of paths where to look for resources - */ - public function __construct(string|array $paths = []) - { - $this->paths = (array) $paths; - } - - /** - * @return string|string[] - * - * @psalm-return ($first is true ? string : string[]) - */ - public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array - { - if ('' === $name) { - throw new \InvalidArgumentException('An empty file name is not valid to be located.'); - } - - if ($this->isAbsolutePath($name)) { - if (!file_exists($name)) { - throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist.', $name), 0, null, [$name]); - } - - return $name; - } - - $paths = $this->paths; - - if (null !== $currentPath) { - array_unshift($paths, $currentPath); - } - - $paths = array_unique($paths); - $filepaths = $notfound = []; - - foreach ($paths as $path) { - if (@file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) { - if (true === $first) { - return $file; - } - $filepaths[] = $file; - } else { - $notfound[] = $file; - } - } - - if (!$filepaths) { - throw new FileLocatorFileNotFoundException(\sprintf('The file "%s" does not exist (in: "%s").', $name, implode('", "', $paths)), 0, null, $notfound); - } - - return $filepaths; - } - - /** - * Returns whether the file path is an absolute path. - */ - private function isAbsolutePath(string $file): bool - { - if ('/' === $file[0] || '\\' === $file[0] - || (\strlen($file) > 3 && ctype_alpha($file[0]) - && ':' === $file[1] - && ('\\' === $file[2] || '/' === $file[2]) - ) - || parse_url($file, \PHP_URL_SCHEME) - || str_starts_with($file, 'phar:///') // "parse_url()" doesn't handle absolute phar path, despite being valid - ) { - return true; - } - - return false; - } -} diff --git a/vendor/symfony/config/FileLocatorInterface.php b/vendor/symfony/config/FileLocatorInterface.php deleted file mode 100644 index 24bc7096..00000000 --- a/vendor/symfony/config/FileLocatorInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; - -/** - * @author Fabien Potencier - */ -interface FileLocatorInterface -{ - /** - * Returns a full path for a given file name. - * - * @param string $name The file name to locate - * @param string|null $currentPath The current path - * @param bool $first Whether to return the first occurrence or an array of filenames - * - * @return string|string[] The full path to the file or an array of file paths - * - * @psalm-return ($first is true ? string : string[]) - * - * @throws \InvalidArgumentException If $name is empty - * @throws FileLocatorFileNotFoundException If a file is not found - */ - public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array; -} diff --git a/vendor/symfony/config/LICENSE b/vendor/symfony/config/LICENSE deleted file mode 100644 index 0138f8f0..00000000 --- a/vendor/symfony/config/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/config/Loader/DelegatingLoader.php b/vendor/symfony/config/Loader/DelegatingLoader.php deleted file mode 100644 index 045a559e..00000000 --- a/vendor/symfony/config/Loader/DelegatingLoader.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\LoaderLoadException; - -/** - * DelegatingLoader delegates loading to other loaders using a loader resolver. - * - * This loader acts as an array of LoaderInterface objects - each having - * a chance to load a given resource (handled by the resolver) - * - * @author Fabien Potencier - */ -class DelegatingLoader extends Loader -{ - public function __construct(LoaderResolverInterface $resolver) - { - $this->resolver = $resolver; - } - - public function load(mixed $resource, ?string $type = null): mixed - { - if (false === $loader = $this->resolver->resolve($resource, $type)) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - return $loader->load($resource, $type); - } - - public function supports(mixed $resource, ?string $type = null): bool - { - return false !== $this->resolver->resolve($resource, $type); - } -} diff --git a/vendor/symfony/config/Loader/DirectoryAwareLoaderInterface.php b/vendor/symfony/config/Loader/DirectoryAwareLoaderInterface.php deleted file mode 100644 index 87559cba..00000000 --- a/vendor/symfony/config/Loader/DirectoryAwareLoaderInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * A loader that can be scoped to a given filesystem directory. - * - * @author Alexander M. Turek - */ -interface DirectoryAwareLoaderInterface -{ - public function forDirectory(string $currentDirectory): static; -} diff --git a/vendor/symfony/config/Loader/FileLoader.php b/vendor/symfony/config/Loader/FileLoader.php deleted file mode 100644 index 8d9d8462..00000000 --- a/vendor/symfony/config/Loader/FileLoader.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException; -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\GlobResource; - -/** - * FileLoader is the abstract class used by all built-in loaders that are file based. - * - * @author Fabien Potencier - */ -abstract class FileLoader extends Loader -{ - protected static array $loading = []; - - private ?string $currentDir = null; - - public function __construct( - protected FileLocatorInterface $locator, - ?string $env = null, - ) { - parent::__construct($env); - } - - /** - * Sets the current directory. - */ - public function setCurrentDir(string $dir): void - { - $this->currentDir = $dir; - } - - /** - * Returns the file locator used by this loader. - */ - public function getLocator(): FileLocatorInterface - { - return $this->locator; - } - - /** - * Imports a resource. - * - * @param mixed $resource A Resource - * @param string|null $type The resource type or null if unknown - * @param bool $ignoreErrors Whether to ignore import errors or not - * @param string|null $sourceResource The original resource importing the new resource - * @param string|string[]|null $exclude Glob patterns to exclude from the import - * - * @throws LoaderLoadException - * @throws FileLoaderImportCircularReferenceException - * @throws FileLocatorFileNotFoundException - */ - public function import(mixed $resource, ?string $type = null, bool $ignoreErrors = false, ?string $sourceResource = null, string|array|null $exclude = null): mixed - { - if (\is_string($resource) && \strlen($resource) !== ($i = strcspn($resource, '*?{[')) && !str_contains($resource, "\n")) { - $excluded = []; - foreach ((array) $exclude as $pattern) { - foreach ($this->glob($pattern, true, $_, false, true) as $path => $info) { - // normalize Windows slashes and remove trailing slashes - $excluded[rtrim(str_replace('\\', '/', $path), '/')] = true; - } - } - - $ret = []; - $isSubpath = 0 !== $i && str_contains(substr($resource, 0, $i), '/'); - foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath, false, $excluded) as $path => $info) { - if (null !== $res = $this->doImport($path, 'glob' === $type ? null : $type, $ignoreErrors, $sourceResource)) { - $ret[] = $res; - } - $isSubpath = true; - } - - if ($isSubpath) { - return isset($ret[1]) ? $ret : ($ret[0] ?? null); - } - } - - return $this->doImport($resource, $type, $ignoreErrors, $sourceResource); - } - - /** - * @internal - */ - protected function glob(string $pattern, bool $recursive, array|GlobResource|null &$resource = null, bool $ignoreErrors = false, bool $forExclusion = false, array $excluded = []): iterable - { - if (\strlen($pattern) === $i = strcspn($pattern, '*?{[')) { - $prefix = $pattern; - $pattern = ''; - } elseif (0 === $i || !str_contains(substr($pattern, 0, $i), '/')) { - $prefix = '.'; - $pattern = '/'.$pattern; - } else { - $prefix = \dirname(substr($pattern, 0, 1 + $i)); - $pattern = substr($pattern, \strlen($prefix)); - } - - try { - $prefix = $this->locator->locate($prefix, $this->currentDir, true); - } catch (FileLocatorFileNotFoundException $e) { - if (!$ignoreErrors) { - throw $e; - } - - $resource = []; - foreach ($e->getPaths() as $path) { - $resource[] = new FileExistenceResource($path); - } - - return; - } - $resource = new GlobResource($prefix, $pattern, $recursive, $forExclusion, $excluded); - - yield from $resource; - } - - private function doImport(mixed $resource, ?string $type = null, bool $ignoreErrors = false, ?string $sourceResource = null): mixed - { - try { - $loader = $this->resolve($resource, $type); - - if ($loader instanceof DirectoryAwareLoaderInterface) { - $loader = $loader->forDirectory($this->currentDir); - } - - if (!$loader instanceof self) { - return $loader->load($resource, $type); - } - - if (null !== $this->currentDir) { - $resource = $loader->getLocator()->locate($resource, $this->currentDir, false); - } - - $resources = \is_array($resource) ? $resource : [$resource]; - for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) { - if (isset(self::$loading[$resources[$i]])) { - if ($i == $resourcesCount - 1) { - throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading)); - } - } else { - $resource = $resources[$i]; - break; - } - } - self::$loading[$resource] = true; - - try { - $ret = $loader->load($resource, $type); - } finally { - unset(self::$loading[$resource]); - } - - return $ret; - } catch (FileLoaderImportCircularReferenceException $e) { - throw $e; - } catch (\Exception $e) { - if (!$ignoreErrors) { - // prevent embedded imports from nesting multiple exceptions - if ($e instanceof LoaderLoadException) { - throw $e; - } - - throw new LoaderLoadException($resource, $sourceResource, 0, $e, $type); - } - } - - return null; - } -} diff --git a/vendor/symfony/config/Loader/GlobFileLoader.php b/vendor/symfony/config/Loader/GlobFileLoader.php deleted file mode 100644 index 31eebf69..00000000 --- a/vendor/symfony/config/Loader/GlobFileLoader.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Fabien Potencier - */ -class GlobFileLoader extends FileLoader -{ - public function load(mixed $resource, ?string $type = null): mixed - { - return $this->import($resource); - } - - public function supports(mixed $resource, ?string $type = null): bool - { - return 'glob' === $type; - } -} diff --git a/vendor/symfony/config/Loader/Loader.php b/vendor/symfony/config/Loader/Loader.php deleted file mode 100644 index 28e5877b..00000000 --- a/vendor/symfony/config/Loader/Loader.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\Exception\LogicException; - -/** - * Loader is the abstract class used by all built-in loaders. - * - * @author Fabien Potencier - */ -abstract class Loader implements LoaderInterface -{ - protected ?LoaderResolverInterface $resolver = null; - - public function __construct( - protected ?string $env = null, - ) { - } - - public function getResolver(): LoaderResolverInterface - { - if (null === $this->resolver) { - throw new LogicException('Cannot get a resolver if none was set.'); - } - - return $this->resolver; - } - - public function setResolver(LoaderResolverInterface $resolver): void - { - $this->resolver = $resolver; - } - - /** - * Imports a resource. - */ - public function import(mixed $resource, ?string $type = null): mixed - { - return $this->resolve($resource, $type)->load($resource, $type); - } - - /** - * Finds a loader able to load an imported resource. - * - * @throws LoaderLoadException If no loader is found - */ - public function resolve(mixed $resource, ?string $type = null): LoaderInterface - { - if ($this->supports($resource, $type)) { - return $this; - } - - $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type); - - if (false === $loader) { - throw new LoaderLoadException($resource, null, 0, null, $type); - } - - return $loader; - } -} diff --git a/vendor/symfony/config/Loader/LoaderInterface.php b/vendor/symfony/config/Loader/LoaderInterface.php deleted file mode 100644 index 6ed1893a..00000000 --- a/vendor/symfony/config/Loader/LoaderInterface.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderInterface is the interface implemented by all loader classes. - * - * @author Fabien Potencier - */ -interface LoaderInterface -{ - /** - * Loads a resource. - * - * @throws \Exception If something went wrong - */ - public function load(mixed $resource, ?string $type = null): mixed; - - /** - * Returns whether this class supports the given resource. - * - * @param mixed $resource A resource - */ - public function supports(mixed $resource, ?string $type = null): bool; - - /** - * Gets the loader resolver. - */ - public function getResolver(): LoaderResolverInterface; - - /** - * Sets the loader resolver. - */ - public function setResolver(LoaderResolverInterface $resolver): void; -} diff --git a/vendor/symfony/config/Loader/LoaderResolver.php b/vendor/symfony/config/Loader/LoaderResolver.php deleted file mode 100644 index 8308d7e8..00000000 --- a/vendor/symfony/config/Loader/LoaderResolver.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderResolver selects a loader for a given resource. - * - * A resource can be anything (e.g. a full path to a config file or a Closure). - * Each loader determines whether it can load a resource and how. - * - * @author Fabien Potencier - */ -class LoaderResolver implements LoaderResolverInterface -{ - /** - * @var LoaderInterface[] An array of LoaderInterface objects - */ - private array $loaders = []; - - /** - * @param LoaderInterface[] $loaders An array of loaders - */ - public function __construct(array $loaders = []) - { - foreach ($loaders as $loader) { - $this->addLoader($loader); - } - } - - public function resolve(mixed $resource, ?string $type = null): LoaderInterface|false - { - foreach ($this->loaders as $loader) { - if ($loader->supports($resource, $type)) { - return $loader; - } - } - - return false; - } - - public function addLoader(LoaderInterface $loader): void - { - $this->loaders[] = $loader; - $loader->setResolver($this); - } - - /** - * Returns the registered loaders. - * - * @return LoaderInterface[] - */ - public function getLoaders(): array - { - return $this->loaders; - } -} diff --git a/vendor/symfony/config/Loader/LoaderResolverInterface.php b/vendor/symfony/config/Loader/LoaderResolverInterface.php deleted file mode 100644 index a8bb3a43..00000000 --- a/vendor/symfony/config/Loader/LoaderResolverInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * LoaderResolverInterface selects a loader for a given resource. - * - * @author Fabien Potencier - */ -interface LoaderResolverInterface -{ - /** - * Returns a loader able to load the resource. - * - * @param string|null $type The resource type or null if unknown - */ - public function resolve(mixed $resource, ?string $type = null): LoaderInterface|false; -} diff --git a/vendor/symfony/config/Loader/ParamConfigurator.php b/vendor/symfony/config/Loader/ParamConfigurator.php deleted file mode 100644 index ed104527..00000000 --- a/vendor/symfony/config/Loader/ParamConfigurator.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Loader; - -/** - * Placeholder for a parameter. - * - * @author Tobias Nyholm - */ -class ParamConfigurator -{ - public function __construct( - private string $name, - ) { - } - - public function __toString(): string - { - return '%'.$this->name.'%'; - } -} diff --git a/vendor/symfony/config/README.md b/vendor/symfony/config/README.md deleted file mode 100644 index 10c2ddd0..00000000 --- a/vendor/symfony/config/README.md +++ /dev/null @@ -1,15 +0,0 @@ -Config Component -================ - -The Config component helps find, load, combine, autofill and validate -configuration values of any kind, whatever their source may be (YAML, XML, INI -files, or for instance a database). - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/config.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/config/Resource/ClassExistenceResource.php b/vendor/symfony/config/Resource/ClassExistenceResource.php deleted file mode 100644 index 6973220f..00000000 --- a/vendor/symfony/config/Resource/ClassExistenceResource.php +++ /dev/null @@ -1,227 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ClassExistenceResource represents a class existence. - * Freshness is only evaluated against resource existence. - * - * The resource must be a fully-qualified class name. - * - * @author Fabien Potencier - * - * @final - */ -class ClassExistenceResource implements SelfCheckingResourceInterface -{ - private ?array $exists = null; - - private static int $autoloadLevel = 0; - private static ?string $autoloadedClass = null; - private static array $existsCache = []; - - /** - * @param string $resource The fully-qualified class name - * @param bool|null $exists Boolean when the existence check has already been done - */ - public function __construct( - private string $resource, - ?bool $exists = null, - ) { - if (null !== $exists) { - $this->exists = [$exists, null]; - } - } - - public function __toString(): string - { - return $this->resource; - } - - public function getResource(): string - { - return $this->resource; - } - - /** - * @throws \ReflectionException when a parent class/interface/trait is not found - */ - public function isFresh(int $timestamp): bool - { - $loaded = class_exists($this->resource, false) || interface_exists($this->resource, false) || trait_exists($this->resource, false); - - if (null !== $exists = &self::$existsCache[$this->resource]) { - if ($loaded) { - $exists = [true, null]; - } elseif (0 >= $timestamp && !$exists[0] && null !== $exists[1]) { - throw new \ReflectionException($exists[1]); - } - } elseif ([false, null] === $exists = [$loaded, null]) { - if (!self::$autoloadLevel++) { - spl_autoload_register(__CLASS__.'::throwOnRequiredClass'); - } - $autoloadedClass = self::$autoloadedClass; - self::$autoloadedClass = ltrim($this->resource, '\\'); - - try { - $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false); - } catch (\Exception $e) { - $exists[1] = $e->getMessage(); - - try { - self::throwOnRequiredClass($this->resource, $e); - } catch (\ReflectionException $e) { - if (0 >= $timestamp) { - throw $e; - } - } - } catch (\Throwable $e) { - $exists[1] = $e->getMessage(); - - throw $e; - } finally { - self::$autoloadedClass = $autoloadedClass; - if (!--self::$autoloadLevel) { - spl_autoload_unregister(__CLASS__.'::throwOnRequiredClass'); - } - } - } - - $this->exists ??= $exists; - - return $this->exists[0] xor !$exists[0]; - } - - public function __serialize(): array - { - if (null === $this->exists) { - $this->isFresh(0); - } - - return [ - 'resource' => $this->resource, - 'exists' => $this->exists, - ]; - } - - public function __unserialize(array $data): void - { - $this->resource = array_shift($data); - $this->exists = array_shift($data); - - if (\is_bool($this->exists)) { - $this->exists = [$this->exists, null]; - } - } - - /** - * Throws a reflection exception when the passed class does not exist but is required. - * - * A class is considered "not required" when it's loaded as part of a "class_exists" or similar check. - * - * This function can be used as an autoload function to throw a reflection - * exception if the class was not found by previous autoload functions. - * - * A previous exception can be passed. In this case, the class is considered as being - * required totally, so if it doesn't exist, a reflection exception is always thrown. - * If it exists, the previous exception is rethrown. - * - * @throws \ReflectionException - * - * @internal - */ - public static function throwOnRequiredClass(string $class, ?\Exception $previous = null): void - { - // If the passed class is the resource being checked, we shouldn't throw. - if (null === $previous && self::$autoloadedClass === $class) { - return; - } - - if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) { - if (null !== $previous) { - throw $previous; - } - - return; - } - - if ($previous instanceof \ReflectionException) { - throw $previous; - } - - $message = \sprintf('Class "%s" not found.', $class); - - if ($class !== (self::$autoloadedClass ?? $class)) { - $message = substr_replace($message, \sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0); - } - - if (null !== $previous) { - $message = $previous->getMessage(); - } - - $e = new \ReflectionException($message, 0, $previous); - - if (null !== $previous) { - throw $e; - } - - $trace = debug_backtrace(); - $autoloadFrame = [ - 'function' => 'spl_autoload_call', - 'args' => [$class], - ]; - - if (isset($trace[1])) { - $callerFrame = $trace[1]; - $i = 2; - } elseif (false !== $i = array_search($autoloadFrame, $trace, true)) { - $callerFrame = $trace[++$i]; - } else { - throw $e; - } - - if (isset($callerFrame['function']) && !isset($callerFrame['class'])) { - switch ($callerFrame['function']) { - case 'get_class_methods': - case 'get_class_vars': - case 'get_parent_class': - case 'is_a': - case 'is_subclass_of': - case 'class_exists': - case 'class_implements': - case 'class_parents': - case 'trait_exists': - case 'defined': - case 'interface_exists': - case 'method_exists': - case 'property_exists': - case 'is_callable': - return; - } - - $props = [ - 'file' => $callerFrame['file'] ?? null, - 'line' => $callerFrame['line'] ?? null, - 'trace' => \array_slice($trace, 1 + $i), - ]; - - foreach ($props as $p => $v) { - if (null !== $v) { - $r = new \ReflectionProperty(\Exception::class, $p); - $r->setValue($e, $v); - } - } - } - - throw $e; - } -} diff --git a/vendor/symfony/config/Resource/ComposerResource.php b/vendor/symfony/config/Resource/ComposerResource.php deleted file mode 100644 index 83481225..00000000 --- a/vendor/symfony/config/Resource/ComposerResource.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ComposerResource tracks the PHP version and Composer dependencies. - * - * @author Nicolas Grekas - * - * @final - */ -class ComposerResource implements SelfCheckingResourceInterface -{ - private array $vendors; - - private static array $runtimeVendors; - - public function __construct() - { - self::refresh(); - $this->vendors = self::$runtimeVendors; - } - - public function getVendors(): array - { - return array_keys($this->vendors); - } - - public function __toString(): string - { - return __CLASS__; - } - - public function isFresh(int $timestamp): bool - { - self::refresh(); - - return array_values(self::$runtimeVendors) === array_values($this->vendors); - } - - private static function refresh(): void - { - self::$runtimeVendors = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (is_file($v.'/composer/installed.json')) { - self::$runtimeVendors[$v] = @filemtime($v.'/composer/installed.json'); - } - } - } - } -} diff --git a/vendor/symfony/config/Resource/DirectoryResource.php b/vendor/symfony/config/Resource/DirectoryResource.php deleted file mode 100644 index 5fd5f65c..00000000 --- a/vendor/symfony/config/Resource/DirectoryResource.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * DirectoryResource represents a resources stored in a subdirectory tree. - * - * @author Fabien Potencier - * - * @final - */ -class DirectoryResource implements SelfCheckingResourceInterface -{ - private string $resource; - - /** - * @param string $resource The file path to the resource - * @param string|null $pattern A pattern to restrict monitored files - * - * @throws \InvalidArgumentException - */ - public function __construct( - string $resource, - private ?string $pattern = null, - ) { - $resolvedResource = realpath($resource) ?: (file_exists($resource) ? $resource : false); - - if (false === $resolvedResource || !is_dir($resolvedResource)) { - throw new \InvalidArgumentException(\sprintf('The directory "%s" does not exist.', $resource)); - } - - $this->resource = $resolvedResource; - } - - public function __toString(): string - { - return hash('xxh128', serialize([$this->resource, $this->pattern])); - } - - public function getResource(): string - { - return $this->resource; - } - - public function getPattern(): ?string - { - return $this->pattern; - } - - public function isFresh(int $timestamp): bool - { - if (!is_dir($this->resource)) { - return false; - } - - if ($timestamp < filemtime($this->resource)) { - return false; - } - - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) { - // if regex filtering is enabled only check matching files - if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) { - continue; - } - - // always monitor directories for changes, except the .. entries - // (otherwise deleted files wouldn't get detected) - if ($file->isDir() && str_ends_with($file, '/..')) { - continue; - } - - // for broken links - try { - $fileMTime = $file->getMTime(); - } catch (\RuntimeException) { - continue; - } - - // early return if a file's mtime exceeds the passed timestamp - if ($timestamp < $fileMTime) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/config/Resource/FileExistenceResource.php b/vendor/symfony/config/Resource/FileExistenceResource.php deleted file mode 100644 index 4722537d..00000000 --- a/vendor/symfony/config/Resource/FileExistenceResource.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * FileExistenceResource represents a resource stored on the filesystem. - * Freshness is only evaluated against resource creation or deletion. - * - * The resource can be a file or a directory. - * - * @author Charles-Henri Bruyand - * - * @final - */ -class FileExistenceResource implements SelfCheckingResourceInterface -{ - private bool $exists; - - /** - * @param string $resource The file path to the resource - */ - public function __construct( - private string $resource, - ) { - $this->exists = file_exists($resource); - } - - public function __toString(): string - { - return 'existence.'.$this->resource; - } - - public function getResource(): string - { - return $this->resource; - } - - public function isFresh(int $timestamp): bool - { - return file_exists($this->resource) === $this->exists; - } -} diff --git a/vendor/symfony/config/Resource/FileResource.php b/vendor/symfony/config/Resource/FileResource.php deleted file mode 100644 index 44e5bbc5..00000000 --- a/vendor/symfony/config/Resource/FileResource.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * FileResource represents a resource stored on the filesystem. - * - * The resource can be a file or a directory. - * - * @author Fabien Potencier - * - * @final - */ -class FileResource implements SelfCheckingResourceInterface -{ - private string $resource; - - /** - * @param string $resource The file path to the resource - * - * @throws \InvalidArgumentException - */ - public function __construct(string $resource) - { - $resolvedResource = realpath($resource) ?: (file_exists($resource) ? $resource : false); - - if (false === $resolvedResource) { - throw new \InvalidArgumentException(\sprintf('The file "%s" does not exist.', $resource)); - } - - $this->resource = $resolvedResource; - } - - public function __toString(): string - { - return $this->resource; - } - - /** - * Returns the canonicalized, absolute path to the resource. - */ - public function getResource(): string - { - return $this->resource; - } - - public function isFresh(int $timestamp): bool - { - return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp; - } -} diff --git a/vendor/symfony/config/Resource/GlobResource.php b/vendor/symfony/config/Resource/GlobResource.php deleted file mode 100644 index f94c1cb1..00000000 --- a/vendor/symfony/config/Resource/GlobResource.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Finder\Glob; - -/** - * GlobResource represents a set of resources stored on the filesystem. - * - * Only existence/removal is tracked (not mtimes.) - * - * @author Nicolas Grekas - * - * @final - * - * @implements \IteratorAggregate - */ -class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface -{ - private string $prefix; - private string $hash; - private array $excludedPrefixes; - private int $globBrace; - - /** - * @param string $prefix A directory prefix - * @param string $pattern A glob pattern - * @param bool $recursive Whether directories should be scanned recursively or not - * - * @throws \InvalidArgumentException - */ - public function __construct( - string $prefix, - private string $pattern, - private bool $recursive, - private bool $forExclusion = false, - array $excludedPrefixes = [], - ) { - ksort($excludedPrefixes); - $resolvedPrefix = realpath($prefix) ?: (file_exists($prefix) ? $prefix : false); - $this->excludedPrefixes = $excludedPrefixes; - $this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0; - - if (false === $resolvedPrefix) { - throw new \InvalidArgumentException(\sprintf('The path "%s" does not exist.', $prefix)); - } - - $this->prefix = $resolvedPrefix; - } - - public function getPrefix(): string - { - return $this->prefix; - } - - public function __toString(): string - { - return 'glob.'.$this->prefix.(int) $this->recursive.$this->pattern.(int) $this->forExclusion.implode("\0", $this->excludedPrefixes); - } - - public function isFresh(int $timestamp): bool - { - $hash = $this->computeHash(); - $this->hash ??= $hash; - - return $this->hash === $hash; - } - - public function __serialize(): array - { - $this->hash ??= $this->computeHash(); - - return [ - 'prefix' => $this->prefix, - 'pattern' => $this->pattern, - 'recursive' => $this->recursive, - 'hash' => $this->hash, - 'forExclusion' => $this->forExclusion, - 'excludedPrefixes' => $this->excludedPrefixes, - ]; - } - - public function __unserialize(array $data): void - { - $this->prefix = array_shift($data); - $this->pattern = array_shift($data); - $this->recursive = array_shift($data); - $this->hash = array_shift($data); - $this->forExclusion = array_shift($data); - $this->excludedPrefixes = array_shift($data); - $this->globBrace = \defined('GLOB_BRACE') ? \GLOB_BRACE : 0; - } - - public function getIterator(): \Traversable - { - if ((!$this->recursive && '' === $this->pattern) || !file_exists($this->prefix)) { - return; - } - - if (is_file($prefix = str_replace('\\', '/', $this->prefix))) { - $prefix = \dirname($prefix); - $pattern = basename($prefix).$this->pattern; - } else { - $pattern = $this->pattern; - } - - if (class_exists(Finder::class)) { - $regex = Glob::toRegex($pattern); - if ($this->recursive) { - $regex = substr_replace($regex, str_ends_with($pattern, '/') ? '' : '(/|$)', -2, 1); - } - } else { - $regex = null; - } - - $prefixLen = \strlen($prefix); - $paths = null; - - if ('' === $this->pattern && is_file($this->prefix)) { - $paths = [$this->prefix => null]; - } elseif (!str_starts_with($this->prefix, 'phar://') && (null !== $regex || !str_contains($this->pattern, '/**/'))) { - if (!str_contains($this->pattern, '/**/') && ($this->globBrace || !str_contains($this->pattern, '{'))) { - $paths = array_fill_keys(glob($this->prefix.$this->pattern, \GLOB_NOSORT | $this->globBrace), null); - } elseif (!str_contains($this->pattern, '\\') || !preg_match('/\\\\[,{}]/', $this->pattern)) { - $paths = []; - foreach ($this->expandGlob($this->pattern) as $p) { - if (false !== $i = strpos($p, '/**/')) { - $p = substr_replace($p, '/*', $i); - } - $paths += array_fill_keys(glob($this->prefix.$p, \GLOB_NOSORT), false !== $i ? $regex : null); - } - } - } - - if (null !== $paths) { - uksort($paths, 'strnatcmp'); - foreach ($paths as $path => $regex) { - if ($this->excludedPrefixes) { - $normalizedPath = str_replace('\\', '/', $path); - do { - if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) { - continue 2; - } - } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath)); - } - - if ((null === $regex || preg_match($regex, substr(str_replace('\\', '/', $path), $prefixLen))) && is_file($path)) { - yield $path => new \SplFileInfo($path); - } - if (!is_dir($path)) { - continue; - } - if ($this->forExclusion && (null === $regex || preg_match($regex, substr(str_replace('\\', '/', $path), $prefixLen)))) { - yield $path => new \SplFileInfo($path); - continue; - } - if (!($this->recursive || null !== $regex) || isset($this->excludedPrefixes[str_replace('\\', '/', $path)])) { - continue; - } - $files = iterator_to_array(new \RecursiveIteratorIterator( - new \RecursiveCallbackFilterIterator( - new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - fn (\SplFileInfo $file, $path) => !isset($this->excludedPrefixes[$path = str_replace('\\', '/', $path)]) - && (null === $regex || preg_match($regex, substr($path, $prefixLen)) || $file->isDir()) - && '.' !== $file->getBasename()[0] - ), - \RecursiveIteratorIterator::LEAVES_ONLY - )); - uksort($files, 'strnatcmp'); - - foreach ($files as $path => $info) { - if ($info->isFile()) { - yield $path => $info; - } - } - } - - return; - } - - if (!class_exists(Finder::class)) { - throw new \LogicException('Extended glob patterns cannot be used as the Finder component is not installed. Try running "composer require symfony/finder".'); - } - - yield from (new Finder()) - ->followLinks() - ->filter(function (\SplFileInfo $info) use ($regex, $prefixLen, $prefix) { - $normalizedPath = str_replace('\\', '/', $info->getPathname()); - if (!preg_match($regex, substr($normalizedPath, $prefixLen)) || !$info->isFile()) { - return false; - } - if ($this->excludedPrefixes) { - do { - if (isset($this->excludedPrefixes[$dirPath = $normalizedPath])) { - return false; - } - } while ($prefix !== $dirPath && $dirPath !== $normalizedPath = \dirname($dirPath)); - } - }) - ->sortByName() - ->in($prefix) - ; - } - - private function computeHash(): string - { - $hash = hash_init('xxh128'); - - foreach ($this->getIterator() as $path => $info) { - hash_update($hash, $path."\n"); - } - - return hash_final($hash); - } - - private function expandGlob(string $pattern): array - { - $segments = preg_split('/\{([^{}]*+)\}/', $pattern, -1, \PREG_SPLIT_DELIM_CAPTURE); - $paths = [$segments[0]]; - $patterns = []; - - for ($i = 1; $i < \count($segments); $i += 2) { - $patterns = []; - - foreach (explode(',', $segments[$i]) as $s) { - foreach ($paths as $p) { - $patterns[] = $p.$s.$segments[1 + $i]; - } - } - - $paths = $patterns; - } - - $j = 0; - foreach ($patterns as $i => $p) { - if (str_contains($p, '{')) { - $p = $this->expandGlob($p); - array_splice($paths, $i + $j, 1, $p); - $j += \count($p) - 1; - } - } - - return $paths; - } -} diff --git a/vendor/symfony/config/Resource/ReflectionClassResource.php b/vendor/symfony/config/Resource/ReflectionClassResource.php deleted file mode 100644 index 53394b6c..00000000 --- a/vendor/symfony/config/Resource/ReflectionClassResource.php +++ /dev/null @@ -1,215 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * @author Nicolas Grekas - * - * @final - */ -class ReflectionClassResource implements SelfCheckingResourceInterface -{ - private array $files = []; - private string $className; - private array $excludedVendors = []; - private string $hash; - - public function __construct( - private \ReflectionClass $classReflector, - array $excludedVendors = [], - ) { - $this->className = $classReflector->name; - $this->excludedVendors = $excludedVendors; - } - - public function isFresh(int $timestamp): bool - { - if (!isset($this->hash)) { - $this->hash = $this->computeHash(); - $this->loadFiles($this->classReflector); - } - - foreach ($this->files as $file => $v) { - if (false === $filemtime = @filemtime($file)) { - return false; - } - - if ($filemtime > $timestamp) { - return $this->hash === $this->computeHash(); - } - } - - return true; - } - - public function __toString(): string - { - return 'reflection.'.$this->className; - } - - public function __serialize(): array - { - if (!isset($this->hash)) { - $this->hash = $this->computeHash(); - $this->loadFiles($this->classReflector); - } - - return [ - 'files' => $this->files, - 'className' => $this->className, - 'excludedVendors' => $this->excludedVendors, - 'hash' => $this->hash, - ]; - } - - private function loadFiles(\ReflectionClass $class): void - { - foreach ($class->getInterfaces() as $v) { - $this->loadFiles($v); - } - do { - $file = $class->getFileName(); - if (false !== $file && is_file($file)) { - foreach ($this->excludedVendors as $vendor) { - if (\in_array($file[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($file, $vendor)) { - $file = false; - break; - } - } - if ($file) { - $this->files[$file] = null; - } - } - foreach ($class->getTraits() as $v) { - $this->loadFiles($v); - } - } while ($class = $class->getParentClass()); - } - - private function computeHash(): string - { - try { - $this->classReflector ??= new \ReflectionClass($this->className); - } catch (\ReflectionException) { - // the class does not exist anymore - return false; - } - $hash = hash_init('xxh128'); - - foreach ($this->generateSignature($this->classReflector) as $info) { - hash_update($hash, $info); - } - - return hash_final($hash); - } - - private function generateSignature(\ReflectionClass $class): iterable - { - $attributes = []; - foreach ($class->getAttributes() as $a) { - $attributes[] = [$a->getName(), (string) $a]; - } - yield print_r($attributes, true); - $attributes = []; - - yield $class->getDocComment() ?: ''; - yield (int) $class->isFinal(); - yield (int) $class->isAbstract(); - - if ($class->isTrait()) { - yield print_r(class_uses($class->name), true); - } else { - yield print_r(class_parents($class->name), true); - yield print_r(class_implements($class->name), true); - yield print_r($class->getConstants(), true); - } - - foreach ($class->getReflectionConstants() as $constant) { - foreach ($constant->getAttributes() as $a) { - $attributes[] = [$a->getName(), (string) $a]; - } - yield $constant->name.print_r($attributes, true); - $attributes = []; - } - - if (!$class->isInterface()) { - $defaults = $class->getDefaultProperties(); - - foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) { - foreach ($p->getAttributes() as $a) { - $attributes[] = [$a->getName(), (string) $a]; - } - yield print_r($attributes, true); - $attributes = []; - - yield $p->getDocComment() ?: ''; - yield $p->isDefault() ? '' : ''; - yield $p->isPublic() ? 'public' : 'protected'; - yield $p->isStatic() ? 'static' : ''; - yield '$'.$p->name; - yield print_r(isset($defaults[$p->name]) && !\is_object($defaults[$p->name]) ? $defaults[$p->name] : null, true); - } - } - - foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) { - foreach ($this->excludedVendors as $vendor) { - $file = $m->getFileName(); - if (\in_array($file[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($file, $vendor)) { - continue 2; - } - } - - foreach ($m->getAttributes() as $a) { - $attributes[] = [$a->getName(), (string) $a]; - } - yield print_r($attributes, true); - $attributes = []; - - $defaults = []; - foreach ($m->getParameters() as $p) { - foreach ($p->getAttributes() as $a) { - $attributes[] = [$a->getName(), (string) $a]; - } - yield print_r($attributes, true); - $attributes = []; - - if (!$p->isDefaultValueAvailable()) { - $defaults[$p->name] = null; - - continue; - } - - $defaults[$p->name] = (string) $p; - } - - yield preg_replace('/^ @@.*/m', '', $m); - yield print_r($defaults, true); - } - - if ($class->isAbstract() || $class->isInterface() || $class->isTrait()) { - return; - } - - if (interface_exists(EventSubscriberInterface::class, false) && $class->isSubclassOf(EventSubscriberInterface::class)) { - yield EventSubscriberInterface::class; - yield print_r($class->name::getSubscribedEvents(), true); - } - - if (interface_exists(ServiceSubscriberInterface::class, false) && $class->isSubclassOf(ServiceSubscriberInterface::class)) { - yield ServiceSubscriberInterface::class; - yield print_r($class->name::getSubscribedServices(), true); - } - } -} diff --git a/vendor/symfony/config/Resource/ResourceInterface.php b/vendor/symfony/config/Resource/ResourceInterface.php deleted file mode 100644 index a97671d1..00000000 --- a/vendor/symfony/config/Resource/ResourceInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * ResourceInterface is the interface that must be implemented by all Resource classes. - * - * @author Fabien Potencier - */ -interface ResourceInterface extends \Stringable -{ - /** - * Returns a string representation of the Resource. - * - * This method is necessary to allow for resource de-duplication, for example by means - * of array_unique(). The string returned need not have a particular meaning, but has - * to be identical for different ResourceInterface instances referring to the same - * resource; and it should be unlikely to collide with that of other, unrelated - * resource instances. - */ - public function __toString(): string; -} diff --git a/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php b/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php deleted file mode 100644 index 5abdbadd..00000000 --- a/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\Config\ResourceCheckerInterface; - -/** - * Resource checker for instances of SelfCheckingResourceInterface. - * - * As these resources perform the actual check themselves, we can provide - * this class as a standard way of validating them. - * - * @author Matthias Pigulla - */ -class SelfCheckingResourceChecker implements ResourceCheckerInterface -{ - // Common shared cache, because this checker can be used in different - // situations. For example, when using the full stack framework, the router - // and the container have their own cache. But they may check the very same - // resources - private static array $cache = []; - - public function supports(ResourceInterface $metadata): bool - { - return $metadata instanceof SelfCheckingResourceInterface; - } - - /** - * @param SelfCheckingResourceInterface $resource - */ - public function isFresh(ResourceInterface $resource, int $timestamp): bool - { - $key = "$resource:$timestamp"; - - return self::$cache[$key] ??= $resource->isFresh($timestamp); - } -} diff --git a/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php b/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php deleted file mode 100644 index 197ff1f9..00000000 --- a/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -/** - * Interface for Resources that can check for freshness autonomously, - * without special support from external services. - * - * @author Matthias Pigulla - */ -interface SelfCheckingResourceInterface extends ResourceInterface -{ - /** - * Returns true if the resource has not been updated since the given timestamp. - * - * @param int $timestamp The last time the resource was loaded - */ - public function isFresh(int $timestamp): bool; -} diff --git a/vendor/symfony/config/Resource/SkippingResourceChecker.php b/vendor/symfony/config/Resource/SkippingResourceChecker.php deleted file mode 100644 index 0f0934c8..00000000 --- a/vendor/symfony/config/Resource/SkippingResourceChecker.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Resource; - -use Symfony\Component\Config\ResourceCheckerInterface; - -class SkippingResourceChecker implements ResourceCheckerInterface -{ - private array $skippedResourceTypes; - - /** - * @param class-string[] $skippedResourceTypes - */ - public function __construct(array $skippedResourceTypes = []) - { - $this->skippedResourceTypes = array_flip($skippedResourceTypes); - } - - public function supports(ResourceInterface $metadata): bool - { - return !$this->skippedResourceTypes || isset($this->skippedResourceTypes[$metadata::class]); - } - - public function isFresh(ResourceInterface $resource, int $timestamp): bool - { - return true; - } -} diff --git a/vendor/symfony/config/ResourceCheckerConfigCache.php b/vendor/symfony/config/ResourceCheckerConfigCache.php deleted file mode 100644 index a665e86d..00000000 --- a/vendor/symfony/config/ResourceCheckerConfigCache.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; - -/** - * ResourceCheckerConfigCache uses instances of ResourceCheckerInterface - * to check whether cached data is still fresh. - * - * @author Matthias Pigulla - */ -class ResourceCheckerConfigCache implements ConfigCacheInterface -{ - private string $metaFile; - - /** - * @param string $file The absolute cache path - * @param iterable $resourceCheckers The ResourceCheckers to use for the freshness check - * @param string|null $metaFile The absolute path to the meta file, defaults to $file.meta if null - */ - public function __construct( - private string $file, - private iterable $resourceCheckers = [], - ?string $metaFile = null, - ) { - $this->metaFile = $metaFile ?? $file.'.meta'; - } - - public function getPath(): string - { - return $this->file; - } - - /** - * Checks if the cache is still fresh. - * - * This implementation will make a decision solely based on the ResourceCheckers - * passed in the constructor. - * - * The first ResourceChecker that supports a given resource is considered authoritative. - * Resources with no matching ResourceChecker will silently be ignored and considered fresh. - */ - public function isFresh(): bool - { - if (!is_file($this->file)) { - return false; - } - - if ($this->resourceCheckers instanceof \Traversable && !$this->resourceCheckers instanceof \Countable) { - $this->resourceCheckers = iterator_to_array($this->resourceCheckers); - } - - if (!\count($this->resourceCheckers)) { - return true; // shortcut - if we don't have any checkers we don't need to bother with the meta file at all - } - - $metadata = $this->metaFile; - - if (!is_file($metadata)) { - return false; - } - - $meta = $this->safelyUnserialize($metadata); - - if (false === $meta) { - return false; - } - - $time = filemtime($this->file); - - foreach ($meta as $resource) { - foreach ($this->resourceCheckers as $checker) { - if (!$checker->supports($resource)) { - continue; // next checker - } - if ($checker->isFresh($resource, $time)) { - break; // no need to further check this resource - } - - return false; // cache is stale - } - // no suitable checker found, ignore this resource - } - - return true; - } - - /** - * Writes cache. - * - * @param string $content The content to write in the cache - * @param ResourceInterface[] $metadata An array of metadata - * - * @throws \RuntimeException When cache file can't be written - */ - public function write(string $content, ?array $metadata = null): void - { - $mode = 0666; - $umask = umask(); - $filesystem = new Filesystem(); - $filesystem->dumpFile($this->file, $content); - try { - $filesystem->chmod($this->file, $mode, $umask); - } catch (IOException) { - // discard chmod failure (some filesystem may not support it) - } - - if (null !== $metadata) { - $filesystem->dumpFile($this->metaFile, $ser = serialize($metadata)); - try { - $filesystem->chmod($this->metaFile, $mode, $umask); - } catch (IOException) { - // discard chmod failure (some filesystem may not support it) - } - - $ser = preg_replace_callback('/;O:(\d+):"/', static fn ($m) => ';O:'.(9 + $m[1]).':"Tracking\\', $ser); - $ser = preg_replace_callback('/s:(\d+):"(\0[^\0]++\0)/', static fn ($m) => 's:'.($m[1] - \strlen($m[2])).':"', $ser); - $ser = unserialize($ser, ['allowed_classes' => false]); - $ser = @json_encode($ser, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE) ?: []; - $ser = str_replace('"__PHP_Incomplete_Class_Name":"Tracking\\\\', '"@type":"', $ser); - $ser = \sprintf('{"resources":%s}', $ser); - - $filesystem->dumpFile($this->metaFile.'.json', $ser); - try { - $filesystem->chmod($this->metaFile.'.json', $mode, $umask); - } catch (IOException) { - // discard chmod failure (some filesystem may not support it) - } - } - - if (\function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL)) { - @opcache_invalidate($this->file, true); - } - } - - private function safelyUnserialize(string $file): mixed - { - $meta = false; - $content = (new Filesystem())->readFile($file); - $signalingException = new \UnexpectedValueException(); - $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); - $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) { - if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { - throw $signalingException; - } - - return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false; - }); - - try { - $meta = unserialize($content); - } catch (\Throwable $e) { - if ($e !== $signalingException) { - throw $e; - } - } finally { - restore_error_handler(); - ini_set('unserialize_callback_func', $prevUnserializeHandler); - } - - return $meta; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class): void - { - trigger_error('Class not found: '.$class); - } -} diff --git a/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php b/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php deleted file mode 100644 index 595855cc..00000000 --- a/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -/** - * A ConfigCacheFactory implementation that validates the - * cache with an arbitrary set of ResourceCheckers. - * - * @author Matthias Pigulla - */ -class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface -{ - /** - * @param iterable $resourceCheckers - */ - public function __construct( - private iterable $resourceCheckers = [], - ) { - } - - public function cache(string $file, callable $callable): ConfigCacheInterface - { - $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers); - if (!$cache->isFresh()) { - $callable($cache); - } - - return $cache; - } -} diff --git a/vendor/symfony/config/ResourceCheckerInterface.php b/vendor/symfony/config/ResourceCheckerInterface.php deleted file mode 100644 index 13ae03f4..00000000 --- a/vendor/symfony/config/ResourceCheckerInterface.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Interface for ResourceCheckers. - * - * When a ResourceCheckerConfigCache instance is checked for freshness, all its associated - * metadata resources are passed to ResourceCheckers. The ResourceCheckers - * can then inspect the resources and decide whether the cache can be considered - * fresh or not. - * - * @author Matthias Pigulla - * @author Benjamin Klotz - */ -interface ResourceCheckerInterface -{ - /** - * Queries the ResourceChecker whether it can validate a given - * resource or not. - */ - public function supports(ResourceInterface $metadata): bool; - - /** - * Validates the resource. - * - * @param int $timestamp The timestamp at which the cache associated with this resource was created - */ - public function isFresh(ResourceInterface $resource, int $timestamp): bool; -} diff --git a/vendor/symfony/config/Util/Exception/InvalidXmlException.php b/vendor/symfony/config/Util/Exception/InvalidXmlException.php deleted file mode 100644 index 155571ce..00000000 --- a/vendor/symfony/config/Util/Exception/InvalidXmlException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util\Exception; - -/** - * Exception class for when XML parsing with an XSD schema file path or a callable validator produces errors unrelated - * to the actual XML parsing. - * - * @author Ole Rößner - */ -class InvalidXmlException extends XmlParsingException -{ -} diff --git a/vendor/symfony/config/Util/Exception/XmlParsingException.php b/vendor/symfony/config/Util/Exception/XmlParsingException.php deleted file mode 100644 index 9bceed66..00000000 --- a/vendor/symfony/config/Util/Exception/XmlParsingException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util\Exception; - -/** - * Exception class for when XML cannot be parsed properly. - * - * @author Ole Rößner - */ -class XmlParsingException extends \InvalidArgumentException -{ -} diff --git a/vendor/symfony/config/Util/XmlUtils.php b/vendor/symfony/config/Util/XmlUtils.php deleted file mode 100644 index 02ebe7db..00000000 --- a/vendor/symfony/config/Util/XmlUtils.php +++ /dev/null @@ -1,270 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Util; - -use Symfony\Component\Config\Util\Exception\InvalidXmlException; -use Symfony\Component\Config\Util\Exception\XmlParsingException; -use Symfony\Component\Filesystem\Filesystem; - -/** - * XMLUtils is a bunch of utility methods to XML operations. - * - * This class contains static methods only and is not meant to be instantiated. - * - * @author Fabien Potencier - * @author Martin Hasoň - * @author Ole Rößner - */ -class XmlUtils -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Parses an XML string. - * - * @param string $content An XML string - * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation - * - * @throws XmlParsingException When parsing of XML file returns error - * @throws InvalidXmlException When parsing of XML with schema or callable produces any errors unrelated to the XML parsing itself - * @throws \RuntimeException When DOM extension is missing - */ - public static function parse(string $content, string|callable|null $schemaOrCallable = null): \DOMDocument - { - if (!\extension_loaded('dom')) { - throw new \LogicException('Extension DOM is required.'); - } - - $internalErrors = libxml_use_internal_errors(true); - libxml_clear_errors(); - - $dom = new \DOMDocument(); - $dom->validateOnParse = true; - if (!$dom->loadXML($content, \LIBXML_NONET | \LIBXML_COMPACT)) { - throw new XmlParsingException(implode("\n", static::getXmlErrors($internalErrors))); - } - - $dom->normalizeDocument(); - - libxml_use_internal_errors($internalErrors); - - foreach ($dom->childNodes as $child) { - if (\XML_DOCUMENT_TYPE_NODE === $child->nodeType) { - throw new XmlParsingException('Document types are not allowed.'); - } - } - - if (null !== $schemaOrCallable) { - $internalErrors = libxml_use_internal_errors(true); - libxml_clear_errors(); - - $e = null; - if (\is_callable($schemaOrCallable)) { - try { - $valid = $schemaOrCallable($dom, $internalErrors); - } catch (\Exception $e) { - $valid = false; - } - } elseif (is_file($schemaOrCallable)) { - $schemaSource = (new Filesystem())->readFile($schemaOrCallable); - $valid = @$dom->schemaValidateSource($schemaSource); - } else { - libxml_use_internal_errors($internalErrors); - - throw new XmlParsingException(\sprintf('Invalid XSD file: "%s".', $schemaOrCallable)); - } - - if (!$valid) { - $messages = static::getXmlErrors($internalErrors); - if (!$messages) { - throw new InvalidXmlException('The XML is not valid.', 0, $e); - } - throw new XmlParsingException(implode("\n", $messages), 0, $e); - } - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $dom; - } - - /** - * Loads an XML file. - * - * @param string $file An XML file path - * @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation - * - * @throws \InvalidArgumentException When loading of XML file returns error - * @throws XmlParsingException When XML parsing returns any errors - * @throws \RuntimeException When DOM extension is missing - */ - public static function loadFile(string $file, string|callable|null $schemaOrCallable = null): \DOMDocument - { - if (!is_file($file)) { - throw new \InvalidArgumentException(\sprintf('Resource "%s" is not a file.', $file)); - } - - if (!is_readable($file)) { - throw new \InvalidArgumentException(\sprintf('File "%s" is not readable.', $file)); - } - - $content = (new Filesystem())->readFile($file); - - if ('' === trim($content)) { - throw new \InvalidArgumentException(\sprintf('File "%s" does not contain valid XML, it is empty.', $file)); - } - - try { - return static::parse($content, $schemaOrCallable); - } catch (InvalidXmlException $e) { - throw new XmlParsingException(\sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious()); - } - } - - /** - * Converts a \DOMElement object to a PHP array. - * - * The following rules applies during the conversion: - * - * * Each tag is converted to a key value or an array - * if there is more than one "value" - * - * * The content of a tag is set under a "value" key (bar) - * if the tag also has some nested tags - * - * * The attributes are converted to keys () - * - * * The nested-tags are converted to keys (bar) - * - * @param \DOMElement $element A \DOMElement instance - * @param bool $checkPrefix Check prefix in an element or an attribute name - */ - public static function convertDomElementToArray(\DOMElement $element, bool $checkPrefix = true): mixed - { - $prefix = $element->prefix; - $empty = true; - $config = []; - foreach ($element->attributes as $name => $node) { - if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], true)) { - continue; - } - $config[$name] = static::phpize($node->value); - $empty = false; - } - - $nodeValue = false; - foreach ($element->childNodes as $node) { - if ($node instanceof \DOMText) { - if ('' !== trim($node->nodeValue)) { - $nodeValue = trim($node->nodeValue); - $empty = false; - } - } elseif ($checkPrefix && $prefix != $node->prefix) { - continue; - } elseif (!$node instanceof \DOMComment) { - $value = static::convertDomElementToArray($node, $checkPrefix); - - $key = $node->localName; - if (isset($config[$key])) { - if (!\is_array($config[$key]) || !\is_int(key($config[$key]))) { - $config[$key] = [$config[$key]]; - } - $config[$key][] = $value; - } else { - $config[$key] = $value; - } - - $empty = false; - } - } - - if (false !== $nodeValue) { - $value = static::phpize($nodeValue); - if (\count($config)) { - $config['value'] = $value; - } else { - $config = $value; - } - } - - return !$empty ? $config : null; - } - - /** - * Converts an xml value to a PHP type. - */ - public static function phpize(string|\Stringable $value): mixed - { - $value = (string) $value; - $lowercaseValue = strtolower($value); - - switch (true) { - case 'null' === $lowercaseValue: - return null; - case ctype_digit($value): - case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)): - $raw = $value; - $cast = (int) $value; - - return self::isOctal($value) ? \intval($value, 8) : (($raw === (string) $cast) ? $cast : $raw); - case 'true' === $lowercaseValue: - return true; - case 'false' === $lowercaseValue: - return false; - case isset($value[1]) && '0b' == $value[0].$value[1] && preg_match('/^0b[01]*$/', $value): - return bindec($value); - case is_numeric($value): - return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value; - case preg_match('/^0x[0-9a-f]++$/i', $value): - return hexdec($value); - case preg_match('/^[+-]?[0-9]+(\.[0-9]+)?$/', $value): - return (float) $value; - default: - return $value; - } - } - - protected static function getXmlErrors(bool $internalErrors): array - { - $errors = []; - foreach (libxml_get_errors() as $error) { - $errors[] = \sprintf('[%s %s] %s (in %s - line %d, column %d)', - \LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', - $error->code, - trim($error->message), - $error->file ?: 'n/a', - $error->line, - $error->column - ); - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $errors; - } - - private static function isOctal(string $str): bool - { - if ('-' === $str[0]) { - $str = substr($str, 1); - } - - return $str === '0'.decoct(\intval($str, 8)); - } -} diff --git a/vendor/symfony/config/composer.json b/vendor/symfony/config/composer.json deleted file mode 100644 index 37206042..00000000 --- a/vendor/symfony/config/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/config", - "type": "library", - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", - "symfony/polyfill-ctype": "~1.8" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "conflict": { - "symfony/finder": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Config\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/dependency-injection/Alias.php b/vendor/symfony/dependency-injection/Alias.php deleted file mode 100644 index 0ec1161f..00000000 --- a/vendor/symfony/dependency-injection/Alias.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -class Alias -{ - private const DEFAULT_DEPRECATION_TEMPLATE = 'The "%alias_id%" service alias is deprecated. You should stop using it, as it will be removed in the future.'; - - private array $deprecation = []; - - public function __construct( - private string $id, - private bool $public = false, - ) { - } - - /** - * Checks if this DI Alias should be public or not. - */ - public function isPublic(): bool - { - return $this->public; - } - - /** - * Sets if this Alias is public. - * - * @return $this - */ - public function setPublic(bool $boolean): static - { - $this->public = $boolean; - - return $this; - } - - /** - * Whether this alias is private. - */ - public function isPrivate(): bool - { - return !$this->public; - } - - /** - * Whether this alias is deprecated, that means it should not be referenced - * anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(string $package, string $version, string $message): static - { - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%alias_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%alias_id%" placeholder.'); - } - } - - $this->deprecation = ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE]; - - return $this; - } - - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @param string $id Service id relying on this definition - */ - public function getDeprecation(string $id): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%alias_id%', $id, $this->deprecation['message']), - ]; - } - - public function __toString(): string - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/AbstractArgument.php b/vendor/symfony/dependency-injection/Argument/AbstractArgument.php deleted file mode 100644 index b04f9b84..00000000 --- a/vendor/symfony/dependency-injection/Argument/AbstractArgument.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents an abstract service argument, which have to be set by a compiler pass or a DI extension. - */ -final class AbstractArgument -{ - private string $text; - private string $context = ''; - - public function __construct(string $text = '') - { - $this->text = trim($text, '. '); - } - - public function setContext(string $context): void - { - $this->context = $context.' is abstract'.('' === $this->text ? '' : ': '); - } - - public function getText(): string - { - return $this->text; - } - - public function getTextWithContext(): string - { - return $this->context.$this->text.'.'; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php b/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php deleted file mode 100644 index a160393d..00000000 --- a/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a complex argument containing nested values. - * - * @author Titouan Galopin - */ -interface ArgumentInterface -{ - public function getValues(): array; - - public function setValues(array $values): void; -} diff --git a/vendor/symfony/dependency-injection/Argument/BoundArgument.php b/vendor/symfony/dependency-injection/Argument/BoundArgument.php deleted file mode 100644 index f704bc19..00000000 --- a/vendor/symfony/dependency-injection/Argument/BoundArgument.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * @author Guilhem Niot - */ -final class BoundArgument implements ArgumentInterface -{ - public const SERVICE_BINDING = 0; - public const DEFAULTS_BINDING = 1; - public const INSTANCEOF_BINDING = 2; - - private static int $sequence = 0; - - private ?int $identifier = null; - private ?bool $used = null; - - public function __construct( - private mixed $value, - bool $trackUsage = true, - private int $type = 0, - private ?string $file = null, - ) { - if ($trackUsage) { - $this->identifier = ++self::$sequence; - } else { - $this->used = true; - } - } - - public function getValues(): array - { - return [$this->value, $this->identifier, $this->used, $this->type, $this->file]; - } - - public function setValues(array $values): void - { - if (5 === \count($values)) { - [$this->value, $this->identifier, $this->used, $this->type, $this->file] = $values; - } else { - [$this->value, $this->identifier, $this->used] = $values; - } - } -} diff --git a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php b/vendor/symfony/dependency-injection/Argument/IteratorArgument.php deleted file mode 100644 index 1e2de6d9..00000000 --- a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a collection of values to lazily iterate over. - * - * @author Titouan Galopin - */ -class IteratorArgument implements ArgumentInterface -{ - private array $values; - - public function __construct(array $values) - { - $this->setValues($values); - } - - public function getValues(): array - { - return $this->values; - } - - public function setValues(array $values): void - { - $this->values = $values; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/LazyClosure.php b/vendor/symfony/dependency-injection/Argument/LazyClosure.php deleted file mode 100644 index 3dcc34e4..00000000 --- a/vendor/symfony/dependency-injection/Argument/LazyClosure.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class LazyClosure -{ - public readonly object $service; - - public function __construct( - private \Closure $initializer, - ) { - unset($this->service); - } - - public function __get(mixed $name): mixed - { - if ('service' !== $name) { - throw new InvalidArgumentException(\sprintf('Cannot read property "%s" from a lazy closure.', $name)); - } - - if (isset($this->initializer)) { - if (\is_string($service = ($this->initializer)())) { - $service = (new \ReflectionClass($service))->newInstanceWithoutConstructor(); - } - $this->service = $service; - unset($this->initializer); - } - - return $this->service; - } - - public static function getCode(string $initializer, array $callable, string $class, ContainerBuilder $container, ?string $id): string - { - $method = $callable[1]; - - if ($asClosure = 'Closure' === $class) { - $class = ($callable[0] instanceof Reference ? $container->findDefinition($callable[0]) : $callable[0])->getClass(); - } - - $r = $container->getReflectionClass($class); - - if (null !== $id) { - $id = \sprintf(' for service "%s"', $id); - } - - if (!$asClosure) { - $id = str_replace('%', '%%', (string) $id); - - if (!$r || !$r->isInterface()) { - throw new RuntimeException(\sprintf("Cannot create adapter{$id} because \"%s\" is not an interface.", $class)); - } - if (1 !== \count($method = $r->getMethods())) { - throw new RuntimeException(\sprintf("Cannot create adapter{$id} because interface \"%s\" doesn't have exactly one method.", $class)); - } - $method = $method[0]->name; - } elseif (!$r || !$r->hasMethod($method)) { - throw new RuntimeException("Cannot create lazy closure{$id} because its corresponding callable is invalid."); - } - - $methodReflector = $r->getMethod($method); - $code = ProxyHelper::exportSignature($methodReflector, true, $args); - - if ($asClosure) { - $code = ' { '.preg_replace('/: static$/', ': \\'.$r->name, $code); - } else { - $code = ' implements \\'.$r->name.' { '.$code; - } - - $code = 'new class('.$initializer.') extends \\'.self::class - .$code.' { '.($methodReflector->hasReturnType() && 'void' === (string) $methodReflector->getReturnType() ? '' : 'return ').'$this->service->'.$callable[1].'('.$args.'); } ' - .'}'; - - return $asClosure ? '('.$code.')->'.$method.'(...)' : $code; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php b/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php deleted file mode 100644 index 9fee3743..00000000 --- a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * @internal - */ -class RewindableGenerator implements \IteratorAggregate, \Countable -{ - private \Closure $generator; - private \Closure|int $count; - - public function __construct(callable $generator, int|callable $count) - { - $this->generator = $generator(...); - $this->count = \is_int($count) ? $count : $count(...); - } - - public function getIterator(): \Traversable - { - $g = $this->generator; - - return $g(); - } - - public function count(): int - { - if (!\is_int($count = $this->count)) { - $this->count = $count(); - } - - return $this->count; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php b/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php deleted file mode 100644 index 3537540e..00000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * Represents a service wrapped in a memoizing closure. - * - * @author Nicolas Grekas - */ -class ServiceClosureArgument implements ArgumentInterface -{ - private array $values; - - public function __construct(mixed $value) - { - $this->values = [$value]; - } - - public function getValues(): array - { - return $this->values; - } - - public function setValues(array $values): void - { - if ([0] !== array_keys($values)) { - throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one value.'); - } - - $this->values = $values; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceLocator.php b/vendor/symfony/dependency-injection/Argument/ServiceLocator.php deleted file mode 100644 index d1558477..00000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceLocator.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator; - -/** - * @author Nicolas Grekas - * - * @internal - */ -class ServiceLocator extends BaseServiceLocator -{ - public function __construct( - private \Closure $factory, - private array $serviceMap, - private ?array $serviceTypes = null, - ) { - parent::__construct($serviceMap); - } - - public function get(string $id): mixed - { - return match (\count($this->serviceMap[$id] ?? [])) { - 0 => parent::get($id), - 1 => $this->serviceMap[$id][0], - default => ($this->factory)(...$this->serviceMap[$id]), - }; - } - - public function getProvidedServices(): array - { - return $this->serviceTypes ??= array_map(fn () => '?', $this->serviceMap); - } -} diff --git a/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php b/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php deleted file mode 100644 index 555d1468..00000000 --- a/vendor/symfony/dependency-injection/Argument/ServiceLocatorArgument.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a closure acting as a service locator. - * - * @author Nicolas Grekas - */ -class ServiceLocatorArgument implements ArgumentInterface -{ - private array $values; - private ?TaggedIteratorArgument $taggedIteratorArgument = null; - - public function __construct(array|TaggedIteratorArgument $values = []) - { - if ($values instanceof TaggedIteratorArgument) { - $this->taggedIteratorArgument = $values; - $values = []; - } - - $this->setValues($values); - } - - public function getTaggedIteratorArgument(): ?TaggedIteratorArgument - { - return $this->taggedIteratorArgument; - } - - public function getValues(): array - { - return $this->values; - } - - public function setValues(array $values): void - { - $this->values = $values; - } -} diff --git a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php b/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php deleted file mode 100644 index 396cdf14..00000000 --- a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Argument; - -/** - * Represents a collection of services found by tag name to lazily iterate over. - * - * @author Roland Franssen - */ -class TaggedIteratorArgument extends IteratorArgument -{ - private mixed $indexAttribute; - private ?string $defaultIndexMethod; - private ?string $defaultPriorityMethod; - - /** - * @param string $tag The name of the tag identifying the target services - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param bool $needsIndexes Whether indexes are required and should be generated when computing the map - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - * @param array $exclude Services to exclude from the iterator - * @param bool $excludeSelf Whether to automatically exclude the referencing service from the iterator - */ - public function __construct( - private string $tag, - ?string $indexAttribute = null, - ?string $defaultIndexMethod = null, - private bool $needsIndexes = false, - ?string $defaultPriorityMethod = null, - private array $exclude = [], - private bool $excludeSelf = true, - ) { - parent::__construct([]); - - if (null === $indexAttribute && $needsIndexes) { - $indexAttribute = preg_match('/[^.]++$/', $tag, $m) ? $m[0] : $tag; - } - - $this->indexAttribute = $indexAttribute; - $this->defaultIndexMethod = $defaultIndexMethod ?: ($indexAttribute ? 'getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))).'Name' : null); - $this->defaultPriorityMethod = $defaultPriorityMethod ?: ($indexAttribute ? 'getDefault'.str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))).'Priority' : null); - } - - public function getTag(): string - { - return $this->tag; - } - - public function getIndexAttribute(): ?string - { - return $this->indexAttribute; - } - - public function getDefaultIndexMethod(): ?string - { - return $this->defaultIndexMethod; - } - - public function needsIndexes(): bool - { - return $this->needsIndexes; - } - - public function getDefaultPriorityMethod(): ?string - { - return $this->defaultPriorityMethod; - } - - public function getExclude(): array - { - return $this->exclude; - } - - public function excludeSelf(): bool - { - return $this->excludeSelf; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AsAlias.php b/vendor/symfony/dependency-injection/Attribute/AsAlias.php deleted file mode 100644 index 0839afa4..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AsAlias.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which alias a service should be registered or to use the implemented interface if no parameter is given. - * - * @author Alan Poulain - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -final class AsAlias -{ - /** - * @var list - */ - public array $when = []; - - /** - * @param string|null $id The id of the alias - * @param bool $public Whether to declare the alias public - * @param string|list $when The environments under which the class will be registered as a service (i.e. "dev", "test", "prod") - */ - public function __construct( - public ?string $id = null, - public bool $public = false, - string|array $when = [], - ) { - $this->when = (array) $when; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AsDecorator.php b/vendor/symfony/dependency-injection/Attribute/AsDecorator.php deleted file mode 100644 index b5125c8b..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AsDecorator.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * Declares a decorating service. - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class AsDecorator -{ - /** - * @param string $decorates The service id to decorate - * @param int $priority The priority of this decoration when multiple decorators are declared for the same service - * @param int $onInvalid The behavior to adopt when the decoration is invalid; must be one of the {@see ContainerInterface} constants - */ - public function __construct( - public string $decorates, - public int $priority = 0, - public int $onInvalid = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php b/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php deleted file mode 100644 index de751213..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AsTaggedItem.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which index and priority a service class should be found in tagged iterators/locators. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class AsTaggedItem -{ - /** - * @param string|null $index The property or method to use to index the item in the iterator/locator - * @param int|null $priority The priority of the item; the higher the number, the earlier the tagged service will be located in the iterator/locator - */ - public function __construct( - public ?string $index = null, - public ?int $priority = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php b/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php deleted file mode 100644 index 06513fd9..00000000 --- a/vendor/symfony/dependency-injection/Attribute/Autoconfigure.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell how a base type should be autoconfigured. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class Autoconfigure -{ - /** - * @param array>|string[]|null $tags The tags to add to the service - * @param array>|null $calls The calls to be made when instantiating the service - * @param array|null $bind The bindings to declare for the service - * @param bool|string|null $lazy Whether the service is lazy-loaded - * @param bool|null $public Whether to declare the service as public - * @param bool|null $shared Whether to declare the service as shared - * @param bool|null $autowire Whether to declare the service as autowired - * @param array|null $properties The properties to define when creating the service - * @param array{string, string}|string|null $configurator A PHP function, reference or an array containing a class/reference and a method to call after the service is fully initialized - * @param string|null $constructor The public static method to use to instantiate the service - */ - public function __construct( - public ?array $tags = null, - public ?array $calls = null, - public ?array $bind = null, - public bool|string|null $lazy = null, - public ?bool $public = null, - public ?bool $shared = null, - public ?bool $autowire = null, - public ?array $properties = null, - public array|string|null $configurator = null, - public ?string $constructor = null, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php b/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php deleted file mode 100644 index dab55956..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell how a base type should be tagged. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] -class AutoconfigureTag extends Autoconfigure -{ - /** - * @param string|null $name The tag name to add - * @param array $attributes The tag attributes to attach to the tag - */ - public function __construct(?string $name = null, array $attributes = []) - { - parent::__construct( - tags: [ - [$name ?? 0 => $attributes], - ] - ); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Autowire.php b/vendor/symfony/dependency-injection/Attribute/Autowire.php deleted file mode 100644 index 87409265..00000000 --- a/vendor/symfony/dependency-injection/Attribute/Autowire.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * Attribute to tell a parameter how to be autowired. - * - * @author Kevin Bond - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class Autowire -{ - public readonly string|array|Expression|Reference|ArgumentInterface|null $value; - public readonly bool|array $lazy; - - /** - * Use only ONE of the following. - * - * @param string|array|ArgumentInterface|null $value Value to inject (ie "%kernel.project_dir%/some/path") - * @param string|null $service Service ID (ie "some.service") - * @param string|null $expression Expression (ie 'service("some.service").someMethod()') - * @param string|null $env Environment variable name (ie 'SOME_ENV_VARIABLE') - * @param string|null $param Parameter name (ie 'some.parameter.name') - * @param bool|class-string|class-string[] $lazy Whether to use lazy-loading for this argument - */ - public function __construct( - string|array|ArgumentInterface|null $value = null, - ?string $service = null, - ?string $expression = null, - ?string $env = null, - ?string $param = null, - bool|string|array $lazy = false, - ) { - if ($this->lazy = \is_string($lazy) ? [$lazy] : $lazy) { - if (null !== ($expression ?? $env ?? $param)) { - throw new LogicException('#[Autowire] attribute cannot be $lazy and use $expression, $env, or $param.'); - } - if (null !== $value && null !== $service) { - throw new LogicException('#[Autowire] attribute cannot declare $value and $service at the same time.'); - } - } elseif (!(null !== $value xor null !== $service xor null !== $expression xor null !== $env xor null !== $param)) { - throw new LogicException('#[Autowire] attribute must declare exactly one of $service, $expression, $env, $param or $value.'); - } - - if (\is_string($value) && str_starts_with($value, '@')) { - match (true) { - str_starts_with($value, '@@') => $value = substr($value, 1), - str_starts_with($value, '@=') => $expression = substr($value, 2), - default => $service = substr($value, 1), - }; - } - - $this->value = match (true) { - null !== $service => new Reference($service), - null !== $expression => class_exists(Expression::class) ? new Expression($expression) : throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'), - null !== $env => "%env($env)%", - null !== $param => "%$param%", - default => $value, - }; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireCallable.php b/vendor/symfony/dependency-injection/Attribute/AutowireCallable.php deleted file mode 100644 index bb17be57..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireCallable.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Attribute to tell which callable to give to an argument of type Closure. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireCallable extends AutowireInline -{ - /** - * @param string|array|null $callable The callable to autowire - * @param string|null $service The service containing the callable to autowire - * @param string|null $method The method name that will be autowired - * @param bool|class-string $lazy Whether to use lazy-loading for this argument - */ - public function __construct( - string|array|null $callable = null, - ?string $service = null, - ?string $method = null, - bool|string $lazy = false, - ) { - if (!(null !== $callable xor null !== $service)) { - throw new LogicException('#[AutowireCallable] attribute must declare exactly one of $callable or $service.'); - } - if (null === $service && null !== $method) { - throw new LogicException('#[AutowireCallable] attribute cannot have a $method without a $service.'); - } - - Autowire::__construct($callable ?? [new Reference($service), $method ?? '__invoke'], lazy: $lazy); - } - - public function buildDefinition(mixed $value, ?string $type, \ReflectionParameter $parameter): Definition - { - return (new Definition($type = \is_array($this->lazy) ? current($this->lazy) : ($type ?: 'Closure'))) - ->setFactory(['Closure', 'fromCallable']) - ->setArguments([\is_array($value) ? $value + [1 => '__invoke'] : $value]) - ->setLazy($this->lazy || 'Closure' !== $type && 'callable' !== (string) $parameter->getType()); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireDecorated.php b/vendor/symfony/dependency-injection/Attribute/AutowireDecorated.php deleted file mode 100644 index 58f77b8e..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireDecorated.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * Autowires the inner object of decorating services. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireDecorated -{ -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireInline.php b/vendor/symfony/dependency-injection/Attribute/AutowireInline.php deleted file mode 100644 index 157df679..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireInline.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - -/** - * Allows inline service definition for an argument. - * - * Using this attribute on a class autowires a new instance - * which is not shared between different services. - * - * $class a FQCN, or an array to define a factory. - * Use the "@" prefix to reference a service. - * - * @author Ismail Özgün Turan - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireInline extends Autowire -{ - public function __construct(string|array|null $class = null, array $arguments = [], array $calls = [], array $properties = [], ?string $parent = null, bool|string $lazy = false) - { - if (null === $class && null === $parent) { - throw new LogicException('#[AutowireInline] attribute should declare either $class or $parent.'); - } - - parent::__construct([ - \is_array($class) ? 'factory' : 'class' => $class, - 'arguments' => $arguments, - 'calls' => $calls, - 'properties' => $properties, - 'parent' => $parent, - ], lazy: $lazy); - } - - public function buildDefinition(mixed $value, ?string $type, \ReflectionParameter $parameter): Definition - { - static $parseDefinition; - static $yamlLoader; - - $parseDefinition ??= new \ReflectionMethod(YamlFileLoader::class, 'parseDefinition'); - $yamlLoader ??= $parseDefinition->getDeclaringClass()->newInstanceWithoutConstructor(); - - if (isset($value['factory'])) { - $value['class'] = $type; - $value['factory'][0] ??= $type; - $value['factory'][1] ??= '__invoke'; - } - $class = $parameter->getDeclaringClass(); - - return $parseDefinition->invoke($yamlLoader, $class->name, $value, $class->getFileName(), ['autowire' => true], true); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireIterator.php b/vendor/symfony/dependency-injection/Attribute/AutowireIterator.php deleted file mode 100644 index 2f845c86..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireIterator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; - -/** - * Autowires an iterator of services based on a tag name. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireIterator extends Autowire -{ - /** - * @see ServiceSubscriberInterface::getSubscribedServices() - * - * @param string $tag A tag name to search for to populate the iterator - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - * @param string|array $exclude A service id or a list of service ids to exclude - * @param bool $excludeSelf Whether to automatically exclude the referencing service from the iterator - */ - public function __construct( - string $tag, - ?string $indexAttribute = null, - ?string $defaultIndexMethod = null, - ?string $defaultPriorityMethod = null, - string|array $exclude = [], - bool $excludeSelf = true, - ) { - parent::__construct(new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, false, $defaultPriorityMethod, (array) $exclude, $excludeSelf)); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireLocator.php b/vendor/symfony/dependency-injection/Attribute/AutowireLocator.php deleted file mode 100644 index 5268aadf..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireLocator.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Contracts\Service\Attribute\SubscribedService; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * Autowires a service locator based on a tag name or an explicit list of key => service-type pairs. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireLocator extends Autowire -{ - /** - * @see ServiceSubscriberInterface::getSubscribedServices() - * - * @param string|array $services A tag name or an explicit list of service ids - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the locator - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - * @param string|array $exclude A service id or a list of service ids to exclude - * @param bool $excludeSelf Whether to automatically exclude the referencing service from the locator - */ - public function __construct( - string|array $services, - ?string $indexAttribute = null, - ?string $defaultIndexMethod = null, - ?string $defaultPriorityMethod = null, - string|array $exclude = [], - bool $excludeSelf = true, - ) { - if (\is_string($services)) { - parent::__construct(new ServiceLocatorArgument(new TaggedIteratorArgument($services, $indexAttribute, $defaultIndexMethod, true, $defaultPriorityMethod, (array) $exclude, $excludeSelf))); - - return; - } - - $references = []; - - foreach ($services as $key => $type) { - $attributes = []; - - if ($type instanceof Autowire) { - $references[$key] = $type; - continue; - } - - if ($type instanceof SubscribedService) { - $key = $type->key ?? $key; - $attributes = $type->attributes; - $type = ($type->nullable ? '?' : '').($type->type ?? throw new InvalidArgumentException(\sprintf('When "%s" is used, a type must be set.', SubscribedService::class))); - } - - if (!\is_string($type) || !preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))(?(DEFINE)(?(?&cn)(?:\\\\(?&cn))*+))^\??(?&fqcn)(?:(?:\|(?&fqcn))*+|(?:&(?&fqcn))*+)$/', $type)) { - throw new InvalidArgumentException(\sprintf('"%s" is not a PHP type for key "%s".', \is_string($type) ? $type : get_debug_type($type), $key)); - } - $optionalBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if ('?' === $type[0]) { - $type = substr($type, 1); - $optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } - if (\is_int($name = $key)) { - $key = $type; - $name = null; - } - - $references[$key] = new TypedReference($type, $type, $optionalBehavior, $name, $attributes); - } - - parent::__construct(new ServiceLocatorArgument($references)); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireMethodOf.php b/vendor/symfony/dependency-injection/Attribute/AutowireMethodOf.php deleted file mode 100644 index 4edcb8fc..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireMethodOf.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Tells which method should be turned into a Closure based on the name of the parameter it's attached to. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireMethodOf extends AutowireCallable -{ - /** - * @param string $service The service containing the method to autowire - * @param bool|class-string $lazy Whether to use lazy-loading for this argument - */ - public function __construct(string $service, bool|string $lazy = false) - { - parent::__construct([new Reference($service)], lazy: $lazy); - } - - public function buildDefinition(mixed $value, ?string $type, \ReflectionParameter $parameter): Definition - { - $value[1] = $parameter->name; - - return parent::buildDefinition($value, $type, $parameter); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/AutowireServiceClosure.php b/vendor/symfony/dependency-injection/Attribute/AutowireServiceClosure.php deleted file mode 100644 index a640a7fc..00000000 --- a/vendor/symfony/dependency-injection/Attribute/AutowireServiceClosure.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Attribute to wrap a service in a closure that returns it. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class AutowireServiceClosure extends Autowire -{ - /** - * @param string $service The service id to wrap in the closure - */ - public function __construct(string $service) - { - parent::__construct(new ServiceClosureArgument(new Reference($service))); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Exclude.php b/vendor/symfony/dependency-injection/Attribute/Exclude.php deleted file mode 100644 index 43efdcf1..00000000 --- a/vendor/symfony/dependency-injection/Attribute/Exclude.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell the class should not be registered as service. - * - * @author Grégoire Pineau - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class Exclude -{ -} diff --git a/vendor/symfony/dependency-injection/Attribute/Lazy.php b/vendor/symfony/dependency-injection/Attribute/Lazy.php deleted file mode 100644 index 54de2fed..00000000 --- a/vendor/symfony/dependency-injection/Attribute/Lazy.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PARAMETER)] -class Lazy -{ - public function __construct( - public bool|string|null $lazy = true, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php b/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php deleted file mode 100644 index cd558def..00000000 --- a/vendor/symfony/dependency-injection/Attribute/TaggedIterator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * Autowires an iterator of services based on a tag name. - * - * @deprecated since Symfony 7.1, use {@see AutowireIterator} instead. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class TaggedIterator extends AutowireIterator -{ - /** - * @param string $tag The tag to look for to populate the iterator - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - * @param string|string[] $exclude A service id or a list of service ids to exclude - * @param bool $excludeSelf Whether to automatically exclude the referencing service from the iterator - */ - public function __construct( - public string $tag, - public ?string $indexAttribute = null, - public ?string $defaultIndexMethod = null, - public ?string $defaultPriorityMethod = null, - public string|array $exclude = [], - public bool $excludeSelf = true, - ) { - trigger_deprecation('symfony/dependency-injection', '7.1', 'The "%s" attribute is deprecated, use "%s" instead.', self::class, AutowireIterator::class); - - parent::__construct($tag, $indexAttribute, $defaultIndexMethod, $defaultPriorityMethod, $exclude, $excludeSelf); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php b/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php deleted file mode 100644 index d122930f..00000000 --- a/vendor/symfony/dependency-injection/Attribute/TaggedLocator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * Autowires a locator of services based on a tag name. - * - * @deprecated since Symfony 7.1, use {@see AutowireLocator} instead. - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -class TaggedLocator extends AutowireLocator -{ - /** - * @param string $tag The tag to look for to populate the locator - * @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection - * @param string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute - * @param string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute - * @param string|string[] $exclude A service id or a list of service ids to exclude - * @param bool $excludeSelf Whether to automatically exclude the referencing service from the locator - */ - public function __construct( - public string $tag, - public ?string $indexAttribute = null, - public ?string $defaultIndexMethod = null, - public ?string $defaultPriorityMethod = null, - public string|array $exclude = [], - public bool $excludeSelf = true, - ) { - trigger_deprecation('symfony/dependency-injection', '7.1', 'The "%s" attribute is deprecated, use "%s" instead.', self::class, AutowireLocator::class); - - parent::__construct($tag, $indexAttribute, $defaultIndexMethod, $defaultPriorityMethod, $exclude, $excludeSelf); - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/Target.php b/vendor/symfony/dependency-injection/Attribute/Target.php deleted file mode 100644 index 149f8167..00000000 --- a/vendor/symfony/dependency-injection/Attribute/Target.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * An attribute to tell how a dependency is used and hint named autowiring aliases. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_PARAMETER)] -final class Target -{ - /** - * @param string|null $name The name of the target autowiring alias - */ - public function __construct(public ?string $name = null) - { - } - - public function getParsedName(): string - { - if (null === $this->name) { - throw new LogicException(\sprintf('Cannot parse the name of a #[Target] attribute that has not been resolved. Did you forget to call "%s::parseName()"?', __CLASS__)); - } - - return lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->name)))); - } - - public static function parseName(\ReflectionParameter $parameter, ?self &$attribute = null, ?string &$parsedName = null): string - { - $attribute = null; - if (!$target = $parameter->getAttributes(self::class)[0] ?? null) { - $parsedName = (new self($parameter->name))->getParsedName(); - - return $parameter->name; - } - - $attribute = $target->newInstance(); - $name = $attribute->name ??= $parameter->name; - $parsedName = $attribute->getParsedName(); - - if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $parsedName)) { - if (($function = $parameter->getDeclaringFunction()) instanceof \ReflectionMethod) { - $function = $function->class.'::'.$function->name; - } else { - $function = $function->name; - } - - throw new InvalidArgumentException(\sprintf('Invalid #[Target] name "%s" on parameter "$%s" of "%s()": the first character must be a letter.', $name, $parameter->name, $function)); - } - - return preg_match('/^[a-zA-Z0-9_\x7f-\xff]++$/', $name) ? $name : $parsedName; - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/When.php b/vendor/symfony/dependency-injection/Attribute/When.php deleted file mode 100644 index af36e059..00000000 --- a/vendor/symfony/dependency-injection/Attribute/When.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which environment this class should be registered as a service. - * - * @author Nicolas Grekas - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)] -class When -{ - /** - * @param string $env The environment under which the class will be registered as a service (i.e. "dev", "test", "prod") - */ - public function __construct(public string $env) - { - } -} diff --git a/vendor/symfony/dependency-injection/Attribute/WhenNot.php b/vendor/symfony/dependency-injection/Attribute/WhenNot.php deleted file mode 100644 index 878985dc..00000000 --- a/vendor/symfony/dependency-injection/Attribute/WhenNot.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Attribute; - -/** - * An attribute to tell under which environment this class should NOT be registered as a service. - * - * @author Alexandre Daubois - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)] -class WhenNot -{ - public function __construct( - public string $env, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/CHANGELOG.md b/vendor/symfony/dependency-injection/CHANGELOG.md deleted file mode 100644 index df3486a9..00000000 --- a/vendor/symfony/dependency-injection/CHANGELOG.md +++ /dev/null @@ -1,422 +0,0 @@ -CHANGELOG -========= - -7.3 ---- - - * Make `#[AsTaggedItem]` repeatable - * Support `@>` as a shorthand for `!service_closure` in yaml files - * Don't skip classes with private constructor when autodiscovering - * Add `Definition::addResourceTag()` and `ContainerBuilder::findTaggedResourceIds()` - for auto-configuration of classes excluded from the service container - * Accept multiple auto-configuration callbacks for the same attribute class - * Leverage native lazy objects when possible for lazy services - * Add `when` argument to `#[AsAlias]` - -7.2 ---- - - * Deprecate `!tagged` tag, use `!tagged_iterator` instead - * Add a `ContainerBuilder::registerChild()` shortcut method for registering child definitions - * Add support for `key-type` in `XmlFileLoader` - * Enable non-empty parameters with `ParameterBag::cannotBeEmpty()` and `ContainerBuilder::parameterCannotBeEmpty()` methods - * Resolve parameters found in index attribute of service tags - -7.1 ---- - - * Add `CheckAliasValidityPass` to check service compatibility with aliased interface - * Add argument `$prepend` to `ContainerConfigurator::extension()` to prepend the configuration instead of appending it - * Have `ServiceLocator` implement `ServiceCollectionInterface` - * Add `#[Lazy]` attribute as shortcut for `#[Autowire(lazy: [bool|string])]` and `#[Autoconfigure(lazy: [bool|string])]` - * Add `#[AutowireMethodOf]` attribute to autowire a method of a service as a callable - * Make `ContainerBuilder::registerAttributeForAutoconfiguration()` propagate to attribute classes that extend the registered class - * Add argument `$prepend` to `FileLoader::construct()` to prepend loaded configuration instead of appending it - * [BC BREAK] When used in the `prependExtension()` method, the `ContainerConfigurator::import()` method now prepends the configuration instead of appending it - * Cast env vars to null or bool when referencing them using `#[Autowire(env: '...')]` depending on the signature of the corresponding parameter - * Add `#[AutowireInline]` attribute to allow service definition at the class level - * Add `StaticEnvVarLoader` - -7.0 ---- - - * Remove `#[MapDecorated]`, use `#[AutowireDecorated]` instead - * Remove `ProxyHelper`, use `Symfony\Component\VarExporter\ProxyHelper` instead - * Remove `ReferenceSetArgumentTrait` - * Remove support of `@required` annotation, use the `Symfony\Contracts\Service\Attribute\Required` attribute instead - * Require explicit argument when calling `ContainerAwareTrait::setContainer()` - * Remove `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use options `inline_factories` and `inline_class_loader` instead - * Parameter names of `ParameterBag` cannot be numerics - * Remove `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead - * Add argument `$id` and `$asGhostObject` to `DumperInterface::isProxyCandidate()` and `getProxyCode()` - * Add argument `$source` to `FileLoader::registerClasses()` - -6.4 ---- - - * Allow using `#[Target]` with no arguments to state that a parameter must match a named autowiring alias - * Deprecate `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead - * Add `defined` env var processor that returns `true` for defined and neither null nor empty env vars - * Add `#[AutowireLocator]` and `#[AutowireIterator]` attributes - * Add `urlencode` env var processor that url encodes a string value - -6.3 ---- - - * Add options `inline_factories` and `inline_class_loader` to `PhpDumper::dump()` - * Deprecate `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter` - * Add `RemoveBuildParametersPass`, which removes parameters starting with a dot during compilation - * Add support for nesting autowiring-related attributes into `#[Autowire(...)]` - * Deprecate undefined and numeric keys with `service_locator` config - * Fail if Target attribute does not exist during compilation - * Enable deprecating parameters with `ContainerBuilder::deprecateParameter()` - * Add `#[AsAlias]` attribute to tell under which alias a service should be registered or to use the implemented interface if no parameter is given - * Allow to trim XML service parameters value by using `trim="true"` attribute - * Allow extending the `Autowire` attribute - * Add `#[Exclude]` to skip autoregistering a class - * Add support for generating lazy closures - * Add support for autowiring services as closures using `#[AutowireCallable]` or `#[AutowireServiceClosure]` - * Add support for `#[Autowire(lazy: true|class-string)]` - * Make it possible to cast callables into single-method interfaces - * Deprecate `#[MapDecorated]`, use `#[AutowireDecorated]` instead - * Deprecate the `@required` annotation, use the `Symfony\Contracts\Service\Attribute\Required` attribute instead - * Add `constructor` option to services declaration and to `#[Autoconfigure]` - -6.2 ---- - - * Use lazy-loading ghost objects and virtual proxies out of the box - * Add arguments `&$asGhostObject` and `$id` to LazyProxy's `DumperInterface` to allow using ghost objects for lazy loading services - * Add `enum` env var processor - * Add `shuffle` env var processor - * Allow #[When] to be extended - * Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface)` - * Deprecate calling `ContainerAwareTrait::setContainer()` without arguments - * Deprecate using numeric parameter names - * Add support for tagged iterators/locators `exclude` option to the xml and yaml loaders/dumpers - * Allow injecting `string $env` into php config closures - * Add `excludeSelf` parameter to `TaggedIteratorArgument` with default value to `true` - to control whether the referencing service should be automatically excluded from the iterator - -6.1 ---- - - * Add `#[MapDecorated]` attribute telling to which parameter the decorated service should be mapped in a decorator - * Add `#[AsDecorator]` attribute to make a service decorates another - * Add `$exclude` to `TaggedIterator` and `TaggedLocator` attributes - * Add `$exclude` to `tagged_iterator` and `tagged_locator` configurator - * Add an `env` function to the expression language provider - * Add an `Autowire` attribute to tell a parameter how to be autowired - * Allow using expressions as service factories - * Add argument type `closure` to help passing closures to services - * Deprecate `ReferenceSetArgumentTrait` - * Add `AbstractExtension` class for DI configuration/definition on a single file - -6.0 ---- - - * Remove `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead - * Remove `inline()` in favor of `inline_service()` and `ref()` in favor of `service()` when using the PHP-DSL - * Remove `Definition::getDeprecationMessage()`, use `Definition::getDeprecation()` instead - * Remove `Alias::getDeprecationMessage()`, use `Alias::getDeprecation()` instead - * Remove the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service - -5.4 ---- - * Add `$defaultIndexMethod` and `$defaultPriorityMethod` to `TaggedIterator` and `TaggedLocator` attributes - * Add `service_closure()` to the PHP-DSL - * Add support for autoconfigurable attributes on methods, properties and parameters - * Make auto-aliases private by default - * Add support for autowiring union and intersection types - -5.3 ---- - - * Add `ServicesConfigurator::remove()` in the PHP-DSL - * Add `%env(not:...)%` processor to negate boolean values - * Add support for loading autoconfiguration rules via the `#[Autoconfigure]` and `#[AutoconfigureTag]` attributes on PHP 8 - * Add `#[AsTaggedItem]` attribute for defining the index and priority of classes found in tagged iterators/locators - * Add autoconfigurable attributes - * Add support for autowiring tagged iterators and locators via attributes on PHP 8 - * Add support for per-env configuration in XML and Yaml loaders - * Add `ContainerBuilder::willBeAvailable()` to help with conditional configuration - * Add support an integer return value for default_index_method - * Add `#[When(env: 'foo')]` to skip autoregistering a class when the env doesn't match - * Add `env()` and `EnvConfigurator` in the PHP-DSL - * Add support for `ConfigBuilder` in the `PhpFileLoader` - * Add `ContainerConfigurator::env()` to get the current environment - * Add `#[Target]` to tell how a dependency is used and hint named autowiring aliases - -5.2.0 ------ - - * added `param()` and `abstract_arg()` in the PHP-DSL - * deprecated `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead - * added support for the `#[Required]` attribute - -5.1.0 ------ - - * deprecated `inline()` in favor of `inline_service()` and `ref()` in favor of `service()` when using the PHP-DSL - * allow decorators to reference their decorated service using the special `.inner` id - * added support to autowire public typed properties in php 7.4 - * added support for defining method calls, a configurator, and property setters in `InlineServiceConfigurator` - * added possibility to define abstract service arguments - * allowed mixing "parent" and instanceof-conditionals/defaults/bindings - * updated the signature of method `Definition::setDeprecated()` to `Definition::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `Alias::setDeprecated()` to `Alias::setDeprecation(string $package, string $version, string $message)` - * updated the signature of method `DeprecateTrait::deprecate()` to `DeprecateTrait::deprecation(string $package, string $version, string $message)` - * deprecated the `Psr\Container\ContainerInterface` and `Symfony\Component\DependencyInjection\ContainerInterface` aliases of the `service_container` service, - configure them explicitly instead - * added class `Symfony\Component\DependencyInjection\Dumper\Preloader` to help with preloading on PHP 7.4+ - * added tags `container.preload`/`.no_preload` to declare extra classes to preload/services to not preload - * allowed loading and dumping tags with an attribute named "name" - * deprecated `Definition::getDeprecationMessage()`, use `Definition::getDeprecation()` instead - * deprecated `Alias::getDeprecationMessage()`, use `Alias::getDeprecation()` instead - * added support of PHP8 static return type for withers - * added `AliasDeprecatedPublicServicesPass` to deprecate public services to private - -5.0.0 ------ - - * removed support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` - * removed support for non-string default env() parameters - * moved `ServiceSubscriberInterface` to the `Symfony\Contracts\Service` namespace - * removed `RepeatedPass` and `RepeatablePassInterface` - * removed support for short factory/configurator syntax from `YamlFileLoader` - * removed `ResettableContainerInterface`, use `ResetInterface` instead - * added argument `$returnsClone` to `Definition::addMethodCall()` - * removed `tagged`, use `tagged_iterator` instead - -4.4.0 ------ - - * added `CheckTypeDeclarationsPass` to check injected parameters type during compilation - * added support for opcache.preload by generating a preloading script in the cache folder - * added support for dumping the container in one file instead of many files - * deprecated support for short factories and short configurators in Yaml - * added `tagged_iterator` alias for `tagged` which might be deprecated in a future version - * deprecated passing an instance of `Symfony\Component\DependencyInjection\Parameter` as class name to `Symfony\Component\DependencyInjection\Definition` - * added support for binding iterable and tagged services - * made singly-implemented interfaces detection be scoped by file - * added ability to define a static priority method for tagged service - * added support for improved syntax to define method calls in Yaml - * made the `%env(base64:...)%` processor able to decode base64url - * added ability to choose behavior of decorations on non existent decorated services - -4.3.0 ------ - - * added `%env(trim:...)%` processor to trim a string value - * added `%env(default:param_name:...)%` processor to fallback to a parameter or to null when using `%env(default::...)%` - * added `%env(url:...)%` processor to convert a URL or DNS into an array of components - * added `%env(query_string:...)%` processor to convert a query string into an array of key values - * added support for deprecating aliases - * made `ContainerParametersResource` final and not implement `Serializable` anymore - * added `ReverseContainer`: a container that turns services back to their ids - * added ability to define an index for a tagged collection - * added ability to define an index for services in an injected service locator argument - * made `ServiceLocator` implement `ServiceProviderInterface` - * deprecated support for non-string default env() parameters - * added `%env(require:...)%` processor to `require()` a PHP file and use the value returned from it - -4.2.0 ------ - - * added `ContainerBuilder::registerAliasForArgument()` to support autowiring by type+name - * added support for binding by type+name - * added `ServiceSubscriberTrait` to ease implementing `ServiceSubscriberInterface` using methods' return types - * added `ServiceLocatorArgument` and `!service_locator` config tag for creating optimized service-locators - * added support for autoconfiguring bindings - * added `%env(key:...)%` processor to fetch a specific key from an array - * deprecated `ServiceSubscriberInterface`, use the same interface from the `Symfony\Contracts\Service` namespace instead - * deprecated `ResettableContainerInterface`, use `Symfony\Contracts\Service\ResetInterface` instead - -4.1.0 ------ - - * added support for variadics in named arguments - * added PSR-11 `ContainerBagInterface` and its `ContainerBag` implementation to access parameters as-a-service - * added support for service's decorators autowiring - * deprecated the `TypedReference::canBeAutoregistered()` and `TypedReference::getRequiringClass()` methods - * environment variables are validated when used in extension configuration - * deprecated support for auto-discovered extension configuration class which does not implement `ConfigurationInterface` - -4.0.0 ------ - - * Relying on service auto-registration while autowiring is not supported anymore. - Explicitly inject your dependencies or create services whose ids are - their fully-qualified class name. - - Before: - - ```php - namespace App\Controller; - - use App\Mailer; - - class DefaultController - { - public function __construct(Mailer $mailer) { - // ... - } - - // ... - } - ``` - ```yml - services: - App\Controller\DefaultController: - autowire: true - ``` - - After: - - ```php - // same PHP code - ``` - ```yml - services: - App\Controller\DefaultController: - autowire: true - - # or - # App\Controller\DefaultController: - # arguments: { $mailer: "@App\Mailer" } - - App\Mailer: - autowire: true - ``` - * removed autowiring services based on the types they implement - * added a third `$methodName` argument to the `getProxyFactoryCode()` method - of the `DumperInterface` - * removed support for autowiring types - * removed `Container::isFrozen` - * removed support for dumping an ucompiled container in `PhpDumper` - * removed support for generating a dumped `Container` without populating the method map - * removed support for case insensitive service identifiers - * removed the `DefinitionDecorator` class, replaced by `ChildDefinition` - * removed the `AutowireServiceResource` class and related `AutowirePass::createResourceForClass()` method - * removed `LoggingFormatter`, `Compiler::getLoggingFormatter()` and `addLogMessage()` class and methods, use the `ContainerBuilder::log()` method instead - * removed `FactoryReturnTypePass` - * removed `ContainerBuilder::addClassResource()`, use the `addObjectResource()` or the `getReflectionClass()` method instead. - * removed support for top-level anonymous services - * removed silent behavior for unused attributes and elements - * removed support for setting and accessing private services in `Container` - * removed support for setting pre-defined services in `Container` - * removed support for case insensitivity of parameter names - * removed `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead - -3.4.0 ------ - - * moved the `ExtensionCompilerPass` to before-optimization passes with priority -1000 - * deprecated "public-by-default" definitions and aliases, the new default will be "private" in 4.0 - * added `EnvVarProcessorInterface` and corresponding "container.env_var_processor" tag for processing env vars - * added support for ignore-on-uninitialized references - * deprecated service auto-registration while autowiring - * deprecated the ability to check for the initialization of a private service with the `Container::initialized()` method - * deprecated support for top-level anonymous services in XML - * deprecated case insensitivity of parameter names - * deprecated the `ResolveDefinitionTemplatesPass` class in favor of `ResolveChildDefinitionsPass` - * added `TaggedIteratorArgument` with YAML (`!tagged foo`) and XML (``) support - * deprecated `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead - -3.3.0 ------ - - * deprecated autowiring services based on the types they implement; - rename (or alias) your services to their FQCN id to make them autowirable - * added "ServiceSubscriberInterface" - to allow for per-class explicit service-locator definitions - * added "container.service_locator" tag for defining service-locator services - * added anonymous services support in YAML configuration files using the `!service` tag. - * added "TypedReference" and "ServiceClosureArgument" for creating service-locator services - * added `ServiceLocator` - a PSR-11 container holding a set of services to be lazily loaded - * added "instanceof" section for local interface-defined configs - * added prototype services for PSR4-based discovery and registration - * added `ContainerBuilder::getReflectionClass()` for retrieving and tracking reflection class info - * deprecated `ContainerBuilder::getClassResource()`, use `ContainerBuilder::getReflectionClass()` or `ContainerBuilder::addObjectResource()` instead - * added `ContainerBuilder::fileExists()` for checking and tracking file or directory existence - * deprecated autowiring-types, use aliases instead - * added support for omitting the factory class name in a service definition if the definition class is set - * deprecated case insensitivity of service identifiers - * added "iterator" argument type for lazy iteration over a set of values and services - * added file-wide configurable defaults for service attributes "public", "tags", - "autowire" and "autoconfigure" - * made the "class" attribute optional, using the "id" as fallback - * using the `PhpDumper` with an uncompiled `ContainerBuilder` is deprecated and - will not be supported anymore in 4.0 - * deprecated the `DefinitionDecorator` class in favor of `ChildDefinition` - * allow config files to be loaded using a glob pattern - * [BC BREAK] the `NullDumper` class is now final - -3.2.0 ------ - - * allowed to prioritize compiler passes by introducing a third argument to `PassConfig::addPass()`, to `Compiler::addPass` and to `ContainerBuilder::addCompilerPass()` - * added support for PHP constants in YAML configuration files - * deprecated the ability to set or unset a private service with the `Container::set()` method - * deprecated the ability to check for the existence of a private service with the `Container::has()` method - * deprecated the ability to request a private service with the `Container::get()` method - * deprecated support for generating a dumped `Container` without populating the method map - -3.0.0 ------ - - * removed all deprecated codes from 2.x versions - -2.8.0 ------ - - * deprecated the abstract ContainerAware class in favor of ContainerAwareTrait - * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0 - * allowed specifying a directory to recursively load all configuration files it contains - * deprecated the concept of scopes - * added `Definition::setShared()` and `Definition::isShared()` - * added ResettableContainerInterface to be able to reset the container to release memory on shutdown - * added a way to define the priority of service decoration - * added support for service autowiring - -2.7.0 ------ - - * deprecated synchronized services - -2.6.0 ------ - - * added new factory syntax and deprecated the old one - -2.5.0 ------ - - * added DecoratorServicePass and a way to override a service definition (Definition::setDecoratedService()) - * deprecated SimpleXMLElement class. - -2.4.0 ------ - - * added support for expressions in service definitions - * added ContainerAwareTrait to add default container aware behavior to a class - -2.2.0 ------ - - * added Extension::isConfigEnabled() to ease working with enableable configurations - * added an Extension base class with sensible defaults to be used in conjunction - with the Config component. - * added PrependExtensionInterface (to be able to allow extensions to prepend - application configuration settings for any Bundle) - -2.1.0 ------ - - * added IntrospectableContainerInterface (to be able to check if a service - has been initialized or not) - * added ConfigurationExtensionInterface - * added Definition::clearTag() - * component exceptions that inherit base SPL classes are now used exclusively - (this includes dumped containers) - * [BC BREAK] fixed unescaping of class arguments, method - ParameterBag::unescapeValue() was made public diff --git a/vendor/symfony/dependency-injection/ChildDefinition.php b/vendor/symfony/dependency-injection/ChildDefinition.php deleted file mode 100644 index 1af0212b..00000000 --- a/vendor/symfony/dependency-injection/ChildDefinition.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; - -/** - * This definition extends another definition. - * - * @author Johannes M. Schmitt - */ -class ChildDefinition extends Definition -{ - /** - * @param string $parent The id of Definition instance to decorate - */ - public function __construct( - private string $parent, - ) { - } - - /** - * Returns the Definition to inherit from. - */ - public function getParent(): string - { - return $this->parent; - } - - /** - * Sets the Definition to inherit from. - * - * @return $this - */ - public function setParent(string $parent): static - { - $this->parent = $parent; - - return $this; - } - - /** - * Gets an argument to pass to the service constructor/factory method. - * - * If replaceArgument() has been used to replace an argument, this method - * will return the replacement value. - * - * @throws OutOfBoundsException When the argument does not exist - */ - public function getArgument(int|string $index): mixed - { - if (\array_key_exists('index_'.$index, $this->arguments)) { - return $this->arguments['index_'.$index]; - } - - return parent::getArgument($index); - } - - /** - * You should always use this method when overwriting existing arguments - * of the parent definition. - * - * If you directly call setArguments() keep in mind that you must follow - * certain conventions when you want to overwrite the arguments of the - * parent definition, otherwise your arguments will only be appended. - * - * @return $this - * - * @throws InvalidArgumentException when $index isn't an integer - */ - public function replaceArgument(int|string $index, mixed $value): static - { - if (\is_int($index)) { - $this->arguments['index_'.$index] = $value; - } elseif (str_starts_with($index, '$')) { - $this->arguments[$index] = $value; - } else { - throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.'); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php b/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php deleted file mode 100644 index 55f8ee7e..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php +++ /dev/null @@ -1,257 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -abstract class AbstractRecursivePass implements CompilerPassInterface -{ - protected ?ContainerBuilder $container; - protected ?string $currentId = null; - protected bool $skipScalars = false; - - private bool $processExpressions = false; - private ExpressionLanguage $expressionLanguage; - private bool $inExpression = false; - - /** - * @return void - */ - public function process(ContainerBuilder $container) - { - $this->container = $container; - - try { - $this->processValue($container->getDefinitions(), true); - } finally { - $this->container = null; - } - } - - protected function enableExpressionProcessing(): void - { - $this->processExpressions = true; - } - - protected function inExpression(bool $reset = true): bool - { - $inExpression = $this->inExpression; - if ($reset) { - $this->inExpression = false; - } - - return $inExpression; - } - - /** - * Processes a value found in a definition tree. - * - * @return mixed - */ - protected function processValue(mixed $value, bool $isRoot = false) - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - if ((!$v || \is_scalar($v)) && $this->skipScalars) { - continue; - } - if ($isRoot) { - if ($v instanceof Definition && $v->hasTag('container.excluded')) { - continue; - } - $this->currentId = $k; - } - if ($v !== $processedValue = $this->processValue($v, $isRoot)) { - $value[$k] = $processedValue; - } - } - } elseif ($value instanceof ArgumentInterface) { - $value->setValues($this->processValue($value->getValues())); - } elseif ($value instanceof Expression && $this->processExpressions) { - $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container', 'args' => 'args']); - } elseif ($value instanceof Definition) { - $value->setArguments($this->processValue($value->getArguments())); - $value->setProperties($this->processValue($value->getProperties())); - $value->setMethodCalls($this->processValue($value->getMethodCalls())); - - $changes = $value->getChanges(); - if (isset($changes['factory'])) { - if (\is_string($factory = $value->getFactory()) && str_starts_with($factory, '@=')) { - if (!class_exists(Expression::class)) { - throw new LogicException('Expressions cannot be used in service factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - $factory = new Expression(substr($factory, 2)); - } - if (($factory = $this->processValue($factory)) instanceof Expression) { - $factory = '@='.$factory; - } - $value->setFactory($factory); - } - if (isset($changes['configurator'])) { - $value->setConfigurator($this->processValue($value->getConfigurator())); - } - } - - return $value; - } - - /** - * @throws RuntimeException - */ - protected function getConstructor(Definition $definition, bool $required): ?\ReflectionFunctionAbstract - { - if ($definition->isSynthetic()) { - return null; - } - - if (\is_string($factory = $definition->getFactory())) { - if (str_starts_with($factory, '@=')) { - return new \ReflectionFunction(static function (...$args) {}); - } - - if (!\function_exists($factory)) { - throw new RuntimeException(\sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory)); - } - $r = new \ReflectionFunction($factory); - if (false !== $r->getFileName() && file_exists($r->getFileName())) { - $this->container->fileExists($r->getFileName()); - } - - return $r; - } - - if ($factory) { - [$class, $method] = $factory; - - if ('__construct' === $method) { - throw new RuntimeException(\sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId)); - } - - if ($class instanceof Reference) { - $factoryDefinition = $this->container->findDefinition((string) $class); - while ((null === $class = $factoryDefinition->getClass()) && $factoryDefinition instanceof ChildDefinition) { - $factoryDefinition = $this->container->findDefinition($factoryDefinition->getParent()); - } - } elseif ($class instanceof Definition) { - $class = $class->getClass(); - } else { - $class ??= $definition->getClass(); - } - - return $this->getReflectionMethod(new Definition($class), $method); - } - - while ((null === $class = $definition->getClass()) && $definition instanceof ChildDefinition) { - $definition = $this->container->findDefinition($definition->getParent()); - } - - try { - if (!$r = $this->container->getReflectionClass($class)) { - if (null === $class) { - throw new RuntimeException(\sprintf('Invalid service "%s": the class is not set.', $this->currentId)); - } - - throw new RuntimeException(\sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); - } - } catch (\ReflectionException $e) { - throw new RuntimeException(\sprintf('Invalid service "%s": ', $this->currentId).lcfirst($e->getMessage())); - } - if (!$r = $r->getConstructor()) { - if ($required) { - throw new RuntimeException(\sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, \sprintf($class !== $this->currentId ? ' "%s"' : '', $class))); - } - } elseif (!$r->isPublic()) { - throw new RuntimeException(\sprintf('Invalid service "%s": ', $this->currentId).\sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class).' must be public. Did you miss configuring a factory or a static constructor? Try using the "#[Autoconfigure(constructor: ...)]" attribute for the latter.'); - } - - return $r; - } - - /** - * @throws RuntimeException - */ - protected function getReflectionMethod(Definition $definition, string $method): \ReflectionFunctionAbstract - { - if ('__construct' === $method) { - return $this->getConstructor($definition, true); - } - - while ((null === $class = $definition->getClass()) && $definition instanceof ChildDefinition) { - $definition = $this->container->findDefinition($definition->getParent()); - } - - if (null === $class) { - throw new RuntimeException(\sprintf('Invalid service "%s": the class is not set.', $this->currentId)); - } - - if (!$r = $this->container->getReflectionClass($class)) { - throw new RuntimeException(\sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class)); - } - - if (!$r->hasMethod($method)) { - if ($r->hasMethod('__call') && ($r = $r->getMethod('__call')) && $r->isPublic()) { - return new \ReflectionMethod(static function (...$arguments) {}, '__invoke'); - } - - if ($r->hasMethod('__callStatic') && ($r = $r->getMethod('__callStatic')) && $r->isPublic()) { - return new \ReflectionMethod(static function (...$arguments) {}, '__invoke'); - } - - throw new RuntimeException(\sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method)); - } - - $r = $r->getMethod($method); - if (!$r->isPublic()) { - throw new RuntimeException(\sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method)); - } - - return $r; - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (!isset($this->expressionLanguage)) { - if (!class_exists(ExpressionLanguage::class)) { - throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - - $providers = $this->container->getExpressionLanguageProviders(); - $this->expressionLanguage = new ExpressionLanguage(null, $providers, function (string $arg): string { - if ('""' === substr_replace($arg, '', 1, -1)) { - $id = stripcslashes(substr($arg, 1, -1)); - $this->inExpression = true; - $arg = $this->processValue(new Reference($id)); - $this->inExpression = false; - if (!$arg instanceof Reference) { - throw new RuntimeException(\sprintf('"%s::processValue()" must return a Reference when processing an expression, "%s" returned for service("%s").', static::class, get_debug_type($arg), $id)); - } - $arg = \sprintf('"%s"', $arg); - } - - return \sprintf('$this->get(%s)', $arg); - }); - } - - return $this->expressionLanguage; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php b/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php deleted file mode 100644 index 4fb9cab7..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AliasDeprecatedPublicServicesPass.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -final class AliasDeprecatedPublicServicesPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $aliases = []; - - public function process(ContainerBuilder $container): void - { - foreach ($container->findTaggedServiceIds('container.private') as $id => $tags) { - if (null === $package = $tags[0]['package'] ?? null) { - throw new InvalidArgumentException(\sprintf('The "package" attribute is mandatory for the "container.private" tag on the "%s" service.', $id)); - } - - if (null === $version = $tags[0]['version'] ?? null) { - throw new InvalidArgumentException(\sprintf('The "version" attribute is mandatory for the "container.private" tag on the "%s" service.', $id)); - } - - $definition = $container->getDefinition($id); - if (!$definition->isPublic() || $definition->isPrivate()) { - continue; - } - - $container - ->setAlias($id, $aliasId = '.container.private.'.$id) - ->setPublic(true) - ->setDeprecated($package, $version, 'Accessing the "%alias_id%" service directly from the container is deprecated, use dependency injection instead.'); - - $container->setDefinition($aliasId, $definition); - - $this->aliases[$id] = $aliasId; - } - - parent::process($container); - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Reference && isset($this->aliases[$id = (string) $value])) { - return new Reference($this->aliases[$id], $value->getInvalidBehavior()); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php deleted file mode 100644 index 02c8cf16..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php +++ /dev/null @@ -1,201 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * Run this pass before passes that need to know more about the relation of - * your services. - * - * This class will populate the ServiceReferenceGraph with information. You can - * retrieve the graph in other passes from the compiler. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class AnalyzeServiceReferencesPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private ServiceReferenceGraph $graph; - private ?Definition $currentDefinition = null; - private bool $lazy; - private bool $byConstructor; - private bool $byFactory; - private array $definitions; - private array $aliases; - - /** - * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls - */ - public function __construct( - private bool $onlyConstructorArguments = false, - private bool $hasProxyDumper = true, - ) { - $this->enableExpressionProcessing(); - } - - /** - * Processes a ContainerBuilder object to populate the service reference graph. - */ - public function process(ContainerBuilder $container): void - { - $this->container = $container; - $this->graph = $container->getCompiler()->getServiceReferenceGraph(); - $this->graph->clear(); - $this->lazy = false; - $this->byConstructor = false; - $this->byFactory = false; - $this->definitions = $container->getDefinitions(); - $this->aliases = $container->getAliases(); - - foreach ($this->aliases as $id => $alias) { - $targetId = $this->getDefinitionId((string) $alias); - $this->graph->connect($id, $alias, $targetId, null !== $targetId ? $this->container->getDefinition($targetId) : null, null); - } - - try { - parent::process($container); - } finally { - $this->aliases = $this->definitions = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - $lazy = $this->lazy; - $inExpression = $this->inExpression(); - - if ($value instanceof ArgumentInterface) { - $this->lazy = !$this->byFactory || !$value instanceof IteratorArgument; - parent::processValue($value->getValues()); - $this->lazy = $lazy; - - return $value; - } - if ($value instanceof Reference) { - $targetId = $this->getDefinitionId((string) $value); - $targetDefinition = null !== $targetId ? $this->container->getDefinition($targetId) : null; - - $this->graph->connect( - $this->currentId, - $this->currentDefinition, - $targetId, - $targetDefinition, - $value, - $this->lazy || ($this->hasProxyDumper && $targetDefinition?->isLazy()), - ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), - $this->byConstructor - ); - - if ($inExpression) { - $this->graph->connect( - '.internal.reference_in_expression', - null, - $targetId, - $targetDefinition, - $value, - $this->lazy || $targetDefinition?->isLazy(), - true - ); - } - - return $value; - } - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - if ($isRoot) { - if ($value->isSynthetic() || $value->isAbstract()) { - return $value; - } - $this->currentDefinition = $value; - } elseif ($this->currentDefinition === $value) { - return $value; - } - $this->lazy = false; - - $byConstructor = $this->byConstructor; - $this->byConstructor = $isRoot || $byConstructor; - - $byFactory = $this->byFactory; - $this->byFactory = true; - if (\is_string($factory = $value->getFactory()) && str_starts_with($factory, '@=')) { - if (!class_exists(Expression::class)) { - throw new LogicException('Expressions cannot be used in service factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - $factory = new Expression(substr($factory, 2)); - } - $this->processValue($factory); - $this->byFactory = $byFactory; - - $this->processValue($value->getArguments()); - - $properties = $value->getProperties(); - $setters = $value->getMethodCalls(); - - // Any references before a "wither" are part of the constructor-instantiation graph - $lastWitherIndex = null; - foreach ($setters as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (null !== $lastWitherIndex) { - $this->processValue($properties); - $setters = $properties = []; - - foreach ($value->getMethodCalls() as $k => $call) { - if (null === $lastWitherIndex) { - $setters[] = $call; - continue; - } - - if ($lastWitherIndex === $k) { - $lastWitherIndex = null; - } - - $this->processValue($call); - } - } - - $this->byConstructor = $byConstructor; - - if (!$this->onlyConstructorArguments) { - $this->processValue($properties); - $this->processValue($setters); - $this->processValue($value->getConfigurator()); - } - $this->lazy = $lazy; - - return $value; - } - - private function getDefinitionId(string $id): ?string - { - while (isset($this->aliases[$id])) { - $id = (string) $this->aliases[$id]; - } - - return isset($this->definitions[$id]) ? $id : null; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php deleted file mode 100644 index bbf34191..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AttributeAutoconfigurationPass.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Alexander M. Turek - */ -final class AttributeAutoconfigurationPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $classAttributeConfigurators = []; - private array $methodAttributeConfigurators = []; - private array $propertyAttributeConfigurators = []; - private array $parameterAttributeConfigurators = []; - - public function process(ContainerBuilder $container): void - { - if (!$container->getAttributeAutoconfigurators()) { - return; - } - - foreach ($container->getAttributeAutoconfigurators() as $attributeName => $callables) { - foreach ($callables as $callable) { - $callableReflector = new \ReflectionFunction($callable(...)); - if ($callableReflector->getNumberOfParameters() <= 2) { - $this->classAttributeConfigurators[$attributeName][] = $callable; - continue; - } - - $reflectorParameter = $callableReflector->getParameters()[2]; - $parameterType = $reflectorParameter->getType(); - $types = []; - if ($parameterType instanceof \ReflectionUnionType) { - foreach ($parameterType->getTypes() as $type) { - $types[] = $type->getName(); - } - } elseif ($parameterType instanceof \ReflectionNamedType) { - $types[] = $parameterType->getName(); - } else { - throw new LogicException(\sprintf('Argument "$%s" of attribute autoconfigurator should have a type, use one or more of "\ReflectionClass|\ReflectionMethod|\ReflectionProperty|\ReflectionParameter|\Reflector" in "%s" on line "%d".', $reflectorParameter->getName(), $callableReflector->getFileName(), $callableReflector->getStartLine())); - } - - try { - $attributeReflector = new \ReflectionClass($attributeName); - } catch (\ReflectionException) { - continue; - } - - $targets = $attributeReflector->getAttributes(\Attribute::class)[0] ?? 0; - $targets = $targets ? $targets->getArguments()[0] ?? -1 : 0; - - foreach (['class', 'method', 'property', 'parameter'] as $symbol) { - if (['Reflector'] !== $types) { - if (!\in_array('Reflection'.ucfirst($symbol), $types, true)) { - continue; - } - if (!($targets & \constant('Attribute::TARGET_'.strtoupper($symbol)))) { - throw new LogicException(\sprintf('Invalid type "Reflection%s" on argument "$%s": attribute "%s" cannot target a '.$symbol.' in "%s" on line "%d".', ucfirst($symbol), $reflectorParameter->getName(), $attributeName, $callableReflector->getFileName(), $callableReflector->getStartLine())); - } - } - $this->{$symbol.'AttributeConfigurators'}[$attributeName][] = $callable; - } - } - } - - parent::process($container); - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Definition - || !$value->isAutoconfigured() - || $value->isAbstract() - || $value->hasTag('container.ignore_attributes') - || !($classReflector = $this->container->getReflectionClass($value->getClass(), false)) - ) { - return parent::processValue($value, $isRoot); - } - - $instanceof = $value->getInstanceofConditionals(); - $conditionals = $instanceof[$classReflector->getName()] ?? new ChildDefinition(''); - - $this->callConfigurators($this->classAttributeConfigurators, $conditionals, $classReflector); - - if ($this->parameterAttributeConfigurators) { - try { - $constructorReflector = $this->getConstructor($value, false); - } catch (RuntimeException) { - $constructorReflector = null; - } - - if ($constructorReflector) { - foreach ($constructorReflector->getParameters() as $parameterReflector) { - $this->callConfigurators($this->parameterAttributeConfigurators, $conditionals, $parameterReflector); - } - } - } - - if ($this->methodAttributeConfigurators || $this->parameterAttributeConfigurators) { - foreach ($classReflector->getMethods(\ReflectionMethod::IS_PUBLIC) as $methodReflector) { - if ($methodReflector->isConstructor() || $methodReflector->isDestructor()) { - continue; - } - - $this->callConfigurators($this->methodAttributeConfigurators, $conditionals, $methodReflector); - - foreach ($methodReflector->getParameters() as $parameterReflector) { - $this->callConfigurators($this->parameterAttributeConfigurators, $conditionals, $parameterReflector); - } - } - } - - if ($this->propertyAttributeConfigurators) { - foreach ($classReflector->getProperties(\ReflectionProperty::IS_PUBLIC) as $propertyReflector) { - if ($propertyReflector->isStatic()) { - continue; - } - - $this->callConfigurators($this->propertyAttributeConfigurators, $conditionals, $propertyReflector); - } - } - - if (!isset($instanceof[$classReflector->getName()]) && new ChildDefinition('') != $conditionals) { - $instanceof[$classReflector->getName()] = $conditionals; - $value->setInstanceofConditionals($instanceof); - } - - return parent::processValue($value, $isRoot); - } - - /** - * Call all the configurators for the given attribute. - * - * @param array $configurators - */ - private function callConfigurators(array &$configurators, ChildDefinition $conditionals, \ReflectionClass|\ReflectionMethod|\ReflectionParameter|\ReflectionProperty $reflector): void - { - if (!$configurators) { - return; - } - - foreach ($reflector->getAttributes() as $attribute) { - foreach ($this->findConfigurators($configurators, $attribute->getName()) as $configurator) { - $configurator($conditionals, $attribute->newInstance(), $reflector); - } - } - } - - /** - * Find the first configurator for the given attribute name, looking up the class hierarchy. - */ - private function findConfigurators(array &$configurators, string $attributeName): array - { - if (\array_key_exists($attributeName, $configurators)) { - return $configurators[$attributeName]; - } - - if (class_exists($attributeName) && $parent = get_parent_class($attributeName)) { - return $configurators[$attributeName] = $this->findConfigurators($configurators, $parent); - } - - return $configurators[$attributeName] = []; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php b/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php deleted file mode 100644 index dbc2826e..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * Sets a service to be an alias of another one, given a format pattern. - */ -class AutoAliasServicePass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) { - foreach ($tags as $tag) { - if (!isset($tag['format'])) { - throw new InvalidArgumentException(\sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId)); - } - - $aliasId = $container->getParameterBag()->resolveValue($tag['format']); - if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) { - $alias = new Alias($aliasId, $container->getDefinition($serviceId)->isPublic()); - $container->setAlias($serviceId, $alias); - } - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireAsDecoratorPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireAsDecoratorPass.php deleted file mode 100644 index 1e812c70..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowireAsDecoratorPass.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Attribute\AsDecorator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Reads #[AsDecorator] attributes on definitions that are autowired - * and don't have the "container.ignore_attributes" tag. - */ -final class AutowireAsDecoratorPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->getDefinitions() as $definition) { - if ($this->accept($definition) && $reflectionClass = $container->getReflectionClass($definition->getClass(), false)) { - $this->processClass($definition, $reflectionClass); - } - } - } - - private function accept(Definition $definition): bool - { - return !$definition->hasTag('container.ignore_attributes') && $definition->isAutowired(); - } - - private function processClass(Definition $definition, \ReflectionClass $reflectionClass): void - { - foreach ($reflectionClass->getAttributes(AsDecorator::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - $attribute = $attribute->newInstance(); - - $definition->setDecoratedService($attribute->decorates, null, $attribute->priority, $attribute->onInvalid); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php deleted file mode 100644 index 89369b3c..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php +++ /dev/null @@ -1,761 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\DependencyInjection\Attribute\Autowire; -use Symfony\Component\DependencyInjection\Attribute\AutowireDecorated; -use Symfony\Component\DependencyInjection\Attribute\AutowireInline; -use Symfony\Component\DependencyInjection\Attribute\Lazy; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\AutowiringFailedException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * Inspects existing service definitions and wires the autowired ones using the type hints of their classes. - * - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class AutowirePass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $types; - private array $ambiguousServiceTypes; - private array $autowiringAliases; - private ?string $lastFailure = null; - private ?string $decoratedClass = null; - private ?string $decoratedId = null; - private object $defaultArgument; - private ?\Closure $restorePreviousValue = null; - private ?self $typesClone = null; - - public function __construct( - private bool $throwOnAutowiringException = true, - ) { - $this->defaultArgument = new class { - public $value; - public $names; - public $bag; - - public function withValue(\ReflectionParameter $parameter): self - { - $clone = clone $this; - $clone->value = $this->bag->escapeValue($parameter->getDefaultValue()); - - return $clone; - } - }; - } - - public function process(ContainerBuilder $container): void - { - $this->defaultArgument->bag = $container->getParameterBag(); - - try { - $this->typesClone = clone $this; - parent::process($container); - } finally { - $this->decoratedClass = null; - $this->decoratedId = null; - $this->defaultArgument->bag = null; - $this->defaultArgument->names = null; - $this->restorePreviousValue = null; - $this->typesClone = null; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Autowire) { - return $this->processValue($this->container->getParameterBag()->resolveValue($value->value)); - } - - if ($value instanceof AutowireDecorated) { - $definition = $this->container->getDefinition($this->currentId); - - return new Reference($definition->innerServiceId ?? $this->currentId.'.inner', $definition->decorationOnInvalid ?? ContainerInterface::NULL_ON_INVALID_REFERENCE); - } - - try { - return $this->doProcessValue($value, $isRoot); - } catch (AutowiringFailedException $e) { - if ($this->throwOnAutowiringException) { - throw $e; - } - - $this->container->getDefinition($this->currentId)->addError($e->getMessageCallback() ?? $e->getMessage()); - - return parent::processValue($value, $isRoot); - } - } - - private function doProcessValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof TypedReference) { - foreach ($value->getAttributes() as $attribute) { - if ($attribute === $v = $this->processValue($attribute)) { - continue; - } - if (!$attribute instanceof Autowire || !$v instanceof Reference) { - return $v; - } - - $invalidBehavior = ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE !== $v->getInvalidBehavior() ? $v->getInvalidBehavior() : $value->getInvalidBehavior(); - $value = $v instanceof TypedReference - ? new TypedReference($v, $v->getType(), $invalidBehavior, $v->getName() ?? $value->getName(), array_merge($v->getAttributes(), $value->getAttributes())) - : new TypedReference($v, $value->getType(), $invalidBehavior, $value->getName(), $value->getAttributes()); - break; - } - if ($ref = $this->getAutowiredReference($value, true)) { - return $ref; - } - if (ContainerBuilder::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) { - $message = $this->createTypeNotFoundMessageCallback($value, 'it'); - - // since the error message varies by referenced id and $this->currentId, so should the id of the dummy errored definition - $this->container->register($id = \sprintf('.errored.%s.%s', $this->currentId, (string) $value), $value->getType()) - ->addError($message); - - return new TypedReference($id, $value->getType(), $value->getInvalidBehavior(), $value->getName()); - } - } - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - $this->container->log($this, \sprintf('Skipping service "%s": Class or interface "%s" cannot be loaded.', $this->currentId, $value->getClass())); - - return $value; - } - - $methodCalls = $value->getMethodCalls(); - - try { - $constructor = $this->getConstructor($value, false); - } catch (RuntimeException $e) { - throw new AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e); - } - - if ($constructor) { - array_unshift($methodCalls, [$constructor, $value->getArguments()]); - } - - $checkAttributes = !$value->hasTag('container.ignore_attributes'); - $methodCalls = $this->autowireCalls($methodCalls, $reflectionClass, $isRoot, $checkAttributes); - - if ($constructor) { - [, $arguments] = array_shift($methodCalls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - } - - if ($methodCalls !== $value->getMethodCalls()) { - $value->setMethodCalls($methodCalls); - } - - return $value; - } - - private function autowireCalls(array $methodCalls, \ReflectionClass $reflectionClass, bool $isRoot, bool $checkAttributes): array - { - if ($isRoot) { - $this->decoratedId = null; - $this->decoratedClass = null; - $this->restorePreviousValue = null; - - if (($definition = $this->container->getDefinition($this->currentId)) && null !== ($this->decoratedId = $definition->innerServiceId) && $this->container->has($this->decoratedId)) { - $this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass(); - } - } - - $patchedIndexes = []; - - foreach ($methodCalls as $i => $call) { - [$method, $arguments] = $call; - - if ($method instanceof \ReflectionFunctionAbstract) { - $reflectionMethod = $method; - } else { - $definition = new Definition($reflectionClass->name); - try { - $reflectionMethod = $this->getReflectionMethod($definition, $method); - } catch (RuntimeException $e) { - if ($definition->getFactory()) { - continue; - } - throw $e; - } - } - - $arguments = $this->autowireMethod($reflectionMethod, $arguments, $checkAttributes); - - if ($arguments !== $call[1]) { - $methodCalls[$i][1] = $arguments; - $patchedIndexes[] = $i; - } - } - - // use named arguments to skip complex default values - foreach ($patchedIndexes as $i) { - $namedArguments = null; - $arguments = $methodCalls[$i][1]; - - foreach ($arguments as $j => $value) { - if ($namedArguments && !$value instanceof $this->defaultArgument) { - unset($arguments[$j]); - $arguments[$namedArguments[$j]] = $value; - } - if (!$value instanceof $this->defaultArgument) { - continue; - } - - if (\is_array($value->value) ? $value->value : \is_object($value->value)) { - unset($arguments[$j]); - $namedArguments = $value->names; - } - - if ($namedArguments) { - unset($arguments[$j]); - } else { - $arguments[$j] = $value->value; - } - } - - $methodCalls[$i][1] = $arguments; - } - - return $methodCalls; - } - - /** - * Autowires the constructor or a method. - * - * @throws AutowiringFailedException - */ - private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments, bool $checkAttributes): array - { - $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId; - $method = $reflectionMethod->name; - $parameters = $reflectionMethod->getParameters(); - if ($reflectionMethod->isVariadic()) { - array_pop($parameters); - } - $defaultArgument = clone $this->defaultArgument; - $defaultArgument->names = new \ArrayObject(); - - foreach ($parameters as $index => $parameter) { - $defaultArgument->names[$index] = $parameter->name; - - if (\array_key_exists($parameter->name, $arguments)) { - $arguments[$index] = $arguments[$parameter->name]; - unset($arguments[$parameter->name]); - } - if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) { - continue; - } - - $type = ProxyHelper::exportType($parameter, true); - $target = null; - $name = Target::parseName($parameter, $target); - $target = $target ? [$target] : []; - $currentId = $this->currentId; - - $getValue = function () use ($type, $parameter, $class, $method, $name, $target, $defaultArgument, $currentId) { - if (!$value = $this->getAutowiredReference($ref = new TypedReference($type, $type, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $name, $target), false)) { - $failureMessage = $this->createTypeNotFoundMessageCallback($ref, \sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $currentId ? $class.'::'.$method : $method)); - - if ($parameter->isDefaultValueAvailable()) { - $value = $defaultArgument->withValue($parameter); - } elseif (!$parameter->allowsNull()) { - throw new AutowiringFailedException($currentId, $failureMessage); - } - } - - return $value; - }; - - if ($checkAttributes) { - $attributes = array_merge($parameter->getAttributes(Autowire::class, \ReflectionAttribute::IS_INSTANCEOF), $parameter->getAttributes(Lazy::class, \ReflectionAttribute::IS_INSTANCEOF)); - - if (1 < \count($attributes)) { - throw new AutowiringFailedException($this->currentId, 'Using both attributes #[Lazy] and #[Autowire] on an argument is not allowed; use the "lazy" parameter of #[Autowire] instead.'); - } - - foreach ($attributes as $attribute) { - $attribute = $attribute->newInstance(); - $value = $attribute instanceof Autowire ? $attribute->value : null; - - if (\is_string($value) && str_starts_with($value, '%env(') && str_ends_with($value, ')%')) { - if ($parameter->getType() instanceof \ReflectionNamedType && 'bool' === $parameter->getType()->getName() && !str_starts_with($value, '%env(bool:')) { - $attribute = new Autowire(substr_replace($value, 'bool:', 5, 0)); - } - if ($parameter->isDefaultValueAvailable() && $parameter->allowsNull() && null === $parameter->getDefaultValue() && !preg_match('/(^|:)default:/', $value)) { - $attribute = new Autowire(substr_replace($value, 'default::', 5, 0)); - } - } - - $invalidBehavior = $parameter->allowsNull() ? ContainerInterface::NULL_ON_INVALID_REFERENCE : ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE; - - try { - $value = $this->processValue(new TypedReference($type ?: '?', $type ?: 'mixed', $invalidBehavior, $name, [$attribute, ...$target])); - } catch (ParameterNotFoundException $e) { - if (!$parameter->isDefaultValueAvailable()) { - throw new AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e); - } - $arguments[$index] = clone $defaultArgument; - $arguments[$index]->value = $parameter->getDefaultValue(); - - continue 2; - } - - if ($attribute instanceof AutowireInline) { - $value = $attribute->buildDefinition($value, $type, $parameter); - $value = $this->doProcessValue($value); - } elseif ($lazy = $attribute->lazy) { - $value ??= $getValue(); - if ($this->container->has($value->getType())) { - $type = $this->container->findDefinition($value->getType())->getClass(); - } - $definition = (new Definition($type)) - ->setFactory('current') - ->setArguments([[$value]]) - ->setLazy(true); - - if (!\is_array($lazy)) { - if (str_contains($type, '|')) { - throw new AutowiringFailedException($this->currentId, \sprintf('Cannot use #[Autowire] with option "lazy: true" on union types for service "%s"; set the option to the interface(s) that should be proxied instead.', $this->currentId)); - } - $lazy = str_contains($type, '&') ? explode('&', $type) : []; - } - - if ($lazy) { - if (!class_exists($type) && !interface_exists($type, false)) { - $definition->setClass('object'); - } - foreach ($lazy as $v) { - $definition->addTag('proxy', ['interface' => $v]); - } - } - - if ($definition->getClass() !== (string) $value || $definition->getTag('proxy')) { - $value .= '.'.$this->container->hash([$definition->getClass(), $definition->getTag('proxy')]); - } - $this->container->setDefinition($value = '.lazy.'.$value, $definition); - $value = new Reference($value); - } - $arguments[$index] = $value; - - continue 2; - } - - foreach ($parameter->getAttributes(AutowireDecorated::class) as $attribute) { - $arguments[$index] = $this->processValue($attribute->newInstance()); - - continue 2; - } - } - - if (!$type) { - if (isset($arguments[$index])) { - continue; - } - - // no default value? Then fail - if (!$parameter->isDefaultValueAvailable()) { - // For core classes, isDefaultValueAvailable() can - // be false when isOptional() returns true. If the - // argument *is* optional, allow it to be missing - if ($parameter->isOptional()) { - --$index; - break; - } - $type = ProxyHelper::exportType($parameter); - $type = $type ? \sprintf('is type-hinted "%s"', preg_replace('/(^|[(|&])\\\\|^\?\\\\?/', '\1', $type)) : 'has no type-hint'; - - throw new AutowiringFailedException($this->currentId, \sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class.'::'.$method : $method, $type)); - } - - // specifically pass the default value - $arguments[$index] = $defaultArgument->withValue($parameter); - - continue; - } - - if ($this->decoratedClass && is_a($this->decoratedClass, $type, true)) { - if ($this->restorePreviousValue) { - // The inner service is injected only if there is only 1 argument matching the type of the decorated class - // across all arguments of all autowired methods. - // If a second matching argument is found, the default behavior is restored. - ($this->restorePreviousValue)(); - $this->decoratedClass = $this->restorePreviousValue = null; // Prevent further checks - } else { - $arguments[$index] = new TypedReference($this->decoratedId, $this->decoratedClass); - $argumentAtIndex = &$arguments[$index]; - $this->restorePreviousValue = static function () use (&$argumentAtIndex, $getValue) { - $argumentAtIndex = $getValue(); - }; - - continue; - } - } - - $arguments[$index] = $getValue(); - } - - if ($parameters && !isset($arguments[++$index])) { - while (0 <= --$index) { - if (!$arguments[$index] instanceof $defaultArgument) { - break; - } - unset($arguments[$index]); - } - } - - // it's possible index 1 was set, then index 0, then 2, etc - // make sure that we re-order so they're injected as expected - ksort($arguments, \SORT_NATURAL); - - return $arguments; - } - - /** - * Returns a reference to the service matching the given type, if any. - */ - private function getAutowiredReference(TypedReference $reference, bool $filterType): ?TypedReference - { - $this->lastFailure = null; - $type = $reference->getType(); - - if ($type !== (string) $reference) { - return $reference; - } - - if ($filterType && false !== $m = strpbrk($type, '&|')) { - $types = array_diff(explode($m[0], $type), ['int', 'string', 'array', 'bool', 'float', 'iterable', 'object', 'callable', 'null']); - - sort($types); - - $type = implode($m[0], $types); - } - - $name = $target = (array_filter($reference->getAttributes(), static fn ($a) => $a instanceof Target)[0] ?? null)?->name; - - if (null !== $name ??= $reference->getName()) { - if ($this->container->has($alias = $type.' $'.$name) && $this->canDefinitionBeAutowired($alias)) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - if (null !== ($alias = $this->getCombinedAlias($type, $name)) && $this->canDefinitionBeAutowired($alias)) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - $parsedName = (new Target($name))->getParsedName(); - - if ($this->container->has($alias = $type.' $'.$parsedName) && $this->canDefinitionBeAutowired($alias)) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - if (null !== ($alias = $this->getCombinedAlias($type, $parsedName)) && $this->canDefinitionBeAutowired($alias)) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - if (($this->container->has($n = $name) && $this->canDefinitionBeAutowired($n)) - || ($this->container->has($n = $parsedName) && $this->canDefinitionBeAutowired($n)) - ) { - foreach ($this->container->getAliases() as $id => $alias) { - if ($n === (string) $alias && str_starts_with($id, $type.' $')) { - return new TypedReference($n, $type, $reference->getInvalidBehavior()); - } - } - } - - if (null !== $target) { - return null; - } - } - - if ($this->container->has($type) && $this->canDefinitionBeAutowired($type)) { - return new TypedReference($type, $type, $reference->getInvalidBehavior()); - } - - if (null !== ($alias = $this->getCombinedAlias($type)) && $this->canDefinitionBeAutowired($alias)) { - return new TypedReference($alias, $type, $reference->getInvalidBehavior()); - } - - return null; - } - - private function canDefinitionBeAutowired(string $id): bool - { - $definition = $this->container->findDefinition($id); - - return !$definition->isAbstract() && !$definition->hasTag('container.excluded'); - } - - /** - * Populates the list of available types. - */ - private function populateAvailableTypes(ContainerBuilder $container): void - { - $this->types = []; - $this->ambiguousServiceTypes = []; - $this->autowiringAliases = []; - - foreach ($container->getDefinitions() as $id => $definition) { - $this->populateAvailableType($container, $id, $definition); - } - - $prev = null; - foreach ($container->getAliases() as $id => $alias) { - $this->populateAutowiringAlias($id, $prev); - $prev = $id; - } - } - - /** - * Populates the list of available types for a given definition. - */ - private function populateAvailableType(ContainerBuilder $container, string $id, Definition $definition): void - { - // Never use abstract services - if ($definition->isAbstract()) { - return; - } - - if ('' === $id || '.' === $id[0] || $definition->isDeprecated() || !$reflectionClass = $container->getReflectionClass($definition->getClass(), false)) { - return; - } - - foreach ($reflectionClass->getInterfaces() as $reflectionInterface) { - $this->set($reflectionInterface->name, $id); - } - - do { - $this->set($reflectionClass->name, $id); - } while ($reflectionClass = $reflectionClass->getParentClass()); - - $this->populateAutowiringAlias($id); - } - - /** - * Associates a type and a service id if applicable. - */ - private function set(string $type, string $id): void - { - // is this already a type/class that is known to match multiple services? - if (isset($this->ambiguousServiceTypes[$type])) { - $this->ambiguousServiceTypes[$type][] = $id; - - return; - } - - // check to make sure the type doesn't match multiple services - if (!isset($this->types[$type]) || $this->types[$type] === $id) { - $this->types[$type] = $id; - - return; - } - - // keep an array of all services matching this type - if (!isset($this->ambiguousServiceTypes[$type])) { - $this->ambiguousServiceTypes[$type] = [$this->types[$type]]; - unset($this->types[$type]); - } - $this->ambiguousServiceTypes[$type][] = $id; - } - - private function createTypeNotFoundMessageCallback(TypedReference $reference, string $label): \Closure - { - if (!isset($this->typesClone->container)) { - $this->typesClone->container = new ContainerBuilder($this->container->getParameterBag()); - $this->typesClone->container->setAliases($this->container->getAliases()); - $this->typesClone->container->setDefinitions($this->container->getDefinitions()); - $this->typesClone->container->setResourceTracking(false); - } - $currentId = $this->currentId; - - return (fn () => $this->createTypeNotFoundMessage($reference, $label, $currentId))->bindTo($this->typesClone); - } - - private function createTypeNotFoundMessage(TypedReference $reference, string $label, string $currentId): string - { - $type = $reference->getType(); - - $i = null; - $namespace = $type; - do { - $namespace = substr($namespace, 0, $i); - - if ($this->container->hasDefinition($namespace) && $tag = $this->container->getDefinition($namespace)->getTag('container.excluded')) { - return \sprintf('Cannot autowire service "%s": %s needs an instance of "%s" but this type has been excluded %s.', $currentId, $label, $type, $tag[0]['source'] ?? 'from autowiring'); - } - } while (false !== $i = strrpos($namespace, '\\')); - - if (!$r = $this->container->getReflectionClass($type, false)) { - // either $type does not exist or a parent class does not exist - try { - if (class_exists(ClassExistenceResource::class)) { - $resource = new ClassExistenceResource($type, false); - // isFresh() will explode ONLY if a parent class/trait does not exist - $resource->isFresh(0); - $parentMsg = false; - } else { - $parentMsg = "couldn't be loaded. Either it was not found or it is missing a parent class or a trait"; - } - } catch (\ReflectionException $e) { - $parentMsg = \sprintf('is missing a parent class (%s)', $e->getMessage()); - } - - $message = \sprintf('has type "%s" but this class %s.', $type, $parentMsg ?: 'was not found'); - } else { - $alternatives = $this->createTypeAlternatives($this->container, $reference); - - if (null !== $target = (array_filter($reference->getAttributes(), static fn ($a) => $a instanceof Target)[0] ?? null)) { - $target = null !== $target->name ? "('{$target->name}')" : ''; - $message = \sprintf('has "#[Target%s]" but no such target exists.%s', $target, $alternatives); - } else { - $message = $this->container->has($type) ? 'this service is abstract' : 'no such service exists'; - $message = \sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives); - } - - if ($r->isInterface() && !$alternatives) { - $message .= ' Did you create an instantiable class that implements this interface?'; - } - } - - $message = \sprintf('Cannot autowire service "%s": %s %s', $currentId, $label, $message); - - if (null !== $this->lastFailure) { - $message = $this->lastFailure."\n".$message; - $this->lastFailure = null; - } - - return $message; - } - - private function createTypeAlternatives(ContainerBuilder $container, TypedReference $reference): string - { - // try suggesting available aliases first - if ($message = $this->getAliasesSuggestionForType($container, $type = $reference->getType())) { - return ' '.$message; - } - if (!isset($this->ambiguousServiceTypes)) { - $this->populateAvailableTypes($container); - } - - $servicesAndAliases = $container->getServiceIds(); - $autowiringAliases = $this->autowiringAliases[$type] ?? []; - unset($autowiringAliases['']); - - if ($autowiringAliases) { - return \sprintf(' Did you mean to target%s "%s" instead?', 1 < \count($autowiringAliases) ? ' one of' : '', implode('", "', $autowiringAliases)); - } - - if (!$container->has($type) && false !== $key = array_search(strtolower($type), array_map('strtolower', $servicesAndAliases))) { - return \sprintf(' Did you mean "%s"?', $servicesAndAliases[$key]); - } elseif (isset($this->ambiguousServiceTypes[$type])) { - $message = \sprintf('one of these existing services: "%s"', implode('", "', $this->ambiguousServiceTypes[$type])); - } elseif (isset($this->types[$type])) { - $message = \sprintf('the existing "%s" service', $this->types[$type]); - } else { - return ''; - } - - return \sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message); - } - - private function getAliasesSuggestionForType(ContainerBuilder $container, string $type): ?string - { - $aliases = []; - foreach (class_parents($type) + class_implements($type) as $parent) { - if ($container->has($parent) && !$container->findDefinition($parent)->isAbstract()) { - $aliases[] = $parent; - } - } - - if (1 < $len = \count($aliases)) { - $message = 'Try changing the type-hint to one of its parents: '; - for ($i = 0, --$len; $i < $len; ++$i) { - $message .= \sprintf('%s "%s", ', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]); - } - - return $message.\sprintf('or %s "%s".', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]); - } - - if ($aliases) { - return \sprintf('Try changing the type-hint to "%s" instead.', $aliases[0]); - } - - return null; - } - - private function populateAutowiringAlias(string $id, ?string $target = null): void - { - if (!preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))^((?&V)(?:\\\\(?&V))*+)(?: \$((?&V)))?$/', $id, $m)) { - return; - } - - $type = $m[2]; - $name = $m[3] ?? ''; - - if (class_exists($type, false) || interface_exists($type, false)) { - if (null !== $target && str_starts_with($target, '.'.$type.' $') - && (new Target($target = substr($target, \strlen($type) + 3)))->getParsedName() === $name - ) { - $name = $target; - } - - $this->autowiringAliases[$type][$name] = $name; - } - } - - private function getCombinedAlias(string $type, ?string $name = null): ?string - { - if (str_contains($type, '&')) { - $types = explode('&', $type); - } elseif (str_contains($type, '|')) { - $types = explode('|', $type); - } else { - return null; - } - - $alias = null; - $suffix = $name ? ' $'.$name : ''; - - foreach ($types as $type) { - if (!$this->container->hasAlias($type.$suffix)) { - return null; - } - - if (null === $alias) { - $alias = (string) $this->container->getAlias($type.$suffix); - } elseif ((string) $this->container->getAlias($type.$suffix) !== $alias) { - return null; - } - } - - return $alias; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php deleted file mode 100644 index 9c422801..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Contracts\Service\Attribute\Required; - -/** - * Looks for definitions with autowiring enabled and registers their corresponding "#[Required]" methods as setters. - * - * @author Nicolas Grekas - */ -class AutowireRequiredMethodsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - return $value; - } - - $alreadyCalledMethods = []; - $withers = []; - - foreach ($value->getMethodCalls() as [$method]) { - $alreadyCalledMethods[strtolower($method)] = true; - } - - foreach ($reflectionClass->getMethods() as $reflectionMethod) { - $r = $reflectionMethod; - - if ($r->isConstructor() || isset($alreadyCalledMethods[strtolower($r->name)])) { - continue; - } - - while (true) { - if ($r->getAttributes(Required::class)) { - if ($this->isWither($r, $r->getDocComment() ?: '')) { - $withers[] = [$r->name, [], true]; - } else { - $value->addMethodCall($r->name, []); - } - break; - } - try { - $r = $r->getPrototype(); - } catch (\ReflectionException) { - break; // method has no prototype - } - } - } - - if ($withers) { - // Prepend withers to prevent creating circular loops - $setters = $value->getMethodCalls(); - $value->setMethodCalls($withers); - foreach ($setters as $call) { - $value->addMethodCall($call[0], $call[1], $call[2] ?? false); - } - } - - return $value; - } - - private function isWither(\ReflectionMethod $reflectionMethod, string $doc): bool - { - $match = preg_match('#(?:^/\*\*|\n\s*+\*)\s*+@return\s++(static|\$this)[\s\*]#i', $doc, $matches); - if ($match && 'static' === $matches[1]) { - return true; - } - - if ($match && '$this' === $matches[1]) { - return false; - } - - $reflectionType = $reflectionMethod->hasReturnType() ? $reflectionMethod->getReturnType() : null; - - return $reflectionType instanceof \ReflectionNamedType && 'static' === $reflectionType->getName(); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php deleted file mode 100644 index c5f45da7..00000000 --- a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredPropertiesPass.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Contracts\Service\Attribute\Required; - -/** - * Looks for definitions with autowiring enabled and registers their corresponding "#[Required]" properties. - * - * @author Sebastien Morel (Plopix) - * @author Nicolas Grekas - */ -class AutowireRequiredPropertiesPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) { - return $value; - } - if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) { - return $value; - } - - $properties = $value->getProperties(); - foreach ($reflectionClass->getProperties() as $reflectionProperty) { - if (!($type = $reflectionProperty->getType()) instanceof \ReflectionNamedType) { - continue; - } - if (!$reflectionProperty->getAttributes(Required::class)) { - continue; - } - if (\array_key_exists($name = $reflectionProperty->getName(), $properties)) { - continue; - } - - $type = $type->getName(); - $value->setProperty($name, new TypedReference($type, $type, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name)); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckAliasValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckAliasValidityPass.php deleted file mode 100644 index 43940cb4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckAliasValidityPass.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * This pass validates aliases, it provides the following checks: - * - * - An alias which happens to be an interface must resolve to a service implementing this interface. This ensures injecting the aliased interface won't cause a type error at runtime. - */ -class CheckAliasValidityPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->getAliases() as $id => $alias) { - try { - if (!$container->hasDefinition((string) $alias)) { - continue; - } - - $target = $container->getDefinition((string) $alias); - if (null === $target->getClass() || null !== $target->getFactory()) { - continue; - } - - $reflection = $container->getReflectionClass($id); - if (null === $reflection || !$reflection->isInterface()) { - continue; - } - - $targetReflection = $container->getReflectionClass($target->getClass()); - if (null !== $targetReflection && !$targetReflection->implementsInterface($id)) { - throw new RuntimeException(\sprintf('Invalid alias definition: alias "%s" is referencing class "%s" but this class does not implement "%s". Because this alias is an interface, "%s" must implement "%s".', $id, $target->getClass(), $id, $target->getClass(), $id)); - } - } catch (\ReflectionException) { - continue; - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php deleted file mode 100644 index 0f358939..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Checks if arguments of methods are properly configured. - * - * @author Kévin Dunglas - * @author Nicolas Grekas - */ -class CheckArgumentsValidityPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - public function __construct( - private bool $throwExceptions = true, - ) { - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $i = 0; - $hasNamedArgs = false; - foreach ($value->getArguments() as $k => $v) { - if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) { - $hasNamedArgs = true; - continue; - } - - if ($k !== $i++) { - if (!\is_int($k)) { - $msg = \sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - - $msg = \sprintf('Invalid constructor argument %d for service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $this->currentId, $i); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - } - - if ($hasNamedArgs) { - $msg = \sprintf('Invalid constructor argument for service "%s": cannot use positional argument after named argument. Check your service definition.', $this->currentId); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - } - - foreach ($value->getMethodCalls() as $methodCall) { - $i = 0; - $hasNamedArgs = false; - foreach ($methodCall[1] as $k => $v) { - if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $k)) { - $hasNamedArgs = true; - continue; - } - - if ($k !== $i++) { - if (!\is_int($k)) { - $msg = \sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - - $msg = \sprintf('Invalid argument %d for method call "%s" of service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $methodCall[0], $this->currentId, $i); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - } - - if ($hasNamedArgs) { - $msg = \sprintf('Invalid argument for method call "%s" of service "%s": cannot use positional argument after named argument. Check your service definition.', $methodCall[0], $this->currentId); - $value->addError($msg); - if ($this->throwExceptions) { - throw new RuntimeException($msg); - } - - break; - } - } - } - - return null; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php deleted file mode 100644 index 8a7c1138..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; - -/** - * Checks your services for circular references. - * - * References from method calls are ignored since we might be able to resolve - * these references depending on the order in which services are called. - * - * Circular reference from method calls will only be detected at run-time. - * - * @author Johannes M. Schmitt - */ -class CheckCircularReferencesPass implements CompilerPassInterface -{ - private array $currentPath; - private array $checkedNodes; - private array $checkedLazyNodes; - - /** - * Checks the ContainerBuilder object for circular references. - */ - public function process(ContainerBuilder $container): void - { - $graph = $container->getCompiler()->getServiceReferenceGraph(); - - $this->checkedNodes = []; - foreach ($graph->getNodes() as $id => $node) { - $this->currentPath = [$id]; - - $this->checkOutEdges($node->getOutEdges()); - } - } - - /** - * Checks for circular references. - * - * @param ServiceReferenceGraphEdge[] $edges An array of Edges - * - * @throws ServiceCircularReferenceException when a circular reference is found - */ - private function checkOutEdges(array $edges): void - { - foreach ($edges as $edge) { - $node = $edge->getDestNode(); - $id = $node->getId(); - - if (!empty($this->checkedNodes[$id])) { - continue; - } - - $isLeaf = (bool) $node->getValue(); - $isConcrete = !$edge->isLazy() && !$edge->isWeak(); - - // Skip already checked lazy services if they are still lazy. Will not gain any new information. - if (!empty($this->checkedLazyNodes[$id]) && (!$isLeaf || !$isConcrete)) { - continue; - } - - // Process concrete references, otherwise defer check circular references for lazy edges. - if (!$isLeaf || $isConcrete) { - $searchKey = array_search($id, $this->currentPath); - $this->currentPath[] = $id; - - if (false !== $searchKey) { - throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey)); - } - - $this->checkOutEdges($node->getOutEdges()); - - $this->checkedNodes[$id] = true; - unset($this->checkedLazyNodes[$id]); - } else { - $this->checkedLazyNodes[$id] = true; - } - - array_pop($this->currentPath); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php deleted file mode 100644 index da28a6d6..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Loader\FileLoader; - -/** - * This pass validates each definition individually only taking the information - * into account which is contained in the definition itself. - * - * Later passes can rely on the following, and specifically do not need to - * perform these checks themselves: - * - * - non synthetic, non abstract services always have a class set - * - synthetic services are always public - * - * @author Johannes M. Schmitt - */ -class CheckDefinitionValidityPass implements CompilerPassInterface -{ - /** - * Processes the ContainerBuilder to validate the Definition. - * - * @throws RuntimeException When the Definition is invalid - */ - public function process(ContainerBuilder $container): void - { - foreach ($container->getDefinitions() as $id => $definition) { - // synthetic service is public - if ($definition->isSynthetic() && !$definition->isPublic()) { - throw new RuntimeException(\sprintf('A synthetic service ("%s") must be public.', $id)); - } - - // non-synthetic, non-abstract service has class - if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass() && !$definition->hasTag('container.service_locator') && (!$definition->getFactory() || !preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id))) { - if ($definition->getFactory()) { - throw new RuntimeException(\sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id)); - } - if (class_exists($id) || interface_exists($id, false)) { - if (str_starts_with($id, '\\') && 1 < substr_count($id, '\\')) { - throw new RuntimeException(\sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "%s" to get rid of this error.', $id, substr($id, 1))); - } - - throw new RuntimeException(\sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface in the global namespace. Leaving out the "class" attribute is only allowed for namespaced classes. Please specify the class attribute explicitly to get rid of this error.', $id)); - } - - throw new RuntimeException(\sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id)); - } - - // tag attribute values must be scalars - foreach ($definition->getTags() as $name => $tags) { - foreach ($tags as $attributes) { - $this->validateAttributes($id, $name, $attributes); - } - } - - if ($definition->isPublic() && !$definition->isPrivate()) { - $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); - if (null !== $usedEnvs) { - throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.'); - } - } - } - - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic() && !$alias->isPrivate()) { - $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs); - if (null !== $usedEnvs) { - throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.'); - } - } - } - } - - private function validateAttributes(string $id, string $tag, array $attributes, array $path = []): void - { - foreach ($attributes as $name => $value) { - if (\is_array($value)) { - $this->validateAttributes($id, $tag, $value, [...$path, $name]); - } elseif (!\is_scalar($value) && null !== $value) { - $name = implode('.', [...$path, $name]); - throw new RuntimeException(\sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $tag, $name)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php deleted file mode 100644 index 7ad07984..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Checks that all references are pointing to a valid service. - * - * @author Johannes M. Schmitt - */ -class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $serviceLocatorContextIds = []; - - public function process(ContainerBuilder $container): void - { - $this->serviceLocatorContextIds = []; - foreach ($container->findTaggedServiceIds('container.service_locator_context') as $id => $tags) { - $this->serviceLocatorContextIds[$id] = $tags[0]['id']; - $container->getDefinition($id)->clearTag('container.service_locator_context'); - } - - try { - parent::process($container); - } finally { - $this->serviceLocatorContextIds = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $value->getInvalidBehavior() || $this->container->has((string) $value)) { - return $value; - } - - $currentId = $this->currentId; - $graph = $this->container->getCompiler()->getServiceReferenceGraph(); - - if (isset($this->serviceLocatorContextIds[$currentId])) { - $currentId = $this->serviceLocatorContextIds[$currentId]; - $locator = $this->container->getDefinition($this->currentId)->getFactory()[0]; - $this->throwServiceNotFoundException($value, $currentId, $locator->getArgument(0)); - } - - if ('.' === $currentId[0] && $graph->hasNode($currentId)) { - foreach ($graph->getNode($currentId)->getInEdges() as $edge) { - if (!$edge->getValue() instanceof Reference || ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $edge->getValue()->getInvalidBehavior()) { - continue; - } - $sourceId = $edge->getSourceNode()->getId(); - - if ('.' !== $sourceId[0]) { - $currentId = $sourceId; - break; - } - - if (isset($this->serviceLocatorContextIds[$sourceId])) { - $currentId = $this->serviceLocatorContextIds[$sourceId]; - $locator = $this->container->getDefinition($this->currentId); - $this->throwServiceNotFoundException($value, $currentId, $locator->getArgument(0)); - } - } - } - - $this->throwServiceNotFoundException($value, $currentId, $value); - } - - private function throwServiceNotFoundException(Reference $ref, string $sourceId, mixed $value): void - { - $id = (string) $ref; - $alternatives = []; - foreach ($this->container->getServiceIds() as $knownId) { - if ('' === $knownId || '.' === $knownId[0] || $knownId === $this->currentId) { - continue; - } - - $lev = levenshtein($id, $knownId); - if ($lev <= \strlen($id) / 3 || str_contains($knownId, $id)) { - $alternatives[] = $knownId; - } - } - - $pass = new class extends AbstractRecursivePass { - public Reference $ref; - public string $sourceId; - public array $alternatives; - - public function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($this->ref !== $value) { - return parent::processValue($value, $isRoot); - } - $sourceId = $this->sourceId; - if (null !== $this->currentId && $this->currentId !== (string) $value) { - $sourceId = $this->currentId.'" in the container provided to "'.$sourceId; - } - - throw new ServiceNotFoundException((string) $value, $sourceId, null, $this->alternatives); - } - }; - $pass->ref = $ref; - $pass->sourceId = $sourceId; - $pass->alternatives = $alternatives; - - $pass->processValue($value, true); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php deleted file mode 100644 index d680bf89..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Checks the validity of references. - * - * The following checks are performed by this pass: - * - target definitions are not abstract - * - * @author Johannes M. Schmitt - */ -class CheckReferenceValidityPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) { - return $value; - } - if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) { - $targetDefinition = $this->container->getDefinition((string) $value); - - if ($targetDefinition->isAbstract()) { - throw new RuntimeException(\sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value)); - } - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php b/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php deleted file mode 100644 index 30062bc4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CheckTypeDeclarationsPass.php +++ /dev/null @@ -1,331 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\InvalidParameterTypeException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * Checks whether injected parameters are compatible with type declarations. - * - * This pass should be run after all optimization passes. - * - * It can be added either: - * * before removing passes to check all services even if they are not currently used, - * * after removing passes to check only services are used in the app. - * - * @author Nicolas Grekas - * @author Julien Maulny - */ -final class CheckTypeDeclarationsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private const SCALAR_TYPES = [ - 'int' => true, - 'float' => true, - 'bool' => true, - 'string' => true, - ]; - - private const BUILTIN_TYPES = [ - 'array' => true, - 'bool' => true, - 'callable' => true, - 'float' => true, - 'int' => true, - 'iterable' => true, - 'object' => true, - 'string' => true, - ]; - - private ExpressionLanguage $expressionLanguage; - - /** - * @param bool $autoload Whether services who's class in not loaded should be checked or not. - * Defaults to false to save loading code during compilation. - * @param array $skippedIds An array indexed by the service ids to skip - */ - public function __construct( - private bool $autoload = false, - private array $skippedIds = [], - ) { - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (isset($this->skippedIds[$this->currentId ?? ''])) { - return $value; - } - - if (!$value instanceof Definition || $value->hasErrors() || $value->isDeprecated()) { - return parent::processValue($value, $isRoot); - } - - if (!$this->autoload) { - if (!$class = $value->getClass()) { - return parent::processValue($value, $isRoot); - } - if (!class_exists($class, false) && !interface_exists($class, false)) { - return parent::processValue($value, $isRoot); - } - } - - if (ServiceLocator::class === $value->getClass()) { - return parent::processValue($value, $isRoot); - } - - if ($constructor = $this->getConstructor($value, false)) { - $this->checkTypeDeclarations($value, $constructor, $value->getArguments()); - } - - foreach ($value->getMethodCalls() as $methodCall) { - try { - $reflectionMethod = $this->getReflectionMethod($value, $methodCall[0]); - } catch (RuntimeException $e) { - if ($value->getFactory()) { - continue; - } - - throw $e; - } - - $this->checkTypeDeclarations($value, $reflectionMethod, $methodCall[1]); - } - - return parent::processValue($value, $isRoot); - } - - /** - * @throws InvalidArgumentException When not enough parameters are defined for the method - */ - private function checkTypeDeclarations(Definition $checkedDefinition, \ReflectionFunctionAbstract $reflectionFunction, array $values): void - { - $numberOfRequiredParameters = $reflectionFunction->getNumberOfRequiredParameters(); - - if (\count($values) < $numberOfRequiredParameters) { - throw new InvalidArgumentException(\sprintf('Invalid definition for service "%s": "%s::%s()" requires %d arguments, %d passed.', $this->currentId, $reflectionFunction->class, $reflectionFunction->name, $numberOfRequiredParameters, \count($values))); - } - - $reflectionParameters = $reflectionFunction->getParameters(); - $checksCount = min($reflectionFunction->getNumberOfParameters(), \count($values)); - - $envPlaceholderUniquePrefix = $this->container->getParameterBag() instanceof EnvPlaceholderParameterBag ? $this->container->getParameterBag()->getEnvPlaceholderUniquePrefix() : null; - - for ($i = 0; $i < $checksCount; ++$i) { - $p = $reflectionParameters[$i]; - if (!$p->hasType() || $p->isVariadic()) { - continue; - } - if (\array_key_exists($p->name, $values)) { - $i = $p->name; - } elseif (!\array_key_exists($i, $values)) { - continue; - } - - $this->checkType($checkedDefinition, $values[$i], $p, $envPlaceholderUniquePrefix); - } - - if ($reflectionFunction->isVariadic() && ($lastParameter = end($reflectionParameters))->hasType()) { - $variadicParameters = \array_slice($values, $lastParameter->getPosition()); - - foreach ($variadicParameters as $variadicParameter) { - $this->checkType($checkedDefinition, $variadicParameter, $lastParameter, $envPlaceholderUniquePrefix); - } - } - } - - /** - * @throws InvalidParameterTypeException When a parameter is not compatible with the declared type - */ - private function checkType(Definition $checkedDefinition, mixed $value, \ReflectionParameter $parameter, ?string $envPlaceholderUniquePrefix, ?\ReflectionType $reflectionType = null): void - { - $reflectionType ??= $parameter->getType(); - - if ($reflectionType instanceof \ReflectionUnionType) { - foreach ($reflectionType->getTypes() as $t) { - try { - $this->checkType($checkedDefinition, $value, $parameter, $envPlaceholderUniquePrefix, $t); - - return; - } catch (InvalidParameterTypeException $e) { - } - } - - throw new InvalidParameterTypeException($this->currentId, $e->getCode(), $parameter); - } - if ($reflectionType instanceof \ReflectionIntersectionType) { - foreach ($reflectionType->getTypes() as $t) { - $this->checkType($checkedDefinition, $value, $parameter, $envPlaceholderUniquePrefix, $t); - } - - return; - } - if (!$reflectionType instanceof \ReflectionNamedType) { - return; - } - - $type = $reflectionType->getName(); - - if ($value instanceof Reference) { - if (!$this->container->has($value = (string) $value)) { - return; - } - - if ('service_container' === $value && is_a($type, Container::class, true)) { - return; - } - - $value = $this->container->findDefinition($value); - } - - if ('self' === $type) { - $type = $parameter->getDeclaringClass()->getName(); - } - - if ('static' === $type) { - $type = $checkedDefinition->getClass(); - } - - $class = null; - - if ($value instanceof Definition) { - if ($value->hasErrors() || $value->getFactory()) { - return; - } - - $class = $value->getClass(); - - if ($class && isset(self::BUILTIN_TYPES[strtolower($class)])) { - $class = strtolower($class); - } elseif (!$class || (!$this->autoload && !class_exists($class, false) && !interface_exists($class, false))) { - return; - } - } elseif ($value instanceof Parameter) { - $value = $this->container->getParameter($value); - } elseif ($value instanceof Expression) { - try { - $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this->container]); - } catch (\Exception) { - // If a service from the expression cannot be fetched from the container, we skip the validation. - return; - } - } elseif (\is_string($value)) { - if ('%' === ($value[0] ?? '') && preg_match('/^%([^%]+)%$/', $value, $match)) { - $value = $this->container->getParameter(substr($value, 1, -1)); - } - - if ($envPlaceholderUniquePrefix && \is_string($value) && str_contains($value, 'env_')) { - // If the value is an env placeholder that is either mixed with a string or with another env placeholder, then its resolved value will always be a string, so we don't need to resolve it. - // We don't need to change the value because it is already a string. - if ('' === preg_replace('/'.$envPlaceholderUniquePrefix.'_\w+_[a-f0-9]{32}/U', '', $value, -1, $c) && 1 === $c) { - try { - $value = $this->container->resolveEnvPlaceholders($value, true); - } catch (\Exception) { - // If an env placeholder cannot be resolved, we skip the validation. - return; - } - } - } - } - - if (null === $value && $parameter->allowsNull()) { - return; - } - - if (null === $class) { - if ($value instanceof IteratorArgument) { - $class = RewindableGenerator::class; - } elseif ($value instanceof ServiceClosureArgument) { - $class = \Closure::class; - } elseif ($value instanceof ServiceLocatorArgument) { - $class = ServiceLocator::class; - } elseif (\is_object($value)) { - $class = $value::class; - } else { - $class = \gettype($value); - $class = ['integer' => 'int', 'double' => 'float', 'boolean' => 'bool'][$class] ?? $class; - } - } - - if (isset(self::SCALAR_TYPES[$type]) && isset(self::SCALAR_TYPES[$class])) { - return; - } - - if ('string' === $type && $class instanceof \Stringable) { - return; - } - - if ('callable' === $type && (\Closure::class === $class || method_exists($class, '__invoke'))) { - return; - } - - if ('callable' === $type && \is_array($value) && isset($value[0]) && ($value[0] instanceof Reference || $value[0] instanceof Definition || \is_string($value[0]))) { - return; - } - - if ('iterable' === $type && (\is_array($value) || 'array' === $class || is_subclass_of($class, \Traversable::class))) { - return; - } - - if ($type === $class) { - return; - } - - if ('object' === $type && !isset(self::BUILTIN_TYPES[$class])) { - return; - } - - if ('mixed' === $type) { - return; - } - - if (is_a($class, $type, true)) { - return; - } - - if ('false' === $type) { - if (false === $value) { - return; - } - } elseif ('true' === $type) { - if (true === $value) { - return; - } - } elseif ($reflectionType->isBuiltin()) { - $checkFunction = \sprintf('is_%s', $type); - if ($checkFunction($value)) { - return; - } - } - - throw new InvalidParameterTypeException($this->currentId, \is_object($value) ? $class : get_debug_type($value), $parameter); - } - - private function getExpressionLanguage(): ExpressionLanguage - { - return $this->expressionLanguage ??= new ExpressionLanguage(null, $this->container->getExpressionLanguageProviders()); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/Compiler.php b/vendor/symfony/dependency-injection/Compiler/Compiler.php deleted file mode 100644 index cd03dcde..00000000 --- a/vendor/symfony/dependency-injection/Compiler/Compiler.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; - -/** - * This class is used to remove circular dependencies between individual passes. - * - * @author Johannes M. Schmitt - */ -class Compiler -{ - private PassConfig $passConfig; - private array $log = []; - private ServiceReferenceGraph $serviceReferenceGraph; - - public function __construct() - { - $this->passConfig = new PassConfig(); - $this->serviceReferenceGraph = new ServiceReferenceGraph(); - } - - public function getPassConfig(): PassConfig - { - return $this->passConfig; - } - - public function getServiceReferenceGraph(): ServiceReferenceGraph - { - return $this->serviceReferenceGraph; - } - - public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): void - { - $this->passConfig->addPass($pass, $type, $priority); - } - - /** - * @final - */ - public function log(CompilerPassInterface $pass, string $message): void - { - if (str_contains($message, "\n")) { - $message = str_replace("\n", "\n".$pass::class.': ', trim($message)); - } - - $this->log[] = $pass::class.': '.$message; - } - - public function getLog(): array - { - return $this->log; - } - - /** - * Run the Compiler and process all Passes. - */ - public function compile(ContainerBuilder $container): void - { - try { - foreach ($this->passConfig->getPasses() as $pass) { - $pass->process($container); - } - } catch (\Exception $e) { - $usedEnvs = []; - $prev = $e; - - do { - $msg = $prev->getMessage(); - - if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) { - $r = new \ReflectionProperty($prev, 'message'); - $r->setValue($prev, $resolvedMsg); - } - } while ($prev = $prev->getPrevious()); - - if ($usedEnvs) { - $e = new EnvParameterException($usedEnvs, $e); - } - - throw $e; - } finally { - $this->getServiceReferenceGraph()->clear(); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php b/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php deleted file mode 100644 index 2ad4a048..00000000 --- a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Interface that must be implemented by compilation passes. - * - * @author Johannes M. Schmitt - */ -interface CompilerPassInterface -{ - /** - * You can modify the container here before it is dumped to PHP code. - * - * @return void - */ - public function process(ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php deleted file mode 100644 index e82933af..00000000 --- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Overwrites a service but keeps the overridden one. - * - * @author Christophe Coevoet - * @author Fabien Potencier - * @author Diego Saint Esteben - */ -class DecoratorServicePass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - public function process(ContainerBuilder $container): void - { - $definitions = new \SplPriorityQueue(); - $order = \PHP_INT_MAX; - - foreach ($container->getDefinitions() as $id => $definition) { - if (!$decorated = $definition->getDecoratedService()) { - continue; - } - $definitions->insert([$id, $definition], [$decorated[2], --$order]); - } - $decoratingDefinitions = []; - $decoratedIds = []; - - $tagsToKeep = $container->hasParameter('container.behavior_describing_tags') - ? $container->getParameter('container.behavior_describing_tags') - : ['proxy', 'container.do_not_inline', 'container.service_locator', 'container.service_subscriber', 'container.service_subscriber.locator']; - - foreach ($definitions as [$id, $definition]) { - $decoratedService = $definition->getDecoratedService(); - [$inner, $renamedId] = $decoratedService; - $invalidBehavior = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - - $definition->setDecoratedService(null); - - if (!$renamedId) { - $renamedId = $id.'.inner'; - } - - $decoratedIds[$inner] ??= $renamedId; - $this->currentId = $renamedId; - $this->processValue($definition); - - $definition->innerServiceId = $renamedId; - $definition->decorationOnInvalid = $invalidBehavior; - - // we create a new alias/service for the service we are replacing - // to be able to reference it in the new one - if ($container->hasAlias($inner)) { - $alias = $container->getAlias($inner); - $public = $alias->isPublic(); - $container->setAlias($renamedId, new Alias((string) $alias, false)); - $decoratedDefinition = $container->findDefinition($alias); - } elseif ($container->hasDefinition($inner)) { - $decoratedDefinition = $container->getDefinition($inner); - $public = $decoratedDefinition->isPublic(); - $decoratedDefinition->setPublic(false); - $container->setDefinition($renamedId, $decoratedDefinition); - $decoratingDefinitions[$inner] = $decoratedDefinition; - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { - $container->removeDefinition($id); - continue; - } elseif (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { - $public = $definition->isPublic(); - $decoratedDefinition = null; - } else { - throw new ServiceNotFoundException($inner, $id); - } - - if ($decoratedDefinition?->isSynthetic()) { - throw new InvalidArgumentException(\sprintf('A synthetic service cannot be decorated: service "%s" cannot decorate "%s".', $id, $inner)); - } - - if (isset($decoratingDefinitions[$inner])) { - $decoratingDefinition = $decoratingDefinitions[$inner]; - - $decoratingTags = $decoratingDefinition->getTags(); - $resetTags = []; - - // Behavior-describing tags must not be transferred out to decorators - foreach ($tagsToKeep as $containerTag) { - if (isset($decoratingTags[$containerTag])) { - $resetTags[$containerTag] = $decoratingTags[$containerTag]; - unset($decoratingTags[$containerTag]); - } - } - - $definition->setTags(array_merge($decoratingTags, $definition->getTags())); - $decoratingDefinition->setTags($resetTags); - $decoratingDefinitions[$inner] = $definition; - } - - $container->setAlias($inner, $id)->setPublic($public); - } - - foreach ($decoratingDefinitions as $inner => $definition) { - $definition->addTag('container.decorator', ['id' => $inner, 'inner' => $decoratedIds[$inner]]); - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Reference && '.inner' === (string) $value) { - return new Reference($this->currentId, $value->getInvalidBehavior()); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php b/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php deleted file mode 100644 index 051114b0..00000000 --- a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Throws an exception for any Definitions that have errors and still exist. - * - * @author Ryan Weaver - */ -class DefinitionErrorExceptionPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $erroredDefinitions = []; - private array $sourceReferences = []; - - public function process(ContainerBuilder $container): void - { - try { - parent::process($container); - - $visitedIds = []; - - foreach ($this->erroredDefinitions as $id => $definition) { - if ($this->isErrorForRuntime($id, $visitedIds)) { - continue; - } - - // only show the first error so the user can focus on it - $errors = $definition->getErrors(); - - throw new RuntimeException(reset($errors)); - } - } finally { - $this->erroredDefinitions = []; - $this->sourceReferences = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof ArgumentInterface) { - parent::processValue($value->getValues()); - - return $value; - } - - if ($value instanceof Reference && $this->currentId !== $targetId = (string) $value) { - if ( - ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() - || ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior() - ) { - $this->sourceReferences[$targetId][$this->currentId ?? ''] ??= true; - } else { - $this->sourceReferences[$targetId][$this->currentId ?? ''] = false; - } - - return $value; - } - - if (!$value instanceof Definition || !$value->hasErrors() || $value->hasTag('container.error')) { - return parent::processValue($value, $isRoot); - } - - $this->erroredDefinitions[$this->currentId ?? ''] = $value; - - return parent::processValue($value); - } - - private function isErrorForRuntime(string $id, array &$visitedIds): bool - { - if (!isset($this->sourceReferences[$id])) { - return false; - } - - if (isset($visitedIds[$id])) { - return $visitedIds[$id]; - } - - $visitedIds[$id] = true; - - foreach ($this->sourceReferences[$id] as $sourceId => $isRuntime) { - if ($visitedIds[$sourceId] ?? $visitedIds[$sourceId] = $this->isErrorForRuntime($sourceId, $visitedIds)) { - continue; - } - - if (!$isRuntime) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php deleted file mode 100644 index f463a466..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * A pass to automatically process extensions if they implement - * CompilerPassInterface. - * - * @author Wouter J - */ -class ExtensionCompilerPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->getExtensions() as $extension) { - if (!$extension instanceof CompilerPassInterface) { - continue; - } - - $extension->process($container); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php deleted file mode 100644 index 9a6c4c53..00000000 --- a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php +++ /dev/null @@ -1,229 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Inline service definitions where this is possible. - * - * @author Johannes M. Schmitt - */ -class InlineServiceDefinitionsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $cloningIds = []; - private array $connectedIds = []; - private array $notInlinedIds = []; - private array $inlinedIds = []; - private array $notInlinableIds = []; - private ?ServiceReferenceGraph $graph = null; - - public function __construct( - private ?AnalyzeServiceReferencesPass $analyzingPass = null, - ) { - } - - public function process(ContainerBuilder $container): void - { - $this->container = $container; - if ($this->analyzingPass) { - $analyzedContainer = new ContainerBuilder(); - $analyzedContainer->setAliases($container->getAliases()); - $analyzedContainer->setDefinitions($container->getDefinitions()); - foreach ($container->getExpressionLanguageProviders() as $provider) { - $analyzedContainer->addExpressionLanguageProvider($provider); - } - } else { - $analyzedContainer = $container; - } - try { - $notInlinableIds = []; - $remainingInlinedIds = []; - $this->connectedIds = $this->notInlinedIds = $container->getDefinitions(); - do { - if ($this->analyzingPass) { - $analyzedContainer->setDefinitions(array_intersect_key($analyzedContainer->getDefinitions(), $this->connectedIds)); - $this->analyzingPass->process($analyzedContainer); - } - $this->graph = $analyzedContainer->getCompiler()->getServiceReferenceGraph(); - $notInlinedIds = $this->notInlinedIds; - $notInlinableIds += $this->notInlinableIds; - $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = $this->notInlinableIds = []; - - foreach ($analyzedContainer->getDefinitions() as $id => $definition) { - if (!$this->graph->hasNode($id)) { - continue; - } - if ($definition->isPublic()) { - $this->connectedIds[$id] = true; - } - foreach ($this->graph->getNode($id)->getOutEdges() as $edge) { - if (isset($notInlinedIds[$edge->getSourceNode()->getId()])) { - $this->currentId = $id; - $this->processValue($definition, true); - break; - } - } - } - - foreach ($this->inlinedIds as $id => $isPublicOrNotShared) { - if ($isPublicOrNotShared) { - $remainingInlinedIds[$id] = $id; - } else { - $container->removeDefinition($id); - $analyzedContainer->removeDefinition($id); - } - } - } while ($this->inlinedIds && $this->analyzingPass); - - foreach ($remainingInlinedIds as $id) { - if (isset($notInlinableIds[$id])) { - continue; - } - - $definition = $container->getDefinition($id); - - if (!$definition->isShared() && !$definition->isPublic()) { - $container->removeDefinition($id); - } - } - } finally { - $this->container = null; - $this->connectedIds = $this->notInlinedIds = $this->inlinedIds = []; - $this->notInlinableIds = []; - $this->graph = null; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof ArgumentInterface) { - // References found in ArgumentInterface::getValues() are not inlineable - return $value; - } - - if ($value instanceof Definition && $this->cloningIds) { - if ($value->isShared()) { - return $value; - } - $value = clone $value; - } - - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } elseif (!$this->container->hasDefinition($id = (string) $value)) { - return $value; - } - - $definition = $this->container->getDefinition($id); - - if (isset($this->notInlinableIds[$id]) || !$this->isInlineableDefinition($id, $definition)) { - if ($this->currentId !== $id) { - $this->notInlinableIds[$id] = true; - } - - return $value; - } - - $this->container->log($this, \sprintf('Inlined service "%s" to "%s".', $id, $this->currentId)); - $this->inlinedIds[$id] = $definition->isPublic() || !$definition->isShared(); - $this->notInlinedIds[$this->currentId ?? ''] = true; - - if ($definition->isShared()) { - return $definition; - } - - if (isset($this->cloningIds[$id])) { - $ids = array_keys($this->cloningIds); - $ids[] = $id; - - throw new ServiceCircularReferenceException($id, \array_slice($ids, array_search($id, $ids))); - } - - $this->cloningIds[$id] = true; - try { - return $this->processValue($definition); - } finally { - unset($this->cloningIds[$id]); - } - } - - /** - * Checks if the definition is inlineable. - */ - private function isInlineableDefinition(string $id, Definition $definition): bool - { - if (str_starts_with($id, '.autowire_inline.')) { - return true; - } - if ($definition->hasErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic() || $definition->hasTag('container.do_not_inline')) { - return false; - } - - if (!$definition->isShared()) { - if (!$this->graph->hasNode($id)) { - return true; - } - - foreach ($this->graph->getNode($id)->getInEdges() as $edge) { - $srcId = $edge->getSourceNode()->getId(); - $this->connectedIds[$srcId] = true; - if ($edge->isWeak() || $edge->isLazy()) { - return !$this->connectedIds[$id] = true; - } - } - - return true; - } - - if ($definition->isPublic() - || $this->currentId === $id - || !$this->graph->hasNode($id) - ) { - return false; - } - - $this->connectedIds[$id] = true; - - $srcIds = []; - $srcCount = 0; - foreach ($this->graph->getNode($id)->getInEdges() as $edge) { - $srcId = $edge->getSourceNode()->getId(); - $this->connectedIds[$srcId] = true; - if ($edge->isWeak() || $edge->isLazy()) { - return false; - } - $srcIds[$srcId] = true; - ++$srcCount; - } - - if (1 !== \count($srcIds)) { - $this->notInlinedIds[$id] = true; - - return false; - } - - if ($srcCount > 1 && \is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) { - return false; - } - - $srcDefinition = $this->container->getDefinition($srcId); - - return $srcDefinition->isShared() && !$srcDefinition->isLazy(); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php deleted file mode 100644 index 06e3981f..00000000 --- a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\Extension; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; - -/** - * Merges extension configs into the container builder. - * - * @author Fabien Potencier - */ -class MergeExtensionConfigurationPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - $parameters = $container->getParameterBag()->all(); - $definitions = $container->getDefinitions(); - $aliases = $container->getAliases(); - $exprLangProviders = $container->getExpressionLanguageProviders(); - $configAvailable = class_exists(BaseNode::class); - - foreach ($container->getExtensions() as $extension) { - if ($extension instanceof PrependExtensionInterface) { - $extension->prepend($container); - } - } - - foreach ($container->getExtensions() as $name => $extension) { - if (!$config = $container->getExtensionConfig($name)) { - // this extension was not called - continue; - } - $resolvingBag = $container->getParameterBag(); - if ($resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) { - // create a dedicated bag so that we can track env vars per-extension - $resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag); - if ($configAvailable) { - BaseNode::setPlaceholderUniquePrefix($resolvingBag->getEnvPlaceholderUniquePrefix()); - } - } - - try { - $config = $resolvingBag->resolveValue($config); - } catch (ParameterNotFoundException $e) { - $e->setSourceExtensionName($name); - - throw $e; - } - - try { - $tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag); - $tmpContainer->setResourceTracking($container->isTrackingResources()); - $tmpContainer->addObjectResource($extension); - if ($extension instanceof ConfigurationExtensionInterface && null !== $configuration = $extension->getConfiguration($config, $tmpContainer)) { - $tmpContainer->addObjectResource($configuration); - } - - foreach ($exprLangProviders as $provider) { - $tmpContainer->addExpressionLanguageProvider($provider); - } - - $extension->load($config, $tmpContainer); - } catch (\Exception $e) { - if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) { - $container->getParameterBag()->mergeEnvPlaceholders($resolvingBag); - } - - throw $e; - } - - if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) { - // don't keep track of env vars that are *overridden* when configs are merged - $resolvingBag->freezeAfterProcessing($extension, $tmpContainer); - } - - $container->merge($tmpContainer); - $container->getParameterBag()->add($parameters); - } - - $container->addDefinitions($definitions); - $container->addAliases($aliases); - } -} - -/** - * @internal - */ -class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag -{ - private array $processedEnvPlaceholders; - - public function __construct(parent $parameterBag) - { - parent::__construct($parameterBag->all()); - $this->mergeEnvPlaceholders($parameterBag); - } - - public function freezeAfterProcessing(Extension $extension, ContainerBuilder $container): void - { - if (!$config = $extension->getProcessedConfigs()) { - // Extension::processConfiguration() wasn't called, we cannot know how configs were merged - return; - } - $this->processedEnvPlaceholders = []; - - // serialize config and container to catch env vars nested in object graphs - $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all()); - - if (false === stripos($config, 'env_')) { - return; - } - - preg_match_all('/env_[a-f0-9]{16}_\w+_[a-f0-9]{32}/Ui', $config, $matches); - $usedPlaceholders = array_flip($matches[0]); - foreach (parent::getEnvPlaceholders() as $env => $placeholders) { - foreach ($placeholders as $placeholder) { - if (isset($usedPlaceholders[$placeholder])) { - $this->processedEnvPlaceholders[$env] = $placeholders; - break; - } - } - } - } - - public function getEnvPlaceholders(): array - { - return $this->processedEnvPlaceholders ?? parent::getEnvPlaceholders(); - } - - public function getUnusedEnvPlaceholders(): array - { - return !isset($this->processedEnvPlaceholders) ? [] : array_diff_key(parent::getEnvPlaceholders(), $this->processedEnvPlaceholders); - } -} - -/** - * A container builder preventing using methods that wouldn't have any effect from extensions. - * - * @internal - */ -class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder -{ - private string $extensionClass; - - public function __construct(ExtensionInterface $extension, ?ParameterBagInterface $parameterBag = null) - { - parent::__construct($parameterBag); - - $this->extensionClass = $extension::class; - } - - public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static - { - throw new LogicException(\sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_debug_type($pass), $this->extensionClass)); - } - - public function registerExtension(ExtensionInterface $extension): void - { - throw new LogicException(\sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_debug_type($extension), $this->extensionClass)); - } - - public function compile(bool $resolveEnvPlaceholders = false): void - { - throw new LogicException(\sprintf('Cannot compile the container in extension "%s".', $this->extensionClass)); - } - - public function resolveEnvPlaceholders(mixed $value, string|bool|null $format = null, ?array &$usedEnvs = null): mixed - { - if (true !== $format || !\is_string($value)) { - return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); - } - - $bag = $this->getParameterBag(); - $value = $bag->resolveValue($value); - - if (!$bag instanceof EnvPlaceholderParameterBag) { - return parent::resolveEnvPlaceholders($value, true, $usedEnvs); - } - - foreach ($bag->getEnvPlaceholders() as $env => $placeholders) { - if (!str_contains($env, ':')) { - continue; - } - foreach ($placeholders as $placeholder) { - if (false !== stripos($value, $placeholder)) { - throw new RuntimeException(\sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.', $env, $this->extensionClass)); - } - } - } - - return parent::resolveEnvPlaceholders($value, true, $usedEnvs); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php deleted file mode 100644 index 76306982..00000000 --- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * Compiler Pass Configuration. - * - * This class has a default configuration embedded. - * - * @author Johannes M. Schmitt - */ -class PassConfig -{ - // In the order of execution - public const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization'; - public const TYPE_OPTIMIZE = 'optimization'; - public const TYPE_BEFORE_REMOVING = 'beforeRemoving'; - public const TYPE_REMOVE = 'removing'; - public const TYPE_AFTER_REMOVING = 'afterRemoving'; - - private MergeExtensionConfigurationPass $mergePass; - private array $afterRemovingPasses; - private array $beforeOptimizationPasses; - private array $beforeRemovingPasses = []; - private array $optimizationPasses; - private array $removingPasses; - - public function __construct() - { - $this->mergePass = new MergeExtensionConfigurationPass(); - - $this->beforeOptimizationPasses = [ - 100 => [ - new ResolveClassPass(), - new RegisterAutoconfigureAttributesPass(), - new AutowireAsDecoratorPass(), - new AttributeAutoconfigurationPass(), - new ResolveInstanceofConditionalsPass(), - new RegisterEnvVarProcessorsPass(), - ], - -1000 => [new ExtensionCompilerPass()], - ]; - - $this->optimizationPasses = [[ - new AutoAliasServicePass(), - new ValidateEnvPlaceholdersPass(), - new ResolveDecoratorStackPass(), - new ResolveAutowireInlineAttributesPass(), - new ResolveChildDefinitionsPass(), - new RegisterServiceSubscribersPass(), - new ResolveParameterPlaceHoldersPass(false, false), - new ResolveFactoryClassPass(), - new ResolveNamedArgumentsPass(), - new AutowireRequiredMethodsPass(), - new AutowireRequiredPropertiesPass(), - new ResolveBindingsPass(), - new ServiceLocatorTagPass(), - new DecoratorServicePass(), - new CheckDefinitionValidityPass(), - new AutowirePass(false), - new ServiceLocatorTagPass(), - new ResolveTaggedIteratorArgumentPass(), - new ResolveServiceSubscribersPass(), - new ResolveReferencesToAliasesPass(), - new ResolveInvalidReferencesPass(), - new AnalyzeServiceReferencesPass(true), - new CheckCircularReferencesPass(), - new CheckReferenceValidityPass(), - new CheckArgumentsValidityPass(false), - ]]; - - $this->removingPasses = [[ - new RemovePrivateAliasesPass(), - new ReplaceAliasByActualDefinitionPass(), - new RemoveAbstractDefinitionsPass(), - new RemoveUnusedDefinitionsPass(), - new AnalyzeServiceReferencesPass(), - new CheckExceptionOnInvalidReferenceBehaviorPass(), - new InlineServiceDefinitionsPass(new AnalyzeServiceReferencesPass()), - new AnalyzeServiceReferencesPass(), - new DefinitionErrorExceptionPass(), - ]]; - - $this->afterRemovingPasses = [ - 0 => [ - new ResolveHotPathPass(), - new ResolveNoPreloadPass(), - new AliasDeprecatedPublicServicesPass(), - ], - // Let build parameters be available as late as possible - -2048 => [new RemoveBuildParametersPass()], - ]; - } - - /** - * Returns all passes in order to be processed. - * - * @return CompilerPassInterface[] - */ - public function getPasses(): array - { - return array_merge( - [$this->mergePass], - $this->getBeforeOptimizationPasses(), - $this->getOptimizationPasses(), - $this->getBeforeRemovingPasses(), - $this->getRemovingPasses(), - $this->getAfterRemovingPasses() - ); - } - - /** - * Adds a pass. - * - * @throws InvalidArgumentException when a pass type doesn't exist - */ - public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): void - { - $property = $type.'Passes'; - if (!isset($this->$property)) { - throw new InvalidArgumentException(\sprintf('Invalid type "%s".', $type)); - } - - $passes = &$this->$property; - - if (!isset($passes[$priority])) { - $passes[$priority] = []; - } - $passes[$priority][] = $pass; - } - - /** - * Gets all passes for the AfterRemoving pass. - * - * @return CompilerPassInterface[] - */ - public function getAfterRemovingPasses(): array - { - return $this->sortPasses($this->afterRemovingPasses); - } - - /** - * Gets all passes for the BeforeOptimization pass. - * - * @return CompilerPassInterface[] - */ - public function getBeforeOptimizationPasses(): array - { - return $this->sortPasses($this->beforeOptimizationPasses); - } - - /** - * Gets all passes for the BeforeRemoving pass. - * - * @return CompilerPassInterface[] - */ - public function getBeforeRemovingPasses(): array - { - return $this->sortPasses($this->beforeRemovingPasses); - } - - /** - * Gets all passes for the Optimization pass. - * - * @return CompilerPassInterface[] - */ - public function getOptimizationPasses(): array - { - return $this->sortPasses($this->optimizationPasses); - } - - /** - * Gets all passes for the Removing pass. - * - * @return CompilerPassInterface[] - */ - public function getRemovingPasses(): array - { - return $this->sortPasses($this->removingPasses); - } - - /** - * Gets the Merge pass. - */ - public function getMergePass(): CompilerPassInterface - { - return $this->mergePass; - } - - public function setMergePass(CompilerPassInterface $pass): void - { - $this->mergePass = $pass; - } - - /** - * Sets the AfterRemoving passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setAfterRemovingPasses(array $passes): void - { - $this->afterRemovingPasses = [$passes]; - } - - /** - * Sets the BeforeOptimization passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setBeforeOptimizationPasses(array $passes): void - { - $this->beforeOptimizationPasses = [$passes]; - } - - /** - * Sets the BeforeRemoving passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setBeforeRemovingPasses(array $passes): void - { - $this->beforeRemovingPasses = [$passes]; - } - - /** - * Sets the Optimization passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setOptimizationPasses(array $passes): void - { - $this->optimizationPasses = [$passes]; - } - - /** - * Sets the Removing passes. - * - * @param CompilerPassInterface[] $passes - */ - public function setRemovingPasses(array $passes): void - { - $this->removingPasses = [$passes]; - } - - /** - * Sort passes by priority. - * - * @param array $passes CompilerPassInterface instances with their priority as key - * - * @return CompilerPassInterface[] - */ - private function sortPasses(array $passes): array - { - if (0 === \count($passes)) { - return []; - } - - krsort($passes); - - // Flatten the array - return array_merge(...$passes); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php b/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php deleted file mode 100644 index 8c6b5b58..00000000 --- a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Trait that allows a generic method to find and sort service by priority option in the tag. - * - * @author Iltar van der Berg - */ -trait PriorityTaggedServiceTrait -{ - /** - * Finds all services with the given tag name and order them by their priority. - * - * The order of additions must be respected for services having the same priority, - * and knowing that the \SplPriorityQueue class does not respect the FIFO method, - * we should not use that class. - * - * @see https://bugs.php.net/53710 - * @see https://bugs.php.net/60926 - * - * @return Reference[] - */ - private function findAndSortTaggedServices(string|TaggedIteratorArgument $tagName, ContainerBuilder $container, array $exclude = []): array - { - $indexAttribute = $defaultIndexMethod = $needsIndexes = $defaultPriorityMethod = null; - - if ($tagName instanceof TaggedIteratorArgument) { - $indexAttribute = $tagName->getIndexAttribute(); - $defaultIndexMethod = $tagName->getDefaultIndexMethod(); - $needsIndexes = $tagName->needsIndexes(); - $defaultPriorityMethod = $tagName->getDefaultPriorityMethod() ?? 'getDefaultPriority'; - $exclude = array_merge($exclude, $tagName->getExclude()); - $tagName = $tagName->getTag(); - } - - $parameterBag = $container->getParameterBag(); - $i = 0; - $services = []; - - foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) { - if (\in_array($serviceId, $exclude, true)) { - continue; - } - - $defaultPriority = null; - $defaultIndex = null; - $definition = $container->getDefinition($serviceId); - $class = $definition->getClass(); - $class = $container->getParameterBag()->resolveValue($class) ?: null; - $reflector = null !== $class ? $container->getReflectionClass($class) : null; - $checkTaggedItem = !$definition->hasTag($definition->isAutoconfigured() ? 'container.ignore_attributes' : $tagName); - - foreach ($attributes as $attribute) { - $index = $priority = null; - - if (isset($attribute['priority'])) { - $priority = $attribute['priority']; - } elseif (null === $defaultPriority && $defaultPriorityMethod && $reflector) { - $defaultPriority = PriorityTaggedServiceUtil::getDefault($serviceId, $reflector, $defaultPriorityMethod, $tagName, 'priority', $checkTaggedItem); - } - $priority ??= $defaultPriority ??= 0; - - if (null === $indexAttribute && !$defaultIndexMethod && !$needsIndexes) { - $services[] = [$priority, ++$i, null, $serviceId, null]; - continue 2; - } - - if (null !== $indexAttribute && isset($attribute[$indexAttribute])) { - $index = $parameterBag->resolveValue($attribute[$indexAttribute]); - } - if (null === $index && null === $defaultIndex && $defaultPriorityMethod && $reflector) { - $defaultIndex = PriorityTaggedServiceUtil::getDefault($serviceId, $reflector, $defaultIndexMethod ?? 'getDefaultName', $tagName, $indexAttribute, $checkTaggedItem); - } - $index ??= $defaultIndex ??= $definition->getTag('container.decorator')[0]['id'] ?? $serviceId; - - $services[] = [$priority, ++$i, $index, $serviceId, $class]; - } - - if ($reflector) { - $attributes = $reflector->getAttributes(AsTaggedItem::class); - $attributeCount = \count($attributes); - - foreach ($attributes as $attribute) { - $instance = $attribute->newInstance(); - - if (!$instance->index && 1 < $attributeCount) { - throw new InvalidArgumentException(\sprintf('Attribute "%s" on class "%s" cannot have an empty index when repeated.', AsTaggedItem::class, $class)); - } - - $services[] = [$instance->priority ?? 0, ++$i, $instance->index ?? $serviceId, $serviceId, $class]; - } - } - } - - uasort($services, static fn ($a, $b) => $b[0] <=> $a[0] ?: $a[1] <=> $b[1]); - - $refs = []; - foreach ($services as [, , $index, $serviceId, $class]) { - if (!$class) { - $reference = new Reference($serviceId); - } elseif ($index === $serviceId) { - $reference = new TypedReference($serviceId, $class); - } else { - $reference = new TypedReference($serviceId, $class, ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, $index); - } - - if (null === $index) { - $refs[] = $reference; - } else { - $refs[$index] = $reference; - } - } - - return $refs; - } -} - -/** - * @internal - */ -class PriorityTaggedServiceUtil -{ - public static function getDefault(string $serviceId, \ReflectionClass $r, string $defaultMethod, string $tagName, ?string $indexAttribute, bool $checkTaggedItem): string|int|null - { - $class = $r->getName(); - - if (!$checkTaggedItem && !$r->hasMethod($defaultMethod)) { - return null; - } - - if ($checkTaggedItem && !$r->hasMethod($defaultMethod)) { - foreach ($r->getAttributes(AsTaggedItem::class) as $attribute) { - return 'priority' === $indexAttribute ? $attribute->newInstance()->priority : $attribute->newInstance()->index; - } - - return null; - } - - if ($r->isInterface()) { - return null; - } - - if (null !== $indexAttribute) { - $service = $class !== $serviceId ? \sprintf('service "%s"', $serviceId) : 'on the corresponding service'; - $message = [\sprintf('Either method "%s::%s()" should ', $class, $defaultMethod), \sprintf(' or tag "%s" on %s is missing attribute "%s".', $tagName, $service, $indexAttribute)]; - } else { - $message = [\sprintf('Method "%s::%s()" should ', $class, $defaultMethod), '.']; - } - - if (!($rm = $r->getMethod($defaultMethod))->isStatic()) { - throw new InvalidArgumentException(implode('be static', $message)); - } - - if (!$rm->isPublic()) { - throw new InvalidArgumentException(implode('be public', $message)); - } - - $default = $rm->invoke(null); - - if ('priority' === $indexAttribute) { - if (!\is_int($default)) { - throw new InvalidArgumentException(implode(\sprintf('return int (got "%s")', get_debug_type($default)), $message)); - } - - return $default; - } - - if (\is_int($default)) { - $default = (string) $default; - } - - if (!\is_string($default)) { - throw new InvalidArgumentException(implode(\sprintf('return string|int (got "%s")', get_debug_type($default)), $message)); - } - - return $default; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php deleted file mode 100644 index ec40eee2..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterAutoconfigureAttributesPass.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; -use Symfony\Component\DependencyInjection\Attribute\Lazy; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\AutoconfigureFailedException; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - -/** - * Reads #[Autoconfigure] attributes on definitions that are autoconfigured - * and don't have the "container.ignore_attributes" tag. - * - * @author Nicolas Grekas - */ -final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface -{ - private static \Closure $registerForAutoconfiguration; - - public function process(ContainerBuilder $container): void - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($this->accept($definition) && $class = $container->getReflectionClass($definition->getClass(), false)) { - $this->processClass($container, $class); - } - } - } - - public function accept(Definition $definition): bool - { - return $definition->isAutoconfigured() && !$definition->hasTag('container.ignore_attributes'); - } - - public function processClass(ContainerBuilder $container, \ReflectionClass $class): void - { - $autoconfigure = $class->getAttributes(Autoconfigure::class, \ReflectionAttribute::IS_INSTANCEOF); - $lazy = $class->getAttributes(Lazy::class, \ReflectionAttribute::IS_INSTANCEOF); - - if ($autoconfigure && $lazy) { - throw new AutoconfigureFailedException($class->name, 'Using both attributes #[Lazy] and #[Autoconfigure] on an argument is not allowed; use the "lazy" parameter of #[Autoconfigure] instead.'); - } - - $attributes = array_merge($autoconfigure, $lazy); - - foreach ($attributes as $attribute) { - self::registerForAutoconfiguration($container, $class, $attribute); - } - } - - private static function registerForAutoconfiguration(ContainerBuilder $container, \ReflectionClass $class, \ReflectionAttribute $attribute): void - { - if (isset(self::$registerForAutoconfiguration)) { - (self::$registerForAutoconfiguration)($container, $class, $attribute); - - return; - } - - $parseDefinitions = new \ReflectionMethod(YamlFileLoader::class, 'parseDefinitions'); - $yamlLoader = $parseDefinitions->getDeclaringClass()->newInstanceWithoutConstructor(); - - self::$registerForAutoconfiguration = static function (ContainerBuilder $container, \ReflectionClass $class, \ReflectionAttribute $attribute) use ($parseDefinitions, $yamlLoader) { - $attribute = (array) $attribute->newInstance(); - - foreach ($attribute['tags'] ?? [] as $i => $tag) { - if (\is_array($tag) && [0] === array_keys($tag)) { - $attribute['tags'][$i] = [$class->name => $tag[0]]; - } - } - - $parseDefinitions->invoke( - $yamlLoader, - [ - 'services' => [ - '_instanceof' => [ - $class->name => [$container->registerForAutoconfiguration($class->name)] + $attribute, - ], - ], - ], - $class->getFileName(), - false - ); - }; - - (self::$registerForAutoconfiguration)($container, $class, $attribute); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php deleted file mode 100644 index b35f9f57..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\EnvVarProcessor; -use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Creates the container.env_var_processors_locator service. - * - * @author Nicolas Grekas - */ -class RegisterEnvVarProcessorsPass implements CompilerPassInterface -{ - private const ALLOWED_TYPES = ['array', 'bool', 'float', 'int', 'string', \BackedEnum::class]; - - public function process(ContainerBuilder $container): void - { - $bag = $container->getParameterBag(); - $types = []; - $processors = []; - foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) { - if (!$r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass())) { - throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } elseif (!$r->isSubclassOf(EnvVarProcessorInterface::class)) { - throw new InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $id, EnvVarProcessorInterface::class)); - } - foreach ($class::getProvidedTypes() as $prefix => $type) { - $processors[$prefix] = new Reference($id); - $types[$prefix] = self::validateProvidedTypes($type, $class); - } - } - - if ($bag instanceof EnvPlaceholderParameterBag) { - foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) { - if (!isset($types[$prefix])) { - $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class); - } - } - $bag->setProvidedTypes($types); - } - - if ($processors) { - $container->setAlias('container.env_var_processors_locator', (string) ServiceLocatorTagPass::register($container, $processors)) - ->setPublic(true) - ; - } - } - - private static function validateProvidedTypes(string $types, string $class): array - { - $types = explode('|', $types); - - foreach ($types as $type) { - if (!\in_array($type, self::ALLOWED_TYPES, true)) { - throw new InvalidArgumentException(\sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, implode('", "', self::ALLOWED_TYPES))); - } - } - - return $types; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php deleted file mode 100644 index 91799375..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterReverseContainerPass.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class RegisterReverseContainerPass implements CompilerPassInterface -{ - public function __construct( - private bool $beforeRemoving, - ) { - } - - public function process(ContainerBuilder $container): void - { - if (!$container->hasDefinition('reverse_container')) { - return; - } - - $refType = $this->beforeRemoving ? ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - $services = []; - foreach ($container->findTaggedServiceIds('container.reversible') as $id => $tags) { - $services[$id] = new Reference($id, $refType); - } - - if ($this->beforeRemoving) { - // prevent inlining of the reverse container - $services['reverse_container'] = new Reference('reverse_container', $refType); - } - $locator = $container->getDefinition('reverse_container')->getArgument(1); - - if ($locator instanceof Reference) { - $locator = $container->getDefinition((string) $locator); - } - if ($locator instanceof Definition) { - foreach ($services as $id => $ref) { - $services[$id] = new ServiceClosureArgument($ref); - } - $locator->replaceArgument(0, $services); - } else { - $locator->setValues($services); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php deleted file mode 100644 index 89b822bc..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Attribute\Autowire; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Contracts\Service\Attribute\SubscribedService; -use Symfony\Contracts\Service\ServiceCollectionInterface; -use Symfony\Contracts\Service\ServiceProviderInterface; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * Compiler pass to register tagged services that require a service locator. - * - * @author Nicolas Grekas - */ -class RegisterServiceSubscribersPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) { - return parent::processValue($value, $isRoot); - } - - $serviceMap = []; - $autowire = $value->isAutowired(); - - foreach ($value->getTag('container.service_subscriber') as $attributes) { - if (!$attributes) { - $autowire = true; - continue; - } - ksort($attributes); - if ([] !== array_diff(array_keys($attributes), ['id', 'key'])) { - throw new InvalidArgumentException(\sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', implode('", "', array_keys($attributes)), $this->currentId)); - } - if (!\array_key_exists('id', $attributes)) { - throw new InvalidArgumentException(\sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId)); - } - if (!\array_key_exists('key', $attributes)) { - $attributes['key'] = $attributes['id']; - } - if (isset($serviceMap[$attributes['key']])) { - continue; - } - $serviceMap[$attributes['key']] = new Reference($attributes['id']); - } - $class = $value->getClass(); - - if (!$r = $this->container->getReflectionClass($class)) { - throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId)); - } - if (!$r->isSubclassOf(ServiceSubscriberInterface::class)) { - throw new InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $this->currentId, ServiceSubscriberInterface::class)); - } - $class = $r->name; - $subscriberMap = []; - - foreach ($class::getSubscribedServices() as $key => $type) { - $attributes = []; - - if (!isset($serviceMap[$key]) && $type instanceof Autowire) { - $subscriberMap[$key] = $type; - continue; - } - - if ($type instanceof SubscribedService) { - $key = $type->key ?? $key; - $attributes = $type->attributes; - $type = ($type->nullable ? '?' : '').($type->type ?? throw new InvalidArgumentException(\sprintf('When "%s::getSubscribedServices()" returns "%s", a type must be set.', $class, SubscribedService::class))); - } - - if (!\is_string($type) || !preg_match('/(?(DEFINE)(?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+))(?(DEFINE)(?(?&cn)(?:\\\\(?&cn))*+))^\??(?&fqcn)(?:(?:\|(?&fqcn))*+|(?:&(?&fqcn))*+)$/', $type)) { - throw new InvalidArgumentException(\sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, \is_string($type) ? $type : get_debug_type($type))); - } - $optionalBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if ('?' === $type[0]) { - $type = substr($type, 1); - $optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } - if (\is_int($name = $key)) { - $key = $type; - $name = null; - } - if (!isset($serviceMap[$key])) { - if (!$autowire) { - throw new InvalidArgumentException(\sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".', $this->currentId, $key, $class)); - } - $serviceMap[$key] = new Reference($type); - } - - if ($name) { - if (false !== $i = strpos($name, '::get')) { - $name = lcfirst(substr($name, 5 + $i)); - } elseif (str_contains($name, '::')) { - $name = null; - } - } - - if (null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) { - $camelCaseName = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $name)))); - $name = $this->container->has($type.' $'.$camelCaseName) ? $camelCaseName : $name; - } - - $subscriberMap[$key] = new TypedReference((string) $serviceMap[$key], $type, $optionalBehavior, $name, $attributes); - unset($serviceMap[$key]); - } - - if ($serviceMap = array_keys($serviceMap)) { - $message = \sprintf(1 < \count($serviceMap) ? 'keys "%s" do' : 'key "%s" does', str_replace('%', '%%', implode('", "', $serviceMap))); - throw new InvalidArgumentException(\sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId)); - } - - $locatorRef = ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId); - - $value->addTag('container.service_subscriber.locator', ['id' => (string) $locatorRef]); - - $value->setBindings([ - PsrContainerInterface::class => new BoundArgument($locatorRef, false), - ServiceProviderInterface::class => new BoundArgument($locatorRef, false), - ServiceCollectionInterface::class => new BoundArgument($locatorRef, false), - ] + $value->getBindings()); - - return parent::processValue($value); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php deleted file mode 100644 index 93eabea4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Removes abstract Definitions. - */ -class RemoveAbstractDefinitionsPass implements CompilerPassInterface -{ - /** - * Removes abstract definitions from the ContainerBuilder. - */ - public function process(ContainerBuilder $container): void - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isAbstract()) { - $container->removeDefinition($id); - $container->log($this, \sprintf('Removed service "%s"; reason: abstract.', $id)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveBuildParametersPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveBuildParametersPass.php deleted file mode 100644 index 889ab00b..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RemoveBuildParametersPass.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -class RemoveBuildParametersPass implements CompilerPassInterface -{ - /** - * @var array - */ - private array $removedParameters = []; - - public function process(ContainerBuilder $container): void - { - $parameterBag = $container->getParameterBag(); - $this->removedParameters = []; - - foreach ($parameterBag->all() as $name => $value) { - if ('.' === ($name[0] ?? '')) { - $this->removedParameters[$name] = $value; - - $parameterBag->remove($name); - $container->log($this, \sprintf('Removing build parameter "%s".', $name)); - } - } - } - - /** - * @return array - */ - public function getRemovedParameters(): array - { - return $this->removedParameters; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php deleted file mode 100644 index 8b222dbc..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Remove private aliases from the container. They were only used to establish - * dependencies between services, and these dependencies have been resolved in - * one of the previous passes. - * - * @author Johannes M. Schmitt - */ -class RemovePrivateAliasesPass implements CompilerPassInterface -{ - /** - * Removes private aliases from the ContainerBuilder. - */ - public function process(ContainerBuilder $container): void - { - foreach ($container->getAliases() as $id => $alias) { - if ($alias->isPublic()) { - continue; - } - - $container->removeAlias($id); - $container->log($this, \sprintf('Removed service "%s"; reason: private alias.', $id)); - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php deleted file mode 100644 index 101b581c..00000000 --- a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Removes unused service definitions from the container. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class RemoveUnusedDefinitionsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $connectedIds = []; - - /** - * Processes the ContainerBuilder to remove unused definitions. - */ - public function process(ContainerBuilder $container): void - { - try { - $this->enableExpressionProcessing(); - $this->container = $container; - $connectedIds = []; - $aliases = $container->getAliases(); - - foreach ($aliases as $id => $alias) { - if ($alias->isPublic()) { - $this->connectedIds[] = (string) $aliases[$id]; - } - } - - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isPublic()) { - $connectedIds[$id] = true; - $this->processValue($definition); - } - } - - while ($this->connectedIds) { - $ids = $this->connectedIds; - $this->connectedIds = []; - foreach ($ids as $id) { - if (!isset($connectedIds[$id]) && $container->hasDefinition($id)) { - $connectedIds[$id] = true; - $this->processValue($container->getDefinition($id)); - } - } - } - - foreach ($container->getDefinitions() as $id => $definition) { - if (!isset($connectedIds[$id])) { - $container->removeDefinition($id); - $container->resolveEnvPlaceholders(!$definition->hasErrors() ? serialize($definition) : $definition); - $container->log($this, \sprintf('Removed service "%s"; reason: unused.', $id)); - } - } - } finally { - $this->container = null; - $this->connectedIds = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - - if (ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior()) { - $this->connectedIds[] = (string) $value; - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php deleted file mode 100644 index 3fd0f2b4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Replaces aliases with actual service definitions, effectively removing these - * aliases. - * - * @author Johannes M. Schmitt - */ -class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $replacements; - - /** - * Process the Container to replace aliases with service definitions. - * - * @throws InvalidArgumentException if the service definition does not exist - */ - public function process(ContainerBuilder $container): void - { - // First collect all alias targets that need to be replaced - $seenAliasTargets = []; - $replacements = []; - - foreach ($container->getAliases() as $definitionId => $target) { - $targetId = (string) $target; - // Special case: leave this target alone - if ('service_container' === $targetId) { - continue; - } - // Check if target needs to be replaced - if (isset($replacements[$targetId])) { - $container->setAlias($definitionId, $replacements[$targetId])->setPublic($target->isPublic()); - - if ($target->isDeprecated()) { - $container->getAlias($definitionId)->setDeprecated(...array_values($target->getDeprecation('%alias_id%'))); - } - } - // No need to process the same target twice - if (isset($seenAliasTargets[$targetId])) { - continue; - } - // Process new target - $seenAliasTargets[$targetId] = true; - try { - $definition = $container->getDefinition($targetId); - } catch (ServiceNotFoundException $e) { - if ('' !== $e->getId() && '@' === $e->getId()[0]) { - throw new ServiceNotFoundException($e->getId(), $e->getSourceId(), null, [substr($e->getId(), 1)]); - } - - throw $e; - } - if ($definition->isPublic()) { - continue; - } - // Remove private definition and schedule for replacement - $definition->setPublic($target->isPublic()); - $container->setDefinition($definitionId, $definition); - $container->removeDefinition($targetId); - $replacements[$targetId] = $definitionId; - - if ($target->isPublic() && $target->isDeprecated()) { - $definition->addTag('container.private', $target->getDeprecation('%service_id%')); - } - } - $this->replacements = $replacements; - - parent::process($container); - $this->replacements = []; - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) { - // Perform the replacement - $newId = $this->replacements[$referenceId]; - $value = new Reference($newId, $value->getInvalidBehavior()); - $this->container->log($this, \sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId)); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveAutowireInlineAttributesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveAutowireInlineAttributesPass.php deleted file mode 100644 index 9eaccc54..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveAutowireInlineAttributesPass.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Attribute\AutowireInline; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * Inspects existing autowired services for {@see AutowireInline} attributes and registers the definitions for reuse. - * - * @author Ismail Özgün Turan - */ -class ResolveAutowireInlineAttributesPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private int $counter; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - $value = parent::processValue($value, $isRoot); - - if (!$value instanceof Definition || !$value->isAutowired() || !$value->getClass() || $value->hasTag('container.ignore_attributes')) { - return $value; - } - - if ($isRoot) { - $this->counter = 0; - } - - $isChildDefinition = $value instanceof ChildDefinition; - - try { - $constructor = $this->getConstructor($value, false); - } catch (RuntimeException) { - return $value; - } - - if ($constructor) { - $arguments = $this->registerAutowireInlineAttributes($constructor, $value->getArguments(), $isChildDefinition); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - } - - $methodCalls = $value->getMethodCalls(); - - foreach ($methodCalls as $i => $call) { - [$method, $arguments] = $call; - - try { - $method = $this->getReflectionMethod($value, $method); - } catch (RuntimeException) { - continue; - } - - $arguments = $this->registerAutowireInlineAttributes($method, $arguments, $isChildDefinition); - - if ($arguments !== $call[1]) { - $methodCalls[$i][1] = $arguments; - } - } - - if ($methodCalls !== $value->getMethodCalls()) { - $value->setMethodCalls($methodCalls); - } - - return $value; - } - - private function registerAutowireInlineAttributes(\ReflectionFunctionAbstract $method, array $arguments, bool $isChildDefinition): array - { - $parameters = $method->getParameters(); - - if ($method->isVariadic()) { - array_pop($parameters); - } - $paramResolverContainer = new ContainerBuilder($this->container->getParameterBag()); - - foreach ($parameters as $index => $parameter) { - if ($isChildDefinition) { - $index = 'index_'.$index; - } - - if (\array_key_exists('$'.$parameter->name, $arguments) || (\array_key_exists($index, $arguments) && '' !== $arguments[$index])) { - $attribute = \array_key_exists('$'.$parameter->name, $arguments) ? $arguments['$'.$parameter->name] : $arguments[$index]; - if (!$attribute instanceof AutowireInline) { - continue; - } - } elseif (!$attribute = $parameter->getAttributes(AutowireInline::class, \ReflectionAttribute::IS_INSTANCEOF)[0] ?? null) { - continue; - } else { - $attribute = $attribute->newInstance(); - } - - $type = ProxyHelper::exportType($parameter, true); - - if (!$type && isset($arguments[$index])) { - continue; - } - - $definition = $attribute->buildDefinition($attribute->value, $type, $parameter); - - $paramResolverContainer->setDefinition('.autowire_inline', $definition); - (new ResolveParameterPlaceHoldersPass(false, false))->process($paramResolverContainer); - - $id = '.autowire_inline.'.$this->currentId.'.'.++$this->counter; - - $this->container->setDefinition($id, $definition); - $arguments[$isChildDefinition ? '$'.$parameter->name : $index] = new Reference($id); - - if ($definition->isAutowired()) { - $this->processValue($definition); - } - } - - return $arguments; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php deleted file mode 100644 index 19014b24..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php +++ /dev/null @@ -1,268 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\Attribute\Autowire; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * @author Guilhem Niot - */ -class ResolveBindingsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $usedBindings = []; - private array $unusedBindings = []; - private array $errorMessages = []; - - public function process(ContainerBuilder $container): void - { - $this->usedBindings = $container->getRemovedBindingIds(); - - try { - parent::process($container); - - foreach ($this->unusedBindings as [$key, $serviceId, $bindingType, $file]) { - $argumentType = $argumentName = $message = null; - - if (str_contains($key, ' ')) { - [$argumentType, $argumentName] = explode(' ', $key, 2); - } elseif ('$' === $key[0]) { - $argumentName = $key; - } else { - $argumentType = $key; - } - - if ($argumentType) { - $message .= \sprintf('of type "%s" ', $argumentType); - } - - if ($argumentName) { - $message .= \sprintf('named "%s" ', $argumentName); - } - - if (BoundArgument::DEFAULTS_BINDING === $bindingType) { - $message .= 'under "_defaults"'; - } elseif (BoundArgument::INSTANCEOF_BINDING === $bindingType) { - $message .= 'under "_instanceof"'; - } else { - $message .= \sprintf('for service "%s"', $serviceId); - } - - if ($file) { - $message .= \sprintf(' in file "%s"', $file); - } - - $message = \sprintf('A binding is configured for an argument %s, but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.', $message); - - if ($this->errorMessages) { - $message .= \sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : ''); - } - foreach ($this->errorMessages as $m) { - $message .= "\n - ".$m; - } - throw new InvalidArgumentException($message); - } - } finally { - $this->usedBindings = []; - $this->unusedBindings = []; - $this->errorMessages = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof TypedReference && $value->getType() === (string) $value) { - // Already checked - $bindings = $this->container->getDefinition($this->currentId)->getBindings(); - $name = $value->getName(); - - if (isset($name, $bindings[$name = $value.' $'.$name])) { - return $this->getBindingValue($bindings[$name]); - } - - if (isset($bindings[$value->getType()])) { - return $this->getBindingValue($bindings[$value->getType()]); - } - - return parent::processValue($value, $isRoot); - } - - if (!$value instanceof Definition || !$bindings = $value->getBindings()) { - return parent::processValue($value, $isRoot); - } - - $bindingNames = []; - - foreach ($bindings as $key => $binding) { - [$bindingValue, $bindingId, $used, $bindingType, $file] = $binding->getValues(); - if ($used) { - $this->usedBindings[$bindingId ?? ''] = true; - unset($this->unusedBindings[$bindingId ?? '']); - } elseif (!isset($this->usedBindings[$bindingId ?? ''])) { - $this->unusedBindings[$bindingId ?? ''] = [$key, $this->currentId, $bindingType, $file]; - } - - if (preg_match('/^(?:(?:array|bool|float|int|string|iterable|([^ $]++)) )\$/', $key, $m)) { - $bindingNames[substr($key, \strlen($m[0]))] = $binding; - } - - if (!isset($m[1])) { - continue; - } - - if (is_subclass_of($m[1], \UnitEnum::class)) { - $bindingNames[substr($key, \strlen($m[0]))] = $binding; - continue; - } - - if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition && !$bindingValue instanceof TaggedIteratorArgument && !$bindingValue instanceof ServiceLocatorArgument) { - throw new InvalidArgumentException(\sprintf('Invalid value for binding key "%s" for service "%s": expected "%s", "%s", "%s", "%s" or null, "%s" given.', $key, $this->currentId, Reference::class, Definition::class, TaggedIteratorArgument::class, ServiceLocatorArgument::class, get_debug_type($bindingValue))); - } - } - - if ($value->isAbstract()) { - return parent::processValue($value, $isRoot); - } - - $calls = $value->getMethodCalls(); - - try { - if ($constructor = $this->getConstructor($value, false)) { - $calls[] = [$constructor, $value->getArguments()]; - } - } catch (RuntimeException $e) { - $this->errorMessages[] = $e->getMessage(); - $this->container->getDefinition($this->currentId)->addError($e->getMessage()); - - return parent::processValue($value, $isRoot); - } - - foreach ($calls as $i => $call) { - [$method, $arguments] = $call; - - if ($method instanceof \ReflectionFunctionAbstract) { - $reflectionMethod = $method; - } else { - try { - $reflectionMethod = $this->getReflectionMethod($value, $method); - } catch (RuntimeException $e) { - if ($value->getFactory()) { - continue; - } - throw $e; - } - } - - $names = []; - - foreach ($reflectionMethod->getParameters() as $key => $parameter) { - $names[$key] = $parameter->name; - - if (\array_key_exists($key, $arguments) && '' !== $arguments[$key] && !$arguments[$key] instanceof AbstractArgument) { - continue; - } - if (\array_key_exists($parameter->name, $arguments) && '' !== $arguments[$parameter->name] && !$arguments[$parameter->name] instanceof AbstractArgument) { - continue; - } - if ( - $value->isAutowired() - && !$value->hasTag('container.ignore_attributes') - && $parameter->getAttributes(Autowire::class, \ReflectionAttribute::IS_INSTANCEOF) - ) { - continue; - } - - $typeHint = ltrim(ProxyHelper::exportType($parameter) ?? '', '?'); - - $name = Target::parseName($parameter, parsedName: $parsedName); - - if ($typeHint && ( - \array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$name, $bindings) - || \array_key_exists($k = preg_replace('/(^|[(|&])\\\\/', '\1', $typeHint).' $'.$parsedName, $bindings) - )) { - $arguments[$key] = $this->getBindingValue($bindings[$k]); - - continue; - } - - if (\array_key_exists($k = '$'.$name, $bindings) || \array_key_exists($k = '$'.$parsedName, $bindings)) { - $arguments[$key] = $this->getBindingValue($bindings[$k]); - - continue; - } - - if ($typeHint && '\\' === $typeHint[0] && isset($bindings[$typeHint = substr($typeHint, 1)])) { - $arguments[$key] = $this->getBindingValue($bindings[$typeHint]); - - continue; - } - - if (isset($bindingNames[$name]) || isset($bindingNames[$parsedName]) || isset($bindingNames[$parameter->name])) { - $bindingKey = array_search($binding, $bindings, true); - $argumentType = substr($bindingKey, 0, strpos($bindingKey, ' ')); - $this->errorMessages[] = \sprintf('Did you forget to add the type "%s" to argument "$%s" of method "%s::%s()"?', $argumentType, $parameter->name, $reflectionMethod->class, $reflectionMethod->name); - } - } - - foreach ($names as $key => $name) { - if (\array_key_exists($name, $arguments) && (0 === $key || \array_key_exists($key - 1, $arguments))) { - if (!\array_key_exists($key, $arguments)) { - $arguments[$key] = $arguments[$name]; - } - unset($arguments[$name]); - } - } - - if ($arguments !== $call[1]) { - ksort($arguments, \SORT_NATURAL); - $calls[$i][1] = $arguments; - } - } - - if ($constructor) { - [, $arguments] = array_pop($calls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - } - - if ($calls !== $value->getMethodCalls()) { - $value->setMethodCalls($calls); - } - - return parent::processValue($value, $isRoot); - } - - private function getBindingValue(BoundArgument $binding): mixed - { - [$bindingValue, $bindingId] = $binding->getValues(); - - $this->usedBindings[$bindingId ?? ''] = true; - unset($this->unusedBindings[$bindingId ?? '']); - - return $bindingValue; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php deleted file mode 100644 index 15a5af09..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php +++ /dev/null @@ -1,201 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ExceptionInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; - -/** - * This replaces all ChildDefinition instances with their equivalent fully - * merged Definition instance. - * - * @author Johannes M. Schmitt - * @author Nicolas Grekas - */ -class ResolveChildDefinitionsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $currentPath; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - if ($isRoot) { - // yes, we are specifically fetching the definition from the - // container to ensure we are not operating on stale data - $value = $this->container->getDefinition($this->currentId); - } - if ($value instanceof ChildDefinition) { - $this->currentPath = []; - $value = $this->resolveDefinition($value); - if ($isRoot) { - $this->container->setDefinition($this->currentId, $value); - } - } - - return parent::processValue($value, $isRoot); - } - - /** - * Resolves the definition. - * - * @throws RuntimeException When the definition is invalid - */ - private function resolveDefinition(ChildDefinition $definition): Definition - { - try { - return $this->doResolveDefinition($definition); - } catch (ServiceCircularReferenceException $e) { - throw $e; - } catch (ExceptionInterface $e) { - $r = new \ReflectionProperty($e, 'message'); - $r->setValue($e, \sprintf('Service "%s": %s', $this->currentId, $e->getMessage())); - - throw $e; - } - } - - private function doResolveDefinition(ChildDefinition $definition): Definition - { - if (!$this->container->has($parent = $definition->getParent())) { - throw new RuntimeException(\sprintf('Parent definition "%s" does not exist.', $parent)); - } - - $searchKey = array_search($parent, $this->currentPath); - $this->currentPath[] = $parent; - - if (false !== $searchKey) { - throw new ServiceCircularReferenceException($parent, \array_slice($this->currentPath, $searchKey)); - } - - $parentDef = $this->container->findDefinition($parent); - if ($parentDef instanceof ChildDefinition) { - $id = $this->currentId; - $this->currentId = $parent; - $parentDef = $this->resolveDefinition($parentDef); - $this->container->setDefinition($parent, $parentDef); - $this->currentId = $id; - } - - $this->container->log($this, \sprintf('Resolving inheritance for "%s" (parent: %s).', $this->currentId, $parent)); - $def = new Definition(); - - // merge in parent definition - // purposely ignored attributes: abstract, shared, tags, autoconfigured - $def->setClass($parentDef->getClass()); - $def->setArguments($parentDef->getArguments()); - $def->setMethodCalls($parentDef->getMethodCalls()); - $def->setProperties($parentDef->getProperties()); - if ($parentDef->isDeprecated()) { - $deprecation = $parentDef->getDeprecation('%service_id%'); - $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - $def->setFactory($parentDef->getFactory()); - $def->setConfigurator($parentDef->getConfigurator()); - $def->setFile($parentDef->getFile()); - $def->setPublic($parentDef->isPublic()); - $def->setLazy($parentDef->isLazy()); - $def->setAutowired($parentDef->isAutowired()); - $def->setChanges($parentDef->getChanges()); - - $def->setBindings($definition->getBindings() + $parentDef->getBindings()); - - $def->setSynthetic($definition->isSynthetic()); - - // overwrite with values specified in the decorator - $changes = $definition->getChanges(); - if (isset($changes['class'])) { - $def->setClass($definition->getClass()); - } - if (isset($changes['factory'])) { - $def->setFactory($definition->getFactory()); - } - if (isset($changes['configurator'])) { - $def->setConfigurator($definition->getConfigurator()); - } - if (isset($changes['file'])) { - $def->setFile($definition->getFile()); - } - if (isset($changes['public'])) { - $def->setPublic($definition->isPublic()); - } else { - $def->setPublic($parentDef->isPublic()); - } - if (isset($changes['lazy'])) { - $def->setLazy($definition->isLazy()); - } - if (isset($changes['deprecated']) && $definition->isDeprecated()) { - $deprecation = $definition->getDeprecation('%service_id%'); - $def->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - if (isset($changes['autowired'])) { - $def->setAutowired($definition->isAutowired()); - } - if (isset($changes['shared'])) { - $def->setShared($definition->isShared()); - } - if (isset($changes['decorated_service'])) { - $decoratedService = $definition->getDecoratedService(); - if (null === $decoratedService) { - $def->setDecoratedService($decoratedService); - } else { - $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2], $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } - } - - // merge arguments - foreach ($definition->getArguments() as $k => $v) { - if (is_numeric($k)) { - $def->addArgument($v); - } elseif (str_starts_with($k, 'index_')) { - $def->replaceArgument((int) substr($k, \strlen('index_')), $v); - } else { - $def->setArgument($k, $v); - } - } - - // merge properties - foreach ($definition->getProperties() as $k => $v) { - $def->setProperty($k, $v); - } - - // append method calls - if ($calls = $definition->getMethodCalls()) { - $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls)); - } - - $def->addError($parentDef); - $def->addError($definition); - - // these attributes are always taken from the child - $def->setAbstract($definition->isAbstract()); - $def->setTags($definition->getTags()); - // autoconfigure is never taken from parent (on purpose) - // and it's not legal on an instanceof - $def->setAutoconfigured($definition->isAutoconfigured()); - - if (!$def->hasTag('proxy')) { - foreach ($parentDef->getTag('proxy') as $v) { - $def->addTag('proxy', $v); - } - } - - return $def; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php deleted file mode 100644 index 4b7a2bb4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - */ -class ResolveClassPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isSynthetic() || null !== $definition->getClass()) { - continue; - } - if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id)) { - if ($definition instanceof ChildDefinition && !class_exists($id)) { - throw new InvalidArgumentException(\sprintf('Service definition "%s" has a parent but no class, and its name looks like an FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id)); - } - $definition->setClass($id); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php deleted file mode 100644 index d4144204..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveDecoratorStackPass.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas - */ -class ResolveDecoratorStackPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - $stacks = []; - - foreach ($container->findTaggedServiceIds('container.stack') as $id => $tags) { - $definition = $container->getDefinition($id); - - if (!$definition instanceof ChildDefinition) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": only definitions with a "parent" can have the "container.stack" tag.', $id)); - } - - if (!$stack = $definition->getArguments()) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": the stack of decorators is empty.', $id)); - } - - $stacks[$id] = $stack; - } - - if (!$stacks) { - return; - } - - $resolvedDefinitions = []; - - foreach ($container->getDefinitions() as $id => $definition) { - if (!isset($stacks[$id])) { - $resolvedDefinitions[$id] = $definition; - continue; - } - - foreach (array_reverse($this->resolveStack($stacks, [$id]), true) as $k => $v) { - $resolvedDefinitions[$k] = $v; - } - - $alias = $container->setAlias($id, $k); - - if ($definition->getChanges()['public'] ?? false) { - $alias->setPublic($definition->isPublic()); - } - - if ($definition->isDeprecated()) { - $alias->setDeprecated(...array_values($definition->getDeprecation('%alias_id%'))); - } - } - - $container->setDefinitions($resolvedDefinitions); - } - - private function resolveStack(array $stacks, array $path): array - { - $definitions = []; - $id = end($path); - $prefix = '.'.$id.'.'; - - if (!isset($stacks[$id])) { - return [$id => new ChildDefinition($id)]; - } - - if (key($path) !== $searchKey = array_search($id, $path)) { - throw new ServiceCircularReferenceException($id, \array_slice($path, $searchKey)); - } - - foreach ($stacks[$id] as $k => $definition) { - if ($definition instanceof ChildDefinition && isset($stacks[$definition->getParent()])) { - $path[] = $definition->getParent(); - $definition = unserialize(serialize($definition)); // deep clone - } elseif ($definition instanceof Definition) { - $definitions[$decoratedId = $prefix.$k] = $definition; - continue; - } elseif ($definition instanceof Reference || $definition instanceof Alias) { - $path[] = (string) $definition; - } else { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": unexpected value of type "%s" found in the stack of decorators.', $id, get_debug_type($definition))); - } - - $p = $prefix.$k; - - foreach ($this->resolveStack($stacks, $path) as $k => $v) { - $definitions[$decoratedId = $p.$k] = $definition instanceof ChildDefinition ? $definition->setParent($k) : new ChildDefinition($k); - $definition = null; - } - array_pop($path); - } - - if (1 === \count($path)) { - foreach ($definitions as $k => $definition) { - $definition->setPublic(false)->setTags([])->setDecoratedService($decoratedId); - } - $definition->setDecoratedService(null); - } - - return $definitions; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php deleted file mode 100644 index ea077cba..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Replaces env var placeholders by their current values. - */ -class ResolveEnvPlaceholdersPass extends AbstractRecursivePass -{ - protected bool $skipScalars = false; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (\is_string($value)) { - return $this->container->resolveEnvPlaceholders($value, true); - } - if ($value instanceof Definition) { - $changes = $value->getChanges(); - if (isset($changes['class'])) { - $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), true)); - } - if (isset($changes['file'])) { - $value->setFile($this->container->resolveEnvPlaceholders($value->getFile(), true)); - } - } - - $value = parent::processValue($value, $isRoot); - - if ($value && \is_array($value) && !$isRoot) { - $value = array_combine($this->container->resolveEnvPlaceholders(array_keys($value), true), $value); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php deleted file mode 100644 index 1eb5c9b6..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Maxime Steinhausser - */ -class ResolveFactoryClassPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) { - if (null === $class = $value->getClass()) { - throw new RuntimeException(\sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId)); - } - - $factory[0] = $class; - $value->setFactory($factory); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php deleted file mode 100644 index 200b032c..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Propagate "container.hot_path" tags to referenced services. - * - * @author Nicolas Grekas - */ -class ResolveHotPathPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private array $resolvedIds = []; - - public function process(ContainerBuilder $container): void - { - try { - parent::process($container); - $container->getDefinition('service_container')->clearTag('container.hot_path'); - } finally { - $this->resolvedIds = []; - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof ArgumentInterface) { - return $value; - } - - if ($value instanceof Definition && $isRoot) { - if ($value->isDeprecated()) { - return $value->clearTag('container.hot_path'); - } - - $this->resolvedIds[$this->currentId ?? ''] = true; - - if (!$value->hasTag('container.hot_path')) { - return $value; - } - } - - if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->hasDefinition($id = (string) $value)) { - $definition = $this->container->getDefinition($id); - - if ($definition->isDeprecated() || $definition->hasTag('container.hot_path')) { - return $value; - } - - $definition->addTag('container.hot_path'); - - if (isset($this->resolvedIds[$id])) { - parent::processValue($definition, false); - } - - return $value; - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php deleted file mode 100644 index 8b0a804d..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Applies instanceof conditionals to definitions. - * - * @author Nicolas Grekas - */ -class ResolveInstanceofConditionalsPass implements CompilerPassInterface -{ - public function process(ContainerBuilder $container): void - { - foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) { - if ($definition->getArguments()) { - throw new InvalidArgumentException(\sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and should be removed.', $interface)); - } - } - - $tagsToKeep = []; - - if ($container->hasParameter('container.behavior_describing_tags')) { - $tagsToKeep = $container->getParameter('container.behavior_describing_tags'); - } - - foreach ($container->getDefinitions() as $id => $definition) { - $container->setDefinition($id, $this->processDefinition($container, $id, $definition, $tagsToKeep)); - } - - if ($container->hasParameter('container.behavior_describing_tags')) { - $container->getParameterBag()->remove('container.behavior_describing_tags'); - } - } - - private function processDefinition(ContainerBuilder $container, string $id, Definition $definition, array $tagsToKeep): Definition - { - $instanceofConditionals = $definition->getInstanceofConditionals(); - $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : []; - if (!$instanceofConditionals && !$autoconfiguredInstanceof) { - return $definition; - } - - if (!$class = $container->getParameterBag()->resolveValue($definition->getClass())) { - return $definition; - } - - $conditionals = $this->mergeConditionals($autoconfiguredInstanceof, $instanceofConditionals, $container); - - $definition->setInstanceofConditionals([]); - $shared = null; - $instanceofTags = []; - $instanceofCalls = []; - $instanceofBindings = []; - $reflectionClass = null; - $parent = $definition instanceof ChildDefinition ? $definition->getParent() : null; - - foreach ($conditionals as $interface => $instanceofDefs) { - if ($interface !== $class && !($reflectionClass ??= $container->getReflectionClass($class, false) ?: false)) { - continue; - } - - if ($interface !== $class && !is_subclass_of($class, $interface)) { - continue; - } - - foreach ($instanceofDefs as $key => $instanceofDef) { - /** @var ChildDefinition $instanceofDef */ - $instanceofDef = clone $instanceofDef; - $instanceofDef->setAbstract(true)->setParent($parent ?: '.abstract.instanceof.'.$id); - $parent = '.instanceof.'.$interface.'.'.$key.'.'.$id; - $container->setDefinition($parent, $instanceofDef); - $instanceofTags[] = [$interface, $instanceofDef->getTags()]; - $instanceofBindings = $instanceofDef->getBindings() + $instanceofBindings; - - foreach ($instanceofDef->getMethodCalls() as $methodCall) { - $instanceofCalls[] = $methodCall; - } - - $instanceofDef->setTags([]); - $instanceofDef->setMethodCalls([]); - $instanceofDef->setBindings([]); - - if (isset($instanceofDef->getChanges()['shared'])) { - $shared = $instanceofDef->isShared(); - } - } - } - - if ($parent) { - $bindings = $definition->getBindings(); - $abstract = $container->setDefinition('.abstract.instanceof.'.$id, $definition); - $definition->setBindings([]); - $definition = serialize($definition); - - if (Definition::class === $abstract::class) { - // cast Definition to ChildDefinition - $definition = substr_replace($definition, '53', 2, 2); - $definition = substr_replace($definition, 'Child', 44, 0); - } - /** @var ChildDefinition $definition */ - $definition = unserialize($definition); - $definition->setParent($parent); - - if (null !== $shared && !isset($definition->getChanges()['shared'])) { - $definition->setShared($shared); - } - - // Don't add tags to service decorators - $i = \count($instanceofTags); - while (0 <= --$i) { - [$interface, $tags] = $instanceofTags[$i]; - foreach ($tags as $k => $v) { - if (null === $definition->getDecoratedService() || $interface === $definition->getClass() || \in_array($k, $tagsToKeep, true)) { - foreach ($v as $v) { - if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k), true)) { - continue; - } - $definition->addTag($k, $v); - } - } - } - } - - $definition->setMethodCalls(array_merge($instanceofCalls, $definition->getMethodCalls())); - $definition->setBindings($bindings + $instanceofBindings); - - // reset fields with "merge" behavior - $abstract - ->setBindings([]) - ->setArguments([]) - ->setMethodCalls([]) - ->setDecoratedService(null) - ->setTags([]) - ->setAbstract(true); - } - - if ($definition->isSynthetic()) { - // Ignore container.excluded tag on synthetic services - $definition->clearTag('container.excluded'); - } - - return $definition; - } - - private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container): array - { - // make each value an array of ChildDefinition - $conditionals = array_map(fn ($childDef) => [$childDef], $autoconfiguredInstanceof); - - foreach ($instanceofConditionals as $interface => $instanceofDef) { - // make sure the interface/class exists (but don't validate automaticInstanceofConditionals) - if (!$container->getReflectionClass($interface)) { - throw new RuntimeException(\sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface)); - } - - if (!isset($autoconfiguredInstanceof[$interface])) { - $conditionals[$interface] = []; - } - - $conditionals[$interface][] = $instanceofDef; - } - - return $conditionals; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php deleted file mode 100644 index 3752f822..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\TypedReference; - -/** - * Emulates the invalid behavior if the reference is not found within the - * container. - * - * @author Johannes M. Schmitt - */ -class ResolveInvalidReferencesPass implements CompilerPassInterface -{ - private ContainerBuilder $container; - private RuntimeException $signalingException; - private string $currentId; - - /** - * Process the ContainerBuilder to resolve invalid references. - */ - public function process(ContainerBuilder $container): void - { - $this->container = $container; - $this->signalingException = new RuntimeException('Invalid reference.'); - - try { - foreach ($container->getDefinitions() as $this->currentId => $definition) { - $this->processValue($definition); - } - } finally { - unset($this->container, $this->signalingException); - } - } - - /** - * Processes arguments to determine invalid references. - * - * @throws RuntimeException When an invalid reference is found - */ - private function processValue(mixed $value, int $rootLevel = 0, int $level = 0): mixed - { - if ($value instanceof ServiceClosureArgument) { - $value->setValues($this->processValue($value->getValues(), 1, 1)); - } elseif ($value instanceof ArgumentInterface) { - $value->setValues($this->processValue($value->getValues(), $rootLevel, 1 + $level)); - } elseif ($value instanceof Definition) { - if ($value->isSynthetic() || $value->isAbstract()) { - return $value; - } - $value->setArguments($this->processValue($value->getArguments(), 0)); - $value->setProperties($this->processValue($value->getProperties(), 1)); - $value->setMethodCalls($this->processValue($value->getMethodCalls(), 2)); - } elseif (\is_array($value)) { - $i = 0; - - foreach ($value as $k => $v) { - try { - if (false !== $i && $k !== $i++) { - $i = false; - } - if ($v !== $processedValue = $this->processValue($v, $rootLevel, 1 + $level)) { - $value[$k] = $processedValue; - } - } catch (RuntimeException $e) { - if ($rootLevel < $level || ($rootLevel && !$level)) { - unset($value[$k]); - } elseif ($rootLevel) { - throw $e; - } else { - $value[$k] = null; - } - } - } - - // Ensure numerically indexed arguments have sequential numeric keys. - if (false !== $i) { - $value = array_values($value); - } - } elseif ($value instanceof Reference) { - if ($this->container->hasDefinition($id = (string) $value) ? !$this->container->getDefinition($id)->hasTag('container.excluded') : $this->container->hasAlias($id)) { - return $value; - } - - $currentDefinition = $this->container->getDefinition($this->currentId); - - // resolve decorated service behavior depending on decorator service - if ($currentDefinition->innerServiceId === $id && ContainerInterface::NULL_ON_INVALID_REFERENCE === $currentDefinition->decorationOnInvalid) { - return null; - } - - $invalidBehavior = $value->getInvalidBehavior(); - - if (ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior && $value instanceof TypedReference && !$this->container->has($id)) { - $e = new ServiceNotFoundException($id, $this->currentId); - - // since the error message varies by $id and $this->currentId, so should the id of the dummy errored definition - $this->container->register($id = \sprintf('.errored.%s.%s', $this->currentId, $id), $value->getType()) - ->addError($e->getMessage()); - - return new TypedReference($id, $value->getType(), $value->getInvalidBehavior()); - } - - // resolve invalid behavior - if (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { - $value = null; - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { - if (0 < $level || $rootLevel) { - throw $this->signalingException; - } - $value = null; - } - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php deleted file mode 100644 index e637a27e..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * Resolves named arguments to their corresponding numeric index. - * - * @author Kévin Dunglas - */ -class ResolveNamedArgumentsPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof AbstractArgument && $value->getText().'.' === $value->getTextWithContext()) { - $value->setContext(\sprintf('A value found in service "%s"', $this->currentId)); - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $calls = $value->getMethodCalls(); - $calls[] = ['__construct', $value->getArguments()]; - - foreach ($calls as $i => $call) { - [$method, $arguments] = $call; - $parameters = null; - $resolvedKeys = []; - $resolvedArguments = []; - - foreach ($arguments as $key => $argument) { - if ($argument instanceof AbstractArgument && $argument->getText().'.' === $argument->getTextWithContext()) { - $argument->setContext(\sprintf('Argument '.(\is_int($key) ? 1 + $key : '"%3$s"').' of '.('__construct' === $method ? 'service "%s"' : 'method call "%s::%s()"'), $this->currentId, $method, $key)); - } - - if (\is_int($key)) { - $resolvedKeys[$key] = $key; - $resolvedArguments[$key] = $argument; - continue; - } - - if (null === $parameters) { - $r = $this->getReflectionMethod($value, $method); - $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId; - $method = $r->getName(); - $parameters = $r->getParameters(); - } - - if (isset($key[0]) && '$' !== $key[0] && !class_exists($key) && !interface_exists($key, false)) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": did you forget to add the "$" prefix to argument "%s"?', $this->currentId, $key)); - } - - if (isset($key[0]) && '$' === $key[0]) { - foreach ($parameters as $j => $p) { - if ($key === '$'.$p->name) { - if ($p->isVariadic() && \is_array($argument)) { - foreach ($argument as $variadicArgument) { - $resolvedKeys[$j] = $j; - $resolvedArguments[$j++] = $variadicArgument; - } - } else { - $resolvedKeys[$j] = $p->name; - $resolvedArguments[$j] = $argument; - } - - continue 2; - } - } - - throw new InvalidArgumentException(\sprintf('Invalid service "%s": method "%s()" has no argument named "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key)); - } - - if (null !== $argument && !$argument instanceof Reference && !$argument instanceof Definition) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": the value of argument "%s" of method "%s()" must be null, an instance of "%s" or an instance of "%s", "%s" given.', $this->currentId, $key, $class !== $this->currentId ? $class.'::'.$method : $method, Reference::class, Definition::class, get_debug_type($argument))); - } - - $typeFound = false; - foreach ($parameters as $j => $p) { - if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::exportType($p, true) === $key) { - $resolvedKeys[$j] = $p->name; - $resolvedArguments[$j] = $argument; - $typeFound = true; - } - } - - if (!$typeFound) { - throw new InvalidArgumentException(\sprintf('Invalid service "%s": method "%s()" has no argument type-hinted as "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method, $key)); - } - } - - if ($resolvedArguments !== $call[1]) { - ksort($resolvedArguments); - - if (!$value->isAutowired() && !array_is_list($resolvedArguments)) { - ksort($resolvedKeys); - $resolvedArguments = array_combine($resolvedKeys, $resolvedArguments); - } - - $calls[$i][1] = $resolvedArguments; - } - } - - [, $arguments] = array_pop($calls); - - if ($arguments !== $value->getArguments()) { - $value->setArguments($arguments); - } - if ($calls !== $value->getMethodCalls()) { - $value->setMethodCalls($calls); - } - - foreach ($value->getProperties() as $key => $argument) { - if ($argument instanceof AbstractArgument && $argument->getText().'.' === $argument->getTextWithContext()) { - $argument->setContext(\sprintf('Property "%s" of service "%s"', $key, $this->currentId)); - } - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php deleted file mode 100644 index 2c129b34..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveNoPreloadPass.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Propagate the "container.no_preload" tag. - * - * @author Nicolas Grekas - */ -class ResolveNoPreloadPass extends AbstractRecursivePass -{ - private const DO_PRELOAD_TAG = '.container.do_preload'; - - protected bool $skipScalars = true; - - private array $resolvedIds = []; - - public function process(ContainerBuilder $container): void - { - $this->container = $container; - - try { - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isPublic() && !$definition->isPrivate() && !isset($this->resolvedIds[$id])) { - $this->resolvedIds[$id] = true; - $this->processValue($definition, true); - } - } - - foreach ($container->getAliases() as $alias) { - if ($alias->isPublic() && !$alias->isPrivate() && !isset($this->resolvedIds[$id = (string) $alias]) && $container->hasDefinition($id)) { - $this->resolvedIds[$id] = true; - $this->processValue($container->getDefinition($id), true); - } - } - } finally { - $this->resolvedIds = []; - $this->container = null; - } - - foreach ($container->getDefinitions() as $definition) { - if ($definition->hasTag(self::DO_PRELOAD_TAG)) { - $definition->clearTag(self::DO_PRELOAD_TAG); - } elseif (!$definition->isDeprecated() && !$definition->hasErrors()) { - $definition->addTag('container.no_preload'); - } - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->hasDefinition($id = (string) $value)) { - $definition = $this->container->getDefinition($id); - - if (!isset($this->resolvedIds[$id]) && (!$definition->isPublic() || $definition->isPrivate())) { - $this->resolvedIds[$id] = true; - $this->processValue($definition, true); - } - - return $value; - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - if ($value->hasTag('container.no_preload') || $value->isDeprecated() || $value->hasErrors()) { - return $value; - } - - if ($isRoot) { - $value->addTag(self::DO_PRELOAD_TAG); - } - - return parent::processValue($value, $isRoot); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php deleted file mode 100644 index 8a90d3cc..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; - -/** - * Resolves all parameter placeholders "%somevalue%" to their real values. - * - * @author Johannes M. Schmitt - */ -class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass -{ - protected bool $skipScalars = false; - - private ParameterBagInterface $bag; - - public function __construct( - private bool $resolveArrays = true, - private bool $throwOnResolveException = true, - ) { - } - - /** - * @throws ParameterNotFoundException - */ - public function process(ContainerBuilder $container): void - { - $this->bag = $container->getParameterBag(); - - try { - parent::process($container); - - $aliases = []; - foreach ($container->getAliases() as $name => $target) { - $this->currentId = $name; - $aliases[$this->bag->resolveValue($name)] = $target; - } - $container->setAliases($aliases); - } catch (ParameterNotFoundException $e) { - $e->setSourceId($this->currentId); - - throw $e; - } - - $this->bag->resolve(); - unset($this->bag); - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (\is_string($value)) { - try { - $v = $this->bag->resolveValue($value); - } catch (ParameterNotFoundException $e) { - if ($this->throwOnResolveException) { - throw $e; - } - - $v = null; - $this->container->getDefinition($this->currentId)->addError($e->getMessage()); - } - - return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value; - } - if ($value instanceof Definition) { - $value->setBindings($this->processValue($value->getBindings())); - $changes = $value->getChanges(); - if (isset($changes['class'])) { - $value->setClass($this->bag->resolveValue($value->getClass())); - } - if (isset($changes['file'])) { - $value->setFile($this->bag->resolveValue($value->getFile())); - } - $tags = $value->getTags(); - if (isset($tags['proxy'])) { - $tags['proxy'] = $this->bag->resolveValue($tags['proxy']); - $value->setTags($tags); - } - } - - $value = parent::processValue($value, $isRoot); - - if ($value && \is_array($value)) { - $value = array_combine($this->bag->resolveValue(array_keys($value)), $value); - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php deleted file mode 100644 index b8923c66..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Replaces all references to aliases with references to the actual service. - * - * @author Johannes M. Schmitt - */ -class ResolveReferencesToAliasesPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - public function process(ContainerBuilder $container): void - { - parent::process($container); - - foreach ($container->getAliases() as $id => $alias) { - $aliasId = (string) $alias; - $this->currentId = $id; - - if ($aliasId !== $defId = $this->getDefinitionId($aliasId, $container)) { - $container->setAlias($id, $defId)->setPublic($alias->isPublic()); - } - } - } - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof Reference) { - return parent::processValue($value, $isRoot); - } - - $defId = $this->getDefinitionId($id = (string) $value, $this->container); - - return $defId !== $id ? new Reference($defId, $value->getInvalidBehavior()) : $value; - } - - private function getDefinitionId(string $id, ContainerBuilder $container): string - { - if (!$container->hasAlias($id)) { - return $id; - } - - $alias = $container->getAlias($id); - - if ($alias->isDeprecated()) { - $referencingDefinition = $container->hasDefinition($this->currentId) ? $container->getDefinition($this->currentId) : $container->getAlias($this->currentId); - if (!$referencingDefinition->isDeprecated()) { - $deprecation = $alias->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], rtrim($deprecation['message'], '. ').'. It is being referenced by the "%s" '.($container->hasDefinition($this->currentId) ? 'service.' : 'alias.'), $this->currentId); - } - } - - $seen = []; - do { - if (isset($seen[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id])); - } - - $seen[$id] = true; - $id = (string) $container->getAlias($id); - } while ($container->hasAlias($id)); - - return $id; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php deleted file mode 100644 index 91714120..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Contracts\Service\ServiceProviderInterface; - -/** - * Compiler pass to inject their service locator to service subscribers. - * - * @author Nicolas Grekas - */ -class ResolveServiceSubscribersPass extends AbstractRecursivePass -{ - protected bool $skipScalars = true; - - private ?string $serviceLocator = null; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof Reference && $this->serviceLocator && \in_array((string) $value, [ContainerInterface::class, ServiceProviderInterface::class], true)) { - return new Reference($this->serviceLocator); - } - - if (!$value instanceof Definition) { - return parent::processValue($value, $isRoot); - } - - $serviceLocator = $this->serviceLocator; - $this->serviceLocator = null; - - if ($value->hasTag('container.service_subscriber.locator')) { - $this->serviceLocator = $value->getTag('container.service_subscriber.locator')[0]['id']; - $value->clearTag('container.service_subscriber.locator'); - } - - try { - return parent::processValue($value); - } finally { - $this->serviceLocator = $serviceLocator; - } - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php deleted file mode 100644 index c01e90b4..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; - -/** - * Resolves all TaggedIteratorArgument arguments. - * - * @author Roland Franssen - */ -class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass -{ - use PriorityTaggedServiceTrait; - - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if (!$value instanceof TaggedIteratorArgument) { - return parent::processValue($value, $isRoot); - } - - $exclude = $value->getExclude(); - if ($value->excludeSelf()) { - $exclude[] = $this->currentId; - } - - $value->setValues($this->findAndSortTaggedServices($value, $this->container, $exclude)); - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php deleted file mode 100644 index eedc0f48..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; - -/** - * Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances. - * - * @author Nicolas Grekas - */ -final class ServiceLocatorTagPass extends AbstractRecursivePass -{ - use PriorityTaggedServiceTrait; - - protected bool $skipScalars = true; - - protected function processValue(mixed $value, bool $isRoot = false): mixed - { - if ($value instanceof ServiceLocatorArgument) { - if ($value->getTaggedIteratorArgument()) { - $value->setValues($this->findAndSortTaggedServices($value->getTaggedIteratorArgument(), $this->container)); - } - - return self::register($this->container, $value->getValues()); - } - - if ($value instanceof Definition) { - $value->setBindings(parent::processValue($value->getBindings())); - } - - if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) { - return parent::processValue($value, $isRoot); - } - - if (!$value->getClass()) { - $value->setClass(ServiceLocator::class); - } - - $values = $value->getArguments()[0] ?? null; - $services = []; - - if ($values instanceof TaggedIteratorArgument) { - foreach ($this->findAndSortTaggedServices($values, $this->container) as $k => $v) { - $services[$k] = new ServiceClosureArgument($v); - } - } elseif (!\is_array($values)) { - throw new InvalidArgumentException(\sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId)); - } else { - $i = 0; - - foreach ($values as $k => $v) { - if ($v instanceof ServiceClosureArgument) { - $services[$k] = $v; - continue; - } - - if ($i === $k) { - if ($v instanceof Reference) { - $k = (string) $v; - } - ++$i; - } elseif (\is_int($k)) { - $i = null; - } - - $services[$k] = new ServiceClosureArgument($v); - } - if (\count($services) === $i) { - ksort($services); - } - } - - $value->setArgument(0, $services); - - $id = '.service_locator.'.ContainerBuilder::hash($value); - - if ($isRoot) { - if ($id !== $this->currentId) { - $this->container->setAlias($id, new Alias($this->currentId, false)); - } - - return $value; - } - - $this->container->setDefinition($id, $value->setPublic(false)); - - return new Reference($id); - } - - public static function register(ContainerBuilder $container, array $map, ?string $callerId = null): Reference - { - foreach ($map as $k => $v) { - $map[$k] = new ServiceClosureArgument($v); - } - - $locator = (new Definition(ServiceLocator::class)) - ->addArgument($map) - ->addTag('container.service_locator'); - - if (null !== $callerId && $container->hasDefinition($callerId)) { - $locator->setBindings($container->getDefinition($callerId)->getBindings()); - } - - if (!$container->hasDefinition($id = '.service_locator.'.ContainerBuilder::hash($locator))) { - $container->setDefinition($id, $locator); - } - - if (null !== $callerId) { - $locatorId = $id; - // Locators are shared when they hold the exact same list of factories; - // to have them specialized per consumer service, we use a cloning factory - // to derivate customized instances from the prototype one. - $container->register($id .= '.'.$callerId, ServiceLocator::class) - ->setFactory([new Reference($locatorId), 'withContext']) - ->addTag('container.service_locator_context', ['id' => $callerId]) - ->addArgument($callerId) - ->addArgument(new Reference('service_container')); - } - - return new Reference($id); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php deleted file mode 100644 index 2544cde9..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * This is a directed graph of your services. - * - * This information can be used by your compiler passes instead of collecting - * it themselves which improves performance quite a lot. - * - * @author Johannes M. Schmitt - * - * @final - */ -class ServiceReferenceGraph -{ - /** - * @var ServiceReferenceGraphNode[] - */ - private array $nodes = []; - - public function hasNode(string $id): bool - { - return isset($this->nodes[$id]); - } - - /** - * Gets a node by identifier. - * - * @throws InvalidArgumentException if no node matches the supplied identifier - */ - public function getNode(string $id): ServiceReferenceGraphNode - { - if (!isset($this->nodes[$id])) { - throw new InvalidArgumentException(\sprintf('There is no node with id "%s".', $id)); - } - - return $this->nodes[$id]; - } - - /** - * Returns all nodes. - * - * @return ServiceReferenceGraphNode[] - */ - public function getNodes(): array - { - return $this->nodes; - } - - /** - * Clears all nodes. - */ - public function clear(): void - { - foreach ($this->nodes as $node) { - $node->clear(); - } - $this->nodes = []; - } - - /** - * Connects 2 nodes together in the Graph. - */ - public function connect(?string $sourceId, mixed $sourceValue, ?string $destId, mixed $destValue = null, ?Reference $reference = null, bool $lazy = false, bool $weak = false, bool $byConstructor = false): void - { - if (null === $sourceId || null === $destId) { - return; - } - - $sourceNode = $this->createNode($sourceId, $sourceValue); - $destNode = $this->createNode($destId, $destValue); - $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor); - - $sourceNode->addOutEdge($edge); - $destNode->addInEdge($edge); - } - - private function createNode(string $id, mixed $value): ServiceReferenceGraphNode - { - if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) { - return $this->nodes[$id]; - } - - return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value); - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php deleted file mode 100644 index 1606ee14..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -/** - * Represents an edge in your service graph. - * - * Value is typically a reference. - * - * @author Johannes M. Schmitt - */ -class ServiceReferenceGraphEdge -{ - public function __construct( - private ServiceReferenceGraphNode $sourceNode, - private ServiceReferenceGraphNode $destNode, - private mixed $value = null, - private bool $lazy = false, - private bool $weak = false, - private bool $byConstructor = false, - ) { - } - - /** - * Returns the value of the edge. - */ - public function getValue(): mixed - { - return $this->value; - } - - /** - * Returns the source node. - */ - public function getSourceNode(): ServiceReferenceGraphNode - { - return $this->sourceNode; - } - - /** - * Returns the destination node. - */ - public function getDestNode(): ServiceReferenceGraphNode - { - return $this->destNode; - } - - /** - * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation. - */ - public function isLazy(): bool - { - return $this->lazy; - } - - /** - * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service. - */ - public function isWeak(): bool - { - return $this->weak; - } - - /** - * Returns true if the edge links with a constructor argument. - */ - public function isReferencedByConstructor(): bool - { - return $this->byConstructor; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php deleted file mode 100644 index 39a86d26..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Represents a node in your service graph. - * - * Value is typically a definition, or an alias. - * - * @author Johannes M. Schmitt - */ -class ServiceReferenceGraphNode -{ - private array $inEdges = []; - private array $outEdges = []; - - public function __construct( - private string $id, - private mixed $value, - ) { - } - - public function addInEdge(ServiceReferenceGraphEdge $edge): void - { - $this->inEdges[] = $edge; - } - - public function addOutEdge(ServiceReferenceGraphEdge $edge): void - { - $this->outEdges[] = $edge; - } - - /** - * Checks if the value of this node is an Alias. - */ - public function isAlias(): bool - { - return $this->value instanceof Alias; - } - - /** - * Checks if the value of this node is a Definition. - */ - public function isDefinition(): bool - { - return $this->value instanceof Definition; - } - - /** - * Returns the identifier. - */ - public function getId(): string - { - return $this->id; - } - - /** - * Returns the in edges. - * - * @return ServiceReferenceGraphEdge[] - */ - public function getInEdges(): array - { - return $this->inEdges; - } - - /** - * Returns the out edges. - * - * @return ServiceReferenceGraphEdge[] - */ - public function getOutEdges(): array - { - return $this->outEdges; - } - - /** - * Returns the value of this Node. - */ - public function getValue(): mixed - { - return $this->value; - } - - /** - * Clears all edges. - */ - public function clear(): void - { - $this->inEdges = $this->outEdges = []; - } -} diff --git a/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php b/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php deleted file mode 100644 index b656cf8d..00000000 --- a/vendor/symfony/dependency-injection/Compiler/ValidateEnvPlaceholdersPass.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Compiler; - -use Symfony\Component\Config\Definition\BaseNode; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; - -/** - * Validates environment variable placeholders used in extension configuration with dummy values. - * - * @author Roland Franssen - */ -class ValidateEnvPlaceholdersPass implements CompilerPassInterface -{ - private const TYPE_FIXTURES = ['array' => [], 'bool' => false, 'float' => 0.0, 'int' => 0, 'string' => '']; - - private array $extensionConfig = []; - - public function process(ContainerBuilder $container): void - { - $this->extensionConfig = []; - - if (!class_exists(BaseNode::class) || !$extensions = $container->getExtensions()) { - return; - } - - $resolvingBag = $container->getParameterBag(); - if (!$resolvingBag instanceof EnvPlaceholderParameterBag) { - return; - } - - $defaultBag = new ParameterBag($resolvingBag->all()); - $envTypes = $resolvingBag->getProvidedTypes(); - foreach ($resolvingBag->getEnvPlaceholders() + $resolvingBag->getUnusedEnvPlaceholders() as $env => $placeholders) { - $values = $this->getPlaceholderValues($env, $defaultBag, $envTypes); - - foreach ($placeholders as $placeholder) { - BaseNode::setPlaceholder($placeholder, $values); - } - } - - $processor = new Processor(); - - foreach ($extensions as $name => $extension) { - if (!($extension instanceof ConfigurationExtensionInterface || $extension instanceof ConfigurationInterface) - || !$config = array_filter($container->getExtensionConfig($name)) - ) { - // this extension has no semantic configuration or was not called - continue; - } - - $config = $resolvingBag->resolveValue($config); - - if ($extension instanceof ConfigurationInterface) { - $configuration = $extension; - } elseif (null === $configuration = $extension->getConfiguration($config, $container)) { - continue; - } - - $this->extensionConfig[$name] = $processor->processConfiguration($configuration, $config); - } - - $resolvingBag->clearUnusedEnvPlaceholders(); - } - - /** - * @internal - */ - public function getExtensionConfig(): array - { - try { - return $this->extensionConfig; - } finally { - $this->extensionConfig = []; - } - } - - /** - * @param array> $envTypes - * - * @return array - */ - private function getPlaceholderValues(string $env, ParameterBag $defaultBag, array $envTypes): array - { - if (false === $i = strpos($env, ':')) { - [$default, $defaultType] = $this->getParameterDefaultAndDefaultType("env($env)", $defaultBag); - - return [$defaultType => $default]; - } - - $prefix = substr($env, 0, $i); - if ('default' === $prefix) { - $parts = explode(':', $env); - array_shift($parts); // Remove 'default' prefix - $parameter = array_shift($parts); // Retrieve and remove parameter - - [$defaultParameter, $defaultParameterType] = $this->getParameterDefaultAndDefaultType($parameter, $defaultBag); - - return [ - $defaultParameterType => $defaultParameter, - ...$this->getPlaceholderValues(implode(':', $parts), $defaultBag, $envTypes), - ]; - } - - $values = []; - foreach ($envTypes[$prefix] ?? ['string'] as $type) { - $values[$type] = self::TYPE_FIXTURES[$type] ?? null; - } - - return $values; - } - - /** - * @return array{0: string, 1: string} - */ - private function getParameterDefaultAndDefaultType(string $name, ParameterBag $defaultBag): array - { - $default = $defaultBag->has($name) ? $defaultBag->get($name) : self::TYPE_FIXTURES['string']; - $defaultType = null !== $default ? get_debug_type($default) : 'string'; - - return [$default, $defaultType]; - } -} diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php deleted file mode 100644 index fe0a8da6..00000000 --- a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * Tracks container parameters. - * - * @author Maxime Steinhausser - * - * @final - */ -class ContainerParametersResource implements ResourceInterface -{ - /** - * @param array $parameters The container parameters to track - */ - public function __construct( - private array $parameters, - ) { - } - - public function __toString(): string - { - return 'container_parameters_'.hash('xxh128', serialize($this->parameters)); - } - - public function getParameters(): array - { - return $this->parameters; - } -} diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php deleted file mode 100644 index dccc33e0..00000000 --- a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Config; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Config\ResourceCheckerInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * @author Maxime Steinhausser - */ -class ContainerParametersResourceChecker implements ResourceCheckerInterface -{ - public function __construct( - private ContainerInterface $container, - ) { - } - - public function supports(ResourceInterface $metadata): bool - { - return $metadata instanceof ContainerParametersResource; - } - - public function isFresh(ResourceInterface $resource, int $timestamp): bool - { - foreach ($resource->getParameters() as $key => $value) { - if (!$this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) { - return false; - } - } - - return true; - } -} diff --git a/vendor/symfony/dependency-injection/Container.php b/vendor/symfony/dependency-injection/Container.php deleted file mode 100644 index 84c61f92..00000000 --- a/vendor/symfony/dependency-injection/Container.php +++ /dev/null @@ -1,411 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator as ArgumentServiceLocator; -use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Contracts\Service\ResetInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(RewindableGenerator::class); -class_exists(ArgumentServiceLocator::class); - -/** - * Container is a dependency injection container. - * - * It gives access to object instances (services). - * Services and parameters are simple key/pair stores. - * The container can have four possible behaviors when a service - * does not exist (or is not initialized for the last case): - * - * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at compilation time (the default) - * * NULL_ON_INVALID_REFERENCE: Returns null - * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference - * (for instance, ignore a setter if the service does not exist) - * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references - * * RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at runtime - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class Container implements ContainerInterface, ResetInterface -{ - protected ParameterBagInterface $parameterBag; - protected array $services = []; - protected array $privates = []; - protected array $fileMap = []; - protected array $methodMap = []; - protected array $factories = []; - protected array $aliases = []; - protected array $loading = []; - protected array $resolving = []; - protected array $syntheticIds = []; - - private array $envCache = []; - private bool $compiled = false; - private \Closure $getEnv; - - private static \Closure $make; - - public function __construct(?ParameterBagInterface $parameterBag = null) - { - $this->parameterBag = $parameterBag ?? new EnvPlaceholderParameterBag(); - } - - /** - * Compiles the container. - * - * This method does two things: - * - * * Parameter values are resolved; - * * The parameter bag is frozen. - */ - public function compile(): void - { - $this->parameterBag->resolve(); - - $this->parameterBag = new FrozenParameterBag( - $this->parameterBag->all(), - $this->parameterBag instanceof ParameterBag ? $this->parameterBag->allDeprecated() : [], - $this->parameterBag instanceof ParameterBag ? $this->parameterBag->allNonEmpty() : [], - ); - - $this->compiled = true; - } - - /** - * Returns true if the container is compiled. - */ - public function isCompiled(): bool - { - return $this->compiled; - } - - /** - * Gets the service container parameter bag. - */ - public function getParameterBag(): ParameterBagInterface - { - return $this->parameterBag; - } - - /** - * Gets a parameter. - * - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null - { - return $this->parameterBag->get($name); - } - - public function hasParameter(string $name): bool - { - return $this->parameterBag->has($name); - } - - public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value): void - { - $this->parameterBag->set($name, $value); - } - - /** - * Sets a service. - * - * Setting a synthetic service to null resets it: has() returns false and get() - * behaves in the same way as if the service was never created. - */ - public function set(string $id, ?object $service): void - { - // Runs the internal initializer; used by the dumped container to include always-needed files - if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) { - $initialize = $this->privates['service_container']; - unset($this->privates['service_container']); - $initialize($this); - } - - if ('service_container' === $id) { - throw new InvalidArgumentException('You cannot set service "service_container".'); - } - - if (!(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) { - if (isset($this->syntheticIds[$id]) || !isset($this->getRemovedIds()[$id])) { - // no-op - } elseif (null === $service) { - throw new InvalidArgumentException(\sprintf('The "%s" service is private, you cannot unset it.', $id)); - } else { - throw new InvalidArgumentException(\sprintf('The "%s" service is private, you cannot replace it.', $id)); - } - } elseif (isset($this->services[$id])) { - throw new InvalidArgumentException(\sprintf('The "%s" service is already initialized, you cannot replace it.', $id)); - } - - if (isset($this->aliases[$id])) { - unset($this->aliases[$id]); - } - - if (null === $service) { - unset($this->services[$id]); - - return; - } - - $this->services[$id] = $service; - } - - public function has(string $id): bool - { - if (isset($this->aliases[$id])) { - $id = $this->aliases[$id]; - } - if (isset($this->services[$id])) { - return true; - } - if ('service_container' === $id) { - return true; - } - - return isset($this->fileMap[$id]) || isset($this->methodMap[$id]); - } - - /** - * Gets a service. - * - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object - { - return $this->services[$id] - ?? $this->services[$id = $this->aliases[$id] ?? $id] - ?? ('service_container' === $id ? $this : ($this->factories[$id] ?? self::$make ??= self::make(...))($this, $id, $invalidBehavior)); - } - - /** - * Creates a service. - * - * As a separate method to allow "get()" to use the really fast `??` operator. - */ - private static function make(self $container, string $id, int $invalidBehavior): ?object - { - if (isset($container->loading[$id])) { - throw new ServiceCircularReferenceException($id, array_merge(array_keys($container->loading), [$id])); - } - - $container->loading[$id] = true; - - try { - if (isset($container->fileMap[$id])) { - return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $container->load($container->fileMap[$id]); - } elseif (isset($container->methodMap[$id])) { - return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $container->{$container->methodMap[$id]}($container); - } - } catch (\Exception $e) { - unset($container->services[$id]); - - throw $e; - } finally { - unset($container->loading[$id]); - } - - if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) { - if (!$id) { - throw new ServiceNotFoundException($id); - } - if (isset($container->syntheticIds[$id])) { - throw new ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id)); - } - if (isset($container->getRemovedIds()[$id])) { - throw new ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id)); - } - - $alternatives = []; - foreach ($container->getServiceIds() as $knownId) { - if ('' === $knownId || '.' === $knownId[0]) { - continue; - } - $lev = levenshtein($id, $knownId); - if ($lev <= \strlen($id) / 3 || str_contains($knownId, $id)) { - $alternatives[] = $knownId; - } - } - - throw new ServiceNotFoundException($id, null, null, $alternatives); - } - - return null; - } - - /** - * Returns true if the given service has actually been initialized. - */ - public function initialized(string $id): bool - { - if (isset($this->aliases[$id])) { - $id = $this->aliases[$id]; - } - - if ('service_container' === $id) { - return false; - } - - return isset($this->services[$id]); - } - - public function reset(): void - { - $services = $this->services + $this->privates; - - foreach ($services as $service) { - try { - if ($service instanceof ResetInterface) { - $service->reset(); - } - } catch (\Throwable) { - continue; - } - } - - $this->envCache = $this->services = $this->factories = $this->privates = []; - } - - /** - * @internal - */ - public function resetEnvCache(): void - { - $this->envCache = []; - } - - /** - * Gets all service ids. - * - * @return string[] - */ - public function getServiceIds(): array - { - return array_map('strval', array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->aliases), array_keys($this->services)))); - } - - /** - * Gets service ids that existed at compile time. - */ - public function getRemovedIds(): array - { - return []; - } - - /** - * Camelizes a string. - */ - public static function camelize(string $id): string - { - return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']); - } - - /** - * A string to underscore. - */ - public static function underscore(string $id): string - { - return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id))); - } - - /** - * Creates a service by requiring its factory file. - */ - protected function load(string $file): mixed - { - return require $file; - } - - /** - * Fetches a variable from the environment. - * - * @throws EnvNotFoundException When the environment variable is not found and has no default value - */ - protected function getEnv(string $name): mixed - { - if (isset($this->resolving[$envName = "env($name)"])) { - throw new ParameterCircularReferenceException(array_keys($this->resolving)); - } - if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) { - return $this->envCache[$name]; - } - if (!$this->has($id = 'container.env_var_processors_locator')) { - $this->set($id, new ServiceLocator([])); - } - $this->getEnv ??= $this->getEnv(...); - $processors = $this->get($id); - - if (false !== $i = strpos($name, ':')) { - $prefix = substr($name, 0, $i); - $localName = substr($name, 1 + $i); - } else { - $prefix = 'string'; - $localName = $name; - } - - $processor = $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this); - if (false === $i) { - $prefix = ''; - } - - $this->resolving[$envName] = true; - try { - return $this->envCache[$name] = $processor->getEnv($prefix, $localName, $this->getEnv); - } finally { - unset($this->resolving[$envName]); - } - } - - /** - * @internal - */ - final protected function getService(string|false $registry, string $id, ?string $method, string|bool $load): mixed - { - if ('service_container' === $id) { - return $this; - } - if (\is_string($load)) { - throw new RuntimeException($load); - } - if (null === $method) { - return false !== $registry ? $this->{$registry}[$id] ?? null : null; - } - if (false !== $registry) { - return $this->{$registry}[$id] ??= $load ? $this->load($method) : $this->{$method}($this); - } - if (!$load) { - return $this->{$method}($this); - } - - return ($factory = $this->factories[$id] ?? $this->factories['service_container'][$id] ?? null) ? $factory($this) : $this->load($method); - } - - private function __clone() - { - } -} diff --git a/vendor/symfony/dependency-injection/ContainerBuilder.php b/vendor/symfony/dependency-injection/ContainerBuilder.php deleted file mode 100644 index 5db9cae6..00000000 --- a/vendor/symfony/dependency-injection/ContainerBuilder.php +++ /dev/null @@ -1,1858 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Composer\Autoload\ClassLoader; -use Composer\InstalledVersions; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Config\Resource\ComposerResource; -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Config\Resource\FileExistenceResource; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Resource\GlobResource; -use Symfony\Component\Config\Resource\ReflectionClassResource; -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\LazyClosure; -use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Attribute\Target; -use Symfony\Component\DependencyInjection\Compiler\Compiler; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass; -use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface; -use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\LazyServiceInstantiator; -use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator; -use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; - -/** - * ContainerBuilder is a DI container that provides an API to easily describe services. - * - * @author Fabien Potencier - */ -class ContainerBuilder extends Container implements TaggedContainerInterface -{ - /** - * @var array - */ - private array $extensions = []; - - /** - * @var array - */ - private array $extensionsByNs = []; - - /** - * @var array - */ - private array $definitions = []; - - /** - * @var array - */ - private array $aliasDefinitions = []; - - /** - * @var array - */ - private array $resources = []; - - /** - * @var array>> - */ - private array $extensionConfigs = []; - - private Compiler $compiler; - private bool $trackResources; - private InstantiatorInterface $proxyInstantiator; - private ExpressionLanguage $expressionLanguage; - - /** - * @var ExpressionFunctionProviderInterface[] - */ - private array $expressionLanguageProviders = []; - - /** - * @var string[] with tag names used by findTaggedServiceIds - */ - private array $usedTags = []; - - /** - * @var string[][] a map of env var names to their placeholders - */ - private array $envPlaceholders = []; - - /** - * @var int[] a map of env vars to their resolution counter - */ - private array $envCounters = []; - - /** - * @var string[] the list of vendor directories - */ - private array $vendors; - - /** - * @var array whether a path is in a vendor directory - */ - private array $pathsInVendor = []; - - /** - * @var array - */ - private array $autoconfiguredInstanceof = []; - - /** - * @var array - */ - private array $autoconfiguredAttributes = []; - - /** - * @var array - */ - private array $removedIds = []; - - /** - * @var array - */ - private array $removedBindingIds = []; - - private const INTERNAL_TYPES = [ - 'int' => true, - 'float' => true, - 'string' => true, - 'bool' => true, - 'resource' => true, - 'object' => true, - 'array' => true, - 'null' => true, - 'callable' => true, - 'iterable' => true, - 'mixed' => true, - ]; - - public function __construct(?ParameterBagInterface $parameterBag = null) - { - parent::__construct($parameterBag); - - $this->trackResources = interface_exists(ResourceInterface::class); - $this->setDefinition('service_container', (new Definition(ContainerInterface::class))->setSynthetic(true)->setPublic(true)); - } - - /** - * @var array - */ - private array $classReflectors; - - /** - * Sets the track resources flag. - * - * If you are not using the loaders and therefore don't want - * to depend on the Config component, set this flag to false. - */ - public function setResourceTracking(bool $track): void - { - $this->trackResources = $track; - } - - /** - * Checks if resources are tracked. - */ - public function isTrackingResources(): bool - { - return $this->trackResources; - } - - /** - * Sets the instantiator to be used when fetching proxies. - */ - public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator): void - { - $this->proxyInstantiator = $proxyInstantiator; - } - - public function registerExtension(ExtensionInterface $extension): void - { - $this->extensions[$extension->getAlias()] = $extension; - - if (false !== $extension->getNamespace()) { - $this->extensionsByNs[$extension->getNamespace() ?? ''] = $extension; - } - } - - /** - * Returns an extension by alias or namespace. - * - * @throws LogicException if the extension is not registered - */ - public function getExtension(string $name): ExtensionInterface - { - if (isset($this->extensions[$name])) { - return $this->extensions[$name]; - } - - if (isset($this->extensionsByNs[$name])) { - return $this->extensionsByNs[$name]; - } - - throw new LogicException(\sprintf('Container extension "%s" is not registered.', $name)); - } - - /** - * Returns all registered extensions. - * - * @return array - */ - public function getExtensions(): array - { - return $this->extensions; - } - - /** - * Checks if we have an extension. - */ - public function hasExtension(string $name): bool - { - return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]); - } - - /** - * Returns an array of resources loaded to build this configuration. - * - * @return ResourceInterface[] - */ - public function getResources(): array - { - return array_values($this->resources); - } - - /** - * @return $this - */ - public function addResource(ResourceInterface $resource): static - { - if (!$this->trackResources) { - return $this; - } - - if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) { - return $this; - } - if ($resource instanceof FileExistenceResource && $this->inVendors($resource->getResource())) { - return $this; - } - if ($resource instanceof FileResource && $this->inVendors($resource->getResource())) { - return $this; - } - if ($resource instanceof DirectoryResource && $this->inVendors($resource->getResource())) { - return $this; - } - if (!$resource instanceof ClassExistenceResource) { - $this->resources[(string) $resource] = $resource; - - return $this; - } - - $class = $resource->getResource(); - - if (!(new ClassExistenceResource($class, false))->isFresh(1)) { - if (!$this->inVendors((new \ReflectionClass($class))->getFileName())) { - $this->resources[$class] = $resource; - } - - return $this; - } - - $inVendor = true; - foreach (spl_autoload_functions() as $autoloader) { - if (!\is_array($autoloader)) { - $inVendor = false; - break; - } - - if ($autoloader[0] instanceof DebugClassLoader) { - $autoloader = $autoloader[0]->getClassLoader(); - } - - if (!\is_array($autoloader) || !$autoloader[0] instanceof ClassLoader) { - $inVendor = false; - break; - } - - foreach ($autoloader[0]->getPrefixesPsr4() as $prefix => $dirs) { - if (!str_starts_with($class, $prefix)) { - continue; - } - - foreach ($dirs as $dir) { - if (!$dir = realpath($dir)) { - continue; - } - - if (!$inVendor = $this->inVendors($dir)) { - break 3; - } - } - } - } - - if (!$inVendor) { - $this->resources[$class] = $resource; - } - - return $this; - } - - /** - * Sets the resources for this configuration. - * - * @param array $resources - * - * @return $this - */ - public function setResources(array $resources): static - { - if (!$this->trackResources) { - return $this; - } - - $this->resources = $resources; - - return $this; - } - - /** - * Adds the object class hierarchy as resources. - * - * @param object|string $object An object instance or class name - * - * @return $this - */ - public function addObjectResource(object|string $object): static - { - if ($this->trackResources) { - if (\is_object($object)) { - $object = $object::class; - } - if (!isset($this->classReflectors[$object])) { - $this->classReflectors[$object] = new \ReflectionClass($object); - } - $class = $this->classReflectors[$object]; - - foreach ($class->getInterfaceNames() as $name) { - if (null === $interface = &$this->classReflectors[$name]) { - $interface = new \ReflectionClass($name); - } - $file = $interface->getFileName(); - if (false !== $file && file_exists($file)) { - $this->fileExists($file); - } - } - do { - $file = $class->getFileName(); - if (false !== $file && file_exists($file)) { - $this->fileExists($file); - } - foreach ($class->getTraitNames() as $name) { - $this->addObjectResource($name); - } - } while ($class = $class->getParentClass()); - } - - return $this; - } - - /** - * Retrieves the requested reflection class and registers it for resource tracking. - * - * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true - * - * @final - */ - public function getReflectionClass(?string $class, bool $throw = true): ?\ReflectionClass - { - if (!$class = $this->getParameterBag()->resolveValue($class)) { - return null; - } - - if (isset(self::INTERNAL_TYPES[$class])) { - return null; - } - - $resource = $classReflector = null; - - try { - if (isset($this->classReflectors[$class])) { - $classReflector = $this->classReflectors[$class]; - } elseif (class_exists(ClassExistenceResource::class)) { - $resource = new ClassExistenceResource($class, false); - $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class); - } else { - $classReflector = class_exists($class) || interface_exists($class, false) ? new \ReflectionClass($class) : false; - } - } catch (\ReflectionException $e) { - if ($throw) { - throw $e; - } - } - - if ($this->trackResources) { - if (!$classReflector) { - $this->addResource($resource ?? new ClassExistenceResource($class, false)); - } elseif (!$classReflector->isInternal()) { - $path = $classReflector->getFileName(); - - if (!$this->inVendors($path)) { - $this->addResource(new ReflectionClassResource($classReflector, $this->vendors)); - } - } - $this->classReflectors[$class] = $classReflector; - } - - return $classReflector ?: null; - } - - /** - * Checks whether the requested file or directory exists and registers the result for resource tracking. - * - * @param string $path The file or directory path for which to check the existence - * @param bool|string $trackContents Whether to track contents of the given resource. If a string is passed, - * it will be used as pattern for tracking contents of the requested directory - * - * @final - */ - public function fileExists(string $path, bool|string $trackContents = true): bool - { - $exists = file_exists($path); - - if (!$this->trackResources || $this->inVendors($path)) { - return $exists; - } - - if (!$exists) { - $this->addResource(new FileExistenceResource($path)); - - return false; - } - - if (is_dir($path)) { - if ($trackContents) { - $this->addResource(new DirectoryResource($path, \is_string($trackContents) ? $trackContents : null)); - } else { - $this->addResource(new GlobResource($path, '/*', false)); - } - } elseif ($trackContents) { - $this->addResource(new FileResource($path)); - } - - return true; - } - - /** - * Loads the configuration for an extension. - * - * @param string $extension The extension alias or namespace - * @param array|null $values An array of values that customizes the extension - * - * @return $this - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - * @throws \LogicException if the extension is not registered - */ - public function loadFromExtension(string $extension, ?array $values = null): static - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Cannot load from an extension on a compiled container.'); - } - - $namespace = $this->getExtension($extension)->getAlias(); - - $this->extensionConfigs[$namespace][] = $values ?? []; - - return $this; - } - - /** - * Adds a compiler pass. - * - * @param string $type The type of compiler pass - * @param int $priority Used to sort the passes - * - * @return $this - */ - public function addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0): static - { - $this->getCompiler()->addPass($pass, $type, $priority); - - $this->addObjectResource($pass); - - return $this; - } - - /** - * Returns the compiler pass config which can then be modified. - */ - public function getCompilerPassConfig(): PassConfig - { - return $this->getCompiler()->getPassConfig(); - } - - /** - * Returns the compiler. - */ - public function getCompiler(): Compiler - { - return $this->compiler ??= new Compiler(); - } - - /** - * Sets a service. - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function set(string $id, ?object $service): void - { - if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) { - // setting a synthetic service on a compiled container is alright - throw new BadMethodCallException(\sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id)); - } - - unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]); - - parent::set($id, $service); - } - - /** - * Removes a service definition. - */ - public function removeDefinition(string $id): void - { - if (isset($this->definitions[$id])) { - unset($this->definitions[$id]); - if ('.' !== ($id[0] ?? '-')) { - $this->removedIds[$id] = true; - } - } - } - - public function has(string $id): bool - { - return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id); - } - - /** - * @throws InvalidArgumentException when no definitions are available - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * @throws \Exception - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): ?object - { - if ($this->isCompiled() && isset($this->removedIds[$id])) { - return ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $invalidBehavior ? parent::get($id) : null; - } - - return $this->doGet($id, $invalidBehavior); - } - - private function doGet(string $id, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, ?array &$inlineServices = null, bool $isConstructorArgument = false): mixed - { - if (isset($inlineServices[$id])) { - return $inlineServices[$id]; - } - if (null === $inlineServices) { - $isConstructorArgument = true; - $inlineServices = []; - } - try { - if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) { - return $this->privates[$id] ?? parent::get($id, $invalidBehavior); - } - if (null !== $service = $this->privates[$id] ?? parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) { - return $service; - } - } catch (ServiceCircularReferenceException $e) { - if ($isConstructorArgument) { - throw $e; - } - } - - if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) { - $alias = $this->aliasDefinitions[$id]; - - if ($alias->isDeprecated()) { - $deprecation = $alias->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - return $this->doGet((string) $alias, $invalidBehavior, $inlineServices, $isConstructorArgument); - } - - try { - $definition = $this->getDefinition($id); - } catch (ServiceNotFoundException $e) { - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $invalidBehavior) { - return null; - } - - throw $e; - } - - if ($definition->hasErrors() && $e = $definition->getErrors()) { - throw new RuntimeException(reset($e)); - } - - if ($isConstructorArgument) { - $this->loading[$id] = true; - } - - try { - return $this->createService($definition, $inlineServices, $isConstructorArgument, $id); - } finally { - if ($isConstructorArgument) { - unset($this->loading[$id]); - } - } - } - - /** - * Merges a ContainerBuilder with the current ContainerBuilder configuration. - * - * Service definitions overrides the current defined ones. - * - * But for parameters, they are overridden by the current ones. It allows - * the parameters passed to the container constructor to have precedence - * over the loaded ones. - * - * $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar'])); - * $loader = new LoaderXXX($container); - * $loader->load('resource_name'); - * $container->register('foo', 'stdClass'); - * - * In the above example, even if the loaded resource defines a foo - * parameter, the value will still be 'bar' as defined in the ContainerBuilder - * constructor. - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function merge(self $container): void - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Cannot merge on a compiled container.'); - } - - foreach ($container->getDefinitions() as $id => $definition) { - if (!$definition->hasTag('container.excluded') || !$this->has($id)) { - $this->setDefinition($id, $definition); - } - } - $this->addAliases($container->getAliases()); - $parameterBag = $this->getParameterBag(); - $otherBag = $container->getParameterBag(); - $parameterBag->add($otherBag->all()); - - if ($parameterBag instanceof ParameterBag && $otherBag instanceof ParameterBag) { - foreach ($otherBag->allDeprecated() as $name => $deprecated) { - $parameterBag->deprecate($name, ...$deprecated); - } - - foreach ($otherBag->allNonEmpty() as $name => $message) { - $parameterBag->cannotBeEmpty($name, $message); - } - } - - if ($this->trackResources) { - foreach ($container->getResources() as $resource) { - $this->addResource($resource); - } - } - - foreach ($this->extensions as $name => $extension) { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name)); - } - - if ($parameterBag instanceof EnvPlaceholderParameterBag && $otherBag instanceof EnvPlaceholderParameterBag) { - $envPlaceholders = $otherBag->getEnvPlaceholders(); - $parameterBag->mergeEnvPlaceholders($otherBag); - } else { - $envPlaceholders = []; - } - - foreach ($container->envCounters as $env => $count) { - if (!$count && !isset($envPlaceholders[$env])) { - continue; - } - if (!isset($this->envCounters[$env])) { - $this->envCounters[$env] = $count; - } else { - $this->envCounters[$env] += $count; - } - } - - foreach ($container->getAutoconfiguredInstanceof() as $interface => $childDefinition) { - if (isset($this->autoconfiguredInstanceof[$interface])) { - throw new InvalidArgumentException(\sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface)); - } - - $this->autoconfiguredInstanceof[$interface] = $childDefinition; - } - - foreach ($container->getAttributeAutoconfigurators() as $attribute => $configurators) { - $this->autoconfiguredAttributes[$attribute] = array_merge( - $this->autoconfiguredAttributes[$attribute] ?? [], - $configurators) - ; - } - } - - /** - * Returns the configuration array for the given extension. - * - * @return array> - */ - public function getExtensionConfig(string $name): array - { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - return $this->extensionConfigs[$name]; - } - - /** - * Prepends a config array to the configs of the given extension. - * - * @param array $config - */ - public function prependExtensionConfig(string $name, array $config): void - { - if (!isset($this->extensionConfigs[$name])) { - $this->extensionConfigs[$name] = []; - } - - array_unshift($this->extensionConfigs[$name], $config); - } - - /** - * Deprecates a service container parameter. - * - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function deprecateParameter(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.'): void - { - if (!$this->parameterBag instanceof ParameterBag) { - throw new BadMethodCallException(\sprintf('The parameter bag must be an instance of "%s" to call "%s".', ParameterBag::class, __METHOD__)); - } - - $this->parameterBag->deprecate($name, $package, $version, $message); - } - - public function parameterCannotBeEmpty(string $name, string $message): void - { - if (!$this->parameterBag instanceof ParameterBag) { - throw new BadMethodCallException(\sprintf('The parameter bag must be an instance of "%s" to call "%s()".', ParameterBag::class, __METHOD__)); - } - - $this->parameterBag->cannotBeEmpty($name, $message); - } - - /** - * Compiles the container. - * - * This method passes the container to compiler - * passes whose job is to manipulate and optimize - * the container. - * - * The main compiler passes roughly do four things: - * - * * The extension configurations are merged; - * * Parameter values are resolved; - * * The parameter bag is frozen; - * * Extension loading is disabled. - * - * @param bool $resolveEnvPlaceholders Whether %env()% parameters should be resolved at build time using - * the current env var values (true), or be resolved at runtime based - * on the environment (false). In general, this should be set to "true" - * when you want to use the current ContainerBuilder directly, and to - * "false" when the container is dumped instead. - */ - public function compile(bool $resolveEnvPlaceholders = false): void - { - $compiler = $this->getCompiler(); - - if ($this->trackResources) { - foreach ($compiler->getPassConfig()->getPasses() as $pass) { - $this->addObjectResource($pass); - } - } - $bag = $this->getParameterBag(); - - if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) { - $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000); - } - - $compiler->compile($this); - - foreach ($this->definitions as $id => $definition) { - if ($this->trackResources && $definition->isLazy()) { - $this->getReflectionClass($definition->getClass()); - } - } - - $this->extensionConfigs = []; - - if ($bag instanceof EnvPlaceholderParameterBag) { - if ($resolveEnvPlaceholders) { - $this->parameterBag = new ParameterBag($this->resolveEnvPlaceholders($this->escapeParameters($bag->all()), true)); - } - - $this->envPlaceholders = $bag->getEnvPlaceholders(); - } - - parent::compile(); - - foreach ($this->definitions + $this->aliasDefinitions as $id => $definition) { - if ('.' === ($id[0] ?? '-')) { - continue; - } - if (!$definition->isPublic() || $definition->isPrivate()) { - $this->removedIds[$id] = true; - } - } - } - - public function getServiceIds(): array - { - return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()))); - } - - /** - * Gets removed service or alias ids. - * - * @return array - */ - public function getRemovedIds(): array - { - return $this->removedIds; - } - - /** - * Adds the service aliases. - * - * @param array $aliases - */ - public function addAliases(array $aliases): void - { - foreach ($aliases as $alias => $id) { - $this->setAlias($alias, $id); - } - } - - /** - * Sets the service aliases. - * - * @param array $aliases - */ - public function setAliases(array $aliases): void - { - $this->aliasDefinitions = []; - $this->addAliases($aliases); - } - - /** - * Sets an alias for an existing service. - * - * @throws InvalidArgumentException if the id is not a string or an Alias - * @throws InvalidArgumentException if the alias is for itself - */ - public function setAlias(string $alias, string|Alias $id): Alias - { - if ('' === $alias || '\\' === $alias[-1] || \strlen($alias) !== strcspn($alias, "\0\r\n'")) { - throw new InvalidArgumentException(\sprintf('Invalid alias id: "%s".', $alias)); - } - - if (\is_string($id)) { - $id = new Alias($id); - } - - if ($alias === (string) $id) { - throw new InvalidArgumentException(\sprintf('An alias cannot reference itself, got a circular reference on "%s".', $alias)); - } - - unset($this->definitions[$alias], $this->removedIds[$alias]); - - return $this->aliasDefinitions[$alias] = $id; - } - - public function removeAlias(string $alias): void - { - if (isset($this->aliasDefinitions[$alias])) { - unset($this->aliasDefinitions[$alias]); - if ('.' !== ($alias[0] ?? '-')) { - $this->removedIds[$alias] = true; - } - } - } - - public function hasAlias(string $id): bool - { - return isset($this->aliasDefinitions[$id]); - } - - /** - * @return array - */ - public function getAliases(): array - { - return $this->aliasDefinitions; - } - - /** - * @throws InvalidArgumentException if the alias does not exist - */ - public function getAlias(string $id): Alias - { - if (!isset($this->aliasDefinitions[$id])) { - throw new InvalidArgumentException(\sprintf('The service alias "%s" does not exist.', $id)); - } - - return $this->aliasDefinitions[$id]; - } - - /** - * Registers a service definition. - * - * This method allows for simple registration of service definition - * with a fluid interface. - */ - public function register(string $id, ?string $class = null): Definition - { - return $this->setDefinition($id, new Definition($class)); - } - - /** - * This method provides a fluid interface for easily registering a child - * service definition of the given parent service. - */ - public function registerChild(string $id, string $parent): ChildDefinition - { - return $this->setDefinition($id, new ChildDefinition($parent)); - } - - /** - * Registers an autowired service definition. - * - * This method implements a shortcut for using setDefinition() with - * an autowired definition. - */ - public function autowire(string $id, ?string $class = null): Definition - { - return $this->setDefinition($id, (new Definition($class))->setAutowired(true)); - } - - /** - * Adds the service definitions. - * - * @param array $definitions - */ - public function addDefinitions(array $definitions): void - { - foreach ($definitions as $id => $definition) { - $this->setDefinition($id, $definition); - } - } - - /** - * Sets the service definitions. - * - * @param array $definitions - */ - public function setDefinitions(array $definitions): void - { - $this->definitions = []; - $this->addDefinitions($definitions); - } - - /** - * Gets all service definitions. - * - * @return array - */ - public function getDefinitions(): array - { - return $this->definitions; - } - - /** - * Sets a service definition. - * - * @throws BadMethodCallException When this ContainerBuilder is compiled - */ - public function setDefinition(string $id, Definition $definition): Definition - { - if ($this->isCompiled()) { - throw new BadMethodCallException('Adding definition to a compiled container is not allowed.'); - } - - if ('' === $id || '\\' === $id[-1] || \strlen($id) !== strcspn($id, "\0\r\n'")) { - throw new InvalidArgumentException(\sprintf('Invalid service id: "%s".', $id)); - } - - unset($this->aliasDefinitions[$id], $this->removedIds[$id]); - - return $this->definitions[$id] = $definition; - } - - /** - * Returns true if a service definition exists under the given identifier. - */ - public function hasDefinition(string $id): bool - { - return isset($this->definitions[$id]); - } - - /** - * Gets a service definition. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - public function getDefinition(string $id): Definition - { - if (!isset($this->definitions[$id])) { - throw new ServiceNotFoundException($id); - } - - return $this->definitions[$id]; - } - - /** - * Gets a service definition by id or alias. - * - * The method "unaliases" recursively to return a Definition instance. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - public function findDefinition(string $id): Definition - { - $seen = []; - while (isset($this->aliasDefinitions[$id])) { - $id = (string) $this->aliasDefinitions[$id]; - - if (isset($seen[$id])) { - $seen = array_values($seen); - $seen = \array_slice($seen, array_search($id, $seen)); - $seen[] = $id; - - throw new ServiceCircularReferenceException($id, $seen); - } - - $seen[$id] = $id; - } - - return $this->getDefinition($id); - } - - /** - * Creates a service for a service definition. - * - * @throws RuntimeException When the factory definition is incomplete - * @throws RuntimeException When the service is a synthetic service - * @throws InvalidArgumentException When configure callable is not callable - */ - private function createService(Definition $definition, array &$inlineServices, bool $isConstructorArgument = false, ?string $id = null, bool|object $tryProxy = true): mixed - { - if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) { - return $inlineServices[$h]; - } - - if ($definition instanceof ChildDefinition) { - throw new RuntimeException(\sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id)); - } - - if ($definition->isSynthetic()) { - throw new RuntimeException(\sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id)); - } - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation($id); - trigger_deprecation($deprecation['package'], $deprecation['version'], $deprecation['message']); - } - - $parameterBag = $this->getParameterBag(); - $class = $parameterBag->resolveValue($definition->getClass()) ?: (['Closure', 'fromCallable'] === $definition->getFactory() ? 'Closure' : null); - - if (['Closure', 'fromCallable'] === $definition->getFactory() && ('Closure' !== $class || $definition->isLazy())) { - $callable = $parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArgument(0))); - - if ($callable instanceof Reference || $callable instanceof Definition) { - $callable = [$callable, '__invoke']; - } - - if (\is_array($callable) && ( - 'Closure' !== $class - || $callable[0] instanceof Reference - || $callable[0] instanceof Definition && !isset($inlineServices[spl_object_hash($callable[0])]) - )) { - $initializer = function () use ($callable, &$inlineServices) { - return $this->doResolveServices($callable[0], $inlineServices); - }; - - $proxy = eval('return '.LazyClosure::getCode('$initializer', $callable, $class, $this, $id).';'); - $this->shareService($definition, $proxy, $id, $inlineServices); - - return $proxy; - } - } - - if (true === $tryProxy && $definition->isLazy() && ['Closure', 'fromCallable'] !== $definition->getFactory() - && !$tryProxy = !($proxy = $this->proxyInstantiator ??= new LazyServiceInstantiator()) || $proxy instanceof RealServiceInstantiator - ) { - $proxy = $proxy->instantiateProxy( - $this, - (clone $definition) - ->setClass($class) - ->setTags(($definition->hasTag('proxy') ? ['proxy' => $parameterBag->resolveValue($definition->getTag('proxy'))] : []) + $definition->getTags()), - $id, function ($proxy = false) use ($definition, &$inlineServices, $id) { - return $this->createService($definition, $inlineServices, true, $id, $proxy); - } - ); - $this->shareService($definition, $proxy, $id, $inlineServices); - - return $proxy; - } - - if (null !== $definition->getFile()) { - require_once $parameterBag->resolveValue($definition->getFile()); - } - - $arguments = $definition->getArguments(); - - if (null !== $factory = $definition->getFactory()) { - if (\is_array($factory)) { - $factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]]; - } elseif (!\is_string($factory)) { - throw new RuntimeException(\sprintf('Cannot create service "%s" because of invalid factory.', $id)); - } elseif (str_starts_with($factory, '@=')) { - $factory = fn (ServiceLocator $arguments) => $this->getExpressionLanguage()->evaluate(substr($factory, 2), ['container' => $this, 'args' => $arguments]); - $arguments = [new ServiceLocatorArgument($arguments)]; - } - } - - $arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($arguments)), $inlineServices, $isConstructorArgument); - - if (null !== $id && $definition->isShared() && (isset($this->services[$id]) || isset($this->privates[$id])) && (true === $tryProxy || !$definition->isLazy())) { - return $this->services[$id] ?? $this->privates[$id]; - } - - if (!array_is_list($arguments)) { - $arguments = array_combine(array_map(fn ($k) => preg_replace('/^.*\\$/', '', $k), array_keys($arguments)), $arguments); - } - - if (null !== $factory) { - $service = $factory(...$arguments); - - if (!$definition->isDeprecated() && \is_array($factory) && \is_string($factory[0])) { - $r = new \ReflectionClass($factory[0]); - - if (0 < strpos($r->getDocComment() ?: '', "\n * @deprecated ")) { - trigger_deprecation('', '', 'The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name); - } - } - } else { - $r = new \ReflectionClass($class); - - if (\is_object($tryProxy)) { - if ($r->getConstructor()) { - $tryProxy->__construct(...$arguments); - } - - $service = $tryProxy; - } else { - $service = $r->getConstructor() ? $r->newInstanceArgs($arguments) : $r->newInstance(); - } - - if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment() ?: '', "\n * @deprecated ")) { - trigger_deprecation('', '', 'The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name); - } - } - - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (null === $lastWitherIndex && (true === $tryProxy || !$definition->isLazy())) { - // share only if proxying failed, or if not a proxy, and if no withers are found - $this->shareService($definition, $service, $id, $inlineServices); - } - - $properties = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())), $inlineServices); - foreach ($properties as $name => $value) { - $service->$name = $value; - } - - foreach ($definition->getMethodCalls() as $k => $call) { - $service = $this->callMethod($service, $call, $inlineServices); - - if ($lastWitherIndex === $k && (true === $tryProxy || !$definition->isLazy())) { - // share only if proxying failed, or if not a proxy, and this is the last wither - $this->shareService($definition, $service, $id, $inlineServices); - } - } - - if ($callable = $definition->getConfigurator()) { - if (\is_array($callable)) { - $callable[0] = $parameterBag->resolveValue($callable[0]); - - if ($callable[0] instanceof Reference) { - $callable[0] = $this->doGet((string) $callable[0], $callable[0]->getInvalidBehavior(), $inlineServices); - } elseif ($callable[0] instanceof Definition) { - $callable[0] = $this->createService($callable[0], $inlineServices); - } - } - - if (!\is_callable($callable)) { - throw new InvalidArgumentException(\sprintf('The configure callable for class "%s" is not a callable.', get_debug_type($service))); - } - - $callable($service); - } - - return $service; - } - - /** - * Replaces service references by the real service instance and evaluates expressions. - * - * @return mixed The same value with all service references replaced by - * the real service instances and all expressions evaluated - */ - public function resolveServices(mixed $value): mixed - { - return $this->doResolveServices($value); - } - - private function doResolveServices(mixed $value, array &$inlineServices = [], bool $isConstructorArgument = false): mixed - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = $this->doResolveServices($v, $inlineServices, $isConstructorArgument); - } - } elseif ($value instanceof ServiceClosureArgument) { - $reference = $value->getValues()[0]; - $value = fn () => $this->resolveServices($reference); - } elseif ($value instanceof IteratorArgument) { - $value = new RewindableGenerator(function () use ($value, &$inlineServices) { - foreach ($value->getValues() as $k => $v) { - foreach (self::getServiceConditionals($v) as $s) { - if (!$this->has($s)) { - continue 2; - } - } - foreach (self::getInitializedConditionals($v) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) { - continue 2; - } - } - - yield $k => $this->doResolveServices($v, $inlineServices); - } - }, function () use ($value): int { - $count = 0; - foreach ($value->getValues() as $v) { - foreach (self::getServiceConditionals($v) as $s) { - if (!$this->has($s)) { - continue 2; - } - } - foreach (self::getInitializedConditionals($v) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) { - continue 2; - } - } - - ++$count; - } - - return $count; - }); - } elseif ($value instanceof ServiceLocatorArgument) { - $refs = $types = []; - foreach ($value->getValues() as $k => $v) { - $refs[$k] = [$v, null]; - $types[$k] = $v instanceof TypedReference ? $v->getType() : '?'; - } - $value = new ServiceLocator($this->resolveServices(...), $refs, $types); - } elseif ($value instanceof Reference) { - $value = $this->doGet((string) $value, $value->getInvalidBehavior(), $inlineServices, $isConstructorArgument); - } elseif ($value instanceof Definition) { - $value = $this->createService($value, $inlineServices, $isConstructorArgument); - } elseif ($value instanceof Parameter) { - $value = $this->getParameter((string) $value); - } elseif ($value instanceof Expression) { - $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]); - } elseif ($value instanceof AbstractArgument) { - throw new RuntimeException($value->getTextWithContext()); - } - - return $value; - } - - /** - * Returns service ids for a given tag. - * - * Example: - * - * $container->register('foo')->addTag('my.tag', ['hello' => 'world']); - * - * $serviceIds = $container->findTaggedServiceIds('my.tag'); - * foreach ($serviceIds as $serviceId => $tags) { - * foreach ($tags as $tag) { - * echo $tag['hello']; - * } - * } - * - * @return array An array of tags with the tagged service as key, holding a list of attribute arrays - */ - public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false): array - { - $this->usedTags[] = $name; - $tags = []; - foreach ($this->getDefinitions() as $id => $definition) { - if ($definition->hasTag($name) && !$definition->hasTag('container.excluded')) { - if ($throwOnAbstract && $definition->isAbstract()) { - throw new InvalidArgumentException(\sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name)); - } - $tags[$id] = $definition->getTag($name); - } - } - - return $tags; - } - - /** - * Returns service ids for a given tag, asserting they have the "container.excluded" tag. - * - * Example: - * - * $container->register('foo')->addResourceTag('my.tag', ['hello' => 'world']) - * - * $serviceIds = $container->findTaggedResourceIds('my.tag'); - * foreach ($serviceIds as $serviceId => $tags) { - * foreach ($tags as $tag) { - * echo $tag['hello']; - * } - * } - * - * @return array An array of tags with the tagged service as key, holding a list of attribute arrays - */ - public function findTaggedResourceIds(string $tagName): array - { - $this->usedTags[] = $tagName; - $tags = []; - foreach ($this->getDefinitions() as $id => $definition) { - if ($definition->hasTag($tagName)) { - if (!$definition->hasTag('container.excluded')) { - throw new InvalidArgumentException(\sprintf('The resource "%s" tagged "%s" is missing the "container.excluded" tag.', $id, $tagName)); - } - $tags[$id] = $definition->getTag($tagName); - } - } - - return $tags; - } - - /** - * Returns all tags the defined services use. - * - * @return string[] - */ - public function findTags(): array - { - $tags = []; - foreach ($this->getDefinitions() as $id => $definition) { - $tags[] = array_keys($definition->getTags()); - } - - return array_unique(array_merge([], ...$tags)); - } - - /** - * Returns all tags not queried by findTaggedServiceIds. - * - * @return string[] - */ - public function findUnusedTags(): array - { - return array_values(array_diff($this->findTags(), $this->usedTags)); - } - - public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider): void - { - $this->expressionLanguageProviders[] = $provider; - } - - /** - * @return ExpressionFunctionProviderInterface[] - */ - public function getExpressionLanguageProviders(): array - { - return $this->expressionLanguageProviders; - } - - /** - * Returns a ChildDefinition that will be used for autoconfiguring the interface/class. - */ - public function registerForAutoconfiguration(string $interface): ChildDefinition - { - if (!isset($this->autoconfiguredInstanceof[$interface])) { - $this->autoconfiguredInstanceof[$interface] = new ChildDefinition(''); - } - - return $this->autoconfiguredInstanceof[$interface]; - } - - /** - * Registers an attribute that will be used for autoconfiguring annotated classes. - * - * The third argument passed to the callable is the reflector of the - * class/method/property/parameter that the attribute targets. Using one or many of - * \ReflectionClass|\ReflectionMethod|\ReflectionProperty|\ReflectionParameter as a type-hint - * for this argument allows filtering which attributes should be passed to the callable. - * - * @template T - * - * @param class-string $attributeClass - * @param callable(ChildDefinition, T, \Reflector): void $configurator - */ - public function registerAttributeForAutoconfiguration(string $attributeClass, callable $configurator): void - { - $this->autoconfiguredAttributes[$attributeClass][] = $configurator; - } - - /** - * Registers an autowiring alias that only binds to a specific argument name. - * - * The argument name is derived from $name if provided (from $id otherwise) - * using camel case: "foo.bar" or "foo_bar" creates an alias bound to - * "$fooBar"-named arguments with $type as type-hint. Such arguments will - * receive the service $id when autowiring is used. - */ - public function registerAliasForArgument(string $id, string $type, ?string $name = null): Alias - { - $parsedName = (new Target($name ??= $id))->getParsedName(); - - if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $parsedName)) { - if ($id !== $name) { - $id = \sprintf(' for service "%s"', $id); - } - - throw new InvalidArgumentException(\sprintf('Invalid argument name "%s"'.$id.': the first character must be a letter.', $name)); - } - - if ($parsedName !== $name) { - $this->setAlias('.'.$type.' $'.$name, $type.' $'.$parsedName); - } - - return $this->setAlias($type.' $'.$parsedName, $id); - } - - /** - * Returns an array of ChildDefinition[] keyed by interface. - * - * @return array - */ - public function getAutoconfiguredInstanceof(): array - { - return $this->autoconfiguredInstanceof; - } - - /** - * @return array - * - * @deprecated Use {@see getAttributeAutoconfigurators()} instead - */ - public function getAutoconfiguredAttributes(): array - { - trigger_deprecation('symfony/dependency-injection', '7.3', 'The "%s()" method is deprecated, use "getAttributeAutoconfigurators()" instead.', __METHOD__); - - $autoconfiguredAttributes = []; - foreach ($this->autoconfiguredAttributes as $attribute => $configurators) { - if (\count($configurators) > 1) { - throw new LogicException(\sprintf('The "%s" attribute has %d configurators. Use "getAttributeAutoconfigurators()" to get all of them.', $attribute, \count($configurators))); - } - - $autoconfiguredAttributes[$attribute] = $configurators[0]; - } - - return $autoconfiguredAttributes; - } - - /** - * @return array - */ - public function getAttributeAutoconfigurators(): array - { - return $this->autoconfiguredAttributes; - } - - /** - * Resolves env parameter placeholders in a string or an array. - * - * @param string|true|null $format A sprintf() format returning the replacement for each env var name or - * null to resolve back to the original "%env(VAR)%" format or - * true to resolve to the actual values of the referenced env vars - * @param array &$usedEnvs Env vars found while resolving are added to this array - * - * @return mixed The value with env parameters resolved if a string or an array is passed - */ - public function resolveEnvPlaceholders(mixed $value, string|bool|null $format = null, ?array &$usedEnvs = null): mixed - { - $bag = $this->getParameterBag(); - if (true === $format ??= '%%env(%s)%%') { - $value = $bag->resolveValue($value); - } - - if ($value instanceof Definition) { - $value = (array) $value; - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs); - } - - return $result; - } - - if (!\is_string($value) || 38 > \strlen($value) || false === stripos($value, 'env_')) { - return $value; - } - $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; - - $completed = false; - preg_match_all('/env_[a-f0-9]{16}_\w+_[a-f0-9]{32}/Ui', $value, $matches); - $usedPlaceholders = array_flip($matches[0]); - foreach ($envPlaceholders as $env => $placeholders) { - foreach ($placeholders as $placeholder) { - if (isset($usedPlaceholders[$placeholder])) { - if (true === $format) { - $resolved = $bag->escapeValue($this->getEnv($env)); - } else { - $resolved = \sprintf($format, $env); - } - if ($placeholder === $value) { - $value = $resolved; - $completed = true; - } else { - if (!\is_string($resolved) && !is_numeric($resolved)) { - throw new RuntimeException(\sprintf('A string value must be composed of strings and/or numbers, but found parameter "env(%s)" of type "%s" inside string value "%s".', $env, get_debug_type($resolved), $this->resolveEnvPlaceholders($value))); - } - $value = str_ireplace($placeholder, $resolved, $value); - } - $usedEnvs[$env] = $env; - $this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1; - - if ($completed) { - break 2; - } - } - } - } - - return $value; - } - - /** - * Get statistics about env usage. - * - * @return int[] The number of time each env vars has been resolved - */ - public function getEnvCounters(): array - { - $bag = $this->getParameterBag(); - $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders; - - foreach ($envPlaceholders as $env => $placeholders) { - if (!isset($this->envCounters[$env])) { - $this->envCounters[$env] = 0; - } - } - - return $this->envCounters; - } - - /** - * @final - */ - public function log(CompilerPassInterface $pass, string $message): void - { - $this->getCompiler()->log($pass, $this->resolveEnvPlaceholders($message)); - } - - /** - * Checks whether a class is available and will remain available in the "no-dev" mode of Composer. - * - * When parent packages are provided and if any of them is in dev-only mode, - * the class will be considered available even if it is also in dev-only mode. - * - * @throws \LogicException If dependencies have been installed with Composer 1 - */ - final public static function willBeAvailable(string $package, string $class, array $parentPackages): bool - { - if (!class_exists(InstalledVersions::class)) { - throw new \LogicException(\sprintf('Calling "%s" when dependencies have been installed with Composer 1 is not supported. Consider upgrading to Composer 2.', __METHOD__)); - } - - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - return false; - } - - if (!InstalledVersions::isInstalled($package) || InstalledVersions::isInstalled($package, false)) { - return true; - } - - // the package is installed but in dev-mode only, check if this applies to one of the parent packages too - - $rootPackage = InstalledVersions::getRootPackage()['name'] ?? ''; - - if ('symfony/symfony' === $rootPackage) { - return true; - } - - foreach ($parentPackages as $parentPackage) { - if ($rootPackage === $parentPackage || (InstalledVersions::isInstalled($parentPackage) && !InstalledVersions::isInstalled($parentPackage, false))) { - return true; - } - } - - return false; - } - - /** - * Gets removed binding ids. - * - * @return array - * - * @internal - */ - public function getRemovedBindingIds(): array - { - return $this->removedBindingIds; - } - - /** - * Removes bindings for a service. - * - * @internal - */ - public function removeBindings(string $id): void - { - if ($this->hasDefinition($id)) { - foreach ($this->getDefinition($id)->getBindings() as $key => $binding) { - [, $bindingId] = $binding->getValues(); - $this->removedBindingIds[(int) $bindingId] = true; - } - } - } - - /** - * @return string[] - * - * @internal - */ - public static function getServiceConditionals(mixed $value): array - { - $services = []; - - if (\is_array($value)) { - foreach ($value as $v) { - $services = array_unique(array_merge($services, self::getServiceConditionals($v))); - } - } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) { - $services[] = (string) $value; - } - - return $services; - } - - /** - * @return string[] - * - * @internal - */ - public static function getInitializedConditionals(mixed $value): array - { - $services = []; - - if (\is_array($value)) { - foreach ($value as $v) { - $services = array_unique(array_merge($services, self::getInitializedConditionals($v))); - } - } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) { - $services[] = (string) $value; - } - - return $services; - } - - /** - * Computes a reasonably unique hash of a serializable value. - */ - public static function hash(mixed $value): string - { - $hash = substr(base64_encode(hash('xxh128', serialize($value), true)), 0, 7); - - return str_replace(['/', '+'], ['.', '_'], $hash); - } - - protected function getEnv(string $name): mixed - { - $value = parent::getEnv($name); - $bag = $this->getParameterBag(); - - if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) { - return $value; - } - - $envPlaceholders = $bag->getEnvPlaceholders(); - if (isset($envPlaceholders[$name][$value])) { - $bag = new ParameterBag($bag->all()); - - return $bag->unescapeValue($bag->get("env($name)")); - } - foreach ($envPlaceholders as $env => $placeholders) { - if (isset($placeholders[$value])) { - return $this->getEnv($env); - } - } - - $this->resolving["env($name)"] = true; - try { - return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), true)); - } finally { - unset($this->resolving["env($name)"]); - } - } - - private function callMethod(object $service, array $call, array &$inlineServices): mixed - { - foreach (self::getServiceConditionals($call[1]) as $s) { - if (!$this->has($s)) { - return $service; - } - } - foreach (self::getInitializedConditionals($call[1]) as $s) { - if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) { - return $service; - } - } - - $result = $service->{$call[0]}(...$this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices)); - - return empty($call[2]) ? $service : $result; - } - - private function shareService(Definition $definition, mixed $service, ?string $id, array &$inlineServices): void - { - $inlineServices[$id ?? spl_object_hash($definition)] = $service; - - if (null !== $id && $definition->isShared()) { - if ($definition->isPrivate() && $this->isCompiled()) { - $this->privates[$id] = $service; - } else { - $this->services[$id] = $service; - } - unset($this->loading[$id]); - } - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (!isset($this->expressionLanguage)) { - if (!class_exists(Expression::class)) { - throw new LogicException('Expressions cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders, null, $this->getEnv(...)); - } - - return $this->expressionLanguage; - } - - private function inVendors(string $path): bool - { - $path = is_file($path) ? \dirname($path) : $path; - - if (isset($this->pathsInVendor[$path])) { - return $this->pathsInVendor[$path]; - } - - $this->vendors ??= (new ComposerResource())->getVendors(); - $path = realpath($path) ?: $path; - - if (isset($this->pathsInVendor[$path])) { - return $this->pathsInVendor[$path]; - } - - foreach ($this->vendors as $vendor) { - if (\in_array($path[\strlen($vendor)] ?? '', ['/', \DIRECTORY_SEPARATOR], true) && str_starts_with($path, $vendor)) { - $this->pathsInVendor[$vendor.\DIRECTORY_SEPARATOR.'composer'] = false; - $this->addResource(new FileResource($vendor.\DIRECTORY_SEPARATOR.'composer'.\DIRECTORY_SEPARATOR.'installed.json')); - $this->pathsInVendor[$vendor.\DIRECTORY_SEPARATOR.'composer'] = true; - - return $this->pathsInVendor[$path] = true; - } - } - - return $this->pathsInVendor[$path] = false; - } - - private function escapeParameters(array $parameters): array - { - $params = []; - foreach ($parameters as $k => $v) { - $params[$k] = match (true) { - \is_array($v) => $this->escapeParameters($v), - \is_string($v) => str_replace('%', '%%', $v), - default => $v, - }; - } - - return $params; - } -} diff --git a/vendor/symfony/dependency-injection/ContainerInterface.php b/vendor/symfony/dependency-injection/ContainerInterface.php deleted file mode 100644 index 6d6f6d3b..00000000 --- a/vendor/symfony/dependency-injection/ContainerInterface.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerInterface as PsrContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -/** - * ContainerInterface is the interface implemented by service container classes. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -interface ContainerInterface extends PsrContainerInterface -{ - public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0; - public const EXCEPTION_ON_INVALID_REFERENCE = 1; - public const NULL_ON_INVALID_REFERENCE = 2; - public const IGNORE_ON_INVALID_REFERENCE = 3; - public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4; - - public function set(string $id, ?object $service): void; - - /** - * @template C of object - * @template B of self::*_REFERENCE - * - * @param string|class-string $id - * @param B $invalidBehavior - * - * @return ($id is class-string ? (B is 0|1 ? C|object : C|object|null) : (B is 0|1 ? object : object|null)) - * - * @throws ServiceCircularReferenceException When a circular reference is detected - * @throws ServiceNotFoundException When the service is not defined - * - * @see Reference - */ - public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object; - - public function has(string $id): bool; - - /** - * Check for whether or not a service has been initialized. - */ - public function initialized(string $id): bool; - - /** - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null; - - public function hasParameter(string $name): bool; - - public function setParameter(string $name, array|bool|string|int|float|\UnitEnum|null $value): void; -} diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php deleted file mode 100644 index 61cc0b9d..00000000 --- a/vendor/symfony/dependency-injection/Definition.php +++ /dev/null @@ -1,823 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException; - -/** - * Definition represents a service definition. - * - * @author Fabien Potencier - */ -class Definition -{ - private const DEFAULT_DEPRECATION_TEMPLATE = 'The "%service_id%" service is deprecated. You should stop using it, as it will be removed in the future.'; - - private ?string $class = null; - private ?string $file = null; - private string|array|null $factory = null; - private bool $shared = true; - private array $deprecation = []; - private array $properties = []; - private array $calls = []; - private array $instanceof = []; - private bool $autoconfigured = false; - private string|array|null $configurator = null; - private array $tags = []; - private bool $public = false; - private bool $synthetic = false; - private bool $abstract = false; - private bool $lazy = false; - private ?array $decoratedService = null; - private bool $autowired = false; - private array $changes = []; - private array $bindings = []; - private array $errors = []; - - protected array $arguments = []; - - /** - * @internal - * - * Used to store the name of the inner id when using service decoration together with autowiring - */ - public ?string $innerServiceId = null; - - /** - * @internal - * - * Used to store the behavior to follow when using service decoration and the decorated service is invalid - */ - public ?int $decorationOnInvalid = null; - - public function __construct(?string $class = null, array $arguments = []) - { - if (null !== $class) { - $this->setClass($class); - } - $this->arguments = $arguments; - } - - /** - * Returns all changes tracked for the Definition object. - */ - public function getChanges(): array - { - return $this->changes; - } - - /** - * Sets the tracked changes for the Definition object. - * - * @param array $changes An array of changes for this Definition - * - * @return $this - */ - public function setChanges(array $changes): static - { - $this->changes = $changes; - - return $this; - } - - /** - * Sets a factory. - * - * @param string|array|Reference|null $factory A PHP function, reference or an array containing a class/Reference and a method to call - * - * @return $this - */ - public function setFactory(string|array|Reference|null $factory): static - { - $this->changes['factory'] = true; - - if (\is_string($factory) && str_contains($factory, '::')) { - $factory = explode('::', $factory, 2); - } elseif ($factory instanceof Reference) { - $factory = [$factory, '__invoke']; - } - - $this->factory = $factory; - - return $this; - } - - /** - * Gets the factory. - * - * @return string|array|null The PHP function or an array containing a class/Reference and a method to call - */ - public function getFactory(): string|array|null - { - return $this->factory; - } - - /** - * Sets the service that this service is decorating. - * - * @param string|null $id The decorated service id, use null to remove decoration - * @param string|null $renamedId The new decorated service id - * - * @return $this - * - * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals - */ - public function setDecoratedService(?string $id, ?string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): static - { - if ($renamedId && $id === $renamedId) { - throw new InvalidArgumentException(\sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id)); - } - - $this->changes['decorated_service'] = true; - - if (null === $id) { - $this->decoratedService = null; - } else { - $this->decoratedService = [$id, $renamedId, $priority]; - - if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { - $this->decoratedService[] = $invalidBehavior; - } - } - - return $this; - } - - /** - * Gets the service that this service is decorating. - * - * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated - */ - public function getDecoratedService(): ?array - { - return $this->decoratedService; - } - - /** - * Sets the service class. - * - * @return $this - */ - public function setClass(?string $class): static - { - $this->changes['class'] = true; - - $this->class = $class; - - return $this; - } - - /** - * Gets the service class. - */ - public function getClass(): ?string - { - return $this->class; - } - - /** - * Sets the arguments to pass to the service constructor/factory method. - * - * @return $this - */ - public function setArguments(array $arguments): static - { - $this->arguments = $arguments; - - return $this; - } - - /** - * Sets the properties to define when creating the service. - * - * @return $this - */ - public function setProperties(array $properties): static - { - $this->properties = $properties; - - return $this; - } - - /** - * Gets the properties to define when creating the service. - */ - public function getProperties(): array - { - return $this->properties; - } - - /** - * Sets a specific property. - * - * @return $this - */ - public function setProperty(string $name, mixed $value): static - { - $this->properties[$name] = $value; - - return $this; - } - - /** - * Adds an argument to pass to the service constructor/factory method. - * - * @return $this - */ - public function addArgument(mixed $argument): static - { - $this->arguments[] = $argument; - - return $this; - } - - /** - * Replaces a specific argument. - * - * @return $this - * - * @throws OutOfBoundsException When the replaced argument does not exist - */ - public function replaceArgument(int|string $index, mixed $argument): static - { - if (0 === \count($this->arguments)) { - throw new OutOfBoundsException(\sprintf('Cannot replace arguments for class "%s" if none have been configured yet.', $this->class)); - } - - if (!\array_key_exists($index, $this->arguments)) { - throw new OutOfBoundsException(\sprintf('The argument "%s" doesn\'t exist in class "%s".', $index, $this->class)); - } - - $this->arguments[$index] = $argument; - - return $this; - } - - /** - * Sets a specific argument. - * - * @return $this - */ - public function setArgument(int|string $key, mixed $value): static - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Gets the arguments to pass to the service constructor/factory method. - */ - public function getArguments(): array - { - return $this->arguments; - } - - /** - * Gets an argument to pass to the service constructor/factory method. - * - * @throws OutOfBoundsException When the argument does not exist - */ - public function getArgument(int|string $index): mixed - { - if (!\array_key_exists($index, $this->arguments)) { - throw new OutOfBoundsException(\sprintf('The argument "%s" doesn\'t exist in class "%s".', $index, $this->class)); - } - - return $this->arguments[$index]; - } - - /** - * Sets the methods to call after service initialization. - * - * @return $this - */ - public function setMethodCalls(array $calls = []): static - { - $this->calls = []; - foreach ($calls as $call) { - $this->addMethodCall($call[0], $call[1], $call[2] ?? false); - } - - return $this; - } - - /** - * Adds a method to call after service initialization. - * - * @param string $method The method name to call - * @param array $arguments An array of arguments to pass to the method call - * @param bool $returnsClone Whether the call returns the service instance or not - * - * @return $this - * - * @throws InvalidArgumentException on empty $method param - */ - public function addMethodCall(string $method, array $arguments = [], bool $returnsClone = false): static - { - if (!$method) { - throw new InvalidArgumentException('Method name cannot be empty.'); - } - $this->calls[] = $returnsClone ? [$method, $arguments, true] : [$method, $arguments]; - - return $this; - } - - /** - * Removes a method to call after service initialization. - * - * @return $this - */ - public function removeMethodCall(string $method): static - { - foreach ($this->calls as $i => $call) { - if ($call[0] === $method) { - unset($this->calls[$i]); - } - } - - return $this; - } - - /** - * Check if the current definition has a given method to call after service initialization. - */ - public function hasMethodCall(string $method): bool - { - foreach ($this->calls as $call) { - if ($call[0] === $method) { - return true; - } - } - - return false; - } - - /** - * Gets the methods to call after service initialization. - */ - public function getMethodCalls(): array - { - return $this->calls; - } - - /** - * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. - * - * @param ChildDefinition[] $instanceof - * - * @return $this - */ - public function setInstanceofConditionals(array $instanceof): static - { - $this->instanceof = $instanceof; - - return $this; - } - - /** - * Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. - * - * @return ChildDefinition[] - */ - public function getInstanceofConditionals(): array - { - return $this->instanceof; - } - - /** - * Sets whether or not instanceof conditionals should be prepended with a global set. - * - * @return $this - */ - public function setAutoconfigured(bool $autoconfigured): static - { - $this->changes['autoconfigured'] = true; - - $this->autoconfigured = $autoconfigured; - - return $this; - } - - public function isAutoconfigured(): bool - { - return $this->autoconfigured; - } - - /** - * Sets tags for this definition. - * - * @return $this - */ - public function setTags(array $tags): static - { - $this->tags = $tags; - - return $this; - } - - /** - * Returns all tags. - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * Gets a tag by name. - */ - public function getTag(string $name): array - { - return $this->tags[$name] ?? []; - } - - /** - * Adds a tag for this definition. - * - * @return $this - */ - public function addTag(string $name, array $attributes = []): static - { - $this->tags[$name][] = $attributes; - - return $this; - } - - /** - * Adds a "resource" tag to the definition and marks it as excluded. - * - * These definitions should be processed using {@see ContainerBuilder::findTaggedResourceIds()} - * - * @return $this - */ - public function addResourceTag(string $name, array $attributes = []): static - { - return $this->addTag($name, $attributes) - ->addTag('container.excluded', ['source' => \sprintf('by tag "%s"', $name)]) - ->setAbstract(true); - } - - /** - * Whether this definition has a tag with the given name. - */ - public function hasTag(string $name): bool - { - return isset($this->tags[$name]); - } - - /** - * Clears all tags for a given name. - * - * @return $this - */ - public function clearTag(string $name): static - { - unset($this->tags[$name]); - - return $this; - } - - /** - * Clears the tags for this definition. - * - * @return $this - */ - public function clearTags(): static - { - $this->tags = []; - - return $this; - } - - /** - * Sets a file to require before creating the service. - * - * @return $this - */ - public function setFile(?string $file): static - { - $this->changes['file'] = true; - - $this->file = $file; - - return $this; - } - - /** - * Gets the file to require before creating the service. - */ - public function getFile(): ?string - { - return $this->file; - } - - /** - * Sets if the service must be shared or not. - * - * @return $this - */ - public function setShared(bool $shared): static - { - $this->changes['shared'] = true; - - $this->shared = $shared; - - return $this; - } - - /** - * Whether this service is shared. - */ - public function isShared(): bool - { - return $this->shared; - } - - /** - * Sets the visibility of this service. - * - * @return $this - */ - public function setPublic(bool $boolean): static - { - $this->changes['public'] = true; - - $this->public = $boolean; - - return $this; - } - - /** - * Whether this service is public facing. - */ - public function isPublic(): bool - { - return $this->public; - } - - /** - * Whether this service is private. - */ - public function isPrivate(): bool - { - return !$this->public; - } - - /** - * Sets the lazy flag of this service. - * - * @return $this - */ - public function setLazy(bool $lazy): static - { - $this->changes['lazy'] = true; - - $this->lazy = $lazy; - - return $this; - } - - /** - * Whether this service is lazy. - */ - public function isLazy(): bool - { - return $this->lazy; - } - - /** - * Sets whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - * - * @return $this - */ - public function setSynthetic(bool $boolean): static - { - $this->synthetic = $boolean; - - if (!isset($this->changes['public'])) { - $this->setPublic(true); - } - - return $this; - } - - /** - * Whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - */ - public function isSynthetic(): bool - { - return $this->synthetic; - } - - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - * - * @return $this - */ - public function setAbstract(bool $boolean): static - { - $this->abstract = $boolean; - - return $this; - } - - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - */ - public function isAbstract(): bool - { - return $this->abstract; - } - - /** - * Whether this definition is deprecated, that means it should not be called - * anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - public function setDeprecated(string $package, string $version, string $message): static - { - if ('' !== $message) { - if (preg_match('#[\r\n]|\*/#', $message)) { - throw new InvalidArgumentException('Invalid characters found in deprecation template.'); - } - - if (!str_contains($message, '%service_id%')) { - throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.'); - } - } - - $this->changes['deprecated'] = true; - $this->deprecation = ['package' => $package, 'version' => $version, 'message' => $message ?: self::DEFAULT_DEPRECATION_TEMPLATE]; - - return $this; - } - - /** - * Whether this definition is deprecated, that means it should not be called - * anymore. - */ - public function isDeprecated(): bool - { - return (bool) $this->deprecation; - } - - /** - * @param string $id Service id relying on this definition - */ - public function getDeprecation(string $id): array - { - return [ - 'package' => $this->deprecation['package'], - 'version' => $this->deprecation['version'], - 'message' => str_replace('%service_id%', $id, $this->deprecation['message']), - ]; - } - - /** - * Sets a configurator to call after the service is fully initialized. - * - * @param string|array|Reference|null $configurator A PHP function, reference or an array containing a class/Reference and a method to call - * - * @return $this - */ - public function setConfigurator(string|array|Reference|null $configurator): static - { - $this->changes['configurator'] = true; - - if (\is_string($configurator) && str_contains($configurator, '::')) { - $configurator = explode('::', $configurator, 2); - } elseif ($configurator instanceof Reference) { - $configurator = [$configurator, '__invoke']; - } - - $this->configurator = $configurator; - - return $this; - } - - /** - * Gets the configurator to call after the service is fully initialized. - */ - public function getConfigurator(): string|array|null - { - return $this->configurator; - } - - /** - * Is the definition autowired? - */ - public function isAutowired(): bool - { - return $this->autowired; - } - - /** - * Enables/disables autowiring. - * - * @return $this - */ - public function setAutowired(bool $autowired): static - { - $this->changes['autowired'] = true; - - $this->autowired = $autowired; - - return $this; - } - - /** - * Gets bindings. - * - * @return BoundArgument[] - */ - public function getBindings(): array - { - return $this->bindings; - } - - /** - * Sets bindings. - * - * Bindings map $named or FQCN arguments to values that should be - * injected in the matching parameters (of the constructor, of methods - * called and of controller actions). - * - * @return $this - */ - public function setBindings(array $bindings): static - { - foreach ($bindings as $key => $binding) { - if (0 < strpos($key, '$') && $key !== $k = preg_replace('/[ \t]*\$/', ' $', $key)) { - unset($bindings[$key]); - $bindings[$key = $k] = $binding; - } - if (!$binding instanceof BoundArgument) { - $bindings[$key] = new BoundArgument($binding); - } - } - - $this->bindings = $bindings; - - return $this; - } - - /** - * Add an error that occurred when building this Definition. - * - * @return $this - */ - public function addError(string|\Closure|self $error): static - { - if ($error instanceof self) { - $this->errors = array_merge($this->errors, $error->errors); - } else { - $this->errors[] = $error; - } - - return $this; - } - - /** - * Returns any errors that occurred while building this Definition. - */ - public function getErrors(): array - { - foreach ($this->errors as $i => $error) { - if ($error instanceof \Closure) { - $this->errors[$i] = (string) $error(); - } elseif (!\is_string($error)) { - $this->errors[$i] = (string) $error; - } - } - - return $this->errors; - } - - public function hasErrors(): bool - { - return (bool) $this->errors; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/Dumper.php b/vendor/symfony/dependency-injection/Dumper/Dumper.php deleted file mode 100644 index 31be40ae..00000000 --- a/vendor/symfony/dependency-injection/Dumper/Dumper.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * Dumper is the abstract class for all built-in dumpers. - * - * @author Fabien Potencier - */ -abstract class Dumper implements DumperInterface -{ - public function __construct( - protected ContainerBuilder $container, - ) { - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/DumperInterface.php b/vendor/symfony/dependency-injection/Dumper/DumperInterface.php deleted file mode 100644 index 616b658e..00000000 --- a/vendor/symfony/dependency-injection/Dumper/DumperInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -/** - * DumperInterface is the interface implemented by service container dumper classes. - * - * @author Fabien Potencier - */ -interface DumperInterface -{ - /** - * Dumps the service container. - */ - public function dump(array $options = []): string|array; -} diff --git a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php deleted file mode 100644 index e9c2c321..00000000 --- a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; - -/** - * GraphvizDumper dumps a service container as a graphviz file. - * - * You can convert the generated dot file with the dot utility (http://www.graphviz.org/): - * - * dot -Tpng container.dot > foo.png - * - * @author Fabien Potencier - */ -class GraphvizDumper extends Dumper -{ - private array $nodes; - private array $edges; - // All values should be strings - private array $options = [ - 'graph' => ['ratio' => 'compress'], - 'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'], - 'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'], - 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'], - 'node.definition' => ['fillcolor' => '#eeeeee'], - 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'], - ]; - - /** - * Dumps the service container as a graphviz graph. - * - * Available options: - * - * * graph: The default options for the whole graph - * * node: The default options for nodes - * * edge: The default options for edges - * * node.instance: The default options for services that are defined directly by object instances - * * node.definition: The default options for services that are defined via service definition instances - * * node.missing: The default options for missing services - */ - public function dump(array $options = []): string - { - foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) { - if (isset($options[$key])) { - $this->options[$key] = array_merge($this->options[$key], $options[$key]); - } - } - - $this->nodes = $this->findNodes(); - - $this->edges = []; - foreach ($this->container->getDefinitions() as $id => $definition) { - $this->edges[$id] = array_merge( - $this->findEdges($id, $definition->getArguments(), true, ''), - $this->findEdges($id, $definition->getProperties(), false, '') - ); - - foreach ($definition->getMethodCalls() as $call) { - $this->edges[$id] = array_merge( - $this->edges[$id], - $this->findEdges($id, $call[1], false, $call[0].'()') - ); - } - } - - return $this->container->resolveEnvPlaceholders($this->startDot().$this->addNodes().$this->addEdges().$this->endDot(), '__ENV_%s__'); - } - - private function addNodes(): string - { - $code = ''; - foreach ($this->nodes as $id => $node) { - $aliases = $this->getAliases($id); - - $code .= \sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id.($aliases ? ' ('.implode(', ', $aliases).')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes'])); - } - - return $code; - } - - private function addEdges(): string - { - $code = ''; - foreach ($this->edges as $id => $edges) { - foreach ($edges as $edge) { - $code .= \sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : ''); - } - } - - return $code; - } - - /** - * Finds all edges belonging to a specific service id. - */ - private function findEdges(string $id, array $arguments, bool $required, string $name, bool $lazy = false): array - { - $edges = []; - foreach ($arguments as $argument) { - if ($argument instanceof Parameter) { - $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; - } elseif (\is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) { - $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null; - } - - if ($argument instanceof Reference) { - $lazyEdge = $lazy; - - if (!$this->container->has((string) $argument)) { - $this->nodes[(string) $argument] = ['name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']]; - } elseif ('service_container' !== (string) $argument) { - $lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy(); - } - - $edges[] = [['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge]]; - } elseif ($argument instanceof ArgumentInterface) { - $edges[] = $this->findEdges($id, $argument->getValues(), $required, $name, true); - } elseif ($argument instanceof Definition) { - $edges[] = $this->findEdges($id, $argument->getArguments(), $required, ''); - $edges[] = $this->findEdges($id, $argument->getProperties(), false, ''); - - foreach ($argument->getMethodCalls() as $call) { - $edges[] = $this->findEdges($id, $call[1], false, $call[0].'()'); - } - } elseif (\is_array($argument)) { - $edges[] = $this->findEdges($id, $argument, $required, $name, $lazy); - } - } - - return array_merge([], ...$edges); - } - - private function findNodes(): array - { - $nodes = []; - - $container = $this->cloneContainer(); - - foreach ($container->getDefinitions() as $id => $definition) { - $class = $definition->getClass(); - - if (str_starts_with($class, '\\')) { - $class = substr($class, 1); - } - - try { - $class = $this->container->getParameterBag()->resolveValue($class); - } catch (ParameterNotFoundException) { - } - - $nodes[$id] = ['class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])]; - $container->setDefinition($id, new Definition('stdClass')); - } - - foreach ($container->getServiceIds() as $id) { - if (\array_key_exists($id, $container->getAliases())) { - continue; - } - - if (!$container->hasDefinition($id)) { - $nodes[$id] = ['class' => str_replace('\\', '\\\\', $container->get($id)::class), 'attributes' => $this->options['node.instance']]; - } - } - - return $nodes; - } - - private function cloneContainer(): ContainerBuilder - { - $parameterBag = new ParameterBag($this->container->getParameterBag()->all()); - - $container = new ContainerBuilder($parameterBag); - $container->setDefinitions($this->container->getDefinitions()); - $container->setAliases($this->container->getAliases()); - $container->setResources($this->container->getResources()); - foreach ($this->container->getExtensions() as $extension) { - $container->registerExtension($extension); - } - - return $container; - } - - private function startDot(): string - { - return \sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", - $this->addOptions($this->options['graph']), - $this->addOptions($this->options['node']), - $this->addOptions($this->options['edge']) - ); - } - - private function endDot(): string - { - return "}\n"; - } - - private function addAttributes(array $attributes): string - { - $code = []; - foreach ($attributes as $k => $v) { - $code[] = \sprintf('%s="%s"', $k, $v); - } - - return $code ? ', '.implode(', ', $code) : ''; - } - - private function addOptions(array $options): string - { - $code = []; - foreach ($options as $k => $v) { - $code[] = \sprintf('%s="%s"', $k, $v); - } - - return implode(' ', $code); - } - - private function dotize(string $id): string - { - return preg_replace('/\W/i', '_', $id); - } - - private function getAliases(string $id): array - { - $aliases = []; - foreach ($this->container->getAliases() as $alias => $origin) { - if ($id == $origin) { - $aliases[] = $alias; - } - } - - return $aliases; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php deleted file mode 100644 index 90050ef9..00000000 --- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php +++ /dev/null @@ -1,2421 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\LazyClosure; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocator; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass; -use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass; -use Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\EnvParameterException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\ExpressionLanguage; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper; -use Symfony\Component\DependencyInjection\Loader\FileLoader; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator as BaseServiceLocator; -use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\DependencyInjection\Variable; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * PhpDumper dumps a service container as a PHP class. - * - * @author Fabien Potencier - * @author Johannes M. Schmitt - */ -class PhpDumper extends Dumper -{ - /** - * Characters that might appear in the generated variable name as first character. - */ - public const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz'; - - /** - * Characters that might appear in the generated variable name as any but the first character. - */ - public const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_'; - - /** @var \SplObjectStorage|null */ - private ?\SplObjectStorage $definitionVariables = null; - private ?array $referenceVariables = null; - private int $variableCount; - private ?\SplObjectStorage $inlinedDefinitions = null; - private ?array $serviceCalls = null; - private array $reservedVariables = ['instance', 'class', 'this', 'container']; - private ExpressionLanguage $expressionLanguage; - private ?string $targetDirRegex = null; - private int $targetDirMaxMatches; - private string $docStar; - private array $serviceIdToMethodNameMap; - private array $usedMethodNames; - private string $namespace; - private bool $asFiles; - private string $hotPathTag; - private array $preloadTags; - private bool $inlineFactories; - private bool $inlineRequires; - private array $inlinedRequires = []; - private array $circularReferences = []; - private array $singleUsePrivateIds = []; - private array $preload = []; - private bool $addGetService = false; - private array $locatedIds = []; - private string $serviceLocatorTag; - private array $exportedVariables = []; - private array $dynamicParameters = []; - private string $baseClass; - private string $class; - private DumperInterface $proxyDumper; - private bool $hasProxyDumper = true; - - public function __construct(ContainerBuilder $container) - { - if (!$container->isCompiled()) { - throw new LogicException('Cannot dump an uncompiled container.'); - } - - parent::__construct($container); - } - - /** - * Sets the dumper to be used when dumping proxies in the generated container. - */ - public function setProxyDumper(DumperInterface $proxyDumper): void - { - $this->proxyDumper = $proxyDumper; - $this->hasProxyDumper = !$proxyDumper instanceof NullDumper; - } - - /** - * Dumps the service container as a PHP class. - * - * Available options: - * - * * class: The class name - * * base_class: The base class name - * * namespace: The class namespace - * * as_files: To split the container in several files - * - * @return string|array A PHP class representing the service container or an array of PHP files if the "as_files" option is set - * - * @throws EnvParameterException When an env var exists but has not been dumped - */ - public function dump(array $options = []): string|array - { - $this->locatedIds = []; - $this->targetDirRegex = null; - $this->inlinedRequires = []; - $this->exportedVariables = []; - $this->dynamicParameters = []; - $options = array_merge([ - 'class' => 'ProjectServiceContainer', - 'base_class' => 'Container', - 'namespace' => '', - 'as_files' => false, - 'debug' => true, - 'hot_path_tag' => 'container.hot_path', - 'preload_tags' => ['container.preload', 'container.no_preload'], - 'inline_factories' => null, - 'inline_class_loader' => null, - 'preload_classes' => [], - 'service_locator_tag' => 'container.service_locator', - 'build_time' => time(), - ], $options); - - $this->addGetService = false; - $this->namespace = $options['namespace']; - $this->asFiles = $options['as_files']; - $this->hotPathTag = $options['hot_path_tag']; - $this->preloadTags = $options['preload_tags']; - - $this->inlineFactories = false; - if (isset($options['inline_factories'])) { - $this->inlineFactories = $this->asFiles && $options['inline_factories']; - } - - $this->inlineRequires = $options['debug']; - if (isset($options['inline_class_loader'])) { - $this->inlineRequires = $options['inline_class_loader']; - } - - $this->serviceLocatorTag = $options['service_locator_tag']; - $this->class = $options['class']; - - if (!str_starts_with($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) { - $baseClass = \sprintf('%s\%s', $options['namespace'] ? '\\'.$options['namespace'] : '', $baseClass); - $this->baseClass = $baseClass; - } elseif ('Container' === $baseClass) { - $this->baseClass = Container::class; - } else { - $this->baseClass = $baseClass; - } - - $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass); - - if (!$this->hasProxyDumper) { - (new AnalyzeServiceReferencesPass(true, false))->process($this->container); - (new CheckCircularReferencesPass())->process($this->container); - } - - $this->analyzeReferences(); - $this->docStar = $options['debug'] ? '*' : ''; - - if (!empty($options['file']) && is_dir($dir = \dirname($options['file']))) { - // Build a regexp where the first root dirs are mandatory, - // but every other sub-dir is optional up to the full path in $dir - // Mandate at least 1 root dir and not more than 5 optional dirs. - - $dir = explode(\DIRECTORY_SEPARATOR, realpath($dir)); - $i = \count($dir); - - if (2 + (int) ('\\' === \DIRECTORY_SEPARATOR) <= $i) { - $regex = ''; - $lastOptionalDir = $i > 8 ? $i - 5 : (2 + (int) ('\\' === \DIRECTORY_SEPARATOR)); - $this->targetDirMaxMatches = $i - $lastOptionalDir; - - while (--$i >= $lastOptionalDir) { - $regex = \sprintf('(%s%s)?', preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#'), $regex); - } - - do { - $regex = preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#').$regex; - } while (0 < --$i); - - $this->targetDirRegex = '#(^|file://|[:;, \|\r\n])'.preg_quote($dir[0], '#').$regex.'#'; - } - } - - $proxyClasses = $this->inlineFactories ? $this->generateProxyClasses() : null; - - if ($options['preload_classes']) { - $this->preload = array_combine($options['preload_classes'], $options['preload_classes']); - } - - $code = $this->addDefaultParametersMethod(); - $code = - $this->startClass($options['class'], $baseClass, $this->inlineFactories && $proxyClasses). - $this->addServices($services). - $this->addDeprecatedAliases(). - $code - ; - - $proxyClasses ??= $this->generateProxyClasses(); - - if ($this->addGetService) { - $code = preg_replace( - "/\r?\n\r?\n public function __construct.+?\\{\r?\n/s", - "\n protected \Closure \$getService;$0", - $code, - 1 - ); - } - - if ($this->asFiles) { - $fileTemplate = <<docStar} - * @internal This class has been auto-generated by the Symfony Dependency Injection Component. - */ -class %s extends {$options['class']} -{%s} - -EOF; - $files = []; - $preloadedFiles = []; - $ids = $this->container->getRemovedIds(); - foreach ($this->container->getDefinitions() as $id => $definition) { - if (!$definition->isPublic() && '.' !== ($id[0] ?? '-')) { - $ids[$id] = true; - } - } - if ($ids = array_keys($ids)) { - sort($ids); - $c = "doExport($id)." => true,\n"; - } - $files['removed-ids.php'] = $c."];\n"; - } - - if (!$this->inlineFactories) { - foreach ($this->generateServiceFiles($services) as $file => [$c, $preload]) { - $files[$file] = \sprintf($fileTemplate, substr($file, 0, -4), $c); - - if ($preload) { - $preloadedFiles[$file] = $file; - } - } - foreach ($proxyClasses as $file => $c) { - $files[$file] = "endClass(); - - if ($this->inlineFactories && $proxyClasses) { - $files['proxy-classes.php'] = " $c) { - $code["Container{$hash}/{$file}"] = substr_replace($c, "namespace ? "\nnamespace {$this->namespace};\n" : ''; - $time = $options['build_time']; - $id = hash('crc32', $hash.$time); - $this->asFiles = false; - - if ($this->preload && null !== $autoloadFile = $this->getAutoloadFile()) { - $autoloadFile = trim($this->export($autoloadFile), '()\\'); - - $preloadedFiles = array_reverse($preloadedFiles); - if ('' !== $preloadedFiles = implode("';\nrequire __DIR__.'/", $preloadedFiles)) { - $preloadedFiles = "require __DIR__.'/$preloadedFiles';\n"; - } - - $code[$options['class'].'.preload.php'] = <<= 7.4 when preloading is desired - -use Symfony\Component\DependencyInjection\Dumper\Preloader; - -if (in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { - return; -} - -require $autoloadFile; -(require __DIR__.'/{$options['class']}.php')->set(\\Container{$hash}\\{$options['class']}::class, null); -$preloadedFiles -\$classes = []; - -EOF; - - foreach ($this->preload as $class) { - if (!$class || str_contains($class, '$') || \in_array($class, ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'null', 'callable', 'iterable', 'mixed', 'void', 'never'], true)) { - continue; - } - if (!(class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) || (new \ReflectionClass($class))->isUserDefined()) { - $code[$options['class'].'.preload.php'] .= \sprintf("\$classes[] = '%s';\n", $class); - } - } - - $code[$options['class'].'.preload.php'] .= <<<'EOF' - -$preloaded = Preloader::preload($classes); - -EOF; - } - - $code[$options['class'].'.php'] = << '$hash', - 'container.build_id' => '$id', - 'container.build_time' => $time, - 'container.runtime_mode' => \\in_array(\\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? 'web=0' : 'web=1', -], __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}'); - -EOF; - } else { - $code .= $this->endClass(); - foreach ($proxyClasses as $c) { - $code .= $c; - } - } - - $this->targetDirRegex = null; - $this->inlinedRequires = []; - $this->circularReferences = []; - $this->locatedIds = []; - $this->exportedVariables = []; - $this->dynamicParameters = []; - $this->preload = []; - - $unusedEnvs = []; - foreach ($this->container->getEnvCounters() as $env => $use) { - if (!$use) { - $unusedEnvs[] = $env; - } - } - if ($unusedEnvs) { - throw new EnvParameterException($unusedEnvs, null, 'Environment variables "%s" are never used. Please, check your container\'s configuration.'); - } - - return $code; - } - - /** - * Retrieves the currently set proxy dumper or instantiates one. - */ - private function getProxyDumper(): DumperInterface - { - return $this->proxyDumper ??= new LazyServiceDumper($this->class); - } - - private function analyzeReferences(): void - { - (new AnalyzeServiceReferencesPass(false, $this->hasProxyDumper))->process($this->container); - $checkedNodes = []; - $this->circularReferences = []; - $this->singleUsePrivateIds = []; - foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) { - if (!$node->getValue() instanceof Definition) { - continue; - } - - if ($this->isSingleUsePrivateNode($node)) { - $this->singleUsePrivateIds[$id] = $id; - } - - $this->collectCircularReferences($id, $node->getOutEdges(), $checkedNodes); - } - - $this->container->getCompiler()->getServiceReferenceGraph()->clear(); - $this->singleUsePrivateIds = array_diff_key($this->singleUsePrivateIds, $this->circularReferences); - } - - private function collectCircularReferences(string $sourceId, array $edges, array &$checkedNodes, array &$loops = [], array $path = [], bool $byConstructor = true): void - { - $path[$sourceId] = $byConstructor; - $checkedNodes[$sourceId] = true; - foreach ($edges as $edge) { - $node = $edge->getDestNode(); - $id = $node->getId(); - if ($sourceId === $id || !$node->getValue() instanceof Definition || $edge->isWeak()) { - continue; - } - - if (isset($path[$id])) { - $loop = null; - $loopByConstructor = $edge->isReferencedByConstructor() && !$edge->isLazy(); - $pathInLoop = [$id, []]; - foreach ($path as $k => $pathByConstructor) { - if (null !== $loop) { - $loop[] = $k; - $pathInLoop[1][$k] = $pathByConstructor; - $loops[$k][] = &$pathInLoop; - $loopByConstructor = $loopByConstructor && $pathByConstructor; - } elseif ($k === $id) { - $loop = []; - } - } - $this->addCircularReferences($id, $loop, $loopByConstructor); - } elseif (!isset($checkedNodes[$id])) { - $this->collectCircularReferences($id, $node->getOutEdges(), $checkedNodes, $loops, $path, $edge->isReferencedByConstructor() && !$edge->isLazy()); - } elseif (isset($loops[$id])) { - // we already had detected loops for this edge - // let's check if we have a common ancestor in one of the detected loops - foreach ($loops[$id] as [$first, $loopPath]) { - if (!isset($path[$first])) { - continue; - } - // We have a common ancestor, let's fill the current path - $fillPath = null; - foreach ($loopPath as $k => $pathByConstructor) { - if (null !== $fillPath) { - $fillPath[$k] = $pathByConstructor; - } elseif ($k === $id) { - $fillPath = $path; - $fillPath[$k] = $pathByConstructor; - } - } - - // we can now build the loop - $loop = null; - $loopByConstructor = $edge->isReferencedByConstructor() && !$edge->isLazy(); - foreach ($fillPath as $k => $pathByConstructor) { - if (null !== $loop) { - $loop[] = $k; - $loopByConstructor = $loopByConstructor && $pathByConstructor; - } elseif ($k === $first) { - $loop = []; - } - } - $this->addCircularReferences($first, $loop, $loopByConstructor); - break; - } - } - } - unset($path[$sourceId]); - } - - private function addCircularReferences(string $sourceId, array $currentPath, bool $byConstructor): void - { - $currentId = $sourceId; - $currentPath = array_reverse($currentPath); - $currentPath[] = $currentId; - foreach ($currentPath as $parentId) { - if (empty($this->circularReferences[$parentId][$currentId])) { - $this->circularReferences[$parentId][$currentId] = $byConstructor; - } - - $currentId = $parentId; - } - } - - private function collectLineage(string $class, array &$lineage): void - { - if (isset($lineage[$class])) { - return; - } - if (!$r = $this->container->getReflectionClass($class, false)) { - return; - } - if (is_a($class, $this->baseClass, true)) { - return; - } - $file = $r->getFileName(); - if ($file && str_ends_with($file, ') : eval()\'d code')) { - $file = substr($file, 0, strrpos($file, '(', -17)); - } - if (!$file || $this->doExport($file) === $exportedFile = $this->export($file)) { - return; - } - - $lineage[$class] = substr($exportedFile, 1, -1); - - if ($parent = $r->getParentClass()) { - $this->collectLineage($parent->name, $lineage); - } - - foreach ($r->getInterfaces() as $parent) { - $this->collectLineage($parent->name, $lineage); - } - - foreach ($r->getTraits() as $parent) { - $this->collectLineage($parent->name, $lineage); - } - - unset($lineage[$class]); - $lineage[$class] = substr($exportedFile, 1, -1); - } - - private function generateProxyClasses(): array - { - $proxyClasses = []; - $alreadyGenerated = []; - $definitions = $this->container->getDefinitions(); - $strip = '' === $this->docStar; - $proxyDumper = $this->getProxyDumper(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition = $this->isProxyCandidate($definition, $asGhostObject, $id)) { - continue; - } - if (isset($alreadyGenerated[$asGhostObject][$class = $definition->getClass()])) { - continue; - } - $alreadyGenerated[$asGhostObject][$class] = true; - - foreach (array_column($definition->getTag('proxy'), 'interface') ?: [$class] as $r) { - if (!$r = $this->container->getReflectionClass($r)) { - continue; - } - do { - if ($file = $r->getFileName()) { - if (str_ends_with($file, ') : eval()\'d code')) { - $file = substr($file, 0, strrpos($file, '(', -17)); - } - if (is_file($file)) { - $this->container->addResource(new FileResource($file)); - } - } - $r = $r->getParentClass() ?: null; - } while ($r?->isUserDefined()); - } - - if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition, $id)) { - continue; - } - - if ($this->inlineRequires) { - $lineage = []; - $this->collectLineage($class, $lineage); - - $code = ''; - foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) { - if ($this->inlineFactories) { - $this->inlinedRequires[$file] = true; - } - $code .= \sprintf("include_once %s;\n", $file); - } - - $proxyCode = $code.$proxyCode; - } - - if ($strip) { - $proxyCode = "inlineRequires ? substr($proxyCode, \strlen($code)) : $proxyCode; - $i = strpos($proxyClass, 'class'); - $proxyClass = substr($proxyClass, 6 + $i, strpos($proxyClass, ' ', 7 + $i) - $i - 6); - - if ($this->asFiles || $this->namespace) { - $proxyCode .= "\nif (!\\class_exists('$proxyClass', false)) {\n \\class_alias(__NAMESPACE__.'\\\\$proxyClass', '$proxyClass', false);\n}\n"; - } - - $proxyClasses[$proxyClass.'.php'] = $proxyCode; - } - - return $proxyClasses; - } - - private function addServiceInclude(string $cId, Definition $definition, bool $isProxyCandidate): string - { - $code = ''; - - if ($this->inlineRequires && (!$this->isHotPath($definition) || $isProxyCandidate)) { - $lineage = []; - foreach ($this->inlinedDefinitions as $def) { - if (!$def->isDeprecated()) { - foreach ($this->getClasses($def, $cId) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - foreach ($this->serviceCalls as $id => [$callCount, $behavior]) { - if ('service_container' !== $id && $id !== $cId - && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $behavior - && $this->container->has($id) - && $this->isTrivialInstance($def = $this->container->findDefinition($id)) - ) { - foreach ($this->getClasses($def, $cId) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) { - $code .= \sprintf(" include_once %s;\n", $file); - } - } - - foreach ($this->inlinedDefinitions as $def) { - if ($file = $def->getFile()) { - $file = $this->dumpValue($file); - $file = '(' === $file[0] ? substr($file, 1, -1) : $file; - $code .= \sprintf(" include_once %s;\n", $file); - } - } - - if ('' !== $code) { - $code .= "\n"; - } - - return $code; - } - - /** - * @throws InvalidArgumentException - * @throws RuntimeException - */ - private function addServiceInstance(string $id, Definition $definition, bool $isSimpleInstance): string - { - $class = $this->dumpValue($definition->getClass()); - - if (str_starts_with($class, "'") && !str_contains($class, '$') && !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { - throw new InvalidArgumentException(\sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id)); - } - - $asGhostObject = false; - $isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject, $id); - $instantiation = ''; - - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - if (!$isProxyCandidate && $definition->isShared() && !isset($this->singleUsePrivateIds[$id]) && null === $lastWitherIndex) { - $instantiation = \sprintf('$container->%s[%s] = %s', $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', $this->doExport($id), $isSimpleInstance ? '' : '$instance'); - } elseif (!$isSimpleInstance) { - $instantiation = '$instance'; - } - - $return = ''; - if ($isSimpleInstance) { - $return = 'return '; - } else { - $instantiation .= ' = '; - } - - return $this->addNewInstance($definition, ' '.$return.$instantiation, $id, $asGhostObject); - } - - private function isTrivialInstance(Definition $definition): bool - { - if ($definition->hasErrors()) { - return true; - } - if ($definition->isSynthetic() || $definition->getFile() || $definition->getMethodCalls() || $definition->getProperties() || $definition->getConfigurator()) { - return false; - } - if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < \count($definition->getArguments())) { - return false; - } - - foreach ($definition->getArguments() as $arg) { - if (!$arg || $arg instanceof Parameter) { - continue; - } - if (\is_array($arg) && 3 >= \count($arg)) { - foreach ($arg as $k => $v) { - if ($this->dumpValue($k) !== $this->dumpValue($k, false)) { - return false; - } - if (!$v || $v instanceof Parameter) { - continue; - } - if ($v instanceof Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) { - continue; - } - if (!\is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) { - return false; - } - } - } elseif ($arg instanceof Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) { - continue; - } elseif (!\is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) { - return false; - } - } - - return true; - } - - private function addServiceMethodCalls(Definition $definition, string $variableName, ?string $sharedNonLazyId): string - { - $lastWitherIndex = null; - foreach ($definition->getMethodCalls() as $k => $call) { - if ($call[2] ?? false) { - $lastWitherIndex = $k; - } - } - - $calls = ''; - foreach ($definition->getMethodCalls() as $k => $call) { - $arguments = []; - foreach ($call[1] as $i => $value) { - $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value); - } - - $witherAssignation = ''; - - if ($call[2] ?? false) { - if (null !== $sharedNonLazyId && $lastWitherIndex === $k && 'instance' === $variableName) { - $witherAssignation = \sprintf('$container->%s[\'%s\'] = ', $definition->isPublic() ? 'services' : 'privates', $sharedNonLazyId); - } - $witherAssignation .= \sprintf('$%s = ', $variableName); - } - - $calls .= $this->wrapServiceConditionals($call[1], \sprintf(" %s\$%s->%s(%s);\n", $witherAssignation, $variableName, $call[0], implode(', ', $arguments))); - } - - return $calls; - } - - private function addServiceProperties(Definition $definition, string $variableName = 'instance'): string - { - $code = ''; - foreach ($definition->getProperties() as $name => $value) { - $code .= \sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value)); - } - - return $code; - } - - private function addServiceConfigurator(Definition $definition, string $variableName = 'instance'): string - { - if (!$callable = $definition->getConfigurator()) { - return ''; - } - - if (\is_array($callable)) { - if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->offsetExists($callable[0])) - ) { - return \sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - $class = $this->dumpValue($callable[0]); - // If the class is a string we can optimize away - if (str_starts_with($class, "'") && !str_contains($class, '$')) { - return \sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName); - } - - if (str_starts_with($class, 'new ')) { - return \sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - return \sprintf(" [%s, '%s'](\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); - } - - return \sprintf(" %s(\$%s);\n", $callable, $variableName); - } - - private function addService(string $id, Definition $definition): array - { - $this->definitionVariables = new \SplObjectStorage(); - $this->referenceVariables = []; - $this->variableCount = 0; - $this->referenceVariables[$id] = new Variable('instance'); - - $return = []; - - if ($class = $definition->getClass()) { - $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class); - $return[] = \sprintf(str_starts_with($class, '%') ? '@return object A %1$s instance' : '@return \%s', ltrim($class, '\\')); - } elseif ($factory = $definition->getFactory()) { - if (\is_string($factory) && !str_starts_with($factory, '@=')) { - $return[] = \sprintf('@return object An instance returned by %s()', $factory); - } elseif (\is_array($factory) && (\is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) { - $class = $factory[0] instanceof Definition ? $factory[0]->getClass() : (string) $factory[0]; - $class = $class instanceof Parameter ? '%'.$class.'%' : $this->container->resolveEnvPlaceholders($class); - $return[] = \sprintf('@return object An instance returned by %s::%s()', $class, $factory[1]); - } - } - - if ($definition->isDeprecated()) { - if ($return && str_starts_with($return[\count($return) - 1], '@return')) { - $return[] = ''; - } - - $deprecation = $definition->getDeprecation($id); - $return[] = \sprintf('@deprecated %s', ($deprecation['package'] || $deprecation['version'] ? "Since {$deprecation['package']} {$deprecation['version']}: " : '').$deprecation['message']); - } - - $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return)); - $return = $this->container->resolveEnvPlaceholders($return); - - $shared = $definition->isShared() ? ' shared' : ''; - $public = $definition->isPublic() ? 'public' : 'private'; - $autowired = $definition->isAutowired() ? ' autowired' : ''; - $asFile = $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition); - $methodName = $this->generateMethodName($id); - - if ($asFile || $definition->isLazy()) { - $lazyInitialization = ', $lazyLoad = true'; - } else { - $lazyInitialization = ''; - } - - $code = <<docStar} - * Gets the $public '$id'$shared$autowired service. - * - * $return -EOF; - $code = str_replace('*/', ' ', $code).<<hasErrors() && $e = $definition->getErrors()) { - $code .= \sprintf(" throw new RuntimeException(%s);\n", $this->export(reset($e))); - } else { - $this->serviceCalls = []; - $this->inlinedDefinitions = $this->getDefinitionsFromArguments([$definition], null, $this->serviceCalls); - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation($id); - $code .= \sprintf(" trigger_deprecation(%s, %s, %s);\n\n", $this->export($deprecation['package']), $this->export($deprecation['version']), $this->export($deprecation['message'])); - } elseif ($definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1])) { - foreach ($this->inlinedDefinitions as $def) { - foreach ($this->getClasses($def, $id) as $class) { - $this->preload[$class] = $class; - } - } - } - - if (!$definition->isShared()) { - $factory = \sprintf('$container->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id)); - } - - $asGhostObject = false; - if ($isProxyCandidate = $this->isProxyCandidate($definition, $asGhostObject, $id)) { - $definition = $isProxyCandidate; - - if (!$definition->isShared()) { - $code .= \sprintf(' %s ??= ', $factory); - - if ($definition->isPublic()) { - $code .= \sprintf("fn () => self::%s(\$container);\n\n", $asFile ? 'do' : $methodName); - } else { - $code .= \sprintf("self::%s(...);\n\n", $asFile ? 'do' : $methodName); - } - } - $lazyLoad = $asGhostObject ? '$proxy' : 'false'; - - $factoryCode = $asFile ? \sprintf('self::do($container, %s)', $lazyLoad) : \sprintf('self::%s($container, %s)', $methodName, $lazyLoad); - $code .= $this->getProxyDumper()->getProxyFactoryCode($definition, $id, $factoryCode); - } - - $c = $this->addServiceInclude($id, $definition, null !== $isProxyCandidate); - - if ('' !== $c && $isProxyCandidate && !$definition->isShared()) { - $c = implode("\n", array_map(fn ($line) => $line ? ' '.$line : $line, explode("\n", $c))); - $code .= " static \$include = true;\n\n"; - $code .= " if (\$include) {\n"; - $code .= $c; - $code .= " \$include = false;\n"; - $code .= " }\n\n"; - } else { - $code .= $c; - } - - $c = $this->addInlineService($id, $definition); - - if (!$isProxyCandidate && !$definition->isShared()) { - $c = implode("\n", array_map(fn ($line) => $line ? ' '.$line : $line, explode("\n", $c))); - $lazyloadInitialization = $definition->isLazy() ? ', $lazyLoad = true' : ''; - - $c = \sprintf(" %s = function (\$container%s) {\n%s };\n\n return %1\$s(\$container);\n", $factory, $lazyloadInitialization, $c); - } - - $code .= $c; - } - - $code .= " }\n"; - - $this->definitionVariables = $this->inlinedDefinitions = null; - $this->referenceVariables = $this->serviceCalls = null; - - return [$file, $code]; - } - - private function addInlineVariables(string $id, Definition $definition, array $arguments, bool $forConstructor): string - { - $code = ''; - - foreach ($arguments as $argument) { - if (\is_array($argument)) { - $code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor); - } elseif ($argument instanceof Reference) { - $code .= $this->addInlineReference($id, $definition, $argument, $forConstructor); - } elseif ($argument instanceof Definition) { - $code .= $this->addInlineService($id, $definition, $argument, $forConstructor); - } - } - - return $code; - } - - private function addInlineReference(string $id, Definition $definition, string $targetId, bool $forConstructor): string - { - while ($this->container->hasAlias($targetId)) { - $targetId = (string) $this->container->getAlias($targetId); - } - - [$callCount, $behavior] = $this->serviceCalls[$targetId]; - - if ($id === $targetId) { - return $this->addInlineService($id, $definition, $definition); - } - - if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) { - return ''; - } - - if ($this->container->hasDefinition($targetId) && ($def = $this->container->getDefinition($targetId)) && !$def->isShared()) { - return ''; - } - - $hasSelfRef = isset($this->circularReferences[$id][$targetId]) && !isset($this->definitionVariables[$definition]) && !($this->hasProxyDumper && $definition->isLazy()); - - if ($hasSelfRef && !$forConstructor && !$forConstructor = !$this->circularReferences[$id][$targetId]) { - $code = $this->addInlineService($id, $definition, $definition); - } else { - $code = ''; - } - - if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) { - return $code; - } - - $name = $this->getNextVariableName(); - $this->referenceVariables[$targetId] = new Variable($name); - - $reference = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $behavior ? new Reference($targetId, $behavior) : null; - $code .= \sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference)); - - if (!$hasSelfRef || !$forConstructor) { - return $code; - } - - return $code.\sprintf(<<<'EOTXT' - - if (isset($container->%s[%s])) { - return $container->%1$s[%2$s]; - } - -EOTXT - , - $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', - $this->doExport($id) - ); - } - - private function addInlineService(string $id, Definition $definition, ?Definition $inlineDef = null, bool $forConstructor = true): string - { - $code = ''; - - if ($isSimpleInstance = $isRootInstance = null === $inlineDef) { - foreach ($this->serviceCalls as $targetId => [$callCount, $behavior, $byConstructor]) { - if ($byConstructor && isset($this->circularReferences[$id][$targetId]) && !$this->circularReferences[$id][$targetId] && !($this->hasProxyDumper && $definition->isLazy())) { - $code .= $this->addInlineReference($id, $definition, $targetId, $forConstructor); - } - } - } - - if (isset($this->definitionVariables[$inlineDef ??= $definition])) { - return $code; - } - - $arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()]; - - $code .= $this->addInlineVariables($id, $definition, $arguments, $forConstructor); - - if ($arguments = array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) { - $isSimpleInstance = false; - } elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) { - return $code; - } - - $asGhostObject = false; - $isProxyCandidate = $this->isProxyCandidate($inlineDef, $asGhostObject, $id); - - if (isset($this->definitionVariables[$inlineDef])) { - $isSimpleInstance = false; - } else { - $name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName(); - $this->definitionVariables[$inlineDef] = new Variable($name); - $code .= '' !== $code ? "\n" : ''; - - if ('instance' === $name) { - $code .= $this->addServiceInstance($id, $definition, $isSimpleInstance); - } else { - $code .= $this->addNewInstance($inlineDef, ' $'.$name.' = ', $id); - } - - if ('' !== $inline = $this->addInlineVariables($id, $definition, $arguments, false)) { - $code .= "\n".$inline."\n"; - } elseif ($arguments && 'instance' === $name) { - $code .= "\n"; - } - - $code .= $this->addServiceProperties($inlineDef, $name); - $code .= $this->addServiceMethodCalls($inlineDef, $name, !$isProxyCandidate && $inlineDef->isShared() && !isset($this->singleUsePrivateIds[$id]) ? $id : null); - $code .= $this->addServiceConfigurator($inlineDef, $name); - } - - if (!$isRootInstance || $isSimpleInstance) { - return $code; - } - - return $code."\n return \$instance;\n"; - } - - private function addServices(?array &$services = null): string - { - $publicServices = $privateServices = ''; - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic()) { - $services[$id] = $this->addService($id, $definition); - } elseif ($definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1])) { - $services[$id] = null; - - foreach ($this->getClasses($definition, $id) as $class) { - $this->preload[$class] = $class; - } - } - } - - foreach ($definitions as $id => $definition) { - if (!([$file, $code] = $services[$id]) || null !== $file) { - continue; - } - if ($definition->isPublic()) { - $publicServices .= $code; - } elseif (!$this->isTrivialInstance($definition) || isset($this->locatedIds[$id])) { - $privateServices .= $code; - } - } - - return $publicServices.$privateServices; - } - - private function generateServiceFiles(array $services): iterable - { - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (([$file, $code] = $services[$id]) && null !== $file && ($definition->isPublic() || !$this->isTrivialInstance($definition) || isset($this->locatedIds[$id]))) { - yield $file => [$code, $definition->hasTag($this->hotPathTag) || !$definition->hasTag($this->preloadTags[1]) && !$definition->isDeprecated() && !$definition->hasErrors()]; - } - } - } - - private function addNewInstance(Definition $definition, string $return = '', ?string $id = null, bool $asGhostObject = false): string - { - $tail = $return ? str_repeat(')', substr_count($return, '(') - substr_count($return, ')')).";\n" : ''; - - $arguments = []; - if (BaseServiceLocator::class === $definition->getClass() && $definition->hasTag($this->serviceLocatorTag)) { - foreach ($definition->getArgument(0) as $k => $argument) { - $arguments[$k] = $argument->getValues()[0]; - } - - return $return.$this->dumpValue(new ServiceLocatorArgument($arguments)).$tail; - } - - foreach ($definition->getArguments() as $i => $value) { - $arguments[] = (\is_string($i) ? $i.': ' : '').$this->dumpValue($value); - } - - if ($callable = $definition->getFactory()) { - if ('current' === $callable && [0] === array_keys($definition->getArguments()) && \is_array($value) && [0] === array_keys($value)) { - return $return.$this->dumpValue($value[0]).$tail; - } - - if (['Closure', 'fromCallable'] === $callable) { - $callable = $definition->getArgument(0); - if ($callable instanceof ServiceClosureArgument) { - return $return.$this->dumpValue($callable).$tail; - } - - $arguments = ['...']; - - if ($callable instanceof Reference || $callable instanceof Definition) { - $callable = [$callable, '__invoke']; - } - } - - if (\is_string($callable) && str_starts_with($callable, '@=')) { - return $return.\sprintf('(($args = %s) ? (%s) : null)', - $this->dumpValue(new ServiceLocatorArgument($definition->getArguments())), - $this->getExpressionLanguage()->compile(substr($callable, 2), ['container' => 'container', 'args' => 'args']) - ).$tail; - } - - if (!\is_array($callable)) { - return $return.\sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : '').$tail; - } - - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $callable[1])) { - throw new RuntimeException(\sprintf('Cannot dump definition because of invalid factory method (%s).', $callable[1] ?: 'n/a')); - } - - if (['...'] === $arguments && ('Closure' !== ($class = $definition->getClass() ?: 'Closure') || $definition->isLazy() && ( - $callable[0] instanceof Reference - || ($callable[0] instanceof Definition && !$this->definitionVariables->offsetExists($callable[0])) - ))) { - $initializer = 'fn () => '.$this->dumpValue($callable[0]); - - return $return.LazyClosure::getCode($initializer, $callable, $class, $this->container, $id).$tail; - } - - if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->offsetExists($callable[0])) - ) { - return $return.\sprintf('%s->%s(%s)', $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - $class = $this->dumpValue($callable[0]); - // If the class is a string we can optimize away - if (str_starts_with($class, "'") && !str_contains($class, '$')) { - if ("''" === $class) { - throw new RuntimeException(\sprintf('Cannot dump definition: "%s" service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id ? 'The "'.$id.'"' : 'inline')); - } - - return $return.\sprintf('%s::%s(%s)', $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - if (str_starts_with($class, 'new ')) { - return $return.\sprintf('(%s)->%s(%s)', $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - return $return.\sprintf("[%s, '%s'](%s)", $class, $callable[1], $arguments ? implode(', ', $arguments) : '').$tail; - } - - if (null === $class = $definition->getClass()) { - throw new RuntimeException('Cannot dump definitions which have no class nor factory.'); - } - - if (!$asGhostObject) { - return $return.\sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), implode(', ', $arguments)).$tail; - } - - if (!method_exists($this->container->getParameterBag()->resolveValue($class), '__construct')) { - return $return.'$lazyLoad'.$tail; - } - - return $return.\sprintf('($lazyLoad->__construct(%s) && false ?: $lazyLoad)', implode(', ', $arguments)).$tail; - } - - private function startClass(string $class, string $baseClass, bool $hasProxyClasses): string - { - $namespaceLine = !$this->asFiles && $this->namespace ? "\nnamespace {$this->namespace};\n" : ''; - - $code = <<docStar} - * @internal This class has been auto-generated by the Symfony Dependency Injection Component. - */ -class $class extends $baseClass -{ - private const DEPRECATED_PARAMETERS = []; - - private const NONEMPTY_PARAMETERS = []; - - protected \$parameters = []; - - public function __construct() - { - -EOF; - $code = str_replace(" private const DEPRECATED_PARAMETERS = [];\n\n", $this->addDeprecatedParameters(), $code); - $code = str_replace(" private const NONEMPTY_PARAMETERS = [];\n\n", $this->addNonEmptyParameters(), $code); - - if ($this->asFiles) { - $code = str_replace('__construct()', '__construct(private array $buildParameters = [], protected string $containerDir = __DIR__)', $code); - - if (null !== $this->targetDirRegex) { - $code = str_replace('$parameters = []', "\$targetDir;\n protected \$parameters = []", $code); - $code .= ' $this->targetDir = \\dirname($containerDir);'."\n"; - } - } - - if (Container::class !== $this->baseClass) { - $r = $this->container->getReflectionClass($this->baseClass, false); - if (null !== $r - && (null !== $constructor = $r->getConstructor()) - && 0 === $constructor->getNumberOfRequiredParameters() - && Container::class !== $constructor->getDeclaringClass()->name - ) { - $code .= " parent::__construct();\n"; - $code .= " \$this->parameterBag = null;\n\n"; - } - } - - if ($this->container->getParameterBag()->all()) { - $code .= " \$this->parameters = \$this->getDefaultParameters();\n\n"; - } - $code .= " \$this->services = \$this->privates = [];\n"; - - $code .= $this->addSyntheticIds(); - $code .= $this->addMethodMap(); - $code .= $this->asFiles && !$this->inlineFactories ? $this->addFileMap() : ''; - $code .= $this->addAliases(); - $code .= $this->addInlineRequires($hasProxyClasses); - $code .= <<addRemovedIds(); - - if ($this->asFiles && !$this->inlineFactories) { - $code .= <<<'EOF' - - protected function load($file, $lazyLoad = true): mixed - { - if (class_exists($class = __NAMESPACE__.'\\'.$file, false)) { - return $class::do($this, $lazyLoad); - } - - if ('.' === $file[-4]) { - $class = substr($class, 0, -4); - } else { - $file .= '.php'; - } - - $service = require $this->containerDir.\DIRECTORY_SEPARATOR.$file; - - return class_exists($class, false) ? $class::do($this, $lazyLoad) : $service; - } - -EOF; - } - - foreach ($this->container->getDefinitions() as $definition) { - if (!$definition->isLazy() || !$this->hasProxyDumper) { - continue; - } - - if ($this->asFiles && !$this->inlineFactories) { - $proxyLoader = "class_exists(\$class, false) || require __DIR__.'/'.\$class.'.php';\n\n "; - } else { - $proxyLoader = ''; - } - - $code .= <<container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if ($definition->isSynthetic() && 'service_container' !== $id) { - $code .= ' '.$this->doExport($id)." => true,\n"; - } - } - - return $code ? " \$this->syntheticIds = [\n{$code} ];\n" : ''; - } - - private function addRemovedIds(): string - { - $ids = $this->container->getRemovedIds(); - foreach ($this->container->getDefinitions() as $id => $definition) { - if (!$definition->isPublic() && '.' !== ($id[0] ?? '-')) { - $ids[$id] = true; - } - } - if (!$ids) { - return ''; - } - if ($this->asFiles) { - $code = "require \$this->containerDir.\\DIRECTORY_SEPARATOR.'removed-ids.php'"; - } else { - $code = ''; - $ids = array_keys($ids); - sort($ids); - foreach ($ids as $id) { - if (preg_match(FileLoader::ANONYMOUS_ID_REGEXP, $id)) { - continue; - } - $code .= ' '.$this->doExport($id)." => true,\n"; - } - - $code = "[\n{$code} ]"; - } - - return <<container->getParameterBag()) instanceof ParameterBag) { - return ''; - } - - if (!$deprecated = $bag->allDeprecated()) { - return ''; - } - $code = ''; - ksort($deprecated); - foreach ($deprecated as $param => $deprecation) { - $code .= ' '.$this->doExport($param).' => ['.implode(', ', array_map($this->doExport(...), $deprecation))."],\n"; - } - - return " private const DEPRECATED_PARAMETERS = [\n{$code} ];\n\n"; - } - - private function addNonEmptyParameters(): string - { - if (!($bag = $this->container->getParameterBag()) instanceof ParameterBag) { - return ''; - } - - if (!$nonEmpty = $bag->allNonEmpty()) { - return ''; - } - $code = ''; - ksort($nonEmpty); - foreach ($nonEmpty as $param => $message) { - $code .= ' '.$this->doExport($param).' => '.$this->doExport($message).",\n"; - } - - return " private const NONEMPTY_PARAMETERS = [\n{$code} ];\n\n"; - } - - private function addMethodMap(): string - { - $code = ''; - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic() && $definition->isPublic() && (!$this->asFiles || $this->inlineFactories || $this->isHotPath($definition))) { - $code .= ' '.$this->doExport($id).' => '.$this->doExport($this->generateMethodName($id)).",\n"; - } - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - if (!$id->isDeprecated()) { - continue; - } - $code .= ' '.$this->doExport($alias).' => '.$this->doExport($this->generateMethodName($alias)).",\n"; - } - - return $code ? " \$this->methodMap = [\n{$code} ];\n" : ''; - } - - private function addFileMap(): string - { - $code = ''; - $definitions = $this->container->getDefinitions(); - ksort($definitions); - foreach ($definitions as $id => $definition) { - if (!$definition->isSynthetic() && $definition->isPublic() && !$this->isHotPath($definition)) { - $code .= \sprintf(" %s => '%s',\n", $this->doExport($id), $this->generateMethodName($id)); - } - } - - return $code ? " \$this->fileMap = [\n{$code} ];\n" : ''; - } - - private function addAliases(): string - { - if (!$aliases = $this->container->getAliases()) { - return "\n \$this->aliases = [];\n"; - } - - $code = " \$this->aliases = [\n"; - ksort($aliases); - foreach ($aliases as $alias => $id) { - if ($id->isDeprecated()) { - continue; - } - - $id = (string) $id; - while (isset($aliases[$id])) { - $id = (string) $aliases[$id]; - } - $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n"; - } - - return $code." ];\n"; - } - - private function addDeprecatedAliases(): string - { - $code = ''; - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $definition) { - if (!$definition->isDeprecated()) { - continue; - } - $public = $definition->isPublic() ? 'public' : 'private'; - $id = (string) $definition; - $methodNameAlias = $this->generateMethodName($alias); - $idExported = $this->export($id); - $deprecation = $definition->getDeprecation($alias); - $packageExported = $this->export($deprecation['package']); - $versionExported = $this->export($deprecation['version']); - $messageExported = $this->export($deprecation['message']); - $code .= <<docStar} - * Gets the $public '$alias' alias. - * - * @return object The "$id" service. - */ - protected static function {$methodNameAlias}(\$container) - { - trigger_deprecation($packageExported, $versionExported, $messageExported); - - return \$container->get($idExported); - } - -EOF; - } - - return $code; - } - - private function addInlineRequires(bool $hasProxyClasses): string - { - $lineage = []; - $hotPathServices = $this->hotPathTag && $this->inlineRequires ? $this->container->findTaggedServiceIds($this->hotPathTag) : []; - - foreach ($hotPathServices as $id => $tags) { - $definition = $this->container->getDefinition($id); - - if ($definition->isLazy() && $this->hasProxyDumper) { - continue; - } - - $inlinedDefinitions = $this->getDefinitionsFromArguments([$definition]); - - foreach ($inlinedDefinitions as $def) { - foreach ($this->getClasses($def, $id) as $class) { - $this->collectLineage($class, $lineage); - } - } - } - - $code = ''; - - foreach ($lineage as $file) { - if (!isset($this->inlinedRequires[$file])) { - $this->inlinedRequires[$file] = true; - $code .= \sprintf("\n include_once %s;", $file); - } - } - - if ($hasProxyClasses) { - $code .= "\n include_once __DIR__.'/proxy-classes.php';"; - } - - return $code ? \sprintf("\n \$this->privates['service_container'] = static function (\$container) {%s\n };\n", $code) : ''; - } - - private function addDefaultParametersMethod(): string - { - $bag = $this->container->getParameterBag(); - - if (!$bag->all() && (!$bag instanceof ParameterBag || !$bag->allNonEmpty())) { - return ''; - } - - $php = []; - $dynamicPhp = []; - - foreach ($bag->all() as $key => $value) { - if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) { - throw new InvalidArgumentException(\sprintf('Parameter name cannot use env parameters: "%s".', $resolvedKey)); - } - $hasEnum = false; - $export = $this->exportParameters([$value], '', 12, $hasEnum); - $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2); - - if ($hasEnum || preg_match("/\\\$container->(?:getEnv\('(?:[-.\w\\\\]*+:)*+\w*+'\)|targetDir\.'')/", $export[1])) { - $dynamicPhp[$key] = \sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); - $this->dynamicParameters[$key] = true; - } else { - $php[] = \sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]); - } - } - $parameters = \sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8)); - - $code = <<<'EOF' - - public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null - { - if (isset(self::DEPRECATED_PARAMETERS[$name])) { - trigger_deprecation(...self::DEPRECATED_PARAMETERS[$name]); - } - - if (isset($this->buildParameters[$name])) { - return $this->buildParameters[$name]; - } - - if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) { - throw new ParameterNotFoundException($name, extraMessage: self::NONEMPTY_PARAMETERS[$name] ?? null); - } - - if (isset($this->loadedDynamicParameters[$name])) { - $value = $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); - } else { - $value = $this->parameters[$name]; - } - - if (isset(self::NONEMPTY_PARAMETERS[$name]) && (null === $value || '' === $value || [] === $value)) { - throw new \Symfony\Component\DependencyInjection\Exception\EmptyParameterValueException(self::NONEMPTY_PARAMETERS[$name]); - } - - return $value; - } - - public function hasParameter(string $name): bool - { - if (isset($this->buildParameters[$name])) { - return true; - } - - return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters); - } - - public function setParameter(string $name, $value): void - { - throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); - } - - public function getParameterBag(): ParameterBagInterface - { - if (!isset($this->parameterBag)) { - $parameters = $this->parameters; - foreach ($this->loadedDynamicParameters as $name => $loaded) { - $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); - } - foreach ($this->buildParameters as $name => $value) { - $parameters[$name] = $value; - } - $this->parameterBag = new FrozenParameterBag($parameters, self::DEPRECATED_PARAMETERS, self::NONEMPTY_PARAMETERS); - } - - return $this->parameterBag; - } - -EOF; - - if (!$this->asFiles) { - $code = preg_replace('/^.*buildParameters.*\n.*\n.*\n\n?/m', '', $code); - } - - if (!$bag instanceof ParameterBag || !$bag->allDeprecated()) { - $code = preg_replace("/\n.*DEPRECATED_PARAMETERS.*\n.*\n.*\n/m", '', $code, 1); - $code = str_replace(', self::DEPRECATED_PARAMETERS', ', []', $code); - } - - if (!$bag instanceof ParameterBag || !$bag->allNonEmpty()) { - $code = str_replace(', extraMessage: self::NONEMPTY_PARAMETERS[$name] ?? null', '', $code); - $code = str_replace(', self::NONEMPTY_PARAMETERS', '', $code); - $code = preg_replace("/\n.*NONEMPTY_PARAMETERS.*\n.*\n.*\n/m", '', $code, 1); - } - - if ($dynamicPhp) { - $loadedDynamicParameters = $this->exportParameters(array_combine(array_keys($dynamicPhp), array_fill(0, \count($dynamicPhp), false)), '', 8); - $getDynamicParameter = <<<'EOF' - $container = $this; - $value = match ($name) { -%s - default => throw new ParameterNotFoundException($name), - }; - $this->loadedDynamicParameters[$name] = true; - - return $this->dynamicParameters[$name] = $value; -EOF; - $getDynamicParameter = \sprintf($getDynamicParameter, implode("\n", $dynamicPhp)); - } else { - $loadedDynamicParameters = '[]'; - $getDynamicParameter = str_repeat(' ', 8).'throw new ParameterNotFoundException($name);'; - } - - return $code.<< $value) { - if (\is_array($value)) { - $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4, $hasEnum); - } elseif ($value instanceof ArgumentInterface) { - throw new InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain special arguments. "%s" found in "%s".', get_debug_type($value), $path.'/'.$key)); - } elseif ($value instanceof Variable) { - throw new InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path.'/'.$key)); - } elseif ($value instanceof Definition) { - throw new InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path.'/'.$key)); - } elseif ($value instanceof Reference) { - throw new InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path.'/'.$key)); - } elseif ($value instanceof Expression) { - throw new InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path.'/'.$key)); - } elseif ($value instanceof \UnitEnum) { - $hasEnum = true; - $value = \sprintf('\%s::%s', $value::class, $value->name); - } else { - $value = $this->export($value); - } - - $php[] = \sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value); - } - - return \sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4)); - } - - private function endClass(): string - { - return <<<'EOF' -} - -EOF; - } - - private function wrapServiceConditionals(mixed $value, string $code): string - { - if (!$condition = $this->getServiceConditionals($value)) { - return $code; - } - - // re-indent the wrapped code - $code = implode("\n", array_map(fn ($line) => $line ? ' '.$line : $line, explode("\n", $code))); - - return \sprintf(" if (%s) {\n%s }\n", $condition, $code); - } - - private function getServiceConditionals(mixed $value): string - { - $conditions = []; - foreach (ContainerBuilder::getInitializedConditionals($value) as $service) { - if (!$this->container->hasDefinition($service)) { - return 'false'; - } - $conditions[] = \sprintf('isset($container->%s[%s])', $this->container->getDefinition($service)->isPublic() ? 'services' : 'privates', $this->doExport($service)); - } - foreach (ContainerBuilder::getServiceConditionals($value) as $service) { - if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) { - continue; - } - - $conditions[] = \sprintf('$container->has(%s)', $this->doExport($service)); - } - - if (!$conditions) { - return ''; - } - - return implode(' && ', $conditions); - } - - private function getDefinitionsFromArguments(array $arguments, ?\SplObjectStorage $definitions = null, array &$calls = [], ?bool $byConstructor = null): \SplObjectStorage - { - $definitions ??= new \SplObjectStorage(); - - foreach ($arguments as $argument) { - if (\is_array($argument)) { - $this->getDefinitionsFromArguments($argument, $definitions, $calls, $byConstructor); - } elseif ($argument instanceof Reference) { - $id = (string) $argument; - - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if (!isset($calls[$id])) { - $calls[$id] = [0, $argument->getInvalidBehavior(), $byConstructor]; - } else { - $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior()); - } - - ++$calls[$id][0]; - } elseif (!$argument instanceof Definition) { - // no-op - } elseif (isset($definitions[$argument])) { - $definitions[$argument] = 1 + $definitions[$argument]; - } else { - $definitions[$argument] = 1; - $arguments = [$argument->getArguments(), $argument->getFactory()]; - $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null === $byConstructor || $byConstructor); - $arguments = [$argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()]; - $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null !== $byConstructor && $byConstructor); - } - } - - return $definitions; - } - - /** - * @throws RuntimeException - */ - private function dumpValue(mixed $value, bool $interpolate = true): string - { - if (\is_array($value)) { - if ($value && $interpolate && false !== $param = array_search($value, $this->container->getParameterBag()->all(), true)) { - return $this->dumpValue("%$param%"); - } - $isList = array_is_list($value); - $code = []; - foreach ($value as $k => $v) { - $code[] = $isList ? $this->dumpValue($v, $interpolate) : \sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)); - } - - return \sprintf('[%s]', implode(', ', $code)); - } elseif ($value instanceof ArgumentInterface) { - $scope = [$this->definitionVariables, $this->referenceVariables]; - $this->definitionVariables = $this->referenceVariables = null; - - try { - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - $code = $this->dumpValue($value, $interpolate); - - $returnedType = ''; - if ($value instanceof TypedReference) { - $returnedType = \sprintf(': %s\%s', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $value->getInvalidBehavior() ? '' : '?', str_replace(['|', '&'], ['|\\', '&\\'], $value->getType())); - } - - $attribute = ''; - if ($value instanceof Reference) { - $attribute = 'name: '.$this->dumpValue((string) $value, $interpolate); - - if ($this->container->hasDefinition($value) && ($class = $this->container->findDefinition($value)->getClass()) && $class !== (string) $value) { - $attribute .= ', class: '.$this->dumpValue($class, $interpolate); - } - - $attribute = \sprintf('#[\Closure(%s)] ', $attribute); - } - - return \sprintf('%sfn ()%s => %s', $attribute, $returnedType, $code); - } - - if ($value instanceof IteratorArgument) { - if (!$values = $value->getValues()) { - return 'new RewindableGenerator(fn () => new \EmptyIterator(), 0)'; - } - - $code = []; - $code[] = 'new RewindableGenerator(function () use ($container) {'; - - $operands = [0]; - foreach ($values as $k => $v) { - ($c = $this->getServiceConditionals($v)) ? $operands[] = "(int) ($c)" : ++$operands[0]; - $v = $this->wrapServiceConditionals($v, \sprintf(" yield %s => %s;\n", $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate))); - foreach (explode("\n", $v) as $v) { - if ($v) { - $code[] = ' '.$v; - } - } - } - - $code[] = \sprintf(' }, %s)', \count($operands) > 1 ? 'fn () => '.implode(' + ', $operands) : $operands[0]); - - return implode("\n", $code); - } - - if ($value instanceof ServiceLocatorArgument) { - $serviceMap = ''; - $serviceTypes = ''; - foreach ($value->getValues() as $k => $v) { - if (!$v instanceof Reference) { - $serviceMap .= \sprintf("\n %s => [%s],", $this->export($k), $this->dumpValue($v)); - $serviceTypes .= \sprintf("\n %s => '?',", $this->export($k)); - continue; - } - $id = (string) $v; - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - $definition = $this->container->getDefinition($id); - $load = !($definition->hasErrors() && $e = $definition->getErrors()) ? $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition) : reset($e); - $serviceMap .= \sprintf("\n %s => [%s, %s, %s, %s],", - $this->export($k), - $this->export($definition->isShared() ? ($definition->isPublic() ? 'services' : 'privates') : false), - $this->doExport($id), - $this->export(ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $v->getInvalidBehavior() && !\is_string($load) ? $this->generateMethodName($id) : null), - $this->export($load) - ); - $serviceTypes .= \sprintf("\n %s => %s,", $this->export($k), $this->export($v instanceof TypedReference ? $v->getType() : '?')); - $this->locatedIds[$id] = true; - } - $this->addGetService = true; - - return \sprintf('new \%s($container->getService ??= $container->getService(...), [%s%s], [%s%s])', ServiceLocator::class, $serviceMap, $serviceMap ? "\n " : '', $serviceTypes, $serviceTypes ? "\n " : ''); - } - } finally { - [$this->definitionVariables, $this->referenceVariables] = $scope; - } - } elseif ($value instanceof Definition) { - if ($value->hasErrors() && $e = $value->getErrors()) { - return \sprintf('throw new RuntimeException(%s)', $this->export(reset($e))); - } - if ($this->definitionVariables?->offsetExists($value)) { - return $this->dumpValue($this->definitionVariables[$value], $interpolate); - } - if ($value->getMethodCalls()) { - throw new RuntimeException('Cannot dump definitions which have method calls.'); - } - if ($value->getProperties()) { - throw new RuntimeException('Cannot dump definitions which have properties.'); - } - if (null !== $value->getConfigurator()) { - throw new RuntimeException('Cannot dump definitions which have a configurator.'); - } - - return $this->addNewInstance($value); - } elseif ($value instanceof Variable) { - return '$'.$value; - } elseif ($value instanceof Reference) { - $id = (string) $value; - - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) { - return $this->dumpValue($this->referenceVariables[$id], $interpolate); - } - - return $this->getServiceCall($id, $value); - } elseif ($value instanceof Expression) { - return $this->getExpressionLanguage()->compile((string) $value, ['container' => 'container']); - } elseif ($value instanceof Parameter) { - return $this->dumpParameter($value); - } elseif (true === $interpolate && \is_string($value)) { - if (preg_match('/^%([^%]+)%$/', $value, $match)) { - // we do this to deal with non string values (Boolean, integer, ...) - // the preg_replace_callback converts them to strings - return $this->dumpParameter($match[1]); - } - - $replaceParameters = fn ($match) => "'.".$this->dumpParameter($match[2]).".'"; - - return str_replace('%%', '%', preg_replace_callback('/(?export($value))); - } elseif ($value instanceof \UnitEnum) { - return \sprintf('\%s::%s', $value::class, $value->name); - } elseif ($value instanceof AbstractArgument) { - throw new RuntimeException($value->getTextWithContext()); - } elseif (\is_object($value) || \is_resource($value)) { - throw new RuntimeException(\sprintf('Unable to dump a service container if a parameter is an object or a resource, got "%s".', get_debug_type($value))); - } - - return $this->export($value); - } - - /** - * Dumps a string to a literal (aka PHP Code) class value. - * - * @throws RuntimeException - */ - private function dumpLiteralClass(string $class): string - { - if (str_contains($class, '$')) { - return \sprintf('${($_ = %s) && false ?: "_"}', $class); - } - if (!str_starts_with($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) { - throw new RuntimeException(\sprintf('Cannot dump definition because of invalid class name (%s).', $class ?: 'n/a')); - } - - $class = substr(str_replace('\\\\', '\\', $class), 1, -1); - - return str_starts_with($class, '\\') ? $class : '\\'.$class; - } - - private function dumpParameter(string $name): string - { - if (!$this->container->hasParameter($name) || ($this->dynamicParameters[$name] ?? false)) { - return \sprintf('$container->getParameter(%s)', $this->doExport($name)); - } - - $value = $this->container->getParameter($name); - $dumpedValue = $this->dumpValue($value, false); - - if (!$value || !\is_array($value)) { - return $dumpedValue; - } - - return \sprintf('$container->parameters[%s]', $this->doExport($name)); - } - - private function getServiceCall(string $id, ?Reference $reference = null): string - { - while ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - if ('service_container' === $id) { - return '$container'; - } - - if ($this->container->hasDefinition($id) && $definition = $this->container->getDefinition($id)) { - if ($definition->isSynthetic()) { - $code = \sprintf('$container->get(%s%s)', $this->doExport($id), null !== $reference ? ', '.$reference->getInvalidBehavior() : ''); - } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) { - $code = 'null'; - if (!$definition->isShared()) { - return $code; - } - } elseif ($this->isTrivialInstance($definition)) { - if ($definition->hasErrors() && $e = $definition->getErrors()) { - return \sprintf('throw new RuntimeException(%s)', $this->export(reset($e))); - } - $code = $this->addNewInstance($definition, '', $id); - if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) { - return \sprintf('($container->%s[%s] ??= %s)', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code); - } - $code = "($code)"; - } else { - $code = $this->asFiles && !$this->inlineFactories && !$this->isHotPath($definition) ? "\$container->load('%s')" : 'self::%s($container)'; - $code = \sprintf($code, $this->generateMethodName($id)); - - if (!$definition->isShared()) { - $factory = \sprintf('$container->factories%s[%s]', $definition->isPublic() ? '' : "['service_container']", $this->doExport($id)); - $code = \sprintf('(isset(%s) ? %1$s($container) : %s)', $factory, $code); - } - } - if ($definition->isShared() && !isset($this->singleUsePrivateIds[$id])) { - $code = \sprintf('($container->%s[%s] ?? %s)', $definition->isPublic() ? 'services' : 'privates', $this->doExport($id), $code); - } - - return $code; - } - if (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) { - return 'null'; - } - if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $reference->getInvalidBehavior()) { - $code = \sprintf('$container->get(%s, ContainerInterface::NULL_ON_INVALID_REFERENCE)', $this->doExport($id)); - } else { - $code = \sprintf('$container->get(%s)', $this->doExport($id)); - } - - return \sprintf('($container->services[%s] ?? %s)', $this->doExport($id), $code); - } - - /** - * Initializes the method names map to avoid conflicts with the Container methods. - */ - private function initializeMethodNamesMap(string $class): void - { - $this->serviceIdToMethodNameMap = []; - $this->usedMethodNames = []; - - if ($reflectionClass = $this->container->getReflectionClass($class)) { - foreach ($reflectionClass->getMethods() as $method) { - $this->usedMethodNames[strtolower($method->getName())] = true; - } - } - } - - /** - * @throws InvalidArgumentException - */ - private function generateMethodName(string $id): string - { - if (isset($this->serviceIdToMethodNameMap[$id])) { - return $this->serviceIdToMethodNameMap[$id]; - } - - $i = strrpos($id, '\\'); - $name = Container::camelize(false !== $i && isset($id[1 + $i]) ? substr($id, 1 + $i) : $id); - $name = preg_replace('/[^a-zA-Z0-9_\x7f-\xff]/', '', $name); - $methodName = 'get'.$name.'Service'; - $suffix = 1; - - while (isset($this->usedMethodNames[strtolower($methodName)])) { - ++$suffix; - $methodName = 'get'.$name.$suffix.'Service'; - } - - $this->serviceIdToMethodNameMap[$id] = $methodName; - $this->usedMethodNames[strtolower($methodName)] = true; - - return $methodName; - } - - private function getNextVariableName(): string - { - $firstChars = self::FIRST_CHARS; - $firstCharsLength = \strlen($firstChars); - $nonFirstChars = self::NON_FIRST_CHARS; - $nonFirstCharsLength = \strlen($nonFirstChars); - - while (true) { - $name = ''; - $i = $this->variableCount; - $name .= $firstChars[$i % $firstCharsLength]; - $i = (int) ($i / $firstCharsLength); - - while ($i > 0) { - --$i; - $name .= $nonFirstChars[$i % $nonFirstCharsLength]; - $i = (int) ($i / $nonFirstCharsLength); - } - - ++$this->variableCount; - - // check that the name is not reserved - if (\in_array($name, $this->reservedVariables, true)) { - continue; - } - - return $name; - } - } - - private function getExpressionLanguage(): ExpressionLanguage - { - if (!isset($this->expressionLanguage)) { - if (!class_exists(\Symfony\Component\ExpressionLanguage\ExpressionLanguage::class)) { - throw new LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'); - } - $providers = $this->container->getExpressionLanguageProviders(); - $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) { - $id = '""' === substr_replace($arg, '', 1, -1) ? stripcslashes(substr($arg, 1, -1)) : null; - - if (null !== $id && ($this->container->hasAlias($id) || $this->container->hasDefinition($id))) { - return $this->getServiceCall($id); - } - - return \sprintf('$container->get(%s)', $arg); - }); - - if ($this->container->isTrackingResources()) { - foreach ($providers as $provider) { - $this->container->addObjectResource($provider); - } - } - } - - return $this->expressionLanguage; - } - - private function isHotPath(Definition $definition): bool - { - return $this->hotPathTag && $definition->hasTag($this->hotPathTag) && !$definition->isDeprecated(); - } - - private function isSingleUsePrivateNode(ServiceReferenceGraphNode $node): bool - { - if ($node->getValue()->isPublic()) { - return false; - } - $ids = []; - foreach ($node->getInEdges() as $edge) { - if (!$value = $edge->getSourceNode()->getValue()) { - continue; - } - if ($edge->isLazy() || !$value instanceof Definition || !$value->isShared()) { - return false; - } - - // When the source node is a proxy or ghost, it will construct its references only when the node itself is initialized. - // Since the node can be cloned before being fully initialized, we do not know how often its references are used. - if ($this->getProxyDumper()->isProxyCandidate($value)) { - return false; - } - $ids[$edge->getSourceNode()->getId()] = true; - } - - return 1 === \count($ids); - } - - private function export(mixed $value): mixed - { - if (null !== $this->targetDirRegex && \is_string($value) && preg_match($this->targetDirRegex, $value, $matches, \PREG_OFFSET_CAPTURE)) { - $suffix = $matches[0][1] + \strlen($matches[0][0]); - $matches[0][1] += \strlen($matches[1][0]); - $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : ''; - - if ('\\' === \DIRECTORY_SEPARATOR && isset($value[$suffix])) { - $cookie = '\\'.random_int(100000, \PHP_INT_MAX); - $suffix = '.'.$this->doExport(str_replace('\\', $cookie, substr($value, $suffix)), true); - $suffix = str_replace('\\'.$cookie, "'.\\DIRECTORY_SEPARATOR.'", $suffix); - } else { - $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : ''; - } - - $dirname = $this->asFiles ? '$container->containerDir' : '__DIR__'; - $offset = 2 + $this->targetDirMaxMatches - \count($matches); - - if (0 < $offset) { - $dirname = \sprintf('\dirname(__DIR__, %d)', $offset + (int) $this->asFiles); - } elseif ($this->asFiles) { - $dirname = "\$container->targetDir.''"; // empty string concatenation on purpose - } - - if ($prefix || $suffix) { - return \sprintf('(%s%s%s)', $prefix, $dirname, $suffix); - } - - return $dirname; - } - - return $this->doExport($value, true); - } - - private function doExport(mixed $value, bool $resolveEnv = false): mixed - { - $shouldCacheValue = $resolveEnv && \is_string($value); - if ($shouldCacheValue && isset($this->exportedVariables[$value])) { - return $this->exportedVariables[$value]; - } - if (\is_string($value) && str_contains($value, "\n")) { - $cleanParts = explode("\n", $value); - $cleanParts = array_map(fn ($part) => var_export($part, true), $cleanParts); - $export = implode('."\n".', $cleanParts); - } else { - $export = var_export($value, true); - } - - if ($resolveEnv && "'" === $export[0] && $export !== $resolvedExport = $this->container->resolveEnvPlaceholders($export, "'.\$container->getEnv('string:%s').'")) { - $export = $resolvedExport; - if (str_ends_with($export, ".''")) { - $export = substr($export, 0, -3); - if ("'" === $export[1]) { - $export = substr_replace($export, '', 23, 7); - } - } - if ("'" === $export[1]) { - $export = substr($export, 3); - } - } - - if ($shouldCacheValue) { - $this->exportedVariables[$value] = $export; - } - - return $export; - } - - private function getAutoloadFile(): ?string - { - $file = null; - - foreach (spl_autoload_functions() as $autoloader) { - if (!\is_array($autoloader)) { - continue; - } - - if ($autoloader[0] instanceof DebugClassLoader) { - $autoloader = $autoloader[0]->getClassLoader(); - } - - if (!\is_array($autoloader) || !$autoloader[0] instanceof ClassLoader || !$autoloader[0]->findFile(__CLASS__)) { - continue; - } - - foreach (get_declared_classes() as $class) { - if (str_starts_with($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) { - $file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php'; - - if (null !== $this->targetDirRegex && preg_match($this->targetDirRegex.'A', $file)) { - return $file; - } - } - } - } - - return $file; - } - - private function getClasses(Definition $definition, string $id): array - { - $classes = []; - - while ($definition instanceof Definition) { - foreach ($definition->getTag($this->preloadTags[0]) as $tag) { - if (!isset($tag['class'])) { - throw new InvalidArgumentException(\sprintf('Missing attribute "class" on tag "%s" for service "%s".', $this->preloadTags[0], $id)); - } - - $classes[] = trim($tag['class'], '\\'); - } - - if ($class = $definition->getClass()) { - $classes[] = trim($class, '\\'); - } - $factory = $definition->getFactory(); - - if (\is_string($factory) && !str_starts_with($factory, '@=') && str_contains($factory, '::')) { - $factory = explode('::', $factory); - } - - if (!\is_array($factory)) { - $definition = $factory; - continue; - } - - $definition = $factory[0] ?? null; - - if (\is_string($definition)) { - $classes[] = trim($factory[0], '\\'); - } - } - - return $classes; - } - - private function isProxyCandidate(Definition $definition, ?bool &$asGhostObject, string $id): ?Definition - { - $asGhostObject = false; - - if (['Closure', 'fromCallable'] === $definition->getFactory()) { - return null; - } - - if (!$definition->isLazy() || !$this->hasProxyDumper) { - return null; - } - - return $this->getProxyDumper()->isProxyCandidate($definition, $asGhostObject, $id) ? $definition : null; - } - - /** - * Removes comments from a PHP source string. - * - * We don't use the PHP php_strip_whitespace() function - * as we want the content to be readable and well-formatted. - */ - private static function stripComments(string $source): string - { - if (!\function_exists('token_get_all')) { - return $source; - } - - $rawChunk = ''; - $output = ''; - $tokens = token_get_all($source); - $ignoreSpace = false; - for ($i = 0; isset($tokens[$i]); ++$i) { - $token = $tokens[$i]; - if (!isset($token[1]) || 'b"' === $token) { - $rawChunk .= $token; - } elseif (\T_START_HEREDOC === $token[0]) { - $output .= $rawChunk.$token[1]; - do { - $token = $tokens[++$i]; - $output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token; - } while (\T_END_HEREDOC !== $token[0]); - $rawChunk = ''; - } elseif (\T_WHITESPACE === $token[0]) { - if ($ignoreSpace) { - $ignoreSpace = false; - - continue; - } - - // replace multiple new lines with a single newline - $rawChunk .= preg_replace(['/\n{2,}/S'], "\n", $token[1]); - } elseif (\in_array($token[0], [\T_COMMENT, \T_DOC_COMMENT])) { - if (!\in_array($rawChunk[\strlen($rawChunk) - 1], [' ', "\n", "\r", "\t"], true)) { - $rawChunk .= ' '; - } - $ignoreSpace = true; - } else { - $rawChunk .= $token[1]; - - // The PHP-open tag already has a new-line - if (\T_OPEN_TAG === $token[0]) { - $ignoreSpace = true; - } else { - $ignoreSpace = false; - } - } - } - - $output .= $rawChunk; - - unset($tokens, $rawChunk); - gc_mem_caches(); - - return $output; - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/Preloader.php b/vendor/symfony/dependency-injection/Dumper/Preloader.php deleted file mode 100644 index d4d4c9b5..00000000 --- a/vendor/symfony/dependency-injection/Dumper/Preloader.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -/** - * @author Nicolas Grekas - */ -final class Preloader -{ - public static function append(string $file, array $list): void - { - if (!file_exists($file)) { - throw new \LogicException(\sprintf('File "%s" does not exist.', $file)); - } - - $cacheDir = \dirname($file); - $classes = []; - - foreach ($list as $item) { - if (str_starts_with($item, $cacheDir)) { - file_put_contents($file, \sprintf("require_once __DIR__.%s;\n", var_export(strtr(substr($item, \strlen($cacheDir)), \DIRECTORY_SEPARATOR, '/'), true)), \FILE_APPEND); - continue; - } - - $classes[] = \sprintf("\$classes[] = %s;\n", var_export($item, true)); - } - - file_put_contents($file, \sprintf("\n\$classes = [];\n%s\$preloaded = Preloader::preload(\$classes, \$preloaded);\n", implode('', $classes)), \FILE_APPEND); - } - - public static function preload(array $classes, array $preloaded = []): array - { - set_error_handler(function ($t, $m, $f, $l) { - if (error_reporting() & $t) { - if (__FILE__ !== $f) { - throw new \ErrorException($m, 0, $t, $f, $l); - } - - throw new \ReflectionException($m); - } - }); - - $prev = []; - - try { - while ($prev !== $classes) { - $prev = $classes; - foreach ($classes as $c) { - if (!isset($preloaded[$c])) { - self::doPreload($c, $preloaded); - } - } - $classes = array_merge(get_declared_classes(), get_declared_interfaces(), get_declared_traits()); - } - } finally { - restore_error_handler(); - } - - return $preloaded; - } - - private static function doPreload(string $class, array &$preloaded): void - { - if (isset($preloaded[$class]) || \in_array($class, ['self', 'static', 'parent'], true)) { - return; - } - - $preloaded[$class] = true; - - try { - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - return; - } - - $r = new \ReflectionClass($class); - - if ($r->isInternal()) { - return; - } - - $r->getConstants(); - $r->getDefaultProperties(); - - foreach ($r->getProperties(\ReflectionProperty::IS_PUBLIC) as $p) { - self::preloadType($p->getType(), $preloaded); - } - - foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { - foreach ($m->getParameters() as $p) { - if ($p->isDefaultValueAvailable() && $p->isDefaultValueConstant()) { - $c = $p->getDefaultValueConstantName(); - - if ($i = strpos($c, '::')) { - self::doPreload(substr($c, 0, $i), $preloaded); - } - } - - self::preloadType($p->getType(), $preloaded); - } - - self::preloadType($m->getReturnType(), $preloaded); - } - } catch (\Throwable) { - // ignore missing classes - } - } - - private static function preloadType(?\ReflectionType $t, array &$preloaded): void - { - if (!$t) { - return; - } - - foreach (($t instanceof \ReflectionUnionType || $t instanceof \ReflectionIntersectionType) ? $t->getTypes() : [$t] as $t) { - if (!$t->isBuiltin()) { - self::doPreload($t instanceof \ReflectionNamedType ? $t->getName() : $t, $preloaded); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php deleted file mode 100644 index 7c38455b..00000000 --- a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php +++ /dev/null @@ -1,432 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * XmlDumper dumps a service container as an XML string. - * - * @author Fabien Potencier - * @author Martin Hasoň - */ -class XmlDumper extends Dumper -{ - private \DOMDocument $document; - - /** - * Dumps the service container as an XML string. - */ - public function dump(array $options = []): string - { - $this->document = new \DOMDocument('1.0', 'utf-8'); - $this->document->formatOutput = true; - - $container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container'); - $container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - $container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd'); - - $this->addParameters($container); - $this->addServices($container); - - $this->document->appendChild($container); - $xml = $this->document->saveXML(); - unset($this->document); - - return $this->container->resolveEnvPlaceholders($xml); - } - - private function addParameters(\DOMElement $parent): void - { - $data = $this->container->getParameterBag()->all(); - if (!$data) { - return; - } - - if ($this->container->isCompiled()) { - $data = $this->escape($data); - } - - $parameters = $this->document->createElement('parameters'); - $parent->appendChild($parameters); - $this->convertParameters($data, 'parameter', $parameters); - } - - private function addMethodCalls(array $methodcalls, \DOMElement $parent): void - { - foreach ($methodcalls as $methodcall) { - $call = $this->document->createElement('call'); - $call->setAttribute('method', $methodcall[0]); - if (\count($methodcall[1])) { - $this->convertParameters($methodcall[1], 'argument', $call); - } - if ($methodcall[2] ?? false) { - $call->setAttribute('returns-clone', 'true'); - } - $parent->appendChild($call); - } - } - - private function addService(Definition $definition, ?string $id, \DOMElement $parent): void - { - $service = $this->document->createElement('service'); - if (null !== $id) { - $service->setAttribute('id', $id); - } - if ($class = $definition->getClass()) { - if (str_starts_with($class, '\\')) { - $class = substr($class, 1); - } - - $service->setAttribute('class', $class); - } - if (!$definition->isShared()) { - $service->setAttribute('shared', 'false'); - } - if ($definition->isPublic()) { - $service->setAttribute('public', 'true'); - } - if ($definition->isSynthetic()) { - $service->setAttribute('synthetic', 'true'); - } - if ($definition->isLazy()) { - $service->setAttribute('lazy', 'true'); - } - if (null !== $decoratedService = $definition->getDecoratedService()) { - [$decorated, $renamedId, $priority] = $decoratedService; - $service->setAttribute('decorates', $decorated); - - $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE], true)) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore'; - $service->setAttribute('decoration-on-invalid', $invalidBehavior); - } - if (null !== $renamedId) { - $service->setAttribute('decoration-inner-name', $renamedId); - } - if (0 !== $priority) { - $service->setAttribute('decoration-priority', $priority); - } - } - - $tags = $definition->getTags(); - $tags['container.error'] = array_map(fn ($e) => ['message' => $e], $definition->getErrors()); - foreach ($tags as $name => $tags) { - foreach ($tags as $attributes) { - $tag = $this->document->createElement('tag'); - - // Check if we have recursive attributes - if (array_filter($attributes, \is_array(...))) { - $tag->setAttribute('name', $name); - $this->addTagRecursiveAttributes($tag, $attributes); - } else { - if (!\array_key_exists('name', $attributes)) { - $tag->setAttribute('name', $name); - } else { - $tag->appendChild($this->document->createTextNode($name)); - } - foreach ($attributes as $key => $value) { - $tag->setAttribute($key, $value ?? ''); - } - } - $service->appendChild($tag); - } - } - - if ($definition->getFile()) { - $file = $this->document->createElement('file'); - $file->appendChild($this->document->createTextNode($definition->getFile())); - $service->appendChild($file); - } - - if ($parameters = $definition->getArguments()) { - $this->convertParameters($parameters, 'argument', $service); - } - - if ($parameters = $definition->getProperties()) { - $this->convertParameters($parameters, 'property', $service, 'name'); - } - - $this->addMethodCalls($definition->getMethodCalls(), $service); - - if ($callable = $definition->getFactory()) { - if (\is_array($callable) && ['Closure', 'fromCallable'] !== $callable && $definition->getClass() === $callable[0]) { - $service->setAttribute('constructor', $callable[1]); - } else { - $factory = $this->document->createElement('factory'); - - if (\is_array($callable) && $callable[0] instanceof Definition) { - $this->addService($callable[0], null, $factory); - $factory->setAttribute('method', $callable[1]); - } elseif (\is_array($callable)) { - if (null !== $callable[0]) { - $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); - } - $factory->setAttribute('method', $callable[1]); - } else { - $factory->setAttribute('function', $callable); - } - $service->appendChild($factory); - } - } - - if ($definition->isDeprecated()) { - $deprecation = $definition->getDeprecation('%service_id%'); - $deprecated = $this->document->createElement('deprecated'); - $deprecated->appendChild($this->document->createTextNode($definition->getDeprecation('%service_id%')['message'])); - $deprecated->setAttribute('package', $deprecation['package']); - $deprecated->setAttribute('version', $deprecation['version']); - - $service->appendChild($deprecated); - } - - if ($definition->isAutowired()) { - $service->setAttribute('autowire', 'true'); - } - - if ($definition->isAutoconfigured()) { - $service->setAttribute('autoconfigure', 'true'); - } - - if ($definition->isAbstract()) { - $service->setAttribute('abstract', 'true'); - } - - if ($callable = $definition->getConfigurator()) { - $configurator = $this->document->createElement('configurator'); - - if (\is_array($callable) && $callable[0] instanceof Definition) { - $this->addService($callable[0], null, $configurator); - $configurator->setAttribute('method', $callable[1]); - } elseif (\is_array($callable)) { - $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); - $configurator->setAttribute('method', $callable[1]); - } else { - $configurator->setAttribute('function', $callable); - } - $service->appendChild($configurator); - } - - $parent->appendChild($service); - } - - private function addServiceAlias(string $alias, Alias $id, \DOMElement $parent): void - { - $service = $this->document->createElement('service'); - $service->setAttribute('id', $alias); - $service->setAttribute('alias', $id); - if ($id->isPublic()) { - $service->setAttribute('public', 'true'); - } - - if ($id->isDeprecated()) { - $deprecation = $id->getDeprecation('%alias_id%'); - $deprecated = $this->document->createElement('deprecated'); - $deprecated->appendChild($this->document->createTextNode($deprecation['message'])); - $deprecated->setAttribute('package', $deprecation['package']); - $deprecated->setAttribute('version', $deprecation['version']); - - $service->appendChild($deprecated); - } - - $parent->appendChild($service); - } - - private function addServices(\DOMElement $parent): void - { - $definitions = $this->container->getDefinitions(); - if (!$definitions) { - return; - } - - $services = $this->document->createElement('services'); - foreach ($definitions as $id => $definition) { - $this->addService($definition, $id, $services); - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - while (isset($aliases[(string) $id])) { - $id = $aliases[(string) $id]; - } - $this->addServiceAlias($alias, $id, $services); - } - $parent->appendChild($services); - } - - private function addTagRecursiveAttributes(\DOMElement $parent, array $attributes): void - { - foreach ($attributes as $name => $value) { - $attribute = $this->document->createElement('attribute'); - $attribute->setAttribute('name', $name); - - if (\is_array($value)) { - $this->addTagRecursiveAttributes($attribute, $value); - } else { - $attribute->appendChild($this->document->createTextNode($value)); - } - - $parent->appendChild($attribute); - } - } - - private function convertParameters(array $parameters, string $type, \DOMElement $parent, string $keyAttribute = 'key'): void - { - $withKeys = !array_is_list($parameters); - foreach ($parameters as $key => $value) { - $element = $this->document->createElement($type); - if ($withKeys) { - $element->setAttribute($keyAttribute, $key); - } - - if (\is_array($tag = $value)) { - $element->setAttribute('type', 'collection'); - $this->convertParameters($value, $type, $element, 'key'); - } elseif ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) { - $element->setAttribute('type', $value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator'); - $element->setAttribute('tag', $tag->getTag()); - - if (null !== $tag->getIndexAttribute()) { - $element->setAttribute('index-by', $tag->getIndexAttribute()); - - if (null !== $tag->getDefaultIndexMethod()) { - $element->setAttribute('default-index-method', $tag->getDefaultIndexMethod()); - } - if (null !== $tag->getDefaultPriorityMethod()) { - $element->setAttribute('default-priority-method', $tag->getDefaultPriorityMethod()); - } - } - if ($excludes = $tag->getExclude()) { - if (1 === \count($excludes)) { - $element->setAttribute('exclude', $excludes[0]); - } else { - foreach ($excludes as $exclude) { - $element->appendChild($this->document->createElement('exclude', $exclude)); - } - } - } - if (!$tag->excludeSelf()) { - $element->setAttribute('exclude-self', 'false'); - } - } elseif ($value instanceof IteratorArgument) { - $element->setAttribute('type', 'iterator'); - $this->convertParameters($value->getValues(), $type, $element, 'key'); - } elseif ($value instanceof ServiceLocatorArgument) { - $element->setAttribute('type', 'service_locator'); - $this->convertParameters($value->getValues(), $type, $element, 'key'); - } elseif ($value instanceof ServiceClosureArgument && !$value->getValues()[0] instanceof Reference) { - $element->setAttribute('type', 'service_closure'); - $this->convertParameters($value->getValues(), $type, $element, 'key'); - } elseif ($value instanceof Reference || $value instanceof ServiceClosureArgument) { - $element->setAttribute('type', 'service'); - if ($value instanceof ServiceClosureArgument) { - $element->setAttribute('type', 'service_closure'); - $value = $value->getValues()[0]; - } - $element->setAttribute('id', (string) $value); - $behavior = $value->getInvalidBehavior(); - if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'null'); - } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'ignore'); - } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) { - $element->setAttribute('on-invalid', 'ignore_uninitialized'); - } - } elseif ($value instanceof Definition) { - $element->setAttribute('type', 'service'); - $this->addService($value, null, $element); - } elseif ($value instanceof Expression) { - $element->setAttribute('type', 'expression'); - $text = $this->document->createTextNode(self::phpToXml((string) $value)); - $element->appendChild($text); - } elseif (\is_string($value) && !preg_match('/^[^\x00-\x08\x0B\x0C\x0E-\x1F\x7F]*+$/u', $value)) { - $element->setAttribute('type', 'binary'); - $text = $this->document->createTextNode(self::phpToXml(base64_encode($value))); - $element->appendChild($text); - } elseif ($value instanceof \UnitEnum) { - $element->setAttribute('type', 'constant'); - $element->appendChild($this->document->createTextNode(self::phpToXml($value))); - } elseif ($value instanceof AbstractArgument) { - $element->setAttribute('type', 'abstract'); - $text = $this->document->createTextNode(self::phpToXml($value->getText())); - $element->appendChild($text); - } else { - if (\in_array($value, ['null', 'true', 'false'], true)) { - $element->setAttribute('type', 'string'); - } - - if (\is_string($value) && (is_numeric($value) || preg_match('/^0b[01]*$/', $value) || preg_match('/^0x[0-9a-f]++$/i', $value))) { - $element->setAttribute('type', 'string'); - } - - $text = $this->document->createTextNode(self::phpToXml($value)); - $element->appendChild($text); - } - $parent->appendChild($element); - } - } - - /** - * Escapes arguments. - */ - private function escape(array $arguments): array - { - $args = []; - foreach ($arguments as $k => $v) { - if (\is_array($v)) { - $args[$k] = $this->escape($v); - } elseif (\is_string($v)) { - $args[$k] = str_replace('%', '%%', $v); - } else { - $args[$k] = $v; - } - } - - return $args; - } - - /** - * Converts php types to xml types. - * - * @throws RuntimeException When trying to dump object or resource - */ - public static function phpToXml(mixed $value): string - { - switch (true) { - case null === $value: - return 'null'; - case true === $value: - return 'true'; - case false === $value: - return 'false'; - case $value instanceof Parameter: - return '%'.$value.'%'; - case $value instanceof \UnitEnum: - return \sprintf('%s::%s', $value::class, $value->name); - case \is_object($value) || \is_resource($value): - throw new RuntimeException(\sprintf('Unable to dump a service container if a parameter is an object or a resource, got "%s".', get_debug_type($value))); - default: - return (string) $value; - } - } -} diff --git a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php deleted file mode 100644 index d79e7b90..00000000 --- a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php +++ /dev/null @@ -1,380 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Dumper; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Yaml\Dumper as YmlDumper; -use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Tag\TaggedValue; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlDumper dumps a service container as a YAML string. - * - * @author Fabien Potencier - */ -class YamlDumper extends Dumper -{ - private YmlDumper $dumper; - - /** - * Dumps the service container as an YAML string. - */ - public function dump(array $options = []): string - { - if (!class_exists(YmlDumper::class)) { - throw new LogicException('Unable to dump the container as the Symfony Yaml Component is not installed. Try running "composer require symfony/yaml".'); - } - - $this->dumper ??= new YmlDumper(); - - return $this->addParameters()."\n".$this->addServices(); - } - - private function addService(string $id, Definition $definition): string - { - $code = " {$this->dumper->dump($id)}:\n"; - if ($class = $definition->getClass()) { - if (str_starts_with($class, '\\')) { - $class = substr($class, 1); - } - - $code .= \sprintf(" class: %s\n", $this->dumper->dump($this->container->resolveEnvPlaceholders($class))); - } - - if (!$definition->isPrivate()) { - $code .= \sprintf(" public: %s\n", $definition->isPublic() ? 'true' : 'false'); - } - - $tagsCode = ''; - $tags = $definition->getTags(); - $tags['container.error'] = array_map(fn ($e) => ['message' => $e], $definition->getErrors()); - foreach ($tags as $name => $tags) { - foreach ($tags as $attributes) { - $att = []; - foreach ($attributes as $key => $value) { - $att[] = \sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value)); - } - $att = $att ? ': { '.implode(', ', $att).' }' : ''; - - $tagsCode .= \sprintf(" - %s%s\n", $this->dumper->dump($name), $att); - } - } - if ($tagsCode) { - $code .= " tags:\n".$tagsCode; - } - - if ($definition->getFile()) { - $code .= \sprintf(" file: %s\n", $this->dumper->dump($this->container->resolveEnvPlaceholders($definition->getFile()))); - } - - if ($definition->isSynthetic()) { - $code .= " synthetic: true\n"; - } - - if ($definition->isDeprecated()) { - $code .= " deprecated:\n"; - foreach ($definition->getDeprecation('%service_id%') as $key => $value) { - if ('' !== $value) { - $code .= \sprintf(" %s: %s\n", $key, $this->dumper->dump($value)); - } - } - } - - if ($definition->isAutowired()) { - $code .= " autowire: true\n"; - } - - if ($definition->isAutoconfigured()) { - $code .= " autoconfigure: true\n"; - } - - if ($definition->isAbstract()) { - $code .= " abstract: true\n"; - } - - if ($definition->isLazy()) { - $code .= " lazy: true\n"; - } - - if ($definition->getArguments()) { - $code .= \sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0)); - } - - if ($definition->getProperties()) { - $code .= \sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0)); - } - - if ($definition->getMethodCalls()) { - $code .= \sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12)); - } - - if (!$definition->isShared()) { - $code .= " shared: false\n"; - } - - if (null !== $decoratedService = $definition->getDecoratedService()) { - [$decorated, $renamedId, $priority] = $decoratedService; - $code .= \sprintf(" decorates: %s\n", $decorated); - if (null !== $renamedId) { - $code .= \sprintf(" decoration_inner_name: %s\n", $renamedId); - } - if (0 !== $priority) { - $code .= \sprintf(" decoration_priority: %s\n", $priority); - } - - $decorationOnInvalid = $decoratedService[3] ?? ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if (\in_array($decorationOnInvalid, [ContainerInterface::IGNORE_ON_INVALID_REFERENCE, ContainerInterface::NULL_ON_INVALID_REFERENCE])) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE === $decorationOnInvalid ? 'null' : 'ignore'; - $code .= \sprintf(" decoration_on_invalid: %s\n", $invalidBehavior); - } - } - - if ($callable = $definition->getFactory()) { - if (\is_array($callable) && ['Closure', 'fromCallable'] !== $callable && $definition->getClass() === $callable[0]) { - $code .= \sprintf(" constructor: %s\n", $callable[1]); - } else { - $code .= \sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); - } - } - - if ($callable = $definition->getConfigurator()) { - $code .= \sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0)); - } - - return $code; - } - - private function addServiceAlias(string $alias, Alias $id): string - { - $deprecated = ''; - - if ($id->isDeprecated()) { - $deprecated = " deprecated:\n"; - - foreach ($id->getDeprecation('%alias_id%') as $key => $value) { - if ('' !== $value) { - $deprecated .= \sprintf(" %s: %s\n", $key, $value); - } - } - } - - if (!$id->isDeprecated() && $id->isPrivate()) { - return \sprintf(" %s: '@%s'\n", $alias, $id); - } - - if ($id->isPublic()) { - $deprecated = " public: true\n".$deprecated; - } - - return \sprintf(" %s:\n alias: %s\n%s", $alias, $id, $deprecated); - } - - private function addServices(): string - { - if (!$this->container->getDefinitions()) { - return ''; - } - - $code = "services:\n"; - foreach ($this->container->getDefinitions() as $id => $definition) { - $code .= $this->addService($id, $definition); - } - - $aliases = $this->container->getAliases(); - foreach ($aliases as $alias => $id) { - while (isset($aliases[(string) $id])) { - $id = $aliases[(string) $id]; - } - $code .= $this->addServiceAlias($alias, $id); - } - - return $code; - } - - private function addParameters(): string - { - if (!$this->container->getParameterBag()->all()) { - return ''; - } - - $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isCompiled()); - - return $this->dumper->dump(['parameters' => $parameters], 2); - } - - /** - * Dumps callable to YAML format. - */ - private function dumpCallable(mixed $callable): mixed - { - if (\is_array($callable)) { - if ($callable[0] instanceof Reference) { - $callable = [$this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]]; - } else { - $callable = [$callable[0], $callable[1]]; - } - } - - return $this->container->resolveEnvPlaceholders($callable); - } - - /** - * Dumps the value to YAML format. - * - * @throws RuntimeException When trying to dump object or resource - */ - private function dumpValue(mixed $value): mixed - { - if ($value instanceof ServiceClosureArgument) { - $value = $value->getValues()[0]; - - return new TaggedValue('service_closure', $this->dumpValue($value)); - } - if ($value instanceof ArgumentInterface) { - $tag = $value; - - if ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) { - if (null === $tag->getIndexAttribute()) { - $content = $tag->getTag(); - } else { - $content = [ - 'tag' => $tag->getTag(), - 'index_by' => $tag->getIndexAttribute(), - ]; - - if (null !== $tag->getDefaultIndexMethod()) { - $content['default_index_method'] = $tag->getDefaultIndexMethod(); - } - if (null !== $tag->getDefaultPriorityMethod()) { - $content['default_priority_method'] = $tag->getDefaultPriorityMethod(); - } - } - if ($excludes = $tag->getExclude()) { - if (!\is_array($content)) { - $content = ['tag' => $content]; - } - $content['exclude'] = 1 === \count($excludes) ? $excludes[0] : $excludes; - } - if (!$tag->excludeSelf()) { - $content['exclude_self'] = false; - } - - return new TaggedValue($value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator', $content); - } - - if ($value instanceof IteratorArgument) { - $tag = 'iterator'; - } elseif ($value instanceof ServiceLocatorArgument) { - $tag = 'service_locator'; - } else { - throw new RuntimeException(\sprintf('Unspecified Yaml tag for type "%s".', get_debug_type($value))); - } - - return new TaggedValue($tag, $this->dumpValue($value->getValues())); - } - - if (\is_array($value)) { - $code = []; - foreach ($value as $k => $v) { - $code[$this->container->resolveEnvPlaceholders($k)] = $this->dumpValue($v); - } - - return $code; - } elseif ($value instanceof Reference) { - return $this->getServiceCall((string) $value, $value); - } elseif ($value instanceof Parameter) { - return $this->getParameterCall((string) $value); - } elseif ($value instanceof Expression) { - return $this->getExpressionCall((string) $value); - } elseif ($value instanceof Definition) { - return new TaggedValue('service', (new Parser())->parse("_:\n".$this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']); - } elseif ($value instanceof \UnitEnum) { - return new TaggedValue('php/enum', \sprintf('%s::%s', $value::class, $value->name)); - } elseif ($value instanceof AbstractArgument) { - return new TaggedValue('abstract', $value->getText()); - } elseif (\is_object($value) || \is_resource($value)) { - throw new RuntimeException(\sprintf('Unable to dump a service container if a parameter is an object or a resource, got "%s".', get_debug_type($value))); - } - - return $this->container->resolveEnvPlaceholders($value); - } - - private function getServiceCall(string $id, ?Reference $reference = null): string - { - if (null !== $reference) { - switch ($reference->getInvalidBehavior()) { - case ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: break; - case ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE: break; - case ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE: return \sprintf('@!%s', $id); - default: return \sprintf('@?%s', $id); - } - } - - return \sprintf('@%s', $id); - } - - private function getParameterCall(string $id): string - { - return \sprintf('%%%s%%', $id); - } - - private function getExpressionCall(string $expression): string - { - return \sprintf('@=%s', $expression); - } - - private function prepareParameters(array $parameters, bool $escape = true): array - { - $filtered = []; - foreach ($parameters as $key => $value) { - if (\is_array($value)) { - $value = $this->prepareParameters($value, $escape); - } elseif ($value instanceof Reference || \is_string($value) && str_starts_with($value, '@')) { - $value = '@'.$value; - } - - $filtered[$key] = $value; - } - - return $escape ? $this->container->resolveEnvPlaceholders($this->escape($filtered)) : $filtered; - } - - private function escape(array $arguments): array - { - $args = []; - foreach ($arguments as $k => $v) { - if (\is_array($v)) { - $args[$k] = $this->escape($v); - } elseif (\is_string($v)) { - $args[$k] = str_replace('%', '%%', $v); - } else { - $args[$k] = $v; - } - } - - return $args; - } -} diff --git a/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php b/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php deleted file mode 100644 index 803156be..00000000 --- a/vendor/symfony/dependency-injection/EnvVarLoaderInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * EnvVarLoaderInterface objects return key/value pairs that are added to the list of available env vars. - * - * @author Nicolas Grekas - */ -interface EnvVarLoaderInterface -{ - /** - * @return array Key/value pairs that can be accessed using the regular "%env()%" syntax - */ - public function loadEnvVars(): array; -} diff --git a/vendor/symfony/dependency-injection/EnvVarProcessor.php b/vendor/symfony/dependency-injection/EnvVarProcessor.php deleted file mode 100644 index 957dd5c5..00000000 --- a/vendor/symfony/dependency-injection/EnvVarProcessor.php +++ /dev/null @@ -1,388 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Nicolas Grekas - */ -class EnvVarProcessor implements EnvVarProcessorInterface, ResetInterface -{ - /** @var \Traversable */ - private \Traversable $loaders; - /** @var \Traversable */ - private \Traversable $originalLoaders; - private array $loadedVars = []; - - /** - * @param \Traversable|null $loaders - */ - public function __construct( - private ContainerInterface $container, - ?\Traversable $loaders = null, - ) { - $this->originalLoaders = $this->loaders = $loaders ?? new \ArrayIterator(); - } - - public static function getProvidedTypes(): array - { - return [ - 'base64' => 'string', - 'bool' => 'bool', - 'not' => 'bool', - 'const' => 'bool|int|float|string|array', - 'csv' => 'array', - 'file' => 'string', - 'float' => 'float', - 'int' => 'int', - 'json' => 'array', - 'key' => 'bool|int|float|string|array', - 'url' => 'array', - 'query_string' => 'array', - 'resolve' => 'string', - 'default' => 'bool|int|float|string|array', - 'string' => 'string', - 'trim' => 'string', - 'require' => 'bool|int|float|string|array', - 'enum' => \BackedEnum::class, - 'shuffle' => 'array', - 'defined' => 'bool', - 'urlencode' => 'string', - ]; - } - - public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed - { - $i = strpos($name, ':'); - - if ('key' === $prefix) { - if (false === $i) { - throw new RuntimeException(\sprintf('Invalid env "key:%s": a key specifier should be provided.', $name)); - } - - $next = substr($name, $i + 1); - $key = substr($name, 0, $i); - $array = $getEnv($next); - - if (!\is_array($array)) { - throw new RuntimeException(\sprintf('Resolved value of "%s" did not result in an array value.', $next)); - } - - if (!isset($array[$key]) && !\array_key_exists($key, $array)) { - throw new EnvNotFoundException(\sprintf('Key "%s" not found in %s (resolved from "%s").', $key, json_encode($array), $next)); - } - - return $array[$key]; - } - - if ('enum' === $prefix) { - if (false === $i) { - throw new RuntimeException(\sprintf('Invalid env "enum:%s": a "%s" class-string should be provided.', $name, \BackedEnum::class)); - } - - $next = substr($name, $i + 1); - $backedEnumClassName = substr($name, 0, $i); - $backedEnumValue = $getEnv($next); - - if (!\is_string($backedEnumValue) && !\is_int($backedEnumValue)) { - throw new RuntimeException(\sprintf('Resolved value of "%s" did not result in a string or int value.', $next)); - } - - if (!is_subclass_of($backedEnumClassName, \BackedEnum::class)) { - throw new RuntimeException(\sprintf('"%s" is not a "%s".', $backedEnumClassName, \BackedEnum::class)); - } - - return $backedEnumClassName::tryFrom($backedEnumValue) ?? throw new RuntimeException(\sprintf('Enum value "%s" is not backed by "%s".', $backedEnumValue, $backedEnumClassName)); - } - - if ('defined' === $prefix) { - try { - return '' !== ($getEnv($name) ?? ''); - } catch (EnvNotFoundException) { - return false; - } - } - - if ('default' === $prefix) { - if (false === $i) { - throw new RuntimeException(\sprintf('Invalid env "default:%s": a fallback parameter should be provided.', $name)); - } - - $next = substr($name, $i + 1); - $default = substr($name, 0, $i); - - if ('' !== $default && !$this->container->hasParameter($default)) { - throw new RuntimeException(\sprintf('Invalid env fallback in "default:%s": parameter "%s" not found.', $name, $default)); - } - - try { - $env = $getEnv($next); - - if ('' !== $env && null !== $env) { - return $env; - } - } catch (EnvNotFoundException) { - // no-op - } - - return '' === $default ? null : $this->container->getParameter($default); - } - - if ('file' === $prefix || 'require' === $prefix) { - if (!\is_scalar($file = $getEnv($name))) { - throw new RuntimeException(\sprintf('Invalid file name: env var "%s" is non-scalar.', $name)); - } - if (!is_file($file)) { - throw new EnvNotFoundException(\sprintf('File "%s" not found (resolved from "%s").', $file, $name)); - } - - if ('file' === $prefix) { - return file_get_contents($file); - } - - return require $file; - } - - $returnNull = false; - if ('' === $prefix) { - if ('' === $name) { - return null; - } - $returnNull = true; - $prefix = 'string'; - } - - if (false !== $i || 'string' !== $prefix) { - $env = $getEnv($name); - } elseif ('' === ($env = $_ENV[$name] ?? (str_starts_with($name, 'HTTP_') ? null : ($_SERVER[$name] ?? null))) - || (false !== $env && false === $env ??= getenv($name) ?? false) // null is a possible value because of thread safety issues - ) { - foreach ($this->loadedVars as $i => $vars) { - if (false === $env = $vars[$name] ?? $env) { - continue; - } - if ($env instanceof \Stringable) { - $this->loadedVars[$i][$name] = $env = (string) $env; - } - if ('' !== ($env ?? '')) { - break; - } - } - - if (false === $env || '' === $env) { - $loaders = $this->loaders; - $this->loaders = new \ArrayIterator(); - - try { - $i = 0; - $ended = true; - $count = $loaders instanceof \Countable ? $loaders->count() : 0; - foreach ($loaders as $loader) { - if (\count($this->loadedVars) > $i++) { - continue; - } - $this->loadedVars[] = $vars = $loader->loadEnvVars(); - if (false === $env = $vars[$name] ?? $env) { - continue; - } - if ($env instanceof \Stringable) { - $this->loadedVars[array_key_last($this->loadedVars)][$name] = $env = (string) $env; - } - if ('' !== ($env ?? '')) { - $ended = false; - break; - } - } - if ($ended || $count === $i) { - $loaders = $this->loaders; - } - } catch (ParameterCircularReferenceException) { - // skip loaders that need an env var that is not defined - } finally { - $this->loaders = $loaders; - } - } - - if (false === $env) { - if (!$this->container->hasParameter("env($name)")) { - throw new EnvNotFoundException(\sprintf('Environment variable not found: "%s".', $name)); - } - - $env = $this->container->getParameter("env($name)"); - } - } - - if (null === $env) { - if ($returnNull) { - return null; - } - - if (!isset(static::getProvidedTypes()[$prefix])) { - throw new RuntimeException(\sprintf('Unsupported env var prefix "%s".', $prefix)); - } - - if (!\in_array($prefix, ['string', 'bool', 'not', 'int', 'float'], true)) { - return null; - } - } - - if ('shuffle' === $prefix) { - \is_array($env) ? shuffle($env) : throw new RuntimeException(\sprintf('Env var "%s" cannot be shuffled, expected array, got "%s".', $name, get_debug_type($env))); - - return $env; - } - - if (null !== $env && !\is_scalar($env)) { - throw new RuntimeException(\sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix)); - } - - if ('string' === $prefix) { - return (string) $env; - } - - if (\in_array($prefix, ['bool', 'not'], true)) { - $env = (bool) (filter_var($env, \FILTER_VALIDATE_BOOL) ?: filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)); - - return 'not' === $prefix xor $env; - } - - if ('int' === $prefix) { - if (null !== $env && false === $env = filter_var($env, \FILTER_VALIDATE_INT) ?: filter_var($env, \FILTER_VALIDATE_FLOAT)) { - throw new RuntimeException(\sprintf('Non-numeric env var "%s" cannot be cast to int.', $name)); - } - - return (int) $env; - } - - if ('float' === $prefix) { - if (null !== $env && false === $env = filter_var($env, \FILTER_VALIDATE_FLOAT)) { - throw new RuntimeException(\sprintf('Non-numeric env var "%s" cannot be cast to float.', $name)); - } - - return (float) $env; - } - - if ('const' === $prefix) { - if (!\defined($env)) { - throw new RuntimeException(\sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env)); - } - - return \constant($env); - } - - if ('base64' === $prefix) { - return base64_decode(strtr($env, '-_', '+/')); - } - - if ('json' === $prefix) { - $env = json_decode($env, true); - - if (\JSON_ERROR_NONE !== json_last_error()) { - throw new RuntimeException(\sprintf('Invalid JSON in env var "%s": ', $name).json_last_error_msg()); - } - - if (null !== $env && !\is_array($env)) { - throw new RuntimeException(\sprintf('Invalid JSON env var "%s": array or null expected, "%s" given.', $name, get_debug_type($env))); - } - - return $env; - } - - if ('url' === $prefix) { - $params = parse_url($env); - - if (false === $params) { - throw new RuntimeException(\sprintf('Invalid URL in env var "%s".', $name)); - } - if (!isset($params['scheme'], $params['host'])) { - throw new RuntimeException(\sprintf('Invalid URL in env var "%s": scheme and host expected.', $name)); - } - if (('\\' !== \DIRECTORY_SEPARATOR || 'file' !== $params['scheme']) && false !== ($i = strpos($env, '\\')) && $i < strcspn($env, '?#')) { - throw new RuntimeException(\sprintf('Invalid URL in env var "%s": backslashes are not allowed.', $name)); - } - if (\ord($env[0]) <= 32 || \ord($env[-1]) <= 32 || \strlen($env) !== strcspn($env, "\r\n\t")) { - throw new RuntimeException(\sprintf('Invalid URL in env var "%s": leading/trailing ASCII control characters or whitespaces are not allowed.', $name)); - } - $params += [ - 'port' => null, - 'user' => null, - 'pass' => null, - 'path' => null, - 'query' => null, - 'fragment' => null, - ]; - - $params['user'] = null !== $params['user'] ? rawurldecode($params['user']) : null; - $params['pass'] = null !== $params['pass'] ? rawurldecode($params['pass']) : null; - - // remove the '/' separator - $params['path'] = '/' === ($params['path'] ?? '/') ? '' : substr($params['path'], 1); - - return $params; - } - - if ('query_string' === $prefix) { - $queryString = parse_url($env, \PHP_URL_QUERY) ?: $env; - parse_str($queryString, $result); - - return $result; - } - - if ('resolve' === $prefix) { - return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($name, $getEnv) { - if (!isset($match[1])) { - return '%'; - } - - if (str_starts_with($match[1], 'env(') && str_ends_with($match[1], ')') && 'env()' !== $match[1]) { - $value = $getEnv(substr($match[1], 4, -1)); - } else { - $value = $this->container->getParameter($match[1]); - } - - if (!\is_scalar($value)) { - throw new RuntimeException(\sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, get_debug_type($value))); - } - - return $value; - }, $env); - } - - if ('csv' === $prefix) { - return '' === $env ? [] : str_getcsv($env, ',', '"', ''); - } - - if ('trim' === $prefix) { - return trim($env); - } - - if ('urlencode' === $prefix) { - return rawurlencode($env); - } - - throw new RuntimeException(\sprintf('Unsupported env var prefix "%s" for env name "%s".', $prefix, $name)); - } - - public function reset(): void - { - $this->loadedVars = []; - $this->loaders = $this->originalLoaders; - - if ($this->container instanceof Container) { - $this->container->resetEnvCache(); - } - } -} diff --git a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php b/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php deleted file mode 100644 index 3cda6393..00000000 --- a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * The EnvVarProcessorInterface is implemented by objects that manage environment-like variables. - * - * @author Nicolas Grekas - */ -interface EnvVarProcessorInterface -{ - /** - * Returns the value of the given variable as managed by the current instance. - * - * @param string $prefix The namespace of the variable; when the empty string is passed, null values should be kept as is - * @param string $name The name of the variable within the namespace - * @param \Closure(string): mixed $getEnv A closure that allows fetching more env vars - * - * @throws RuntimeException on error - */ - public function getEnv(string $prefix, string $name, \Closure $getEnv): mixed; - - /** - * @return array The PHP-types managed by getEnv(), keyed by prefixes - */ - public static function getProvidedTypes(): array; -} diff --git a/vendor/symfony/dependency-injection/Exception/AutoconfigureFailedException.php b/vendor/symfony/dependency-injection/Exception/AutoconfigureFailedException.php deleted file mode 100644 index f7ce9785..00000000 --- a/vendor/symfony/dependency-injection/Exception/AutoconfigureFailedException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -class AutoconfigureFailedException extends AutowiringFailedException -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php deleted file mode 100644 index ebaca432..00000000 --- a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Thrown when a definition cannot be autowired. - */ -class AutowiringFailedException extends RuntimeException -{ - private ?\Closure $messageCallback = null; - - public function __construct( - private string $serviceId, - string|\Closure $message = '', - int $code = 0, - ?\Throwable $previous = null, - ) { - if ($message instanceof \Closure && \function_exists('xdebug_is_enabled') && xdebug_is_enabled()) { - $message = $message(); - } - - if (!$message instanceof \Closure) { - parent::__construct($message, $code, $previous); - - return; - } - - $this->messageCallback = $message; - parent::__construct('', $code, $previous); - - $this->message = new class($this->message, $this->messageCallback) { - private string|self $message; - private ?\Closure $messageCallback; - - public function __construct(&$message, &$messageCallback) - { - $this->message = &$message; - $this->messageCallback = &$messageCallback; - } - - public function __toString(): string - { - $messageCallback = $this->messageCallback; - $this->messageCallback = null; - - try { - return $this->message = $messageCallback(); - } catch (\Throwable $e) { - return $this->message = $e->getMessage(); - } - } - }; - } - - public function getMessageCallback(): ?\Closure - { - return $this->messageCallback; - } - - public function getServiceId(): string - { - return $this->serviceId; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php deleted file mode 100644 index 959238e9..00000000 --- a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base BadMethodCallException for Dependency Injection component. - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/EmptyParameterValueException.php b/vendor/symfony/dependency-injection/Exception/EmptyParameterValueException.php deleted file mode 100644 index 3fac6f3e..00000000 --- a/vendor/symfony/dependency-injection/Exception/EmptyParameterValueException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * This exception is thrown when an existent parameter with an empty value is used. - * - * @author Yonel Ceruto - */ -class EmptyParameterValueException extends InvalidArgumentException implements NotFoundExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php deleted file mode 100644 index 04ac8480..00000000 --- a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when an environment variable is not found. - * - * @author Nicolas Grekas - */ -class EnvNotFoundException extends InvalidArgumentException -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/vendor/symfony/dependency-injection/Exception/EnvParameterException.php deleted file mode 100644 index 4d71b875..00000000 --- a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception wraps exceptions whose messages contain a reference to an env parameter. - * - * @author Nicolas Grekas - */ -class EnvParameterException extends InvalidArgumentException -{ - public function __construct(array $envs, ?\Throwable $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.') - { - parent::__construct(\sprintf($message, implode('", "', $envs)), 0, $previous); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php deleted file mode 100644 index 6202df76..00000000 --- a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\ContainerExceptionInterface; - -/** - * Base ExceptionInterface for Dependency Injection component. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - */ -interface ExceptionInterface extends ContainerExceptionInterface, \Throwable -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php deleted file mode 100644 index 119bb7d1..00000000 --- a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base InvalidArgumentException for Dependency Injection component. - * - * @author Bulat Shakirzyanov - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php b/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php deleted file mode 100644 index 9be66a4a..00000000 --- a/vendor/symfony/dependency-injection/Exception/InvalidParameterTypeException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Thrown when trying to inject a parameter into a constructor/method with an incompatible type. - * - * @author Nicolas Grekas - * @author Julien Maulny - */ -class InvalidParameterTypeException extends InvalidArgumentException -{ - public function __construct(string $serviceId, string $type, \ReflectionParameter $parameter) - { - $acceptedType = $parameter->getType(); - $acceptedType = $acceptedType instanceof \ReflectionNamedType ? $acceptedType->getName() : (string) $acceptedType; - $this->code = $type; - - $function = $parameter->getDeclaringFunction(); - $functionName = $function instanceof \ReflectionMethod - ? \sprintf('%s::%s', $function->getDeclaringClass()->getName(), $function->getName()) - : $function->getName(); - - parent::__construct(\sprintf('Invalid definition for service "%s": argument %d of "%s()" accepts "%s", "%s" passed.', $serviceId, 1 + $parameter->getPosition(), $functionName, $acceptedType, $type)); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/LogicException.php b/vendor/symfony/dependency-injection/Exception/LogicException.php deleted file mode 100644 index 17a070ca..00000000 --- a/vendor/symfony/dependency-injection/Exception/LogicException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base LogicException for Dependency Injection component. - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php b/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php deleted file mode 100644 index a61f143b..00000000 --- a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base OutOfBoundsException for Dependency Injection component. - */ -class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php deleted file mode 100644 index 0e173881..00000000 --- a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when a circular reference in a parameter is detected. - * - * @author Fabien Potencier - */ -class ParameterCircularReferenceException extends RuntimeException -{ - public function __construct( - private array $parameters, - ?\Throwable $previous = null, - ) { - parent::__construct(\sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous); - } - - public function getParameters(): array - { - return $this->parameters; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php deleted file mode 100644 index 9dde5eb6..00000000 --- a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * This exception is thrown when a non-existent parameter is used. - * - * @author Fabien Potencier - */ -class ParameterNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface -{ - /** - * @param string $key The requested parameter key - * @param string|null $sourceId The service id that references the non-existent parameter - * @param string|null $sourceKey The parameter key that references the non-existent parameter - * @param \Throwable|null $previous The previous exception - * @param string[] $alternatives Some parameter name alternatives - * @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters - */ - public function __construct( - private string $key, - private ?string $sourceId = null, - private ?string $sourceKey = null, - ?\Throwable $previous = null, - private array $alternatives = [], - private ?string $nonNestedAlternative = null, - private ?string $sourceExtensionName = null, - private ?string $extraMessage = null, - ) { - parent::__construct('', 0, $previous); - - $this->updateRepr(); - } - - public function updateRepr(): void - { - if (null !== $this->sourceId) { - $this->message = \sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key); - } elseif (null !== $this->sourceKey) { - $this->message = \sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key); - } elseif (null !== $this->sourceExtensionName) { - $this->message = \sprintf('You have requested a non-existent parameter "%s" while loading extension "%s".', $this->key, $this->sourceExtensionName); - } elseif ('.' === ($this->key[0] ?? '')) { - $this->message = \sprintf('Parameter "%s" not found. It was probably deleted during the compilation of the container.', $this->key); - } else { - $this->message = \sprintf('You have requested a non-existent parameter "%s".', $this->key); - } - - if ($this->alternatives) { - if (1 === \count($this->alternatives)) { - $this->message .= ' Did you mean this: "'; - } else { - $this->message .= ' Did you mean one of these: "'; - } - $this->message .= implode('", "', $this->alternatives).'"?'; - } elseif (null !== $this->nonNestedAlternative) { - $this->message .= ' You cannot access nested array items, do you want to inject "'.$this->nonNestedAlternative.'" instead?'; - } - - if ($this->extraMessage) { - $this->message .= ' '.$this->extraMessage; - } - } - - public function getKey(): string - { - return $this->key; - } - - public function getSourceId(): ?string - { - return $this->sourceId; - } - - public function getSourceKey(): ?string - { - return $this->sourceKey; - } - - public function setSourceId(?string $sourceId): void - { - $this->sourceId = $sourceId; - - $this->updateRepr(); - } - - public function setSourceKey(?string $sourceKey): void - { - $this->sourceKey = $sourceKey; - - $this->updateRepr(); - } - - public function setSourceExtensionName(?string $sourceExtensionName): void - { - $this->sourceExtensionName = $sourceExtensionName; - - $this->updateRepr(); - } - - public function getExtraMessage(): ?string - { - return $this->extraMessage; - } - - public function setExtraMessage(?string $extraMessage): void - { - $this->extraMessage = $extraMessage; - - $this->updateRepr(); - } -} diff --git a/vendor/symfony/dependency-injection/Exception/RuntimeException.php b/vendor/symfony/dependency-injection/Exception/RuntimeException.php deleted file mode 100644 index 5c245412..00000000 --- a/vendor/symfony/dependency-injection/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * Base RuntimeException for Dependency Injection component. - * - * @author Johannes M. Schmitt - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php deleted file mode 100644 index fd400cb9..00000000 --- a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -/** - * This exception is thrown when a circular reference is detected. - * - * @author Johannes M. Schmitt - */ -class ServiceCircularReferenceException extends RuntimeException -{ - public function __construct( - private string $serviceId, - private array $path, - ?\Throwable $previous = null, - ) { - parent::__construct(\sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous); - } - - public function getServiceId(): string - { - return $this->serviceId; - } - - public function getPath(): array - { - return $this->path; - } -} diff --git a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php deleted file mode 100644 index 364812a6..00000000 --- a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * This exception is thrown when a non-existent service is requested. - * - * @author Johannes M. Schmitt - */ -class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface -{ - public function __construct( - private string $id, - private ?string $sourceId = null, - ?\Throwable $previous = null, - private array $alternatives = [], - ?string $msg = null, - ) { - if (null !== $msg) { - // no-op - } elseif (null === $sourceId) { - $msg = \sprintf('You have requested a non-existent service "%s".', $id); - } else { - $msg = \sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id); - } - - if ($alternatives) { - if (1 == \count($alternatives)) { - $msg .= ' Did you mean this: "'; - } else { - $msg .= ' Did you mean one of these: "'; - } - $msg .= implode('", "', $alternatives).'"?'; - } - - parent::__construct($msg, 0, $previous); - } - - public function getId(): string - { - return $this->id; - } - - public function getSourceId(): ?string - { - return $this->sourceId; - } - - public function getAlternatives(): array - { - return $this->alternatives; - } -} diff --git a/vendor/symfony/dependency-injection/ExpressionLanguage.php b/vendor/symfony/dependency-injection/ExpressionLanguage.php deleted file mode 100644 index 79de5b04..00000000 --- a/vendor/symfony/dependency-injection/ExpressionLanguage.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage; - -if (!class_exists(BaseExpressionLanguage::class)) { - return; -} - -/** - * Adds some function to the default ExpressionLanguage. - * - * @author Fabien Potencier - * - * @see ExpressionLanguageProvider - */ -class ExpressionLanguage extends BaseExpressionLanguage -{ - public function __construct(?CacheItemPoolInterface $cache = null, iterable $providers = [], ?callable $serviceCompiler = null, ?\Closure $getEnv = null) - { - if (!\is_array($providers)) { - $providers = iterator_to_array($providers, false); - } - - // prepend the default provider to let users override it easily - array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler, $getEnv)); - - parent::__construct($cache, $providers); - } -} diff --git a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php b/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php deleted file mode 100644 index 7cd327c7..00000000 --- a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\ExpressionLanguage\ExpressionFunction; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; - -/** - * Define some ExpressionLanguage functions. - * - * To get a service, use service('request'). - * To get a parameter, use parameter('kernel.debug'). - * To get an env variable, use env('SOME_VARIABLE'). - * - * @author Fabien Potencier - */ -class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface -{ - private ?\Closure $serviceCompiler; - - public function __construct( - ?callable $serviceCompiler = null, - private ?\Closure $getEnv = null, - ) { - $this->serviceCompiler = null === $serviceCompiler ? null : $serviceCompiler(...); - } - - public function getFunctions(): array - { - return [ - new ExpressionFunction('service', $this->serviceCompiler ?? fn ($arg) => \sprintf('$container->get(%s)', $arg), fn (array $variables, $value) => $variables['container']->get($value)), - - new ExpressionFunction('parameter', fn ($arg) => \sprintf('$container->getParameter(%s)', $arg), fn (array $variables, $value) => $variables['container']->getParameter($value)), - - new ExpressionFunction('env', fn ($arg) => \sprintf('$container->getEnv(%s)', $arg), function (array $variables, $value) { - if (!$this->getEnv) { - throw new LogicException('You need to pass a getEnv closure to the expression language provider to use the "env" function.'); - } - - return ($this->getEnv)($value); - }), - - new ExpressionFunction('arg', fn ($arg) => \sprintf('$args?->get(%s)', $arg), fn (array $variables, $value) => $variables['args']?->get($value)), - ]; - } -} diff --git a/vendor/symfony/dependency-injection/Extension/AbstractExtension.php b/vendor/symfony/dependency-injection/Extension/AbstractExtension.php deleted file mode 100644 index 795ed810..00000000 --- a/vendor/symfony/dependency-injection/Extension/AbstractExtension.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\Configuration; -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -/** - * An Extension that provides configuration hooks. - * - * @author Yonel Ceruto - */ -abstract class AbstractExtension extends Extension implements ConfigurableExtensionInterface, PrependExtensionInterface -{ - use ExtensionTrait; - - public function configure(DefinitionConfigurator $definition): void - { - } - - public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void - { - } - - public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void - { - } - - public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface - { - return new Configuration($this, $container, $this->getAlias()); - } - - final public function prepend(ContainerBuilder $container): void - { - $callback = function (ContainerConfigurator $configurator) use ($container) { - $this->prependExtension($configurator, $container); - }; - - $this->executeConfiguratorCallback($container, $callback, $this, true); - } - - final public function load(array $configs, ContainerBuilder $container): void - { - $config = $this->processConfiguration($this->getConfiguration([], $container), $configs); - - $callback = function (ContainerConfigurator $configurator) use ($config, $container) { - $this->loadExtension($config, $configurator, $container); - }; - - $this->executeConfiguratorCallback($container, $callback, $this); - } -} diff --git a/vendor/symfony/dependency-injection/Extension/ConfigurableExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ConfigurableExtensionInterface.php deleted file mode 100644 index b8927e42..00000000 --- a/vendor/symfony/dependency-injection/Extension/ConfigurableExtensionInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\ConfigurableInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -/** - * @author Yonel Ceruto - */ -interface ConfigurableExtensionInterface extends ConfigurableInterface -{ - /** - * Allows an extension to prepend the extension configurations. - */ - public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void; - - /** - * Loads a specific configuration. - */ - public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void; -} diff --git a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php deleted file mode 100644 index a42967f4..00000000 --- a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ConfigurationExtensionInterface is the interface implemented by container extension classes. - * - * @author Kevin Bond - */ -interface ConfigurationExtensionInterface -{ - /** - * Returns extension configuration. - * - * @return ConfigurationInterface|null - */ - public function getConfiguration(array $config, ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/Extension/Extension.php b/vendor/symfony/dependency-injection/Extension/Extension.php deleted file mode 100644 index 03d08d6d..00000000 --- a/vendor/symfony/dependency-injection/Extension/Extension.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Definition\ConfigurationInterface; -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * Provides useful features shared by many extensions. - * - * @author Fabien Potencier - */ -abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface -{ - private array $processedConfigs = []; - - /** - * @return string|false - */ - public function getXsdValidationBasePath() - { - return false; - } - - /** - * @return string - */ - public function getNamespace() - { - return 'http://example.org/schema/dic/'.$this->getAlias(); - } - - /** - * Returns the recommended alias to use in XML. - * - * This alias is also the mandatory prefix to use when using YAML. - * - * This convention is to remove the "Extension" postfix from the class - * name and then lowercase and underscore the result. So: - * - * AcmeHelloExtension - * - * becomes - * - * acme_hello - * - * This can be overridden in a sub-class to specify the alias manually. - * - * @throws BadMethodCallException When the extension name does not follow conventions - */ - public function getAlias(): string - { - $className = static::class; - if (!str_ends_with($className, 'Extension')) { - throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.'); - } - $classBaseName = substr(strrchr($className, '\\'), 1, -9); - - return Container::underscore($classBaseName); - } - - /** - * @return ConfigurationInterface|null - */ - public function getConfiguration(array $config, ContainerBuilder $container) - { - $class = static::class; - - if (str_contains($class, "\0")) { - return null; // ignore anonymous classes - } - - $class = substr_replace($class, '\Configuration', strrpos($class, '\\')); - $class = $container->getReflectionClass($class); - - if (!$class) { - return null; - } - - if (!$class->implementsInterface(ConfigurationInterface::class)) { - throw new LogicException(\sprintf('The extension configuration class "%s" must implement "%s".', $class->getName(), ConfigurationInterface::class)); - } - - if (!($constructor = $class->getConstructor()) || !$constructor->getNumberOfRequiredParameters()) { - return $class->newInstance(); - } - - return null; - } - - final protected function processConfiguration(ConfigurationInterface $configuration, array $configs): array - { - $processor = new Processor(); - - return $this->processedConfigs[] = $processor->processConfiguration($configuration, $configs); - } - - /** - * @internal - */ - final public function getProcessedConfigs(): array - { - try { - return $this->processedConfigs; - } finally { - $this->processedConfigs = []; - } - } - - /** - * @throws InvalidArgumentException When the config is not enableable - */ - protected function isConfigEnabled(ContainerBuilder $container, array $config): bool - { - if (!\array_key_exists('enabled', $config)) { - throw new InvalidArgumentException("The config array has no 'enabled' key."); - } - - return (bool) $container->getParameterBag()->resolveValue($config['enabled']); - } -} diff --git a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php deleted file mode 100644 index bd57eef7..00000000 --- a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ExtensionInterface is the interface implemented by container extension classes. - * - * @author Fabien Potencier - */ -interface ExtensionInterface -{ - /** - * Loads a specific configuration. - * - * @param array> $configs - * - * @return void - * - * @throws \InvalidArgumentException When provided tag is not defined in this extension - */ - public function load(array $configs, ContainerBuilder $container); - - /** - * Returns the namespace to be used for this extension (XML namespace). - * - * @return string - */ - public function getNamespace(); - - /** - * Returns the base path for the XSD files. - * - * @return string|false - */ - public function getXsdValidationBasePath(); - - /** - * Returns the recommended alias to use in XML. - * - * This alias is also the mandatory prefix to use when using YAML. - * - * @return string - */ - public function getAlias(); -} diff --git a/vendor/symfony/dependency-injection/Extension/ExtensionTrait.php b/vendor/symfony/dependency-injection/Extension/ExtensionTrait.php deleted file mode 100644 index 0bb00886..00000000 --- a/vendor/symfony/dependency-injection/Extension/ExtensionTrait.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\ClosureLoader; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; -use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; -use Symfony\Component\DependencyInjection\Loader\IniFileLoader; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - -/** - * @author Yonel Ceruto - */ -trait ExtensionTrait -{ - private function executeConfiguratorCallback(ContainerBuilder $container, \Closure $callback, ConfigurableExtensionInterface $subject, bool $prepend = false): void - { - $env = $container->getParameter('kernel.environment'); - $loader = $this->createContainerLoader($container, $env, $prepend); - $file = (new \ReflectionObject($subject))->getFileName(); - $bundleLoader = $loader->getResolver()->resolve($file); - if (!$bundleLoader instanceof PhpFileLoader) { - throw new \LogicException('Unable to create the ContainerConfigurator.'); - } - $bundleLoader->setCurrentDir(\dirname($file)); - $instanceof = &\Closure::bind(fn &() => $this->instanceof, $bundleLoader, $bundleLoader)(); - - try { - $callback(new ContainerConfigurator($container, $bundleLoader, $instanceof, $file, $file, $env)); - } finally { - $instanceof = []; - $bundleLoader->registerAliasesForSinglyImplementedInterfaces(); - } - } - - private function createContainerLoader(ContainerBuilder $container, string $env, bool $prepend): DelegatingLoader - { - $buildDir = $container->getParameter('kernel.build_dir'); - $locator = new FileLocator(); - $resolver = new LoaderResolver([ - new XmlFileLoader($container, $locator, $env, $prepend), - new YamlFileLoader($container, $locator, $env, $prepend), - new IniFileLoader($container, $locator, $env), - new PhpFileLoader($container, $locator, $env, new ConfigBuilderGenerator($buildDir), $prepend), - new GlobFileLoader($container, $locator, $env), - new DirectoryLoader($container, $locator, $env), - new ClosureLoader($container, $env), - ]); - - return new DelegatingLoader($resolver); - } -} diff --git a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php deleted file mode 100644 index 0df94e10..00000000 --- a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Extension; - -use Symfony\Component\DependencyInjection\ContainerBuilder; - -interface PrependExtensionInterface -{ - /** - * Allow an extension to prepend the extension configurations. - * - * @return void - */ - public function prepend(ContainerBuilder $container); -} diff --git a/vendor/symfony/dependency-injection/LICENSE b/vendor/symfony/dependency-injection/LICENSE deleted file mode 100644 index 0138f8f0..00000000 --- a/vendor/symfony/dependency-injection/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php deleted file mode 100644 index c516ed6e..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Lazy proxy instantiator, capable of instantiating a proxy given a container, the - * service definitions and a callback that produces the real service instance. - * - * @author Marco Pivetta - */ -interface InstantiatorInterface -{ - /** - * Instantiates a proxy object. - * - * @param string $id Identifier of the requested service - * @param callable(object=) $realInstantiator A callback that is capable of producing the real service instance - */ - public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object; -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/LazyServiceInstantiator.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/LazyServiceInstantiator.php deleted file mode 100644 index 10748256..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/LazyServiceInstantiator.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper; - -/** - * @author Nicolas Grekas - */ -final class LazyServiceInstantiator implements InstantiatorInterface -{ - public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object - { - $dumper = new LazyServiceDumper(); - - if (!$dumper->isProxyCandidate($definition, $asGhostObject, $id)) { - throw new InvalidArgumentException(\sprintf('Cannot instantiate lazy proxy for service "%s".', $id)); - } - - if (\PHP_VERSION_ID >= 80400 && $asGhostObject) { - return (new \ReflectionClass($definition->getClass()))->newLazyGhost(static function ($ghost) use ($realInstantiator) { $realInstantiator($ghost); }); - } - - $class = null; - if (!class_exists($proxyClass = $dumper->getProxyClass($definition, $asGhostObject, $class), false)) { - eval($dumper->getProxyCode($definition, $id)); - } - - if ($definition->getClass() === $proxyClass) { - return $class->newLazyProxy($realInstantiator); - } - - return \PHP_VERSION_ID < 80400 && $asGhostObject ? $proxyClass::createLazyGhost($realInstantiator) : $proxyClass::createLazyProxy($realInstantiator); - } -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php deleted file mode 100644 index a0c445eb..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\Instantiator; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; - -/** - * Noop proxy instantiator - produces the real service instead of a proxy instance. - * - * @author Marco Pivetta - */ -class RealServiceInstantiator implements InstantiatorInterface -{ - public function instantiateProxy(ContainerInterface $container, Definition $definition, string $id, callable $realInstantiator): object - { - return $realInstantiator(); - } -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php deleted file mode 100644 index 05f2fbfb..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services. - * - * @author Marco Pivetta - */ -interface DumperInterface -{ - /** - * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. - * - * @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object - */ - public function isProxyCandidate(Definition $definition, ?bool &$asGhostObject = null, ?string $id = null): bool; - - /** - * Generates the code to be used to instantiate a proxy in the dumped factory code. - */ - public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string; - - /** - * Generates the code for the lazy proxy. - */ - public function getProxyCode(Definition $definition, ?string $id = null): string; -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/LazyServiceDumper.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/LazyServiceDumper.php deleted file mode 100644 index c534630e..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/LazyServiceDumper.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\VarExporter\Exception\LogicException; -use Symfony\Component\VarExporter\ProxyHelper; - -/** - * @author Nicolas Grekas - */ -final class LazyServiceDumper implements DumperInterface -{ - public function __construct( - private string $salt = '', - ) { - } - - public function isProxyCandidate(Definition $definition, ?bool &$asGhostObject = null, ?string $id = null): bool - { - $asGhostObject = false; - - if ($definition->hasTag('proxy')) { - if (!$definition->isLazy()) { - throw new InvalidArgumentException(\sprintf('Invalid definition for service "%s": setting the "proxy" tag on a service requires it to be "lazy".', $id ?? $definition->getClass())); - } - - return true; - } - - if (!$definition->isLazy()) { - return false; - } - - if (!($class = $definition->getClass()) || !(class_exists($class) || interface_exists($class, false))) { - return false; - } - - if ($definition->getFactory()) { - return true; - } - - foreach ($definition->getMethodCalls() as $call) { - if ($call[2] ?? false) { - return true; - } - } - - if (\PHP_VERSION_ID < 80400) { - try { - $asGhostObject = (bool) ProxyHelper::generateLazyGhost(new \ReflectionClass($class)); - } catch (LogicException) { - } - - return true; - } - - try { - $asGhostObject = (bool) (new \ReflectionClass($class))->newLazyGhost(static fn () => null); - } catch (\Error $e) { - if (__FILE__ !== $e->getFile()) { - throw $e; - } - } - - return true; - } - - public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string - { - $instantiation = 'return'; - - if ($definition->isShared()) { - $instantiation .= \sprintf(' $container->%s[%s] =', $definition->isPublic() && !$definition->isPrivate() ? 'services' : 'privates', var_export($id, true)); - } - - $asGhostObject = str_contains($factoryCode, '$proxy'); - $proxyClass = $this->getProxyClass($definition, $asGhostObject); - - if (!$asGhostObject) { - if ($definition->getClass() === $proxyClass) { - return <<newLazyProxy(static fn () => $factoryCode); - } - - - EOF; - } - - return <<createProxy('$proxyClass', static fn () => \\$proxyClass::createLazyProxy(static fn () => $factoryCode)); - } - - - EOF; - } - - if (\PHP_VERSION_ID < 80400) { - $factoryCode = \sprintf('static fn ($proxy) => %s', $factoryCode); - - return <<createProxy('$proxyClass', static fn () => \\$proxyClass::createLazyGhost($factoryCode)); - } - - - EOF; - } - - $factoryCode = \sprintf('static function ($proxy) use ($container) { %s; }', $factoryCode); - - return <<newLazyGhost($factoryCode); - } - - - EOF; - } - - public function getProxyCode(Definition $definition, ?string $id = null): string - { - if (!$this->isProxyCandidate($definition, $asGhostObject, $id)) { - throw new InvalidArgumentException(\sprintf('Cannot instantiate lazy proxy for service "%s".', $id ?? $definition->getClass())); - } - $proxyClass = $this->getProxyClass($definition, $asGhostObject, $class); - - if ($asGhostObject) { - if (\PHP_VERSION_ID >= 80400) { - return ''; - } - - try { - return ($class?->isReadOnly() ? 'readonly ' : '').'class '.$proxyClass.ProxyHelper::generateLazyGhost($class); - } catch (LogicException $e) { - throw new InvalidArgumentException(\sprintf('Cannot generate lazy ghost for service "%s".', $id ?? $definition->getClass()), 0, $e); - } - } - - if ($definition->getClass() === $proxyClass) { - return ''; - } - - $interfaces = []; - - if ($definition->hasTag('proxy')) { - foreach ($definition->getTag('proxy') as $tag) { - if (!isset($tag['interface'])) { - throw new InvalidArgumentException(\sprintf('Invalid definition for service "%s": the "interface" attribute is missing on a "proxy" tag.', $id ?? $definition->getClass())); - } - if (!interface_exists($tag['interface']) && !class_exists($tag['interface'], false)) { - throw new InvalidArgumentException(\sprintf('Invalid definition for service "%s": several "proxy" tags found but "%s" is not an interface.', $id ?? $definition->getClass(), $tag['interface'])); - } - if ('object' !== $definition->getClass() && !is_a($class->name, $tag['interface'], true)) { - throw new InvalidArgumentException(\sprintf('Invalid "proxy" tag for service "%s": class "%s" doesn\'t implement "%s".', $id ?? $definition->getClass(), $definition->getClass(), $tag['interface'])); - } - $interfaces[] = new \ReflectionClass($tag['interface']); - } - - $class = 1 === \count($interfaces) && !$interfaces[0]->isInterface() ? array_pop($interfaces) : null; - } elseif ($class->isInterface()) { - $interfaces = [$class]; - $class = null; - } - - try { - return ($class?->isReadOnly() ? 'readonly ' : '').'class '.$proxyClass.ProxyHelper::generateLazyProxy($class, $interfaces); - } catch (LogicException $e) { - throw new InvalidArgumentException(\sprintf('Cannot generate lazy proxy for service "%s".', $id ?? $definition->getClass()), 0, $e); - } - } - - public function getProxyClass(Definition $definition, bool $asGhostObject, ?\ReflectionClass &$class = null): string - { - $class = 'object' !== $definition->getClass() ? $definition->getClass() : 'stdClass'; - $class = new \ReflectionClass($class); - - if (\PHP_VERSION_ID < 80400) { - return preg_replace('/^.*\\\\/', '', $definition->getClass()) - .($asGhostObject ? 'Ghost' : 'Proxy') - .ucfirst(substr(hash('xxh128', $this->salt.'+'.$class->name.'+'.serialize($definition->getTag('proxy'))), -7)); - } - - if ($asGhostObject) { - return $class->name; - } - - if (!$definition->hasTag('proxy') && !$class->isAbstract()) { - $parent = $class; - do { - $extendsInternalClass = $parent->isInternal(); - } while (!$extendsInternalClass && $parent = $parent->getParentClass()); - - if (!$extendsInternalClass) { - return $class->name; - } - } - - return preg_replace('/^.*\\\\/', '', $definition->getClass()).'Proxy' - .ucfirst(substr(hash('xxh128', $this->salt.'+'.$class->name.'+'.serialize($definition->getTag('proxy'))), -7)); - } -} diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php deleted file mode 100644 index c987b19d..00000000 --- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * Null dumper, negates any proxy code generation for any given service definition. - * - * @author Marco Pivetta - * - * @final - */ -class NullDumper implements DumperInterface -{ - public function isProxyCandidate(Definition $definition, ?bool &$asGhostObject = null, ?string $id = null): bool - { - return $asGhostObject = false; - } - - public function getProxyFactoryCode(Definition $definition, string $id, string $factoryCode): string - { - return ''; - } - - public function getProxyCode(Definition $definition, ?string $id = null): string - { - return ''; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php deleted file mode 100644 index ada50aab..00000000 --- a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * ClosureLoader loads service definitions from a PHP closure. - * - * The Closure has access to the container as its first argument. - * - * @author Fabien Potencier - */ -class ClosureLoader extends Loader -{ - public function __construct( - private ContainerBuilder $container, - ?string $env = null, - ) { - parent::__construct($env); - } - - public function load(mixed $resource, ?string $type = null): mixed - { - return $resource($this->container, $this->env); - } - - public function supports(mixed $resource, ?string $type = null): bool - { - return $resource instanceof \Closure; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php deleted file mode 100644 index eea329e9..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\ArgumentInterface; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Parameter; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -abstract class AbstractConfigurator -{ - public const FACTORY = 'unknown'; - - /** - * @var \Closure(mixed, bool):mixed|null - */ - public static ?\Closure $valuePreProcessor = null; - - /** @internal */ - protected Definition|Alias|null $definition = null; - - public function __call(string $method, array $args): mixed - { - if (method_exists($this, 'set'.$method)) { - return $this->{'set'.$method}(...$args); - } - - throw new \BadMethodCallException(\sprintf('Call to undefined method "%s::%s()".', static::class, $method)); - } - - public function __serialize(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __unserialize(array $data): void - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - /** - * Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value. - * - * @param bool $allowServices whether Definition and Reference are allowed; by default, only scalars, arrays and enum are - * - * @return mixed the value, optionally cast to a Definition/Reference - */ - public static function processValue(mixed $value, bool $allowServices = false): mixed - { - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = static::processValue($v, $allowServices); - } - - return self::$valuePreProcessor ? (self::$valuePreProcessor)($value, $allowServices) : $value; - } - - if (self::$valuePreProcessor) { - $value = (self::$valuePreProcessor)($value, $allowServices); - } - - if ($value instanceof ReferenceConfigurator) { - $reference = new Reference($value->id, $value->invalidBehavior); - - return $value instanceof ClosureReferenceConfigurator ? new ServiceClosureArgument($reference) : $reference; - } - - if ($value instanceof InlineServiceConfigurator) { - $def = $value->definition; - $value->definition = null; - - return $def; - } - - if ($value instanceof ParamConfigurator) { - return (string) $value; - } - - if ($value instanceof self) { - throw new InvalidArgumentException(\sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY)); - } - - switch (true) { - case null === $value: - case \is_scalar($value): - case $value instanceof \UnitEnum: - return $value; - - case $value instanceof ArgumentInterface: - case $value instanceof Definition: - case $value instanceof Expression: - case $value instanceof Parameter: - case $value instanceof AbstractArgument: - case $value instanceof Reference: - if ($allowServices) { - return $value; - } - } - - throw new InvalidArgumentException(\sprintf('Cannot use values of type "%s" in service configuration files.', get_debug_type($value))); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php deleted file mode 100644 index 15ccf107..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -abstract class AbstractServiceConfigurator extends AbstractConfigurator -{ - private array $defaultTags = []; - - public function __construct( - protected ServicesConfigurator $parent, - Definition $definition, - protected ?string $id = null, - array $defaultTags = [], - ) { - $this->definition = $definition; - $this->defaultTags = $defaultTags; - } - - public function __destruct() - { - // default tags should be added last - foreach ($this->defaultTags as $name => $attributes) { - foreach ($attributes as $attribute) { - $this->definition->addTag($name, $attribute); - } - } - $this->defaultTags = []; - } - - /** - * Registers a service. - */ - final public function set(?string $id, ?string $class = null): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->set($id, $class); - } - - /** - * Creates an alias. - */ - final public function alias(string $id, string $referencedId): AliasConfigurator - { - $this->__destruct(); - - return $this->parent->alias($id, $referencedId); - } - - /** - * Registers a PSR-4 namespace using a glob pattern. - */ - final public function load(string $namespace, string $resource): PrototypeConfigurator - { - $this->__destruct(); - - return $this->parent->load($namespace, $resource); - } - - /** - * Gets an already defined service definition. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - final public function get(string $id): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->get($id); - } - - /** - * Removes an already defined service definition or alias. - */ - final public function remove(string $id): ServicesConfigurator - { - $this->__destruct(); - - return $this->parent->remove($id); - } - - /** - * Registers a stack of decorator services. - * - * @param InlineServiceConfigurator[]|ReferenceConfigurator[] $services - */ - final public function stack(string $id, array $services): AliasConfigurator - { - $this->__destruct(); - - return $this->parent->stack($id, $services); - } - - /** - * Registers a service. - */ - final public function __invoke(string $id, ?string $class = null): ServiceConfigurator - { - $this->__destruct(); - - return $this->parent->set($id, $class); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php deleted file mode 100644 index 650a9568..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Alias; - -/** - * @author Nicolas Grekas - */ -class AliasConfigurator extends AbstractServiceConfigurator -{ - use Traits\DeprecateTrait; - use Traits\PublicTrait; - - public const FACTORY = 'alias'; - - public function __construct(ServicesConfigurator $parent, Alias $alias) - { - $this->parent = $parent; - $this->definition = $alias; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php deleted file mode 100644 index ba83d91e..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ClosureReferenceConfigurator.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -class ClosureReferenceConfigurator extends ReferenceConfigurator -{ -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php deleted file mode 100644 index 208bd138..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php +++ /dev/null @@ -1,200 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Loader\UndefinedExtensionHandler; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -class ContainerConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'container'; - - private array $instanceof; - private int $anonymousCount = 0; - - public function __construct( - private ContainerBuilder $container, - private PhpFileLoader $loader, - array &$instanceof, - private string $path, - private string $file, - private ?string $env = null, - ) { - $this->instanceof = &$instanceof; - } - - final public function extension(string $namespace, array $config, bool $prepend = false): void - { - if ($prepend) { - $this->container->prependExtensionConfig($namespace, static::processValue($config)); - - return; - } - - if (!$this->container->hasExtension($namespace)) { - $extensions = array_filter(array_map(fn (ExtensionInterface $ext) => $ext->getAlias(), $this->container->getExtensions())); - throw new InvalidArgumentException(UndefinedExtensionHandler::getErrorMessage($namespace, $this->file, $namespace, $extensions)); - } - - $this->container->loadFromExtension($namespace, static::processValue($config)); - } - - final public function import(string $resource, ?string $type = null, bool|string $ignoreErrors = false): void - { - $this->loader->setCurrentDir(\dirname($this->path)); - $this->loader->import($resource, $type, $ignoreErrors, $this->file); - } - - final public function parameters(): ParametersConfigurator - { - return new ParametersConfigurator($this->container); - } - - final public function services(): ServicesConfigurator - { - return new ServicesConfigurator($this->container, $this->loader, $this->instanceof, $this->path, $this->anonymousCount); - } - - /** - * Get the current environment to be able to write conditional configuration. - */ - final public function env(): ?string - { - return $this->env; - } - - final public function withPath(string $path): static - { - $clone = clone $this; - $clone->path = $clone->file = $path; - $clone->loader->setCurrentDir(\dirname($path)); - - return $clone; - } -} - -/** - * Creates a parameter. - */ -function param(string $name): ParamConfigurator -{ - return new ParamConfigurator($name); -} - -/** - * Creates a reference to a service. - */ -function service(string $serviceId): ReferenceConfigurator -{ - return new ReferenceConfigurator($serviceId); -} - -/** - * Creates an inline service. - */ -function inline_service(?string $class = null): InlineServiceConfigurator -{ - return new InlineServiceConfigurator(new Definition($class)); -} - -/** - * Creates a service locator. - * - * @param array $values - */ -function service_locator(array $values): ServiceLocatorArgument -{ - $values = AbstractConfigurator::processValue($values, true); - - return new ServiceLocatorArgument($values); -} - -/** - * Creates a lazy iterator. - * - * @param ReferenceConfigurator[] $values - */ -function iterator(array $values): IteratorArgument -{ - return new IteratorArgument(AbstractConfigurator::processValue($values, true)); -} - -/** - * Creates a lazy iterator by tag name. - */ -function tagged_iterator(string $tag, ?string $indexAttribute = null, ?string $defaultIndexMethod = null, ?string $defaultPriorityMethod = null, string|array $exclude = [], bool $excludeSelf = true): TaggedIteratorArgument -{ - return new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, false, $defaultPriorityMethod, (array) $exclude, $excludeSelf); -} - -/** - * Creates a service locator by tag name. - */ -function tagged_locator(string $tag, ?string $indexAttribute = null, ?string $defaultIndexMethod = null, ?string $defaultPriorityMethod = null, string|array $exclude = [], bool $excludeSelf = true): ServiceLocatorArgument -{ - return new ServiceLocatorArgument(new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, true, $defaultPriorityMethod, (array) $exclude, $excludeSelf)); -} - -/** - * Creates an expression. - */ -function expr(string $expression): Expression -{ - return new Expression($expression); -} - -/** - * Creates an abstract argument. - */ -function abstract_arg(string $description): AbstractArgument -{ - return new AbstractArgument($description); -} - -/** - * Creates an environment variable reference. - */ -function env(string $name): EnvConfigurator -{ - return new EnvConfigurator($name); -} - -/** - * Creates a closure service reference. - */ -function service_closure(string $serviceId): ClosureReferenceConfigurator -{ - return new ClosureReferenceConfigurator($serviceId); -} - -/** - * Creates a closure. - */ -function closure(string|array|ReferenceConfigurator|Expression $callable): InlineServiceConfigurator -{ - return (new InlineServiceConfigurator(new Definition('Closure'))) - ->factory(['Closure', 'fromCallable']) - ->args([$callable]); -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php deleted file mode 100644 index 29372b0f..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas - */ -class DefaultsConfigurator extends AbstractServiceConfigurator -{ - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\PublicTrait; - - public const FACTORY = 'defaults'; - - public function __construct( - ServicesConfigurator $parent, - Definition $definition, - private ?string $path = null, - ) { - parent::__construct($parent, $definition, null, []); - } - - /** - * Adds a tag for this definition. - * - * @return $this - * - * @throws InvalidArgumentException when an invalid tag name or attribute is provided - */ - final public function tag(string $name, array $attributes = []): static - { - if ('' === $name) { - throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); - } - - $this->validateAttributes($name, $attributes); - - $this->definition->addTag($name, $attributes); - - return $this; - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): InstanceofConfigurator - { - return $this->parent->instanceof($fqcn); - } - - private function validateAttributes(string $tag, array $attributes, array $path = []): void - { - foreach ($attributes as $name => $value) { - if (\is_array($value)) { - $this->validateAttributes($tag, $value, [...$path, $name]); - } elseif (!\is_scalar($value ?? '')) { - $name = implode('.', [...$path, $name]); - throw new InvalidArgumentException(\sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type or an array of scalar-type.', $tag, $name)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php deleted file mode 100644 index fe678032..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/EnvConfigurator.php +++ /dev/null @@ -1,236 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\Config\Loader\ParamConfigurator; - -class EnvConfigurator extends ParamConfigurator -{ - /** - * @var string[] - */ - private array $stack; - - public function __construct(string $name) - { - $this->stack = explode(':', $name); - } - - public function __toString(): string - { - return '%env('.implode(':', $this->stack).')%'; - } - - /** - * @return $this - */ - public function __call(string $name, array $arguments): static - { - $processor = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $name)); - - $this->custom($processor, ...$arguments); - - return $this; - } - - /** - * @return $this - */ - public function custom(string $processor, ...$args): static - { - array_unshift($this->stack, $processor, ...$args); - - return $this; - } - - /** - * @return $this - */ - public function base64(): static - { - array_unshift($this->stack, 'base64'); - - return $this; - } - - /** - * @return $this - */ - public function bool(): static - { - array_unshift($this->stack, 'bool'); - - return $this; - } - - /** - * @return $this - */ - public function not(): static - { - array_unshift($this->stack, 'not'); - - return $this; - } - - /** - * @return $this - */ - public function const(): static - { - array_unshift($this->stack, 'const'); - - return $this; - } - - /** - * @return $this - */ - public function csv(): static - { - array_unshift($this->stack, 'csv'); - - return $this; - } - - /** - * @return $this - */ - public function file(): static - { - array_unshift($this->stack, 'file'); - - return $this; - } - - /** - * @return $this - */ - public function float(): static - { - array_unshift($this->stack, 'float'); - - return $this; - } - - /** - * @return $this - */ - public function int(): static - { - array_unshift($this->stack, 'int'); - - return $this; - } - - /** - * @return $this - */ - public function json(): static - { - array_unshift($this->stack, 'json'); - - return $this; - } - - /** - * @return $this - */ - public function key(string $key): static - { - array_unshift($this->stack, 'key', $key); - - return $this; - } - - /** - * @return $this - */ - public function url(): static - { - array_unshift($this->stack, 'url'); - - return $this; - } - - /** - * @return $this - */ - public function queryString(): static - { - array_unshift($this->stack, 'query_string'); - - return $this; - } - - /** - * @return $this - */ - public function resolve(): static - { - array_unshift($this->stack, 'resolve'); - - return $this; - } - - /** - * @return $this - */ - public function default(string $fallbackParam): static - { - array_unshift($this->stack, 'default', $fallbackParam); - - return $this; - } - - /** - * @return $this - */ - public function string(): static - { - array_unshift($this->stack, 'string'); - - return $this; - } - - /** - * @return $this - */ - public function trim(): static - { - array_unshift($this->stack, 'trim'); - - return $this; - } - - /** - * @return $this - */ - public function require(): static - { - array_unshift($this->stack, 'require'); - - return $this; - } - - /** - * @param class-string<\BackedEnum> $backedEnumClassName - * - * @return $this - */ - public function enum(string $backedEnumClassName): static - { - array_unshift($this->stack, 'enum', $backedEnumClassName); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/FromCallableConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/FromCallableConfigurator.php deleted file mode 100644 index 1e962e2f..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/FromCallableConfigurator.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class FromCallableConfigurator extends AbstractServiceConfigurator -{ - use Traits\AbstractTrait; - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\DecorateTrait; - use Traits\DeprecateTrait; - use Traits\LazyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\TagTrait; - - public const FACTORY = 'services'; - - public function __construct( - private ServiceConfigurator $serviceConfigurator, - Definition $definition, - ) { - parent::__construct($serviceConfigurator->parent, $definition, $serviceConfigurator->id); - } - - public function __destruct() - { - $this->serviceConfigurator->__destruct(); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php deleted file mode 100644 index 0b1990e0..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class InlineServiceConfigurator extends AbstractConfigurator -{ - use Traits\ArgumentTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\ConstructorTrait; - use Traits\FactoryTrait; - use Traits\FileTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\TagTrait; - - public const FACTORY = 'service'; - - private string $id = '[inline]'; - private bool $allowParent = true; - private ?string $path = null; - - public function __construct(Definition $definition) - { - $this->definition = $definition; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php deleted file mode 100644 index a26e5a84..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class InstanceofConfigurator extends AbstractServiceConfigurator -{ - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\ConstructorTrait; - use Traits\LazyTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\TagTrait; - - public const FACTORY = 'instanceof'; - - public function __construct( - ServicesConfigurator $parent, - Definition $definition, - string $id, - private ?string $path = null, - ) { - parent::__construct($parent, $definition, $id, []); - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): self - { - return $this->parent->instanceof($fqcn); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php deleted file mode 100644 index e6136d04..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * @author Nicolas Grekas - */ -class ParametersConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'parameters'; - - public function __construct( - private ContainerBuilder $container, - ) { - } - - /** - * @return $this - */ - final public function set(string $name, mixed $value): static - { - if ($value instanceof Expression) { - throw new InvalidArgumentException(\sprintf('Using an expression in parameter "%s" is not allowed.', $name)); - } - - $this->container->setParameter($name, static::processValue($value, true)); - - return $this; - } - - /** - * @return $this - */ - final public function __invoke(string $name, mixed $value): static - { - return $this->set($name, $value); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php deleted file mode 100644 index da8ac0a4..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; - -/** - * @author Nicolas Grekas - */ -class PrototypeConfigurator extends AbstractServiceConfigurator -{ - use Traits\AbstractTrait; - use Traits\ArgumentTrait; - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ConfiguratorTrait; - use Traits\ConstructorTrait; - use Traits\DeprecateTrait; - use Traits\FactoryTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\TagTrait; - - public const FACTORY = 'load'; - - private ?array $excludes = null; - - public function __construct( - ServicesConfigurator $parent, - private PhpFileLoader $loader, - Definition $defaults, - string $namespace, - private string $resource, - private bool $allowParent, - private ?string $path = null, - ) { - $definition = new Definition(); - if (!$defaults->isPublic() || !$defaults->isPrivate()) { - $definition->setPublic($defaults->isPublic()); - } - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - // deep clone, to avoid multiple process of the same instance in the passes - $definition->setBindings(unserialize(serialize($defaults->getBindings()))); - $definition->setChanges([]); - - parent::__construct($parent, $definition, $namespace, $defaults->getTags()); - } - - public function __destruct() - { - parent::__destruct(); - - if (isset($this->loader)) { - $this->loader->registerClasses($this->definition, $this->id, $this->resource, $this->excludes, $this->path); - } - unset($this->loader); - } - - /** - * Excludes files from registration using glob patterns. - * - * @param string[]|string $excludes - * - * @return $this - */ - final public function exclude(array|string $excludes): static - { - $this->excludes = (array) $excludes; - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php deleted file mode 100644 index 4a83f9c6..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * @author Nicolas Grekas - */ -class ReferenceConfigurator extends AbstractConfigurator -{ - /** @internal */ - protected string $id; - - /** @internal */ - protected int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - - public function __construct(string $id) - { - $this->id = $id; - } - - /** - * @return $this - */ - final public function ignoreOnInvalid(): static - { - $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - - return $this; - } - - /** - * @return $this - */ - final public function nullOnInvalid(): static - { - $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - - return $this; - } - - /** - * @return $this - */ - final public function ignoreOnUninitialized(): static - { - $this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - - return $this; - } - - public function __toString(): string - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php deleted file mode 100644 index e70dce16..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; - -/** - * @author Nicolas Grekas - */ -class ServiceConfigurator extends AbstractServiceConfigurator -{ - use Traits\AbstractTrait; - use Traits\ArgumentTrait; - use Traits\AutoconfigureTrait; - use Traits\AutowireTrait; - use Traits\BindTrait; - use Traits\CallTrait; - use Traits\ClassTrait; - use Traits\ConfiguratorTrait; - use Traits\ConstructorTrait; - use Traits\DecorateTrait; - use Traits\DeprecateTrait; - use Traits\FactoryTrait; - use Traits\FileTrait; - use Traits\FromCallableTrait; - use Traits\LazyTrait; - use Traits\ParentTrait; - use Traits\PropertyTrait; - use Traits\PublicTrait; - use Traits\ShareTrait; - use Traits\SyntheticTrait; - use Traits\TagTrait; - - public const FACTORY = 'services'; - - private bool $destructed = false; - - public function __construct( - private ContainerBuilder $container, - private array $instanceof, - private bool $allowParent, - ServicesConfigurator $parent, - Definition $definition, - ?string $id, - array $defaultTags, - private ?string $path = null, - ) { - parent::__construct($parent, $definition, $id, $defaultTags); - } - - public function __destruct() - { - if ($this->destructed) { - return; - } - $this->destructed = true; - - parent::__destruct(); - - $this->container->removeBindings($this->id); - $this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof)); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php deleted file mode 100644 index 0515781b..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; - -/** - * @author Nicolas Grekas - */ -class ServicesConfigurator extends AbstractConfigurator -{ - public const FACTORY = 'services'; - - private Definition $defaults; - private array $instanceof; - private string $anonymousHash; - private int $anonymousCount; - - public function __construct( - private ContainerBuilder $container, - private PhpFileLoader $loader, - array &$instanceof, - private ?string $path = null, - int &$anonymousCount = 0, - ) { - $this->defaults = new Definition(); - $this->instanceof = &$instanceof; - $this->anonymousHash = ContainerBuilder::hash($path ?: mt_rand()); - $this->anonymousCount = &$anonymousCount; - $instanceof = []; - } - - /** - * Defines a set of defaults for following service definitions. - */ - final public function defaults(): DefaultsConfigurator - { - return new DefaultsConfigurator($this, $this->defaults = new Definition(), $this->path); - } - - /** - * Defines an instanceof-conditional to be applied to following service definitions. - */ - final public function instanceof(string $fqcn): InstanceofConfigurator - { - $this->instanceof[$fqcn] = $definition = new ChildDefinition(''); - - return new InstanceofConfigurator($this, $definition, $fqcn, $this->path); - } - - /** - * Registers a service. - * - * @param string|null $id The service id, or null to create an anonymous service - * @param string|null $class The class of the service, or null when $id is also the class name - */ - final public function set(?string $id, ?string $class = null): ServiceConfigurator - { - $defaults = $this->defaults; - $definition = new Definition(); - - if (null === $id) { - if (!$class) { - throw new \LogicException('Anonymous services must have a class name.'); - } - - $id = \sprintf('.%d_%s', ++$this->anonymousCount, preg_replace('/^.*\\\\/', '', $class).'~'.$this->anonymousHash); - } elseif (!$defaults->isPublic() || !$defaults->isPrivate()) { - $definition->setPublic($defaults->isPublic() && !$defaults->isPrivate()); - } - - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - // deep clone, to avoid multiple process of the same instance in the passes - $definition->setBindings(unserialize(serialize($defaults->getBindings()))); - $definition->setChanges([]); - - $configurator = new ServiceConfigurator($this->container, $this->instanceof, true, $this, $definition, $id, $defaults->getTags(), $this->path); - - return null !== $class ? $configurator->class($class) : $configurator; - } - - /** - * Removes an already defined service definition or alias. - * - * @return $this - */ - final public function remove(string $id): static - { - $this->container->removeDefinition($id); - $this->container->removeAlias($id); - - return $this; - } - - /** - * Creates an alias. - */ - final public function alias(string $id, string $referencedId): AliasConfigurator - { - $ref = static::processValue($referencedId, true); - $alias = new Alias((string) $ref); - if (!$this->defaults->isPublic() || !$this->defaults->isPrivate()) { - $alias->setPublic($this->defaults->isPublic()); - } - $this->container->setAlias($id, $alias); - - return new AliasConfigurator($this, $alias); - } - - /** - * Registers a PSR-4 namespace using a glob pattern. - */ - final public function load(string $namespace, string $resource): PrototypeConfigurator - { - return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, true, $this->path); - } - - /** - * Gets an already defined service definition. - * - * @throws ServiceNotFoundException if the service definition does not exist - */ - final public function get(string $id): ServiceConfigurator - { - $definition = $this->container->getDefinition($id); - - return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), true, $this, $definition, $id, []); - } - - /** - * Registers a stack of decorator services. - * - * @param InlineServiceConfigurator[]|ReferenceConfigurator[] $services - */ - final public function stack(string $id, array $services): AliasConfigurator - { - foreach ($services as $i => $service) { - if ($service instanceof InlineServiceConfigurator) { - $definition = $service->definition->setInstanceofConditionals($this->instanceof); - - $changes = $definition->getChanges(); - $definition->setAutowired((isset($changes['autowired']) ? $definition : $this->defaults)->isAutowired()); - $definition->setAutoconfigured((isset($changes['autoconfigured']) ? $definition : $this->defaults)->isAutoconfigured()); - $definition->setBindings(array_merge($this->defaults->getBindings(), $definition->getBindings())); - $definition->setChanges($changes); - - $services[$i] = $definition; - } elseif (!$service instanceof ReferenceConfigurator) { - throw new InvalidArgumentException(\sprintf('"%s()" expects a list of definitions as returned by "%s()" or "%s()", "%s" given at index "%s" for service "%s".', __METHOD__, InlineServiceConfigurator::FACTORY, ReferenceConfigurator::FACTORY, $service instanceof AbstractConfigurator ? $service::FACTORY.'()' : get_debug_type($service), $i, $id)); - } - } - - $alias = $this->alias($id, ''); - $alias->definition = $this->set($id) - ->parent('') - ->args($services) - ->tag('container.stack') - ->definition; - - return $alias; - } - - /** - * Registers a service. - */ - final public function __invoke(string $id, ?string $class = null): ServiceConfigurator - { - return $this->set($id, $class); - } - - public function __destruct() - { - $this->loader->registerAliasesForSinglyImplementedInterfaces(); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php deleted file mode 100644 index b42b0708..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait AbstractTrait -{ - /** - * Whether this definition is abstract, that means it merely serves as a - * template for other definitions. - * - * @return $this - */ - final public function abstract(bool $abstract = true): static - { - $this->definition->setAbstract($abstract); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php deleted file mode 100644 index 67051f31..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ArgumentTrait -{ - /** - * Sets the arguments to pass to the service constructor/factory method. - * - * @return $this - */ - final public function args(array $arguments): static - { - $this->definition->setArguments(static::processValue($arguments, true)); - - return $this; - } - - /** - * Sets one argument to pass to the service constructor/factory method. - * - * @return $this - */ - final public function arg(string|int $key, mixed $value): static - { - $this->definition->setArgument($key, static::processValue($value, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php deleted file mode 100644 index f5762c55..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait AutoconfigureTrait -{ - /** - * Sets whether or not instanceof conditionals should be prepended with a global set. - * - * @return $this - * - * @throws InvalidArgumentException when a parent is already set - */ - final public function autoconfigure(bool $autoconfigured = true): static - { - $this->definition->setAutoconfigured($autoconfigured); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php deleted file mode 100644 index 9bce28f9..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait AutowireTrait -{ - /** - * Enables/disables autowiring. - * - * @return $this - */ - final public function autowire(bool $autowired = true): static - { - $this->definition->setAutowired($autowired); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php deleted file mode 100644 index 6bf6b6f4..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator; -use Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator; - -trait BindTrait -{ - /** - * Sets bindings. - * - * Bindings map $named or FQCN arguments to values that should be - * injected in the matching parameters (of the constructor, of methods - * called and of controller actions). - * - * @param string $nameOrFqcn A parameter name with its "$" prefix, or an FQCN - * @param mixed $valueOrRef The value or reference to bind - * - * @return $this - */ - final public function bind(string $nameOrFqcn, mixed $valueOrRef): static - { - $valueOrRef = static::processValue($valueOrRef, true); - $bindings = $this->definition->getBindings(); - $type = $this instanceof DefaultsConfigurator ? BoundArgument::DEFAULTS_BINDING : ($this instanceof InstanceofConfigurator ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING); - $bindings[$nameOrFqcn] = new BoundArgument($valueOrRef, true, $type, $this->path ?? null); - $this->definition->setBindings($bindings); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php deleted file mode 100644 index dbfb158e..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait CallTrait -{ - /** - * Adds a method to call after service initialization. - * - * @param string $method The method name to call - * @param array $arguments An array of arguments to pass to the method call - * @param bool $returnsClone Whether the call returns the service instance or not - * - * @return $this - * - * @throws InvalidArgumentException on empty $method param - */ - final public function call(string $method, array $arguments = [], bool $returnsClone = false): static - { - $this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php deleted file mode 100644 index 429cebcb..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ClassTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ClassTrait -{ - /** - * Sets the service class. - * - * @return $this - */ - final public function class(?string $class): static - { - $this->definition->setClass($class); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php deleted file mode 100644 index a4b447c0..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; - -trait ConfiguratorTrait -{ - /** - * Sets a configurator to call after the service is fully initialized. - * - * @return $this - */ - final public function configurator(string|array|ReferenceConfigurator $configurator): static - { - $this->definition->setConfigurator(static::processValue($configurator, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConstructorTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConstructorTrait.php deleted file mode 100644 index 7f16ed58..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConstructorTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ConstructorTrait -{ - /** - * Sets a static constructor. - * - * @return $this - */ - final public function constructor(string $constructor): static - { - $this->definition->setFactory([null, $constructor]); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php deleted file mode 100644 index afb56ae3..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DecorateTrait.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait DecorateTrait -{ - /** - * Sets the service that this service is decorating. - * - * @param string|null $id The decorated service id, use null to remove decoration - * - * @return $this - * - * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals - */ - final public function decorate(?string $id, ?string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): static - { - $this->definition->setDecoratedService($id, $renamedId, $priority, $invalidBehavior); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php deleted file mode 100644 index 04ff9a04..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait DeprecateTrait -{ - /** - * Whether this definition is deprecated, that means it should not be called anymore. - * - * @param string $package The name of the composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The deprecation message to use - * - * @return $this - * - * @throws InvalidArgumentException when the message template is invalid - */ - final public function deprecate(string $package, string $version, string $message): static - { - $this->definition->setDeprecated($package, $version, $message); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php deleted file mode 100644 index 0314dea7..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; -use Symfony\Component\ExpressionLanguage\Expression; - -trait FactoryTrait -{ - /** - * Sets a factory. - * - * @return $this - */ - final public function factory(string|array|ReferenceConfigurator|Expression $factory): static - { - if (\is_string($factory) && 1 === substr_count($factory, ':')) { - $factoryParts = explode(':', $factory); - - throw new InvalidArgumentException(\sprintf('Invalid factory "%s": the "service:method" notation is not available when using PHP-based DI configuration. Use "[service(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1])); - } - - if ($factory instanceof Expression) { - $factory = '@='.$factory; - } - - $this->definition->setFactory(static::processValue($factory, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php deleted file mode 100644 index 7b72181e..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FileTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait FileTrait -{ - /** - * Sets a file to require before creating the service. - * - * @return $this - */ - final public function file(string $file): static - { - $this->definition->setFile($file); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FromCallableTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FromCallableTrait.php deleted file mode 100644 index 0382db0d..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FromCallableTrait.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Loader\Configurator\FromCallableConfigurator; -use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; -use Symfony\Component\ExpressionLanguage\Expression; - -trait FromCallableTrait -{ - final public function fromCallable(string|array|ReferenceConfigurator|Expression $callable): FromCallableConfigurator - { - if ($this->definition instanceof ChildDefinition) { - throw new InvalidArgumentException('The configuration key "parent" is unsupported when using "fromCallable()".'); - } - - foreach ([ - 'synthetic' => 'isSynthetic', - 'factory' => 'getFactory', - 'file' => 'getFile', - 'arguments' => 'getArguments', - 'properties' => 'getProperties', - 'configurator' => 'getConfigurator', - 'calls' => 'getMethodCalls', - ] as $key => $method) { - if ($this->definition->$method()) { - throw new InvalidArgumentException(\sprintf('The configuration key "%s" is unsupported when using "fromCallable()".', $key)); - } - } - - $this->definition->setFactory(['Closure', 'fromCallable']); - - if (\is_string($callable) && 1 === substr_count($callable, ':')) { - $parts = explode(':', $callable); - - throw new InvalidArgumentException(\sprintf('Invalid callable "%s": the "service:method" notation is not available when using PHP-based DI configuration. Use "[service(\'%s\'), \'%s\']" instead.', $callable, $parts[0], $parts[1])); - } - - if ($callable instanceof Expression) { - $callable = '@='.$callable; - } - - $this->definition->setArguments([static::processValue($callable, true)]); - - if ('Closure' !== ($this->definition->getClass() ?? 'Closure')) { - $this->definition->setLazy(true); - } else { - $this->definition->setClass('Closure'); - } - - return new FromCallableConfigurator($this, $this->definition); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php deleted file mode 100644 index ac4326b8..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait LazyTrait -{ - /** - * Sets the lazy flag of this service. - * - * @param bool|string $lazy A FQCN to derivate the lazy proxy from or `true` to make it extend from the definition's class - * - * @return $this - */ - final public function lazy(bool|string $lazy = true): static - { - $this->definition->setLazy((bool) $lazy); - if (\is_string($lazy)) { - $this->definition->addTag('proxy', ['interface' => $lazy]); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php deleted file mode 100644 index ee95323a..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait ParentTrait -{ - /** - * Sets the Definition to inherit from. - * - * @return $this - * - * @throws InvalidArgumentException when parent cannot be set - */ - final public function parent(string $parent): static - { - if (!$this->allowParent) { - throw new InvalidArgumentException(\sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); - } - - if ($this->definition instanceof ChildDefinition) { - $this->definition->setParent($parent); - } else { - // cast Definition to ChildDefinition - $definition = serialize($this->definition); - $definition = substr_replace($definition, '53', 2, 2); - $definition = substr_replace($definition, 'Child', 44, 0); - $definition = unserialize($definition); - - $this->definition = $definition->setParent($parent); - } - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php deleted file mode 100644 index 0dab40fb..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait PropertyTrait -{ - /** - * Sets a specific property. - * - * @return $this - */ - final public function property(string $name, mixed $value): static - { - $this->definition->setProperty($name, static::processValue($value, true)); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php deleted file mode 100644 index 3d88d743..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait PublicTrait -{ - /** - * @return $this - */ - final public function public(): static - { - $this->definition->setPublic(true); - - return $this; - } - - /** - * @return $this - */ - final public function private(): static - { - $this->definition->setPublic(false); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php deleted file mode 100644 index 801fabcc..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait ShareTrait -{ - /** - * Sets if the service must be shared or not. - * - * @return $this - */ - final public function share(bool $shared = true): static - { - $this->definition->setShared($shared); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php deleted file mode 100644 index 5e8c4b3c..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -trait SyntheticTrait -{ - /** - * Sets whether this definition is synthetic, that is not constructed by the - * container, but dynamically injected. - * - * @return $this - */ - final public function synthetic(bool $synthetic = true): static - { - $this->definition->setSynthetic($synthetic); - - return $this; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php deleted file mode 100644 index 4ee120ad..00000000 --- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -trait TagTrait -{ - /** - * Adds a tag for this definition. - * - * @return $this - */ - final public function tag(string $name, array $attributes = []): static - { - if ('' === $name) { - throw new InvalidArgumentException(\sprintf('The tag name for service "%s" must be a non-empty string.', $this->id)); - } - - $this->validateAttributes($name, $attributes); - - $this->definition->addTag($name, $attributes); - - return $this; - } - - private function validateAttributes(string $tag, array $attributes, array $path = []): void - { - foreach ($attributes as $name => $value) { - if (\is_array($value)) { - $this->validateAttributes($tag, $value, [...$path, $name]); - } elseif (!\is_scalar($value ?? '')) { - $name = implode('.', [...$path, $name]); - throw new InvalidArgumentException(\sprintf('A tag attribute must be of a scalar-type or an array of scalar-types for service "%s", tag "%s", attribute "%s".', $this->id, $tag, $name)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php b/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php deleted file mode 100644 index d435366f..00000000 --- a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -/** - * DirectoryLoader is a recursive loader to go through directories. - * - * @author Sebastien Lavoie - */ -class DirectoryLoader extends FileLoader -{ - public function load(mixed $file, ?string $type = null): mixed - { - $file = rtrim($file, '/'); - $path = $this->locator->locate($file); - $this->container->fileExists($path, false); - - foreach (scandir($path) as $dir) { - if ('.' !== $dir[0]) { - if (is_dir($path.'/'.$dir)) { - $dir .= '/'; // append / to allow recursion - } - - $this->setCurrentDir($path); - - $this->import($dir, null, false, $path); - } - } - - return null; - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if ('directory' === $type) { - return true; - } - - return null === $type && \is_string($resource) && str_ends_with($resource, '/'); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/FileLoader.php b/vendor/symfony/dependency-injection/Loader/FileLoader.php deleted file mode 100644 index bc38767b..00000000 --- a/vendor/symfony/dependency-injection/Loader/FileLoader.php +++ /dev/null @@ -1,408 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; -use Symfony\Component\Config\Exception\LoaderLoadException; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader; -use Symfony\Component\Config\Loader\Loader; -use Symfony\Component\Config\Resource\GlobResource; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Attribute\AsAlias; -use Symfony\Component\DependencyInjection\Attribute\Exclude; -use Symfony\Component\DependencyInjection\Attribute\When; -use Symfony\Component\DependencyInjection\Attribute\WhenNot; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\RegisterAutoconfigureAttributesPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * FileLoader is the abstract class used by all built-in loaders that are file based. - * - * @author Fabien Potencier - */ -abstract class FileLoader extends BaseFileLoader -{ - public const ANONYMOUS_ID_REGEXP = '/^\.\d+_[^~]*+~[._a-zA-Z\d]{7}$/'; - - protected bool $isLoadingInstanceof = false; - protected array $instanceof = []; - protected array $interfaces = []; - protected array $singlyImplemented = []; - /** @var array */ - protected array $aliases = []; - protected bool $autoRegisterAliasesForSinglyImplementedInterfaces = true; - protected array $extensionConfigs = []; - protected int $importing = 0; - - /** - * @param bool $prepend Whether to prepend extension config instead of appending them - */ - public function __construct( - protected ContainerBuilder $container, - FileLocatorInterface $locator, - ?string $env = null, - protected bool $prepend = false, - ) { - parent::__construct($locator, $env); - } - - /** - * @param bool|string $ignoreErrors Whether errors should be ignored; pass "not_found" to ignore only when the loaded resource is not found - */ - public function import(mixed $resource, ?string $type = null, bool|string $ignoreErrors = false, ?string $sourceResource = null, $exclude = null): mixed - { - $args = \func_get_args(); - - if ($ignoreNotFound = 'not_found' === $ignoreErrors) { - $args[2] = false; - } elseif (!\is_bool($ignoreErrors)) { - throw new \TypeError(\sprintf('Invalid argument $ignoreErrors provided to "%s::import()": boolean or "not_found" expected, "%s" given.', static::class, get_debug_type($ignoreErrors))); - } - - ++$this->importing; - try { - return parent::import(...$args); - } catch (LoaderLoadException $e) { - if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) { - throw $e; - } - - foreach ($prev->getTrace() as $frame) { - if ('import' === ($frame['function'] ?? null) && is_a($frame['class'] ?? '', Loader::class, true)) { - break; - } - } - - if (__FILE__ !== $frame['file']) { - throw $e; - } - } finally { - --$this->importing; - $this->loadExtensionConfigs(); - } - - return null; - } - - /** - * Registers a set of classes as services using PSR-4 for discovery. - * - * @param Definition $prototype A definition to use as template - * @param string $namespace The namespace prefix of classes in the scanned directory - * @param string $resource The directory to look for classes, glob-patterns allowed - * @param string|string[]|null $exclude A globbed path of files to exclude or an array of globbed paths of files to exclude - * @param string|null $source The path to the file that defines the auto-discovery rule - */ - public function registerClasses(Definition $prototype, string $namespace, string $resource, string|array|null $exclude = null, ?string $source = null): void - { - if (!str_ends_with($namespace, '\\')) { - throw new InvalidArgumentException(\sprintf('Namespace prefix must end with a "\\": "%s".', $namespace)); - } - if (!preg_match('/^(?:[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+\\\\)++$/', $namespace)) { - throw new InvalidArgumentException(\sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace)); - } - // This can happen with YAML files - if (\is_array($exclude) && \in_array(null, $exclude, true)) { - throw new InvalidArgumentException('The exclude list must not contain a "null" value.'); - } - // This can happen with XML files - if (\is_array($exclude) && \in_array('', $exclude, true)) { - throw new InvalidArgumentException('The exclude list must not contain an empty value.'); - } - - $autoconfigureAttributes = new RegisterAutoconfigureAttributesPass(); - $autoconfigureAttributes = $autoconfigureAttributes->accept($prototype) ? $autoconfigureAttributes : null; - $classes = $this->findClasses($namespace, $resource, (array) $exclude, $source); - - $getPrototype = static fn () => clone $prototype; - $serialized = serialize($prototype); - - // avoid deep cloning if no definitions are nested - if (strpos($serialized, 'O:48:"Symfony\Component\DependencyInjection\Definition"', 55) - || strpos($serialized, 'O:53:"Symfony\Component\DependencyInjection\ChildDefinition"', 55) - ) { - // prepare for deep cloning - foreach (['Arguments', 'Properties', 'MethodCalls', 'Configurator', 'Factory', 'Bindings'] as $key) { - $serialized = serialize($prototype->{'get'.$key}()); - - if (strpos($serialized, 'O:48:"Symfony\Component\DependencyInjection\Definition"') - || strpos($serialized, 'O:53:"Symfony\Component\DependencyInjection\ChildDefinition"') - ) { - $getPrototype = static fn () => $getPrototype()->{'set'.$key}(unserialize($serialized)); - } - } - } - unset($serialized); - - foreach ($classes as $class => $errorMessage) { - if (null === $errorMessage && $autoconfigureAttributes) { - $r = $this->container->getReflectionClass($class); - if ($r->getAttributes(Exclude::class)[0] ?? null) { - $this->addContainerExcludedTag($class, $source); - continue; - } - if ($this->env) { - $excluded = true; - $whenAttributes = $r->getAttributes(When::class, \ReflectionAttribute::IS_INSTANCEOF); - $notWhenAttributes = $r->getAttributes(WhenNot::class, \ReflectionAttribute::IS_INSTANCEOF); - - if ($whenAttributes && $notWhenAttributes) { - throw new LogicException(\sprintf('The "%s" class cannot have both #[When] and #[WhenNot] attributes.', $class)); - } - - if (!$whenAttributes && !$notWhenAttributes) { - $excluded = false; - } - - foreach ($whenAttributes as $attribute) { - if ($this->env === $attribute->newInstance()->env) { - $excluded = false; - break; - } - } - - foreach ($notWhenAttributes as $attribute) { - if ($excluded = $this->env === $attribute->newInstance()->env) { - break; - } - } - - if ($excluded) { - $this->addContainerExcludedTag($class, $source); - continue; - } - } - } - - $r = null === $errorMessage ? $this->container->getReflectionClass($class) : null; - if ($r?->isAbstract() || $r?->isInterface()) { - if ($r->isInterface()) { - $this->interfaces[] = $class; - } - $autoconfigureAttributes?->processClass($this->container, $r); - continue; - } - - $this->setDefinition($class, $definition = $getPrototype()); - if (null !== $errorMessage) { - $definition->addError($errorMessage); - - continue; - } - $definition->setClass($class); - - $interfaces = []; - foreach (class_implements($class, false) as $interface) { - $this->singlyImplemented[$interface] = ($this->singlyImplemented[$interface] ?? $class) !== $class ? false : $class; - $interfaces[] = $interface; - } - - if (!$autoconfigureAttributes) { - continue; - } - $r = $this->container->getReflectionClass($class); - $defaultAlias = 1 === \count($interfaces) ? $interfaces[0] : null; - foreach ($r->getAttributes(AsAlias::class) as $attr) { - /** @var AsAlias $attribute */ - $attribute = $attr->newInstance(); - $alias = $attribute->id ?? $defaultAlias; - $public = $attribute->public; - if (null === $alias) { - throw new LogicException(\sprintf('Alias cannot be automatically determined for class "%s". If you have used the #[AsAlias] attribute with a class implementing multiple interfaces, add the interface you want to alias to the first parameter of #[AsAlias].', $class)); - } - - if (!$attribute->when || \in_array($this->env, $attribute->when, true)) { - if (isset($this->aliases[$alias])) { - throw new LogicException(\sprintf('The "%s" alias has already been defined with the #[AsAlias] attribute in "%s".', $alias, $this->aliases[$alias])); - } - - $this->aliases[$alias] = new Alias($class, $public); - } - } - } - - foreach ($this->aliases as $alias => $aliasDefinition) { - $this->container->setAlias($alias, $aliasDefinition); - } - - if ($this->autoRegisterAliasesForSinglyImplementedInterfaces) { - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - public function registerAliasesForSinglyImplementedInterfaces(): void - { - foreach ($this->interfaces as $interface) { - if (!empty($this->singlyImplemented[$interface]) && !isset($this->aliases[$interface]) && !$this->container->has($interface)) { - $this->container->setAlias($interface, $this->singlyImplemented[$interface]); - } - } - - $this->interfaces = $this->singlyImplemented = $this->aliases = []; - } - - final protected function loadExtensionConfig(string $namespace, array $config): void - { - if (!$this->prepend) { - $this->container->loadFromExtension($namespace, $config); - - return; - } - - if ($this->importing) { - if (!isset($this->extensionConfigs[$namespace])) { - $this->extensionConfigs[$namespace] = []; - } - array_unshift($this->extensionConfigs[$namespace], $config); - - return; - } - - $this->container->prependExtensionConfig($namespace, $config); - } - - final protected function loadExtensionConfigs(): void - { - if ($this->importing || !$this->extensionConfigs) { - return; - } - - foreach ($this->extensionConfigs as $namespace => $configs) { - foreach ($configs as $config) { - $this->container->prependExtensionConfig($namespace, $config); - } - } - - $this->extensionConfigs = []; - } - - /** - * Registers a definition in the container with its instanceof-conditionals. - */ - protected function setDefinition(string $id, Definition $definition): void - { - $this->container->removeBindings($id); - - foreach ($definition->getTag('container.error') as $error) { - if (isset($error['message'])) { - $definition->addError($error['message']); - } - } - - if ($this->isLoadingInstanceof) { - if (!$definition instanceof ChildDefinition) { - throw new InvalidArgumentException(\sprintf('Invalid type definition "%s": ChildDefinition expected, "%s" given.', $id, get_debug_type($definition))); - } - $this->instanceof[$id] = $definition; - } else { - $this->container->setDefinition($id, $definition->setInstanceofConditionals($this->instanceof)); - } - } - - private function findClasses(string $namespace, string $pattern, array $excludePatterns, ?string $source): array - { - $parameterBag = $this->container->getParameterBag(); - - $excludePaths = []; - $excludePrefix = null; - $excludePatterns = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePatterns)); - foreach ($excludePatterns as $excludePattern) { - foreach ($this->glob($excludePattern, true, $resource, true, true) as $path => $info) { - $excludePrefix ??= $resource->getPrefix(); - - // normalize Windows slashes and remove trailing slashes - $excludePaths[rtrim(str_replace('\\', '/', $path), '/')] = true; - } - } - - $pattern = $parameterBag->unescapeValue($parameterBag->resolveValue($pattern)); - $classes = []; - $prefixLen = null; - foreach ($this->glob($pattern, true, $resource, false, false, $excludePaths) as $path => $info) { - if (null === $prefixLen) { - $prefixLen = \strlen($resource->getPrefix()); - - if ($excludePrefix && !str_starts_with($excludePrefix, $resource->getPrefix())) { - throw new InvalidArgumentException(\sprintf('Invalid "exclude" pattern when importing classes for "%s": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $namespace, $excludePattern, $pattern)); - } - } - - if (isset($excludePaths[str_replace('\\', '/', $path)])) { - continue; - } - - if (!str_ends_with($path, '.php')) { - continue; - } - $class = $namespace.ltrim(str_replace('/', '\\', substr($path, $prefixLen, -4)), '\\'); - - if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+$/', $class)) { - continue; - } - - try { - $r = $this->container->getReflectionClass($class); - } catch (\ReflectionException $e) { - $classes[$class] = $e->getMessage(); - continue; - } - // check to make sure the expected class exists - if (!$r) { - throw new InvalidArgumentException(\sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern)); - } - - if (!$r->isTrait()) { - $classes[$class] = null; - } - } - - // track only for new & removed files - if ($resource instanceof GlobResource) { - $this->container->addResource($resource); - } else { - foreach ($resource as $path) { - $this->container->fileExists($path, false); - } - } - - if (null !== $prefixLen) { - foreach ($excludePaths as $path => $_) { - $class = $namespace.ltrim(str_replace('/', '\\', substr($path, $prefixLen, str_ends_with($path, '.php') ? -4 : null)), '\\'); - $this->addContainerExcludedTag($class, $source); - } - } - - return $classes; - } - - private function addContainerExcludedTag(string $class, ?string $source): void - { - if ($this->container->has($class)) { - return; - } - - static $attributes = []; - - if (null !== $source && !isset($attributes[$source])) { - $attributes[$source] = ['source' => \sprintf('in "%s/%s"', basename(\dirname($source)), basename($source))]; - } - - $this->container->register($class, $class) - ->setAbstract(true) - ->addTag('container.excluded', null !== $source ? $attributes[$source] : []); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php b/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php deleted file mode 100644 index 4716f11a..00000000 --- a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -/** - * GlobFileLoader loads files from a glob pattern. - * - * @author Nicolas Grekas - */ -class GlobFileLoader extends FileLoader -{ - public function load(mixed $resource, ?string $type = null): mixed - { - foreach ($this->glob($resource, false, $globResource) as $path => $info) { - $this->import($path); - } - - $this->container->addResource($globResource); - - return null; - } - - public function supports(mixed $resource, ?string $type = null): bool - { - return 'glob' === $type; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php deleted file mode 100644 index cc2c137d..00000000 --- a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; - -/** - * IniFileLoader loads parameters from INI files. - * - * @author Fabien Potencier - */ -class IniFileLoader extends FileLoader -{ - public function load(mixed $resource, ?string $type = null): mixed - { - $path = $this->locator->locate($resource); - - $this->container->fileExists($path); - - // first pass to catch parsing errors - $result = parse_ini_file($path, true); - if (false === $result || [] === $result) { - throw new InvalidArgumentException(\sprintf('The "%s" file is not valid.', $resource)); - } - - // real raw parsing - $result = parse_ini_file($path, true, \INI_SCANNER_RAW); - - if (isset($result['parameters']) && \is_array($result['parameters'])) { - foreach ($result['parameters'] as $key => $value) { - if (\is_array($value)) { - $this->container->setParameter($key, array_map($this->phpize(...), $value)); - } else { - $this->container->setParameter($key, $this->phpize($value)); - } - } - } - - if ($this->env && \is_array($result['parameters@'.$this->env] ?? null)) { - foreach ($result['parameters@'.$this->env] as $key => $value) { - $this->container->setParameter($key, $this->phpize($value)); - } - } - - return null; - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'ini' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'ini' === $type; - } - - /** - * Note that the following features are not supported: - * * strings with escaped quotes are not supported "foo\"bar"; - * * string concatenation ("foo" "bar"). - */ - private function phpize(string $value): mixed - { - // trim on the right as comments removal keep whitespaces - if ($value !== $v = rtrim($value)) { - $value = '""' === substr_replace($v, '', 1, -1) ? substr($v, 1, -1) : $v; - } - $lowercaseValue = strtolower($value); - - return match (true) { - \defined($value) => \constant($value), - 'yes' === $lowercaseValue, - 'on' === $lowercaseValue => true, - 'no' === $lowercaseValue, - 'off' === $lowercaseValue, - 'none' === $lowercaseValue => false, - isset($value[1]) && ( - ("'" === $value[0] && "'" === $value[\strlen($value) - 1]) - || ('"' === $value[0] && '"' === $value[\strlen($value) - 1]) - ) => substr($value, 1, -1), // quoted string - default => XmlUtils::phpize($value), - }; - } -} diff --git a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php b/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php deleted file mode 100644 index 217eb7cc..00000000 --- a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php +++ /dev/null @@ -1,235 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Builder\ConfigBuilderGenerator; -use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface; -use Symfony\Component\Config\Builder\ConfigBuilderInterface; -use Symfony\Component\Config\FileLocatorInterface; -use Symfony\Component\DependencyInjection\Attribute\When; -use Symfony\Component\DependencyInjection\Attribute\WhenNot; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; - -/** - * PhpFileLoader loads service definitions from a PHP file. - * - * The PHP file is required and the $container variable can be - * used within the file to change the container. - * - * @author Fabien Potencier - */ -class PhpFileLoader extends FileLoader -{ - protected bool $autoRegisterAliasesForSinglyImplementedInterfaces = false; - - public function __construct( - ContainerBuilder $container, - FileLocatorInterface $locator, - ?string $env = null, - private ?ConfigBuilderGeneratorInterface $generator = null, - bool $prepend = false, - ) { - parent::__construct($container, $locator, $env, $prepend); - } - - public function load(mixed $resource, ?string $type = null): mixed - { - // the container and loader variables are exposed to the included file below - $container = $this->container; - $loader = $this; - - $path = $this->locator->locate($resource); - $this->setCurrentDir(\dirname($path)); - $this->container->fileExists($path); - - // the closure forbids access to the private scope in the included file - $load = \Closure::bind(function ($path, $env) use ($container, $loader, $resource, $type) { - return include $path; - }, $this, ProtectedPhpFileLoader::class); - - try { - $callback = $load($path, $this->env); - - if (\is_object($callback) && \is_callable($callback)) { - $this->executeCallback($callback, new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource, $this->env), $path); - } - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - - return null; - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'php' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'php' === $type; - } - - /** - * Resolve the parameters to the $callback and execute it. - */ - private function executeCallback(callable $callback, ContainerConfigurator $containerConfigurator, string $path): void - { - $callback = $callback(...); - $arguments = []; - $configBuilders = []; - $r = new \ReflectionFunction($callback); - - $excluded = true; - $whenAttributes = $r->getAttributes(When::class, \ReflectionAttribute::IS_INSTANCEOF); - $notWhenAttributes = $r->getAttributes(WhenNot::class, \ReflectionAttribute::IS_INSTANCEOF); - - if ($whenAttributes && $notWhenAttributes) { - throw new LogicException('Using both #[When] and #[WhenNot] attributes on the same target is not allowed.'); - } - - if (!$whenAttributes && !$notWhenAttributes) { - $excluded = false; - } - - foreach ($whenAttributes as $attribute) { - if ($this->env === $attribute->newInstance()->env) { - $excluded = false; - break; - } - } - - foreach ($notWhenAttributes as $attribute) { - if ($excluded = $this->env === $attribute->newInstance()->env) { - break; - } - } - - if ($excluded) { - return; - } - - foreach ($r->getParameters() as $parameter) { - $reflectionType = $parameter->getType(); - if (!$reflectionType instanceof \ReflectionNamedType) { - throw new \InvalidArgumentException(\sprintf('Could not resolve argument "$%s" for "%s". You must typehint it (for example with "%s" or "%s").', $parameter->getName(), $path, ContainerConfigurator::class, ContainerBuilder::class)); - } - $type = $reflectionType->getName(); - - switch ($type) { - case ContainerConfigurator::class: - $arguments[] = $containerConfigurator; - break; - case ContainerBuilder::class: - $arguments[] = $this->container; - break; - case FileLoader::class: - case self::class: - $arguments[] = $this; - break; - case 'string': - if (null !== $this->env && 'env' === $parameter->getName()) { - $arguments[] = $this->env; - break; - } - // no break - default: - try { - $configBuilder = $this->configBuilder($type); - } catch (InvalidArgumentException|\LogicException $e) { - throw new \InvalidArgumentException(\sprintf('Could not resolve argument "%s" for "%s".', $type.' $'.$parameter->getName(), $path), 0, $e); - } - $configBuilders[] = $configBuilder; - $arguments[] = $configBuilder; - } - } - - // Force load ContainerConfigurator to make env(), param() etc available. - class_exists(ContainerConfigurator::class); - - ++$this->importing; - try { - $callback(...$arguments); - } finally { - --$this->importing; - } - - foreach ($configBuilders as $configBuilder) { - $this->loadExtensionConfig($configBuilder->getExtensionAlias(), ContainerConfigurator::processValue($configBuilder->toArray())); - } - - $this->loadExtensionConfigs(); - } - - /** - * @param string $namespace FQCN string for a class implementing ConfigBuilderInterface - */ - private function configBuilder(string $namespace): ConfigBuilderInterface - { - if (!class_exists(ConfigBuilderGenerator::class)) { - throw new \LogicException('You cannot use the config builder as the Config component is not installed. Try running "composer require symfony/config".'); - } - - if (null === $this->generator) { - throw new \LogicException('You cannot use the ConfigBuilders without providing a class implementing ConfigBuilderGeneratorInterface.'); - } - - // If class exists and implements ConfigBuilderInterface - if (class_exists($namespace) && is_subclass_of($namespace, ConfigBuilderInterface::class)) { - return new $namespace(); - } - - // If it does not start with Symfony\Config\ we don't know how to handle this - if (!str_starts_with($namespace, 'Symfony\\Config\\')) { - throw new InvalidArgumentException(\sprintf('Could not find or generate class "%s".', $namespace)); - } - - // Try to get the extension alias - $alias = Container::underscore(substr($namespace, 15, -6)); - - if (str_contains($alias, '\\')) { - throw new InvalidArgumentException('You can only use "root" ConfigBuilders from "Symfony\\Config\\" namespace. Nested classes like "Symfony\\Config\\Framework\\CacheConfig" cannot be used.'); - } - - if (!$this->container->hasExtension($alias)) { - $extensions = array_filter(array_map(fn (ExtensionInterface $ext) => $ext->getAlias(), $this->container->getExtensions())); - throw new InvalidArgumentException(UndefinedExtensionHandler::getErrorMessage($namespace, null, $alias, $extensions)); - } - - $extension = $this->container->getExtension($alias); - if (!$extension instanceof ConfigurationExtensionInterface) { - throw new \LogicException(\sprintf('You cannot use the config builder for "%s" because the extension does not implement "%s".', $namespace, ConfigurationExtensionInterface::class)); - } - - $configuration = $extension->getConfiguration([], $this->container); - $loader = $this->generator->build($configuration); - - return $loader(); - } -} - -/** - * @internal - */ -final class ProtectedPhpFileLoader extends PhpFileLoader -{ -} diff --git a/vendor/symfony/dependency-injection/Loader/UndefinedExtensionHandler.php b/vendor/symfony/dependency-injection/Loader/UndefinedExtensionHandler.php deleted file mode 100644 index da5cbb5f..00000000 --- a/vendor/symfony/dependency-injection/Loader/UndefinedExtensionHandler.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -class UndefinedExtensionHandler -{ - private const BUNDLE_EXTENSIONS = [ - 'debug' => 'DebugBundle', - 'doctrine' => 'DoctrineBundle', - 'doctrine_migrations' => 'DoctrineMigrationsBundle', - 'framework' => 'FrameworkBundle', - 'maker' => 'MakerBundle', - 'monolog' => 'MonologBundle', - 'security' => 'SecurityBundle', - 'twig' => 'TwigBundle', - 'twig_component' => 'TwigComponentBundle', - 'ux_icons' => 'UXIconsBundle', - 'web_profiler' => 'WebProfilerBundle', - ]; - - public static function getErrorMessage(string $extensionName, ?string $loadingFilePath, string $namespaceOrAlias, array $foundExtensionNamespaces): string - { - $message = ''; - if (isset(self::BUNDLE_EXTENSIONS[$extensionName])) { - $message .= \sprintf('Did you forget to install or enable the %s? ', self::BUNDLE_EXTENSIONS[$extensionName]); - } - - $message .= match (true) { - \is_string($loadingFilePath) => \sprintf('There is no extension able to load the configuration for "%s" (in "%s"). ', $extensionName, $loadingFilePath), - default => \sprintf('There is no extension able to load the configuration for "%s". ', $extensionName), - }; - - return $message.\sprintf('Looked for namespace "%s", found "%s".', $namespaceOrAlias, $foundExtensionNamespaces ? implode('", "', $foundExtensionNamespaces) : 'none'); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php deleted file mode 100644 index eed874cd..00000000 --- a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php +++ /dev/null @@ -1,907 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; - -/** - * XmlFileLoader loads XML files service definitions. - * - * @author Fabien Potencier - */ -class XmlFileLoader extends FileLoader -{ - public const NS = 'http://symfony.com/schema/dic/services'; - - protected bool $autoRegisterAliasesForSinglyImplementedInterfaces = false; - - public function load(mixed $resource, ?string $type = null): mixed - { - $path = $this->locator->locate($resource); - - $xml = $this->parseFileToDOM($path); - - $this->container->fileExists($path); - - $this->loadXml($xml, $path); - - if ($this->env) { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - foreach ($xpath->query(\sprintf('//container:when[@env="%s"]', $this->env)) ?: [] as $root) { - $env = $this->env; - $this->env = null; - try { - $this->loadXml($xml, $path, $root); - } finally { - $this->env = $env; - } - } - } - - return null; - } - - private function loadXml(\DOMDocument $xml, string $path, ?\DOMNode $root = null): void - { - $defaults = $this->getServiceDefaults($xml, $path, $root); - - // anonymous services - $this->processAnonymousServices($xml, $path, $root); - - // imports - $this->parseImports($xml, $path, $root); - - // parameters - $this->parseParameters($xml, $path, $root); - - // extensions - $this->loadFromExtensions($xml, $root); - - // services - try { - $this->parseDefinitions($xml, $path, $defaults, $root); - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION)) { - return true; - } - - return 'xml' === $type; - } - - private function parseParameters(\DOMDocument $xml, string $file, ?\DOMNode $root = null): void - { - if ($parameters = $this->getChildren($root ?? $xml->documentElement, 'parameters')) { - $this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter', $file)); - } - } - - private function parseImports(\DOMDocument $xml, string $file, ?\DOMNode $root = null): void - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (false === $imports = $xpath->query('./container:imports/container:import', $root)) { - return; - } - - $defaultDirectory = \dirname($file); - foreach ($imports as $import) { - $this->setCurrentDir($defaultDirectory); - $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, XmlUtils::phpize($import->getAttribute('ignore-errors')) ?: false, $file); - } - } - - private function parseDefinitions(\DOMDocument $xml, string $file, Definition $defaults, ?\DOMNode $root = null): void - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (false === $services = $xpath->query('./container:services/container:service|./container:services/container:prototype|./container:services/container:stack', $root)) { - return; - } - $this->setCurrentDir(\dirname($file)); - - $this->instanceof = []; - $this->isLoadingInstanceof = true; - $instanceof = $xpath->query('./container:services/container:instanceof', $root); - foreach ($instanceof as $service) { - $this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, new Definition())); - } - - $this->isLoadingInstanceof = false; - foreach ($services as $service) { - if ('stack' === $service->tagName) { - $service->setAttribute('parent', '-'); - $definition = $this->parseDefinition($service, $file, $defaults) - ->setTags(array_merge_recursive(['container.stack' => [[]]], $defaults->getTags())) - ; - $this->setDefinition($id = (string) $service->getAttribute('id'), $definition); - $stack = []; - - foreach ($this->getChildren($service, 'service') as $k => $frame) { - $k = $frame->getAttribute('id') ?: $k; - $frame->setAttribute('id', $id.'" at index "'.$k); - - if ($alias = $frame->getAttribute('alias')) { - $this->validateAlias($frame, $file); - $stack[$k] = new Reference($alias); - } else { - $stack[$k] = $this->parseDefinition($frame, $file, $defaults) - ->setInstanceofConditionals($this->instanceof); - } - } - - $definition->setArguments($stack); - } elseif (null !== $definition = $this->parseDefinition($service, $file, $defaults)) { - if ('prototype' === $service->tagName) { - $excludes = array_column($this->getChildren($service, 'exclude'), 'nodeValue'); - if ($service->hasAttribute('exclude')) { - if (\count($excludes) > 0) { - throw new InvalidArgumentException('You cannot use both the attribute "exclude" and tags at the same time.'); - } - $excludes = [$service->getAttribute('exclude')]; - } - $this->registerClasses($definition, (string) $service->getAttribute('namespace'), (string) $service->getAttribute('resource'), $excludes, $file); - } else { - $this->setDefinition((string) $service->getAttribute('id'), $definition); - } - } - } - } - - private function getServiceDefaults(\DOMDocument $xml, string $file, ?\DOMNode $root = null): Definition - { - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - if (null === $defaultsNode = $xpath->query('./container:services/container:defaults', $root)->item(0)) { - return new Definition(); - } - - $defaultsNode->setAttribute('id', ''); - - return $this->parseDefinition($defaultsNode, $file, new Definition()); - } - - /** - * Parses an individual Definition. - */ - private function parseDefinition(\DOMElement $service, string $file, Definition $defaults): ?Definition - { - if ($alias = $service->getAttribute('alias')) { - $this->validateAlias($service, $file); - - $this->container->setAlias($service->getAttribute('id'), $alias = new Alias($alias)); - if ($publicAttr = $service->getAttribute('public')) { - $alias->setPublic(XmlUtils::phpize($publicAttr)); - } elseif ($defaults->getChanges()['public'] ?? false) { - $alias->setPublic($defaults->isPublic()); - } - - if ($deprecated = $this->getChildren($service, 'deprecated')) { - $message = $deprecated[0]->nodeValue ?: ''; - $package = $deprecated[0]->getAttribute('package') ?: ''; - $version = $deprecated[0]->getAttribute('version') ?: ''; - - if (!$deprecated[0]->hasAttribute('package')) { - throw new InvalidArgumentException(\sprintf('Missing attribute "package" at node "deprecated" in "%s".', $file)); - } - - if (!$deprecated[0]->hasAttribute('version')) { - throw new InvalidArgumentException(\sprintf('Missing attribute "version" at node "deprecated" in "%s".', $file)); - } - - $alias->setDeprecated($package, $version, $message); - } - - return null; - } - - if ($this->isLoadingInstanceof) { - $definition = new ChildDefinition(''); - } elseif ($parent = $service->getAttribute('parent')) { - $definition = new ChildDefinition($parent); - } else { - $definition = new Definition(); - } - - if ($defaults->getChanges()['public'] ?? false) { - $definition->setPublic($defaults->isPublic()); - } - $definition->setAutowired($defaults->isAutowired()); - $definition->setAutoconfigured($defaults->isAutoconfigured()); - $definition->setChanges([]); - - foreach (['class', 'public', 'shared', 'synthetic', 'abstract'] as $key) { - if ($value = $service->getAttribute($key)) { - $method = 'set'.$key; - $definition->$method(XmlUtils::phpize($value)); - } - } - - if ($value = $service->getAttribute('lazy')) { - $definition->setLazy((bool) $value = XmlUtils::phpize($value)); - if (\is_string($value)) { - $definition->addTag('proxy', ['interface' => $value]); - } - } - - if ($value = $service->getAttribute('autowire')) { - $definition->setAutowired(XmlUtils::phpize($value)); - } - - if ($value = $service->getAttribute('autoconfigure')) { - $definition->setAutoconfigured(XmlUtils::phpize($value)); - } - - if ($files = $this->getChildren($service, 'file')) { - $definition->setFile($files[0]->nodeValue); - } - - if ($deprecated = $this->getChildren($service, 'deprecated')) { - $message = $deprecated[0]->nodeValue ?: ''; - $package = $deprecated[0]->getAttribute('package') ?: ''; - $version = $deprecated[0]->getAttribute('version') ?: ''; - - if (!$deprecated[0]->hasAttribute('package')) { - throw new InvalidArgumentException(\sprintf('Missing attribute "package" at node "deprecated" in "%s".', $file)); - } - - if (!$deprecated[0]->hasAttribute('version')) { - throw new InvalidArgumentException(\sprintf('Missing attribute "version" at node "deprecated" in "%s".', $file)); - } - - $definition->setDeprecated($package, $version, $message); - } - - $definition->setArguments($this->getArgumentsAsPhp($service, 'argument', $file, $definition instanceof ChildDefinition)); - $definition->setProperties($this->getArgumentsAsPhp($service, 'property', $file)); - - if ($factories = $this->getChildren($service, 'factory')) { - $factory = $factories[0]; - if ($function = $factory->getAttribute('function')) { - $definition->setFactory($function); - } elseif ($expression = $factory->getAttribute('expression')) { - if (!class_exists(Expression::class)) { - throw new \LogicException('The "expression" attribute cannot be used on factories without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - $definition->setFactory('@='.$expression); - } else { - if ($childService = $factory->getAttribute('service')) { - $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } else { - $class = $factory->hasAttribute('class') ? $factory->getAttribute('class') : null; - } - - $definition->setFactory([$class, $factory->getAttribute('method') ?: '__invoke']); - } - } - - if ($constructor = $service->getAttribute('constructor')) { - if (null !== $definition->getFactory()) { - throw new LogicException(\sprintf('The "%s" service cannot declare a factory as well as a constructor.', $service->getAttribute('id'))); - } - - $definition->setFactory([null, $constructor]); - } - - if ($configurators = $this->getChildren($service, 'configurator')) { - $configurator = $configurators[0]; - if ($function = $configurator->getAttribute('function')) { - $definition->setConfigurator($function); - } else { - if ($childService = $configurator->getAttribute('service')) { - $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } else { - $class = $configurator->getAttribute('class'); - } - - $definition->setConfigurator([$class, $configurator->getAttribute('method') ?: '__invoke']); - } - } - - foreach ($this->getChildren($service, 'call') as $call) { - $definition->addMethodCall( - $call->getAttribute('method'), - $this->getArgumentsAsPhp($call, 'argument', $file), - XmlUtils::phpize($call->getAttribute('returns-clone')) ?: false - ); - } - - $tags = $this->getChildren($service, 'tag'); - - foreach ($tags as $tag) { - $tagNameComesFromAttribute = $tag->childElementCount || '' === $tag->nodeValue; - if ('' === $tagName = $tagNameComesFromAttribute ? $tag->getAttribute('name') : $tag->nodeValue) { - throw new InvalidArgumentException(\sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $service->getAttribute('id'), $file)); - } - - $parameters = $this->getTagAttributes($tag, \sprintf('The attribute name of tag "%s" for service "%s" in %s must be a non-empty string.', $tagName, $service->getAttribute('id'), $file)); - foreach ($tag->attributes as $name => $node) { - if ($tagNameComesFromAttribute && 'name' === $name) { - continue; - } - - if (str_contains($name, '-') && !str_contains($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { - $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); - } - // keep not normalized key - $parameters[$name] = XmlUtils::phpize($node->nodeValue); - } - - $definition->addTag($tagName, $parameters); - } - - $definition->setTags(array_merge_recursive($definition->getTags(), $defaults->getTags())); - - $bindings = $this->getArgumentsAsPhp($service, 'bind', $file); - $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING; - foreach ($bindings as $argument => $value) { - $bindings[$argument] = new BoundArgument($value, true, $bindingType, $file); - } - - // deep clone, to avoid multiple process of the same instance in the passes - $bindings = array_merge(unserialize(serialize($defaults->getBindings())), $bindings); - - if ($bindings) { - $definition->setBindings($bindings); - } - - if ($decorates = $service->getAttribute('decorates')) { - $decorationOnInvalid = $service->getAttribute('decoration-on-invalid') ?: 'exception'; - if ('exception' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('ignore' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif ('null' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } else { - throw new InvalidArgumentException(\sprintf('Invalid value "%s" for attribute "decoration-on-invalid" on service "%s". Did you mean "exception", "ignore" or "null" in "%s"?', $decorationOnInvalid, $service->getAttribute('id'), $file)); - } - - $renameId = $service->hasAttribute('decoration-inner-name') ? $service->getAttribute('decoration-inner-name') : null; - $priority = $service->hasAttribute('decoration-priority') ? $service->getAttribute('decoration-priority') : 0; - - $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior); - } - - if ($callable = $this->getChildren($service, 'from-callable')) { - if ($definition instanceof ChildDefinition) { - throw new InvalidArgumentException(\sprintf('Attribute "parent" is unsupported when using "" on service "%s".', $service->getAttribute('id'))); - } - - foreach ([ - 'Attribute "synthetic"' => 'isSynthetic', - 'Attribute "file"' => 'getFile', - 'Tag ""' => 'getFactory', - 'Tag ""' => 'getArguments', - 'Tag ""' => 'getProperties', - 'Tag ""' => 'getConfigurator', - 'Tag ""' => 'getMethodCalls', - ] as $key => $method) { - if ($definition->$method()) { - throw new InvalidArgumentException($key.\sprintf(' is unsupported when using "" on service "%s".', $service->getAttribute('id'))); - } - } - - $definition->setFactory(['Closure', 'fromCallable']); - - if ('Closure' !== ($definition->getClass() ?? 'Closure')) { - $definition->setLazy(true); - } else { - $definition->setClass('Closure'); - } - - $callable = $callable[0]; - if ($function = $callable->getAttribute('function')) { - $definition->setArguments([$function]); - } elseif ($expression = $callable->getAttribute('expression')) { - if (!class_exists(Expression::class)) { - throw new \LogicException('The "expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - $definition->setArguments(['@='.$expression]); - } else { - if ($childService = $callable->getAttribute('service')) { - $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE); - } else { - $class = $callable->hasAttribute('class') ? $callable->getAttribute('class') : null; - } - - $definition->setArguments([[$class, $callable->getAttribute('method') ?: '__invoke']]); - } - } - - return $definition; - } - - /** - * Parses an XML file to a \DOMDocument. - * - * @throws InvalidArgumentException When loading of XML file returns error - */ - private function parseFileToDOM(string $file): \DOMDocument - { - try { - $dom = XmlUtils::loadFile($file, $this->validateSchema(...)); - } catch (\InvalidArgumentException $e) { - $invalidSecurityElements = []; - $errors = explode("\n", $e->getMessage()); - foreach ($errors as $i => $error) { - if (preg_match("#^\[ERROR 1871] Element '\{http://symfony\.com/schema/dic/security}([^']+)'#", $error, $matches)) { - $invalidSecurityElements[$i] = $matches[1]; - } - } - if ($invalidSecurityElements) { - $dom = XmlUtils::loadFile($file); - - foreach ($invalidSecurityElements as $errorIndex => $tagName) { - foreach ($dom->getElementsByTagNameNS('http://symfony.com/schema/dic/security', $tagName) as $element) { - if (!$parent = $element->parentNode) { - continue; - } - if ('http://symfony.com/schema/dic/security' !== $parent->namespaceURI) { - continue; - } - if ('provider' === $parent->localName || 'firewall' === $parent->localName) { - unset($errors[$errorIndex]); - } - } - } - } - if ($errors) { - throw new InvalidArgumentException(\sprintf('Unable to parse file "%s": ', $file).implode("\n", $errors), $e->getCode(), $e); - } - } - - $this->validateExtensions($dom, $file); - - return $dom; - } - - /** - * Processes anonymous services. - */ - private function processAnonymousServices(\DOMDocument $xml, string $file, ?\DOMNode $root = null): void - { - $definitions = []; - $count = 0; - $suffix = '~'.ContainerBuilder::hash($file); - - $xpath = new \DOMXPath($xml); - $xpath->registerNamespace('container', self::NS); - - // anonymous services as arguments/properties - if (false !== $nodes = $xpath->query('.//container:argument[@type="service"][not(@id)]|.//container:property[@type="service"][not(@id)]|.//container:bind[not(@id)]|.//container:factory[not(@service)]|.//container:configurator[not(@service)]', $root)) { - foreach ($nodes as $node) { - if ($services = $this->getChildren($node, 'service')) { - // give it a unique name - $id = \sprintf('.%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $services[0]->getAttribute('class')).$suffix); - $node->setAttribute('id', $id); - $node->setAttribute('service', $id); - - $definitions[$id] = [$services[0], $file]; - $services[0]->setAttribute('id', $id); - - // anonymous services are always private - // we could not use the constant false here, because of XML parsing - $services[0]->setAttribute('public', 'false'); - } - } - } - - // anonymous services "in the wild" - if (false !== $nodes = $xpath->query('.//container:services/container:service[not(@id)]', $root)) { - foreach ($nodes as $node) { - throw new InvalidArgumentException(\sprintf('Top-level services must have "id" attribute, none found in "%s" at line %d.', $file, $node->getLineNo())); - } - } - - // resolve definitions - uksort($definitions, 'strnatcmp'); - foreach (array_reverse($definitions) as $id => [$domElement, $file]) { - if (null !== $definition = $this->parseDefinition($domElement, $file, new Definition())) { - $this->setDefinition($id, $definition); - } - } - } - - private function getArgumentsAsPhp(\DOMElement $node, string $name, string $file, bool $isChildDefinition = false): array - { - $arguments = []; - foreach ($this->getChildren($node, $name) as $arg) { - if ($arg->hasAttribute('name')) { - $arg->setAttribute('key', $arg->getAttribute('name')); - } - - // this is used by ChildDefinition to overwrite a specific - // argument of the parent definition - if ($arg->hasAttribute('index')) { - $key = ($isChildDefinition ? 'index_' : '').$arg->getAttribute('index'); - } elseif (!$arg->hasAttribute('key')) { - // Append an empty argument, then fetch its key to overwrite it later - $arguments[] = null; - $keys = array_keys($arguments); - $key = array_pop($keys); - } else { - $key = $arg->getAttribute('key'); - } - - switch ($arg->getAttribute('key-type')) { - case 'binary': - if (false === $key = base64_decode($key, true)) { - throw new InvalidArgumentException(\sprintf('Tag "<%s>" with key-type="binary" does not have a valid base64 encoded key in "%s".', $name, $file)); - } - break; - case 'constant': - try { - $key = \constant(trim($key)); - } catch (\Error) { - throw new InvalidArgumentException(\sprintf('The key "%s" is not a valid constant in "%s".', $key, $file)); - } - break; - } - - $trim = $arg->hasAttribute('trim') && XmlUtils::phpize($arg->getAttribute('trim')); - $onInvalid = $arg->getAttribute('on-invalid'); - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - if ('ignore' == $onInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif ('ignore_uninitialized' == $onInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - } elseif ('null' == $onInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } - - switch ($type = $arg->getAttribute('type')) { - case 'service': - if ('' === $arg->getAttribute('id')) { - throw new InvalidArgumentException(\sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file)); - } - - $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior); - break; - case 'expression': - if (!class_exists(Expression::class)) { - throw new \LogicException('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - $arguments[$key] = new Expression($arg->nodeValue); - break; - case 'collection': - $arguments[$key] = $this->getArgumentsAsPhp($arg, $name, $file); - break; - case 'iterator': - $arg = $this->getArgumentsAsPhp($arg, $name, $file); - $arguments[$key] = new IteratorArgument($arg); - break; - case 'closure': - case 'service_closure': - if ('' !== $arg->getAttribute('id')) { - $arg = new Reference($arg->getAttribute('id'), $invalidBehavior); - } else { - $arg = $this->getArgumentsAsPhp($arg, $name, $file); - } - $arguments[$key] = match ($type) { - 'service_closure' => new ServiceClosureArgument($arg), - 'closure' => (new Definition('Closure')) - ->setFactory(['Closure', 'fromCallable']) - ->addArgument($arg), - }; - break; - case 'service_locator': - $arg = $this->getArgumentsAsPhp($arg, $name, $file); - $arguments[$key] = new ServiceLocatorArgument($arg); - break; - case 'tagged': - trigger_deprecation('symfony/dependency-injection', '7.2', 'Type "tagged" is deprecated for tag <%s>, use "tagged_iterator" instead in "%s".', $name, $file); - // no break - case 'tagged_iterator': - case 'tagged_locator': - $forLocator = 'tagged_locator' === $type; - - if (!$arg->getAttribute('tag')) { - throw new InvalidArgumentException(\sprintf('Tag "<%s>" with type="%s" has no or empty "tag" attribute in "%s".', $name, $type, $file)); - } - - $excludes = array_column($this->getChildren($arg, 'exclude'), 'nodeValue'); - if ($arg->hasAttribute('exclude')) { - if (\count($excludes) > 0) { - throw new InvalidArgumentException('You cannot use both the attribute "exclude" and tags at the same time.'); - } - $excludes = [$arg->getAttribute('exclude')]; - } - - $arguments[$key] = new TaggedIteratorArgument($arg->getAttribute('tag'), $arg->getAttribute('index-by') ?: null, $arg->getAttribute('default-index-method') ?: null, $forLocator, $arg->getAttribute('default-priority-method') ?: null, $excludes, !$arg->hasAttribute('exclude-self') || XmlUtils::phpize($arg->getAttribute('exclude-self'))); - - if ($forLocator) { - $arguments[$key] = new ServiceLocatorArgument($arguments[$key]); - } - break; - case 'binary': - if (false === $value = base64_decode($arg->nodeValue)) { - throw new InvalidArgumentException(\sprintf('Tag "<%s>" with type="binary" is not a valid base64 encoded string.', $name)); - } - $arguments[$key] = $value; - break; - case 'abstract': - $arguments[$key] = new AbstractArgument($arg->nodeValue); - break; - case 'string': - $arguments[$key] = $trim ? trim($arg->nodeValue) : $arg->nodeValue; - break; - case 'constant': - $arguments[$key] = \constant(trim($arg->nodeValue)); - break; - default: - $arguments[$key] = XmlUtils::phpize($trim ? trim($arg->nodeValue) : $arg->nodeValue); - } - } - - return $arguments; - } - - /** - * Get child elements by name. - * - * @return \DOMElement[] - */ - private function getChildren(\DOMNode $node, string $name): array - { - $children = []; - foreach ($node->childNodes as $child) { - if ($child instanceof \DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) { - $children[] = $child; - } - } - - return $children; - } - - private function getTagAttributes(\DOMNode $node, string $missingName): array - { - $parameters = []; - $children = $this->getChildren($node, 'attribute'); - - foreach ($children as $childNode) { - if ('' === $name = $childNode->getAttribute('name')) { - throw new InvalidArgumentException($missingName); - } - - if ($this->getChildren($childNode, 'attribute')) { - $parameters[$name] = $this->getTagAttributes($childNode, $missingName); - } else { - if (str_contains($name, '-') && !str_contains($name, '_') && !\array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { - $parameters[$normalizedName] = XmlUtils::phpize($childNode->nodeValue); - } - // keep not normalized key - $parameters[$name] = XmlUtils::phpize($childNode->nodeValue); - } - } - - return $parameters; - } - - /** - * Validates a documents XML schema. - * - * @throws RuntimeException When extension references a non-existent XSD file - */ - public function validateSchema(\DOMDocument $dom): bool - { - $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')]; - - if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) { - $items = preg_split('/\s+/', $element); - for ($i = 0, $nb = \count($items); $i < $nb; $i += 2) { - if (!$this->container->hasExtension($items[$i])) { - continue; - } - - if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { - $ns = $extension->getNamespace(); - $path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); - - if (!is_file($path)) { - throw new RuntimeException(\sprintf('Extension "%s" references a non-existent XSD file "%s".', get_debug_type($extension), $path)); - } - - $schemaLocations[$items[$i]] = $path; - } - } - } - - $tmpfiles = []; - $imports = ''; - foreach ($schemaLocations as $namespace => $location) { - $parts = explode('/', $location); - $locationstart = 'file:///'; - if (0 === stripos($location, 'phar://')) { - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - if ($tmpfile) { - copy($location, $tmpfile); - $tmpfiles[] = $tmpfile; - $parts = explode('/', str_replace('\\', '/', $tmpfile)); - } else { - array_shift($parts); - $locationstart = 'phar:///'; - } - } elseif ('\\' === \DIRECTORY_SEPARATOR && str_starts_with($location, '\\\\')) { - $locationstart = ''; - } - $drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; - $location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts)); - - $imports .= \sprintf(' '."\n", $namespace, $location); - } - - $source = << - - - -$imports - -EOF - ; - - if ($this->shouldEnableEntityLoader()) { - $disableEntities = libxml_disable_entity_loader(false); - $valid = @$dom->schemaValidateSource($source); - libxml_disable_entity_loader($disableEntities); - } else { - $valid = @$dom->schemaValidateSource($source); - } - foreach ($tmpfiles as $tmpfile) { - @unlink($tmpfile); - } - - return $valid; - } - - private function shouldEnableEntityLoader(): bool - { - static $dom, $schema; - if (null === $dom) { - $dom = new \DOMDocument(); - $dom->loadXML(''); - - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - register_shutdown_function(static function () use ($tmpfile) { - @unlink($tmpfile); - }); - $schema = ' - - -'; - file_put_contents($tmpfile, ' - - - -'); - } - - return !@$dom->schemaValidateSource($schema); - } - - private function validateAlias(\DOMElement $alias, string $file): void - { - foreach ($alias->attributes as $name => $node) { - if (!\in_array($name, ['alias', 'id', 'public'])) { - throw new InvalidArgumentException(\sprintf('Invalid attribute "%s" defined for alias "%s" in "%s".', $name, $alias->getAttribute('id'), $file)); - } - } - - foreach ($alias->childNodes as $child) { - if (!$child instanceof \DOMElement || self::NS !== $child->namespaceURI) { - continue; - } - if ('deprecated' !== $child->localName) { - throw new InvalidArgumentException(\sprintf('Invalid child element "%s" defined for alias "%s" in "%s".', $child->localName, $alias->getAttribute('id'), $file)); - } - } - } - - /** - * Validates an extension. - * - * @throws InvalidArgumentException When no extension is found corresponding to a tag - */ - private function validateExtensions(\DOMDocument $dom, string $file): void - { - foreach ($dom->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) { - continue; - } - - // can it be handled by an extension? - if (!$this->prepend && !$this->container->hasExtension($node->namespaceURI)) { - $extensionNamespaces = array_filter(array_map(fn (ExtensionInterface $ext) => $ext->getNamespace(), $this->container->getExtensions())); - throw new InvalidArgumentException(UndefinedExtensionHandler::getErrorMessage($node->tagName, $file, $node->namespaceURI, $extensionNamespaces)); - } - } - } - - /** - * Loads from an extension. - */ - private function loadFromExtensions(\DOMDocument $xml): void - { - foreach ($xml->documentElement->childNodes as $node) { - if (!$node instanceof \DOMElement || self::NS === $node->namespaceURI) { - continue; - } - - $values = static::convertDomElementToArray($node); - if (!\is_array($values)) { - $values = []; - } - - $this->loadExtensionConfig($node->namespaceURI, $values); - } - - $this->loadExtensionConfigs(); - } - - /** - * Converts a \DOMElement object to a PHP array. - * - * The following rules applies during the conversion: - * - * * Each tag is converted to a key value or an array - * if there is more than one "value" - * - * * The content of a tag is set under a "value" key (bar) - * if the tag also has some nested tags - * - * * The attributes are converted to keys () - * - * * The nested-tags are converted to keys (bar) - * - * @param \DOMElement $element A \DOMElement instance - */ - public static function convertDomElementToArray(\DOMElement $element): mixed - { - return XmlUtils::convertDomElementToArray($element, false); - } -} diff --git a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php deleted file mode 100644 index c3b1bf25..00000000 --- a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php +++ /dev/null @@ -1,998 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\Loader; - -use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Argument\AbstractArgument; -use Symfony\Component\DependencyInjection\Argument\BoundArgument; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; -use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\ExpressionLanguage\Expression; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Tag\TaggedValue; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileLoader loads YAML files service definitions. - * - * @author Fabien Potencier - */ -class YamlFileLoader extends FileLoader -{ - private const SERVICE_KEYWORDS = [ - 'alias' => 'alias', - 'parent' => 'parent', - 'class' => 'class', - 'shared' => 'shared', - 'synthetic' => 'synthetic', - 'lazy' => 'lazy', - 'public' => 'public', - 'abstract' => 'abstract', - 'deprecated' => 'deprecated', - 'factory' => 'factory', - 'file' => 'file', - 'arguments' => 'arguments', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'decorates' => 'decorates', - 'decoration_inner_name' => 'decoration_inner_name', - 'decoration_priority' => 'decoration_priority', - 'decoration_on_invalid' => 'decoration_on_invalid', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - 'constructor' => 'constructor', - ]; - - private const PROTOTYPE_KEYWORDS = [ - 'resource' => 'resource', - 'namespace' => 'namespace', - 'exclude' => 'exclude', - 'parent' => 'parent', - 'shared' => 'shared', - 'lazy' => 'lazy', - 'public' => 'public', - 'abstract' => 'abstract', - 'deprecated' => 'deprecated', - 'factory' => 'factory', - 'arguments' => 'arguments', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - 'constructor' => 'constructor', - ]; - - private const INSTANCEOF_KEYWORDS = [ - 'shared' => 'shared', - 'lazy' => 'lazy', - 'public' => 'public', - 'properties' => 'properties', - 'configurator' => 'configurator', - 'calls' => 'calls', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'bind' => 'bind', - 'constructor' => 'constructor', - ]; - - private const DEFAULTS_KEYWORDS = [ - 'public' => 'public', - 'tags' => 'tags', - 'autowire' => 'autowire', - 'autoconfigure' => 'autoconfigure', - 'bind' => 'bind', - ]; - - protected bool $autoRegisterAliasesForSinglyImplementedInterfaces = false; - - private YamlParser $yamlParser; - private int $anonymousServicesCount; - private string $anonymousServicesSuffix; - - public function load(mixed $resource, ?string $type = null): mixed - { - $path = $this->locator->locate($resource); - - $content = $this->loadFile($path); - - $this->container->fileExists($path); - - // empty file - if (null === $content) { - return null; - } - - ++$this->importing; - try { - $this->loadContent($content, $path); - - // per-env configuration - if ($this->env && isset($content['when@'.$this->env])) { - if (!\is_array($content['when@'.$this->env])) { - throw new InvalidArgumentException(\sprintf('The "when@%s" key should contain an array in "%s". Check your YAML syntax.', $this->env, $path)); - } - - $env = $this->env; - $this->env = null; - try { - $this->loadContent($content['when@'.$env], $path); - } finally { - $this->env = $env; - } - } - } finally { - --$this->importing; - } - $this->loadExtensionConfigs(); - - return null; - } - - private function loadContent(array $content, string $path): void - { - // imports - $this->parseImports($content, $path); - - // parameters - if (isset($content['parameters'])) { - if (!\is_array($content['parameters'])) { - throw new InvalidArgumentException(\sprintf('The "parameters" key should contain an array in "%s". Check your YAML syntax.', $path)); - } - - foreach ($content['parameters'] as $key => $value) { - $this->container->setParameter($key, $this->resolveServices($value, $path, true)); - } - } - - // extensions - $this->loadFromExtensions($content); - - // services - $this->anonymousServicesCount = 0; - $this->anonymousServicesSuffix = '~'.ContainerBuilder::hash($path); - $this->setCurrentDir(\dirname($path)); - try { - $this->parseDefinitions($content, $path); - } finally { - $this->instanceof = []; - $this->registerAliasesForSinglyImplementedInterfaces(); - } - } - - public function supports(mixed $resource, ?string $type = null): bool - { - if (!\is_string($resource)) { - return false; - } - - if (null === $type && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yaml', 'yml'], true)) { - return true; - } - - return \in_array($type, ['yaml', 'yml'], true); - } - - private function parseImports(array $content, string $file): void - { - if (!isset($content['imports'])) { - return; - } - - if (!\is_array($content['imports'])) { - throw new InvalidArgumentException(\sprintf('The "imports" key should contain an array in "%s". Check your YAML syntax.', $file)); - } - - $defaultDirectory = \dirname($file); - foreach ($content['imports'] as $import) { - if (!\is_array($import)) { - $import = ['resource' => $import]; - } - if (!isset($import['resource'])) { - throw new InvalidArgumentException(\sprintf('An import should provide a resource in "%s". Check your YAML syntax.', $file)); - } - - $this->setCurrentDir($defaultDirectory); - $this->import($import['resource'], $import['type'] ?? null, $import['ignore_errors'] ?? false, $file); - } - } - - private function parseDefinitions(array $content, string $file, bool $trackBindings = true): void - { - if (!isset($content['services'])) { - return; - } - - if (!\is_array($content['services'])) { - throw new InvalidArgumentException(\sprintf('The "services" key should contain an array in "%s". Check your YAML syntax.', $file)); - } - - if (\array_key_exists('_instanceof', $content['services'])) { - $instanceof = $content['services']['_instanceof']; - unset($content['services']['_instanceof']); - - if (!\is_array($instanceof)) { - throw new InvalidArgumentException(\sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', get_debug_type($instanceof), $file)); - } - $this->instanceof = []; - $this->isLoadingInstanceof = true; - foreach ($instanceof as $id => $service) { - if (!$service || !\is_array($service)) { - throw new InvalidArgumentException(\sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in "%s". Check your YAML syntax.', $id, $file)); - } - if (\is_string($service) && str_starts_with($service, '@')) { - throw new InvalidArgumentException(\sprintf('Type definition "%s" cannot be an alias within "_instanceof" in "%s". Check your YAML syntax.', $id, $file)); - } - $this->parseDefinition($id, $service, $file, [], false, $trackBindings); - } - } - - $this->isLoadingInstanceof = false; - $defaults = $this->parseDefaults($content, $file); - foreach ($content['services'] as $id => $service) { - $this->parseDefinition($id, $service, $file, $defaults, false, $trackBindings); - } - } - - /** - * @throws InvalidArgumentException - */ - private function parseDefaults(array &$content, string $file): array - { - if (!\array_key_exists('_defaults', $content['services'])) { - return []; - } - $defaults = $content['services']['_defaults']; - unset($content['services']['_defaults']); - - if (!\is_array($defaults)) { - throw new InvalidArgumentException(\sprintf('Service "_defaults" key must be an array, "%s" given in "%s".', get_debug_type($defaults), $file)); - } - - foreach ($defaults as $key => $default) { - if (!isset(self::DEFAULTS_KEYWORDS[$key])) { - throw new InvalidArgumentException(\sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".', $key, $file, implode('", "', self::DEFAULTS_KEYWORDS))); - } - } - - if (isset($defaults['tags'])) { - if (!\is_array($tags = $defaults['tags'])) { - throw new InvalidArgumentException(\sprintf('Parameter "tags" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file)); - } - - foreach ($tags as $tag) { - if (!\is_array($tag)) { - $tag = ['name' => $tag]; - } - - if (1 === \count($tag) && \is_array(current($tag))) { - $name = key($tag); - $tag = current($tag); - } else { - if (!isset($tag['name'])) { - throw new InvalidArgumentException(\sprintf('A "tags" entry in "_defaults" is missing a "name" key in "%s".', $file)); - } - $name = $tag['name']; - unset($tag['name']); - } - - if (!\is_string($name) || '' === $name) { - throw new InvalidArgumentException(\sprintf('The tag name in "_defaults" must be a non-empty string in "%s".', $file)); - } - - $this->validateAttributes(\sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in "%s". Check your YAML syntax.', $name, '%s', $file), $tag); - } - } - - if (isset($defaults['bind'])) { - if (!\is_array($defaults['bind'])) { - throw new InvalidArgumentException(\sprintf('Parameter "bind" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file)); - } - - foreach ($this->resolveServices($defaults['bind'], $file) as $argument => $value) { - $defaults['bind'][$argument] = new BoundArgument($value, true, BoundArgument::DEFAULTS_BINDING, $file); - } - } - - return $defaults; - } - - private function isUsingShortSyntax(array $service): bool - { - foreach ($service as $key => $value) { - if (\is_string($key) && ('' === $key || ('$' !== $key[0] && !str_contains($key, '\\')))) { - return false; - } - } - - return true; - } - - /** - * @throws InvalidArgumentException When tags are invalid - */ - private function parseDefinition(string $id, array|string|null $service, string $file, array $defaults, bool $return = false, bool $trackBindings = true): Definition|Alias|null - { - if (preg_match('/^_[a-zA-Z0-9_]*$/', $id)) { - throw new InvalidArgumentException(\sprintf('Service names that start with an underscore are reserved. Rename the "%s" service or define it in XML instead.', $id)); - } - - if (\is_string($service) && str_starts_with($service, '@')) { - $alias = new Alias(substr($service, 1)); - - if (isset($defaults['public'])) { - $alias->setPublic($defaults['public']); - } - - return $return ? $alias : $this->container->setAlias($id, $alias); - } - - if (\is_array($service) && $this->isUsingShortSyntax($service)) { - $service = ['arguments' => $service]; - } - - if (!\is_array($service ??= [])) { - throw new InvalidArgumentException(\sprintf('A service definition must be an array or a string starting with "@" but "%s" found for service "%s" in "%s". Check your YAML syntax.', get_debug_type($service), $id, $file)); - } - - if (isset($service['stack'])) { - if (!\is_array($service['stack'])) { - throw new InvalidArgumentException(\sprintf('A stack must be an array of definitions, "%s" given for service "%s" in "%s". Check your YAML syntax.', get_debug_type($service), $id, $file)); - } - - $stack = []; - - foreach ($service['stack'] as $k => $frame) { - if (\is_array($frame) && 1 === \count($frame) && !isset(self::SERVICE_KEYWORDS[key($frame)])) { - $frame = [ - 'class' => key($frame), - 'arguments' => current($frame), - ]; - } - - if (\is_array($frame) && isset($frame['stack'])) { - throw new InvalidArgumentException(\sprintf('Service stack "%s" cannot contain another stack in "%s".', $id, $file)); - } - - $definition = $this->parseDefinition($id.'" at index "'.$k, $frame, $file, $defaults, true); - - if ($definition instanceof Definition) { - $definition->setInstanceofConditionals($this->instanceof); - } - - $stack[$k] = $definition; - } - - if ($diff = array_diff(array_keys($service), ['stack', 'public', 'deprecated'])) { - throw new InvalidArgumentException(\sprintf('Invalid attribute "%s"; supported ones are "public" and "deprecated" for service "%s" in "%s". Check your YAML syntax.', implode('", "', $diff), $id, $file)); - } - - $service = [ - 'parent' => '', - 'arguments' => $stack, - 'tags' => ['container.stack'], - 'public' => $service['public'] ?? null, - 'deprecated' => $service['deprecated'] ?? null, - ]; - } - - $definition = isset($service[0]) && $service[0] instanceof Definition ? array_shift($service) : null; - $return = null === $definition ? $return : true; - - if (isset($service['from_callable'])) { - foreach (['alias', 'parent', 'synthetic', 'factory', 'file', 'arguments', 'properties', 'configurator', 'calls'] as $key) { - if (isset($service['factory'])) { - throw new InvalidArgumentException(\sprintf('The configuration key "%s" is unsupported for the service "%s" when using "from_callable" in "%s".', $key, $id, $file)); - } - } - - if ('Closure' !== $service['class'] ??= 'Closure') { - $service['lazy'] = true; - } - - $service['factory'] = ['Closure', 'fromCallable']; - $service['arguments'] = [$service['from_callable']]; - unset($service['from_callable']); - } - - $this->checkDefinition($id, $service, $file); - - if (isset($service['alias'])) { - $alias = new Alias($service['alias']); - - if (isset($service['public'])) { - $alias->setPublic($service['public']); - } elseif (isset($defaults['public'])) { - $alias->setPublic($defaults['public']); - } - - foreach ($service as $key => $value) { - if (!\in_array($key, ['alias', 'public', 'deprecated'])) { - throw new InvalidArgumentException(\sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias", "public" and "deprecated".', $key, $id, $file)); - } - - if ('deprecated' === $key) { - $deprecation = \is_array($value) ? $value : ['message' => $value]; - - if (!isset($deprecation['package'])) { - throw new InvalidArgumentException(\sprintf('Missing attribute "package" of the "deprecated" option in "%s".', $file)); - } - - if (!isset($deprecation['version'])) { - throw new InvalidArgumentException(\sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file)); - } - - $alias->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message'] ?? ''); - } - } - - return $return ? $alias : $this->container->setAlias($id, $alias); - } - - $changes = []; - if (null !== $definition) { - $changes = $definition->getChanges(); - } elseif ($this->isLoadingInstanceof) { - $definition = new ChildDefinition(''); - } elseif (isset($service['parent'])) { - if ('' !== $service['parent'] && '@' === $service['parent'][0]) { - throw new InvalidArgumentException(\sprintf('The value of the "parent" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['parent'], substr($service['parent'], 1))); - } - - $definition = new ChildDefinition($service['parent']); - } else { - $definition = new Definition(); - } - - if (isset($defaults['public'])) { - $definition->setPublic($defaults['public']); - } - if (isset($defaults['autowire'])) { - $definition->setAutowired($defaults['autowire']); - } - if (isset($defaults['autoconfigure'])) { - $definition->setAutoconfigured($defaults['autoconfigure']); - } - - $definition->setChanges($changes); - - if (isset($service['class'])) { - $definition->setClass($service['class']); - } - - if (isset($service['shared'])) { - $definition->setShared($service['shared']); - } - - if (isset($service['synthetic'])) { - $definition->setSynthetic($service['synthetic']); - } - - if (isset($service['lazy'])) { - $definition->setLazy((bool) $service['lazy']); - if (\is_string($service['lazy'])) { - $definition->addTag('proxy', ['interface' => $service['lazy']]); - } - } - - if (isset($service['public'])) { - $definition->setPublic($service['public']); - } - - if (isset($service['abstract'])) { - $definition->setAbstract($service['abstract']); - } - - if (isset($service['deprecated'])) { - $deprecation = \is_array($service['deprecated']) ? $service['deprecated'] : ['message' => $service['deprecated']]; - - if (!isset($deprecation['package'])) { - throw new InvalidArgumentException(\sprintf('Missing attribute "package" of the "deprecated" option in "%s".', $file)); - } - - if (!isset($deprecation['version'])) { - throw new InvalidArgumentException(\sprintf('Missing attribute "version" of the "deprecated" option in "%s".', $file)); - } - - $definition->setDeprecated($deprecation['package'], $deprecation['version'], $deprecation['message'] ?? ''); - } - - if (isset($service['factory'])) { - $definition->setFactory($this->parseCallable($service['factory'], 'factory', $id, $file)); - } - - if (isset($service['constructor'])) { - if (null !== $definition->getFactory()) { - throw new LogicException(\sprintf('The "%s" service cannot declare a factory as well as a constructor.', $id)); - } - - $definition->setFactory([null, $service['constructor']]); - } - - if (isset($service['file'])) { - $definition->setFile($service['file']); - } - - if (isset($service['arguments'])) { - $definition->setArguments($this->resolveServices($service['arguments'], $file)); - } - - if (isset($service['properties'])) { - $definition->setProperties($this->resolveServices($service['properties'], $file)); - } - - if (isset($service['configurator'])) { - $definition->setConfigurator($this->parseCallable($service['configurator'], 'configurator', $id, $file)); - } - - if (isset($service['calls'])) { - if (!\is_array($service['calls'])) { - throw new InvalidArgumentException(\sprintf('Parameter "calls" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - foreach ($service['calls'] as $k => $call) { - if (!\is_array($call) && (!\is_string($k) || !$call instanceof TaggedValue)) { - throw new InvalidArgumentException(\sprintf('Invalid method call for service "%s": expected map or array, "%s" given in "%s".', $id, $call instanceof TaggedValue ? '!'.$call->getTag() : get_debug_type($call), $file)); - } - - if (\is_string($k)) { - throw new InvalidArgumentException(\sprintf('Invalid method call for service "%s", did you forget a leading dash before "%s: ..." in "%s"?', $id, $k, $file)); - } - - if (isset($call['method']) && \is_string($call['method'])) { - $method = $call['method']; - $args = $call['arguments'] ?? []; - $returnsClone = $call['returns_clone'] ?? false; - } else { - if (1 === \count($call) && \is_string(key($call))) { - $method = key($call); - $args = $call[$method]; - - if ($args instanceof TaggedValue) { - if ('returns_clone' !== $args->getTag()) { - throw new InvalidArgumentException(\sprintf('Unsupported tag "!%s", did you mean "!returns_clone" for service "%s" in "%s"?', $args->getTag(), $id, $file)); - } - - $returnsClone = true; - $args = $args->getValue(); - } else { - $returnsClone = false; - } - } elseif (empty($call[0])) { - throw new InvalidArgumentException(\sprintf('Invalid call for service "%s": the method must be defined as the first index of an array or as the only key of a map in "%s".', $id, $file)); - } else { - $method = $call[0]; - $args = $call[1] ?? []; - $returnsClone = $call[2] ?? false; - } - } - - if (!\is_array($args)) { - throw new InvalidArgumentException(\sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in "%s". Check your YAML syntax.', $method, $id, $file)); - } - - $args = $this->resolveServices($args, $file); - $definition->addMethodCall($method, $args, $returnsClone); - } - } - - $tags = $service['tags'] ?? []; - if (!\is_array($tags)) { - throw new InvalidArgumentException(\sprintf('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - if (isset($defaults['tags'])) { - $tags = array_merge($tags, $defaults['tags']); - } - - foreach ($tags as $tag) { - if (!\is_array($tag)) { - $tag = ['name' => $tag]; - } - - if (1 === \count($tag) && \is_array(current($tag))) { - $name = key($tag); - $tag = current($tag); - } else { - if (!isset($tag['name'])) { - throw new InvalidArgumentException(\sprintf('A "tags" entry is missing a "name" key for service "%s" in "%s".', $id, $file)); - } - $name = $tag['name']; - unset($tag['name']); - } - - if (!\is_string($name) || '' === $name) { - throw new InvalidArgumentException(\sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $id, $file)); - } - - $this->validateAttributes(\sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in "%s". Check your YAML syntax.', $id, $name, '%s', $file), $tag); - - $definition->addTag($name, $tag); - } - - if (null !== $decorates = $service['decorates'] ?? null) { - if ('' !== $decorates && '@' === $decorates[0]) { - throw new InvalidArgumentException(\sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($decorates, 1))); - } - - $decorationOnInvalid = \array_key_exists('decoration_on_invalid', $service) ? $service['decoration_on_invalid'] : 'exception'; - if ('exception' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } elseif ('ignore' === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } elseif (null === $decorationOnInvalid) { - $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; - } elseif ('null' === $decorationOnInvalid) { - throw new InvalidArgumentException(\sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean null (without quotes) in "%s"?', $decorationOnInvalid, $id, $file)); - } else { - throw new InvalidArgumentException(\sprintf('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean "exception", "ignore" or null in "%s"?', $decorationOnInvalid, $id, $file)); - } - - $renameId = $service['decoration_inner_name'] ?? null; - $priority = $service['decoration_priority'] ?? 0; - - $definition->setDecoratedService($decorates, $renameId, $priority, $invalidBehavior); - } - - if (isset($service['autowire'])) { - $definition->setAutowired($service['autowire']); - } - - if (isset($defaults['bind']) || isset($service['bind'])) { - // deep clone, to avoid multiple process of the same instance in the passes - $bindings = $definition->getBindings(); - $bindings += isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : []; - - if (isset($service['bind'])) { - if (!\is_array($service['bind'])) { - throw new InvalidArgumentException(\sprintf('Parameter "bind" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - $bindings = array_merge($bindings, $this->resolveServices($service['bind'], $file)); - $bindingType = $this->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING; - foreach ($bindings as $argument => $value) { - if (!$value instanceof BoundArgument) { - $bindings[$argument] = new BoundArgument($value, $trackBindings, $bindingType, $file); - } - } - } - - $definition->setBindings($bindings); - } - - if (isset($service['autoconfigure'])) { - $definition->setAutoconfigured($service['autoconfigure']); - } - - if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) { - throw new InvalidArgumentException(\sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - if ($return) { - if (\array_key_exists('resource', $service)) { - throw new InvalidArgumentException(\sprintf('Invalid "resource" attribute found for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - - return $definition; - } - - if (\array_key_exists('resource', $service)) { - if (!\is_string($service['resource'])) { - throw new InvalidArgumentException(\sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file)); - } - $exclude = $service['exclude'] ?? null; - $namespace = $service['namespace'] ?? $id; - $this->registerClasses($definition, $namespace, $service['resource'], $exclude, $file); - } else { - $this->setDefinition($id, $definition); - } - - return null; - } - - /** - * @throws InvalidArgumentException When errors occur - */ - private function parseCallable(mixed $callable, string $parameter, string $id, string $file): string|array|Reference - { - if (\is_string($callable)) { - if (str_starts_with($callable, '@=')) { - if ('factory' !== $parameter) { - throw new InvalidArgumentException(\sprintf('Using expressions in "%s" for the "%s" service is not supported in "%s".', $parameter, $id, $file)); - } - if (!class_exists(Expression::class)) { - throw new \LogicException('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - return $callable; - } - - if ('' !== $callable && '@' === $callable[0]) { - if (!str_contains($callable, ':')) { - return [$this->resolveServices($callable, $file), '__invoke']; - } - - throw new InvalidArgumentException(\sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s" in "%s").', $parameter, $id, $callable, substr($callable, 1), $file)); - } - - return $callable; - } - - if (\is_array($callable)) { - if (isset($callable[0]) && isset($callable[1])) { - return [$this->resolveServices($callable[0], $file), $callable[1]]; - } - - if ('factory' === $parameter && isset($callable[1]) && null === $callable[0]) { - return $callable; - } - - throw new InvalidArgumentException(\sprintf('Parameter "%s" must contain an array with two elements for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file)); - } - - throw new InvalidArgumentException(\sprintf('Parameter "%s" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file)); - } - - /** - * Loads a YAML file. - * - * @throws InvalidArgumentException when the given file is not a local file or when it does not exist - */ - protected function loadFile(string $file): ?array - { - if (!class_exists(YamlParser::class)) { - throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed. Try running "composer require symfony/yaml".'); - } - - if (!stream_is_local($file)) { - throw new InvalidArgumentException(\sprintf('This is not a local file "%s".', $file)); - } - - if (!is_file($file)) { - throw new InvalidArgumentException(\sprintf('The file "%s" does not exist.', $file)); - } - - $this->yamlParser ??= new YamlParser(); - - try { - $configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS); - } catch (ParseException $e) { - throw new InvalidArgumentException(\sprintf('The file "%s" does not contain valid YAML: ', $file).$e->getMessage(), 0, $e); - } - - return $this->validate($configuration, $file); - } - - /** - * Validates a YAML file. - * - * @throws InvalidArgumentException When service file is not valid - */ - private function validate(mixed $content, string $file): ?array - { - if (null === $content) { - return $content; - } - - if (!\is_array($content)) { - throw new InvalidArgumentException(\sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file)); - } - - foreach ($content as $namespace => $data) { - if (\in_array($namespace, ['imports', 'parameters', 'services']) || str_starts_with($namespace, 'when@')) { - continue; - } - - if (!$this->prepend && !$this->container->hasExtension($namespace)) { - $extensionNamespaces = array_filter(array_map(fn (ExtensionInterface $ext) => $ext->getAlias(), $this->container->getExtensions())); - throw new InvalidArgumentException(UndefinedExtensionHandler::getErrorMessage($namespace, $file, $namespace, $extensionNamespaces)); - } - } - - return $content; - } - - private function resolveServices(mixed $value, string $file, bool $isParameter = false): mixed - { - if ($value instanceof TaggedValue) { - $argument = $value->getValue(); - - if ('closure' === $value->getTag()) { - $argument = $this->resolveServices($argument, $file, $isParameter); - - return (new Definition('Closure')) - ->setFactory(['Closure', 'fromCallable']) - ->addArgument($argument); - } - if ('iterator' === $value->getTag()) { - if (!\is_array($argument)) { - throw new InvalidArgumentException(\sprintf('"!iterator" tag only accepts sequences in "%s".', $file)); - } - $argument = $this->resolveServices($argument, $file, $isParameter); - - return new IteratorArgument($argument); - } - if ('service_closure' === $value->getTag()) { - $argument = $this->resolveServices($argument, $file, $isParameter); - - return new ServiceClosureArgument($argument); - } - if ('service_locator' === $value->getTag()) { - if (!\is_array($argument)) { - throw new InvalidArgumentException(\sprintf('"!service_locator" tag only accepts maps in "%s".', $file)); - } - - $argument = $this->resolveServices($argument, $file, $isParameter); - - return new ServiceLocatorArgument($argument); - } - if (\in_array($value->getTag(), ['tagged', 'tagged_iterator', 'tagged_locator'], true)) { - if ('tagged' === $value->getTag()) { - trigger_deprecation('symfony/dependency-injection', '7.2', 'Using "!tagged" is deprecated, use "!tagged_iterator" instead in "%s".', $file); - } - - $forLocator = 'tagged_locator' === $value->getTag(); - - if (\is_array($argument) && isset($argument['tag']) && $argument['tag']) { - if ($diff = array_diff(array_keys($argument), $supportedKeys = ['tag', 'index_by', 'default_index_method', 'default_priority_method', 'exclude', 'exclude_self'])) { - throw new InvalidArgumentException(\sprintf('"!%s" tag contains unsupported key "%s"; supported ones are "%s".', $value->getTag(), implode('", "', $diff), implode('", "', $supportedKeys))); - } - - $argument = new TaggedIteratorArgument($argument['tag'], $argument['index_by'] ?? null, $argument['default_index_method'] ?? null, $forLocator, $argument['default_priority_method'] ?? null, (array) ($argument['exclude'] ?? null), $argument['exclude_self'] ?? true); - } elseif (\is_string($argument) && $argument) { - $argument = new TaggedIteratorArgument($argument, null, null, $forLocator); - } else { - throw new InvalidArgumentException(\sprintf('"!%s" tags only accept a non empty string or an array with a key "tag" in "%s".', $value->getTag(), $file)); - } - - if ($forLocator) { - $argument = new ServiceLocatorArgument($argument); - } - - return $argument; - } - if ('service' === $value->getTag()) { - if ($isParameter) { - throw new InvalidArgumentException(\sprintf('Using an anonymous service in a parameter is not allowed in "%s".', $file)); - } - - $isLoadingInstanceof = $this->isLoadingInstanceof; - $this->isLoadingInstanceof = false; - $instanceof = $this->instanceof; - $this->instanceof = []; - - $id = \sprintf('.%d_%s', ++$this->anonymousServicesCount, preg_replace('/^.*\\\\/', '', $argument['class'] ?? '').$this->anonymousServicesSuffix); - $this->parseDefinition($id, $argument, $file, []); - - if (!$this->container->hasDefinition($id)) { - throw new InvalidArgumentException(\sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file)); - } - - $this->container->getDefinition($id); - - $this->isLoadingInstanceof = $isLoadingInstanceof; - $this->instanceof = $instanceof; - - return new Reference($id); - } - if ('abstract' === $value->getTag()) { - return new AbstractArgument($value->getValue()); - } - - throw new InvalidArgumentException(\sprintf('Unsupported tag "!%s".', $value->getTag())); - } - - if (\is_array($value)) { - foreach ($value as $k => $v) { - $value[$k] = $this->resolveServices($v, $file, $isParameter); - } - } elseif (\is_string($value) && str_starts_with($value, '@=')) { - if ($isParameter) { - throw new InvalidArgumentException(\sprintf('Using expressions in parameters is not allowed in "%s".', $file)); - } - - if (!class_exists(Expression::class)) { - throw new \LogicException('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'); - } - - return new Expression(substr($value, 2)); - } elseif (\is_string($value) && str_starts_with($value, '@')) { - if (str_starts_with($value, '@>')) { - $argument = $this->resolveServices(substr_replace($value, '', 1, 1), $file, $isParameter); - - return new ServiceClosureArgument($argument); - } - if (str_starts_with($value, '@@')) { - $value = substr($value, 1); - $invalidBehavior = null; - } elseif (str_starts_with($value, '@!')) { - $value = substr($value, 2); - $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; - } elseif (str_starts_with($value, '@?')) { - $value = substr($value, 2); - $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; - } else { - $value = substr($value, 1); - $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; - } - - if (null !== $invalidBehavior) { - $value = new Reference($value, $invalidBehavior); - } - } - - return $value; - } - - private function loadFromExtensions(array $content): void - { - foreach ($content as $namespace => $values) { - if (\in_array($namespace, ['imports', 'parameters', 'services']) || str_starts_with($namespace, 'when@')) { - continue; - } - - if (!\is_array($values)) { - $values = []; - } - - $this->loadExtensionConfig($namespace, $values); - } - - $this->loadExtensionConfigs(); - } - - private function checkDefinition(string $id, array $definition, string $file): void - { - if ($this->isLoadingInstanceof) { - $keywords = self::INSTANCEOF_KEYWORDS; - } elseif (isset($definition['resource']) || isset($definition['namespace'])) { - $keywords = self::PROTOTYPE_KEYWORDS; - } else { - $keywords = self::SERVICE_KEYWORDS; - } - - foreach ($definition as $key => $value) { - if (!isset($keywords[$key])) { - throw new InvalidArgumentException(\sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords))); - } - } - } - - private function validateAttributes(string $message, array $attributes, array $path = []): void - { - foreach ($attributes as $name => $value) { - if (\is_array($value)) { - $this->validateAttributes($message, $value, [...$path, $name]); - } elseif (!\is_scalar($value ?? '')) { - $name = implode('.', [...$path, $name]); - throw new InvalidArgumentException(\sprintf($message, $name)); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd b/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd deleted file mode 100644 index befdb658..00000000 --- a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/symfony/dependency-injection/Parameter.php b/vendor/symfony/dependency-injection/Parameter.php deleted file mode 100644 index 9b65c514..00000000 --- a/vendor/symfony/dependency-injection/Parameter.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Parameter represents a parameter reference. - * - * @author Fabien Potencier - */ -class Parameter -{ - public function __construct( - private string $id, - ) { - } - - public function __toString(): string - { - return $this->id; - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php b/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php deleted file mode 100644 index ed4513b7..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ContainerBag.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Container; - -/** - * @author Nicolas Grekas - */ -class ContainerBag extends FrozenParameterBag implements ContainerBagInterface -{ - public function __construct( - private Container $container, - ) { - } - - public function all(): array - { - return $this->container->getParameterBag()->all(); - } - - public function get(string $name): array|bool|string|int|float|\UnitEnum|null - { - return $this->container->getParameter($name); - } - - public function has(string $name): bool - { - return $this->container->hasParameter($name); - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php b/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php deleted file mode 100644 index 2b92207d..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ContainerBagInterface.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; - -/** - * ContainerBagInterface is the interface implemented by objects that manage service container parameters. - * - * @author Nicolas Grekas - */ -interface ContainerBagInterface extends ContainerInterface -{ - /** - * Gets the service container parameters. - */ - public function all(): array; - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @template TValue of array|scalar - * - * @param TValue $value - * - * @psalm-return (TValue is scalar ? array|scalar : array) - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - */ - public function resolveValue(mixed $value): mixed; - - /** - * Escape parameter placeholders %. - */ - public function escapeValue(mixed $value): mixed; - - /** - * Unescape parameter placeholders %. - */ - public function unescapeValue(mixed $value): mixed; -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php deleted file mode 100644 index 8800259f..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * @author Nicolas Grekas - */ -class EnvPlaceholderParameterBag extends ParameterBag -{ - private string $envPlaceholderUniquePrefix; - private array $envPlaceholders = []; - private array $unusedEnvPlaceholders = []; - private array $providedTypes = []; - - private static int $counter = 0; - - public function get(string $name): array|bool|string|int|float|\UnitEnum|null - { - if (str_starts_with($name, 'env(') && str_ends_with($name, ')') && 'env()' !== $name) { - $env = substr($name, 4, -1); - - if (isset($this->envPlaceholders[$env])) { - foreach ($this->envPlaceholders[$env] as $placeholder) { - return $placeholder; // return first result - } - } - if (isset($this->unusedEnvPlaceholders[$env])) { - foreach ($this->unusedEnvPlaceholders[$env] as $placeholder) { - return $placeholder; // return first result - } - } - if (!preg_match('/^(?:[-.\w\\\\]*+:)*+\w*+$/', $env)) { - throw new InvalidArgumentException(\sprintf('The given env var name "%s" contains invalid characters (allowed characters: letters, digits, hyphens, backslashes and colons).', $name)); - } - if ($this->has($name) && null !== ($defaultValue = parent::get($name)) && !\is_string($defaultValue)) { - throw new RuntimeException(\sprintf('The default value of an env() parameter must be a string or null, but "%s" given to "%s".', get_debug_type($defaultValue), $name)); - } - - $uniqueName = hash('xxh128', $name.'_'.self::$counter++); - $placeholder = \sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.\\', '____'), $uniqueName); - $this->envPlaceholders[$env][$placeholder] = $placeholder; - - return $placeholder; - } - - return parent::get($name); - } - - /** - * Gets the common env placeholder prefix for env vars created by this bag. - */ - public function getEnvPlaceholderUniquePrefix(): string - { - if (!isset($this->envPlaceholderUniquePrefix)) { - $reproducibleEntropy = unserialize(serialize($this->parameters)); - array_walk_recursive($reproducibleEntropy, function (&$v) { $v = null; }); - $this->envPlaceholderUniquePrefix = 'env_'.substr(hash('xxh128', serialize($reproducibleEntropy)), -16); - } - - return $this->envPlaceholderUniquePrefix; - } - - /** - * Returns the map of env vars used in the resolved parameter values to their placeholders. - * - * @return string[][] A map of env var names to their placeholders - */ - public function getEnvPlaceholders(): array - { - return $this->envPlaceholders; - } - - public function getUnusedEnvPlaceholders(): array - { - return $this->unusedEnvPlaceholders; - } - - public function clearUnusedEnvPlaceholders(): void - { - $this->unusedEnvPlaceholders = []; - } - - /** - * Merges the env placeholders of another EnvPlaceholderParameterBag. - */ - public function mergeEnvPlaceholders(self $bag): void - { - if ($newPlaceholders = $bag->getEnvPlaceholders()) { - $this->envPlaceholders += $newPlaceholders; - - foreach ($newPlaceholders as $env => $placeholders) { - $this->envPlaceholders[$env] += $placeholders; - } - } - - if ($newUnusedPlaceholders = $bag->getUnusedEnvPlaceholders()) { - $this->unusedEnvPlaceholders += $newUnusedPlaceholders; - - foreach ($newUnusedPlaceholders as $env => $placeholders) { - $this->unusedEnvPlaceholders[$env] += $placeholders; - } - } - } - - /** - * Maps env prefixes to their corresponding PHP types. - */ - public function setProvidedTypes(array $providedTypes): void - { - $this->providedTypes = $providedTypes; - } - - /** - * Gets the PHP types corresponding to env() parameter prefixes. - * - * @return string[][] - */ - public function getProvidedTypes(): array - { - return $this->providedTypes; - } - - public function resolve(): void - { - if ($this->resolved) { - return; - } - parent::resolve(); - - foreach ($this->envPlaceholders as $env => $placeholders) { - if ($this->has($name = "env($env)") && null !== ($default = $this->parameters[$name]) && !\is_string($default)) { - throw new RuntimeException(\sprintf('The default value of env parameter "%s" must be a string or null, "%s" given.', $env, get_debug_type($default))); - } - } - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php deleted file mode 100644 index 375a1d5a..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\LogicException; - -/** - * Holds read-only parameters. - * - * @author Fabien Potencier - */ -class FrozenParameterBag extends ParameterBag -{ - /** - * For performance reasons, the constructor assumes that - * all keys are already lowercased. - * - * This is always the case when used internally. - */ - public function __construct( - array $parameters = [], - protected array $deprecatedParameters = [], - protected array $nonEmptyParameters = [], - ) { - $this->parameters = $parameters; - $this->resolved = true; - } - - public function clear(): never - { - throw new LogicException('Impossible to call clear() on a frozen ParameterBag.'); - } - - public function add(array $parameters): never - { - throw new LogicException('Impossible to call add() on a frozen ParameterBag.'); - } - - public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): never - { - throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); - } - - public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.'): never - { - throw new LogicException('Impossible to call deprecate() on a frozen ParameterBag.'); - } - - public function cannotBeEmpty(string $name, string $message = 'A non-empty parameter "%s" is required.'): never - { - throw new LogicException('Impossible to call cannotBeEmpty() on a frozen ParameterBag.'); - } - - public function remove(string $name): never - { - throw new LogicException('Impossible to call remove() on a frozen ParameterBag.'); - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php deleted file mode 100644 index 22be5c29..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php +++ /dev/null @@ -1,300 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\EmptyParameterValueException; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; - -/** - * Holds parameters. - * - * @author Fabien Potencier - */ -class ParameterBag implements ParameterBagInterface -{ - protected array $parameters = []; - protected bool $resolved = false; - protected array $deprecatedParameters = []; - protected array $nonEmptyParameters = []; - - public function __construct(array $parameters = []) - { - $this->add($parameters); - } - - public function clear(): void - { - $this->parameters = []; - } - - public function add(array $parameters): void - { - foreach ($parameters as $key => $value) { - $this->set($key, $value); - } - } - - public function all(): array - { - return $this->parameters; - } - - public function allDeprecated(): array - { - return $this->deprecatedParameters; - } - - public function allNonEmpty(): array - { - return $this->nonEmptyParameters; - } - - public function get(string $name): array|bool|string|int|float|\UnitEnum|null - { - if (!\array_key_exists($name, $this->parameters)) { - if (!$name) { - throw new ParameterNotFoundException($name); - } - - if (\array_key_exists($name, $this->nonEmptyParameters)) { - throw new ParameterNotFoundException($name, extraMessage: $this->nonEmptyParameters[$name]); - } - - $alternatives = []; - foreach ($this->parameters as $key => $parameterValue) { - $lev = levenshtein($name, $key); - if ($lev <= \strlen($name) / 3 || str_contains($key, $name)) { - $alternatives[] = $key; - } - } - - $nonNestedAlternative = null; - if (!\count($alternatives) && str_contains($name, '.')) { - $namePartsLength = array_map('strlen', explode('.', $name)); - $key = substr($name, 0, -1 * (1 + array_pop($namePartsLength))); - while (\count($namePartsLength)) { - if ($this->has($key)) { - if (\is_array($this->get($key))) { - $nonNestedAlternative = $key; - } - break; - } - - $key = substr($key, 0, -1 * (1 + array_pop($namePartsLength))); - } - } - - throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative); - } - - if (isset($this->deprecatedParameters[$name])) { - trigger_deprecation(...$this->deprecatedParameters[$name]); - } - - if (\array_key_exists($name, $this->nonEmptyParameters) && (null === $this->parameters[$name] || '' === $this->parameters[$name] || [] === $this->parameters[$name])) { - throw new EmptyParameterValueException($this->nonEmptyParameters[$name]); - } - - return $this->parameters[$name]; - } - - public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void - { - if (is_numeric($name)) { - throw new InvalidArgumentException(\sprintf('The parameter name "%s" cannot be numeric.', $name)); - } - - $this->parameters[$name] = $value; - } - - /** - * Deprecates a service container parameter. - * - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function deprecate(string $name, string $package, string $version, string $message = 'The parameter "%s" is deprecated.'): void - { - if (!\array_key_exists($name, $this->parameters)) { - throw new ParameterNotFoundException($name); - } - - $this->deprecatedParameters[$name] = [$package, $version, $message, $name]; - } - - public function cannotBeEmpty(string $name, string $message): void - { - $this->nonEmptyParameters[$name] = $message; - } - - public function has(string $name): bool - { - return \array_key_exists($name, $this->parameters); - } - - public function remove(string $name): void - { - unset($this->parameters[$name], $this->deprecatedParameters[$name], $this->nonEmptyParameters[$name]); - } - - public function resolve(): void - { - if ($this->resolved) { - return; - } - - $parameters = []; - foreach ($this->parameters as $key => $value) { - try { - $value = $this->resolveValue($value); - $parameters[$key] = $this->unescapeValue($value); - } catch (ParameterNotFoundException $e) { - $e->setSourceKey($key); - - throw $e; - } - } - - $this->parameters = $parameters; - $this->resolved = true; - } - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @template TValue of array|scalar - * - * @param TValue $value - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) - * - * @psalm-return (TValue is scalar ? array|scalar : array) - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - * @throws ParameterCircularReferenceException if a circular reference if detected - * @throws RuntimeException when a given parameter has a type problem - */ - public function resolveValue(mixed $value, array $resolving = []): mixed - { - if (\is_array($value)) { - $args = []; - foreach ($value as $key => $v) { - $resolvedKey = \is_string($key) ? $this->resolveValue($key, $resolving) : $key; - if (!\is_scalar($resolvedKey) && !$resolvedKey instanceof \Stringable) { - throw new RuntimeException(\sprintf('Array keys must be a scalar-value, but found key "%s" to resolve to type "%s".', $key, get_debug_type($resolvedKey))); - } - - $args[$resolvedKey] = $this->resolveValue($v, $resolving); - } - - return $args; - } - - if (!\is_string($value) || '' === $value || !str_contains($value, '%')) { - return $value; - } - - return $this->resolveString($value, $resolving); - } - - /** - * Resolves parameters inside a string. - * - * @param array $resolving An array of keys that are being resolved (used internally to detect circular references) - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - * @throws ParameterCircularReferenceException if a circular reference if detected - * @throws RuntimeException when a given parameter has a type problem - */ - public function resolveString(string $value, array $resolving = []): mixed - { - // we do this to deal with non string values (Boolean, integer, ...) - // as the preg_replace_callback throw an exception when trying - // a non-string in a parameter value - if (preg_match('/^%([^%\s]+)%$/', $value, $match)) { - $key = $match[1]; - - if (isset($resolving[$key])) { - throw new ParameterCircularReferenceException(array_keys($resolving)); - } - - $resolving[$key] = true; - - return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving); - } - - return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving, $value) { - // skip %% - if (!isset($match[1])) { - return '%%'; - } - - $key = $match[1]; - if (isset($resolving[$key])) { - throw new ParameterCircularReferenceException(array_keys($resolving)); - } - - $resolved = $this->get($key); - - if (!\is_string($resolved) && !is_numeric($resolved)) { - throw new RuntimeException(\sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".', $key, get_debug_type($resolved), $value)); - } - - $resolved = (string) $resolved; - $resolving[$key] = true; - - return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving); - }, $value); - } - - public function isResolved(): bool - { - return $this->resolved; - } - - public function escapeValue(mixed $value): mixed - { - if (\is_string($value)) { - return str_replace('%', '%%', $value); - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[$k] = $this->escapeValue($v); - } - - return $result; - } - - return $value; - } - - public function unescapeValue(mixed $value): mixed - { - if (\is_string($value)) { - return str_replace('%%', '%', $value); - } - - if (\is_array($value)) { - $result = []; - foreach ($value as $k => $v) { - $result[$k] = $this->unescapeValue($v); - } - - return $result; - } - - return $value; - } -} diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php deleted file mode 100644 index 41f2a066..00000000 --- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBagInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection\ParameterBag; - -use Symfony\Component\DependencyInjection\Exception\LogicException; -use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; - -/** - * ParameterBagInterface is the interface implemented by objects that manage service container parameters. - * - * @author Fabien Potencier - */ -interface ParameterBagInterface -{ - /** - * Clears all parameters. - * - * @throws LogicException if the ParameterBagInterface cannot be cleared - */ - public function clear(): void; - - /** - * Adds parameters to the service container parameters. - * - * @throws LogicException if the parameter cannot be added - */ - public function add(array $parameters): void; - - /** - * Gets the service container parameters. - */ - public function all(): array; - - /** - * Gets a service container parameter. - * - * @throws ParameterNotFoundException if the parameter is not defined - */ - public function get(string $name): array|bool|string|int|float|\UnitEnum|null; - - /** - * Removes a parameter. - */ - public function remove(string $name): void; - - /** - * Sets a service container parameter. - * - * @throws LogicException if the parameter cannot be set - */ - public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void; - - /** - * Returns true if a parameter name is defined. - */ - public function has(string $name): bool; - - /** - * Replaces parameter placeholders (%name%) by their values for all parameters. - */ - public function resolve(): void; - - /** - * Replaces parameter placeholders (%name%) by their values. - * - * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist - */ - public function resolveValue(mixed $value): mixed; - - /** - * Escape parameter placeholders %. - */ - public function escapeValue(mixed $value): mixed; - - /** - * Unescape parameter placeholders %. - */ - public function unescapeValue(mixed $value): mixed; -} diff --git a/vendor/symfony/dependency-injection/README.md b/vendor/symfony/dependency-injection/README.md deleted file mode 100644 index fa6719a7..00000000 --- a/vendor/symfony/dependency-injection/README.md +++ /dev/null @@ -1,14 +0,0 @@ -DependencyInjection Component -============================= - -The DependencyInjection component allows you to standardize and centralize the -way objects are constructed in your application. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/dependency_injection.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/dependency-injection/Reference.php b/vendor/symfony/dependency-injection/Reference.php deleted file mode 100644 index df7d173c..00000000 --- a/vendor/symfony/dependency-injection/Reference.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Reference represents a service reference. - * - * @author Fabien Potencier - */ -class Reference -{ - public function __construct( - private string $id, - private int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, - ) { - } - - public function __toString(): string - { - return $this->id; - } - - /** - * Returns the behavior to be used when the service does not exist. - */ - public function getInvalidBehavior(): int - { - return $this->invalidBehavior; - } -} diff --git a/vendor/symfony/dependency-injection/ReverseContainer.php b/vendor/symfony/dependency-injection/ReverseContainer.php deleted file mode 100644 index 574f5799..00000000 --- a/vendor/symfony/dependency-injection/ReverseContainer.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerInterface; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; - -/** - * Turns public and "container.reversible" services back to their ids. - * - * @author Nicolas Grekas - */ -final class ReverseContainer -{ - private \Closure $getServiceId; - - public function __construct( - private Container $serviceContainer, - private ContainerInterface $reversibleLocator, - private string $tagName = 'container.reversible', - ) { - $this->getServiceId = \Closure::bind(fn (object $service): ?string => array_search($service, $this->services, true) ?: array_search($service, $this->privates, true) ?: null, $serviceContainer, Container::class); - } - - /** - * Returns the id of the passed object when it exists as a service. - * - * To be reversible, services need to be either public or be tagged with "container.reversible". - */ - public function getId(object $service): ?string - { - if ($this->serviceContainer === $service) { - return 'service_container'; - } - - if (null === $id = ($this->getServiceId)($service)) { - return null; - } - - if ($this->serviceContainer->has($id) || $this->reversibleLocator->has($id)) { - return $id; - } - - return null; - } - - /** - * @throws ServiceNotFoundException When the service is not reversible - */ - public function getService(string $id): object - { - if ($this->reversibleLocator->has($id)) { - return $this->reversibleLocator->get($id); - } - - if (isset($this->serviceContainer->getRemovedIds()[$id])) { - throw new ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service is private and cannot be accessed by reference. You should either make it public, or tag it as "%s".', $id, $this->tagName)); - } - - return $this->serviceContainer->get($id); - } -} diff --git a/vendor/symfony/dependency-injection/ServiceLocator.php b/vendor/symfony/dependency-injection/ServiceLocator.php deleted file mode 100644 index 740cdc74..00000000 --- a/vendor/symfony/dependency-injection/ServiceLocator.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; -use Symfony\Contracts\Service\ServiceCollectionInterface; -use Symfony\Contracts\Service\ServiceLocatorTrait; -use Symfony\Contracts\Service\ServiceSubscriberInterface; - -/** - * @author Robin Chalas - * @author Nicolas Grekas - * - * @template-covariant T of mixed - * - * @implements ServiceCollectionInterface - */ -class ServiceLocator implements ServiceCollectionInterface -{ - use ServiceLocatorTrait { - get as private doGet; - } - - private ?string $externalId = null; - private ?Container $container = null; - - public function get(string $id): mixed - { - if (!$this->externalId) { - return $this->doGet($id); - } - - try { - return $this->doGet($id); - } catch (RuntimeException $e) { - $what = \sprintf('service "%s" required by "%s"', $id, $this->externalId); - $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage()); - - if ($e->getMessage() === $message) { - $message = \sprintf('Cannot resolve %s: %s', $what, $message); - } - - $r = new \ReflectionProperty($e, 'message'); - $r->setValue($e, $message); - - throw $e; - } - } - - public function __invoke(string $id): mixed - { - return isset($this->factories[$id]) ? $this->get($id) : null; - } - - /** - * @internal - */ - public function withContext(string $externalId, Container $container): static - { - $locator = clone $this; - $locator->externalId = $externalId; - $locator->container = $container; - - return $locator; - } - - public function count(): int - { - return \count($this->getProvidedServices()); - } - - public function getIterator(): \Traversable - { - foreach ($this->getProvidedServices() as $id => $config) { - yield $id => $this->get($id); - } - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if ($this->loading) { - $msg = \sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $this->formatAlternatives()); - - return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $msg); - } - - $class = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 4); - $class = isset($class[3]['object']) ? $class[3]['object']::class : null; - $externalId = $this->externalId ?: $class; - - $msg = []; - $msg[] = \sprintf('Service "%s" not found:', $id); - - if (!$this->container) { - $class = null; - } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { - $msg[] = 'even though it exists in the app\'s container,'; - } else { - try { - $this->container->get($id); - $class = null; - } catch (ServiceNotFoundException $e) { - if ($e->getAlternatives()) { - $msg[] = \sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or')); - } else { - $class = null; - } - } - } - if ($externalId) { - $msg[] = \sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); - } else { - $msg[] = \sprintf('the current service locator %s', $this->formatAlternatives()); - } - - if (!$class) { - // no-op - } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) { - $msg[] = \sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); - } else { - $msg[] = 'Try using dependency injection instead.'; - } - - return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], implode(' ', $msg)); - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new ServiceCircularReferenceException($id, $path); - } - - private function formatAlternatives(?array $alternatives = null, string $separator = 'and'): string - { - $format = '"%s"%s'; - if (null === $alternatives) { - if (!$alternatives = array_keys($this->factories)) { - return 'is empty...'; - } - $format = \sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : ''); - } - $last = array_pop($alternatives); - - return \sprintf($format, $alternatives ? implode('", "', $alternatives) : $last, $alternatives ? \sprintf(' %s "%s"', $separator, $last) : ''); - } -} diff --git a/vendor/symfony/dependency-injection/StaticEnvVarLoader.php b/vendor/symfony/dependency-injection/StaticEnvVarLoader.php deleted file mode 100644 index be1ada58..00000000 --- a/vendor/symfony/dependency-injection/StaticEnvVarLoader.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -class StaticEnvVarLoader implements EnvVarLoaderInterface -{ - private array $envVars; - - public function __construct(private EnvVarLoaderInterface $envVarLoader) - { - } - - public function loadEnvVars(): array - { - return $this->envVars ??= $this->envVarLoader->loadEnvVars(); - } -} diff --git a/vendor/symfony/dependency-injection/TaggedContainerInterface.php b/vendor/symfony/dependency-injection/TaggedContainerInterface.php deleted file mode 100644 index a108a996..00000000 --- a/vendor/symfony/dependency-injection/TaggedContainerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * TaggedContainerInterface is the interface implemented when a container knows how to deals with tags. - * - * @author Fabien Potencier - */ -interface TaggedContainerInterface extends ContainerInterface -{ - /** - * Returns service ids for a given tag. - * - * @param string $name The tag name - */ - public function findTaggedServiceIds(string $name): array; -} diff --git a/vendor/symfony/dependency-injection/TypedReference.php b/vendor/symfony/dependency-injection/TypedReference.php deleted file mode 100644 index ff77a433..00000000 --- a/vendor/symfony/dependency-injection/TypedReference.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Represents a PHP type-hinted service reference. - * - * @author Nicolas Grekas - */ -class TypedReference extends Reference -{ - private ?string $name; - - /** - * @param string $id The service identifier - * @param string $type The PHP type of the identified service - * @param int $invalidBehavior The behavior when the service does not exist - * @param string|null $name The name of the argument targeting the service - * @param array $attributes The attributes to be used - */ - public function __construct( - string $id, - private string $type, - int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, - ?string $name = null, - private array $attributes = [], - ) { - $this->name = $type === $id ? $name : null; - parent::__construct($id, $invalidBehavior); - } - - public function getType(): string - { - return $this->type; - } - - public function getName(): ?string - { - return $this->name; - } - - public function getAttributes(): array - { - return $this->attributes; - } -} diff --git a/vendor/symfony/dependency-injection/Variable.php b/vendor/symfony/dependency-injection/Variable.php deleted file mode 100644 index 43d56077..00000000 --- a/vendor/symfony/dependency-injection/Variable.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * Represents a variable. - * - * $var = new Variable('a'); - * - * will be dumped as - * - * $a - * - * by the PHP dumper. - * - * @author Johannes M. Schmitt - */ -class Variable -{ - public function __construct( - private string $name, - ) { - } - - public function __toString(): string - { - return $this->name; - } -} diff --git a/vendor/symfony/dependency-injection/composer.json b/vendor/symfony/dependency-injection/composer.json deleted file mode 100644 index 46075108..00000000 --- a/vendor/symfony/dependency-injection/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "symfony/dependency-injection", - "type": "library", - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.2", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4.20|^7.2.5" - }, - "require-dev": { - "symfony/yaml": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.4", - "symfony/finder": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "symfony/service-implementation": "1.1|2.0|3.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e261..00000000 --- a/vendor/symfony/deprecation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE deleted file mode 100644 index 0ed3a246..00000000 --- a/vendor/symfony/deprecation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md deleted file mode 100644 index 9814864c..00000000 --- a/vendor/symfony/deprecation-contracts/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Symfony Deprecation Contracts -============================= - -A generic function and convention to trigger deprecation notices. - -This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices. - -By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, -the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments. - -The function requires at least 3 arguments: - - the name of the Composer package that is triggering the deprecation - - the version of the package that introduced the deprecation - - the message of the deprecation - - more arguments can be provided: they will be inserted in the message using `printf()` formatting - -Example: -```php -trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin'); -``` - -This will generate the following message: -`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` - -While not recommended, the deprecation notices can be completely ignored by declaring an empty -`function trigger_deprecation() {}` in your application. diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json deleted file mode 100644 index 5533b5c3..00000000 --- a/vendor/symfony/deprecation-contracts/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/deprecation-contracts", - "type": "library", - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.1" - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "3.6-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php deleted file mode 100644 index 2d56512b..00000000 --- a/vendor/symfony/deprecation-contracts/function.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (!function_exists('trigger_deprecation')) { - /** - * Triggers a silenced deprecation notice. - * - * @param string $package The name of the Composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The message of the deprecation - * @param mixed ...$args Values to insert in the message using printf() formatting - * - * @author Nicolas Grekas - */ - function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void - { - @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); - } -} diff --git a/vendor/symfony/dotenv/CHANGELOG.md b/vendor/symfony/dotenv/CHANGELOG.md deleted file mode 100644 index a587fbac..00000000 --- a/vendor/symfony/dotenv/CHANGELOG.md +++ /dev/null @@ -1,50 +0,0 @@ -CHANGELOG -========= - -7.1 ---- - - * Add `SYMFONY_DOTENV_PATH` variable with the path to the `.env` file loaded by `Dotenv::loadEnv()` or `Dotenv::bootEnv()` - -6.2 ---- - - * Add a new `filter` argument to `debug:dotenv` command to filter variable names - -5.4 ---- - - * Add `dotenv:dump` command to compile the contents of the .env files into a PHP-optimized file called `.env.local.php` - * Add `debug:dotenv` command to list all dotenv files with variables and values - * Add `$overrideExistingVars` on `Dotenv::bootEnv()` and `Dotenv::loadEnv()` - -5.1.0 ------ - - * added `Dotenv::bootEnv()` to check for `.env.local.php` before calling `Dotenv::loadEnv()` - * added `Dotenv::setProdEnvs()` and `Dotenv::usePutenv()` - * made Dotenv's constructor accept `$envKey` and `$debugKey` arguments, to define - the name of the env vars that configure the env name and debug settings - * deprecated passing `$usePutenv` argument to Dotenv's constructor - -5.0.0 ------ - - * using `putenv()` is disabled by default - -4.3.0 ------ - - * deprecated use of `putenv()` by default. This feature will be opted-in with a constructor argument to `Dotenv` - -4.2.0 ------ - - * added `Dotenv::overload()` and `$overrideExistingVars` as optional parameter of `Dotenv::populate()` - * added `Dotenv::loadEnv()` to load a .env file and its corresponding .env.local, .env.$env and .env.$env.local files if they exist - -3.3.0 ------ - - * [BC BREAK] Since v3.3.7, the latest Dotenv files override the previous ones. Real env vars are not affected and are not overridden. - * added the component diff --git a/vendor/symfony/dotenv/Command/DebugCommand.php b/vendor/symfony/dotenv/Command/DebugCommand.php deleted file mode 100644 index b5b4f51f..00000000 --- a/vendor/symfony/dotenv/Command/DebugCommand.php +++ /dev/null @@ -1,222 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Command; - -use Symfony\Component\Console\Attribute\AsCommand; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Dotenv\Dotenv; - -/** - * A console command to debug current dotenv files with variables and values. - * - * @author Christopher Hertel - */ -#[AsCommand(name: 'debug:dotenv', description: 'List all dotenv files with variables and values')] -final class DebugCommand extends Command -{ - /** - * @deprecated since Symfony 6.1 - */ - protected static $defaultName = 'debug:dotenv'; - - /** - * @deprecated since Symfony 6.1 - */ - protected static $defaultDescription = 'List all dotenv files with variables and values'; - - public function __construct( - private string $kernelEnvironment, - private string $projectDirectory, - ) { - parent::__construct(); - } - - protected function configure(): void - { - $this - ->setDefinition([ - new InputArgument('filter', InputArgument::OPTIONAL, 'The name of an environment variable or a filter.', null, $this->getAvailableVars(...)), - ]) - ->setHelp(<<<'EOT' -The %command.full_name% command displays all the environment variables configured by dotenv: - - php %command.full_name% - -To get specific variables, specify its full or partial name: - - php %command.full_name% FOO_BAR - -EOT - ); - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $io->title('Dotenv Variables & Files'); - - if (!\array_key_exists('SYMFONY_DOTENV_VARS', $_SERVER)) { - $io->error('Dotenv component is not initialized.'); - - return 1; - } - - if (!$filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? null) { - $dotenvPath = $this->projectDirectory; - - if (is_file($composerFile = $this->projectDirectory.'/composer.json')) { - $runtimeConfig = json_decode(file_get_contents($composerFile), true)['extra']['runtime'] ?? []; - - if (isset($runtimeConfig['dotenv_path'])) { - $dotenvPath = $this->projectDirectory.'/'.$runtimeConfig['dotenv_path']; - } - } - - $filePath = $dotenvPath.'/.env'; - } - - $envFiles = $this->getEnvFiles($filePath); - $availableFiles = array_filter($envFiles, 'is_file'); - - if (\in_array(\sprintf('%s.local.php', $filePath), $availableFiles, true)) { - $io->warning(\sprintf('Due to existing dump file (%s.local.php) all other dotenv files are skipped.', $this->getRelativeName($filePath))); - } - - if (is_file($filePath) && is_file(\sprintf('%s.dist', $filePath))) { - $io->warning(\sprintf('The file %s.dist gets skipped due to the existence of %1$s.', $this->getRelativeName($filePath))); - } - - $io->section('Scanned Files (in descending priority)'); - $io->listing(array_map(fn (string $envFile) => \in_array($envFile, $availableFiles, true) - ? \sprintf('✓ %s', $this->getRelativeName($envFile)) - : \sprintf('⨯ %s', $this->getRelativeName($envFile)), $envFiles)); - - $nameFilter = $input->getArgument('filter'); - $variables = $this->getVariables($availableFiles, $nameFilter); - - $io->section('Variables'); - - if ($variables || null === $nameFilter) { - $io->table( - array_merge(['Variable', 'Value'], array_map($this->getRelativeName(...), $availableFiles)), - $variables - ); - - $io->comment('Note that values might be different between web and CLI.'); - } else { - $io->warning(\sprintf('No variables match the given filter "%s".', $nameFilter)); - } - - return 0; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('filter')) { - $suggestions->suggestValues($this->getAvailableVars()); - } - } - - private function getVariables(array $envFiles, ?string $nameFilter): array - { - $variables = []; - $fileValues = []; - $dotenvVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? '')); - - foreach ($envFiles as $envFile) { - $fileValues[$envFile] = $this->loadValues($envFile); - $variables += $fileValues[$envFile]; - } - - foreach ($variables as $var => $varDetails) { - if (null !== $nameFilter && 0 !== stripos($var, $nameFilter)) { - unset($variables[$var]); - continue; - } - - $realValue = $_SERVER[$var] ?? ''; - $varDetails = [$var, ''.OutputFormatter::escape($realValue).'']; - $varSeen = !isset($dotenvVars[$var]); - - foreach ($envFiles as $envFile) { - if (null === $value = $fileValues[$envFile][$var] ?? null) { - $varDetails[] = 'n/a'; - continue; - } - - $shortenedValue = OutputFormatter::escape($this->getHelper('formatter')->truncate($value, 30)); - $varDetails[] = $value === $realValue && !$varSeen ? ''.$shortenedValue.'' : $shortenedValue; - $varSeen = $varSeen || $value === $realValue; - } - - $variables[$var] = $varDetails; - } - - ksort($variables); - - return $variables; - } - - private function getAvailableVars(): array - { - $filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? $this->projectDirectory.\DIRECTORY_SEPARATOR.'.env'; - $envFiles = $this->getEnvFiles($filePath); - - return array_keys($this->getVariables(array_filter($envFiles, 'is_file'), null)); - } - - private function getEnvFiles(string $filePath): array - { - $files = [ - \sprintf('%s.local.php', $filePath), - \sprintf('%s.%s.local', $filePath, $this->kernelEnvironment), - \sprintf('%s.%s', $filePath, $this->kernelEnvironment), - ]; - - if ('test' !== $this->kernelEnvironment) { - $files[] = \sprintf('%s.local', $filePath); - } - - if (!is_file($filePath) && is_file(\sprintf('%s.dist', $filePath))) { - $files[] = \sprintf('%s.dist', $filePath); - } else { - $files[] = $filePath; - } - - return $files; - } - - private function getRelativeName(string $filePath): string - { - if (str_starts_with($filePath, $this->projectDirectory)) { - return substr($filePath, \strlen($this->projectDirectory) + 1); - } - - return basename($filePath); - } - - private function loadValues(string $filePath): array - { - if (str_ends_with($filePath, '.php')) { - return include $filePath; - } - - return (new Dotenv())->parse(file_get_contents($filePath)); - } -} diff --git a/vendor/symfony/dotenv/Command/DotenvDumpCommand.php b/vendor/symfony/dotenv/Command/DotenvDumpCommand.php deleted file mode 100644 index 8a367a3a..00000000 --- a/vendor/symfony/dotenv/Command/DotenvDumpCommand.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Command; - -use Symfony\Component\Console\Attribute\AsCommand; -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; -use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; -use Symfony\Component\Dotenv\Dotenv; - -/** - * A console command to compile .env files into a PHP-optimized file called .env.local.php. - * - * @internal - */ -#[Autoconfigure(bind: ['$projectDir' => '%kernel.project_dir%', '$defaultEnv' => '%kernel.environment%'])] -#[AsCommand(name: 'dotenv:dump', description: 'Compile .env files to .env.local.php')] -final class DotenvDumpCommand extends Command -{ - public function __construct( - private string $projectDir, - private ?string $defaultEnv = null, - ) { - parent::__construct(); - } - - protected function configure(): void - { - $this - ->setDefinition([ - new InputArgument('env', null === $this->defaultEnv ? InputArgument::REQUIRED : InputArgument::OPTIONAL, 'The application environment to dump .env files for - e.g. "prod".'), - ]) - ->addOption('empty', null, InputOption::VALUE_NONE, 'Ignore the content of .env files') - ->setHelp(<<<'EOT' -The %command.name% command compiles .env files into a PHP-optimized file called .env.local.php. - - %command.full_name% -EOT - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $config = []; - if (is_file($projectDir = $this->projectDir)) { - $config = ['dotenv_path' => basename($projectDir)]; - $projectDir = \dirname($projectDir); - } - - $composerFile = $projectDir.'/composer.json'; - $config += (is_file($composerFile) ? json_decode(file_get_contents($composerFile), true) : [])['extra']['runtime'] ?? []; - $dotenvPath = $projectDir.'/'.($config['dotenv_path'] ?? '.env'); - $env = $input->getArgument('env') ?? $this->defaultEnv; - $envKey = $config['env_var_name'] ?? 'APP_ENV'; - - if ($input->getOption('empty')) { - $vars = [$envKey => $env]; - } else { - $vars = $this->loadEnv($dotenvPath, $env, $config); - $env = $vars[$envKey]; - } - - $vars = var_export($vars, true); - $vars = <<writeln(\sprintf('Successfully dumped .env files in .env.local.php for the %s environment.', $env)); - - return 0; - } - - private function loadEnv(string $dotenvPath, string $env, array $config): array - { - $envKey = $config['env_var_name'] ?? 'APP_ENV'; - $testEnvs = $config['test_envs'] ?? ['test']; - - $dotenv = new Dotenv($envKey); - - $globalsBackup = [$_SERVER, $_ENV]; - unset($_SERVER[$envKey]); - $_ENV = [$envKey => $env]; - $_SERVER['SYMFONY_DOTENV_VARS'] = implode(',', array_keys($_SERVER)); - - try { - $dotenv->loadEnv($dotenvPath, null, 'dev', $testEnvs); - unset($_ENV['SYMFONY_DOTENV_VARS']); - unset($_ENV['SYMFONY_DOTENV_PATH']); - - return $_ENV; - } finally { - [$_SERVER, $_ENV] = $globalsBackup; - } - } -} diff --git a/vendor/symfony/dotenv/Dotenv.php b/vendor/symfony/dotenv/Dotenv.php deleted file mode 100644 index a6673657..00000000 --- a/vendor/symfony/dotenv/Dotenv.php +++ /dev/null @@ -1,573 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv; - -use Symfony\Component\Dotenv\Exception\FormatException; -use Symfony\Component\Dotenv\Exception\FormatExceptionContext; -use Symfony\Component\Dotenv\Exception\PathException; -use Symfony\Component\Process\Exception\ExceptionInterface as ProcessException; -use Symfony\Component\Process\Process; - -/** - * Manages .env files. - * - * @author Fabien Potencier - * @author Kévin Dunglas - */ -final class Dotenv -{ - public const VARNAME_REGEX = '(?i:_?[A-Z][A-Z0-9_]*+)'; - public const STATE_VARNAME = 0; - public const STATE_VALUE = 1; - - private string $path; - private int $cursor; - private int $lineno; - private string $data; - private int $end; - private array $values = []; - private array $prodEnvs = ['prod']; - private bool $usePutenv = false; - - public function __construct( - private string $envKey = 'APP_ENV', - private string $debugKey = 'APP_DEBUG', - ) { - } - - /** - * @return $this - */ - public function setProdEnvs(array $prodEnvs): static - { - $this->prodEnvs = $prodEnvs; - - return $this; - } - - /** - * @param bool $usePutenv If `putenv()` should be used to define environment variables or not. - * Beware that `putenv()` is not thread safe, that's why it's not enabled by default - * - * @return $this - */ - public function usePutenv(bool $usePutenv = true): static - { - $this->usePutenv = $usePutenv; - - return $this; - } - - /** - * Loads one or several .env files. - * - * @param string $path A file to load - * @param string ...$extraPaths A list of additional files to load - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function load(string $path, string ...$extraPaths): void - { - $this->doLoad(false, \func_get_args()); - } - - /** - * Loads a .env file and the corresponding .env.local, .env.$env and .env.$env.local files if they exist. - * - * .env.local is always ignored in test env because tests should produce the same results for everyone. - * .env.dist is loaded when it exists and .env is not found. - * - * @param string $path A file to load - * @param string|null $envKey The name of the env vars that defines the app env - * @param string $defaultEnv The app env to use when none is defined - * @param array $testEnvs A list of app envs for which .env.local should be ignored - * @param bool $overrideExistingVars Whether existing environment variables set by the system should be overridden - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function loadEnv(string $path, ?string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void - { - $this->populatePath($path); - - $k = $envKey ?? $this->envKey; - - if (is_file($path) || !is_file($p = "$path.dist")) { - $this->doLoad($overrideExistingVars, [$path]); - } else { - $this->doLoad($overrideExistingVars, [$p]); - } - - if (null === $env = $_SERVER[$k] ?? $_ENV[$k] ?? null) { - $this->populate([$k => $env = $defaultEnv], $overrideExistingVars); - } - - if (!\in_array($env, $testEnvs, true) && is_file($p = "$path.local")) { - $this->doLoad($overrideExistingVars, [$p]); - $env = $_SERVER[$k] ?? $_ENV[$k] ?? $env; - } - - if ('local' === $env) { - return; - } - - if (is_file($p = "$path.$env")) { - $this->doLoad($overrideExistingVars, [$p]); - } - - if (is_file($p = "$path.$env.local")) { - $this->doLoad($overrideExistingVars, [$p]); - } - } - - /** - * Loads env vars from .env.local.php if the file exists or from the other .env files otherwise. - * - * This method also configures the APP_DEBUG env var according to the current APP_ENV. - * - * See method loadEnv() for rules related to .env files. - */ - public function bootEnv(string $path, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void - { - $p = $path.'.local.php'; - $env = is_file($p) ? include $p : null; - $k = $this->envKey; - - if (\is_array($env) && ($overrideExistingVars || !isset($env[$k]) || ($_SERVER[$k] ?? $_ENV[$k] ?? $env[$k]) === $env[$k])) { - $this->populatePath($path); - $this->populate($env, $overrideExistingVars); - } else { - $this->loadEnv($path, $k, $defaultEnv, $testEnvs, $overrideExistingVars); - } - - $_SERVER += $_ENV; - - $k = $this->debugKey; - $debug = $_SERVER[$k] ?? !\in_array($_SERVER[$this->envKey], $this->prodEnvs, true); - $_SERVER[$k] = $_ENV[$k] = (int) $debug || (!\is_bool($debug) && filter_var($debug, \FILTER_VALIDATE_BOOL)) ? '1' : '0'; - } - - /** - * Loads one or several .env files and enables override existing vars. - * - * @param string $path A file to load - * @param string ...$extraPaths A list of additional files to load - * - * @throws FormatException when a file has a syntax error - * @throws PathException when a file does not exist or is not readable - */ - public function overload(string $path, string ...$extraPaths): void - { - $this->doLoad(true, \func_get_args()); - } - - /** - * Sets values as environment variables (via putenv, $_ENV, and $_SERVER). - * - * @param array $values An array of env variables - * @param bool $overrideExistingVars Whether existing environment variables set by the system should be overridden - */ - public function populate(array $values, bool $overrideExistingVars = false): void - { - $updateLoadedVars = false; - $loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '')); - - foreach ($values as $name => $value) { - $notHttpName = !str_starts_with($name, 'HTTP_'); - if (isset($_SERVER[$name]) && $notHttpName && !isset($_ENV[$name])) { - $_ENV[$name] = $_SERVER[$name]; - } - - // don't check existence with getenv() because of thread safety issues - if (!isset($loadedVars[$name]) && !$overrideExistingVars && isset($_ENV[$name])) { - continue; - } - - if ($this->usePutenv) { - putenv("$name=$value"); - } - - $_ENV[$name] = $value; - if ($notHttpName) { - $_SERVER[$name] = $value; - } - - if (!isset($loadedVars[$name])) { - $loadedVars[$name] = $updateLoadedVars = true; - } - } - - if ($updateLoadedVars) { - unset($loadedVars['']); - $loadedVars = implode(',', array_keys($loadedVars)); - $_ENV['SYMFONY_DOTENV_VARS'] = $_SERVER['SYMFONY_DOTENV_VARS'] = $loadedVars; - - if ($this->usePutenv) { - putenv('SYMFONY_DOTENV_VARS='.$loadedVars); - } - } - } - - /** - * Parses the contents of an .env file. - * - * @param string $data The data to be parsed - * @param string $path The original file name where data where stored (used for more meaningful error messages) - * - * @throws FormatException when a file has a syntax error - */ - public function parse(string $data, string $path = '.env'): array - { - $this->path = $path; - $this->data = str_replace(["\r\n", "\r"], "\n", $data); - $this->lineno = 1; - $this->cursor = 0; - $this->end = \strlen($this->data); - $state = self::STATE_VARNAME; - $this->values = []; - $name = ''; - - $this->skipEmptyLines(); - - while ($this->cursor < $this->end) { - switch ($state) { - case self::STATE_VARNAME: - $name = $this->lexVarname(); - $state = self::STATE_VALUE; - break; - - case self::STATE_VALUE: - $this->values[$name] = $this->lexValue(); - $state = self::STATE_VARNAME; - break; - } - } - - if (self::STATE_VALUE === $state) { - $this->values[$name] = ''; - } - - try { - return $this->values; - } finally { - $this->values = []; - unset($this->path, $this->cursor, $this->lineno, $this->data, $this->end); - } - } - - private function lexVarname(): string - { - // var name + optional export - if (!preg_match('/(export[ \t]++)?('.self::VARNAME_REGEX.')/A', $this->data, $matches, 0, $this->cursor)) { - throw $this->createFormatException('Invalid character in variable name'); - } - $this->moveCursor($matches[0]); - - if ($this->cursor === $this->end || "\n" === $this->data[$this->cursor] || '#' === $this->data[$this->cursor]) { - if ($matches[1]) { - throw $this->createFormatException('Unable to unset an environment variable'); - } - - throw $this->createFormatException('Missing = in the environment variable declaration'); - } - - if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) { - throw $this->createFormatException('Whitespace characters are not supported after the variable name'); - } - - if ('=' !== $this->data[$this->cursor]) { - throw $this->createFormatException('Missing = in the environment variable declaration'); - } - ++$this->cursor; - - return $matches[2]; - } - - private function lexValue(): string - { - if (preg_match('/[ \t]*+(?:#.*)?$/Am', $this->data, $matches, 0, $this->cursor)) { - $this->moveCursor($matches[0]); - $this->skipEmptyLines(); - - return ''; - } - - if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) { - throw $this->createFormatException('Whitespace are not supported before the value'); - } - - $loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '')); - unset($loadedVars['']); - $v = ''; - - do { - if ("'" === $this->data[$this->cursor]) { - $len = 0; - - do { - if ($this->cursor + ++$len === $this->end) { - $this->cursor += $len; - - throw $this->createFormatException('Missing quote to end the value'); - } - } while ("'" !== $this->data[$this->cursor + $len]); - - $v .= substr($this->data, 1 + $this->cursor, $len - 1); - $this->cursor += 1 + $len; - } elseif ('"' === $this->data[$this->cursor]) { - $value = ''; - - if (++$this->cursor === $this->end) { - throw $this->createFormatException('Missing quote to end the value'); - } - - while ('"' !== $this->data[$this->cursor] || ('\\' === $this->data[$this->cursor - 1] && '\\' !== $this->data[$this->cursor - 2])) { - $value .= $this->data[$this->cursor]; - ++$this->cursor; - - if ($this->cursor === $this->end) { - throw $this->createFormatException('Missing quote to end the value'); - } - } - ++$this->cursor; - $value = str_replace(['\\"', '\r', '\n'], ['"', "\r", "\n"], $value); - $resolvedValue = $value; - $resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars); - $resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars); - $resolvedValue = str_replace('\\\\', '\\', $resolvedValue); - $v .= $resolvedValue; - } else { - $value = ''; - $prevChr = $this->data[$this->cursor - 1]; - while ($this->cursor < $this->end && !\in_array($this->data[$this->cursor], ["\n", '"', "'"], true) && !((' ' === $prevChr || "\t" === $prevChr) && '#' === $this->data[$this->cursor])) { - if ('\\' === $this->data[$this->cursor] && isset($this->data[$this->cursor + 1]) && ('"' === $this->data[$this->cursor + 1] || "'" === $this->data[$this->cursor + 1])) { - ++$this->cursor; - } - - $value .= $prevChr = $this->data[$this->cursor]; - - if ('$' === $this->data[$this->cursor] && isset($this->data[$this->cursor + 1]) && '(' === $this->data[$this->cursor + 1]) { - ++$this->cursor; - $value .= '('.$this->lexNestedExpression().')'; - } - - ++$this->cursor; - } - $value = rtrim($value); - $resolvedValue = $value; - $resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars); - $resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars); - $resolvedValue = str_replace('\\\\', '\\', $resolvedValue); - - if ($resolvedValue === $value && preg_match('/\s+/', $value)) { - throw $this->createFormatException('A value containing spaces must be surrounded by quotes'); - } - - $v .= $resolvedValue; - - if ($this->cursor < $this->end && '#' === $this->data[$this->cursor]) { - break; - } - } - } while ($this->cursor < $this->end && "\n" !== $this->data[$this->cursor]); - - $this->skipEmptyLines(); - - return $v; - } - - private function lexNestedExpression(): string - { - ++$this->cursor; - $value = ''; - - while ("\n" !== $this->data[$this->cursor] && ')' !== $this->data[$this->cursor]) { - $value .= $this->data[$this->cursor]; - - if ('(' === $this->data[$this->cursor]) { - $value .= $this->lexNestedExpression().')'; - } - - ++$this->cursor; - - if ($this->cursor === $this->end) { - throw $this->createFormatException('Missing closing parenthesis.'); - } - } - - if ("\n" === $this->data[$this->cursor]) { - throw $this->createFormatException('Missing closing parenthesis.'); - } - - return $value; - } - - private function skipEmptyLines(): void - { - if (preg_match('/(?:\s*+(?:#[^\n]*+)?+)++/A', $this->data, $match, 0, $this->cursor)) { - $this->moveCursor($match[0]); - } - } - - private function resolveCommands(string $value, array $loadedVars): string - { - if (!str_contains($value, '$')) { - return $value; - } - - $regex = '/ - (\\\\)? # escaped with a backslash? - \$ - (? - \( # require opening parenthesis - ([^()]|\g)+ # allow any number of non-parens, or balanced parens (by nesting the expression recursively) - \) # require closing paren - ) - /x'; - - return preg_replace_callback($regex, function ($matches) use ($loadedVars) { - if ('\\' === $matches[1]) { - return substr($matches[0], 1); - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - throw new \LogicException('Resolving commands is not supported on Windows.'); - } - - if (!class_exists(Process::class)) { - throw new \LogicException('Resolving commands requires the Symfony Process component. Try running "composer require symfony/process".'); - } - - $process = Process::fromShellCommandline('echo '.$matches[0]); - - $env = []; - foreach ($this->values as $name => $value) { - if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')))) { - $env[$name] = $value; - } - } - $process->setEnv($env); - - try { - $process->mustRun(); - } catch (ProcessException) { - throw $this->createFormatException(\sprintf('Issue expanding a command (%s)', $process->getErrorOutput())); - } - - return rtrim($process->getOutput(), "\n\r"); - }, $value); - } - - private function resolveVariables(string $value, array $loadedVars): string - { - if (!str_contains($value, '$')) { - return $value; - } - - $regex = '/ - (?\\\\*) # escaped with a backslash? - \$ - (?!\() # no opening parenthesis - (?P\{)? # optional brace - (?P'.self::VARNAME_REGEX.')? # var name - (?P:[-=][^\}]*+)? # optional default value - (?P\})? # optional closing brace - /x'; - - return preg_replace_callback($regex, function ($matches) use ($loadedVars) { - // odd number of backslashes means the $ character is escaped - if (1 === \strlen($matches['backslashes']) % 2) { - return substr($matches[0], 1); - } - - // unescaped $ not followed by variable name - if (!isset($matches['name'])) { - return $matches[0]; - } - - if ('{' === $matches['opening_brace'] && !isset($matches['closing_brace'])) { - throw $this->createFormatException('Unclosed braces on variable expansion'); - } - - $name = $matches['name']; - if (isset($loadedVars[$name]) && isset($this->values[$name])) { - $value = $this->values[$name]; - } elseif (isset($_ENV[$name])) { - $value = $_ENV[$name]; - } elseif (isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')) { - $value = $_SERVER[$name]; - } elseif (isset($this->values[$name])) { - $value = $this->values[$name]; - } else { - $value = (string) getenv($name); - } - - if ('' === $value && isset($matches['default_value']) && '' !== $matches['default_value']) { - $unsupportedChars = strpbrk($matches['default_value'], '\'"{$'); - if (false !== $unsupportedChars) { - throw $this->createFormatException(\sprintf('Unsupported character "%s" found in the default value of variable "$%s".', $unsupportedChars[0], $name)); - } - - $value = substr($matches['default_value'], 2); - - if ('=' === $matches['default_value'][1]) { - $this->values[$name] = $value; - } - } - - if (!$matches['opening_brace'] && isset($matches['closing_brace'])) { - $value .= '}'; - } - - return $matches['backslashes'].$value; - }, $value); - } - - private function moveCursor(string $text): void - { - $this->cursor += \strlen($text); - $this->lineno += substr_count($text, "\n"); - } - - private function createFormatException(string $message): FormatException - { - return new FormatException($message, new FormatExceptionContext($this->data, $this->path, $this->lineno, $this->cursor)); - } - - private function doLoad(bool $overrideExistingVars, array $paths): void - { - foreach ($paths as $path) { - if (!is_readable($path) || is_dir($path)) { - throw new PathException($path); - } - - $data = file_get_contents($path); - - if ("\xEF\xBB\xBF" === substr($data, 0, 3)) { - throw new FormatException('Loading files starting with a byte-order-mark (BOM) is not supported.', new FormatExceptionContext($data, $path, 1, 0)); - } - - $this->populate($this->parse($data, $path), $overrideExistingVars); - } - } - - private function populatePath(string $path): void - { - $_ENV['SYMFONY_DOTENV_PATH'] = $_SERVER['SYMFONY_DOTENV_PATH'] = $path; - - if ($this->usePutenv) { - putenv('SYMFONY_DOTENV_PATH='.$path); - } - } -} diff --git a/vendor/symfony/dotenv/Exception/ExceptionInterface.php b/vendor/symfony/dotenv/Exception/ExceptionInterface.php deleted file mode 100644 index 140a93f9..00000000 --- a/vendor/symfony/dotenv/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Interface for exceptions. - * - * @author Fabien Potencier - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/dotenv/Exception/FormatException.php b/vendor/symfony/dotenv/Exception/FormatException.php deleted file mode 100644 index 92dfa13b..00000000 --- a/vendor/symfony/dotenv/Exception/FormatException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Thrown when a file has a syntax error. - * - * @author Fabien Potencier - */ -final class FormatException extends \LogicException implements ExceptionInterface -{ - public function __construct( - string $message, - private FormatExceptionContext $context, - int $code = 0, - ?\Throwable $previous = null, - ) { - parent::__construct(\sprintf("%s in \"%s\" at line %d.\n%s", $message, $context->getPath(), $context->getLineno(), $context->getDetails()), $code, $previous); - } - - public function getContext(): FormatExceptionContext - { - return $this->context; - } -} diff --git a/vendor/symfony/dotenv/Exception/FormatExceptionContext.php b/vendor/symfony/dotenv/Exception/FormatExceptionContext.php deleted file mode 100644 index 86ce7e54..00000000 --- a/vendor/symfony/dotenv/Exception/FormatExceptionContext.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * @author Fabien Potencier - */ -final class FormatExceptionContext -{ - public function __construct( - private string $data, - private string $path, - private int $lineno, - private int $cursor, - ) { - } - - public function getPath(): string - { - return $this->path; - } - - public function getLineno(): int - { - return $this->lineno; - } - - public function getDetails(): string - { - $before = str_replace("\n", '\n', substr($this->data, max(0, $this->cursor - 20), min(20, $this->cursor))); - $after = str_replace("\n", '\n', substr($this->data, $this->cursor, 20)); - - return '...'.$before.$after."...\n".str_repeat(' ', \strlen($before) + 2).'^ line '.$this->lineno.' offset '.$this->cursor; - } -} diff --git a/vendor/symfony/dotenv/Exception/PathException.php b/vendor/symfony/dotenv/Exception/PathException.php deleted file mode 100644 index 568b009f..00000000 --- a/vendor/symfony/dotenv/Exception/PathException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Dotenv\Exception; - -/** - * Thrown when a file does not exist or is not readable. - * - * @author Fabien Potencier - */ -final class PathException extends \RuntimeException implements ExceptionInterface -{ - public function __construct(string $path, int $code = 0, ?\Throwable $previous = null) - { - parent::__construct(\sprintf('Unable to read the "%s" environment file.', $path), $code, $previous); - } -} diff --git a/vendor/symfony/dotenv/LICENSE b/vendor/symfony/dotenv/LICENSE deleted file mode 100644 index 0223acd4..00000000 --- a/vendor/symfony/dotenv/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/dotenv/README.md b/vendor/symfony/dotenv/README.md deleted file mode 100644 index 2a1cc02c..00000000 --- a/vendor/symfony/dotenv/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Dotenv Component -================ - -Symfony Dotenv parses `.env` files to make environment variables stored in them -accessible via `$_SERVER` or `$_ENV`. - -Getting Started ---------------- - -```bash -composer require symfony/dotenv -``` - -```php -use Symfony\Component\Dotenv\Dotenv; - -$dotenv = new Dotenv(); -$dotenv->load(__DIR__.'/.env'); - -// you can also load several files -$dotenv->load(__DIR__.'/.env', __DIR__.'/.env.dev'); - -// overwrites existing env variables -$dotenv->overload(__DIR__.'/.env'); - -// loads .env, .env.local, and .env.$APP_ENV.local or .env.$APP_ENV -$dotenv->loadEnv(__DIR__.'/.env'); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/dotenv/composer.json b/vendor/symfony/dotenv/composer.json deleted file mode 100644 index 34c4718a..00000000 --- a/vendor/symfony/dotenv/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "symfony/dotenv", - "type": "library", - "description": "Registers environment variables from a .env file", - "keywords": ["environment", "env", "dotenv"], - "homepage": "https://symfony.com", - "license" : "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0" - }, - "conflict": { - "symfony/console": "<6.4", - "symfony/process": "<6.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Dotenv\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/error-handler/BufferingLogger.php b/vendor/symfony/error-handler/BufferingLogger.php deleted file mode 100644 index 4901cb9d..00000000 --- a/vendor/symfony/error-handler/BufferingLogger.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Psr\Log\AbstractLogger; - -/** - * A buffering logger that stacks logs for later. - * - * @author Nicolas Grekas - */ -class BufferingLogger extends AbstractLogger -{ - private array $logs = []; - - public function log($level, $message, array $context = []): void - { - $this->logs[] = [$level, $message, $context]; - } - - public function cleanLogs(): array - { - $logs = $this->logs; - $this->logs = []; - - return $logs; - } - - public function __serialize(): array - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __unserialize(array $data): void - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - foreach ($this->logs as [$level, $message, $context]) { - if (str_contains($message, '{')) { - foreach ($context as $key => $val) { - if (null === $val || \is_scalar($val) || $val instanceof \Stringable) { - $message = str_replace("{{$key}}", $val, $message); - } elseif ($val instanceof \DateTimeInterface) { - $message = str_replace("{{$key}}", $val->format(\DateTimeInterface::RFC3339), $message); - } elseif (\is_object($val)) { - $message = str_replace("{{$key}}", '[object '.get_debug_type($val).']', $message); - } else { - $message = str_replace("{{$key}}", '['.\gettype($val).']', $message); - } - } - } - - error_log(\sprintf('%s [%s] %s', date(\DateTimeInterface::RFC3339), $level, $message)); - } - } -} diff --git a/vendor/symfony/error-handler/CHANGELOG.md b/vendor/symfony/error-handler/CHANGELOG.md deleted file mode 100644 index cd8d07db..00000000 --- a/vendor/symfony/error-handler/CHANGELOG.md +++ /dev/null @@ -1,50 +0,0 @@ -CHANGELOG -========= - -7.3 ---- - - * Add `error:dump` command - -7.1 ---- - - * Increase log level to "error" at least for all PHP errors - -6.4 ---- - - * `FlattenExceptionNormalizer` no longer implements `ContextAwareNormalizerInterface` - -6.3 ---- - - * Display exception properties in the HTML error page - -6.1 ---- - - * Report overridden `@final` constants and properties - * Read environment variable `SYMFONY_IDE` to configure file link format - -5.4 ---- - - * Make `DebugClassLoader` trigger deprecation notices on missing return types - * Add `SYMFONY_PATCH_TYPE_DECLARATIONS='force=2'` mode to `DebugClassLoader` to turn annotations into native return types - -5.2.0 ------ - - * added the ability to set `HtmlErrorRenderer::$template` to a custom template to render when not in debug mode. - -5.1.0 ------ - - * The `HtmlErrorRenderer` and `SerializerErrorRenderer` add `X-Debug-Exception` and `X-Debug-Exception-File` headers in debug mode. - -4.4.0 ------ - - * added the component - * added `ErrorHandler::call()` method utility to turn any PHP error into `\ErrorException` diff --git a/vendor/symfony/error-handler/Command/ErrorDumpCommand.php b/vendor/symfony/error-handler/Command/ErrorDumpCommand.php deleted file mode 100644 index 95b6f448..00000000 --- a/vendor/symfony/error-handler/Command/ErrorDumpCommand.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Command; - -use Symfony\Component\Console\Attribute\AsCommand; -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; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupInterface; - -/** - * Dump error pages to plain HTML files that can be directly served by a web server. - * - * @author Loïck Piera - */ -#[AsCommand( - name: 'error:dump', - description: 'Dump error pages to plain HTML files that can be directly served by a web server', -)] -final class ErrorDumpCommand extends Command -{ - public function __construct( - private readonly Filesystem $filesystem, - private readonly ErrorRendererInterface $errorRenderer, - private readonly ?EntrypointLookupInterface $entrypointLookup = null, - ) { - parent::__construct(); - } - - protected function configure(): void - { - $this - ->addArgument('path', InputArgument::REQUIRED, 'Path where to dump the error pages in') - ->addArgument('status-codes', InputArgument::IS_ARRAY, 'Status codes to dump error pages for, all of them by default') - ->addOption('force', 'f', InputOption::VALUE_NONE, 'Force directory removal before dumping new error pages') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $path = $input->getArgument('path'); - - $io = new SymfonyStyle($input, $output); - $io->title('Dumping error pages'); - - $this->dump($io, $path, $input->getArgument('status-codes'), (bool) $input->getOption('force')); - $io->success(\sprintf('Error pages have been dumped in "%s".', $path)); - - return Command::SUCCESS; - } - - private function dump(SymfonyStyle $io, string $path, array $statusCodes, bool $force = false): void - { - if (!$statusCodes) { - $statusCodes = array_filter(array_keys(Response::$statusTexts), fn ($statusCode) => $statusCode >= 400); - } - - if ($force || ($this->filesystem->exists($path) && $io->confirm(\sprintf('The "%s" directory already exists. Do you want to remove it before dumping the error pages?', $path), false))) { - $this->filesystem->remove($path); - } - - foreach ($statusCodes as $statusCode) { - // Avoid assets to be included only on the first dumped page - $this->entrypointLookup?->reset(); - - $this->filesystem->dumpFile($path.\DIRECTORY_SEPARATOR.$statusCode.'.html', $this->errorRenderer->render(new HttpException((int) $statusCode))->getAsString()); - } - } -} diff --git a/vendor/symfony/error-handler/Debug.php b/vendor/symfony/error-handler/Debug.php deleted file mode 100644 index b090040d..00000000 --- a/vendor/symfony/error-handler/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -/** - * Registers all the debug tools. - * - * @author Fabien Potencier - */ -class Debug -{ - public static function enable(): ErrorHandler - { - error_reporting(\E_ALL & ~\E_DEPRECATED & ~\E_USER_DEPRECATED); - - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { - ini_set('display_errors', 0); - } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOL) || \ini_get('error_log')) { - // CLI - display errors only if they're not already logged to STDERR - ini_set('display_errors', 1); - } - - @ini_set('zend.assertions', 1); - ini_set('assert.active', 1); - ini_set('assert.exception', 1); - - DebugClassLoader::enable(); - - return ErrorHandler::register(new ErrorHandler(new BufferingLogger(), true)); - } -} diff --git a/vendor/symfony/error-handler/DebugClassLoader.php b/vendor/symfony/error-handler/DebugClassLoader.php deleted file mode 100644 index fa902968..00000000 --- a/vendor/symfony/error-handler/DebugClassLoader.php +++ /dev/null @@ -1,1305 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Composer\InstalledVersions; -use Doctrine\Common\Persistence\Proxy as LegacyProxy; -use Doctrine\Persistence\Proxy; -use Mockery\MockInterface; -use Phake\IMock; -use PHPUnit\Framework\MockObject\Matcher\StatelessInvocation; -use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\MockObject\Stub; -use Prophecy\Prophecy\ProphecySubjectInterface; -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\DependencyInjection\Argument\LazyClosure; -use Symfony\Component\ErrorHandler\Internal\TentativeTypes; -use Symfony\Component\VarExporter\LazyObjectInterface; - -/** - * Autoloader checking if the class is really defined in the file found. - * - * The ClassLoader will wrap all registered autoloaders - * and will throw an exception if a file is found but does - * not declare the class. - * - * It can also patch classes to turn docblocks into actual return types. - * This behavior is controlled by the SYMFONY_PATCH_TYPE_DECLARATIONS env var, - * which is a url-encoded array with the follow parameters: - * - "force": any value enables deprecation notices - can be any of: - * - "phpdoc" to patch only docblock annotations - * - "2" to add all possible return types - * - "1" to add return types but only to tests/final/internal/private methods - * - "php": the target version of PHP - e.g. "7.1" doesn't generate "object" types - * - "deprecations": "1" to trigger a deprecation notice when a child class misses a - * return type while the parent declares an "@return" annotation - * - * Note that patching doesn't care about any coding style so you'd better to run - * php-cs-fixer after, with rules "phpdoc_trim_consecutive_blank_line_separation" - * and "no_superfluous_phpdoc_tags" enabled typically. - * - * @author Fabien Potencier - * @author Christophe Coevoet - * @author Nicolas Grekas - * @author Guilhem Niot - */ -class DebugClassLoader -{ - private const SPECIAL_RETURN_TYPES = [ - 'void' => 'void', - 'null' => 'null', - 'resource' => 'resource', - 'boolean' => 'bool', - 'true' => 'true', - 'false' => 'false', - 'integer' => 'int', - 'array' => 'array', - 'bool' => 'bool', - 'callable' => 'callable', - 'float' => 'float', - 'int' => 'int', - 'iterable' => 'iterable', - 'object' => 'object', - 'string' => 'string', - 'non-empty-string' => 'string', - 'self' => 'self', - 'parent' => 'parent', - 'mixed' => 'mixed', - 'static' => 'static', - '$this' => 'static', - 'list' => 'array', - 'non-empty-list' => 'array', - 'class-string' => 'string', - 'never' => 'never', - ]; - - private const BUILTIN_RETURN_TYPES = [ - 'void' => true, - 'array' => true, - 'false' => true, - 'bool' => true, - 'callable' => true, - 'float' => true, - 'int' => true, - 'iterable' => true, - 'object' => true, - 'string' => true, - 'self' => true, - 'parent' => true, - 'mixed' => true, - 'static' => true, - 'null' => true, - 'true' => true, - 'never' => true, - ]; - - private const MAGIC_METHODS = [ - '__isset' => 'bool', - '__sleep' => 'array', - '__toString' => 'string', - '__debugInfo' => 'array', - '__serialize' => 'array', - '__set' => 'void', - '__unset' => 'void', - '__unserialize' => 'void', - '__wakeup' => 'void', - ]; - - /** - * @var callable - */ - private $classLoader; - private bool $isFinder; - private array $loaded = []; - private array $patchTypes = []; - - private static int $caseCheck; - private static array $checkedClasses = []; - private static array $final = []; - private static array $finalMethods = []; - private static array $finalProperties = []; - private static array $finalConstants = []; - private static array $deprecated = []; - private static array $internal = []; - private static array $internalMethods = []; - private static array $annotatedParameters = []; - private static array $darwinCache = ['/' => ['/', []]]; - private static array $method = []; - private static array $returnTypes = []; - private static array $methodTraits = []; - private static array $fileOffsets = []; - - public function __construct(callable $classLoader) - { - $this->classLoader = $classLoader; - $this->isFinder = \is_array($classLoader) && method_exists($classLoader[0], 'findFile'); - parse_str($_ENV['SYMFONY_PATCH_TYPE_DECLARATIONS'] ?? $_SERVER['SYMFONY_PATCH_TYPE_DECLARATIONS'] ?? getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') ?: '', $this->patchTypes); - $this->patchTypes += [ - 'force' => null, - 'php' => \PHP_MAJOR_VERSION.'.'.\PHP_MINOR_VERSION, - 'deprecations' => true, - ]; - - if ('phpdoc' === $this->patchTypes['force']) { - $this->patchTypes['force'] = 'docblock'; - } - - if (!isset(self::$caseCheck)) { - $file = is_file(__FILE__) ? __FILE__ : rtrim(realpath('.'), \DIRECTORY_SEPARATOR); - $i = strrpos($file, \DIRECTORY_SEPARATOR); - $dir = substr($file, 0, 1 + $i); - $file = substr($file, 1 + $i); - $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file); - $test = realpath($dir.$test); - - if (false === $test || false === $i) { - // filesystem is case-sensitive - self::$caseCheck = 0; - } elseif (str_ends_with($test, $file)) { - // filesystem is case-insensitive and realpath() normalizes the case of characters - self::$caseCheck = 1; - } elseif ('Darwin' === \PHP_OS_FAMILY) { - // on MacOSX, HFS+ is case-insensitive but realpath() doesn't normalize the case of characters - self::$caseCheck = 2; - } else { - // filesystem case checks failed, fallback to disabling them - self::$caseCheck = 0; - } - } - } - - public function getClassLoader(): callable - { - return $this->classLoader; - } - - /** - * Wraps all autoloaders. - */ - public static function enable(): void - { - // Ensures we don't hit https://bugs.php.net/42098 - class_exists(ErrorHandler::class); - class_exists(\Psr\Log\LogLevel::class); - - if (!\is_array($functions = spl_autoload_functions())) { - return; - } - - foreach ($functions as $function) { - spl_autoload_unregister($function); - } - - foreach ($functions as $function) { - if (!\is_array($function) || !$function[0] instanceof self) { - $function = [new static($function), 'loadClass']; - } - - spl_autoload_register($function); - } - } - - /** - * Disables the wrapping. - */ - public static function disable(): void - { - if (!\is_array($functions = spl_autoload_functions())) { - return; - } - - foreach ($functions as $function) { - spl_autoload_unregister($function); - } - - foreach ($functions as $function) { - if (\is_array($function) && $function[0] instanceof self) { - $function = $function[0]->getClassLoader(); - } - - spl_autoload_register($function); - } - } - - public static function checkClasses(): bool - { - if (!\is_array($functions = spl_autoload_functions())) { - return false; - } - - $loader = null; - - foreach ($functions as $function) { - if (\is_array($function) && $function[0] instanceof self) { - $loader = $function[0]; - break; - } - } - - if (null === $loader) { - return false; - } - - static $offsets = [ - 'get_declared_interfaces' => 0, - 'get_declared_traits' => 0, - 'get_declared_classes' => 0, - ]; - - foreach ($offsets as $getSymbols => $i) { - $symbols = $getSymbols(); - - for (; $i < \count($symbols); ++$i) { - if (!is_subclass_of($symbols[$i], MockObject::class) - && !is_subclass_of($symbols[$i], Stub::class) - && !is_subclass_of($symbols[$i], ProphecySubjectInterface::class) - && !is_subclass_of($symbols[$i], Proxy::class) - && !is_subclass_of($symbols[$i], ProxyInterface::class) - && !is_subclass_of($symbols[$i], LazyObjectInterface::class) - && !is_subclass_of($symbols[$i], LegacyProxy::class) - && !is_subclass_of($symbols[$i], MockInterface::class) - && !is_subclass_of($symbols[$i], IMock::class) - && !(is_subclass_of($symbols[$i], LazyClosure::class) && str_contains($symbols[$i], "@anonymous\0")) - ) { - $loader->checkClass($symbols[$i]); - } - } - - $offsets[$getSymbols] = $i; - } - - return true; - } - - public function findFile(string $class): ?string - { - return $this->isFinder ? ($this->classLoader[0]->findFile($class) ?: null) : null; - } - - /** - * Loads the given class or interface. - * - * @throws \RuntimeException - */ - public function loadClass(string $class): void - { - $e = error_reporting(error_reporting() | \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR); - - try { - if ($this->isFinder && !isset($this->loaded[$class])) { - $this->loaded[$class] = true; - if (!$file = $this->classLoader[0]->findFile($class) ?: '') { - // no-op - } elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) { - include $file; - - return; - } elseif (false === include $file) { - return; - } - } else { - ($this->classLoader)($class); - $file = ''; - } - } finally { - error_reporting($e); - } - - $this->checkClass($class, $file); - } - - private function checkClass(string $class, ?string $file = null): void - { - $exists = null === $file || class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); - - if (null !== $file && $class && '\\' === $class[0]) { - $class = substr($class, 1); - } - - if ($exists) { - if (isset(self::$checkedClasses[$class])) { - return; - } - self::$checkedClasses[$class] = true; - - $refl = new \ReflectionClass($class); - if (null === $file && $refl->isInternal()) { - return; - } - $name = $refl->getName(); - - if ($name !== $class && 0 === strcasecmp($name, $class)) { - throw new \RuntimeException(\sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name)); - } - - $deprecations = $this->checkAnnotations($refl, $name); - - foreach ($deprecations as $message) { - @trigger_error($message, \E_USER_DEPRECATED); - } - } - - if (!$file) { - return; - } - - if (!$exists) { - if (str_contains($class, '/')) { - throw new \RuntimeException(\sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); - } - - throw new \RuntimeException(\sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); - } - - if (self::$caseCheck && $message = $this->checkCase($refl, $file, $class)) { - throw new \RuntimeException(\sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', $message[0], $message[1], $message[2])); - } - } - - public function checkAnnotations(\ReflectionClass $refl, string $class): array - { - if ( - 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7' === $class - || 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV6' === $class - ) { - return []; - } - $deprecations = []; - - $className = str_contains($class, "@anonymous\0") ? (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous' : $class; - - // Don't trigger deprecations for classes in the same vendor - if ($class !== $className) { - $vendor = preg_match('/^namespace ([^;\\\\\s]++)[;\\\\]/m', @file_get_contents($refl->getFileName()), $vendor) ? $vendor[1].'\\' : ''; - $vendorLen = \strlen($vendor); - } elseif (2 > $vendorLen = 1 + (strpos($class, '\\') ?: strpos($class, '_'))) { - $vendorLen = 0; - $vendor = ''; - } else { - $vendor = str_replace('_', '\\', substr($class, 0, $vendorLen)); - } - - $parent = get_parent_class($class) ?: null; - self::$returnTypes[$class] = []; - $classIsTemplate = false; - - // Detect annotations on the class - if ($doc = $this->parsePhpDoc($refl)) { - $classIsTemplate = isset($doc['template']) || isset($doc['template-covariant']); - - foreach (['final', 'deprecated', 'internal'] as $annotation) { - if (null !== $description = $doc[$annotation][0] ?? null) { - self::${$annotation}[$class] = '' !== $description ? ' '.$description.(preg_match('/[.!]$/', $description) ? '' : '.') : '.'; - } - } - - if ($refl->isInterface() && isset($doc['method'])) { - foreach ($doc['method'] as $name => [$static, $returnType, $signature, $description]) { - self::$method[$class][] = [$class, $static, $returnType, $name.$signature, $description]; - - if ('' !== $returnType) { - $this->setReturnType($returnType, $refl->name, $name, $refl->getFileName(), $parent); - } - } - } - } - - $parentAndOwnInterfaces = $this->getOwnInterfaces($class, $parent); - if ($parent) { - $parentAndOwnInterfaces[$parent] = $parent; - - if (!isset(self::$checkedClasses[$parent])) { - $this->checkClass($parent); - } - - if (isset(self::$final[$parent])) { - $deprecations[] = \sprintf('The "%s" class is considered final%s It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $className); - } - } - - // Detect if the parent is annotated - foreach ($parentAndOwnInterfaces + class_uses($class, false) as $use) { - if (!isset(self::$checkedClasses[$use])) { - $this->checkClass($use); - } - if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])) { - $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); - $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); - - $deprecations[] = \sprintf('The "%s" %s %s "%s" that is deprecated%s', $className, $type, $verb, $use, self::$deprecated[$use]); - } - if (isset(self::$internal[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen)) { - $deprecations[] = \sprintf('The "%s" %s is considered internal%s It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $className); - } - if (isset(self::$method[$use])) { - if ($refl->isAbstract()) { - if (isset(self::$method[$class])) { - self::$method[$class] = array_merge(self::$method[$class], self::$method[$use]); - } else { - self::$method[$class] = self::$method[$use]; - } - } elseif (!$refl->isInterface()) { - if (!strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) - && str_starts_with($className, 'Symfony\\') - && (!class_exists(InstalledVersions::class) - || 'symfony/symfony' !== InstalledVersions::getRootPackage()['name']) - ) { - // skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested - continue; - } - $hasCall = $refl->hasMethod('__call'); - $hasStaticCall = $refl->hasMethod('__callStatic'); - foreach (self::$method[$use] as [$interface, $static, $returnType, $name, $description]) { - if ($static ? $hasStaticCall : $hasCall) { - continue; - } - $realName = substr($name, 0, strpos($name, '(')); - if (!$refl->hasMethod($realName) || !($methodRefl = $refl->getMethod($realName))->isPublic() || ($static && !$methodRefl->isStatic()) || (!$static && $methodRefl->isStatic())) { - $deprecations[] = \sprintf('Class "%s" should implement method "%s::%s%s"%s', $className, ($static ? 'static ' : '').$interface, $name, $returnType ? ': '.$returnType : '', null === $description ? '.' : ': '.$description); - } - } - } - } - } - - if (trait_exists($class)) { - $file = $refl->getFileName(); - - foreach ($refl->getMethods() as $method) { - if ($method->getFileName() === $file) { - self::$methodTraits[$file][$method->getStartLine()] = $class; - } - } - - return $deprecations; - } - - // Inherit @final, @internal, @param and @return annotations for methods - self::$finalMethods[$class] = []; - self::$internalMethods[$class] = []; - self::$annotatedParameters[$class] = []; - self::$finalProperties[$class] = []; - self::$finalConstants[$class] = []; - foreach ($parentAndOwnInterfaces as $use) { - foreach (['finalMethods', 'internalMethods', 'annotatedParameters', 'returnTypes', 'finalProperties', 'finalConstants'] as $property) { - if (isset(self::${$property}[$use])) { - self::${$property}[$class] = self::${$property}[$class] ? self::${$property}[$use] + self::${$property}[$class] : self::${$property}[$use]; - } - } - - if (null !== (TentativeTypes::RETURN_TYPES[$use] ?? null)) { - foreach (TentativeTypes::RETURN_TYPES[$use] as $method => $returnType) { - $returnType = explode('|', $returnType); - foreach ($returnType as $i => $t) { - if ('?' !== $t && !isset(self::BUILTIN_RETURN_TYPES[$t])) { - $returnType[$i] = '\\'.$t; - } - } - $returnType = implode('|', $returnType); - - self::$returnTypes[$class] += [$method => [$returnType, str_starts_with($returnType, '?') ? substr($returnType, 1).'|null' : $returnType, $use, '']]; - } - } - } - - foreach ($refl->getMethods() as $method) { - if ($method->class !== $class) { - continue; - } - - if (null === $ns = self::$methodTraits[$method->getFileName()][$method->getStartLine()] ?? null) { - $ns = $vendor; - $len = $vendorLen; - } elseif (2 > $len = 1 + (strpos($ns, '\\') ?: strpos($ns, '_'))) { - $len = 0; - $ns = ''; - } else { - $ns = str_replace('_', '\\', substr($ns, 0, $len)); - } - - if ($parent && isset(self::$finalMethods[$parent][$method->name])) { - [$declaringClass, $message] = self::$finalMethods[$parent][$method->name]; - $deprecations[] = \sprintf('The "%s::%s()" method is considered final%s It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $className); - } - - if (isset(self::$internalMethods[$class][$method->name])) { - [$declaringClass, $message] = self::$internalMethods[$class][$method->name]; - if (strncmp($ns, $declaringClass, $len)) { - $deprecations[] = \sprintf('The "%s::%s()" method is considered internal%s It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $className); - } - } - - // To read method annotations - $doc = $this->parsePhpDoc($method); - - if (($classIsTemplate || isset($doc['template']) || isset($doc['template-covariant'])) && $method->hasReturnType()) { - unset($doc['return']); - } - - if (isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = []; - foreach ($method->getParameters() as $parameter) { - $definedParameters[$parameter->name] = true; - } - - foreach (self::$annotatedParameters[$class][$method->name] as $parameterName => $deprecation) { - if (!isset($definedParameters[$parameterName]) && !isset($doc['param'][$parameterName])) { - $deprecations[] = \sprintf($deprecation, $className); - } - } - } - - $forcePatchTypes = $this->patchTypes['force']; - - if ($canAddReturnType = null !== $forcePatchTypes && !str_contains($method->getFileName(), \DIRECTORY_SEPARATOR.'vendor'.\DIRECTORY_SEPARATOR)) { - $this->patchTypes['force'] = $forcePatchTypes ?: 'docblock'; - - $canAddReturnType = 2 === (int) $forcePatchTypes - || false !== stripos($method->getFileName(), \DIRECTORY_SEPARATOR.'Tests'.\DIRECTORY_SEPARATOR) - || $refl->isFinal() - || $method->isFinal() - || $method->isPrivate() - || ('.' === (self::$internal[$class] ?? null) && !$refl->isAbstract()) - || '.' === (self::$final[$class] ?? null) - || '' === ($doc['final'][0] ?? null) - || '' === ($doc['internal'][0] ?? null) - ; - } - - if (null !== ($returnType = self::$returnTypes[$class][$method->name] ?? null) && 'docblock' === $this->patchTypes['force'] && !$method->hasReturnType() && isset(TentativeTypes::RETURN_TYPES[$returnType[2]][$method->name])) { - $this->patchReturnTypeWillChange($method); - } - - if (null !== ($returnType ??= self::MAGIC_METHODS[$method->name] ?? null) && !$method->hasReturnType() && !isset($doc['return'])) { - [$normalizedType, $returnType, $declaringClass, $declaringFile] = \is_string($returnType) ? [$returnType, $returnType, '', ''] : $returnType; - - if ($canAddReturnType && 'docblock' !== $this->patchTypes['force']) { - $this->patchMethod($method, $returnType, $declaringFile, $normalizedType); - } - if (!isset($doc['deprecated']) && strncmp($ns, $declaringClass, $len)) { - if ('docblock' === $this->patchTypes['force']) { - $this->patchMethod($method, $returnType, $declaringFile, $normalizedType); - } elseif ('' !== $declaringClass && $this->patchTypes['deprecations']) { - $deprecations[] = \sprintf('Method "%s::%s()" might add "%s" as a native return type declaration in the future. Do the same in %s "%s" now to avoid errors or add an explicit @return annotation to suppress this message.', $declaringClass, $method->name, $normalizedType, interface_exists($declaringClass) ? 'implementation' : 'child class', $className); - } - } - } - - if (!$doc) { - $this->patchTypes['force'] = $forcePatchTypes; - - continue; - } - - if (isset($doc['return'])) { - $this->setReturnType($doc['return'] ?? self::MAGIC_METHODS[$method->name], $method->class, $method->name, $method->getFileName(), $parent, $method->getReturnType()); - - if (isset(self::$returnTypes[$class][$method->name][0]) && $canAddReturnType) { - $this->fixReturnStatements($method, self::$returnTypes[$class][$method->name][0]); - } - - if ($method->isPrivate()) { - unset(self::$returnTypes[$class][$method->name]); - } - } - - $this->patchTypes['force'] = $forcePatchTypes; - - if ($method->isPrivate()) { - continue; - } - - $finalOrInternal = false; - - foreach (['final', 'internal'] as $annotation) { - if (null !== $description = $doc[$annotation][0] ?? null) { - self::${$annotation.'Methods'}[$class][$method->name] = [$class, '' !== $description ? ' '.$description.(preg_match('/[[:punct:]]$/', $description) ? '' : '.') : '.']; - $finalOrInternal = true; - } - } - - if ($finalOrInternal || $method->isConstructor() || !isset($doc['param']) || StatelessInvocation::class === $class) { - continue; - } - if (!isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = []; - foreach ($method->getParameters() as $parameter) { - $definedParameters[$parameter->name] = true; - } - } - foreach ($doc['param'] as $parameterName => $parameterType) { - if (!isset($definedParameters[$parameterName])) { - self::$annotatedParameters[$class][$method->name][$parameterName] = \sprintf('The "%%s::%s()" method will require a new "%s$%s" argument in the next major version of its %s "%s", not defining it is deprecated.', $method->name, $parameterType ? $parameterType.' ' : '', $parameterName, interface_exists($className) ? 'interface' : 'parent class', $className); - } - } - } - - $finals = isset(self::$final[$class]) || $refl->isFinal() ? [] : [ - 'finalConstants' => $refl->getReflectionConstants(\ReflectionClassConstant::IS_PUBLIC | \ReflectionClassConstant::IS_PROTECTED), - 'finalProperties' => $refl->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED), - ]; - foreach ($finals as $type => $reflectors) { - foreach ($reflectors as $r) { - if ($r->class !== $class) { - continue; - } - - $doc = $this->parsePhpDoc($r); - - foreach ($parentAndOwnInterfaces as $use) { - if (isset(self::${$type}[$use][$r->name]) && !isset($doc['deprecated']) && ('finalConstants' === $type || substr($use, 0, strrpos($use, '\\')) !== substr($use, 0, strrpos($class, '\\')))) { - $msg = 'finalConstants' === $type ? '%s" constant' : '$%s" property'; - $deprecations[] = \sprintf('The "%s::'.$msg.' is considered final. You should not override it in "%s".', self::${$type}[$use][$r->name], $r->name, $class); - } - } - - if (isset($doc['final']) || ('finalProperties' === $type && str_starts_with($class, 'Symfony\\') && !$r->hasType())) { - self::${$type}[$class][$r->name] = $class; - } - } - } - - return $deprecations; - } - - public function checkCase(\ReflectionClass $refl, string $file, string $class): ?array - { - $real = explode('\\', $class.strrchr($file, '.')); - $tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file)); - - $i = \count($tail) - 1; - $j = \count($real) - 1; - - while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { - --$i; - --$j; - } - - array_splice($tail, 0, $i + 1); - - if (!$tail) { - return null; - } - - $tail = \DIRECTORY_SEPARATOR.implode(\DIRECTORY_SEPARATOR, $tail); - $tailLen = \strlen($tail); - $real = $refl->getFileName(); - - if (2 === self::$caseCheck) { - $real = $this->darwinRealpath($real); - } - - if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true) - && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false) - ) { - return [substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)]; - } - - return null; - } - - /** - * `realpath` on MacOSX doesn't normalize the case of characters. - */ - private function darwinRealpath(string $real): string - { - $i = 1 + strrpos($real, '/'); - $file = substr($real, $i); - $real = substr($real, 0, $i); - - if (isset(self::$darwinCache[$real])) { - $kDir = $real; - } else { - $kDir = strtolower($real); - - if (isset(self::$darwinCache[$kDir])) { - $real = self::$darwinCache[$kDir][0]; - } else { - $dir = getcwd(); - - if (!@chdir($real)) { - return $real.$file; - } - - $real = getcwd().'/'; - chdir($dir); - - $dir = $real; - $k = $kDir; - $i = \strlen($dir) - 1; - while (!isset(self::$darwinCache[$k])) { - self::$darwinCache[$k] = [$dir, []]; - self::$darwinCache[$dir] = &self::$darwinCache[$k]; - - while ('/' !== $dir[--$i]) { - } - $k = substr($k, 0, ++$i); - $dir = substr($dir, 0, $i--); - } - } - } - - $dirFiles = self::$darwinCache[$kDir][1]; - - if (!isset($dirFiles[$file]) && str_ends_with($file, ') : eval()\'d code')) { - // Get the file name from "file_name.php(123) : eval()'d code" - $file = substr($file, 0, strrpos($file, '(', -17)); - } - - if (isset($dirFiles[$file])) { - return $real.$dirFiles[$file]; - } - - $kFile = strtolower($file); - - if (!isset($dirFiles[$kFile])) { - foreach (scandir($real, 2) as $f) { - if ('.' !== $f[0]) { - $dirFiles[$f] = $f; - if ($f === $file) { - $kFile = $file; - } elseif ($f !== $k = strtolower($f)) { - $dirFiles[$k] = $f; - } - } - } - self::$darwinCache[$kDir][1] = $dirFiles; - } - - return $real.$dirFiles[$kFile]; - } - - /** - * `class_implements` includes interfaces from the parents so we have to manually exclude them. - * - * @return string[] - */ - private function getOwnInterfaces(string $class, ?string $parent): array - { - $ownInterfaces = class_implements($class, false); - - if ($parent) { - foreach (class_implements($parent, false) as $interface) { - unset($ownInterfaces[$interface]); - } - } - - foreach ($ownInterfaces as $interface) { - foreach (class_implements($interface) as $interface) { - unset($ownInterfaces[$interface]); - } - } - - return $ownInterfaces; - } - - private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, ?\ReflectionType $returnType = null): void - { - if ('__construct' === $method) { - return; - } - - if ('null' === $types) { - self::$returnTypes[$class][$method] = ['null', 'null', $class, $filename]; - - return; - } - - if ($nullable = str_starts_with($types, 'null|')) { - $types = substr($types, 5); - } elseif ($nullable = str_ends_with($types, '|null')) { - $types = substr($types, 0, -5); - } - $arrayType = ['array' => 'array']; - $typesMap = []; - $glue = str_contains($types, '&') ? '&' : '|'; - foreach (explode($glue, $types) as $t) { - $t = self::SPECIAL_RETURN_TYPES[strtolower($t)] ?? $t; - $typesMap[$this->normalizeType($t, $class, $parent, $returnType)][$t] = $t; - } - - if (isset($typesMap['array'])) { - if (isset($typesMap['Traversable']) || isset($typesMap['\Traversable'])) { - $typesMap['iterable'] = $arrayType !== $typesMap['array'] ? $typesMap['array'] : ['iterable']; - unset($typesMap['array'], $typesMap['Traversable'], $typesMap['\Traversable']); - } elseif ($arrayType !== $typesMap['array'] && isset(self::$returnTypes[$class][$method]) && !$returnType) { - return; - } - } - - if (isset($typesMap['array']) && isset($typesMap['iterable'])) { - if ($arrayType !== $typesMap['array']) { - $typesMap['iterable'] = $typesMap['array']; - } - unset($typesMap['array']); - } - - $iterable = $object = true; - foreach ($typesMap as $n => $t) { - if ('null' !== $n) { - $iterable = $iterable && (\in_array($n, ['array', 'iterable']) || str_contains($n, 'Iterator')); - $object = $object && (\in_array($n, ['callable', 'object', '$this', 'static']) || !isset(self::SPECIAL_RETURN_TYPES[$n])); - } - } - - $phpTypes = []; - $docTypes = []; - - foreach ($typesMap as $n => $t) { - if (str_contains($n, '::')) { - [$definingClass, $constantName] = explode('::', $n, 2); - $definingClass = match ($definingClass) { - 'self', 'static', 'parent' => $class, - default => $definingClass, - }; - - if (!\defined($definingClass.'::'.$constantName)) { - return; - } - - $constant = new \ReflectionClassConstant($definingClass, $constantName); - - if (\PHP_VERSION_ID >= 80300 && $constantType = $constant->getType()) { - if ($constantType instanceof \ReflectionNamedType) { - $n = $constantType->getName(); - } else { - return; - } - } else { - $n = \gettype($constant->getValue()); - } - } - - if ('null' === $n) { - $nullable = true; - continue; - } - - $docTypes[] = $t; - - if ('mixed' === $n || 'void' === $n) { - $nullable = false; - $phpTypes = ['' => $n]; - continue; - } - - if ('resource' === $n) { - // there is no native type for "resource" - return; - } - - if (!preg_match('/^(?:\\\\?[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)+$/', $n)) { - // exclude any invalid PHP class name (e.g. `Cookie::SAMESITE_*`) - continue; - } - - if (!isset($phpTypes['']) && !\in_array($n, $phpTypes, true)) { - $phpTypes[] = $n; - } - } - $docTypes = array_merge([], ...$docTypes); - - if (!$phpTypes) { - return; - } - - if (1 < \count($phpTypes)) { - if ($iterable && '8.0' > $this->patchTypes['php']) { - $phpTypes = $docTypes = ['iterable']; - } elseif ($object && 'object' === $this->patchTypes['force']) { - $phpTypes = $docTypes = ['object']; - } elseif ('8.0' > $this->patchTypes['php']) { - // ignore multi-types return declarations - return; - } - } - - $phpType = \sprintf($nullable ? (1 < \count($phpTypes) ? '%s|null' : '?%s') : '%s', implode($glue, $phpTypes)); - $docType = \sprintf($nullable ? '%s|null' : '%s', implode($glue, $docTypes)); - - self::$returnTypes[$class][$method] = [$phpType, $docType, $class, $filename]; - } - - private function normalizeType(string $type, string $class, ?string $parent, ?\ReflectionType $returnType): string - { - if (isset(self::SPECIAL_RETURN_TYPES[$lcType = strtolower($type)])) { - if ('parent' === $lcType = self::SPECIAL_RETURN_TYPES[$lcType]) { - $lcType = null !== $parent ? '\\'.$parent : 'parent'; - } elseif ('self' === $lcType) { - $lcType = '\\'.$class; - } - - return $lcType; - } - - // We could resolve "use" statements to return the FQDN - // but this would be too expensive for a runtime checker - - if (!str_ends_with($type, '[]')) { - return $type; - } - - if ($returnType instanceof \ReflectionNamedType) { - $type = $returnType->getName(); - - if ('mixed' !== $type) { - return isset(self::SPECIAL_RETURN_TYPES[$type]) ? $type : '\\'.$type; - } - } - - return 'array'; - } - - /** - * Utility method to add #[ReturnTypeWillChange] where php triggers deprecations. - */ - private function patchReturnTypeWillChange(\ReflectionMethod $method): void - { - if (\count($method->getAttributes(\ReturnTypeWillChange::class))) { - return; - } - - if (!is_file($file = $method->getFileName())) { - return; - } - - $fileOffset = self::$fileOffsets[$file] ?? 0; - - $code = file($file); - - $startLine = $method->getStartLine() + $fileOffset - 2; - - if (false !== stripos($code[$startLine], 'ReturnTypeWillChange')) { - return; - } - - $code[$startLine] .= " #[\\ReturnTypeWillChange]\n"; - self::$fileOffsets[$file] = 1 + $fileOffset; - file_put_contents($file, $code); - } - - /** - * Utility method to add @return annotations to the Symfony code-base where it triggers self-deprecations. - */ - private function patchMethod(\ReflectionMethod $method, string $returnType, string $declaringFile, string $normalizedType): void - { - static $patchedMethods = []; - static $useStatements = []; - - if (!is_file($file = $method->getFileName()) || isset($patchedMethods[$file][$startLine = $method->getStartLine()])) { - return; - } - - $patchedMethods[$file][$startLine] = true; - $fileOffset = self::$fileOffsets[$file] ?? 0; - $startLine += $fileOffset - 2; - if ($nullable = str_ends_with($returnType, '|null')) { - $returnType = substr($returnType, 0, -5); - } - $glue = str_contains($returnType, '&') ? '&' : '|'; - $returnType = explode($glue, $returnType); - $code = file($file); - - foreach ($returnType as $i => $type) { - if (preg_match('/((?:\[\])+)$/', $type, $m)) { - $type = substr($type, 0, -\strlen($m[1])); - $format = '%s'.$m[1]; - } else { - $format = null; - } - - if (isset(self::SPECIAL_RETURN_TYPES[$type]) || ('\\' === $type[0] && !$p = strrpos($type, '\\', 1))) { - continue; - } - - [$namespace, $useOffset, $useMap] = $useStatements[$file] ??= self::getUseStatements($file); - - if ('\\' !== $type[0]) { - [$declaringNamespace, , $declaringUseMap] = $useStatements[$declaringFile] ??= self::getUseStatements($declaringFile); - - $p = strpos($type, '\\', 1); - $alias = $p ? substr($type, 0, $p) : $type; - - if (isset($declaringUseMap[$alias])) { - $type = '\\'.$declaringUseMap[$alias].($p ? substr($type, $p) : ''); - } else { - $type = '\\'.$declaringNamespace.$type; - } - - $p = strrpos($type, '\\', 1); - } - - $alias = substr($type, 1 + $p); - $type = substr($type, 1); - - if (!isset($useMap[$alias]) && (class_exists($c = $namespace.$alias) || interface_exists($c) || trait_exists($c))) { - $useMap[$alias] = $c; - } - - if (!isset($useMap[$alias])) { - $useStatements[$file][2][$alias] = $type; - $code[$useOffset] = "use $type;\n".$code[$useOffset]; - ++$fileOffset; - } elseif ($useMap[$alias] !== $type) { - $alias .= 'FIXME'; - $useStatements[$file][2][$alias] = $type; - $code[$useOffset] = "use $type as $alias;\n".$code[$useOffset]; - ++$fileOffset; - } - - $returnType[$i] = null !== $format ? \sprintf($format, $alias) : $alias; - } - - if ('docblock' === $this->patchTypes['force'] || ('object' === $normalizedType && '7.1' === $this->patchTypes['php'])) { - $returnType = implode($glue, $returnType).($nullable ? '|null' : ''); - - if (str_contains($code[$startLine], '#[')) { - --$startLine; - } - - if ($method->getDocComment()) { - $code[$startLine] = " * @return $returnType\n".$code[$startLine]; - } else { - $code[$startLine] .= <<fixReturnStatements($method, $normalizedType); - } - - private static function getUseStatements(string $file): array - { - $namespace = ''; - $useMap = []; - $useOffset = 0; - - if (!is_file($file)) { - return [$namespace, $useOffset, $useMap]; - } - - $file = file($file); - - for ($i = 0; $i < \count($file); ++$i) { - if (preg_match('/^(class|interface|trait|abstract) /', $file[$i])) { - break; - } - - if (str_starts_with($file[$i], 'namespace ')) { - $namespace = substr($file[$i], \strlen('namespace '), -2).'\\'; - $useOffset = $i + 2; - } - - if (str_starts_with($file[$i], 'use ')) { - $useOffset = $i; - - for (; str_starts_with($file[$i], 'use '); ++$i) { - $u = explode(' as ', substr($file[$i], 4, -2), 2); - - if (1 === \count($u)) { - $p = strrpos($u[0], '\\'); - $useMap[substr($u[0], false !== $p ? 1 + $p : 0)] = $u[0]; - } else { - $useMap[$u[1]] = $u[0]; - } - } - - break; - } - } - - return [$namespace, $useOffset, $useMap]; - } - - private function fixReturnStatements(\ReflectionMethod $method, string $returnType): void - { - if ('docblock' !== $this->patchTypes['force']) { - if ('7.1' === $this->patchTypes['php'] && 'object' === ltrim($returnType, '?')) { - return; - } - - if ('7.4' > $this->patchTypes['php'] && $method->hasReturnType()) { - return; - } - - if ('8.0' > $this->patchTypes['php'] && (str_contains($returnType, '|') || \in_array($returnType, ['mixed', 'static'], true))) { - return; - } - - if ('8.1' > $this->patchTypes['php'] && str_contains($returnType, '&')) { - return; - } - } - - if (!is_file($file = $method->getFileName())) { - return; - } - - $fixedCode = $code = file($file); - $i = (self::$fileOffsets[$file] ?? 0) + $method->getStartLine(); - - if ('?' !== $returnType && 'docblock' !== $this->patchTypes['force']) { - $fixedCode[$i - 1] = preg_replace('/\)(?::[^;\n]++)?(;?\n)/', "): $returnType\\1", $code[$i - 1]); - } - - $end = $method->isGenerator() ? $i : $method->getEndLine(); - $inClosure = false; - $braces = 0; - for (; $i < $end; ++$i) { - if (!$inClosure) { - $inClosure = str_contains($code[$i], 'function ('); - } - - if ($inClosure) { - $braces += substr_count($code[$i], '{') - substr_count($code[$i], '}'); - $inClosure = $braces > 0; - - continue; - } - - if ('void' === $returnType) { - $fixedCode[$i] = str_replace(' return null;', ' return;', $code[$i]); - } elseif ('mixed' === $returnType || '?' === $returnType[0]) { - $fixedCode[$i] = str_replace(' return;', ' return null;', $code[$i]); - } else { - $fixedCode[$i] = str_replace(' return;', " return $returnType!?;", $code[$i]); - } - } - - if ($fixedCode !== $code) { - file_put_contents($file, $fixedCode); - } - } - - /** - * @param \ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflector - */ - private function parsePhpDoc(\Reflector $reflector): array - { - if (!$doc = $reflector->getDocComment()) { - return []; - } - - $tagName = ''; - $tagContent = ''; - - $tags = []; - - foreach (explode("\n", substr($doc, 3, -2)) as $line) { - $line = ltrim($line); - $line = ltrim($line, '*'); - - if ('' === $line = trim($line)) { - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - } - $tagName = $tagContent = ''; - continue; - } - - if ('@' === $line[0]) { - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - $tagContent = ''; - } - - if (preg_match('{^@([-a-zA-Z0-9_:]++)(\s|$)}', $line, $m)) { - $tagName = $m[1]; - $tagContent = str_replace("\t", ' ', ltrim(substr($line, 2 + \strlen($tagName)))); - } else { - $tagName = ''; - } - } elseif ('' !== $tagName) { - $tagContent .= ' '.str_replace("\t", ' ', $line); - } - } - - if ('' !== $tagName) { - $tags[$tagName][] = $tagContent; - } - - foreach ($tags['method'] ?? [] as $i => $method) { - unset($tags['method'][$i]); - - $parts = preg_split('{(\s++|\((?:[^()]*+|(?R))*\)(?: *: *[^ ]++)?|<(?:[^<>]*+|(?R))*>|\{(?:[^{}]*+|(?R))*\})}', $method, -1, \PREG_SPLIT_DELIM_CAPTURE); - $returnType = ''; - $static = 'static' === $parts[0]; - - for ($i = $static ? 2 : 0; null !== $p = $parts[$i] ?? null; $i += 2) { - if (\in_array($p, ['', '|', '&', 'callable'], true) || \in_array(substr($returnType, -1), ['|', '&'], true)) { - $returnType .= trim($parts[$i - 1] ?? '').$p; - continue; - } - - $signature = '(' === ($parts[$i + 1][0] ?? '(') ? $parts[$i + 1] ?? '()' : null; - - if (null === $signature && '' === $returnType) { - $returnType = $p; - continue; - } - - if ($static && 2 === $i) { - $static = false; - $returnType = 'static'; - } - - if (\in_array($description = trim(implode('', \array_slice($parts, 2 + $i))), ['', '.'], true)) { - $description = null; - } elseif (!preg_match('/[.!]$/', $description)) { - $description .= '.'; - } - - $tags['method'][$p] = [$static, $returnType, $signature ?? '()', $description]; - break; - } - } - - foreach ($tags['param'] ?? [] as $i => $param) { - unset($tags['param'][$i]); - - if (\strlen($param) !== strcspn($param, '<{(')) { - $param = preg_replace('{\(([^()]*+|(?R))*\)(?: *: *[^ ]++)?|<([^<>]*+|(?R))*>|\{([^{}]*+|(?R))*\}}', '', $param); - } - - if (false === $i = strpos($param, '$')) { - continue; - } - - $type = 0 === $i ? '' : rtrim(substr($param, 0, $i), ' &'); - $param = substr($param, 1 + $i, (strpos($param, ' ', $i) ?: (1 + $i + \strlen($param))) - $i - 1); - - $tags['param'][$param] = $type; - } - - foreach (['var', 'return'] as $k) { - if (null === $v = $tags[$k][0] ?? null) { - continue; - } - if (\strlen($v) !== strcspn($v, '<{(')) { - $v = preg_replace('{\(([^()]*+|(?R))*\)(?: *: *[^ ]++)?|<([^<>]*+|(?R))*>|\{([^{}]*+|(?R))*\}}', '', $v); - } - - $tags[$k] = substr($v, 0, strpos($v, ' ') ?: \strlen($v)) ?: null; - } - - return $tags; - } -} diff --git a/vendor/symfony/error-handler/Error/ClassNotFoundError.php b/vendor/symfony/error-handler/Error/ClassNotFoundError.php deleted file mode 100644 index 8a17745c..00000000 --- a/vendor/symfony/error-handler/Error/ClassNotFoundError.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class ClassNotFoundError extends \Error -{ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/Error/FatalError.php b/vendor/symfony/error-handler/Error/FatalError.php deleted file mode 100644 index b80e3fa3..00000000 --- a/vendor/symfony/error-handler/Error/FatalError.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class FatalError extends \Error -{ - /** - * @param array $error An array as returned by error_get_last() - */ - public function __construct( - string $message, - int $code, - private array $error, - ?int $traceOffset = null, - bool $traceArgs = true, - ?array $trace = null, - ) { - parent::__construct($message, $code); - - if (null !== $trace) { - if (!$traceArgs) { - foreach ($trace as &$frame) { - unset($frame['args'], $frame['this'], $frame); - } - } - } elseif (null !== $traceOffset) { - if (\function_exists('xdebug_get_function_stack') && \in_array(\ini_get('xdebug.mode'), ['develop', false], true) && $trace = @xdebug_get_function_stack()) { - if (0 < $traceOffset) { - array_splice($trace, -$traceOffset); - } - - foreach ($trace as &$frame) { - if (!isset($frame['type'])) { - // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 - if (isset($frame['class'])) { - $frame['type'] = '::'; - } - } elseif ('dynamic' === $frame['type']) { - $frame['type'] = '->'; - } elseif ('static' === $frame['type']) { - $frame['type'] = '::'; - } - - // XDebug also has a different name for the parameters array - if (!$traceArgs) { - unset($frame['params'], $frame['args']); - } elseif (isset($frame['params']) && !isset($frame['args'])) { - $frame['args'] = $frame['params']; - unset($frame['params']); - } - } - - unset($frame); - $trace = array_reverse($trace); - } else { - $trace = []; - } - } - - foreach ([ - 'file' => $error['file'], - 'line' => $error['line'], - 'trace' => $trace, - ] as $property => $value) { - if (null !== $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setValue($this, $value); - } - } - } - - public function getError(): array - { - return $this->error; - } -} diff --git a/vendor/symfony/error-handler/Error/OutOfMemoryError.php b/vendor/symfony/error-handler/Error/OutOfMemoryError.php deleted file mode 100644 index d685c3d3..00000000 --- a/vendor/symfony/error-handler/Error/OutOfMemoryError.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class OutOfMemoryError extends FatalError -{ -} diff --git a/vendor/symfony/error-handler/Error/UndefinedFunctionError.php b/vendor/symfony/error-handler/Error/UndefinedFunctionError.php deleted file mode 100644 index 5063b73d..00000000 --- a/vendor/symfony/error-handler/Error/UndefinedFunctionError.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class UndefinedFunctionError extends \Error -{ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/Error/UndefinedMethodError.php b/vendor/symfony/error-handler/Error/UndefinedMethodError.php deleted file mode 100644 index 35f15451..00000000 --- a/vendor/symfony/error-handler/Error/UndefinedMethodError.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Error; - -class UndefinedMethodError extends \Error -{ - public function __construct(string $message, \Throwable $previous) - { - parent::__construct($message, $previous->getCode(), $previous->getPrevious()); - - foreach ([ - 'file' => $previous->getFile(), - 'line' => $previous->getLine(), - 'trace' => $previous->getTrace(), - ] as $property => $value) { - $refl = new \ReflectionProperty(\Error::class, $property); - $refl->setValue($this, $value); - } - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php deleted file mode 100644 index fc243a61..00000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Composer\Autoload\ClassLoader; -use Symfony\Component\ErrorHandler\DebugClassLoader; -use Symfony\Component\ErrorHandler\Error\ClassNotFoundError; -use Symfony\Component\ErrorHandler\Error\FatalError; - -/** - * @author Fabien Potencier - */ -class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface -{ - public function enhance(\Throwable $error): ?\Throwable - { - // Some specific versions of PHP produce a fatal error when extending a not found class. - $message = !$error instanceof FatalError ? $error->getMessage() : $error->getError()['message']; - if (!preg_match('/^(Class|Interface|Trait) [\'"]([^\'"]+)[\'"] not found$/', $message, $matches)) { - return null; - } - $typeName = strtolower($matches[1]); - $fullyQualifiedClassName = $matches[2]; - - if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedClassName, '\\')) { - $className = substr($fullyQualifiedClassName, $namespaceSeparatorIndex + 1); - $namespacePrefix = substr($fullyQualifiedClassName, 0, $namespaceSeparatorIndex); - $message = \sprintf('Attempted to load %s "%s" from namespace "%s".', $typeName, $className, $namespacePrefix); - $tail = ' for another namespace?'; - } else { - $className = $fullyQualifiedClassName; - $message = \sprintf('Attempted to load %s "%s" from the global namespace.', $typeName, $className); - $tail = '?'; - } - - if ($candidates = $this->getClassCandidates($className)) { - $tail = array_pop($candidates).'"?'; - if ($candidates) { - $tail = ' for e.g. "'.implode('", "', $candidates).'" or "'.$tail; - } else { - $tail = ' for "'.$tail; - } - } - $message .= "\nDid you forget a \"use\" statement".$tail; - - return new ClassNotFoundError($message, $error); - } - - /** - * Tries to guess the full namespace for a given class name. - * - * By default, it looks for PSR-0 and PSR-4 classes registered via a Symfony or a Composer - * autoloader (that should cover all common cases). - * - * @param string $class A class name (without its namespace) - * - * Returns an array of possible fully qualified class names - */ - private function getClassCandidates(string $class): array - { - if (!\is_array($functions = spl_autoload_functions())) { - return []; - } - - // find Symfony and Composer autoloaders - $classes = []; - - foreach ($functions as $function) { - if (!\is_array($function)) { - continue; - } - // get class loaders wrapped by DebugClassLoader - if ($function[0] instanceof DebugClassLoader) { - $function = $function[0]->getClassLoader(); - - if (!\is_array($function)) { - continue; - } - } - - if ($function[0] instanceof ClassLoader) { - foreach ($function[0]->getPrefixes() as $prefix => $paths) { - foreach ($paths as $path) { - $classes[] = $this->findClassInPath($path, $class, $prefix); - } - } - - foreach ($function[0]->getPrefixesPsr4() as $prefix => $paths) { - foreach ($paths as $path) { - $classes[] = $this->findClassInPath($path, $class, $prefix); - } - } - } - } - - return array_unique(array_merge([], ...$classes)); - } - - private function findClassInPath(string $path, string $class, string $prefix): array - { - $path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path); - if (!$path || !is_dir($path)) { - return []; - } - - $classes = []; - $filename = $class.'.php'; - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) { - $classes[] = $class; - } - } - - return $classes; - } - - private function convertFileToClass(string $path, string $file, string $prefix): ?string - { - $candidates = [ - // namespaced class - $namespacedClass = str_replace([$path.\DIRECTORY_SEPARATOR, '.php', '/'], ['', '', '\\'], $file), - // namespaced class (with target dir) - $prefix.$namespacedClass, - // namespaced class (with target dir and separator) - $prefix.'\\'.$namespacedClass, - // PEAR class - str_replace('\\', '_', $namespacedClass), - // PEAR class (with target dir) - str_replace('\\', '_', $prefix.$namespacedClass), - // PEAR class (with target dir and separator) - str_replace('\\', '_', $prefix.'\\'.$namespacedClass), - ]; - - if ($prefix) { - $candidates = array_filter($candidates, fn ($candidate) => str_starts_with($candidate, $prefix)); - } - - // We cannot use the autoloader here as most of them use require; but if the class - // is not found, the new autoloader call will require the file again leading to a - // "cannot redeclare class" error. - foreach ($candidates as $candidate) { - if ($this->classExists($candidate)) { - return $candidate; - } - } - - // Symfony may ship some polyfills, like "Normalizer". But if the Intl - // extension is already installed, the next require_once will fail with - // a compile error because the class is already defined. And this one - // does not throw a Throwable. So it's better to skip it here. - if (str_contains($file, 'Resources/stubs')) { - return null; - } - - try { - require_once $file; - } catch (\Throwable) { - return null; - } - - foreach ($candidates as $candidate) { - if ($this->classExists($candidate)) { - return $candidate; - } - } - - return null; - } - - private function classExists(string $class): bool - { - return class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php b/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php deleted file mode 100644 index 7c3f4ef9..00000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/ErrorEnhancerInterface.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -interface ErrorEnhancerInterface -{ - /** - * Returns an \Throwable instance if the class is able to improve the error, null otherwise. - */ - public function enhance(\Throwable $error): ?\Throwable; -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php deleted file mode 100644 index 41d7af3a..00000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedFunctionErrorEnhancer.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\UndefinedFunctionError; - -/** - * @author Fabien Potencier - */ -class UndefinedFunctionErrorEnhancer implements ErrorEnhancerInterface -{ - public function enhance(\Throwable $error): ?\Throwable - { - if ($error instanceof FatalError) { - return null; - } - - $message = $error->getMessage(); - $messageLen = \strlen($message); - $notFoundSuffix = '()'; - $notFoundSuffixLen = \strlen($notFoundSuffix); - if ($notFoundSuffixLen > $messageLen) { - return null; - } - - if (0 !== substr_compare($message, $notFoundSuffix, -$notFoundSuffixLen)) { - return null; - } - - $prefix = 'Call to undefined function '; - $prefixLen = \strlen($prefix); - if (!str_starts_with($message, $prefix)) { - return null; - } - - $fullyQualifiedFunctionName = substr($message, $prefixLen, -$notFoundSuffixLen); - if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedFunctionName, '\\')) { - $functionName = substr($fullyQualifiedFunctionName, $namespaceSeparatorIndex + 1); - $namespacePrefix = substr($fullyQualifiedFunctionName, 0, $namespaceSeparatorIndex); - $message = \sprintf('Attempted to call undefined function "%s" from namespace "%s".', $functionName, $namespacePrefix); - } else { - $functionName = $fullyQualifiedFunctionName; - $message = \sprintf('Attempted to call undefined function "%s" from the global namespace.', $functionName); - } - - $candidates = []; - foreach (get_defined_functions() as $type => $definedFunctionNames) { - foreach ($definedFunctionNames as $definedFunctionName) { - if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) { - $definedFunctionNameBasename = substr($definedFunctionName, $namespaceSeparatorIndex + 1); - } else { - $definedFunctionNameBasename = $definedFunctionName; - } - - if ($definedFunctionNameBasename === $functionName) { - $candidates[] = '\\'.$definedFunctionName; - } - } - } - - if ($candidates) { - sort($candidates); - $last = array_pop($candidates).'"?'; - if ($candidates) { - $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; - } else { - $candidates = '"'.$last; - } - $message .= "\nDid you mean to call ".$candidates; - } - - return new UndefinedFunctionError($message, $error); - } -} diff --git a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php deleted file mode 100644 index e331c179..00000000 --- a/vendor/symfony/error-handler/ErrorEnhancer/UndefinedMethodErrorEnhancer.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorEnhancer; - -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\UndefinedMethodError; - -/** - * @author Grégoire Pineau - */ -class UndefinedMethodErrorEnhancer implements ErrorEnhancerInterface -{ - public function enhance(\Throwable $error): ?\Throwable - { - if ($error instanceof FatalError) { - return null; - } - - $message = $error->getMessage(); - preg_match('/^Call to undefined method (.*)::(.*)\(\)$/', $message, $matches); - if (!$matches) { - return null; - } - - $className = $matches[1]; - $methodName = $matches[2]; - - $message = \sprintf('Attempted to call an undefined method named "%s" of class "%s".', $methodName, $className); - - if ('' === $methodName || !class_exists($className) || null === $methods = get_class_methods($className)) { - // failed to get the class or its methods on which an unknown method was called (for example on an anonymous class) - return new UndefinedMethodError($message, $error); - } - - $candidates = []; - foreach ($methods as $definedMethodName) { - $lev = levenshtein($methodName, $definedMethodName); - if ($lev <= \strlen($methodName) / 3 || str_contains($definedMethodName, $methodName)) { - $candidates[] = $definedMethodName; - } - } - - if ($candidates) { - sort($candidates); - $last = array_pop($candidates).'"?'; - if ($candidates) { - $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last; - } else { - $candidates = '"'.$last; - } - - $message .= "\nDid you mean to call ".$candidates; - } - - return new UndefinedMethodError($message, $error); - } -} diff --git a/vendor/symfony/error-handler/ErrorHandler.php b/vendor/symfony/error-handler/ErrorHandler.php deleted file mode 100644 index 5ffe75e5..00000000 --- a/vendor/symfony/error-handler/ErrorHandler.php +++ /dev/null @@ -1,747 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use Symfony\Component\ErrorHandler\Error\FatalError; -use Symfony\Component\ErrorHandler\Error\OutOfMemoryError; -use Symfony\Component\ErrorHandler\ErrorEnhancer\ClassNotFoundErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorEnhancer\ErrorEnhancerInterface; -use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedFunctionErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedMethodErrorEnhancer; -use Symfony\Component\ErrorHandler\ErrorRenderer\CliErrorRenderer; -use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; - -/** - * A generic ErrorHandler for the PHP engine. - * - * Provides five bit fields that control how errors are handled: - * - thrownErrors: errors thrown as \ErrorException - * - loggedErrors: logged errors, when not @-silenced - * - scopedErrors: errors thrown or logged with their local context - * - tracedErrors: errors logged with their stack trace - * - screamedErrors: never @-silenced errors - * - * Each error level can be logged by a dedicated PSR-3 logger object. - * Screaming only applies to logging. - * Throwing takes precedence over logging. - * Uncaught exceptions are logged as E_ERROR. - * E_DEPRECATED and E_USER_DEPRECATED levels never throw. - * E_RECOVERABLE_ERROR and E_USER_ERROR levels always throw. - * Non catchable errors that can be detected at shutdown time are logged when the scream bit field allows so. - * As errors have a performance cost, repeated errors are all logged, so that the developer - * can see them and weight them as more important to fix than others of the same level. - * - * @author Nicolas Grekas - * @author Grégoire Pineau - * - * @final - */ -class ErrorHandler -{ - private array $levels = [ - \E_DEPRECATED => 'Deprecated', - \E_USER_DEPRECATED => 'User Deprecated', - \E_NOTICE => 'Notice', - \E_USER_NOTICE => 'User Notice', - \E_WARNING => 'Warning', - \E_USER_WARNING => 'User Warning', - \E_COMPILE_WARNING => 'Compile Warning', - \E_CORE_WARNING => 'Core Warning', - \E_USER_ERROR => 'User Error', - \E_RECOVERABLE_ERROR => 'Catchable Fatal Error', - \E_COMPILE_ERROR => 'Compile Error', - \E_PARSE => 'Parse Error', - \E_ERROR => 'Error', - \E_CORE_ERROR => 'Core Error', - ]; - - private array $loggers = [ - \E_DEPRECATED => [null, LogLevel::INFO], - \E_USER_DEPRECATED => [null, LogLevel::INFO], - \E_NOTICE => [null, LogLevel::ERROR], - \E_USER_NOTICE => [null, LogLevel::ERROR], - \E_WARNING => [null, LogLevel::ERROR], - \E_USER_WARNING => [null, LogLevel::ERROR], - \E_COMPILE_WARNING => [null, LogLevel::ERROR], - \E_CORE_WARNING => [null, LogLevel::ERROR], - \E_USER_ERROR => [null, LogLevel::CRITICAL], - \E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], - \E_COMPILE_ERROR => [null, LogLevel::CRITICAL], - \E_PARSE => [null, LogLevel::CRITICAL], - \E_ERROR => [null, LogLevel::CRITICAL], - \E_CORE_ERROR => [null, LogLevel::CRITICAL], - ]; - - private int $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED - private int $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED - private int $tracedErrors = 0x77FB; // E_ALL - E_STRICT - E_PARSE - private int $screamedErrors = 0x55; // E_ERROR + E_CORE_ERROR + E_COMPILE_ERROR + E_PARSE - private int $loggedErrors = 0; - private \Closure $configureException; - - private bool $isRecursive = false; - private bool $isRoot = false; - /** @var callable|null */ - private $exceptionHandler; - private ?BufferingLogger $bootstrappingLogger = null; - - private static ?string $reservedMemory = null; - private static array $silencedErrorCache = []; - private static int $silencedErrorCount = 0; - private static int $exitCode = 0; - - /** - * Registers the error handler. - */ - public static function register(?self $handler = null, bool $replace = true): self - { - if (null === self::$reservedMemory) { - self::$reservedMemory = str_repeat('x', 32768); - register_shutdown_function(self::handleFatalError(...)); - } - - if ($handlerIsNew = null === $handler) { - $handler = new static(); - } - - if (null === $prev = set_error_handler([$handler, 'handleError'])) { - restore_error_handler(); - // Specifying the error types earlier would expose us to https://bugs.php.net/63206 - set_error_handler([$handler, 'handleError'], $handler->thrownErrors | $handler->loggedErrors); - $handler->isRoot = true; - } - - if ($handlerIsNew && \is_array($prev) && $prev[0] instanceof self) { - $handler = $prev[0]; - $replace = false; - } - if (!$replace && $prev) { - restore_error_handler(); - $handlerIsRegistered = \is_array($prev) && $handler === $prev[0]; - } else { - $handlerIsRegistered = true; - } - if (\is_array($prev = set_exception_handler([$handler, 'handleException'])) && $prev[0] instanceof self) { - restore_exception_handler(); - if (!$handlerIsRegistered) { - $handler = $prev[0]; - } elseif ($handler !== $prev[0] && $replace) { - set_exception_handler([$handler, 'handleException']); - $p = $prev[0]->setExceptionHandler(null); - $handler->setExceptionHandler($p); - $prev[0]->setExceptionHandler($p); - } - } else { - $handler->setExceptionHandler($prev ?? [$handler, 'renderException']); - } - - $handler->throwAt(\E_ALL & $handler->thrownErrors, true); - - return $handler; - } - - /** - * Calls a function and turns any PHP error into \ErrorException. - * - * @throws \ErrorException When $function(...$arguments) triggers a PHP error - */ - public static function call(callable $function, mixed ...$arguments): mixed - { - set_error_handler(static function (int $type, string $message, string $file, int $line) { - if (__FILE__ === $file) { - $trace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3); - $file = $trace[2]['file'] ?? $file; - $line = $trace[2]['line'] ?? $line; - } - - throw new \ErrorException($message, 0, $type, $file, $line); - }); - - try { - return $function(...$arguments); - } finally { - restore_error_handler(); - } - } - - public function __construct( - ?BufferingLogger $bootstrappingLogger = null, - private bool $debug = false, - ) { - if (\PHP_VERSION_ID < 80400) { - $this->levels[\E_STRICT] = 'Runtime Notice'; - $this->loggers[\E_STRICT] = [null, LogLevel::ERROR]; - } - - if ($bootstrappingLogger) { - $this->bootstrappingLogger = $bootstrappingLogger; - $this->setDefaultLogger($bootstrappingLogger); - } - $traceReflector = new \ReflectionProperty(\Exception::class, 'trace'); - $this->configureException = \Closure::bind(static function ($e, $trace, $file = null, $line = null) use ($traceReflector) { - $traceReflector->setValue($e, $trace); - $e->file = $file ?? $e->file; - $e->line = $line ?? $e->line; - }, null, new class extends \Exception { - }); - } - - /** - * Sets a logger to non assigned errors levels. - * - * @param LoggerInterface $logger A PSR-3 logger to put as default for the given levels - * @param array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants - * @param bool $replace Whether to replace or not any existing logger - */ - public function setDefaultLogger(LoggerInterface $logger, array|int|null $levels = \E_ALL, bool $replace = false): void - { - $loggers = []; - - if (\is_array($levels)) { - foreach ($levels as $type => $logLevel) { - if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { - $loggers[$type] = [$logger, $logLevel]; - } - } - } else { - $levels ??= \E_ALL; - foreach ($this->loggers as $type => $log) { - if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) { - $log[0] = $logger; - $loggers[$type] = $log; - } - } - } - - $this->setLoggers($loggers); - } - - /** - * Sets a logger for each error level. - * - * @param array $loggers Error levels to [LoggerInterface|null, LogLevel::*] map - * - * @throws \InvalidArgumentException - */ - public function setLoggers(array $loggers): array - { - $prevLogged = $this->loggedErrors; - $prev = $this->loggers; - $flush = []; - - foreach ($loggers as $type => $log) { - if (!isset($prev[$type])) { - throw new \InvalidArgumentException('Unknown error type: '.$type); - } - if (!\is_array($log)) { - $log = [$log]; - } elseif (!\array_key_exists(0, $log)) { - throw new \InvalidArgumentException('No logger provided.'); - } - if (null === $log[0]) { - $this->loggedErrors &= ~$type; - } elseif ($log[0] instanceof LoggerInterface) { - $this->loggedErrors |= $type; - } else { - throw new \InvalidArgumentException('Invalid logger provided.'); - } - $this->loggers[$type] = $log + $prev[$type]; - - if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) { - $flush[$type] = $type; - } - } - $this->reRegister($prevLogged | $this->thrownErrors); - - if ($flush) { - foreach ($this->bootstrappingLogger->cleanLogs() as $log) { - $type = ThrowableUtils::getSeverity($log[2]['exception']); - if (!isset($flush[$type])) { - $this->bootstrappingLogger->log($log[0], $log[1], $log[2]); - } elseif ($this->loggers[$type][0]) { - $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]); - } - } - } - - return $prev; - } - - public function setExceptionHandler(?callable $handler): ?callable - { - $prev = $this->exceptionHandler; - $this->exceptionHandler = $handler; - - return $prev; - } - - /** - * Sets the PHP error levels that throw an exception when a PHP error occurs. - * - * @param int $levels A bit field of E_* constants for thrown errors - * @param bool $replace Replace or amend the previous value - */ - public function throwAt(int $levels, bool $replace = false): int - { - $prev = $this->thrownErrors; - $this->thrownErrors = ($levels | \E_RECOVERABLE_ERROR | \E_USER_ERROR) & ~\E_USER_DEPRECATED & ~\E_DEPRECATED; - if (!$replace) { - $this->thrownErrors |= $prev; - } - $this->reRegister($prev | $this->loggedErrors); - - return $prev; - } - - /** - * Sets the PHP error levels for which local variables are preserved. - * - * @param int $levels A bit field of E_* constants for scoped errors - * @param bool $replace Replace or amend the previous value - */ - public function scopeAt(int $levels, bool $replace = false): int - { - $prev = $this->scopedErrors; - $this->scopedErrors = $levels; - if (!$replace) { - $this->scopedErrors |= $prev; - } - - return $prev; - } - - /** - * Sets the PHP error levels for which the stack trace is preserved. - * - * @param int $levels A bit field of E_* constants for traced errors - * @param bool $replace Replace or amend the previous value - */ - public function traceAt(int $levels, bool $replace = false): int - { - $prev = $this->tracedErrors; - $this->tracedErrors = $levels; - if (!$replace) { - $this->tracedErrors |= $prev; - } - - return $prev; - } - - /** - * Sets the error levels where the @-operator is ignored. - * - * @param int $levels A bit field of E_* constants for screamed errors - * @param bool $replace Replace or amend the previous value - */ - public function screamAt(int $levels, bool $replace = false): int - { - $prev = $this->screamedErrors; - $this->screamedErrors = $levels; - if (!$replace) { - $this->screamedErrors |= $prev; - } - - return $prev; - } - - /** - * Re-registers as a PHP error handler if levels changed. - */ - private function reRegister(int $prev): void - { - if ($prev !== ($this->thrownErrors | $this->loggedErrors)) { - $handler = set_error_handler(static fn () => null); - $handler = \is_array($handler) ? $handler[0] : null; - restore_error_handler(); - if ($handler === $this) { - restore_error_handler(); - if ($this->isRoot) { - set_error_handler([$this, 'handleError'], $this->thrownErrors | $this->loggedErrors); - } else { - set_error_handler([$this, 'handleError']); - } - } - } - } - - /** - * Handles errors by filtering then logging them according to the configured bit fields. - * - * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself - * - * @throws \ErrorException When $this->thrownErrors requests so - * - * @internal - */ - public function handleError(int $type, string $message, string $file, int $line): bool - { - if (\E_WARNING === $type && '"' === $message[0] && str_contains($message, '" targeting switch is equivalent to "break')) { - $type = \E_DEPRECATED; - } - - // Level is the current error reporting level to manage silent error. - $level = error_reporting(); - $silenced = 0 === ($level & $type); - // Strong errors are not authorized to be silenced. - $level |= \E_RECOVERABLE_ERROR | \E_USER_ERROR | \E_DEPRECATED | \E_USER_DEPRECATED; - $log = $this->loggedErrors & $type; - $throw = $this->thrownErrors & $type & $level; - $type &= $level | $this->screamedErrors; - - // Never throw on warnings triggered by assert() - if (\E_WARNING === $type && 'a' === $message[0] && 0 === strncmp($message, 'assert(): ', 10)) { - $throw = 0; - } - - if (!$type || (!$log && !$throw)) { - return false; - } - - $logMessage = $this->levels[$type].': '.$message; - - if (!$throw && !($type & $level)) { - if (!isset(self::$silencedErrorCache[$id = $file.':'.$line])) { - $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 5), $type, $file, $line, false) : []; - $errorAsException = new SilencedErrorContext($type, $file, $line, isset($lightTrace[1]) ? [$lightTrace[0]] : $lightTrace); - } elseif (isset(self::$silencedErrorCache[$id][$message])) { - $lightTrace = null; - $errorAsException = self::$silencedErrorCache[$id][$message]; - ++$errorAsException->count; - } else { - $lightTrace = []; - $errorAsException = null; - } - - if (100 < ++self::$silencedErrorCount) { - self::$silencedErrorCache = $lightTrace = []; - self::$silencedErrorCount = 1; - } - if ($errorAsException) { - self::$silencedErrorCache[$id][$message] = $errorAsException; - } - if (null === $lightTrace) { - return true; - } - } else { - if (\PHP_VERSION_ID < 80303 && str_contains($message, '@anonymous')) { - $backtrace = debug_backtrace(false, 5); - - for ($i = 1; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['function'], $backtrace[$i]['args'][0]) - && ('trigger_error' === $backtrace[$i]['function'] || 'user_error' === $backtrace[$i]['function']) - ) { - if ($backtrace[$i]['args'][0] !== $message) { - $message = $backtrace[$i]['args'][0]; - } - - break; - } - } - } - - if (str_contains($message, "@anonymous\0")) { - $message = $this->parseAnonymousClass($message); - $logMessage = $this->levels[$type].': '.$message; - } - - $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); - - if ($throw || $this->tracedErrors & $type) { - $backtrace = $errorAsException->getTrace(); - $backtrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw); - ($this->configureException)($errorAsException, $backtrace, $file, $line); - } else { - ($this->configureException)($errorAsException, []); - } - } - - if ($throw) { - throw $errorAsException; - } - - if ($this->isRecursive) { - $log = 0; - } else { - try { - $this->isRecursive = true; - $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; - $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? ['exception' => $errorAsException] : []); - } finally { - $this->isRecursive = false; - } - } - - return !$silenced && $type && $log; - } - - /** - * Handles an exception by logging then forwarding it to another handler. - * - * @internal - */ - public function handleException(\Throwable $exception): void - { - $handlerException = null; - - if (!$exception instanceof FatalError) { - self::$exitCode = 255; - - $type = ThrowableUtils::getSeverity($exception); - } else { - $type = $exception->getError()['type']; - } - - if ($this->loggedErrors & $type) { - if (str_contains($message = $exception->getMessage(), "@anonymous\0")) { - $message = $this->parseAnonymousClass($message); - } - - if ($exception instanceof FatalError) { - $message = 'Fatal '.$message; - } elseif ($exception instanceof \Error) { - $message = 'Uncaught Error: '.$message; - } elseif ($exception instanceof \ErrorException) { - $message = 'Uncaught '.$message; - } else { - $message = 'Uncaught Exception: '.$message; - } - - try { - $this->loggers[$type][0]->log($this->loggers[$type][1], $message, ['exception' => $exception]); - } catch (\Throwable $handlerException) { - } - } - - $exception = $this->enhanceError($exception); - - $exceptionHandler = $this->exceptionHandler; - $this->exceptionHandler = [$this, 'renderException']; - - if (null === $exceptionHandler || $exceptionHandler === $this->exceptionHandler) { - $this->exceptionHandler = null; - } - - try { - if (null !== $exceptionHandler) { - $exceptionHandler($exception); - - return; - } - $handlerException ??= $exception; - } catch (\Throwable $handlerException) { - } - if ($exception === $handlerException && null === $this->exceptionHandler) { - self::$reservedMemory = null; // Disable the fatal error handler - throw $exception; // Give back $exception to the native handler - } - - $loggedErrors = $this->loggedErrors; - if ($exception === $handlerException) { - $this->loggedErrors &= ~$type; - } - - try { - $this->handleException($handlerException); - } finally { - $this->loggedErrors = $loggedErrors; - } - } - - /** - * Shutdown registered function for handling PHP fatal errors. - * - * @param array|null $error An array as returned by error_get_last() - * - * @internal - */ - public static function handleFatalError(?array $error = null): void - { - if (null === self::$reservedMemory) { - return; - } - - $handler = self::$reservedMemory = null; - $handlers = []; - $previousHandler = null; - $sameHandlerLimit = 10; - - while (!\is_array($handler) || !$handler[0] instanceof self) { - $handler = set_exception_handler('is_int'); - restore_exception_handler(); - - if (!$handler) { - break; - } - restore_exception_handler(); - - if ($handler !== $previousHandler) { - array_unshift($handlers, $handler); - $previousHandler = $handler; - } elseif (0 === --$sameHandlerLimit) { - $handler = null; - break; - } - } - foreach ($handlers as $h) { - set_exception_handler($h); - } - if (!$handler) { - if (null === $error && $exitCode = self::$exitCode) { - register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); }); - } - - return; - } - if ($handler !== $h) { - $handler[0]->setExceptionHandler($h); - } - $handler = $handler[0]; - $handlers = []; - - if ($exit = null === $error) { - $error = error_get_last(); - } - - if ($error && $error['type'] &= \E_PARSE | \E_ERROR | \E_CORE_ERROR | \E_COMPILE_ERROR) { - // Let's not throw anymore but keep logging - $handler->throwAt(0, true); - $trace = $error['backtrace'] ?? null; - - if (str_starts_with($error['message'], 'Allowed memory') || str_starts_with($error['message'], 'Out of memory')) { - $fatalError = new OutOfMemoryError($handler->levels[$error['type']].': '.$error['message'], 0, $error, 2, false, $trace); - } else { - $fatalError = new FatalError($handler->levels[$error['type']].': '.$error['message'], 0, $error, 2, true, $trace); - } - } else { - $fatalError = null; - } - - try { - if (null !== $fatalError) { - self::$exitCode = 255; - $handler->handleException($fatalError); - } - } catch (FatalError) { - // Ignore this re-throw - } - - if ($exit && $exitCode = self::$exitCode) { - register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); }); - } - } - - /** - * Renders the given exception. - * - * As this method is mainly called during boot where nothing is yet available, - * the output is always either HTML or CLI depending where PHP runs. - */ - private function renderException(\Throwable $exception): void - { - $renderer = \in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) ? new CliErrorRenderer() : new HtmlErrorRenderer($this->debug); - - $exception = $renderer->render($exception); - - if (!headers_sent()) { - http_response_code($exception->getStatusCode()); - - foreach ($exception->getHeaders() as $name => $value) { - header($name.': '.$value, false); - } - } - - echo $exception->getAsString(); - } - - public function enhanceError(\Throwable $exception): \Throwable - { - if ($exception instanceof OutOfMemoryError) { - return $exception; - } - - foreach ($this->getErrorEnhancers() as $errorEnhancer) { - if ($e = $errorEnhancer->enhance($exception)) { - return $e; - } - } - - return $exception; - } - - /** - * Override this method if you want to define more error enhancers. - * - * @return ErrorEnhancerInterface[] - */ - protected function getErrorEnhancers(): iterable - { - return [ - new UndefinedFunctionErrorEnhancer(), - new UndefinedMethodErrorEnhancer(), - new ClassNotFoundErrorEnhancer(), - ]; - } - - /** - * Cleans the trace by removing function arguments and the frames added by the error handler and DebugClassLoader. - */ - private function cleanTrace(array $backtrace, int $type, string &$file, int &$line, bool $throw): array - { - $lightTrace = $backtrace; - - for ($i = 0; isset($backtrace[$i]); ++$i) { - if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $lightTrace = \array_slice($lightTrace, 1 + $i); - break; - } - } - if (\E_USER_DEPRECATED === $type) { - for ($i = 0; isset($lightTrace[$i]); ++$i) { - if (!isset($lightTrace[$i]['file'], $lightTrace[$i]['line'], $lightTrace[$i]['function'])) { - continue; - } - if (!isset($lightTrace[$i]['class']) && 'trigger_deprecation' === $lightTrace[$i]['function']) { - $file = $lightTrace[$i]['file']; - $line = $lightTrace[$i]['line']; - $lightTrace = \array_slice($lightTrace, 1 + $i); - break; - } - } - } - if (class_exists(DebugClassLoader::class, false)) { - for ($i = \count($lightTrace) - 2; 0 < $i; --$i) { - if (DebugClassLoader::class === ($lightTrace[$i]['class'] ?? null)) { - array_splice($lightTrace, --$i, 2); - } - } - } - if (!($throw || $this->scopedErrors & $type)) { - for ($i = 0; isset($lightTrace[$i]); ++$i) { - unset($lightTrace[$i]['args'], $lightTrace[$i]['object']); - } - } - - return $lightTrace; - } - - /** - * Parse the error message by removing the anonymous class notation - * and using the parent class instead if possible. - */ - private function parseAnonymousClass(string $message): string - { - return preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', static fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message); - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php deleted file mode 100644 index c414c830..00000000 --- a/vendor/symfony/error-handler/ErrorRenderer/CliErrorRenderer.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -// Help opcache.preload discover always-needed symbols -class_exists(CliDumper::class); - -/** - * @author Nicolas Grekas - */ -class CliErrorRenderer implements ErrorRendererInterface -{ - public function render(\Throwable $exception): FlattenException - { - $cloner = new VarCloner(); - $dumper = new class extends CliDumper { - protected function supportsColors(): bool - { - $outputStream = $this->outputStream; - $this->outputStream = fopen('php://stdout', 'w'); - - try { - return parent::supportsColors(); - } finally { - $this->outputStream = $outputStream; - } - } - }; - - return FlattenException::createFromThrowable($exception) - ->setAsString($dumper->dump($cloner->cloneVar($exception), true)); - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php b/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php deleted file mode 100644 index 2e289624..00000000 --- a/vendor/symfony/error-handler/ErrorRenderer/ErrorRendererInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; - -/** - * Formats an exception to be used as response content. - * - * @author Yonel Ceruto - */ -interface ErrorRendererInterface -{ - public const IDE_LINK_FORMATS = [ - 'textmate' => 'txmt://open?url=file://%f&line=%l', - 'macvim' => 'mvim://open?url=file://%f&line=%l', - 'emacs' => 'emacs://open?url=file://%f&line=%l', - 'sublime' => 'subl://open?url=file://%f&line=%l', - 'phpstorm' => 'phpstorm://open?file=%f&line=%l', - 'atom' => 'atom://core/open/file?filename=%f&line=%l', - 'vscode' => 'vscode://file/%f:%l', - ]; - - /** - * Renders a Throwable as a FlattenException. - */ - public function render(\Throwable $exception): FlattenException; -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/FileLinkFormatter.php b/vendor/symfony/error-handler/ErrorRenderer/FileLinkFormatter.php deleted file mode 100644 index aaea281a..00000000 --- a/vendor/symfony/error-handler/ErrorRenderer/FileLinkFormatter.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; - -/** - * Formats debug file links. - * - * @author Jérémy Romey - * - * @final - */ -class FileLinkFormatter -{ - private array|false $fileLinkFormat; - - /** - * @param string|\Closure $urlFormat The URL format, or a closure that returns it on-demand - */ - public function __construct( - string|array|null $fileLinkFormat = null, - private ?RequestStack $requestStack = null, - private ?string $baseDir = null, - private string|\Closure|null $urlFormat = null, - ) { - $fileLinkFormat ??= $_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? ''; - - if (!\is_array($f = $fileLinkFormat)) { - $f = (ErrorRendererInterface::IDE_LINK_FORMATS[$f] ?? $f) ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; - $i = strpos($f, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE); - } - - $this->fileLinkFormat = $fileLinkFormat; - } - - public function format(string $file, int $line): string|false - { - if ($fmt = $this->getFileLinkFormat()) { - for ($i = 1; isset($fmt[$i]); ++$i) { - if (str_starts_with($file, $k = $fmt[$i++])) { - $file = substr_replace($file, $fmt[$i], 0, \strlen($k)); - break; - } - } - - return strtr($fmt[0], ['%f' => $file, '%l' => $line]); - } - - return false; - } - - public function __serialize(): array - { - $this->fileLinkFormat = $this->getFileLinkFormat(); - - return ['fileLinkFormat' => $this->fileLinkFormat]; - } - - /** - * @internal - */ - public static function generateUrlFormat(UrlGeneratorInterface $router, string $routeName, string $queryString): ?string - { - try { - return $router->generate($routeName).$queryString; - } catch (\Throwable) { - return null; - } - } - - private function getFileLinkFormat(): array|false - { - if ($this->fileLinkFormat) { - return $this->fileLinkFormat; - } - - if ($this->requestStack && $this->baseDir && $this->urlFormat) { - $request = $this->requestStack->getMainRequest(); - - if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) { - return [ - $request->getSchemeAndHttpHost().$this->urlFormat, - $this->baseDir.\DIRECTORY_SEPARATOR, '', - ]; - } - } - - return false; - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php deleted file mode 100644 index 7bd9a083..00000000 --- a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php +++ /dev/null @@ -1,359 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Psr\Log\LoggerInterface; -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Log\DebugLoggerConfigurator; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -/** - * @author Yonel Ceruto - */ -class HtmlErrorRenderer implements ErrorRendererInterface -{ - private const GHOST_ADDONS = [ - '02-14' => self::GHOST_HEART, - '02-29' => self::GHOST_PLUS, - '10-18' => self::GHOST_GIFT, - ]; - - private const GHOST_GIFT = 'M124.00534057617188,5.3606138080358505 C124.40059661865234,4.644828304648399 125.1237564086914,3.712414965033531 123.88127899169922,3.487462028861046 C123.53517150878906,3.3097832053899765 123.18894958496094,2.9953975528478622 122.8432846069336,3.345616325736046 C122.07421112060547,3.649444565176964 121.40750122070312,4.074306473135948 122.2164306640625,4.869479164481163 C122.57514953613281,5.3830065578222275 122.90142822265625,6.503447040915489 123.3077621459961,6.626829609274864 C123.55027770996094,6.210384353995323 123.7774658203125,5.785196766257286 124.00534057617188,5.3606138080358505 zM122.30630493164062,7.336987480521202 C121.60028076171875,6.076864704489708 121.03211975097656,4.72498320043087 120.16796875,3.562500938773155 C119.11695098876953,2.44033907353878 117.04605865478516,2.940566048026085 116.57544708251953,4.387995228171349 C115.95028686523438,5.819030746817589 117.2991714477539,7.527640804648399 118.826171875,7.348545059561729 C119.98493194580078,7.367936596274376 121.15027618408203,7.420116886496544 122.30630493164062,7.336987480521202 zM128.1732177734375,7.379541382193565 C129.67486572265625,7.17823551595211 130.53842163085938,5.287807449698448 129.68344116210938,4.032590612769127 C128.92578125,2.693056806921959 126.74605560302734,2.6463639587163925 125.98509216308594,4.007616028189659 C125.32617950439453,5.108129009604454 124.75428009033203,6.258124336600304 124.14962768554688,7.388818249106407 C125.48638916015625,7.465229496359825 126.8357162475586,7.447416767477989 128.1732177734375,7.379541382193565 zM130.6601104736328,8.991325363516808 C131.17202758789062,8.540884003043175 133.1543731689453,8.009847149252892 131.65304565429688,7.582054600119591 C131.2811279296875,7.476506695151329 130.84751892089844,6.99234913289547 130.5132598876953,7.124847874045372 C129.78744506835938,8.02728746831417 128.67140197753906,8.55669592320919 127.50616455078125,8.501235947012901 C127.27806091308594,8.576229080557823 126.11459350585938,8.38720129430294 126.428955078125,8.601900085806847 C127.25099182128906,9.070617660880089 128.0523223876953,9.579657539725304 128.902587890625,9.995706543326378 C129.49813842773438,9.678531631827354 130.0761260986328,9.329126343131065 130.6601104736328,8.991325363516808 zM118.96446990966797,9.246344551444054 C119.4022445678711,8.991325363516808 119.84001922607422,8.736305221915245 120.27779388427734,8.481284126639366 C118.93965911865234,8.414779648184776 117.40827941894531,8.607666000723839 116.39698791503906,7.531384453177452 C116.11186981201172,7.212117180228233 115.83845520019531,6.846597656607628 115.44329071044922,7.248530372977257 C114.96995544433594,7.574637398123741 113.5140609741211,7.908811077475548 114.63501739501953,8.306883797049522 C115.61112976074219,8.883499130606651 116.58037567138672,9.474181160330772 117.58061218261719,10.008124336600304 C118.05723571777344,9.784612640738487 118.50651550292969,9.5052699893713 118.96446990966797,9.246344551444054 zM125.38018035888672,12.091858848929405 C125.9474868774414,11.636047348380089 127.32159423828125,11.201767906546593 127.36749267578125,10.712632164359093 C126.08487701416016,9.974547371268272 124.83960723876953,9.152772888541222 123.49772644042969,8.528907760977745 C123.03594207763672,8.353693947196007 122.66152954101562,8.623294815421104 122.28982543945312,8.857431396842003 C121.19065856933594,9.51122473180294 120.06505584716797,10.12446115911007 119.00167083740234,10.835315689444542 C120.39238739013672,11.69529627263546 121.79983520507812,12.529837593436241 123.22095489501953,13.338589653372765 C123.94580841064453,12.932025894522667 124.66128540039062,12.508862480521202 125.38018035888672,12.091858848929405 zM131.07164001464844,13.514615997672081 C131.66018676757812,13.143282875418663 132.2487335205078,12.771927818655968 132.8372802734375,12.400571808218956 C132.8324737548828,11.156818374991417 132.8523406982422,9.912529930472374 132.81829833984375,8.669195160269737 C131.63046264648438,9.332009300589561 130.45948791503906,10.027913078665733 129.30828857421875,10.752535805106163 C129.182373046875,12.035354599356651 129.24623107910156,13.33940313756466 129.27359008789062,14.628684982657433 C129.88104248046875,14.27079389989376 130.4737548828125,13.888019546866417 131.07164001464844,13.514640793204308 zM117.26847839355469,12.731024727225304 C117.32825469970703,11.67083452641964 117.45709991455078,10.46224020421505 116.17853546142578,10.148179039359093 C115.37110900878906,9.77159021794796 114.25194549560547,8.806716904044151 113.62991333007812,8.81639002263546 C113.61052703857422,10.0110072940588 113.62078857421875,11.20585821568966 113.61869049072266,12.400571808218956 C114.81139373779297,13.144886955618858 115.98292541503906,13.925040230154991 117.20137023925781,14.626662239432335 C117.31951141357422,14.010867103934288 117.24227905273438,13.35805033147335 117.26847839355469,12.731024727225304 zM125.80937957763672,16.836034759879112 C126.51483917236328,16.390663132071495 127.22030639648438,15.945291504263878 127.92576599121094,15.49991987645626 C127.92250061035156,14.215868934988976 127.97560119628906,12.929980263113976 127.91757202148438,11.647302612662315 C127.14225769042969,11.869626984000206 126.25550079345703,12.556857094168663 125.43866729736328,12.983742699027061 C124.82704162597656,13.342005714774132 124.21542358398438,13.700271591544151 123.60379028320312,14.05853746831417 C123.61585235595703,15.429577812552452 123.57081604003906,16.803131088614464 123.64839172363281,18.172149643301964 C124.37957000732422,17.744937881827354 125.09130859375,17.284801468253136 125.80937957763672,16.836034759879112 zM122.8521499633789,16.115344032645226 C122.8521499633789,15.429741844534874 122.8521499633789,14.744139656424522 122.8521499633789,14.05853746831417 C121.43595123291016,13.230924591422081 120.02428436279297,12.395455345511436 118.60256958007812,11.577354416251183 C118.52394104003906,12.888403877615929 118.56887817382812,14.204405769705772 118.55702209472656,15.517732605338097 C119.97289276123047,16.4041957706213 121.37410736083984,17.314891800284386 122.80789947509766,18.172149643301964 C122.86368560791016,17.488990768790245 122.84332275390625,16.800363525748253 122.8521499633789,16.115344032645226 zM131.10684204101562,18.871450409293175 C131.68399047851562,18.48711584508419 132.2611541748047,18.10278509557247 132.8383026123047,17.718475326895714 C132.81423950195312,16.499977096915245 132.89776611328125,15.264989838004112 132.77627563476562,14.05993078649044 C131.5760040283203,14.744719490408897 130.41763305664062,15.524359688162804 129.23875427246094,16.255397781729698 C129.26707458496094,17.516149505972862 129.18060302734375,18.791316971182823 129.3108367919922,20.041303619742393 C129.91973876953125,19.667551025748253 130.51010131835938,19.264152511954308 131.10684204101562,18.871450409293175 zM117.2557373046875,18.188333496451378 C117.25104522705078,17.549470886588097 117.24633026123047,16.91058538854122 117.24163055419922,16.271720871329308 C116.04924774169922,15.525708183646202 114.87187957763672,14.75476549565792 113.66158294677734,14.038097366690636 C113.5858383178711,15.262084946036339 113.62901306152344,16.49083898961544 113.61761474609375,17.717010483145714 C114.82051086425781,18.513254150748253 116.00987243652344,19.330610260367393 117.22888946533203,20.101993545889854 C117.27559661865234,19.466014847159386 117.25241088867188,18.825733169913292 117.2557373046875,18.188333496451378 zM125.8398666381836,22.38675306737423 C126.54049682617188,21.921453461050987 127.24110412597656,21.456151947379112 127.94172668457031,20.99083136022091 C127.94009399414062,19.693386062979698 127.96646118164062,18.395381912589073 127.93160247802734,17.098379120230675 C126.50540924072266,17.97775076329708 125.08877563476562,18.873308166861534 123.68258666992188,19.78428266942501 C123.52366638183594,21.03710363805294 123.626708984375,22.32878302037716 123.62647247314453,23.595300659537315 C124.06291198730469,23.86113165318966 125.1788101196289,22.68297766149044 125.8398666381836,22.38675306737423 zM122.8521499633789,21.83134649693966 C122.76741790771484,20.936696991324425 123.21651458740234,19.67745779454708 122.0794677734375,19.330633148550987 C120.93280029296875,18.604360565543175 119.7907485961914,17.870157226920128 118.62899780273438,17.16818617284298 C118.45966339111328,18.396427139639854 118.63676452636719,19.675991043448448 118.50668334960938,20.919256195425987 C119.89984130859375,21.92635916173458 121.32942199707031,22.88914106786251 122.78502655029297,23.803510650992393 C122.90177917480469,23.1627406924963 122.82917022705078,22.48402212560177 122.8521499633789,21.83134649693966 zM117.9798355102539,21.59483526647091 C116.28416442871094,20.46288488805294 114.58848571777344,19.330957397818565 112.892822265625,18.199007019400597 C112.89473724365234,14.705654129385948 112.84647369384766,11.211485847830772 112.90847778320312,7.718807205557823 C113.7575912475586,7.194885239005089 114.66117858886719,6.765397056937218 115.5350341796875,6.284702762961388 C114.97061157226562,4.668964847922325 115.78496551513672,2.7054970115423203 117.42159271240234,2.1007001250982285 C118.79354095458984,1.537783369421959 120.44731903076172,2.0457767099142075 121.32200622558594,3.23083733022213 C121.95732116699219,2.9050118774175644 122.59264373779297,2.5791852325201035 123.22796630859375,2.253336176276207 C123.86669921875,2.5821153968572617 124.50543975830078,2.9108948558568954 125.1441650390625,3.23967407643795 C126.05941009521484,2.154020771384239 127.62747192382812,1.5344576686620712 128.986328125,2.1429056972265244 C130.61741638183594,2.716217741370201 131.50650024414062,4.675290569663048 130.9215545654297,6.2884936183691025 C131.8018341064453,6.78548763692379 132.7589111328125,7.1738648265600204 133.5660400390625,7.780336365103722 C133.60182189941406,11.252970680594444 133.56637573242188,14.726140961050987 133.5631103515625,18.199007019400597 C130.18914794921875,20.431867584586143 126.86984252929688,22.74994657933712 123.44108581542969,24.897907242178917 C122.44406127929688,24.897628769278526 121.5834732055664,23.815067276358604 120.65831756591797,23.37616156041622 C119.76387023925781,22.784828171133995 118.87168884277344,22.19007681310177 117.9798355102539,21.59483526647091 z'; - private const GHOST_HEART = 'M125.91386369681868,8.305165958366445 C128.95033202169043,-0.40540639102854037 140.8469835342744,8.305165958366445 125.91386369681868,19.504526138305664 C110.98208663272044,8.305165958366445 122.87795231771452,-0.40540639102854037 125.91386369681868,8.305165958366445 z'; - private const GHOST_PLUS = 'M111.36824226379395,8.969108581542969 L118.69175148010254,8.969108581542969 L118.69175148010254,1.6455793380737305 L126.20429420471191,1.6455793380737305 L126.20429420471191,8.969108581542969 L133.52781105041504,8.969108581542969 L133.52781105041504,16.481630325317383 L126.20429420471191,16.481630325317383 L126.20429420471191,23.805158615112305 L118.69175148010254,23.805158615112305 L118.69175148010254,16.481630325317383 L111.36824226379395,16.481630325317383 z'; - - private bool|\Closure $debug; - private string $charset; - private FileLinkFormatter $fileLinkFormat; - private string|\Closure $outputBuffer; - - private static string $template = 'views/error.html.php'; - - /** - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - * @param string|callable $outputBuffer The output buffer as a string or a callable that should return it - */ - public function __construct( - bool|callable $debug = false, - ?string $charset = null, - string|FileLinkFormatter|null $fileLinkFormat = null, - private ?string $projectDir = null, - string|callable $outputBuffer = '', - private ?LoggerInterface $logger = null, - ) { - $this->debug = \is_bool($debug) ? $debug : $debug(...); - $this->charset = $charset ?: (\ini_get('default_charset') ?: 'UTF-8'); - $this->fileLinkFormat = $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : new FileLinkFormatter($fileLinkFormat); - $this->outputBuffer = \is_string($outputBuffer) ? $outputBuffer : $outputBuffer(...); - } - - public function render(\Throwable $exception): FlattenException - { - $headers = ['Content-Type' => 'text/html; charset='.$this->charset]; - if (\is_bool($this->debug) ? $this->debug : ($this->debug)($exception)) { - $headers['X-Debug-Exception'] = rawurlencode(substr($exception->getMessage(), 0, 2000)); - $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); - } - - $exception = FlattenException::createWithDataRepresentation($exception, null, $headers); - - return $exception->setAsString($this->renderException($exception)); - } - - /** - * Gets the HTML content associated with the given exception. - */ - public function getBody(FlattenException $exception): string - { - return $this->renderException($exception, 'views/exception.html.php'); - } - - /** - * Gets the stylesheet associated with the given exception. - */ - public function getStylesheet(): string - { - if (!$this->debug) { - return $this->include('assets/css/error.css'); - } - - return $this->include('assets/css/exception.css'); - } - - public static function isDebug(RequestStack $requestStack, bool $debug): \Closure - { - return static function () use ($requestStack, $debug): bool { - if (!$request = $requestStack->getCurrentRequest()) { - return $debug; - } - - return $debug && $request->attributes->getBoolean('showException', true); - }; - } - - public static function getAndCleanOutputBuffer(RequestStack $requestStack): \Closure - { - return static function () use ($requestStack): string { - if (!$request = $requestStack->getCurrentRequest()) { - return ''; - } - - $startObLevel = $request->headers->get('X-Php-Ob-Level', -1); - - if (ob_get_level() <= $startObLevel) { - return ''; - } - - Response::closeOutputBuffers($startObLevel + 1, true); - - return ob_get_clean(); - }; - } - - private function renderException(FlattenException $exception, string $debugTemplate = 'views/exception_full.html.php'): string - { - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - $statusText = $this->escape($exception->getStatusText()); - $statusCode = $this->escape($exception->getStatusCode()); - - if (!$debug) { - return $this->include(self::$template, [ - 'statusText' => $statusText, - 'statusCode' => $statusCode, - ]); - } - - $exceptionMessage = $this->escape($exception->getMessage()); - - return $this->include($debugTemplate, [ - 'exception' => $exception, - 'exceptionMessage' => $exceptionMessage, - 'statusText' => $statusText, - 'statusCode' => $statusCode, - 'logger' => null !== $this->logger && class_exists(DebugLoggerConfigurator::class) ? DebugLoggerConfigurator::getDebugLogger($this->logger) : null, - 'currentContent' => \is_string($this->outputBuffer) ? $this->outputBuffer : ($this->outputBuffer)(), - ]); - } - - private function dumpValue(Data $value): string - { - $dumper = new HtmlDumper(); - $dumper->setTheme('light'); - - return $dumper->dump($value, true); - } - - private function formatArgs(array $args): string - { - $result = []; - foreach ($args as $key => $item) { - if ('object' === $item[0]) { - $formattedValue = \sprintf('object(%s)', $this->abbrClass($item[1])); - } elseif ('array' === $item[0]) { - $formattedValue = \sprintf('array(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); - } elseif ('null' === $item[0]) { - $formattedValue = 'null'; - } elseif ('boolean' === $item[0]) { - $formattedValue = ''.strtolower(var_export($item[1], true)).''; - } elseif ('resource' === $item[0]) { - $formattedValue = 'resource'; - } elseif (preg_match('/[^\x07-\x0D\x1B\x20-\xFF]/', $item[1])) { - $formattedValue = 'binary string'; - } else { - $formattedValue = str_replace("\n", '', $this->escape(var_export($item[1], true))); - } - - $result[] = \is_int($key) ? $formattedValue : \sprintf("'%s' => %s", $this->escape($key), $formattedValue); - } - - return implode(', ', $result); - } - - private function formatArgsAsText(array $args): string - { - return strip_tags($this->formatArgs($args)); - } - - private function escape(string $string): string - { - return htmlspecialchars($string, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset); - } - - private function abbrClass(string $class): string - { - $parts = explode('\\', $class); - $short = array_pop($parts); - - return \sprintf('%s', $class, $short); - } - - private function getFileRelative(string $file): ?string - { - $file = str_replace('\\', '/', $file); - - if (null !== $this->projectDir && str_starts_with($file, $this->projectDir)) { - return ltrim(substr($file, \strlen($this->projectDir)), '/'); - } - - return null; - } - - /** - * Formats a file path. - * - * @param string $file An absolute file path - * @param int $line The line number - * @param string $text Use this text for the link rather than the file path - */ - private function formatFile(string $file, int $line, ?string $text = null): string - { - $file = trim($file); - - if (null === $text) { - $text = $file; - if (null !== $rel = $this->getFileRelative($text)) { - $rel = explode('/', $rel, 2); - $text = \sprintf('%s%s', $this->projectDir, $rel[0], '/'.($rel[1] ?? '')); - } - } - - if (0 < $line) { - $text .= ' at line '.$line; - } - - if (!file_exists($file)) { - return $text; - } - - $link = $this->fileLinkFormat->format($file, $line); - - return \sprintf('%s', $this->escape($link), $text); - } - - /** - * Returns an excerpt of a code file around the given line number. - * - * @param string $file A file path - * @param int $line The selected line number - * @param int $srcContext The number of displayed lines around or -1 for the whole file - */ - private function fileExcerpt(string $file, int $line, int $srcContext = 3): string - { - if (is_file($file) && is_readable($file)) { - // highlight_file could throw warnings - // see https://bugs.php.net/25725 - $code = @highlight_file($file, true); - if (\PHP_VERSION_ID >= 80300) { - // remove main pre/code tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline span tags - $code = preg_replace_callback('#]++)>((?:[^<\\n]*+\\n)++[^<]*+)#', function ($m) { - return "".str_replace("\n", "\n", $m[2]).''; - }, $code); - $content = explode("\n", $code); - } else { - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
          )++[^<]*+)
          #', fn ($m) => "".str_replace('
          ', "

          ", $m[2]).'', $code); - $content = explode('
          ', $code); - } - - $lines = []; - if (0 > $srcContext) { - $srcContext = \count($content); - } - - for ($i = max($line - $srcContext, 1), $max = min($line + $srcContext, \count($content)); $i <= $max; ++$i) { - $lines[] = ''.$this->fixCodeMarkup($content[$i - 1]).''; - } - - return '
            '.implode("\n", $lines).'
          '; - } - - return ''; - } - - private function fixCodeMarkup(string $line): string - { - // ending tag from previous line - $opening = strpos($line, ''); - if (false !== $closing && (false === $opening || $closing < $opening)) { - $line = substr_replace($line, '', $closing, 7); - } - - // missing tag at the end of line - $opening = strrpos($line, ''); - if (false !== $opening && (false === $closing || $closing < $opening)) { - $line .= ''; - } - - return trim($line); - } - - private function formatFileFromText(string $text): string - { - return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', fn ($match) => 'in '.$this->formatFile($match[2], $match[3]), $text) ?? $text; - } - - private function formatLogMessage(string $message, array $context): string - { - if ($context && str_contains($message, '{')) { - $replacements = []; - foreach ($context as $key => $val) { - if (\is_scalar($val)) { - $replacements['{'.$key.'}'] = $val; - } - } - - if ($replacements) { - $message = strtr($message, $replacements); - } - } - - return $this->escape($message); - } - - private function addElementToGhost(): string - { - if (!isset(self::GHOST_ADDONS[date('m-d')])) { - return ''; - } - - return ''; - } - - private function include(string $name, array $context = []): string - { - extract($context, \EXTR_SKIP); - ob_start(); - - include is_file(\dirname(__DIR__).'/Resources/'.$name) ? \dirname(__DIR__).'/Resources/'.$name : $name; - - return trim(ob_get_clean()); - } - - /** - * Allows overriding the default non-debug template. - * - * @param string $template path to the custom template file to render - */ - public static function setTemplate(string $template): void - { - self::$template = $template; - } -} diff --git a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php deleted file mode 100644 index 3cc6b8e2..00000000 --- a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\ErrorRenderer; - -use Symfony\Component\ErrorHandler\Exception\FlattenException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Serializer\Exception\NotEncodableValueException; -use Symfony\Component\Serializer\SerializerInterface; - -/** - * Formats an exception using Serializer for rendering. - * - * @author Nicolas Grekas - */ -class SerializerErrorRenderer implements ErrorRendererInterface -{ - private string|\Closure $format; - private ErrorRendererInterface $fallbackErrorRenderer; - private bool|\Closure $debug; - - /** - * @param string|callable(FlattenException) $format The format as a string or a callable that should return it - * formats not supported by Request::getMimeTypes() should be given as mime types - * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it - */ - public function __construct( - private SerializerInterface $serializer, - string|callable $format, - ?ErrorRendererInterface $fallbackErrorRenderer = null, - bool|callable $debug = false, - ) { - $this->format = \is_string($format) ? $format : $format(...); - $this->fallbackErrorRenderer = $fallbackErrorRenderer ?? new HtmlErrorRenderer(); - $this->debug = \is_bool($debug) ? $debug : $debug(...); - } - - public function render(\Throwable $exception): FlattenException - { - $headers = ['Vary' => 'Accept']; - $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); - if ($debug) { - $headers['X-Debug-Exception'] = rawurlencode(substr($exception->getMessage(), 0, 2000)); - $headers['X-Debug-Exception-File'] = rawurlencode($exception->getFile()).':'.$exception->getLine(); - } - - $flattenException = FlattenException::createFromThrowable($exception, null, $headers); - - try { - $format = \is_string($this->format) ? $this->format : ($this->format)($flattenException); - $headers['Content-Type'] = Request::getMimeTypes($format)[0] ?? $format; - - $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ - 'exception' => $exception, - 'debug' => $debug, - ])); - } catch (NotEncodableValueException) { - $flattenException = $this->fallbackErrorRenderer->render($exception); - } - - return $flattenException->setHeaders($flattenException->getHeaders() + $headers); - } - - public static function getPreferredFormat(RequestStack $requestStack): \Closure - { - return static function () use ($requestStack) { - if (!$request = $requestStack->getCurrentRequest()) { - throw new NotEncodableValueException(); - } - - return $request->getPreferredFormat(); - }; - } -} diff --git a/vendor/symfony/error-handler/Exception/FlattenException.php b/vendor/symfony/error-handler/Exception/FlattenException.php deleted file mode 100644 index f8ec1faf..00000000 --- a/vendor/symfony/error-handler/Exception/FlattenException.php +++ /dev/null @@ -1,440 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * FlattenException wraps a PHP Error or Exception to be able to serialize it. - * - * Basically, this class removes all objects from the trace. - * - * @author Fabien Potencier - */ -class FlattenException -{ - private string $message; - private string|int $code; - private ?self $previous = null; - private array $trace; - private string $traceAsString; - private string $class; - private int $statusCode; - private string $statusText; - private array $headers; - private string $file; - private int $line; - private ?string $asString = null; - private Data $dataRepresentation; - - public static function create(\Exception $exception, ?int $statusCode = null, array $headers = []): static - { - return static::createFromThrowable($exception, $statusCode, $headers); - } - - public static function createFromThrowable(\Throwable $exception, ?int $statusCode = null, array $headers = []): static - { - $e = new static(); - $e->setMessage($exception->getMessage()); - $e->setCode($exception->getCode()); - - if ($exception instanceof HttpExceptionInterface) { - $statusCode = $exception->getStatusCode(); - $headers = array_merge($headers, $exception->getHeaders()); - } elseif ($exception instanceof RequestExceptionInterface) { - $statusCode = 400; - } - - $statusCode ??= 500; - - if (class_exists(Response::class) && isset(Response::$statusTexts[$statusCode])) { - $statusText = Response::$statusTexts[$statusCode]; - } else { - $statusText = 'Whoops, looks like something went wrong.'; - } - - $e->setStatusText($statusText); - $e->setStatusCode($statusCode); - $e->setHeaders($headers); - $e->setTraceFromThrowable($exception); - $e->setClass(get_debug_type($exception)); - $e->setFile($exception->getFile()); - $e->setLine($exception->getLine()); - - $previous = $exception->getPrevious(); - - if ($previous instanceof \Throwable) { - $e->setPrevious(static::createFromThrowable($previous)); - } - - return $e; - } - - public static function createWithDataRepresentation(\Throwable $throwable, ?int $statusCode = null, array $headers = [], ?VarCloner $cloner = null): static - { - $e = static::createFromThrowable($throwable, $statusCode, $headers); - - static $defaultCloner; - - if (!$cloner ??= $defaultCloner) { - $cloner = $defaultCloner = new VarCloner(); - $cloner->addCasters([ - \Throwable::class => function (\Throwable $e, array $a, Stub $s, bool $isNested): array { - if (!$isNested) { - unset($a[Caster::PREFIX_PROTECTED.'message']); - unset($a[Caster::PREFIX_PROTECTED.'code']); - unset($a[Caster::PREFIX_PROTECTED.'file']); - unset($a[Caster::PREFIX_PROTECTED.'line']); - unset($a["\0Error\0trace"], $a["\0Exception\0trace"]); - unset($a["\0Error\0previous"], $a["\0Exception\0previous"]); - } - - return $a; - }, - ]); - } - - return $e->setDataRepresentation($cloner->cloneVar($throwable)); - } - - public function toArray(): array - { - $exceptions = []; - foreach (array_merge([$this], $this->getAllPrevious()) as $exception) { - $exceptions[] = [ - 'message' => $exception->getMessage(), - 'class' => $exception->getClass(), - 'trace' => $exception->getTrace(), - 'data' => $exception->getDataRepresentation(), - ]; - } - - return $exceptions; - } - - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * @return $this - */ - public function setStatusCode(int $code): static - { - $this->statusCode = $code; - - return $this; - } - - public function getHeaders(): array - { - return $this->headers; - } - - /** - * @return $this - */ - public function setHeaders(array $headers): static - { - $this->headers = $headers; - - return $this; - } - - public function getClass(): string - { - return $this->class; - } - - /** - * @return $this - */ - public function setClass(string $class): static - { - $this->class = str_contains($class, "@anonymous\0") ? (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous' : $class; - - return $this; - } - - public function getFile(): string - { - return $this->file; - } - - /** - * @return $this - */ - public function setFile(string $file): static - { - $this->file = $file; - - return $this; - } - - public function getLine(): int - { - return $this->line; - } - - /** - * @return $this - */ - public function setLine(int $line): static - { - $this->line = $line; - - return $this; - } - - public function getStatusText(): string - { - return $this->statusText; - } - - /** - * @return $this - */ - public function setStatusText(string $statusText): static - { - $this->statusText = $statusText; - - return $this; - } - - public function getMessage(): string - { - return $this->message; - } - - /** - * @return $this - */ - public function setMessage(string $message): static - { - if (str_contains($message, "@anonymous\0")) { - $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message); - } - - $this->message = $message; - - return $this; - } - - /** - * @return int|string int most of the time (might be a string with PDOException) - */ - public function getCode(): int|string - { - return $this->code; - } - - /** - * @return $this - */ - public function setCode(int|string $code): static - { - $this->code = $code; - - return $this; - } - - public function getPrevious(): ?self - { - return $this->previous; - } - - /** - * @return $this - */ - public function setPrevious(?self $previous): static - { - $this->previous = $previous; - - return $this; - } - - /** - * @return self[] - */ - public function getAllPrevious(): array - { - $exceptions = []; - $e = $this; - while ($e = $e->getPrevious()) { - $exceptions[] = $e; - } - - return $exceptions; - } - - public function getTrace(): array - { - return $this->trace; - } - - /** - * @return $this - */ - public function setTraceFromThrowable(\Throwable $throwable): static - { - $this->traceAsString = $throwable->getTraceAsString(); - - return $this->setTrace($throwable->getTrace(), $throwable->getFile(), $throwable->getLine()); - } - - /** - * @return $this - */ - public function setTrace(array $trace, ?string $file, ?int $line): static - { - $this->trace = []; - $this->trace[] = [ - 'namespace' => '', - 'short_class' => '', - 'class' => '', - 'type' => '', - 'function' => '', - 'file' => $file, - 'line' => $line, - 'args' => [], - ]; - foreach ($trace as $entry) { - $class = ''; - $namespace = ''; - if (isset($entry['class'])) { - $parts = explode('\\', $entry['class']); - $class = array_pop($parts); - $namespace = implode('\\', $parts); - } - - $this->trace[] = [ - 'namespace' => $namespace, - 'short_class' => $class, - 'class' => $entry['class'] ?? '', - 'type' => $entry['type'] ?? '', - 'function' => $entry['function'] ?? null, - 'file' => $entry['file'] ?? null, - 'line' => $entry['line'] ?? null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [], - ]; - } - - return $this; - } - - public function getDataRepresentation(): ?Data - { - return $this->dataRepresentation ?? null; - } - - /** - * @return $this - */ - public function setDataRepresentation(Data $data): static - { - $this->dataRepresentation = $data; - - return $this; - } - - private function flattenArgs(array $args, int $level = 0, int &$count = 0): array - { - $result = []; - foreach ($args as $key => $value) { - if (++$count > 1e4) { - return ['array', '*SKIPPED over 10000 entries*']; - } - if ($value instanceof \__PHP_Incomplete_Class) { - $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)]; - } elseif (\is_object($value)) { - $result[$key] = ['object', get_debug_type($value)]; - } elseif (\is_array($value)) { - if ($level > 10) { - $result[$key] = ['array', '*DEEP NESTED ARRAY*']; - } else { - $result[$key] = ['array', $this->flattenArgs($value, $level + 1, $count)]; - } - } elseif (null === $value) { - $result[$key] = ['null', null]; - } elseif (\is_bool($value)) { - $result[$key] = ['boolean', $value]; - } elseif (\is_int($value)) { - $result[$key] = ['integer', $value]; - } elseif (\is_float($value)) { - $result[$key] = ['float', $value]; - } elseif (\is_resource($value)) { - $result[$key] = ['resource', get_resource_type($value)]; - } else { - $result[$key] = ['string', (string) $value]; - } - } - - return $result; - } - - private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value): string - { - $array = new \ArrayObject($value); - - return $array['__PHP_Incomplete_Class_Name']; - } - - public function getTraceAsString(): string - { - return $this->traceAsString; - } - - /** - * @return $this - */ - public function setAsString(?string $asString): static - { - $this->asString = $asString; - - return $this; - } - - public function getAsString(): string - { - if (null !== $this->asString) { - return $this->asString; - } - - $message = ''; - $next = false; - - foreach (array_reverse(array_merge([$this], $this->getAllPrevious())) as $exception) { - if ($next) { - $message .= 'Next '; - } else { - $next = true; - } - $message .= $exception->getClass(); - - if ('' != $exception->getMessage()) { - $message .= ': '.$exception->getMessage(); - } - - $message .= ' in '.$exception->getFile().':'.$exception->getLine(). - "\nStack trace:\n".$exception->getTraceAsString()."\n\n"; - } - - return rtrim($message); - } -} diff --git a/vendor/symfony/error-handler/Exception/SilencedErrorContext.php b/vendor/symfony/error-handler/Exception/SilencedErrorContext.php deleted file mode 100644 index b67a2bc2..00000000 --- a/vendor/symfony/error-handler/Exception/SilencedErrorContext.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Exception; - -/** - * Data Object that represents a Silenced Error. - * - * @author Grégoire Pineau - */ -class SilencedErrorContext implements \JsonSerializable -{ - public int $count = 1; - - public function __construct( - private int $severity, - private string $file, - private int $line, - private array $trace = [], - int $count = 1, - ) { - $this->count = $count; - } - - public function getSeverity(): int - { - return $this->severity; - } - - public function getFile(): string - { - return $this->file; - } - - public function getLine(): int - { - return $this->line; - } - - public function getTrace(): array - { - return $this->trace; - } - - public function jsonSerialize(): array - { - return [ - 'severity' => $this->severity, - 'file' => $this->file, - 'line' => $this->line, - 'trace' => $this->trace, - 'count' => $this->count, - ]; - } -} diff --git a/vendor/symfony/error-handler/Internal/TentativeTypes.php b/vendor/symfony/error-handler/Internal/TentativeTypes.php deleted file mode 100644 index 1e8afe39..00000000 --- a/vendor/symfony/error-handler/Internal/TentativeTypes.php +++ /dev/null @@ -1,1643 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ErrorHandler\Internal; - -/** - * This class has been generated by extract-tentative-return-types.php. - * - * @internal - */ -class TentativeTypes -{ - public const RETURN_TYPES = [ - 'CURLFile' => [ - 'getFilename' => 'string', - 'getMimeType' => 'string', - 'getPostFilename' => 'string', - 'setMimeType' => 'void', - 'setPostFilename' => 'void', - ], - 'DateTimeInterface' => [ - 'format' => 'string', - 'getTimezone' => 'DateTimeZone|false', - 'getOffset' => 'int', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - '__wakeup' => 'void', - ], - 'DateTime' => [ - '__wakeup' => 'void', - '__set_state' => 'DateTime', - 'createFromImmutable' => 'static', - 'createFromFormat' => 'DateTime|false', - 'getLastErrors' => 'array|false', - 'format' => 'string', - 'modify' => 'DateTime|false', - 'add' => 'DateTime', - 'sub' => 'DateTime', - 'getTimezone' => 'DateTimeZone|false', - 'setTimezone' => 'DateTime', - 'getOffset' => 'int', - 'setTime' => 'DateTime', - 'setDate' => 'DateTime', - 'setISODate' => 'DateTime', - 'setTimestamp' => 'DateTime', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - ], - 'DateTimeImmutable' => [ - '__wakeup' => 'void', - '__set_state' => 'DateTimeImmutable', - 'createFromFormat' => 'DateTimeImmutable|false', - 'getLastErrors' => 'array|false', - 'format' => 'string', - 'getTimezone' => 'DateTimeZone|false', - 'getOffset' => 'int', - 'getTimestamp' => 'int', - 'diff' => 'DateInterval', - 'modify' => 'DateTimeImmutable|false', - 'add' => 'DateTimeImmutable', - 'sub' => 'DateTimeImmutable', - 'setTimezone' => 'DateTimeImmutable', - 'setTime' => 'DateTimeImmutable', - 'setDate' => 'DateTimeImmutable', - 'setISODate' => 'DateTimeImmutable', - 'setTimestamp' => 'DateTimeImmutable', - 'createFromMutable' => 'static', - ], - 'DateTimeZone' => [ - 'getName' => 'string', - 'getOffset' => 'int', - 'getTransitions' => 'array|false', - 'getLocation' => 'array|false', - 'listAbbreviations' => 'array', - 'listIdentifiers' => 'array', - '__wakeup' => 'void', - '__set_state' => 'DateTimeZone', - ], - 'DateInterval' => [ - 'createFromDateString' => 'DateInterval|false', - 'format' => 'string', - '__wakeup' => 'void', - '__set_state' => 'DateInterval', - ], - 'DatePeriod' => [ - 'getStartDate' => 'DateTimeInterface', - 'getEndDate' => '?DateTimeInterface', - 'getDateInterval' => 'DateInterval', - 'getRecurrences' => '?int', - '__wakeup' => 'void', - '__set_state' => 'DatePeriod', - ], - 'DOMNode' => [ - 'C14N' => 'string|false', - 'C14NFile' => 'int|false', - 'getLineNo' => 'int', - 'getNodePath' => '?string', - 'hasAttributes' => 'bool', - 'hasChildNodes' => 'bool', - 'isDefaultNamespace' => 'bool', - 'isSameNode' => 'bool', - 'isSupported' => 'bool', - 'lookupNamespaceURI' => '?string', - 'lookupPrefix' => '?string', - 'normalize' => 'void', - ], - 'DOMImplementation' => [ - 'getFeature' => 'never', - 'hasFeature' => 'bool', - ], - 'DOMDocumentFragment' => [ - 'appendXML' => 'bool', - ], - 'DOMNodeList' => [ - 'count' => 'int', - ], - 'DOMCharacterData' => [ - 'appendData' => 'bool', - 'insertData' => 'bool', - 'deleteData' => 'bool', - 'replaceData' => 'bool', - ], - 'DOMAttr' => [ - 'isId' => 'bool', - ], - 'DOMElement' => [ - 'getAttribute' => 'string', - 'getAttributeNS' => 'string', - 'getElementsByTagName' => 'DOMNodeList', - 'getElementsByTagNameNS' => 'DOMNodeList', - 'hasAttribute' => 'bool', - 'hasAttributeNS' => 'bool', - 'removeAttribute' => 'bool', - 'removeAttributeNS' => 'void', - 'setAttributeNS' => 'void', - 'setIdAttribute' => 'void', - 'setIdAttributeNS' => 'void', - 'setIdAttributeNode' => 'void', - ], - 'DOMDocument' => [ - 'createComment' => 'DOMComment', - 'createDocumentFragment' => 'DOMDocumentFragment', - 'createTextNode' => 'DOMText', - 'getElementById' => '?DOMElement', - 'getElementsByTagName' => 'DOMNodeList', - 'getElementsByTagNameNS' => 'DOMNodeList', - 'normalizeDocument' => 'void', - 'registerNodeClass' => 'bool', - 'save' => 'int|false', - 'saveHTML' => 'string|false', - 'saveHTMLFile' => 'int|false', - 'saveXML' => 'string|false', - 'schemaValidate' => 'bool', - 'schemaValidateSource' => 'bool', - 'relaxNGValidate' => 'bool', - 'relaxNGValidateSource' => 'bool', - 'validate' => 'bool', - 'xinclude' => 'int|false', - ], - 'DOMText' => [ - 'isWhitespaceInElementContent' => 'bool', - 'isElementContentWhitespace' => 'bool', - ], - 'DOMNamedNodeMap' => [ - 'getNamedItem' => '?DOMNode', - 'getNamedItemNS' => '?DOMNode', - 'item' => '?DOMNode', - 'count' => 'int', - ], - 'DOMXPath' => [ - 'evaluate' => 'mixed', - 'query' => 'mixed', - 'registerNamespace' => 'bool', - 'registerPhpFunctions' => 'void', - ], - 'finfo' => [ - 'file' => 'string|false', - 'buffer' => 'string|false', - ], - 'IntlPartsIterator' => [ - 'getBreakIterator' => 'IntlBreakIterator', - 'getRuleStatus' => 'int', - ], - 'IntlBreakIterator' => [ - 'createCharacterInstance' => '?IntlBreakIterator', - 'createCodePointInstance' => 'IntlCodePointBreakIterator', - 'createLineInstance' => '?IntlBreakIterator', - 'createSentenceInstance' => '?IntlBreakIterator', - 'createTitleInstance' => '?IntlBreakIterator', - 'createWordInstance' => '?IntlBreakIterator', - 'current' => 'int', - 'first' => 'int', - 'following' => 'int', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - 'getLocale' => 'string|false', - 'getPartsIterator' => 'IntlPartsIterator', - 'getText' => '?string', - 'isBoundary' => 'bool', - 'last' => 'int', - 'next' => 'int', - 'preceding' => 'int', - 'previous' => 'int', - 'setText' => '?bool', - ], - 'IntlRuleBasedBreakIterator' => [ - 'getBinaryRules' => 'string|false', - 'getRules' => 'string|false', - 'getRuleStatus' => 'int', - 'getRuleStatusVec' => 'array|false', - ], - 'IntlCodePointBreakIterator' => [ - 'getLastCodePoint' => 'int', - ], - 'IntlCalendar' => [ - 'createInstance' => '?IntlCalendar', - 'equals' => 'bool', - 'fieldDifference' => 'int|false', - 'add' => 'bool', - 'after' => 'bool', - 'before' => 'bool', - 'fromDateTime' => '?IntlCalendar', - 'get' => 'int|false', - 'getActualMaximum' => 'int|false', - 'getActualMinimum' => 'int|false', - 'getAvailableLocales' => 'array', - 'getDayOfWeekType' => 'int|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getFirstDayOfWeek' => 'int|false', - 'getGreatestMinimum' => 'int|false', - 'getKeywordValuesForLocale' => 'IntlIterator|false', - 'getLeastMaximum' => 'int|false', - 'getLocale' => 'string|false', - 'getMaximum' => 'int|false', - 'getMinimalDaysInFirstWeek' => 'int|false', - 'getMinimum' => 'int|false', - 'getNow' => 'float', - 'getRepeatedWallTimeOption' => 'int', - 'getSkippedWallTimeOption' => 'int', - 'getTime' => 'float|false', - 'getTimeZone' => 'IntlTimeZone|false', - 'getType' => 'string', - 'getWeekendTransition' => 'int|false', - 'inDaylightTime' => 'bool', - 'isEquivalentTo' => 'bool', - 'isLenient' => 'bool', - 'isWeekend' => 'bool', - 'roll' => 'bool', - 'isSet' => 'bool', - 'setTime' => 'bool', - 'setTimeZone' => 'bool', - 'toDateTime' => 'DateTime|false', - ], - 'IntlGregorianCalendar' => [ - 'setGregorianChange' => 'bool', - 'getGregorianChange' => 'float', - 'isLeapYear' => 'bool', - ], - 'Collator' => [ - 'create' => '?Collator', - 'compare' => 'int|false', - 'sort' => 'bool', - 'sortWithSortKeys' => 'bool', - 'asort' => 'bool', - 'getAttribute' => 'int|false', - 'setAttribute' => 'bool', - 'getStrength' => 'int', - 'getLocale' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getSortKey' => 'string|false', - ], - 'IntlIterator' => [ - 'current' => 'mixed', - 'key' => 'mixed', - 'next' => 'void', - 'rewind' => 'void', - 'valid' => 'bool', - ], - 'UConverter' => [ - 'convert' => 'string|false', - 'fromUCallback' => 'string|int|array|null', - 'getAliases' => 'array|false|null', - 'getAvailable' => 'array', - 'getDestinationEncoding' => 'string|false|null', - 'getDestinationType' => 'int|false|null', - 'getErrorCode' => 'int', - 'getErrorMessage' => '?string', - 'getSourceEncoding' => 'string|false|null', - 'getSourceType' => 'int|false|null', - 'getStandards' => '?array', - 'getSubstChars' => 'string|false|null', - 'reasonText' => 'string', - 'setDestinationEncoding' => 'bool', - 'setSourceEncoding' => 'bool', - 'setSubstChars' => 'bool', - 'toUCallback' => 'string|int|array|null', - 'transcode' => 'string|false', - ], - 'IntlDateFormatter' => [ - 'create' => '?IntlDateFormatter', - 'getDateType' => 'int|false', - 'getTimeType' => 'int|false', - 'getCalendar' => 'int|false', - 'setCalendar' => 'bool', - 'getTimeZoneId' => 'string|false', - 'getCalendarObject' => 'IntlCalendar|false|null', - 'getTimeZone' => 'IntlTimeZone|false', - 'setTimeZone' => '?bool', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string|false', - 'setLenient' => 'void', - 'isLenient' => 'bool', - 'format' => 'string|false', - 'formatObject' => 'string|false', - 'parse' => 'int|float|false', - 'localtime' => 'array|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'NumberFormatter' => [ - 'create' => '?NumberFormatter', - 'format' => 'string|false', - 'parse' => 'int|float|false', - 'formatCurrency' => 'string|false', - 'parseCurrency' => 'float|false', - 'setAttribute' => 'bool', - 'getAttribute' => 'int|float|false', - 'setTextAttribute' => 'bool', - 'getTextAttribute' => 'string|false', - 'setSymbol' => 'bool', - 'getSymbol' => 'string|false', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Locale' => [ - 'getDefault' => 'string', - 'getPrimaryLanguage' => '?string', - 'getScript' => '?string', - 'getRegion' => '?string', - 'getKeywords' => 'array|false|null', - 'getDisplayScript' => 'string|false', - 'getDisplayRegion' => 'string|false', - 'getDisplayName' => 'string|false', - 'getDisplayLanguage' => 'string|false', - 'getDisplayVariant' => 'string|false', - 'composeLocale' => 'string|false', - 'parseLocale' => '?array', - 'getAllVariants' => '?array', - 'filterMatches' => '?bool', - 'lookup' => '?string', - 'canonicalize' => '?string', - 'acceptFromHttp' => 'string|false', - ], - 'MessageFormatter' => [ - 'create' => '?MessageFormatter', - 'format' => 'string|false', - 'formatMessage' => 'string|false', - 'parse' => 'array|false', - 'parseMessage' => 'array|false', - 'setPattern' => 'bool', - 'getPattern' => 'string|false', - 'getLocale' => 'string', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Normalizer' => [ - 'normalize' => 'string|false', - 'isNormalized' => 'bool', - 'getRawDecomposition' => '?string', - ], - 'ResourceBundle' => [ - 'create' => '?ResourceBundle', - 'get' => 'mixed', - 'count' => 'int', - 'getLocales' => 'array|false', - 'getErrorCode' => 'int', - 'getErrorMessage' => 'string', - ], - 'Spoofchecker' => [ - 'isSuspicious' => 'bool', - 'areConfusable' => 'bool', - 'setAllowedLocales' => 'void', - 'setChecks' => 'void', - 'setRestrictionLevel' => 'void', - ], - 'IntlTimeZone' => [ - 'countEquivalentIDs' => 'int|false', - 'createDefault' => 'IntlTimeZone', - 'createEnumeration' => 'IntlIterator|false', - 'createTimeZone' => '?IntlTimeZone', - 'createTimeZoneIDEnumeration' => 'IntlIterator|false', - 'fromDateTimeZone' => '?IntlTimeZone', - 'getCanonicalID' => 'string|false', - 'getDisplayName' => 'string|false', - 'getDSTSavings' => 'int', - 'getEquivalentID' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - 'getGMT' => 'IntlTimeZone', - 'getID' => 'string|false', - 'getOffset' => 'bool', - 'getRawOffset' => 'int', - 'getRegion' => 'string|false', - 'getTZDataVersion' => 'string|false', - 'getUnknown' => 'IntlTimeZone', - 'getWindowsID' => 'string|false', - 'getIDForWindowsID' => 'string|false', - 'hasSameRules' => 'bool', - 'toDateTimeZone' => 'DateTimeZone|false', - 'useDaylightTime' => 'bool', - ], - 'Transliterator' => [ - 'create' => '?Transliterator', - 'createFromRules' => '?Transliterator', - 'createInverse' => '?Transliterator', - 'listIDs' => 'array|false', - 'transliterate' => 'string|false', - 'getErrorCode' => 'int|false', - 'getErrorMessage' => 'string|false', - ], - 'IntlChar' => [ - 'hasBinaryProperty' => '?bool', - 'charAge' => '?array', - 'charDigitValue' => '?int', - 'charDirection' => '?int', - 'charFromName' => '?int', - 'charMirror' => 'int|string|null', - 'charName' => '?string', - 'charType' => '?int', - 'chr' => '?string', - 'digit' => 'int|false|null', - 'enumCharNames' => '?bool', - 'enumCharTypes' => 'void', - 'foldCase' => 'int|string|null', - 'forDigit' => 'int', - 'getBidiPairedBracket' => 'int|string|null', - 'getBlockCode' => '?int', - 'getCombiningClass' => '?int', - 'getFC_NFKC_Closure' => 'string|false|null', - 'getIntPropertyMaxValue' => 'int', - 'getIntPropertyMinValue' => 'int', - 'getIntPropertyValue' => '?int', - 'getNumericValue' => '?float', - 'getPropertyEnum' => 'int', - 'getPropertyName' => 'string|false', - 'getPropertyValueEnum' => 'int', - 'getPropertyValueName' => 'string|false', - 'getUnicodeVersion' => 'array', - 'isalnum' => '?bool', - 'isalpha' => '?bool', - 'isbase' => '?bool', - 'isblank' => '?bool', - 'iscntrl' => '?bool', - 'isdefined' => '?bool', - 'isdigit' => '?bool', - 'isgraph' => '?bool', - 'isIDIgnorable' => '?bool', - 'isIDPart' => '?bool', - 'isIDStart' => '?bool', - 'isISOControl' => '?bool', - 'isJavaIDPart' => '?bool', - 'isJavaIDStart' => '?bool', - 'isJavaSpaceChar' => '?bool', - 'islower' => '?bool', - 'isMirrored' => '?bool', - 'isprint' => '?bool', - 'ispunct' => '?bool', - 'isspace' => '?bool', - 'istitle' => '?bool', - 'isUAlphabetic' => '?bool', - 'isULowercase' => '?bool', - 'isupper' => '?bool', - 'isUUppercase' => '?bool', - 'isUWhiteSpace' => '?bool', - 'isWhitespace' => '?bool', - 'isxdigit' => '?bool', - 'ord' => '?int', - 'tolower' => 'int|string|null', - 'totitle' => 'int|string|null', - 'toupper' => 'int|string|null', - ], - 'JsonSerializable' => [ - 'jsonSerialize' => 'mixed', - ], - 'mysqli' => [ - 'autocommit' => 'bool', - 'begin_transaction' => 'bool', - 'change_user' => 'bool', - 'character_set_name' => 'string', - 'commit' => 'bool', - 'connect' => 'bool', - 'dump_debug_info' => 'bool', - 'get_charset' => '?object', - 'get_client_info' => 'string', - 'get_connection_stats' => 'array', - 'get_server_info' => 'string', - 'get_warnings' => 'mysqli_warning|false', - 'kill' => 'bool', - 'multi_query' => 'bool', - 'more_results' => 'bool', - 'next_result' => 'bool', - 'ping' => 'bool', - 'poll' => 'int|false', - 'prepare' => 'mysqli_stmt|false', - 'query' => 'mysqli_result|bool', - 'real_connect' => 'bool', - 'real_escape_string' => 'string', - 'reap_async_query' => 'mysqli_result|bool', - 'escape_string' => 'string', - 'real_query' => 'bool', - 'release_savepoint' => 'bool', - 'rollback' => 'bool', - 'savepoint' => 'bool', - 'select_db' => 'bool', - 'set_charset' => 'bool', - 'options' => 'bool', - 'set_opt' => 'bool', - 'stat' => 'string|false', - 'stmt_init' => 'mysqli_stmt|false', - 'store_result' => 'mysqli_result|false', - 'thread_safe' => 'bool', - 'use_result' => 'mysqli_result|false', - 'refresh' => 'bool', - ], - 'mysqli_result' => [ - 'close' => 'void', - 'free' => 'void', - 'data_seek' => 'bool', - 'fetch_field' => 'object|false', - 'fetch_fields' => 'array', - 'fetch_field_direct' => 'object|false', - 'fetch_all' => 'array', - 'fetch_array' => 'array|null|false', - 'fetch_assoc' => 'array|null|false', - 'fetch_object' => 'object|null|false', - 'fetch_row' => 'array|null|false', - 'field_seek' => 'bool', - 'free_result' => 'void', - ], - 'mysqli_stmt' => [ - 'attr_get' => 'int', - 'attr_set' => 'bool', - 'bind_param' => 'bool', - 'bind_result' => 'bool', - 'data_seek' => 'void', - 'execute' => 'bool', - 'fetch' => '?bool', - 'get_warnings' => 'mysqli_warning|false', - 'result_metadata' => 'mysqli_result|false', - 'more_results' => 'bool', - 'next_result' => 'bool', - 'num_rows' => 'int|string', - 'send_long_data' => 'bool', - 'free_result' => 'void', - 'reset' => 'bool', - 'prepare' => 'bool', - 'store_result' => 'bool', - 'get_result' => 'mysqli_result|false', - ], - 'OCILob' => [ - 'save' => 'bool', - 'import' => 'bool', - 'saveFile' => 'bool', - 'load' => 'string|false', - 'read' => 'string|false', - 'eof' => 'bool', - 'tell' => 'int|false', - 'rewind' => 'bool', - 'seek' => 'bool', - 'size' => 'int|false', - 'write' => 'int|false', - 'append' => 'bool', - 'truncate' => 'bool', - 'erase' => 'int|false', - 'flush' => 'bool', - 'setBuffering' => 'bool', - 'getBuffering' => 'bool', - 'writeToFile' => 'bool', - 'export' => 'bool', - 'writeTemporary' => 'bool', - 'close' => 'bool', - 'free' => 'bool', - ], - 'OCICollection' => [ - 'free' => 'bool', - 'append' => 'bool', - 'getElem' => 'string|float|null|false', - 'assign' => 'bool', - 'assignElem' => 'bool', - 'size' => 'int|false', - 'max' => 'int|false', - 'trim' => 'bool', - ], - 'PDO' => [ - 'beginTransaction' => 'bool', - 'commit' => 'bool', - 'errorCode' => '?string', - 'errorInfo' => 'array', - 'exec' => 'int|false', - 'getAttribute' => 'mixed', - 'getAvailableDrivers' => 'array', - 'inTransaction' => 'bool', - 'lastInsertId' => 'string|false', - 'prepare' => 'PDOStatement|false', - 'query' => 'PDOStatement|false', - 'quote' => 'string|false', - 'rollBack' => 'bool', - 'setAttribute' => 'bool', - ], - 'PDOStatement' => [ - 'bindColumn' => 'bool', - 'bindParam' => 'bool', - 'bindValue' => 'bool', - 'closeCursor' => 'bool', - 'columnCount' => 'int', - 'debugDumpParams' => '?bool', - 'errorCode' => '?string', - 'errorInfo' => 'array', - 'execute' => 'bool', - 'fetch' => 'mixed', - 'fetchAll' => 'array', - 'fetchColumn' => 'mixed', - 'fetchObject' => 'object|false', - 'getAttribute' => 'mixed', - 'getColumnMeta' => 'array|false', - 'nextRowset' => 'bool', - 'rowCount' => 'int', - 'setAttribute' => 'bool', - ], - 'PDO_PGSql_Ext' => [ - 'pgsqlCopyFromArray' => 'bool', - 'pgsqlCopyFromFile' => 'bool', - 'pgsqlCopyToArray' => 'array|false', - 'pgsqlCopyToFile' => 'bool', - 'pgsqlLOBCreate' => 'string|false', - 'pgsqlLOBUnlink' => 'bool', - 'pgsqlGetNotify' => 'array|false', - 'pgsqlGetPid' => 'int', - ], - 'PDO_SQLite_Ext' => [ - 'sqliteCreateFunction' => 'bool', - 'sqliteCreateAggregate' => 'bool', - 'sqliteCreateCollation' => 'bool', - ], - 'Phar' => [ - 'addEmptyDir' => 'void', - 'addFile' => 'void', - 'addFromString' => 'void', - 'buildFromDirectory' => 'array', - 'buildFromIterator' => 'array', - 'compressFiles' => 'void', - 'compress' => '?Phar', - 'decompress' => '?Phar', - 'convertToExecutable' => '?Phar', - 'convertToData' => '?PharData', - 'count' => 'int', - 'extractTo' => 'bool', - 'getAlias' => '?string', - 'getPath' => 'string', - 'getMetadata' => 'mixed', - 'getModified' => 'bool', - 'getSignature' => 'array|false', - 'getStub' => 'string', - 'getVersion' => 'string', - 'hasMetadata' => 'bool', - 'isBuffering' => 'bool', - 'isCompressed' => 'int|false', - 'isFileFormat' => 'bool', - 'isWritable' => 'bool', - 'offsetExists' => 'bool', - 'offsetGet' => 'SplFileInfo', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'setAlias' => 'bool', - 'setDefaultStub' => 'bool', - 'setMetadata' => 'void', - 'setSignatureAlgorithm' => 'void', - 'startBuffering' => 'void', - 'stopBuffering' => 'void', - ], - 'PharData' => [ - 'addEmptyDir' => 'void', - 'addFile' => 'void', - 'addFromString' => 'void', - 'buildFromDirectory' => 'array', - 'buildFromIterator' => 'array', - 'compressFiles' => 'void', - 'compress' => '?PharData', - 'decompress' => '?PharData', - 'convertToExecutable' => '?Phar', - 'convertToData' => '?PharData', - 'count' => 'int', - 'extractTo' => 'bool', - 'getAlias' => '?string', - 'getPath' => 'string', - 'getMetadata' => 'mixed', - 'getModified' => 'bool', - 'getSignature' => 'array|false', - 'getStub' => 'string', - 'getVersion' => 'string', - 'hasMetadata' => 'bool', - 'isBuffering' => 'bool', - 'isCompressed' => 'int|false', - 'isFileFormat' => 'bool', - 'isWritable' => 'bool', - 'offsetExists' => 'bool', - 'offsetGet' => 'SplFileInfo', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'setAlias' => 'bool', - 'setDefaultStub' => 'bool', - 'setMetadata' => 'void', - 'setSignatureAlgorithm' => 'void', - 'startBuffering' => 'void', - 'stopBuffering' => 'void', - ], - 'PharFileInfo' => [ - 'chmod' => 'void', - 'getCompressedSize' => 'int', - 'getCRC32' => 'int', - 'getContent' => 'string', - 'getMetadata' => 'mixed', - 'getPharFlags' => 'int', - 'hasMetadata' => 'bool', - 'isCompressed' => 'bool', - 'isCRCChecked' => 'bool', - 'setMetadata' => 'void', - ], - 'Reflection' => [ - 'getModifierNames' => 'array', - ], - 'ReflectionFunctionAbstract' => [ - 'inNamespace' => 'bool', - 'isClosure' => 'bool', - 'isDeprecated' => 'bool', - 'isInternal' => 'bool', - 'isUserDefined' => 'bool', - 'isGenerator' => 'bool', - 'isVariadic' => 'bool', - 'isStatic' => 'bool', - 'getClosureThis' => '?object', - 'getClosureCalledClass' => '?ReflectionClass', - 'getClosureScopeClass' => '?ReflectionClass', - 'getDocComment' => 'string|false', - 'getEndLine' => 'int|false', - 'getExtension' => '?ReflectionExtension', - 'getExtensionName' => 'string|false', - 'getFileName' => 'string|false', - 'getName' => 'string', - 'getNamespaceName' => 'string', - 'getNumberOfParameters' => 'int', - 'getNumberOfRequiredParameters' => 'int', - 'getParameters' => 'array', - 'getShortName' => 'string', - 'getStartLine' => 'int|false', - 'getStaticVariables' => 'array', - 'returnsReference' => 'bool', - 'hasReturnType' => 'bool', - 'getReturnType' => '?ReflectionType', - ], - 'ReflectionFunction' => [ - 'isDisabled' => 'bool', - 'invoke' => 'mixed', - 'invokeArgs' => 'mixed', - 'getClosure' => 'Closure', - 'getExecutingLine' => 'int', - 'getExecutingFile' => 'string', - 'getTrace' => 'array', - 'getFunction' => 'ReflectionFunctionAbstract', - 'getThis' => '?object', - 'getExecutingGenerator' => 'Generator', - ], - 'ReflectionMethod' => [ - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'isAbstract' => 'bool', - 'isFinal' => 'bool', - 'isConstructor' => 'bool', - 'isDestructor' => 'bool', - 'getClosure' => 'Closure', - 'getModifiers' => 'int', - 'invoke' => 'mixed', - 'invokeArgs' => 'mixed', - 'getDeclaringClass' => 'ReflectionClass', - 'getPrototype' => 'ReflectionMethod', - 'setAccessible' => 'void', - ], - 'ReflectionClass' => [ - 'getName' => 'string', - 'isInternal' => 'bool', - 'isUserDefined' => 'bool', - 'isAnonymous' => 'bool', - 'isInstantiable' => 'bool', - 'isCloneable' => 'bool', - 'getFileName' => 'string|false', - 'getStartLine' => 'int|false', - 'getEndLine' => 'int|false', - 'getDocComment' => 'string|false', - 'getConstructor' => '?ReflectionMethod', - 'hasMethod' => 'bool', - 'getMethod' => 'ReflectionMethod', - 'getMethods' => 'array', - 'hasProperty' => 'bool', - 'getProperty' => 'ReflectionProperty', - 'getProperties' => 'array', - 'hasConstant' => 'bool', - 'getConstants' => 'array', - 'getReflectionConstants' => 'array', - 'getConstant' => 'mixed', - 'getReflectionConstant' => 'ReflectionClassConstant|false', - 'getInterfaces' => 'array', - 'getInterfaceNames' => 'array', - 'isInterface' => 'bool', - 'getTraits' => 'array', - 'getTraitNames' => 'array', - 'getTraitAliases' => 'array', - 'isTrait' => 'bool', - 'isAbstract' => 'bool', - 'isFinal' => 'bool', - 'getModifiers' => 'int', - 'isInstance' => 'bool', - 'newInstance' => 'object', - 'newInstanceWithoutConstructor' => 'object', - 'newInstanceArgs' => '?object', - 'getParentClass' => 'ReflectionClass|false', - 'isSubclassOf' => 'bool', - 'getStaticProperties' => '?array', - 'getStaticPropertyValue' => 'mixed', - 'setStaticPropertyValue' => 'void', - 'getDefaultProperties' => 'array', - 'isIterable' => 'bool', - 'isIterateable' => 'bool', - 'implementsInterface' => 'bool', - 'getExtension' => '?ReflectionExtension', - 'getExtensionName' => 'string|false', - 'inNamespace' => 'bool', - 'getNamespaceName' => 'string', - 'getShortName' => 'string', - ], - 'ReflectionProperty' => [ - 'getName' => 'string', - 'getValue' => 'mixed', - 'setValue' => 'void', - 'isInitialized' => 'bool', - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'isStatic' => 'bool', - 'isDefault' => 'bool', - 'getModifiers' => 'int', - 'getDeclaringClass' => 'ReflectionClass', - 'getDocComment' => 'string|false', - 'setAccessible' => 'void', - 'getType' => '?ReflectionType', - 'hasType' => 'bool', - 'getDefaultValue' => 'mixed', - ], - 'ReflectionClassConstant' => [ - 'getName' => 'string', - 'getValue' => 'mixed', - 'isPublic' => 'bool', - 'isPrivate' => 'bool', - 'isProtected' => 'bool', - 'getModifiers' => 'int', - 'getDeclaringClass' => 'ReflectionClass', - 'getDocComment' => 'string|false', - ], - 'ReflectionParameter' => [ - 'getName' => 'string', - 'isPassedByReference' => 'bool', - 'canBePassedByValue' => 'bool', - 'getDeclaringFunction' => 'ReflectionFunctionAbstract', - 'getDeclaringClass' => '?ReflectionClass', - 'getClass' => '?ReflectionClass', - 'hasType' => 'bool', - 'getType' => '?ReflectionType', - 'isArray' => 'bool', - 'isCallable' => 'bool', - 'allowsNull' => 'bool', - 'getPosition' => 'int', - 'isOptional' => 'bool', - 'isDefaultValueAvailable' => 'bool', - 'getDefaultValue' => 'mixed', - 'isDefaultValueConstant' => 'bool', - 'getDefaultValueConstantName' => '?string', - 'isVariadic' => 'bool', - ], - 'ReflectionType' => [ - 'allowsNull' => 'bool', - ], - 'ReflectionNamedType' => [ - 'getName' => 'string', - 'isBuiltin' => 'bool', - ], - 'ReflectionExtension' => [ - 'getName' => 'string', - 'getVersion' => '?string', - 'getFunctions' => 'array', - 'getConstants' => 'array', - 'getINIEntries' => 'array', - 'getClasses' => 'array', - 'getClassNames' => 'array', - 'getDependencies' => 'array', - 'info' => 'void', - 'isPersistent' => 'bool', - 'isTemporary' => 'bool', - ], - 'ReflectionZendExtension' => [ - 'getName' => 'string', - 'getVersion' => 'string', - 'getAuthor' => 'string', - 'getURL' => 'string', - 'getCopyright' => 'string', - ], - 'SessionHandlerInterface' => [ - 'open' => 'bool', - 'close' => 'bool', - 'read' => 'string|false', - 'write' => 'bool', - 'destroy' => 'bool', - 'gc' => 'int|false', - ], - 'SessionIdInterface' => [ - 'create_sid' => 'string', - ], - 'SessionUpdateTimestampHandlerInterface' => [ - 'validateId' => 'bool', - 'updateTimestamp' => 'bool', - ], - 'SessionHandler' => [ - 'open' => 'bool', - 'close' => 'bool', - 'read' => 'string|false', - 'write' => 'bool', - 'destroy' => 'bool', - 'gc' => 'int|false', - 'create_sid' => 'string', - ], - 'SimpleXMLElement' => [ - 'xpath' => 'array|null|false', - 'registerXPathNamespace' => 'bool', - 'asXML' => 'string|bool', - 'saveXML' => 'string|bool', - 'getNamespaces' => 'array', - 'getDocNamespaces' => 'array|false', - 'children' => '?SimpleXMLElement', - 'attributes' => '?SimpleXMLElement', - 'addChild' => '?SimpleXMLElement', - 'addAttribute' => 'void', - 'getName' => 'string', - 'count' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'current' => 'SimpleXMLElement', - 'key' => 'string', - 'next' => 'void', - 'hasChildren' => 'bool', - 'getChildren' => '?SimpleXMLElement', - ], - 'SNMP' => [ - 'close' => 'bool', - 'setSecurity' => 'bool', - 'get' => 'mixed', - 'getnext' => 'mixed', - 'walk' => 'array|false', - 'set' => 'bool', - 'getErrno' => 'int', - 'getError' => 'string', - ], - 'SoapServer' => [ - 'fault' => 'void', - 'addSoapHeader' => 'void', - 'setPersistence' => 'void', - 'setClass' => 'void', - 'setObject' => 'void', - 'getFunctions' => 'array', - 'addFunction' => 'void', - 'handle' => 'void', - ], - 'SoapClient' => [ - '__call' => 'mixed', - '__soapCall' => 'mixed', - '__getFunctions' => '?array', - '__getTypes' => '?array', - '__getLastRequest' => '?string', - '__getLastResponse' => '?string', - '__getLastRequestHeaders' => '?string', - '__getLastResponseHeaders' => '?string', - '__doRequest' => '?string', - '__setCookie' => 'void', - '__getCookies' => 'array', - '__setSoapHeaders' => 'bool', - '__setLocation' => '?string', - ], - 'ArrayObject' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'append' => 'void', - 'getArrayCopy' => 'array', - 'count' => 'int', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'asort' => 'bool', - 'ksort' => 'bool', - 'uasort' => 'bool', - 'uksort' => 'bool', - 'natsort' => 'bool', - 'natcasesort' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - 'getIterator' => 'Iterator', - 'exchangeArray' => 'array', - 'setIteratorClass' => 'void', - 'getIteratorClass' => 'string', - '__debugInfo' => 'array', - ], - 'ArrayIterator' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'append' => 'void', - 'getArrayCopy' => 'array', - 'count' => 'int', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'asort' => 'bool', - 'ksort' => 'bool', - 'uasort' => 'bool', - 'uksort' => 'bool', - 'natsort' => 'bool', - 'natcasesort' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'string|int|null', - 'next' => 'void', - 'valid' => 'bool', - 'seek' => 'void', - '__debugInfo' => 'array', - ], - 'RecursiveArrayIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveArrayIterator', - ], - 'SplFileInfo' => [ - 'getPath' => 'string', - 'getFilename' => 'string', - 'getExtension' => 'string', - 'getBasename' => 'string', - 'getPathname' => 'string', - 'getPerms' => 'int|false', - 'getInode' => 'int|false', - 'getSize' => 'int|false', - 'getOwner' => 'int|false', - 'getGroup' => 'int|false', - 'getATime' => 'int|false', - 'getMTime' => 'int|false', - 'getCTime' => 'int|false', - 'getType' => 'string|false', - 'isWritable' => 'bool', - 'isReadable' => 'bool', - 'isExecutable' => 'bool', - 'isFile' => 'bool', - 'isDir' => 'bool', - 'isLink' => 'bool', - 'getLinkTarget' => 'string|false', - 'getRealPath' => 'string|false', - 'getFileInfo' => 'SplFileInfo', - 'getPathInfo' => '?SplFileInfo', - 'openFile' => 'SplFileObject', - 'setFileClass' => 'void', - 'setInfoClass' => 'void', - '__debugInfo' => 'array', - '_bad_state_ex' => 'void', - ], - 'DirectoryIterator' => [ - 'getFilename' => 'string', - 'getExtension' => 'string', - 'getBasename' => 'string', - 'isDot' => 'bool', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - 'seek' => 'void', - ], - 'FilesystemIterator' => [ - 'rewind' => 'void', - 'key' => 'string', - 'current' => 'string|SplFileInfo|FilesystemIterator', - 'getFlags' => 'int', - 'setFlags' => 'void', - ], - 'RecursiveDirectoryIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveDirectoryIterator', - 'getSubPath' => 'string', - 'getSubPathname' => 'string', - ], - 'GlobIterator' => [ - 'count' => 'int', - ], - 'SplFileObject' => [ - 'rewind' => 'void', - 'eof' => 'bool', - 'valid' => 'bool', - 'fgets' => 'string', - 'fread' => 'string|false', - 'fgetcsv' => 'array|false', - 'fputcsv' => 'int|false', - 'setCsvControl' => 'void', - 'getCsvControl' => 'array', - 'flock' => 'bool', - 'fflush' => 'bool', - 'ftell' => 'int|false', - 'fseek' => 'int', - 'fgetc' => 'string|false', - 'fpassthru' => 'int', - 'fscanf' => 'array|int|null', - 'fwrite' => 'int|false', - 'fstat' => 'array', - 'ftruncate' => 'bool', - 'current' => 'string|array|false', - 'key' => 'int', - 'next' => 'void', - 'setFlags' => 'void', - 'getFlags' => 'int', - 'setMaxLineLen' => 'void', - 'getMaxLineLen' => 'int', - 'hasChildren' => 'false', - 'getChildren' => 'null', - 'seek' => 'void', - 'getCurrentLine' => 'string', - ], - 'SplDoublyLinkedList' => [ - 'add' => 'void', - 'pop' => 'mixed', - 'shift' => 'mixed', - 'push' => 'void', - 'unshift' => 'void', - 'top' => 'mixed', - 'bottom' => 'mixed', - '__debugInfo' => 'array', - 'count' => 'int', - 'isEmpty' => 'bool', - 'setIteratorMode' => 'int', - 'getIteratorMode' => 'int', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'prev' => 'void', - 'next' => 'void', - 'valid' => 'bool', - 'unserialize' => 'void', - 'serialize' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - ], - 'SplQueue' => [ - 'enqueue' => 'void', - 'dequeue' => 'mixed', - ], - 'SplFixedArray' => [ - '__wakeup' => 'void', - 'count' => 'int', - 'toArray' => 'array', - 'fromArray' => 'SplFixedArray', - 'getSize' => 'int', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - ], - 'SplPriorityQueue' => [ - 'compare' => 'int', - 'setExtractFlags' => 'int', - 'top' => 'mixed', - 'extract' => 'mixed', - 'count' => 'int', - 'isEmpty' => 'bool', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'next' => 'void', - 'valid' => 'bool', - 'isCorrupted' => 'bool', - 'getExtractFlags' => 'int', - '__debugInfo' => 'array', - ], - 'SplHeap' => [ - 'extract' => 'mixed', - 'insert' => 'bool', - 'top' => 'mixed', - 'count' => 'int', - 'isEmpty' => 'bool', - 'rewind' => 'void', - 'current' => 'mixed', - 'key' => 'int', - 'next' => 'void', - 'valid' => 'bool', - 'recoverFromCorruption' => 'bool', - 'compare' => 'int', - 'isCorrupted' => 'bool', - '__debugInfo' => 'array', - ], - 'SplMinHeap' => [ - 'compare' => 'int', - ], - 'SplMaxHeap' => [ - 'compare' => 'int', - ], - 'EmptyIterator' => [ - 'current' => 'never', - 'next' => 'void', - 'key' => 'never', - 'valid' => 'false', - 'rewind' => 'void', - ], - 'CallbackFilterIterator' => [ - 'accept' => 'bool', - ], - 'RecursiveCallbackFilterIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveCallbackFilterIterator', - ], - 'RecursiveIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveIterator', - ], - 'RecursiveIteratorIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - 'getDepth' => 'int', - 'getSubIterator' => '?RecursiveIterator', - 'getInnerIterator' => 'RecursiveIterator', - 'beginIteration' => 'void', - 'endIteration' => 'void', - 'callHasChildren' => 'bool', - 'callGetChildren' => '?RecursiveIterator', - 'beginChildren' => 'void', - 'endChildren' => 'void', - 'nextElement' => 'void', - 'setMaxDepth' => 'void', - 'getMaxDepth' => 'int|false', - ], - 'OuterIterator' => [ - 'getInnerIterator' => '?Iterator', - ], - 'IteratorIterator' => [ - 'getInnerIterator' => '?Iterator', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - ], - 'FilterIterator' => [ - 'accept' => 'bool', - 'rewind' => 'void', - 'next' => 'void', - ], - 'RecursiveFilterIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveFilterIterator', - ], - 'ParentIterator' => [ - 'accept' => 'bool', - ], - 'SeekableIterator' => [ - 'seek' => 'void', - ], - 'LimitIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'next' => 'void', - 'seek' => 'int', - 'getPosition' => 'int', - ], - 'CachingIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'next' => 'void', - 'hasNext' => 'bool', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'offsetExists' => 'bool', - 'getCache' => 'array', - 'count' => 'int', - ], - 'RecursiveCachingIterator' => [ - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveCachingIterator', - ], - 'NoRewindIterator' => [ - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'mixed', - 'current' => 'mixed', - 'next' => 'void', - ], - 'AppendIterator' => [ - 'append' => 'void', - 'rewind' => 'void', - 'valid' => 'bool', - 'current' => 'mixed', - 'next' => 'void', - 'getIteratorIndex' => '?int', - 'getArrayIterator' => 'ArrayIterator', - ], - 'InfiniteIterator' => [ - 'next' => 'void', - ], - 'RegexIterator' => [ - 'accept' => 'bool', - 'getMode' => 'int', - 'setMode' => 'void', - 'getFlags' => 'int', - 'setFlags' => 'void', - 'getRegex' => 'string', - 'getPregFlags' => 'int', - 'setPregFlags' => 'void', - ], - 'RecursiveRegexIterator' => [ - 'accept' => 'bool', - 'hasChildren' => 'bool', - 'getChildren' => 'RecursiveRegexIterator', - ], - 'RecursiveTreeIterator' => [ - 'key' => 'mixed', - 'current' => 'mixed', - 'getPrefix' => 'string', - 'setPostfix' => 'void', - 'setPrefixPart' => 'void', - 'getEntry' => 'string', - 'getPostfix' => 'string', - ], - 'SplObserver' => [ - 'update' => 'void', - ], - 'SplSubject' => [ - 'attach' => 'void', - 'detach' => 'void', - 'notify' => 'void', - ], - 'SplObjectStorage' => [ - 'attach' => 'void', - 'detach' => 'void', - 'contains' => 'bool', - 'addAll' => 'int', - 'removeAll' => 'int', - 'removeAllExcept' => 'int', - 'getInfo' => 'mixed', - 'setInfo' => 'void', - 'count' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'int', - 'current' => 'object', - 'next' => 'void', - 'unserialize' => 'void', - 'serialize' => 'string', - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - 'getHash' => 'string', - '__serialize' => 'array', - '__unserialize' => 'void', - '__debugInfo' => 'array', - ], - 'MultipleIterator' => [ - 'getFlags' => 'int', - 'setFlags' => 'void', - 'attachIterator' => 'void', - 'detachIterator' => 'void', - 'containsIterator' => 'bool', - 'countIterators' => 'int', - 'rewind' => 'void', - 'valid' => 'bool', - 'key' => 'array', - 'current' => 'array', - 'next' => 'void', - '__debugInfo' => 'array', - ], - 'SQLite3' => [ - 'open' => 'void', - 'version' => 'array', - 'lastInsertRowID' => 'int', - 'lastErrorCode' => 'int', - 'lastExtendedErrorCode' => 'int', - 'lastErrorMsg' => 'string', - 'changes' => 'int', - 'busyTimeout' => 'bool', - 'loadExtension' => 'bool', - 'backup' => 'bool', - 'escapeString' => 'string', - 'prepare' => 'SQLite3Stmt|false', - 'exec' => 'bool', - 'query' => 'SQLite3Result|false', - 'querySingle' => 'mixed', - 'createFunction' => 'bool', - 'createAggregate' => 'bool', - 'createCollation' => 'bool', - 'enableExceptions' => 'bool', - 'enableExtendedResultCodes' => 'bool', - 'setAuthorizer' => 'bool', - ], - 'SQLite3Stmt' => [ - 'bindParam' => 'bool', - 'bindValue' => 'bool', - 'clear' => 'bool', - 'close' => 'bool', - 'execute' => 'SQLite3Result|false', - 'getSQL' => 'string|false', - 'paramCount' => 'int', - 'readOnly' => 'bool', - 'reset' => 'bool', - ], - 'SQLite3Result' => [ - 'numColumns' => 'int', - 'columnName' => 'string|false', - 'columnType' => 'int|false', - 'fetchArray' => 'array|false', - 'reset' => 'bool', - ], - 'Directory' => [ - 'close' => 'void', - 'rewind' => 'void', - 'read' => 'string|false', - ], - 'php_user_filter' => [ - 'filter' => 'int', - 'onCreate' => 'bool', - 'onClose' => 'void', - ], - 'tidy' => [ - 'getOpt' => 'string|int|bool', - 'cleanRepair' => 'bool', - 'parseFile' => 'bool', - 'parseString' => 'bool', - 'repairString' => 'string|false', - 'repairFile' => 'string|false', - 'diagnose' => 'bool', - 'getRelease' => 'string', - 'getConfig' => 'array', - 'getStatus' => 'int', - 'getHtmlVer' => 'int', - 'getOptDoc' => 'string|false', - 'isXhtml' => 'bool', - 'isXml' => 'bool', - 'root' => '?tidyNode', - 'head' => '?tidyNode', - 'html' => '?tidyNode', - 'body' => '?tidyNode', - ], - 'XMLReader' => [ - 'getAttribute' => '?string', - 'getAttributeNo' => '?string', - 'getAttributeNs' => '?string', - 'getParserProperty' => 'bool', - 'isValid' => 'bool', - 'lookupNamespace' => '?string', - 'moveToAttribute' => 'bool', - 'moveToAttributeNo' => 'bool', - 'moveToAttributeNs' => 'bool', - 'moveToElement' => 'bool', - 'moveToFirstAttribute' => 'bool', - 'moveToNextAttribute' => 'bool', - 'read' => 'bool', - 'next' => 'bool', - 'readInnerXml' => 'string', - 'readOuterXml' => 'string', - 'readString' => 'string', - 'setSchema' => 'bool', - 'setParserProperty' => 'bool', - 'setRelaxNGSchema' => 'bool', - 'setRelaxNGSchemaSource' => 'bool', - 'expand' => 'DOMNode|false', - ], - 'XMLWriter' => [ - 'openUri' => 'bool', - 'openMemory' => 'bool', - 'setIndent' => 'bool', - 'setIndentString' => 'bool', - 'startComment' => 'bool', - 'endComment' => 'bool', - 'startAttribute' => 'bool', - 'endAttribute' => 'bool', - 'writeAttribute' => 'bool', - 'startAttributeNs' => 'bool', - 'writeAttributeNs' => 'bool', - 'startElement' => 'bool', - 'endElement' => 'bool', - 'fullEndElement' => 'bool', - 'startElementNs' => 'bool', - 'writeElement' => 'bool', - 'writeElementNs' => 'bool', - 'startPi' => 'bool', - 'endPi' => 'bool', - 'writePi' => 'bool', - 'startCdata' => 'bool', - 'endCdata' => 'bool', - 'writeCdata' => 'bool', - 'text' => 'bool', - 'writeRaw' => 'bool', - 'startDocument' => 'bool', - 'endDocument' => 'bool', - 'writeComment' => 'bool', - 'startDtd' => 'bool', - 'endDtd' => 'bool', - 'writeDtd' => 'bool', - 'startDtdElement' => 'bool', - 'endDtdElement' => 'bool', - 'writeDtdElement' => 'bool', - 'startDtdAttlist' => 'bool', - 'endDtdAttlist' => 'bool', - 'writeDtdAttlist' => 'bool', - 'startDtdEntity' => 'bool', - 'endDtdEntity' => 'bool', - 'writeDtdEntity' => 'bool', - 'outputMemory' => 'string', - 'flush' => 'string|int', - ], - 'XSLTProcessor' => [ - 'importStylesheet' => 'bool', - 'transformToDoc' => 'DOMDocument|false', - 'transformToUri' => 'int', - 'transformToXml' => 'string|null|false', - 'setParameter' => 'bool', - 'getParameter' => 'string|false', - 'removeParameter' => 'bool', - 'hasExsltSupport' => 'bool', - 'registerPHPFunctions' => 'void', - 'setSecurityPrefs' => 'int', - 'getSecurityPrefs' => 'int', - ], - 'ZipArchive' => [ - 'open' => 'bool|int', - 'setPassword' => 'bool', - 'close' => 'bool', - 'count' => 'int', - 'getStatusString' => 'string', - 'addEmptyDir' => 'bool', - 'addFromString' => 'bool', - 'addFile' => 'bool', - 'replaceFile' => 'bool', - 'addGlob' => 'array|false', - 'addPattern' => 'array|false', - 'renameIndex' => 'bool', - 'renameName' => 'bool', - 'setArchiveComment' => 'bool', - 'getArchiveComment' => 'string|false', - 'setCommentIndex' => 'bool', - 'setCommentName' => 'bool', - 'setMtimeIndex' => 'bool', - 'setMtimeName' => 'bool', - 'getCommentIndex' => 'string|false', - 'getCommentName' => 'string|false', - 'deleteIndex' => 'bool', - 'deleteName' => 'bool', - 'statName' => 'array|false', - 'statIndex' => 'array|false', - 'locateName' => 'int|false', - 'getNameIndex' => 'string|false', - 'unchangeArchive' => 'bool', - 'unchangeAll' => 'bool', - 'unchangeIndex' => 'bool', - 'unchangeName' => 'bool', - 'extractTo' => 'bool', - 'getFromName' => 'string|false', - 'getFromIndex' => 'string|false', - 'setExternalAttributesName' => 'bool', - 'setExternalAttributesIndex' => 'bool', - 'getExternalAttributesName' => 'bool', - 'getExternalAttributesIndex' => 'bool', - 'setCompressionName' => 'bool', - 'setCompressionIndex' => 'bool', - 'setEncryptionName' => 'bool', - 'setEncryptionIndex' => 'bool', - 'registerProgressCallback' => 'bool', - 'registerCancelCallback' => 'bool', - ], - 'Exception' => [ - '__wakeup' => 'void', - ], - 'Error' => [ - '__wakeup' => 'void', - ], - 'IteratorAggregate' => [ - 'getIterator' => 'Traversable', - ], - 'Iterator' => [ - 'current' => 'mixed', - 'next' => 'void', - 'key' => 'mixed', - 'valid' => 'bool', - 'rewind' => 'void', - ], - 'ArrayAccess' => [ - 'offsetExists' => 'bool', - 'offsetGet' => 'mixed', - 'offsetSet' => 'void', - 'offsetUnset' => 'void', - ], - 'Countable' => [ - 'count' => 'int', - ], - ]; -} diff --git a/vendor/symfony/error-handler/LICENSE b/vendor/symfony/error-handler/LICENSE deleted file mode 100644 index f37c76b5..00000000 --- a/vendor/symfony/error-handler/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2019-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/error-handler/README.md b/vendor/symfony/error-handler/README.md deleted file mode 100644 index 68904dd7..00000000 --- a/vendor/symfony/error-handler/README.md +++ /dev/null @@ -1,44 +0,0 @@ -ErrorHandler Component -====================== - -The ErrorHandler component provides tools to manage errors and ease debugging PHP code. - -Getting Started ---------------- - -```bash -composer require symfony/error-handler -``` - -```php -use Symfony\Component\ErrorHandler\Debug; -use Symfony\Component\ErrorHandler\ErrorHandler; -use Symfony\Component\ErrorHandler\DebugClassLoader; - -Debug::enable(); - -// or enable only one feature -//ErrorHandler::register(); -//DebugClassLoader::enable(); - -// If you want a custom generic template when debug is not enabled -// HtmlErrorRenderer::setTemplate('/path/to/custom/error.html.php'); - -$data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) { - // if any code executed inside this anonymous function fails, a PHP exception - // will be thrown, even if the code uses the '@' PHP silence operator - $data = json_decode(file_get_contents($filename), true); - $data['read_at'] = date($datetimeFormat); - file_put_contents($filename, json_encode($data)); - - return $data; -}); -``` - -Resources ---------- - - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/error-handler/Resources/assets/css/error.css b/vendor/symfony/error-handler/Resources/assets/css/error.css deleted file mode 100644 index 332d8187..00000000 --- a/vendor/symfony/error-handler/Resources/assets/css/error.css +++ /dev/null @@ -1,4 +0,0 @@ -body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; } -.container { margin: 30px; max-width: 600px; } -h1 { color: #dc3545; font-size: 24px; } -h2 { font-size: 18px; } diff --git a/vendor/symfony/error-handler/Resources/assets/css/exception.css b/vendor/symfony/error-handler/Resources/assets/css/exception.css deleted file mode 100644 index 6fbe7c02..00000000 --- a/vendor/symfony/error-handler/Resources/assets/css/exception.css +++ /dev/null @@ -1,359 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/profiler.css.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -:root { - --font-sans-serif: Helvetica, Arial, sans-serif; - --page-background: #f9f9f9; - --color-text: #222; - /* when updating any of these colors, do the same in toolbar.css.twig */ - --color-success: #4f805d; - --color-warning: #a46a1f; - --color-error: #b0413e; - --color-muted: #999; - --tab-background: #f0f0f0; - --tab-border-color: #e5e5e5; - --tab-active-border-color: #d4d4d4; - --tab-color: #444; - --tab-active-background: #fff; - --tab-active-color: var(--color-text); - --tab-disabled-background: #f5f5f5; - --tab-disabled-color: #999; - --selected-badge-background: #e5e5e5; - --selected-badge-color: #525252; - --selected-badge-shadow: inset 0 0 0 1px #d4d4d4; - --selected-badge-warning-background: #fde496; - --selected-badge-warning-color: #785b02; - --selected-badge-warning-shadow: inset 0 0 0 1px #e6af05; - --selected-badge-danger-background: #FCE9ED; - --selected-badge-danger-color: #83122A; - --selected-badge-danger-shadow: inset 0 0 0 1px #F5B8C5; - --metric-value-background: #fff; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #e0e0e0; - --metric-label-color: inherit; - --table-border: #e0e0e0; - --table-background: #fff; - --table-header: #e0e0e0; - --trace-selected-background: #F7E5A1; - --tree-active-background: #F7E5A1; - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(128, 128, 128, .2); - --border: 1px solid #e0e0e0; - --background-error: var(--color-error); - --highlight-comment: #969896; - --highlight-default: #222222; - --highlight-keyword: #a71d5d; - --highlight-string: #183691; - --base-0: #fff; - --base-1: #f5f5f5; - --base-2: #e0e0e0; - --base-3: #ccc; - --base-4: #666; - --base-5: #444; - --base-6: #222; -} - -.theme-dark { - --page-background: #36393e; - --color-text: #e0e0e0; - --color-muted: #777; - --color-error: #f76864; - --tab-background: #404040; - --tab-border-color: #737373; - --tab-active-border-color: #171717; - --tab-color: var(--color-text); - --tab-active-background: #d4d4d4; - --tab-active-color: #262626; - --tab-disabled-background: var(--page-background); - --tab-disabled-color: #a3a3a3; - --selected-badge-background: #555; - --selected-badge-color: #ddd; - --selected-badge-shadow: none; - --selected-badge-warning-background: #fcd55f; - --selected-badge-warning-color: #785b02; - --selected-badge-warning-shadow: inset 0 0 0 1px #af8503; - --selected-badge-danger-background: #B41939; - --selected-badge-danger-color: #FCE9ED; - --selected-badge-danger-shadow: none; - --metric-value-background: #555; - --metric-value-color: inherit; - --metric-unit-color: #999; - --metric-label-background: #777; - --metric-label-color: #e0e0e0; - --trace-selected-background: #5d5227cc; - --table-border: #444; - --table-background: #333; - --table-header: #555; - --info-background: rgba(79, 148, 195, 0.5); - --tree-active-background: var(--metric-label-background); - --exception-title-color: var(--base-2); - --shadow: 0px 0px 1px rgba(32, 32, 32, .2); - --border: 1px solid #666; - --background-error: #b0413e; - --highlight-comment: #dedede; - --highlight-default: var(--base-6); - --highlight-keyword: #de8986; - --highlight-string: #70a6fd; - --base-0: #2e3136; - --base-1: #444; - --base-2: #666; - --base-3: #666; - --base-4: #666; - --base-5: #e0e0e0; - --base-6: #f5f5f5; - --card-label-background: var(--tab-active-background); - --card-label-color: var(--tab-active-color); -} - -html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}summary{cursor: pointer} - -html { - /* always display the vertical scrollbar to avoid jumps when toggling contents */ - overflow-y: scroll; -} -body { background-color: var(--page-background); color: var(--base-6); font: 14px/1.4 Helvetica, Arial, sans-serif; padding-bottom: 45px; } - -a { cursor: pointer; text-decoration: none; } -a:hover { text-decoration: underline; } -abbr[title] { border-bottom: none; cursor: help; text-decoration: none; } - -code, pre { font: 13px/1.5 Consolas, Monaco, Menlo, "Ubuntu Mono", "Liberation Mono", monospace; } - -table, tr, th, td { background: var(--base-0); border-collapse: collapse; vertical-align: top; } -table { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 1em 0; width: 100%; } -table th, table td { border: solid var(--base-2); border-width: 1px 0; padding: 8px 10px; } -table th { background-color: var(--base-2); font-weight: bold; text-align: left; } - -.m-t-5 { margin-top: 5px; } -.hidden-xs-down { display: none; } -.block { display: block; } -.full-width { width: 100%; } -.hidden { display: none; } -.prewrap { white-space: pre-wrap; } -.nowrap { white-space: nowrap; } -.newline { display: block; } -.break-long-words { word-wrap: break-word; overflow-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; hyphenate-character: ''; min-width: 0; } -.text-small { font-size: 12px !important; } -.text-muted { color: #999; } -.text-bold { font-weight: bold; } -.empty { border: 4px dashed var(--base-2); color: #999; margin: 1em 0; padding: .5em 2em; } - -.status-success { background: rgba(94, 151, 110, 0.3); } -.status-warning { background: rgba(240, 181, 24, 0.3); } -.status-error { background: rgba(176, 65, 62, 0.2); } -.status-success td, .status-warning td, .status-error td { background: transparent; } -tr.status-error td, tr.status-warning td { border-bottom: 1px solid var(--base-2); border-top: 1px solid var(--base-2); } -.status-warning .colored { color: #A46A1F; } -.status-error .colored { color: var(--color-error); } - -.sf-toggle { cursor: pointer; position: relative; } -.sf-toggle-content { -moz-transition: display .25s ease; -webkit-transition: display .25s ease; transition: display .25s ease; } -.sf-toggle-content.sf-toggle-hidden { display: none; } -.sf-toggle-content.sf-toggle-visible { display: block; } -thead.sf-toggle-content.sf-toggle-visible, tbody.sf-toggle-content.sf-toggle-visible { display: table-row-group; } -.sf-toggle-off .icon-close, .sf-toggle-on .icon-open { display: none; } -.sf-toggle-off .icon-open, .sf-toggle-on .icon-close { display: block; } - -.tab-navigation { - background-color: var(--tab-background); - border-radius: 6px; - box-shadow: inset 0 0 0 1px var(--tab-border-color), 0 0 0 5px var(--page-background); - display: inline-flex; - flex-wrap: wrap; - margin: 0 0 15px; - padding: 0; - user-select: none; - -webkit-user-select: none; -} -.sf-tabs-sm .tab-navigation { - box-shadow: inset 0 0 0 1px var(--tab-border-color), 0 0 0 4px var(--page-background); - margin: 0 0 10px; -} -.tab-navigation .tab-control { - background: transparent; - border: 0; - box-shadow: none; - transition: box-shadow .05s ease-in, background-color .05s ease-in; - cursor: pointer; - font-size: 14px; - font-weight: 500; - line-height: 1.4; - margin: 0; - padding: 4px 14px; - position: relative; - text-align: center; - z-index: 1; -} -.sf-tabs-sm .tab-navigation .tab-control { - font-size: 13px; - padding: 2.5px 10px; -} -.tab-navigation .tab-control:before { - background: var(--tab-border-color); - bottom: 15%; - content: ""; - left: 0; - position: absolute; - top: 15%; - width: 1px; -} -.tab-navigation .tab-control:first-child:before, -.tab-navigation .tab-control.active + .tab-control:before, -.tab-navigation .tab-control.active:before { - width: 0; -} -.tab-navigation .tab-control .badge { - background: var(--selected-badge-background); - box-shadow: var(--selected-badge-shadow); - color: var(--selected-badge-color); - display: inline-block; - font-size: 12px; - font-weight: bold; - line-height: 1; - margin-left: 8px; - min-width: 10px; - padding: 2px 6px; - text-align: center; - white-space: nowrap; -} -.tab-navigation .tab-control.disabled { - color: var(--tab-disabled-color); -} -.tab-navigation .tab-control.active { - background-color: var(--tab-active-background); - border-radius: 6px; - box-shadow: inset 0 0 0 1.5px var(--tab-active-border-color); - color: var(--tab-active-color); - position: relative; - z-index: 1; -} -.theme-dark .tab-navigation li.active { - box-shadow: inset 0 0 0 1px var(--tab-border-color); -} -.tab-content > *:first-child { - margin-top: 0; -} -.tab-navigation .tab-control .badge.status-warning { - background: var(--selected-badge-warning-background); - box-shadow: var(--selected-badge-warning-shadow); - color: var(--selected-badge-warning-color); -} -.tab-navigation .tab-control .badge.status-error { - background: var(--selected-badge-danger-background); - box-shadow: var(--selected-badge-danger-shadow); - color: var(--selected-badge-danger-color); -} - -.sf-tabs .tab:not(:first-child) { display: none; } - -[data-filters] { position: relative; } -[data-filtered] { cursor: pointer; } -[data-filtered]:after { content: '\00a0\25BE'; } -[data-filtered]:hover .filter-list li { display: inline-flex; } -[class*="filter-hidden-"] { display: none; } -.filter-list { position: absolute; border: var(--border); box-shadow: var(--shadow); margin: 0; padding: 0; display: flex; flex-direction: column; } -.filter-list :after { content: ''; } -.filter-list li { - background: var(--tab-disabled-background); - border-bottom: var(--border); - color: var(--tab-disabled-color); - display: none; - list-style: none; - margin: 0; - padding: 5px 10px; - text-align: left; - font-weight: normal; -} -.filter-list li.active { - background: var(--tab-background); - color: var(--tab-color); -} -.filter-list li.last-active { - background: var(--tab-active-background); - color: var(--tab-active-color); -} - -.filter-list-level li { cursor: s-resize; } -.filter-list-level li.active { cursor: n-resize; } -.filter-list-level li.last-active { cursor: default; } -.filter-list-level li.last-active:before { content: '\2714\00a0'; } -.filter-list-choice li:before { content: '\2714\00a0'; color: transparent; } -.filter-list-choice li.active:before { color: unset; } - -.container { max-width: 1024px; margin: 0 auto; padding: 0 15px; } -.container::after { content: ""; display: table; clear: both; } - -header { background-color: #222; color: rgba(255, 255, 255, 0.75); font-size: 13px; height: 33px; line-height: 33px; padding: 0; } -header .container { display: flex; justify-content: space-between; } -.logo { flex: 1; font-size: 13px; font-weight: normal; margin: 0; padding: 0; } -.logo svg { height: 18px; width: 18px; opacity: .8; vertical-align: -5px; } - -.help-link { margin-left: 15px; } -.help-link a { color: inherit; } -.help-link .icon svg { height: 15px; width: 15px; opacity: .7; vertical-align: -2px; } -.help-link a:hover { color: #EEE; text-decoration: none; } -.help-link a:hover svg { opacity: .9; } - -.exception-summary { background: var(--background-error); border-bottom: 2px solid rgba(0, 0, 0, 0.1); border-top: 1px solid rgba(0, 0, 0, .3); flex: 0 0 auto; margin-bottom: 15px; } -.exception-metadata { background: rgba(0, 0, 0, 0.1); padding: 7px 0; } -.exception-metadata .container { display: flex; flex-direction: row; justify-content: space-between; } -.exception-metadata h2, .exception-metadata h2 > a { color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 400; margin: 0; } -.exception-http small { font-size: 13px; opacity: .7; } -.exception-hierarchy { flex: 1; } -.exception-hierarchy .icon { margin: 0 3px; opacity: .7; } -.exception-hierarchy .icon svg { height: 13px; width: 13px; vertical-align: -2px; } - -.exception-without-message .exception-message-wrapper { display: none; } -.exception-message-wrapper .container { display: flex; align-items: flex-start; min-height: 70px; padding: 10px 15px 8px; } -.exception-message { flex-grow: 1; } -.exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; } -.exception-message.long { font-size: 18px; } -.exception-message a { border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: inherit; text-decoration: none; } -.exception-message a:hover { border-bottom-color: #ffffff; } - -.exception-properties-wrapper { margin: .8em 0; } -.exception-properties { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); } -.exception-properties pre { margin: 0; padding: 0.2em 0; } - -.exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; } - -.trace + .trace { margin-top: 30px; } -.trace-head { background-color: var(--base-2); padding: 10px; position: relative; } -.trace-head .trace-class { color: var(--base-6); font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0; position: relative; } -.trace-head .trace-namespace { color: #999; display: block; font-size: 13px; } -.trace-head .icon { position: absolute; right: 0; top: 0; } -.trace-head .icon svg { fill: var(--base-5); height: 24px; width: 24px; } - -.trace-details { background: var(--base-0); border: var(--border); box-shadow: 0px 0px 1px rgba(128, 128, 128, .2); margin: 0 0 1em; table-layout: fixed; } - -.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; } - -.trace-line { position: relative; padding-top: 8px; padding-bottom: 8px; } -.trace-line + .trace-line { border-top: var(--border); } -.trace-line:hover { background: var(--base-1); } -.trace-line a { color: var(--base-6); } -.trace-line .icon { opacity: .4; position: absolute; left: 10px; } -.trace-line .icon svg { fill: var(--base-5); height: 16px; width: 16px; } -.trace-line .icon.icon-copy { left: auto; top: auto; padding-left: 5px; display: none } -.trace-line:hover .icon.icon-copy:not(.hidden) { display: inline-block } -.trace-line-header { padding-left: 36px; padding-right: 10px; } - -.trace-file-path, .trace-file-path a { color: var(--base-6); font-size: 13px; } -.trace-class { color: var(--color-error); } -.trace-type { padding: 0 2px; } -.trace-method { color: var(--color-error); font-weight: bold; } -.trace-arguments { color: #777; font-weight: normal; padding-left: 2px; } - -.trace-code { background: var(--base-0); font-size: 12px; margin: 10px 10px 2px 10px; padding: 10px; overflow-x: auto; white-space: nowrap; } -.trace-code ol { margin: 0; float: left; } -.trace-code li { color: #969896; margin: 0; padding-left: 10px; float: left; width: 100%; } -.trace-code li + li { margin-top: 5px; } -.trace-code li.selected { background: var(--trace-selected-background); margin-top: 2px; } -.trace-code li code { color: var(--base-6); white-space: pre; } - -.trace-as-text .stacktrace { line-height: 1.8; margin: 0 0 15px; white-space: pre-wrap; } - -@media (min-width: 575px) { - .hidden-xs-down { display: initial; } - .help-link { margin-left: 30px; } -} diff --git a/vendor/symfony/error-handler/Resources/assets/css/exception_full.css b/vendor/symfony/error-handler/Resources/assets/css/exception_full.css deleted file mode 100644 index fa77cb32..00000000 --- a/vendor/symfony/error-handler/Resources/assets/css/exception_full.css +++ /dev/null @@ -1,128 +0,0 @@ -.sf-reset .traces { - padding-bottom: 14px; -} -.sf-reset .traces li { - font-size: 12px; - color: #868686; - padding: 5px 4px; - list-style-type: decimal; - margin-left: 20px; -} -.sf-reset #logs .traces li.error { - font-style: normal; - color: #AA3333; - background: #f9ecec; -} -.sf-reset #logs .traces li.warning { - font-style: normal; - background: #ffcc00; -} -/* fix for Opera not liking empty
        • */ -.sf-reset .traces li:after { - content: "\00A0"; -} -.sf-reset .trace { - border: 1px solid #D3D3D3; - padding: 10px; - overflow: auto; - margin: 10px 0 20px; -} -.sf-reset .block-exception { - -moz-border-radius: 16px; - -webkit-border-radius: 16px; - border-radius: 16px; - margin-bottom: 20px; - background-color: #f6f6f6; - border: 1px solid #dfdfdf; - padding: 30px 28px; - word-wrap: break-word; - overflow: hidden; -} -.sf-reset .block-exception div { - color: #313131; - font-size: 10px; -} -.sf-reset .block-exception-detected .illustration-exception, -.sf-reset .block-exception-detected .text-exception { - float: left; -} -.sf-reset .block-exception-detected .illustration-exception { - width: 152px; -} -.sf-reset .block-exception-detected .text-exception { - width: 670px; - padding: 30px 44px 24px 46px; - position: relative; -} -.sf-reset .text-exception .open-quote, -.sf-reset .text-exception .close-quote { - font-family: Arial, Helvetica, sans-serif; - position: absolute; - color: #C9C9C9; - font-size: 8em; -} -.sf-reset .open-quote { - top: 0; - left: 0; -} -.sf-reset .close-quote { - bottom: -0.5em; - right: 50px; -} -.sf-reset .block-exception p { - font-family: Arial, Helvetica, sans-serif; -} -.sf-reset .block-exception p a, -.sf-reset .block-exception p a:hover { - color: #565656; -} -.sf-reset .logs h2 { - float: left; - width: 654px; -} -.sf-reset .error-count, .sf-reset .support { - float: right; - width: 170px; - text-align: right; -} -.sf-reset .error-count span { - display: inline-block; - background-color: #aacd4e; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: white; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .support a { - display: inline-block; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - padding: 4px; - color: #000000; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} - -.sf-reset .toggle { - vertical-align: middle; -} -.sf-reset .linked ul, -.sf-reset .linked li { - display: inline; -} -.sf-reset #output-content { - color: #000; - font-size: 12px; -} -.sf-reset #traces-text pre { - white-space: pre; - font-size: 12px; - font-family: monospace; -} diff --git a/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg b/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg deleted file mode 100644 index 6837aff1..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/chevron-right.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 b/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 deleted file mode 100644 index fb076ed1..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/favicon.png.base64 +++ /dev/null @@ -1 +0,0 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAYAAAABtRhCAAADVUlEQVRIx82XX0jTURTHLYPyqZdefQx66CEo80+aYpoIkqzUikz6Z5klQoWUWYRIJYEUGpQ+lIr9U5dOTLdCtkmWZis3rbnC5fw/neYW002307mX/cZvP3/7o1PwwOdh95x7vnf39zvnd29AgBer2xO6DclAXiMqZAqxIiNIN/IYSUS2BPhjmGATchUxI+ADWiRhpWK7HKuHFVBFdmU5YvnI4grFGCaReF/EBH4KsZlGgj2JBTuCYBWRIYF8YoEOJ6wBt/gEs7mBbyOjQXruPLSdOgPCiEiPSUUHDoL8Ug5IUo9B/d5wrt+G7OAKNrODPuVdB6vRCIzN6SdBlpW9RIgk/1FeAXabzRlrUPVCS/JhbmwudztnGeeH9AyXBIwtmM3wLinZJZHifjHw2V+NBoRh+9ixQrbgbnaSIcl7cGea6hoXQbNe7za241oeO5Z0p42M4BV2EqP2D50wo+6HzvwC6C4sApNOR8cmOrtcnhtj2kYRyC9eBvXzKrBZrXSs72kFd1t3MoKVbMekQkEnSNKOO8fac3LpmK6l1TlGtsxmsdKFsecPYgwxst0cwROMYDXboSotg0WLBRqjY51jLYcENElXwW2XJKPydvoI2GN9T8rBtrAArYIUruBJXkFheCQYlCpQP6uk5dAQFQNaUROMSGVQFxLmkoQsxDJrhLbTZ+nvVsERME9MgPJRKV/58AsyomTSzE813WLFvWK++qI0xSfQl8k8Pg46sYRuv5t6dS+4RqxDwaa4BGjYH+NTQvKScIp9+YL/hoZh3jDtLRHtt2C3g6bmhX+CpsFBWg7ilDSPgj0lD2ncr5ev/BP8VvyAJhqVyZeUhPOrEhEFxgEtjft846Z/guQTNT89Q5P9flMLoth4F7808wKtWWKzAwNQHxrh/1vaid2F+XpYTSbQf1XA2McOmOpROnvpvMEA4tSjq1cW0sws2gCYxswY6TKkvzYnJq1NHZLnRU4BX+4U0uburvusu8Kv8iHY7qefkM4IFngJHEOUXmLEPgiGsI8YnlZILit3vSSLRTQe/MPIZva5pshNIEmyFQlCvruJKXPkCEfmePzkphXHdzZNQdoRI9KPlBAxlj/I8U97ERPS5bjGbWDFbEdqHVe5caTBeZZx2H/IMvzeN15yoQAAAABJRU5ErkJggg== diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg deleted file mode 100644 index 498a74f4..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-book.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg deleted file mode 100644 index 844a4f99..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg deleted file mode 100644 index be534ad4..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg deleted file mode 100644 index 471c2741..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-minus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg deleted file mode 100644 index b2593a9f..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square-o.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg deleted file mode 100644 index 2f5c3b35..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-plus-square.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg b/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg deleted file mode 100644 index 03fd8e76..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/icon-support.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php b/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php deleted file mode 100644 index 4b2f9c1b..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/symfony-ghost.svg.php +++ /dev/null @@ -1 +0,0 @@ -addElementToGhost(); ?> diff --git a/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg b/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg deleted file mode 100644 index f10824ae..00000000 --- a/vendor/symfony/error-handler/Resources/assets/images/symfony-logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/symfony/error-handler/Resources/assets/js/exception.js b/vendor/symfony/error-handler/Resources/assets/js/exception.js deleted file mode 100644 index 89c00833..00000000 --- a/vendor/symfony/error-handler/Resources/assets/js/exception.js +++ /dev/null @@ -1,286 +0,0 @@ -/* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig. - If you make any change in this file, verify the same change is needed in the other file. */ -/* .tab'); - var tabNavigation = document.createElement('div'); - tabNavigation.className = 'tab-navigation'; - tabNavigation.setAttribute('role', 'tablist'); - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('button'); - addClass(tabNavigationItem, 'tab-control'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - tabNavigationItem.setAttribute('role', 'tab'); - tabNavigationItem.setAttribute('aria-controls', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { - addClass(tabNavigationItem, 'disabled'); - } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); - } - - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope > .tab-navigation .tab-control'); - - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - var tabPanel = document.getElementById(tabId); - tabPanel.setAttribute('role', 'tabpanel'); - tabPanel.setAttribute('aria-labelledby', tabId); - tabPanel.querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - tabPanel.className = 'block'; - tabNavigation[j].setAttribute('aria-selected', 'true'); - tabNavigation[j].removeAttribute('tabindex'); - } else { - tabPanel.className = 'hidden'; - tabNavigation[j].removeAttribute('aria-selected'); - tabNavigation[j].setAttribute('tabindex', '-1'); - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '